Bug 262294 - mail/dma: cron job file installed in wrong path
Summary: mail/dma: cron job file installed in wrong path
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Renato Botelho
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-03-02 12:25 UTC by Guido Falsi
Modified: 2022-03-02 13:31 UTC (History)
0 users

See Also:
garga: maintainer-feedback+


Attachments
Fix (1.32 KB, patch)
2022-03-02 12:25 UTC, Guido Falsi
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Guido Falsi freebsd_committer freebsd_triage 2022-03-02 12:25:55 UTC
Created attachment 232202 [details]
Fix

Hi,

I've noticed the cron job file added in commit ports f3c2313c5893 actually puts the file in PREFIX/etc/dma/cron.d, where it is never read by cron.

Looks like the Makefile is using ETCDIR like it means PREFIX/etc, but it is actually defined as:

ETCDIR?=    ${PREFIX}/etc/${PORTNAME}

I'm attaching a patch fixing this and putting the cron configuration file where it should.

While here I also noticed the plist using absolute paths for file which are instead really installed in ETCDIR, so I put the correct substitution there.

Patch works fine in poudriere for all supported releases and I'm using it on my machines.
Comment 1 Renato Botelho freebsd_committer freebsd_triage 2022-03-02 12:39:57 UTC
Yeah, it was my fault.  Sorry.

I'm going to work on it asap
Comment 2 Renato Botelho freebsd_committer freebsd_triage 2022-03-02 12:41:35 UTC
Patch is approved.
Comment 3 commit-hook freebsd_committer freebsd_triage 2022-03-02 13:29:59 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=bfacd10e33090f9b779ec7333d981aac0d70dc15

commit bfacd10e33090f9b779ec7333d981aac0d70dc15
Author:     Guido Falsi <madpilot@FreeBSD.org>
AuthorDate: 2022-03-02 13:23:29 +0000
Commit:     Guido Falsi <madpilot@FreeBSD.org>
CommitDate: 2022-03-02 13:28:57 +0000

    mail/dma: Fix cronjob install location

    - Install the cronjob file in the correct location, so it is
      automatically picked up by cron
    - While here, use ETCDIR expansion in plist in place of static path
      where appropriate

    PR:             262294
    Approved by:    garga (maintainer)
    Fixes:          f3c2313c5893 mail/dma: Implement cronjob to flush emails

 mail/dma/Makefile  | 6 ++++--
 mail/dma/pkg-plist | 6 +++---
 2 files changed, 7 insertions(+), 5 deletions(-)
Comment 4 Guido Falsi freebsd_committer freebsd_triage 2022-03-02 13:31:05 UTC
Patch committed. Thanks for the fast feedback!