Bug 253567 - sysutils/anacron: does not start after resume
Summary: sysutils/anacron: does not start after resume
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-02-16 19:15 UTC by Walter von Entferndt
Modified: 2021-02-18 23:14 UTC (History)
3 users (show)

See Also:
bugzilla: maintainer-feedback? (dz)
fernape: maintainer-feedback? (dz)
walter.von.entferndt: merge-quarterly?


Attachments
call anacron after resume. Needs portvars.diff or obvious minor changes. (990 bytes, patch)
2021-02-16 19:15 UTC, Walter von Entferndt
walter.von.entferndt: maintainer-approval? (walter.von.entferndt)
Details | Diff
Use PORTNAME & COMMENT to easily copy & paste files between ports. (2.66 KB, patch)
2021-02-16 19:18 UTC, Walter von Entferndt
walter.von.entferndt: maintainer-approval? (walter.von.entferndt)
Details | Diff
Fixes compiler warnings in the source *.c files. (1.91 KB, patch)
2021-02-16 19:23 UTC, Walter von Entferndt
walter.von.entferndt: maintainer-approval? (walter.von.entferndt)
Details | Diff
Patch to make pkg-plist variables work better (1.54 KB, patch)
2021-02-18 16:22 UTC, Derik van Zuetphen
dz: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Walter von Entferndt 2021-02-16 19:15:25 UTC
Created attachment 222499 [details]
call anacron after resume.  Needs portvars.diff or obvious minor changes.

The anacron utility should be run by it's rc(8) script after resume, since the time to run jobs from the anacrontab(5) might have passed while the system was sleeping.

NOTE: the patch I provide needs the SUB_LIST in the Makefile from the 2nd patch portvars.diff.  Obviously the latter is only reasonable if one wants to copy & paste the patched files between ports; OTOH, it adds a little bit complexity.  If you don't like that, please ommit that patch and adjust the other patch anacron.in.diff.

Thx for your work as maintainer.
Comment 1 Walter von Entferndt 2021-02-16 19:18:46 UTC
Created attachment 222500 [details]
Use PORTNAME & COMMENT to easily copy & paste files between ports.

see NOTES above.
Comment 2 Walter von Entferndt 2021-02-16 19:23:28 UTC
Created attachment 222501 [details]
Fixes compiler warnings in the source *.c files.
Comment 3 Fernando Apesteguía freebsd_committer 2021-02-18 08:06:24 UTC
^Triage: Submitter is not maintainer, can not set maintainer-feedback to '+'
Comment 4 Derik van Zuetphen 2021-02-18 16:22:04 UTC
Created attachment 222554 [details]
Patch to make pkg-plist variables work better
Comment 5 Derik van Zuetphen 2021-02-18 16:24:58 UTC
Hello,

I approve the patches. 

Thanks Walter, for tidying-up the port.

But I think the pkg-plist handling is not complete according to https://docs.freebsd.org/en/books/porters-handbook/#plist

I have added a pkg-plist.diff to fix this. Apply on top of the other patches.

Please have a look if everything is ok (worked for me :-) )

Thanks

-Derik.
Comment 6 Walter von Entferndt 2021-02-18 23:14:13 UTC
(In reply to Derik van Zuetphen from comment #5)
OK, it runs all through w/o errors.  I'm wondering what happens with all those *.orig and empty files.  But since the ports are built in poudriere, I guess they do not hurt and/or you'll take care of that.

Test: Now I suspend... and back again :)
Feb 19 00:09:16 t450s root[48107]: /etc/rc.resume: INFO: starting anacron after resume
Feb 19 00:09:16 t450s anacron[49721]: Anacron 2.3 started on 2021-02-19
Feb 19 00:09:16 t450s anacron[49721]: Will run job `ntpdate' in 1 min.
Feb 19 00:09:16 t450s anacron[49721]: Will run job `periodic-daily' in 5 min.
Feb 19 00:09:16 t450s anacron[49721]: Jobs will be executed sequentially