Bug#1067752: anacrontab(5) incorrectly says the only @period is @monthly (@yearly also supported)

2024-04-04 Thread Thorsten Glaser
Hi,

I don’t think a /etc/cron.yearly/ should be created as directory,
given that the default /etc/crontab never executes anything in it
even if anacron may do.

bye,
//mirabilos
-- 
Gestern Nacht ist mein IRC-Netzwerk explodiert. Ich hatte nicht damit
gerechnet, darum bin ich blutverschmiert… wer konnte ahnen, daß SIE so
reagier’n… gestern Nacht ist mein IRC-Netzwerk explodiert~~~
(as of 2021-06-15 The MirOS Project temporarily reconvenes on OFTC)



Bug#1067752: anacrontab(5) incorrectly says the only @period is @monthly (@yearly also supported)

2024-03-26 Thread Lin Qigang

anacrontab.5 says:
   The
   .I period_name
   can only be set to monthly at the present time.\&
(note also the weird space at the end) the README says:
   Anacron solves this problem.  These jobs can simply be scheduled as
   Anacron-jobs with periods of 1, 7 and a special target called @monthly.
but readtab.c says:
 if (!strncmp ("@monthly", periods, 7)) {
 jr->named_period = 1;
 } else if (!strncmp("@yearly", periods, 7)) {
 jr->named_period = 2;
 } else {
 complain("%s: Unknown named period on line %d, skipping",
  anacrontab, line_num);
 }
so the manual is wrong here.

Attaching a patch that mentions @yearly in the manual. I got lost
in the "source forge" bullshit listed as the upstream in d/control
and d/watch, and @monthly seems to come from d/p/debian-changes
anyway (it's tagged as accumulated upstream git but idk due to the
aforementioned), so please forward/squash into d/p/d-c at your
discretion.


Thank you for your contribution. This patch has been applied in 
debian-changes, and a new version of anacron 2.3-40 has been uploaded. 
Apparently, @yearly has been available since 2005.


--
Lance Lin
GPG Fingerprint: 4A31 DB5A 1EE4 096C 8739 9880 9036 4929 4C33 F9B7


OpenPGP_0x903649294C33F9B7.asc
Description: OpenPGP public key


OpenPGP_signature.asc
Description: OpenPGP digital signature


Bug#1067752: anacrontab(5) incorrectly says the only @period is @monthly (@yearly also supported)

2024-03-26 Thread наб
Package: anacron
Version: 2.3-39
Severity: minor
Tags: patch

Dear Maintainer,

anacrontab.5 says:
  The
  .I period_name
  can only be set to monthly at the present time.\&
(note also the weird space at the end) the README says:
  Anacron solves this problem.  These jobs can simply be scheduled as
  Anacron-jobs with periods of 1, 7 and a special target called @monthly.
but readtab.c says:
if (!strncmp ("@monthly", periods, 7)) {
jr->named_period = 1;
} else if (!strncmp("@yearly", periods, 7)) {
jr->named_period = 2;
} else {
complain("%s: Unknown named period on line %d, skipping",
 anacrontab, line_num);
}
so the manual is wrong here.

Attaching a patch that mentions @yearly in the manual. I got lost
in the "source forge" bullshit listed as the upstream in d/control
and d/watch, and @monthly seems to come from d/p/debian-changes
anyway (it's tagged as accumulated upstream git but idk due to the
aforementioned), so please forward/squash into d/p/d-c at your
discretion.

Best,
наб

-- System Information:
Debian Release: 12.4
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 
'stable-debug'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 6.1.0-12-amd64 (SMP w/24 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_FIRMWARE_WORKAROUND, 
TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_GB:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Subject: anacrontab.5: mention @yearly
Author: наб 

--- anacron-2.3.orig/anacrontab.5
+++ anacron-2.3/anacrontab.5
@@ -28,11 +28,13 @@ The
 .I command
 can be any shell command.\&
 The fields can be separated by blank spaces or tabs.\&
-The
 .I period_name
-can only be set to monthly at the present time.\&
+can be set to
+.B monthly
+or
+.BR yearly .\&
 This will ensure jobs are only run once a month, no matter the number of days
-in this month, or the previous month.\&
+in this month, or the previous month; or analogously for the year.\&
 .PP
 Environment assignment lines are of the form:
 .PP


signature.asc
Description: PGP signature