From b6ab1d0ee4c528867fe8d6f049a7c10700d71755 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 20 Jul 2022 21:26:49 +0000 Subject: [PATCH 01/20] Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- at.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/at.spec b/at.spec index fe37818..b98736a 100644 --- a/at.spec +++ b/at.spec @@ -3,7 +3,7 @@ Summary: Job spooling tools Name: at Version: 3.2.5 -Release: 3%{?dist} +Release: 4%{?dist} # http://packages.debian.org/changelogs/pool/main/a/at/current/copyright # + install-sh is MIT license with changes under Public Domain License: GPLv3+ and GPLv2+ and ISC and MIT and Public Domain @@ -164,6 +164,9 @@ chown root:root %{_localstatedir}/spool/at/.SEQ %attr(0644,root,root) /%{_unitdir}/atd.service %changelog +* Wed Jul 20 2022 Fedora Release Engineering - 3.2.5-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + * Thu Mar 31 2022 Jan Staněk - 3.2.5-3 - Add preceding newline to delimiter in at-3.2.2-shell.patch From a069b01c5ac84ae01edfca084f3ac59f6997843a Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 18 Jan 2023 22:21:37 +0000 Subject: [PATCH 02/20] Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- at.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/at.spec b/at.spec index b98736a..989fffc 100644 --- a/at.spec +++ b/at.spec @@ -3,7 +3,7 @@ Summary: Job spooling tools Name: at Version: 3.2.5 -Release: 4%{?dist} +Release: 5%{?dist} # http://packages.debian.org/changelogs/pool/main/a/at/current/copyright # + install-sh is MIT license with changes under Public Domain License: GPLv3+ and GPLv2+ and ISC and MIT and Public Domain @@ -164,6 +164,9 @@ chown root:root %{_localstatedir}/spool/at/.SEQ %attr(0644,root,root) /%{_unitdir}/atd.service %changelog +* Wed Jan 18 2023 Fedora Release Engineering - 3.2.5-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + * Wed Jul 20 2022 Fedora Release Engineering - 3.2.5-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild From 36dcc21dda52bf5450d29c0c130ae6e739f7c838 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Poho=C5=99elsk=C3=BD?= Date: Mon, 26 Jun 2023 15:18:20 +0200 Subject: [PATCH 03/20] Convert licenses to SPDX format Dropped MIT and Public Domain license as they are not present in upstream sources --- at.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/at.spec b/at.spec index 989fffc..4df9333 100644 --- a/at.spec +++ b/at.spec @@ -3,10 +3,10 @@ Summary: Job spooling tools Name: at Version: 3.2.5 -Release: 5%{?dist} +Release: 6%{?dist} # http://packages.debian.org/changelogs/pool/main/a/at/current/copyright # + install-sh is MIT license with changes under Public Domain -License: GPLv3+ and GPLv2+ and ISC and MIT and Public Domain +License: GPL-3.0-or-later AND GPL-2.0-or-later AND ISC URL: http://ftp.debian.org/debian/pool/main/a/at Source: http://software.calhariz.com/at/at_%{version}.orig.tar.gz @@ -164,6 +164,10 @@ chown root:root %{_localstatedir}/spool/at/.SEQ %attr(0644,root,root) /%{_unitdir}/atd.service %changelog +* Mon Jun 26 2023 Ondřej Pohořelský - 3.2.5-6 +- Convert licenses to SPDX format +- Dropped MIT and Public Domain license as they are not present in upstream sources + * Wed Jan 18 2023 Fedora Release Engineering - 3.2.5-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild From 0489cbcbe2c133a8c9a00d1e80297247f30d4593 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 19 Jul 2023 14:01:03 +0000 Subject: [PATCH 04/20] Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- at.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/at.spec b/at.spec index 4df9333..c457b82 100644 --- a/at.spec +++ b/at.spec @@ -3,7 +3,7 @@ Summary: Job spooling tools Name: at Version: 3.2.5 -Release: 6%{?dist} +Release: 7%{?dist} # http://packages.debian.org/changelogs/pool/main/a/at/current/copyright # + install-sh is MIT license with changes under Public Domain License: GPL-3.0-or-later AND GPL-2.0-or-later AND ISC @@ -164,6 +164,9 @@ chown root:root %{_localstatedir}/spool/at/.SEQ %attr(0644,root,root) /%{_unitdir}/atd.service %changelog +* Wed Jul 19 2023 Fedora Release Engineering - 3.2.5-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + * Mon Jun 26 2023 Ondřej Pohořelský - 3.2.5-6 - Convert licenses to SPDX format - Dropped MIT and Public Domain license as they are not present in upstream sources From 10907ac03939fc7b28c2b951416a8209505808e1 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 19 Jan 2024 13:47:50 +0000 Subject: [PATCH 05/20] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- at.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/at.spec b/at.spec index c457b82..a78d0d8 100644 --- a/at.spec +++ b/at.spec @@ -3,7 +3,7 @@ Summary: Job spooling tools Name: at Version: 3.2.5 -Release: 7%{?dist} +Release: 8%{?dist} # http://packages.debian.org/changelogs/pool/main/a/at/current/copyright # + install-sh is MIT license with changes under Public Domain License: GPL-3.0-or-later AND GPL-2.0-or-later AND ISC @@ -164,6 +164,9 @@ chown root:root %{_localstatedir}/spool/at/.SEQ %attr(0644,root,root) /%{_unitdir}/atd.service %changelog +* Fri Jan 19 2024 Fedora Release Engineering - 3.2.5-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Wed Jul 19 2023 Fedora Release Engineering - 3.2.5-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild From ba26b4715f7ecff26553c66f95ea8c13c0fe5e3d Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Mon, 22 Jan 2024 23:43:30 +0000 Subject: [PATCH 06/20] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- at.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/at.spec b/at.spec index a78d0d8..3677213 100644 --- a/at.spec +++ b/at.spec @@ -3,7 +3,7 @@ Summary: Job spooling tools Name: at Version: 3.2.5 -Release: 8%{?dist} +Release: 9%{?dist} # http://packages.debian.org/changelogs/pool/main/a/at/current/copyright # + install-sh is MIT license with changes under Public Domain License: GPL-3.0-or-later AND GPL-2.0-or-later AND ISC @@ -164,6 +164,9 @@ chown root:root %{_localstatedir}/spool/at/.SEQ %attr(0644,root,root) /%{_unitdir}/atd.service %changelog +* Mon Jan 22 2024 Fedora Release Engineering - 3.2.5-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Fri Jan 19 2024 Fedora Release Engineering - 3.2.5-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From 7a6968e726cdb80440a9922b5044e8b41752b86e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Poho=C5=99elsk=C3=BD?= Date: Thu, 2 May 2024 16:19:21 +0200 Subject: [PATCH 07/20] Corrected document-n patch Resolves: rhbz#2276918 --- at-3.1.23-document-n.patch | 3 ++- at.spec | 6 +++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/at-3.1.23-document-n.patch b/at-3.1.23-document-n.patch index 7028300..39e77e4 100644 --- a/at-3.1.23-document-n.patch +++ b/at-3.1.23-document-n.patch @@ -9,10 +9,11 @@ diff -up at-3.1.23/atd.8.in.document-n at-3.1.23/atd.8.in .RB [ \-s ] .SH DESCRIPTION .B atd -@@ -44,6 +45,10 @@ in the foreground. +@@ -44,6 +45,11 @@ in the foreground. Process the at/batch queue only once. This is primarily of use for compatibility with old versions of .BR at ; ++.TP +.B \-n +Append the hostname of the system to the subject of the e-mails sent by +.BR atd . diff --git a/at.spec b/at.spec index 3677213..ba00768 100644 --- a/at.spec +++ b/at.spec @@ -3,7 +3,7 @@ Summary: Job spooling tools Name: at Version: 3.2.5 -Release: 9%{?dist} +Release: 10%{?dist} # http://packages.debian.org/changelogs/pool/main/a/at/current/copyright # + install-sh is MIT license with changes under Public Domain License: GPL-3.0-or-later AND GPL-2.0-or-later AND ISC @@ -164,6 +164,10 @@ chown root:root %{_localstatedir}/spool/at/.SEQ %attr(0644,root,root) /%{_unitdir}/atd.service %changelog +* Thu May 02 2024 Ondřej Pohořelský - 3.2.5-10 +- Corrected document-n patch +- Resolves: rhbz#2276918 + * Mon Jan 22 2024 Fedora Release Engineering - 3.2.5-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From 14379bfef8e307901b26f2ad09acdc9afec40011 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 17 Jul 2024 17:42:30 +0000 Subject: [PATCH 08/20] Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild --- at.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/at.spec b/at.spec index ba00768..65d389b 100644 --- a/at.spec +++ b/at.spec @@ -3,7 +3,7 @@ Summary: Job spooling tools Name: at Version: 3.2.5 -Release: 10%{?dist} +Release: 11%{?dist} # http://packages.debian.org/changelogs/pool/main/a/at/current/copyright # + install-sh is MIT license with changes under Public Domain License: GPL-3.0-or-later AND GPL-2.0-or-later AND ISC @@ -164,6 +164,9 @@ chown root:root %{_localstatedir}/spool/at/.SEQ %attr(0644,root,root) /%{_unitdir}/atd.service %changelog +* Wed Jul 17 2024 Fedora Release Engineering - 3.2.5-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + * Thu May 02 2024 Ondřej Pohořelský - 3.2.5-10 - Corrected document-n patch - Resolves: rhbz#2276918 From 5f6bc87dd0f8fedd63cb63e41b3a3000cb35dd35 Mon Sep 17 00:00:00 2001 From: Ales Nezbeda Date: Thu, 8 Aug 2024 16:44:26 +0200 Subject: [PATCH 09/20] Backport PR from upstream addressing SAST issues --- at-3.2.2-lock-locks.patch | 2 +- at-3.2.5-address-sast.patch | 57 +++++++++++++++++++++++++++++++++ at-3.2.5-mailwithhostname.patch | 2 +- at-3.2.5-pam.patch | 2 +- at.spec | 7 +++- 5 files changed, 66 insertions(+), 4 deletions(-) create mode 100644 at-3.2.5-address-sast.patch diff --git a/at-3.2.2-lock-locks.patch b/at-3.2.2-lock-locks.patch index 6d97c82..5b97d34 100644 --- a/at-3.2.2-lock-locks.patch +++ b/at-3.2.2-lock-locks.patch @@ -19,7 +19,7 @@ diff -ur b/atd.c a/atd.c + int fd_out, fd_in, fd_std; char jobbuf[9]; char *mailname = NULL; - int mailsize = 128; + size_t mailsize = 128; @@ -390,6 +393,10 @@ fcntl(fd_in, F_SETFD, fflags & ~FD_CLOEXEC); diff --git a/at-3.2.5-address-sast.patch b/at-3.2.5-address-sast.patch new file mode 100644 index 0000000..ecf981c --- /dev/null +++ b/at-3.2.5-address-sast.patch @@ -0,0 +1,57 @@ +From 43e8b5b5dd72bb9a80679dec8c15a24f00888a53 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jan=20Stan=C4=9Bk?= +Date: Wed, 26 Jun 2024 16:59:31 +0200 +Subject: [PATCH] Address issues from static analyzer +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +- Tweak types in run_file() to prevent overflow +- Initialize all members of of struct tm in posix_time_parse(). + +The static analyzer findings: https://issues.redhat.com/browse/RHEL-44999 + +Signed-off-by: Jan Staněk +--- + atd.c | 4 ++-- + posixtm.c | 2 +- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/atd.c b/atd.c +index 64fdd83..3908de3 100644 +--- a/atd.c ++++ b/atd.c +@@ -279,7 +279,7 @@ run_file(const char *filename, uid_t uid, gid_t gid) + int fd_out, fd_in; + char jobbuf[9]; + char *mailname = NULL; +- int mailsize = 128; ++ size_t mailsize = 128; + char *newname; + FILE *stream; + int send_mail = 0; +@@ -292,7 +292,7 @@ run_file(const char *filename, uid_t uid, gid_t gid) + char queue; + char fmt[64]; + unsigned long jobno; +- int rc; ++ long rc; + #ifdef HAVE_PAM + int retcode; + #endif +diff --git a/posixtm.c b/posixtm.c +index cf4ec09..06b22fa 100644 +--- a/posixtm.c ++++ b/posixtm.c +@@ -188,7 +188,7 @@ posix_time_parse (struct tm *tm, const char *s, unsigned int syntax_bits) + bool + posixtime (time_t *p, const char *s, unsigned int syntax_bits) + { +- struct tm tm0; ++ struct tm tm0 = {0}; + struct tm tm1; + struct tm const *tm; + time_t t; +-- +GitLab + diff --git a/at-3.2.5-mailwithhostname.patch b/at-3.2.5-mailwithhostname.patch index cebfb76..a601db4 100644 --- a/at-3.2.5-mailwithhostname.patch +++ b/at-3.2.5-mailwithhostname.patch @@ -23,7 +23,7 @@ diff -ur b/atd.c a/atd.c @@ -301,6 +306,7 @@ char fmt[64]; unsigned long jobno; - int rc; + long rc; + char hostbuf[MAXHOSTNAMELEN]; #ifdef WITH_PAM int retcode; diff --git a/at-3.2.5-pam.patch b/at-3.2.5-pam.patch index 941da0a..eba2f84 100644 --- a/at-3.2.5-pam.patch +++ b/at-3.2.5-pam.patch @@ -131,7 +131,7 @@ diff -ur b/atd.c a/atd.c @@ -293,7 +289,7 @@ char fmt[64]; unsigned long jobno; - int rc; + long rc; -#ifdef HAVE_PAM +#ifdef WITH_PAM int retcode; diff --git a/at.spec b/at.spec index 65d389b..d36c82d 100644 --- a/at.spec +++ b/at.spec @@ -3,7 +3,7 @@ Summary: Job spooling tools Name: at Version: 3.2.5 -Release: 11%{?dist} +Release: 12%{?dist} # http://packages.debian.org/changelogs/pool/main/a/at/current/copyright # + install-sh is MIT license with changes under Public Domain License: GPL-3.0-or-later AND GPL-2.0-or-later AND ISC @@ -15,6 +15,7 @@ Source1: pam_atd Source3: atd.sysconf Source5: atd.systemd +Patch: at-3.2.5-address-sast.patch Patch: at-aarch64.patch Patch: at-3.2.5-make.patch Patch: at-3.2.5-pam.patch @@ -164,6 +165,10 @@ chown root:root %{_localstatedir}/spool/at/.SEQ %attr(0644,root,root) /%{_unitdir}/atd.service %changelog +* Thu Aug 8 2024 Ales Nezbeda - 3.2.5-12 +- Backport fixes from upstream PR +- https://salsa.debian.org/debian/at/-/merge_requests/34 + * Wed Jul 17 2024 Fedora Release Engineering - 3.2.5-11 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild From 5eee4f96240768d3e34023fabb7aee4f6fdf0b64 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 16 Jan 2025 11:51:06 +0000 Subject: [PATCH 10/20] Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild --- at.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/at.spec b/at.spec index d36c82d..b317829 100644 --- a/at.spec +++ b/at.spec @@ -3,7 +3,7 @@ Summary: Job spooling tools Name: at Version: 3.2.5 -Release: 12%{?dist} +Release: 13%{?dist} # http://packages.debian.org/changelogs/pool/main/a/at/current/copyright # + install-sh is MIT license with changes under Public Domain License: GPL-3.0-or-later AND GPL-2.0-or-later AND ISC @@ -165,6 +165,9 @@ chown root:root %{_localstatedir}/spool/at/.SEQ %attr(0644,root,root) /%{_unitdir}/atd.service %changelog +* Thu Jan 16 2025 Fedora Release Engineering - 3.2.5-13 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + * Thu Aug 8 2024 Ales Nezbeda - 3.2.5-12 - Backport fixes from upstream PR - https://salsa.debian.org/debian/at/-/merge_requests/34 From 0da79b8efbea92705a852a17b7b9035d2cb10689 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Poho=C5=99elsk=C3=BD?= Date: Mon, 27 Jan 2025 13:49:35 +0100 Subject: [PATCH 11/20] Unify bin and sbin directories Resolves: rhbz#2339910 --- at.spec | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/at.spec b/at.spec index b317829..fc325f7 100644 --- a/at.spec +++ b/at.spec @@ -3,7 +3,7 @@ Summary: Job spooling tools Name: at Version: 3.2.5 -Release: 13%{?dist} +Release: 14%{?dist} # http://packages.debian.org/changelogs/pool/main/a/at/current/copyright # + install-sh is MIT license with changes under Public Domain License: GPL-3.0-or-later AND GPL-2.0-or-later AND ISC @@ -87,7 +87,7 @@ make install \ DAEMON_USERNAME=`id -nu` \ DAEMON_GROUPNAME=`id -ng` \ DESTDIR=%{buildroot} \ - sbindir=%{_prefix}/sbin \ + sbindir=%{_bindir} \ bindir=%{_bindir} \ datadir=%{_datadir} \ prefix=%{_prefix} \ @@ -154,8 +154,8 @@ chown root:root %{_localstatedir}/spool/at/.SEQ %attr(0600,root,root) %verify(not md5 size mtime) %ghost %{_localstatedir}/spool/at/.SEQ %attr(0700,root,root) %dir %{_localstatedir}/spool/at/spool %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/pam.d/atd -%{_sbindir}/atrun -%attr(0755,root,root) %{_sbindir}/atd +%{_bindir}/atrun +%attr(0755,root,root) %{_bindir}/atd %{_mandir}/man*/* %{_bindir}/batch %{_bindir}/atrm @@ -165,6 +165,10 @@ chown root:root %{_localstatedir}/spool/at/.SEQ %attr(0644,root,root) /%{_unitdir}/atd.service %changelog +* Mon Jan 27 2025 Ondřej Pohořelský - 3.2.5-14 +- Unify bin and sbin directories +- Resolves: rhbz#2339910 + * Thu Jan 16 2025 Fedora Release Engineering - 3.2.5-13 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild From 0da060e2afaa594f921f3cec0c13d01555a8a3eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Poho=C5=99elsk=C3=BD?= Date: Mon, 5 May 2025 10:14:16 +0200 Subject: [PATCH 12/20] Claim ownership of /usr/share/at Resolves: rhbz#2283298 --- at.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/at.spec b/at.spec index fc325f7..51a0785 100644 --- a/at.spec +++ b/at.spec @@ -3,7 +3,7 @@ Summary: Job spooling tools Name: at Version: 3.2.5 -Release: 14%{?dist} +Release: 15%{?dist} # http://packages.debian.org/changelogs/pool/main/a/at/current/copyright # + install-sh is MIT license with changes under Public Domain License: GPL-3.0-or-later AND GPL-2.0-or-later AND ISC @@ -161,10 +161,15 @@ chown root:root %{_localstatedir}/spool/at/.SEQ %{_bindir}/atrm %{_bindir}/atq %attr(4755,root,root) %{_bindir}/at +%{_datadir}/at/ %{_datadir}/at/batch-job %attr(0644,root,root) /%{_unitdir}/atd.service %changelog +* Mon May 05 2025 Ondřej Pohořelský - 3.2.5-15 +- Claim ownership of /usr/share/at +- Resolves: rhbz#2283298 + * Mon Jan 27 2025 Ondřej Pohořelský - 3.2.5-14 - Unify bin and sbin directories - Resolves: rhbz#2339910 From c697b4595ce1df51088a6427f1a53121ba70c673 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Poho=C5=99elsk=C3=BD?= Date: Thu, 26 Jun 2025 09:42:57 +0200 Subject: [PATCH 13/20] Fix past date handling with -t option --- at-3.2.5-past-date.patch | 33 +++++++++++++++++++++++++++++++++ at.spec | 6 +++++- 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 at-3.2.5-past-date.patch diff --git a/at-3.2.5-past-date.patch b/at-3.2.5-past-date.patch new file mode 100644 index 0000000..6344c40 --- /dev/null +++ b/at-3.2.5-past-date.patch @@ -0,0 +1,33 @@ +From 6c131df8c85cb2761faf551f8f9db179e216fc09 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ond=C5=99ej=20Poho=C5=99elsk=C3=BD?= +Date: Wed, 25 Jun 2025 14:35:31 +0200 +Subject: [PATCH] Reject past dates when using -t option + +-t option was missing validation to reject past dates, unlike the +regular time parsing. + +Add the same past date validation used by parsetime() to the posixtime() +code path to ensure consistent behavior when parsing time. +--- + at.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/at.c b/at.c +index 8d0feaa..3fb0582 100644 +--- a/at.c ++++ b/at.c +@@ -951,6 +951,11 @@ main(int argc, char **argv) + fprintf(stderr, "invalid date format: %s\n", optarg); + exit(EXIT_FAILURE); + } ++ /* Check if the parsed time is in the past */ ++ if (timer < time(NULL)) { ++ fprintf(stderr, "at: refusing to create job destined in the past\n"); ++ exit(EXIT_FAILURE); ++ } + break; + + case 'o': +-- +2.49.0 + diff --git a/at.spec b/at.spec index 51a0785..1bf04e7 100644 --- a/at.spec +++ b/at.spec @@ -3,7 +3,7 @@ Summary: Job spooling tools Name: at Version: 3.2.5 -Release: 15%{?dist} +Release: 16%{?dist} # http://packages.debian.org/changelogs/pool/main/a/at/current/copyright # + install-sh is MIT license with changes under Public Domain License: GPL-3.0-or-later AND GPL-2.0-or-later AND ISC @@ -31,6 +31,7 @@ Patch: at-3.1.16-clear-nonjobs.patch Patch: at-3.2.2-lock-locks.patch Patch: at-3.1.23-document-n.patch Patch: at-3.1.20-log-jobs.patch +Patch: at-3.2.5-past-date.patch BuildRequires: gcc BuildRequires: flex flex-static bison autoconf @@ -166,6 +167,9 @@ chown root:root %{_localstatedir}/spool/at/.SEQ %attr(0644,root,root) /%{_unitdir}/atd.service %changelog +* Wed Jun 25 2025 Ondřej Pohořelský - 3.2.5-16 +- Fix past date handling with -t option + * Mon May 05 2025 Ondřej Pohořelský - 3.2.5-15 - Claim ownership of /usr/share/at - Resolves: rhbz#2283298 From e11f7fc108132b9b3eb4daa6728a4c65ccefb907 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Zaoral?= Date: Fri, 4 Jul 2025 13:22:58 +0200 Subject: [PATCH 14/20] tests: migrate from STI to TMT --- .fmf/version | 1 + plans/ci.fmf | 5 +++++ tests/initscript/main.fmf | 12 ++++++++++++ tests/initscript/runtest.sh | 2 +- tests/tests.yml | 13 ------------- 5 files changed, 19 insertions(+), 14 deletions(-) create mode 100644 .fmf/version create mode 100644 plans/ci.fmf create mode 100644 tests/initscript/main.fmf delete mode 100644 tests/tests.yml diff --git a/.fmf/version b/.fmf/version new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/.fmf/version @@ -0,0 +1 @@ +1 diff --git a/plans/ci.fmf b/plans/ci.fmf new file mode 100644 index 0000000..c1627f9 --- /dev/null +++ b/plans/ci.fmf @@ -0,0 +1,5 @@ +summary: Basic smoke test +discover: + how: fmf +execute: + how: tmt diff --git a/tests/initscript/main.fmf b/tests/initscript/main.fmf new file mode 100644 index 0000000..275b067 --- /dev/null +++ b/tests/initscript/main.fmf @@ -0,0 +1,12 @@ +summary: Initscript sanity +description: '' +contact: Radek Biba +component: + - at +test: ./runtest.sh +framework: beakerlib +recommend: + - at +duration: 5m +extra-summary: /CoreOS/at/Sanity/initscript +extra-task: /CoreOS/at/Sanity/initscript diff --git a/tests/initscript/runtest.sh b/tests/initscript/runtest.sh index a84aecb..67ecc2d 100755 --- a/tests/initscript/runtest.sh +++ b/tests/initscript/runtest.sh @@ -27,7 +27,7 @@ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # Include rhts environment -. /usr/share/rhts-library/rhtslib.sh +. /usr/share/beakerlib/beakerlib.sh || exit 1 PACKAGE="at" SERVICE="atd" diff --git a/tests/tests.yml b/tests/tests.yml deleted file mode 100644 index 751a586..0000000 --- a/tests/tests.yml +++ /dev/null @@ -1,13 +0,0 @@ ---- -# This first play always runs on the local staging system -- hosts: localhost - roles: - - role: standard-test-beakerlib - tags: - - classic - - container - - atomic - tests: - - initscript - required_packages: - - at # Required to run initscript From 1fc88529b95f6206e1e0cc6466241e010e6d3c36 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 23 Jul 2025 17:22:50 +0000 Subject: [PATCH 15/20] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild --- at.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/at.spec b/at.spec index 1bf04e7..44553a5 100644 --- a/at.spec +++ b/at.spec @@ -3,7 +3,7 @@ Summary: Job spooling tools Name: at Version: 3.2.5 -Release: 16%{?dist} +Release: 17%{?dist} # http://packages.debian.org/changelogs/pool/main/a/at/current/copyright # + install-sh is MIT license with changes under Public Domain License: GPL-3.0-or-later AND GPL-2.0-or-later AND ISC @@ -167,6 +167,9 @@ chown root:root %{_localstatedir}/spool/at/.SEQ %attr(0644,root,root) /%{_unitdir}/atd.service %changelog +* Wed Jul 23 2025 Fedora Release Engineering - 3.2.5-17 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + * Wed Jun 25 2025 Ondřej Pohořelský - 3.2.5-16 - Fix past date handling with -t option From 774dcfc0e121c81b6835df89ff5c83c708d2a5a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Poho=C5=99elsk=C3=BD?= Date: Wed, 27 Aug 2025 15:55:17 +0200 Subject: [PATCH 16/20] Use systemd-tmpfiles for /var/spool/at directories Replace RPM scriptlets with systemd-tmpfiles to create /var/spool/at structure, fixing Image Mode compatibility and bootc container lint warnings. --- at-tmpfiles.conf | 6 ++++++ at.spec | 22 ++++++++++++++-------- 2 files changed, 20 insertions(+), 8 deletions(-) create mode 100644 at-tmpfiles.conf diff --git a/at-tmpfiles.conf b/at-tmpfiles.conf new file mode 100644 index 0000000..8eec9a7 --- /dev/null +++ b/at-tmpfiles.conf @@ -0,0 +1,6 @@ +# at - Tmpfiles configuration for at daemon +# Create /var/spool/at directory structure for the at daemon + +d /var/spool/at 0700 root root - - +d /var/spool/at/spool 0700 root root - - +f /var/spool/at/.SEQ 0600 root root - - diff --git a/at.spec b/at.spec index 44553a5..3b02e46 100644 --- a/at.spec +++ b/at.spec @@ -3,7 +3,7 @@ Summary: Job spooling tools Name: at Version: 3.2.5 -Release: 17%{?dist} +Release: 18%{?dist} # http://packages.debian.org/changelogs/pool/main/a/at/current/copyright # + install-sh is MIT license with changes under Public Domain License: GPL-3.0-or-later AND GPL-2.0-or-later AND ISC @@ -12,6 +12,7 @@ URL: http://ftp.debian.org/debian/pool/main/a/at Source: http://software.calhariz.com/at/at_%{version}.orig.tar.gz # git upstream source git://git.debian.org/git/collab-maint/at.git Source1: pam_atd +Source2: at-tmpfiles.conf Source3: atd.sysconf Source5: atd.systemd @@ -38,6 +39,7 @@ BuildRequires: flex flex-static bison autoconf BuildRequires: libselinux-devel >= 1.27.9 BuildRequires: perl(Test::Harness) BuildRequires: perl(Test::More) +BuildRequires: systemd-rpm-macros %if %{with pam} BuildRequires: pam-devel @@ -50,6 +52,7 @@ BuildRequires: make Requires(post): systemd-units Requires(preun): systemd-units Requires(postun): systemd-units +Requires: systemd-tmpfiles # at-sysvinit subpackage dropped Obsoletes: at-sysvinit < 3.1.16-1 @@ -115,18 +118,24 @@ install -m 644 %{SOURCE3} %{buildroot}/etc/sysconfig/atd mkdir -p %{buildroot}/%{_unitdir}/ install -m 644 %{SOURCE5} %{buildroot}/%{_unitdir}/atd.service +# install tmpfiles configuration +mkdir -p %{buildroot}%{_tmpfilesdir} +install -m 644 %{SOURCE2} %{buildroot}%{_tmpfilesdir}/at.conf + # remove unpackaged files from the buildroot rm -r %{buildroot}%{_prefix}/doc +# Remove .SEQ file created by make install - tmpfiles will create it +rm -f %{buildroot}%{_localstatedir}/spool/at/.SEQ %check make test %post -touch %{_localstatedir}/spool/at/.SEQ -chmod 600 %{_localstatedir}/spool/at/.SEQ -chown root:root %{_localstatedir}/spool/at/.SEQ %systemd_post atd.service +# Create directories and files using tmpfiles +%tmpfiles_create at.conf + %preun %systemd_preun atd.service @@ -151,10 +160,8 @@ chown root:root %{_localstatedir}/spool/at/.SEQ %doc README timespec ChangeLog %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/at.deny %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/sysconfig/atd -%attr(0700,root,root) %dir %{_localstatedir}/spool/at -%attr(0600,root,root) %verify(not md5 size mtime) %ghost %{_localstatedir}/spool/at/.SEQ -%attr(0700,root,root) %dir %{_localstatedir}/spool/at/spool %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/pam.d/atd +%{_tmpfilesdir}/at.conf %{_bindir}/atrun %attr(0755,root,root) %{_bindir}/atd %{_mandir}/man*/* @@ -163,7 +170,6 @@ chown root:root %{_localstatedir}/spool/at/.SEQ %{_bindir}/atq %attr(4755,root,root) %{_bindir}/at %{_datadir}/at/ -%{_datadir}/at/batch-job %attr(0644,root,root) /%{_unitdir}/atd.service %changelog From 96f550ec593ca5e92c203beeb80cfe0b60ce8ea2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Poho=C5=99elsk=C3=BD?= Date: Thu, 18 Sep 2025 12:49:15 +0200 Subject: [PATCH 17/20] Add /var/spool/at and /var/spool/at/spool directories into %%files section --- at.spec | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/at.spec b/at.spec index 3b02e46..f74305b 100644 --- a/at.spec +++ b/at.spec @@ -3,7 +3,7 @@ Summary: Job spooling tools Name: at Version: 3.2.5 -Release: 18%{?dist} +Release: 19%{?dist} # http://packages.debian.org/changelogs/pool/main/a/at/current/copyright # + install-sh is MIT license with changes under Public Domain License: GPL-3.0-or-later AND GPL-2.0-or-later AND ISC @@ -161,6 +161,8 @@ make test %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/at.deny %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/sysconfig/atd %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/pam.d/atd +%attr(0700,root,root) %dir %{_localstatedir}/spool/at +%attr(0700,root,root) %dir %{_localstatedir}/spool/at/spool %{_tmpfilesdir}/at.conf %{_bindir}/atrun %attr(0755,root,root) %{_bindir}/atd @@ -173,6 +175,13 @@ make test %attr(0644,root,root) /%{_unitdir}/atd.service %changelog +* Thu Sep 18 2025 Ondřej Pohořelský - 3.2.5-19 +- Add /var/spool/at and /var/spool/at/spool directories into %%files section +- Resolves: rhbz#2396330 + +* Wed Aug 27 2025 Ondřej Pohořelský - 3.2.5-18 +- Use systemd-tmpfiles for /var/spool/at directories + * Wed Jul 23 2025 Fedora Release Engineering - 3.2.5-17 - Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild From ced9e7e3752bd28284339d46b36a106452a45bec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Poho=C5=99elsk=C3=BD?= Date: Wed, 24 Sep 2025 18:32:27 +0200 Subject: [PATCH 18/20] Remove broken and unused git submodule from tests --- tests/at | 1 - 1 file changed, 1 deletion(-) delete mode 160000 tests/at diff --git a/tests/at b/tests/at deleted file mode 160000 index 30cccc8..0000000 --- a/tests/at +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 30cccc88a2064eb05018a09d65164a26972cd5b5 From 99f9f320e1cd4b9d717a90f38b94afd7cfa8af34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Poho=C5=99elsk=C3=BD?= Date: Mon, 29 Sep 2025 10:26:16 +0200 Subject: [PATCH 19/20] Remove unnecessary Require --- at.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/at.spec b/at.spec index f74305b..4773caa 100644 --- a/at.spec +++ b/at.spec @@ -52,7 +52,6 @@ BuildRequires: make Requires(post): systemd-units Requires(preun): systemd-units Requires(postun): systemd-units -Requires: systemd-tmpfiles # at-sysvinit subpackage dropped Obsoletes: at-sysvinit < 3.1.16-1 From c6de37879a86d935a52ff6fb08bc601193409e5a Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 16 Jan 2026 04:04:41 +0000 Subject: [PATCH 20/20] Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild --- at.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/at.spec b/at.spec index 4773caa..60d9fd4 100644 --- a/at.spec +++ b/at.spec @@ -3,7 +3,7 @@ Summary: Job spooling tools Name: at Version: 3.2.5 -Release: 19%{?dist} +Release: 20%{?dist} # http://packages.debian.org/changelogs/pool/main/a/at/current/copyright # + install-sh is MIT license with changes under Public Domain License: GPL-3.0-or-later AND GPL-2.0-or-later AND ISC @@ -174,6 +174,9 @@ make test %attr(0644,root,root) /%{_unitdir}/atd.service %changelog +* Fri Jan 16 2026 Fedora Release Engineering - 3.2.5-20 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild + * Thu Sep 18 2025 Ondřej Pohořelský - 3.2.5-19 - Add /var/spool/at and /var/spool/at/spool directories into %%files section - Resolves: rhbz#2396330