Compare commits
11 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c6de37879a | ||
|
|
99f9f320e1 | ||
|
|
ced9e7e375 | ||
|
|
96f550ec59 | ||
|
|
774dcfc0e1 | ||
|
|
1fc88529b9 | ||
|
|
e11f7fc108 | ||
|
|
c697b4595c | ||
|
|
0da060e2af | ||
|
|
0da79b8efb | ||
|
|
5eee4f9624 |
9 changed files with 105 additions and 26 deletions
1
.fmf/version
Normal file
1
.fmf/version
Normal file
|
|
@ -0,0 +1 @@
|
|||
1
|
||||
33
at-3.2.5-past-date.patch
Normal file
33
at-3.2.5-past-date.patch
Normal file
|
|
@ -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?= <opohorel@redhat.com>
|
||||
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
|
||||
|
||||
6
at-tmpfiles.conf
Normal file
6
at-tmpfiles.conf
Normal file
|
|
@ -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 - -
|
||||
58
at.spec
58
at.spec
|
|
@ -3,7 +3,7 @@
|
|||
Summary: Job spooling tools
|
||||
Name: at
|
||||
Version: 3.2.5
|
||||
Release: 12%{?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
|
||||
|
|
@ -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
|
||||
|
||||
|
|
@ -31,12 +32,14 @@ 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
|
||||
BuildRequires: libselinux-devel >= 1.27.9
|
||||
BuildRequires: perl(Test::Harness)
|
||||
BuildRequires: perl(Test::More)
|
||||
BuildRequires: systemd-rpm-macros
|
||||
|
||||
%if %{with pam}
|
||||
BuildRequires: pam-devel
|
||||
|
|
@ -87,7 +90,7 @@ make install \
|
|||
DAEMON_USERNAME=`id -nu` \
|
||||
DAEMON_GROUPNAME=`id -ng` \
|
||||
DESTDIR=%{buildroot} \
|
||||
sbindir=%{_prefix}/sbin \
|
||||
sbindir=%{_bindir} \
|
||||
bindir=%{_bindir} \
|
||||
datadir=%{_datadir} \
|
||||
prefix=%{_prefix} \
|
||||
|
|
@ -114,18 +117,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
|
||||
|
||||
|
|
@ -150,21 +159,48 @@ 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
|
||||
%{_sbindir}/atrun
|
||||
%attr(0755,root,root) %{_sbindir}/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
|
||||
%{_mandir}/man*/*
|
||||
%{_bindir}/batch
|
||||
%{_bindir}/atrm
|
||||
%{_bindir}/atq
|
||||
%attr(4755,root,root) %{_bindir}/at
|
||||
%{_datadir}/at/batch-job
|
||||
%{_datadir}/at/
|
||||
%attr(0644,root,root) /%{_unitdir}/atd.service
|
||||
|
||||
%changelog
|
||||
* Fri Jan 16 2026 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.5-20
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild
|
||||
|
||||
* Thu Sep 18 2025 Ondřej Pohořelský <opohorel@redhat.com> - 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ý <opohorel@redhat.com> - 3.2.5-18
|
||||
- Use systemd-tmpfiles for /var/spool/at directories
|
||||
|
||||
* Wed Jul 23 2025 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.5-17
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
|
||||
|
||||
* Wed Jun 25 2025 Ondřej Pohořelský <opohorel@redhat.com> - 3.2.5-16
|
||||
- Fix past date handling with -t option
|
||||
|
||||
* Mon May 05 2025 Ondřej Pohořelský <opohorel@redhat.com> - 3.2.5-15
|
||||
- Claim ownership of /usr/share/at
|
||||
- Resolves: rhbz#2283298
|
||||
|
||||
* Mon Jan 27 2025 Ondřej Pohořelský <opohorel@redhat.com> - 3.2.5-14
|
||||
- Unify bin and sbin directories
|
||||
- Resolves: rhbz#2339910
|
||||
|
||||
* Thu Jan 16 2025 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.5-13
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
|
||||
|
||||
* Thu Aug 8 2024 Ales Nezbeda <anezbeda@redhat.com> - 3.2.5-12
|
||||
- Backport fixes from upstream PR
|
||||
- https://salsa.debian.org/debian/at/-/merge_requests/34
|
||||
|
|
|
|||
5
plans/ci.fmf
Normal file
5
plans/ci.fmf
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
summary: Basic smoke test
|
||||
discover:
|
||||
how: fmf
|
||||
execute:
|
||||
how: tmt
|
||||
1
tests/at
1
tests/at
|
|
@ -1 +0,0 @@
|
|||
Subproject commit 30cccc88a2064eb05018a09d65164a26972cd5b5
|
||||
12
tests/initscript/main.fmf
Normal file
12
tests/initscript/main.fmf
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
summary: Initscript sanity
|
||||
description: ''
|
||||
contact: Radek Biba <rbiba@redhat.com>
|
||||
component:
|
||||
- at
|
||||
test: ./runtest.sh
|
||||
framework: beakerlib
|
||||
recommend:
|
||||
- at
|
||||
duration: 5m
|
||||
extra-summary: /CoreOS/at/Sanity/initscript
|
||||
extra-task: /CoreOS/at/Sanity/initscript
|
||||
|
|
@ -27,7 +27,7 @@
|
|||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
# Include rhts environment
|
||||
. /usr/share/rhts-library/rhtslib.sh
|
||||
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||
|
||||
PACKAGE="at"
|
||||
SERVICE="atd"
|
||||
|
|
|
|||
|
|
@ -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
|
||||
Loading…
Add table
Add a link
Reference in a new issue