From 58fc74e3e7c6494f064f1b73e7d034881e6ccabc Mon Sep 17 00:00:00 2001 From: eabdullin Date: Wed, 14 May 2025 18:55:36 +0000 Subject: [PATCH] import UBI at-3.2.5-12.el10 --- .at.metadata | 1 - .gitignore | 2 +- SOURCES/at-3.1.14-usePOSIXtimers.patch | 111 --------- SOURCES/at-3.1.18-make.patch | 82 ------- SOURCES/at-3.1.18-utc-dst.patch | 24 -- SOURCES/at-3.1.20-document-n.patch | 22 -- ...ort.patch => at-3.1.14-fix_no_export.patch | 0 ....1.14-opt_V.patch => at-3.1.14-opt_V.patch | 0 ...obs.patch => at-3.1.16-clear-nonjobs.patch | 0 ...rror.patch => at-3.1.16-fclose-error.patch | 0 ...log-jobs.patch => at-3.1.20-log-jobs.patch | 0 at-3.1.23-document-n.patch | 22 ++ ...k-locks.patch => at-3.2.2-lock-locks.patch | 44 ++-- ...3.1.20-shell.patch => at-3.2.2-shell.patch | 23 +- ...-jobs.patch => at-3.2.5-aborted-jobs.patch | 12 +- ...-address-issues-from-static-analyzer.patch | 33 +++ ...e.patch => at-3.2.5-mailwithhostname.patch | 24 +- at-3.2.5-make.patch | 86 +++++++ ...-nitpicks.patch => at-3.2.5-nitpicks.patch | 50 ++-- ...18-noabort.patch => at-3.2.5-noabort.patch | 13 +- .../at-3.1.20-pam.patch => at-3.2.5-pam.patch | 103 ++++---- SOURCES/at-aarch64.patch => at-aarch64.patch | 0 SPECS/at.spec => at.spec | 226 +++++++++++------- SOURCES/atd.sysconf => atd.sysconf | 0 SOURCES/atd.systemd => atd.systemd | 4 +- SOURCES/pam_atd => pam_atd | 0 sources | 1 + 27 files changed, 423 insertions(+), 460 deletions(-) delete mode 100644 .at.metadata delete mode 100644 SOURCES/at-3.1.14-usePOSIXtimers.patch delete mode 100644 SOURCES/at-3.1.18-make.patch delete mode 100644 SOURCES/at-3.1.18-utc-dst.patch delete mode 100644 SOURCES/at-3.1.20-document-n.patch rename SOURCES/at-3.1.14-fix_no_export.patch => at-3.1.14-fix_no_export.patch (100%) rename SOURCES/at-3.1.14-opt_V.patch => at-3.1.14-opt_V.patch (100%) rename SOURCES/at-3.1.16-clear-nonjobs.patch => at-3.1.16-clear-nonjobs.patch (100%) rename SOURCES/at-3.1.16-fclose-error.patch => at-3.1.16-fclose-error.patch (100%) rename SOURCES/at-3.1.20-log-jobs.patch => at-3.1.20-log-jobs.patch (100%) create mode 100644 at-3.1.23-document-n.patch rename SOURCES/at-3.1.20-lock-locks.patch => at-3.2.2-lock-locks.patch (76%) rename SOURCES/at-3.1.20-shell.patch => at-3.2.2-shell.patch (70%) rename SOURCES/at-3.1.20-aborted-jobs.patch => at-3.2.5-aborted-jobs.patch (71%) create mode 100644 at-3.2.5-address-issues-from-static-analyzer.patch rename SOURCES/at-3.1.14-mailwithhostname.patch => at-3.2.5-mailwithhostname.patch (68%) create mode 100644 at-3.2.5-make.patch rename SOURCES/at-3.1.18-nitpicks.patch => at-3.2.5-nitpicks.patch (68%) rename SOURCES/at-3.1.18-noabort.patch => at-3.2.5-noabort.patch (69%) rename SOURCES/at-3.1.20-pam.patch => at-3.2.5-pam.patch (78%) rename SOURCES/at-aarch64.patch => at-aarch64.patch (100%) rename SPECS/at.spec => at.spec (81%) rename SOURCES/atd.sysconf => atd.sysconf (100%) rename SOURCES/atd.systemd => atd.systemd (69%) rename SOURCES/pam_atd => pam_atd (100%) create mode 100644 sources diff --git a/.at.metadata b/.at.metadata deleted file mode 100644 index ae9e65a..0000000 --- a/.at.metadata +++ /dev/null @@ -1 +0,0 @@ -a1734aa9da9188aecd8f96d59551f191ddac545a SOURCES/at_3.1.20.orig.tar.gz diff --git a/.gitignore b/.gitignore index 668e862..ff53f2b 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/at_3.1.20.orig.tar.gz +at_3.2.5.orig.tar.gz diff --git a/SOURCES/at-3.1.14-usePOSIXtimers.patch b/SOURCES/at-3.1.14-usePOSIXtimers.patch deleted file mode 100644 index 89c5614..0000000 --- a/SOURCES/at-3.1.14-usePOSIXtimers.patch +++ /dev/null @@ -1,111 +0,0 @@ -diff -up at-3.1.14/atd.c.timers at-3.1.14/atd.c ---- at-3.1.14/atd.c.timers 2013-12-02 11:03:01.250080057 +0100 -+++ at-3.1.14/atd.c 2013-12-02 11:06:15.560243498 +0100 -@@ -831,6 +831,54 @@ run_loop() - return next_job; - } - -+#ifdef HAVE_TIMER_CREATE -+timer_t timer; -+struct itimerspec timeout; -+ -+void timer_setup() -+{ -+ struct sigevent sev; -+ -+ sev.sigev_notify = SIGEV_SIGNAL; -+ sev.sigev_signo = SIGHUP; -+ sev.sigev_value.sival_ptr = &timer; -+ -+ memset(&timeout, 0, sizeof(timeout)); -+ -+ if (timer_create(CLOCK_REALTIME, &sev, &timer) < 0) -+ pabort("unable to create timer"); -+} -+ -+time_t atd_gettime() -+{ -+ struct timespec curtime; -+ -+ clock_gettime(CLOCK_REALTIME, &curtime); -+ -+ return curtime.tv_sec; -+} -+ -+void atd_setalarm(time_t next) -+{ -+ timeout.it_value.tv_sec = next; -+ timer_settime(timer, TIMER_ABSTIME, &timeout, NULL); -+ pause(); -+} -+#else -+void timer_setup() -+{ -+} -+ -+time_t atd_gettime() -+{ -+ return time(NULL); -+} -+ -+void atd_setalarm(time_t next) -+{ -+ sleep(next - atd_gettime()); -+} -+#endif - /* Global functions */ - - int -@@ -936,7 +984,7 @@ main(int argc, char *argv[]) - sigaction(SIGCHLD, &act, NULL); - - if (!run_as_daemon) { -- now = time(NULL); -+ now = atd_gettime(); - run_loop(); - exit(EXIT_SUCCESS); - } -@@ -959,13 +1007,14 @@ main(int argc, char *argv[]) - act.sa_handler = set_term; - sigaction(SIGINT, &act, NULL); - -+ timer_setup(); - daemon_setup(); - - do { -- now = time(NULL); -+ now = atd_gettime(); - next_invocation = run_loop(); - if (next_invocation > now) { -- sleep(next_invocation - now); -+ atd_setalarm(next_invocation); - } - } while (!term_signal); - daemon_cleanup(); -diff -up at-3.1.14/config.h.in.timers at-3.1.14/config.h.in ---- at-3.1.14/config.h.in.timers 2013-12-02 11:00:27.000000000 +0100 -+++ at-3.1.14/config.h.in 2013-12-02 11:02:06.521033976 +0100 -@@ -38,6 +38,9 @@ - /* Define to 1 if you have the `getloadavg' function. */ - #undef HAVE_GETLOADAVG - -+/* Define to 1 if you have the `timer_create' function. */ -+#undef HAVE_TIMER_CREATE -+ - /* Define to 1 if you have the header file. */ - #undef HAVE_GETOPT_H - -diff -up at-3.1.14/configure.ac.timers at-3.1.14/configure.ac ---- at-3.1.14/configure.ac.timers 2013-12-02 11:00:27.000000000 +0100 -+++ at-3.1.14/configure.ac 2013-12-02 11:02:45.217066560 +0100 -@@ -254,6 +254,10 @@ AC_CHECK_LIB(selinux, is_selinux_enabled - AC_SUBST(SELINUXLIB) - AC_SUBST(WITH_SELINUX) - -+dnl check for POSIX timer functions -+AC_SEARCH_LIBS([timer_create],[rt]) -+AC_CHECK_FUNCS([timer_create]) -+ - AC_MSG_CHECKING(groupname to run under) - AC_ARG_WITH(daemon_groupname, - [ --with-daemon_groupname=DAEMON_GROUPNAME Groupname to run under (default daemon) ], diff --git a/SOURCES/at-3.1.18-make.patch b/SOURCES/at-3.1.18-make.patch deleted file mode 100644 index 171b63c..0000000 --- a/SOURCES/at-3.1.18-make.patch +++ /dev/null @@ -1,82 +0,0 @@ -diff -up at-3.1.18/Makefile.in.make at-3.1.18/Makefile.in ---- at-3.1.18/Makefile.in.make 2015-12-06 16:45:10.000000000 +0100 -+++ at-3.1.18/Makefile.in 2016-03-23 12:38:15.652898579 +0100 -@@ -68,13 +68,13 @@ LIST = Filelist Filelist.asc - all: at atd atd.service atrun - - at: $(ATOBJECTS) -- $(CC) $(LDFLAGS) -o at $(ATOBJECTS) $(LIBS) $(LEXLIB) -+ $(CC) $(LDFLAGS) -pie -o at $(ATOBJECTS) $(LIBS) $(LEXLIB) - rm -f $(CLONES) - $(LN_S) -f at atq - $(LN_S) -f at atrm - - atd: $(RUNOBJECTS) -- $(CC) $(LDFLAGS) -o atd $(RUNOBJECTS) $(LIBS) $(PAMLIB) $(SELINUXLIB) -+ $(CC) $(LDFLAGS) -pie -o atd $(RUNOBJECTS) $(LIBS) $(PAMLIB) $(SELINUXLIB) - - y.tab.c y.tab.h: parsetime.y - $(YACC) -d parsetime.y -@@ -89,38 +89,41 @@ atrun: atrun.in - configure - - .c.o: -- $(CC) -c $(CFLAGS) $(DEFS) $*.c -+ $(CC) -c $(CFLAGS) -fPIE $(DEFS) $*.c - - install: all -- $(INSTALL) -g root -o root -m 755 -d $(IROOT)$(etcdir) -- $(INSTALL) -g root -o root -m 755 -d $(IROOT)$(bindir) -- $(INSTALL) -g root -o root -m 755 -d $(IROOT)$(sbindir) -- $(INSTALL) -g root -o root -m 755 -d $(IROOT)$(docdir) -- $(INSTALL) -g root -o root -m 755 -d $(IROOT)$(atdocdir) -- $(INSTALL) -g $(DAEMON_GROUPNAME) -o $(DAEMON_USERNAME) -m 755 -d $(IROOT)$(ATSPOOL_DIR) $(IROOT)$(ATJOB_DIR) -- chmod 1770 $(IROOT)$(ATSPOOL_DIR) $(IROOT)$(ATJOB_DIR) -+ $(INSTALL) -m 755 -d $(IROOT)$(etcdir) -+ $(INSTALL) -m 755 -d $(IROOT)$(bindir) -+ $(INSTALL) -m 755 -d $(IROOT)$(sbindir) -+ $(INSTALL) -m 755 -d $(IROOT)$(docdir) -+ $(INSTALL) -m 755 -d $(IROOT)$(atdocdir) -+ $(INSTALL) -m 755 -d $(IROOT)$(etcdir)/pam.d/ -+ $(INSTALL) -g $(DAEMON_GROUPNAME) -o $(DAEMON_USERNAME) -m 755 -d $(IROOT)$(ATSPOOL_DIR) -+ chmod 700 $(IROOT)$(ATJOB_DIR) $(IROOT)$(ATSPOOL_DIR) -+ chown $(DAEMON_USERNAME):$(DAEMON_GROUPNAME) $(IROOT)$(ATJOB_DIR) $(IROOT)$(ATSPOOL_DIR) - touch $(IROOT)$(LFILE) - chmod 600 $(IROOT)$(LFILE) - chown $(DAEMON_USERNAME):$(DAEMON_GROUPNAME) $(IROOT)$(LFILE) -- test -f $(IROOT)$(etcdir)/at.allow || test -f $(IROOT)$(etcdir)/at.deny || $(INSTALL) -o root -g $(DAEMON_GROUPNAME) -m 640 at.deny $(IROOT)$(etcdir)/ -- $(INSTALL) -g $(DAEMON_GROUPNAME) -o $(DAEMON_USERNAME) -m 6755 at $(IROOT)$(bindir) -+ test -f $(IROOT)$(etcdir)/at.allow || test -f $(IROOT)$(etcdir)/at.deny || $(INSTALL) -m 600 at.deny $(IROOT)$(etcdir)/ -+ $(INSTALL) -o $(INSTALL_ROOT_USER) -g $(DAEMON_GROUPNAME) pam_atd $(IROOT)$(etcdir)/pam.d/atd -+ $(INSTALL) -m 4755 at $(IROOT)$(bindir) - $(LN_S) -f at $(IROOT)$(bindir)/atq - $(LN_S) -f at $(IROOT)$(bindir)/atrm -- $(INSTALL) -g root -o root -m 755 batch $(IROOT)$(bindir) -- $(INSTALL) -d -o root -g root -m 755 $(IROOT)$(man1dir) -- $(INSTALL) -d -o root -g root -m 755 $(IROOT)$(man5dir) -- $(INSTALL) -d -o root -g root -m 755 $(IROOT)$(man8dir) -- $(INSTALL) -g root -o root -m 755 atd $(IROOT)$(sbindir) -- $(INSTALL) -g root -o root -m 755 atrun $(IROOT)$(sbindir) -- $(INSTALL) -g root -o root -m 644 at.1 $(IROOT)$(man1dir)/ -+ $(INSTALL) -m 755 batch $(IROOT)$(bindir) -+ $(INSTALL) -d -m 755 $(IROOT)$(man1dir) -+ $(INSTALL) -d -m 755 $(IROOT)$(man5dir) -+ $(INSTALL) -d -m 755 $(IROOT)$(man8dir) -+ $(INSTALL) -m 755 atd $(IROOT)$(sbindir) -+ $(INSTALL) -m 755 atrun $(IROOT)$(sbindir) -+ $(INSTALL) -m 644 at.1 $(IROOT)$(man1dir)/ - cd $(IROOT)$(man1dir) && $(LN_S) -f at.1 atq.1 && $(LN_S) -f at.1 batch.1 && $(LN_S) -f at.1 atrm.1 -- $(INSTALL) -g root -o root -m 644 atd.8 $(IROOT)$(man8dir)/ -+ $(INSTALL) -m 644 atd.8 $(IROOT)$(man8dir)/ - sed "s,\$${exec_prefix},$(exec_prefix),g" tmpman -- $(INSTALL) -g root -o root -m 644 tmpman $(IROOT)$(man8dir)/atrun.8 -+ $(INSTALL) -m 644 tmpman $(IROOT)$(man8dir)/atrun.8 - rm -f tmpman -- $(INSTALL) -g root -o root -m 644 at.allow.5 $(IROOT)$(man5dir)/ -+ $(INSTALL) -m 644 at.allow.5 $(IROOT)$(man5dir)/ - cd $(IROOT)$(man5dir) && $(LN_S) -f at.allow.5 at.deny.5 -- $(INSTALL) -g root -o root -m 644 $(DOCS) $(IROOT)$(atdocdir) -+ $(INSTALL) -m 644 $(DOCS) $(IROOT)$(atdocdir) - rm -f $(IROOT)$(mandir)/cat1/at.1* $(IROOT)$(mandir)/cat1/batch.1* \ - $(IROOT)$(mandir)/cat1/atq.1* - rm -f $(IROOT)$(mandir)/cat1/atd.8* diff --git a/SOURCES/at-3.1.18-utc-dst.patch b/SOURCES/at-3.1.18-utc-dst.patch deleted file mode 100644 index 3a2a40b..0000000 --- a/SOURCES/at-3.1.18-utc-dst.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -up at-3.1.18/parsetime.y.dst at-3.1.18/parsetime.y ---- at-3.1.18/parsetime.y.dst 2015-12-06 16:45:10.000000000 +0100 -+++ at-3.1.18/parsetime.y 2015-07-01 13:53:14.088881926 +0200 -@@ -476,8 +476,8 @@ parsetime(time_t currtime, int argc, cha - exectm = *localtime(&currtime); - currtime -= exectm.tm_sec; - exectm.tm_sec = 0; -- exectm.tm_isdst = -1; - memcpy(&currtm,&exectm,sizeof(currtm)); -+ exectm.tm_isdst = -1; - time_only = 0; - yearspec = 0; - -@@ -503,8 +503,8 @@ parsetime(time_t currtime, int argc, cha - return 0; - if (isgmt) { - exectime -= timezone; -- if (currtm.tm_isdst && !exectm.tm_isdst) -- exectime -= 3600; -+ if (exectm.tm_isdst) -+ exectime += 3600; - } - if (exectime < currtime) - panic("refusing to create job destined in the past"); diff --git a/SOURCES/at-3.1.20-document-n.patch b/SOURCES/at-3.1.20-document-n.patch deleted file mode 100644 index c4d929a..0000000 --- a/SOURCES/at-3.1.20-document-n.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff -up at-3.1.20/atd.8.in.document-n at-3.1.20/atd.8.in ---- at-3.1.20/atd.8.in.document-n 2015-08-22 00:09:22.000000000 +0200 -+++ at-3.1.20/atd.8.in 2017-09-14 14:17:04.922086349 +0200 -@@ -9,6 +9,7 @@ atd \- run jobs queued for later executi - .IR batch_interval ] - .RB [ -d ] - .RB [ -f ] -+.RB [ -n ] - .RB [ -s ] - .SH DESCRIPTION - .B atd -@@ -40,6 +41,10 @@ Run - .BR atd - in the foreground. - .TP 8 -+.B -n -+Append the hostname of the system to the subject of the e-mails sent by -+.BR atd . -+.TP 8 - .B -s - Process the at/batch queue only once. - This is primarily of use for compatibility with old versions of diff --git a/SOURCES/at-3.1.14-fix_no_export.patch b/at-3.1.14-fix_no_export.patch similarity index 100% rename from SOURCES/at-3.1.14-fix_no_export.patch rename to at-3.1.14-fix_no_export.patch diff --git a/SOURCES/at-3.1.14-opt_V.patch b/at-3.1.14-opt_V.patch similarity index 100% rename from SOURCES/at-3.1.14-opt_V.patch rename to at-3.1.14-opt_V.patch diff --git a/SOURCES/at-3.1.16-clear-nonjobs.patch b/at-3.1.16-clear-nonjobs.patch similarity index 100% rename from SOURCES/at-3.1.16-clear-nonjobs.patch rename to at-3.1.16-clear-nonjobs.patch diff --git a/SOURCES/at-3.1.16-fclose-error.patch b/at-3.1.16-fclose-error.patch similarity index 100% rename from SOURCES/at-3.1.16-fclose-error.patch rename to at-3.1.16-fclose-error.patch diff --git a/SOURCES/at-3.1.20-log-jobs.patch b/at-3.1.20-log-jobs.patch similarity index 100% rename from SOURCES/at-3.1.20-log-jobs.patch rename to at-3.1.20-log-jobs.patch diff --git a/at-3.1.23-document-n.patch b/at-3.1.23-document-n.patch new file mode 100644 index 0000000..7028300 --- /dev/null +++ b/at-3.1.23-document-n.patch @@ -0,0 +1,22 @@ +diff -up at-3.1.23/atd.8.in.document-n at-3.1.23/atd.8.in +--- at-3.1.23/atd.8.in.document-n 2018-08-27 14:49:09.824182482 +0200 ++++ at-3.1.23/atd.8.in 2018-08-27 14:50:34.625518639 +0200 +@@ -9,6 +9,7 @@ atd \- run jobs queued for later executi + .IR batch_interval ] + .RB [ \-d ] + .RB [ \-f ] ++.RB [ \-n ] + .RB [ \-s ] + .SH DESCRIPTION + .B atd +@@ -44,6 +45,10 @@ in the foreground. + Process the at/batch queue only once. + This is primarily of use for compatibility with old versions of + .BR at ; ++.B \-n ++Append the hostname of the system to the subject of the e-mails sent by ++.BR atd . ++.TP 8 + .B "atd \-s" + is equivalent to the old + .B atrun diff --git a/SOURCES/at-3.1.20-lock-locks.patch b/at-3.2.2-lock-locks.patch similarity index 76% rename from SOURCES/at-3.1.20-lock-locks.patch rename to at-3.2.2-lock-locks.patch index 17d6ad4..6d97c82 100644 --- a/SOURCES/at-3.1.20-lock-locks.patch +++ b/at-3.2.2-lock-locks.patch @@ -1,6 +1,6 @@ -diff -up at-3.1.20/atd.c.lock-locks at-3.1.20/atd.c ---- at-3.1.20/atd.c.lock-locks 2016-07-01 10:41:50.640867692 +0200 -+++ at-3.1.20/atd.c 2016-07-01 10:42:32.345844967 +0200 +diff -ur b/atd.c a/atd.c +--- b/atd.c 2021-04-25 03:31:30.000000000 +0200 ++++ a/atd.c 2021-05-21 13:00:45.135020670 +0200 @@ -74,6 +74,9 @@ #include #endif @@ -11,7 +11,7 @@ diff -up at-3.1.20/atd.c.lock-locks at-3.1.20/atd.c /* Local headers */ #include "privs.h" -@@ -288,7 +291,7 @@ run_file(const char *filename, uid_t uid +@@ -275,7 +278,7 @@ * mail to the user. */ pid_t pid; @@ -20,7 +20,7 @@ diff -up at-3.1.20/atd.c.lock-locks at-3.1.20/atd.c char jobbuf[9]; char *mailname = NULL; int mailsize = 128; -@@ -410,6 +413,10 @@ run_file(const char *filename, uid_t uid +@@ -390,6 +393,10 @@ fcntl(fd_in, F_SETFD, fflags & ~FD_CLOEXEC); @@ -31,7 +31,7 @@ diff -up at-3.1.20/atd.c.lock-locks at-3.1.20/atd.c /* * If the spool directory is mounted via NFS `atd' isn't able to * read from the job file and will bump out here. The file is -@@ -553,10 +560,7 @@ run_file(const char *filename, uid_t uid +@@ -520,10 +527,7 @@ PRIV_END } /* We're the parent. Let's wait. @@ -43,7 +43,7 @@ diff -up at-3.1.20/atd.c.lock-locks at-3.1.20/atd.c non-blocking waitpid. So this blocking one will eventually return with an ECHILD error. */ -@@ -573,14 +577,14 @@ run_file(const char *filename, uid_t uid +@@ -548,14 +552,14 @@ /* some sendmail implementations are confused if stdout, stderr are * not available, so let them point to /dev/null */ @@ -63,7 +63,7 @@ diff -up at-3.1.20/atd.c.lock-locks at-3.1.20/atd.c if (unlink(filename) == -1) syslog(LOG_WARNING, "Warning: removing output file for job %li failed: %s", -@@ -588,7 +592,12 @@ run_file(const char *filename, uid_t uid +@@ -563,7 +567,12 @@ /* The job is now finished. We can delete its input file. */ @@ -77,31 +77,31 @@ diff -up at-3.1.20/atd.c.lock-locks at-3.1.20/atd.c unlink(newname); free(newname); -@@ -723,16 +732,18 @@ run_loop() +@@ -673,16 +682,18 @@ /* Skip lock files */ if (queue == '=') { - /* FIXME: calhariz */ -- /* I think the following code is broken, but commenting -- may haven unknow side effects. Make a release and see +- /* I think the following code is broken, but commenting it +- may cause unknow side effects. Make a release and see - in the wild how it works. For more information see: -- https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=818508/* +- https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=818508 */ - - /* if ((buf.st_nlink == 1) && (run_time + CHECK_INTERVAL <= now)) { */ - /* /\* Remove stale lockfile FIXME: lock the lockfile, if you fail, it's still in use. *\/ */ - /* unlink(dirent->d_name); */ - /* } */ -+ if ((buf.st_nlink == 1) && (run_time + CHECK_INTERVAL <= now)) { -+ int fd; ++ if ((buf.st_nlink == 1) && (run_time + CHECK_INTERVAL <= now)) { ++ int fd; + -+ fd = open(dirent->d_name, O_RDONLY); -+ if (fd != -1) { -+ if (flock(fd, LOCK_EX | LOCK_NB) == 0) { -+ unlink(dirent->d_name); -+ syslog(LOG_NOTICE, "removing stale lock file %s\n", dirent->d_name); -+ } -+ (void)close(fd); -+ } ++ fd = open(dirent->d_name, O_RDONLY); ++ if (fd != -1) { ++ if (flock(fd, LOCK_EX | LOCK_NB) == 0) { ++ unlink(dirent->d_name); ++ syslog(LOG_NOTICE, "removing stale lock file %s\n", dirent->d_name); ++ } ++ (void)close(fd); ++ } + } continue; } diff --git a/SOURCES/at-3.1.20-shell.patch b/at-3.2.2-shell.patch similarity index 70% rename from SOURCES/at-3.1.20-shell.patch rename to at-3.2.2-shell.patch index 27f7d48..9e383b8 100644 --- a/SOURCES/at-3.1.20-shell.patch +++ b/at-3.2.2-shell.patch @@ -1,19 +1,19 @@ -diff -up at-3.1.20/at.c.shell at-3.1.20/at.c ---- at-3.1.20/at.c.shell 2016-07-01 09:47:13.392684445 +0200 -+++ at-3.1.20/at.c 2016-07-01 09:48:47.679931959 +0200 +diff -ur b/at.c a/at.c +--- b/at.c 2021-04-25 03:31:30.000000000 +0200 ++++ a/at.c 2021-05-21 12:51:48.123335137 +0200 @@ -62,11 +62,8 @@ #include #include - + -#ifdef TM_IN_SYS_TIME #include -#else #include -#endif - + #ifdef HAVE_UNISTD_H #include -@@ -239,6 +236,12 @@ writefile(time_t runtimer, char queue) +@@ -245,6 +242,12 @@ int kill_errno; int rc; int mailsize = 128; @@ -23,20 +23,20 @@ diff -up at-3.1.20/at.c.shell at-3.1.20/at.c + + gettimeofday(&tv, &tz); + srandom(getpid()+tv.tv_usec); - + /* Install the signal handler for SIGINT; terminate after removing the * spool file if necessary -@@ -465,6 +468,9 @@ writefile(time_t runtimer, char queue) +@@ -492,6 +495,9 @@ fprintf(fp, " || {\n\t echo 'Execution directory " "inaccessible' >&2\n\t exit 1\n}\n"); - + + i = random(); + fprintf(fp, "${SHELL:-/bin/sh} << \'marcinDELIMITER%08lx\'\n", i); + istty = isatty(fileno(stdin)); if (istty) { - fprintf(stderr, "at> "); -@@ -480,7 +486,7 @@ writefile(time_t runtimer, char queue) + runtime = localtime(&runtimer); +@@ -512,7 +518,7 @@ if (istty) { fprintf(stderr, "\n"); } @@ -45,3 +45,4 @@ diff -up at-3.1.20/at.c.shell at-3.1.20/at.c if (ferror(fp)) panic("Output error"); fflush(fp); +Only in a: .vscode diff --git a/SOURCES/at-3.1.20-aborted-jobs.patch b/at-3.2.5-aborted-jobs.patch similarity index 71% rename from SOURCES/at-3.1.20-aborted-jobs.patch rename to at-3.2.5-aborted-jobs.patch index 78a196f..568ef4b 100644 --- a/SOURCES/at-3.1.20-aborted-jobs.patch +++ b/at-3.2.5-aborted-jobs.patch @@ -1,14 +1,14 @@ -diff -up at-3.1.20/atd.c.aborted at-3.1.20/atd.c ---- at-3.1.20/atd.c.aborted 2017-09-14 15:31:47.971486148 +0200 -+++ at-3.1.20/atd.c 2017-09-14 15:43:53.506567281 +0200 -@@ -731,12 +731,17 @@ run_loop() +diff -ur b/atd.c a/atd.c +--- b/atd.c 2022-02-22 15:55:28.745663105 +0100 ++++ a/atd.c 2022-02-22 16:07:26.416578085 +0100 +@@ -722,12 +722,18 @@ /* Is the file already locked? */ if (buf.st_nlink > 1) { + if (run_time < buf.st_mtime) + run_time = buf.st_mtime; if (run_time + CHECK_INTERVAL <= now) { -- + /* Something went wrong the last time this was executed. * Let's remove the lockfile and reschedule. + * We also change the timestamp to avoid rerunning the job more @@ -17,6 +17,6 @@ diff -up at-3.1.20/atd.c.aborted at-3.1.20/atd.c strncpy(lock_name, dirent->d_name, sizeof(lock_name)); + if (utime(lock_name, 0) < 0) + syslog(LOG_ERR, "utime couldn't be set for lock file %s\n", lock_name); - lock_name[sizeof(lock_name)-1] = '\0'; + lock_name[sizeof(lock_name)-1] = '\0'; lock_name[0] = '='; unlink(lock_name); diff --git a/at-3.2.5-address-issues-from-static-analyzer.patch b/at-3.2.5-address-issues-from-static-analyzer.patch new file mode 100644 index 0000000..badd5db --- /dev/null +++ b/at-3.2.5-address-issues-from-static-analyzer.patch @@ -0,0 +1,33 @@ +diff -ur a/atd.c b/atd.c +--- a/atd.c 2024-11-06 12:48:35.368394905 +0100 ++++ b/atd.c 2024-11-06 12:50:09.301052284 +0100 +@@ -295,7 +295,7 @@ + int fd_out, fd_in, fd_std; + char jobbuf[9]; + char *mailname = NULL; +- int mailsize = 128; ++ size_t mailsize = 128; + char *newname; + FILE *stream; + int send_mail = 0; +@@ -308,7 +308,7 @@ + char queue; + char fmt[64]; + unsigned long jobno; +- int rc; ++ long rc; + char hostbuf[MAXHOSTNAMELEN]; + #ifdef WITH_PAM + int retcode; +diff -ur a/posixtm.c b/posixtm.c +--- a/posixtm.c 2022-02-05 11:00:57.000000000 +0100 ++++ b/posixtm.c 2024-11-06 12:50:28.143186147 +0100 +@@ -188,7 +188,7 @@ + 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; diff --git a/SOURCES/at-3.1.14-mailwithhostname.patch b/at-3.2.5-mailwithhostname.patch similarity index 68% rename from SOURCES/at-3.1.14-mailwithhostname.patch rename to at-3.2.5-mailwithhostname.patch index a2b3f79..cebfb76 100644 --- a/SOURCES/at-3.1.14-mailwithhostname.patch +++ b/at-3.2.5-mailwithhostname.patch @@ -1,7 +1,7 @@ -diff -up at-3.1.14/atd.c.mail at-3.1.14/atd.c ---- at-3.1.14/atd.c.mail 2013-12-04 11:39:44.556239282 +0100 -+++ at-3.1.14/atd.c 2013-12-04 11:40:50.544234246 +0100 -@@ -100,6 +100,10 @@ int selinux_enabled=0; +diff -ur b/atd.c a/atd.c +--- b/atd.c 2022-02-22 15:21:06.649147600 +0100 ++++ a/atd.c 2022-02-22 15:49:13.640184845 +0100 +@@ -98,6 +98,10 @@ #define BATCH_INTERVAL_DEFAULT 60 #define CHECK_INTERVAL 3600 @@ -12,15 +12,15 @@ diff -up at-3.1.14/atd.c.mail at-3.1.14/atd.c /* Global variables */ uid_t real_uid, effective_uid; -@@ -117,6 +121,7 @@ static time_t last_chg; - static int nothing_to_do; +@@ -115,6 +119,7 @@ + static int nothing_to_do = 0; unsigned int batch_interval; static int run_as_daemon = 0; +static int mail_with_hostname = 0; + static int hupped = 0; static volatile sig_atomic_t term_signal = 0; - -@@ -298,6 +303,7 @@ run_file(const char *filename, uid_t uid +@@ -301,6 +306,7 @@ char fmt[64]; unsigned long jobno; int rc; @@ -28,19 +28,19 @@ diff -up at-3.1.14/atd.c.mail at-3.1.14/atd.c #ifdef WITH_PAM int retcode; #endif -@@ -452,6 +458,11 @@ run_file(const char *filename, uid_t uid +@@ -455,6 +461,11 @@ write_string(fd_out, "Subject: Output from your job "); write_string(fd_out, jobbuf); + if (mail_with_hostname > 0) { -+ gethostname(hostbuf, MAXHOSTNAMELEN-1); ++ gethostname(hostbuf, MAXHOSTNAMELEN-1); + write_string(fd_out, " "); + write_string(fd_out, hostbuf); + } write_string(fd_out, "\nTo: "); write_string(fd_out, mailname); write_string(fd_out, "\n\n"); -@@ -843,7 +854,7 @@ main(int argc, char *argv[]) +@@ -905,7 +916,7 @@ run_as_daemon = 1; batch_interval = BATCH_INTERVAL_DEFAULT; @@ -49,7 +49,7 @@ diff -up at-3.1.14/atd.c.mail at-3.1.14/atd.c switch (c) { case 'l': if (sscanf(optarg, "%lf", &load_avg) != 1) -@@ -865,6 +876,10 @@ main(int argc, char *argv[]) +@@ -927,6 +938,10 @@ daemon_foreground++; break; diff --git a/at-3.2.5-make.patch b/at-3.2.5-make.patch new file mode 100644 index 0000000..e8ebcc2 --- /dev/null +++ b/at-3.2.5-make.patch @@ -0,0 +1,86 @@ +diff -ur b/Makefile.in a/Makefile.in +--- b/Makefile.in 2022-02-05 11:00:57.000000000 +0100 ++++ a/Makefile.in 2022-03-08 16:05:28.088069816 +0100 +@@ -76,13 +76,13 @@ + all: at atd atd.service atrun + + at: $(ATOBJECTS) +- $(CC) $(LDFLAGS) -o at $(ATOBJECTS) $(LIBS) $(LEXLIB) ++ $(CC) $(LDFLAGS) -pie -o at $(ATOBJECTS) $(LIBS) $(LEXLIB) + rm -f $(CLONES) + $(LN_S) -f at atq + $(LN_S) -f at atrm + + atd: $(RUNOBJECTS) +- $(CC) $(LDFLAGS) -o atd $(RUNOBJECTS) $(LIBS) $(PAMLIB) $(SELINUXLIB) ++ $(CC) $(LDFLAGS) -pie -o atd $(RUNOBJECTS) $(LIBS) $(PAMLIB) $(SELINUXLIB) + + y.tab.c y.tab.h: parsetime.y + $(YACC) -d parsetime.y +@@ -99,40 +99,43 @@ + configure + + .c.o: +- $(CC) -c $(CFLAGS) $(DEFS) $*.c ++ $(CC) -c $(CFLAGS) -fPIE $(DEFS) $*.c + + install: all +- $(INSTALL) -g root -o root -m 755 -d $(DESTDIR)$(etcdir) +- $(INSTALL) -g root -o root -m 755 -d $(DESTDIR)$(bindir) +- $(INSTALL) -g root -o root -m 755 -d $(DESTDIR)$(sbindir) +- $(INSTALL) -g root -o root -m 755 -d $(DESTDIR)$(atdatadir) +- $(INSTALL) -g root -o root -m 755 -d $(DESTDIR)$(docdir) +- $(INSTALL) -g root -o root -m 755 -d $(DESTDIR)$(atdocdir) +- $(INSTALL) -g $(DAEMON_GROUPNAME) -o $(DAEMON_USERNAME) -m 755 -d $(DESTDIR)$(ATSPOOL_DIR) $(DESTDIR)$(ATJOB_DIR) +- chmod 1770 $(DESTDIR)$(ATSPOOL_DIR) $(DESTDIR)$(ATJOB_DIR) ++ $(INSTALL) -m 755 -d $(DESTDIR)$(etcdir) ++ $(INSTALL) -m 755 -d $(DESTDIR)$(bindir) ++ $(INSTALL) -m 755 -d $(DESTDIR)$(sbindir) ++ $(INSTALL) -m 755 -d $(DESTDIR)$(atdatadir) ++ $(INSTALL) -m 755 -d $(DESTDIR)$(docdir) ++ $(INSTALL) -m 755 -d $(DESTDIR)$(atdocdir) ++ $(INSTALL) -m 755 -d $(DESTDIR)$(etcdir)/pam.d/ ++ $(INSTALL) -g $(DAEMON_GROUPNAME) -o $(DAEMON_USERNAME) -m 755 -d $(DESTDIR)$(ATSPOOL_DIR) ++ chmod 700 $(DESTDIR)$(ATJOB_DIR) $(DESTDIR)$(ATSPOOL_DIR) ++ chown $(DAEMON_USERNAME):$(DAEMON_GROUPNAME) $(DESTDIR)$(ATJOB_DIR) $(DESTDIR)$(ATSPOOL_DIR) + touch $(DESTDIR)$(LFILE) + chmod 600 $(DESTDIR)$(LFILE) + chown $(DAEMON_USERNAME):$(DAEMON_GROUPNAME) $(DESTDIR)$(LFILE) +- test -f $(DESTDIR)$(etcdir)/at.allow || test -f $(DESTDIR)$(etcdir)/at.deny || $(INSTALL) -o root -g $(DAEMON_GROUPNAME) -m 640 at.deny $(DESTDIR)$(etcdir)/ +- $(INSTALL) -g $(DAEMON_GROUPNAME) -o $(DAEMON_USERNAME) -m 6755 at $(DESTDIR)$(bindir) ++ test -f $(DESTDIR)$(etcdir)/at.allow || test -f $(DESTDIR)$(etcdir)/at.deny || $(INSTALL) -m 600 at.deny $(DESTDIR)$(etcdir)/ ++ $(INSTALL) -o $(INSTALL_ROOT_USER) -g $(DAEMON_GROUPNAME) pam_atd $(DESTDIR)$(etcdir)/pam.d/atd ++ $(INSTALL) -m 4755 at $(DESTDIR)$(bindir) + $(LN_S) -f at $(DESTDIR)$(bindir)/atq + $(LN_S) -f at $(DESTDIR)$(bindir)/atrm +- $(INSTALL) -g root -o root -m 755 batch $(DESTDIR)$(bindir) +- $(INSTALL) -g root -o root -m 755 batch-job $(DESTDIR)$(atdatadir) +- $(INSTALL) -d -o root -g root -m 755 $(DESTDIR)$(man1dir) +- $(INSTALL) -d -o root -g root -m 755 $(DESTDIR)$(man5dir) +- $(INSTALL) -d -o root -g root -m 755 $(DESTDIR)$(man8dir) +- $(INSTALL) -g root -o root -m 755 atd $(DESTDIR)$(sbindir) +- $(INSTALL) -g root -o root -m 755 atrun $(DESTDIR)$(sbindir) +- $(INSTALL) -g root -o root -m 644 at.1 $(DESTDIR)$(man1dir)/ ++ $(INSTALL) -m 755 batch $(DESTDIR)$(bindir) ++ $(INSTALL) -m 755 batch-job $(DESTDIR)$(atdatadir) ++ $(INSTALL) -d -m 755 $(DESTDIR)$(man1dir) ++ $(INSTALL) -d -m 755 $(DESTDIR)$(man5dir) ++ $(INSTALL) -d -m 755 $(DESTDIR)$(man8dir) ++ $(INSTALL) -m 755 atd $(DESTDIR)$(sbindir) ++ $(INSTALL) -m 755 atrun $(DESTDIR)$(sbindir) ++ $(INSTALL) -m 644 at.1 $(DESTDIR)$(man1dir)/ + cd $(DESTDIR)$(man1dir) && $(LN_S) -f at.1 atq.1 && $(LN_S) -f at.1 batch.1 && $(LN_S) -f at.1 atrm.1 +- $(INSTALL) -g root -o root -m 644 atd.8 $(DESTDIR)$(man8dir)/ ++ $(INSTALL) -m 644 atd.8 $(DESTDIR)$(man8dir)/ + sed "s,\$${exec_prefix},$(exec_prefix),g" tmpman +- $(INSTALL) -g root -o root -m 644 tmpman $(DESTDIR)$(man8dir)/atrun.8 ++ $(INSTALL) -m 644 tmpman $(DESTDIR)$(man8dir)/atrun.8 + rm -f tmpman +- $(INSTALL) -g root -o root -m 644 at.allow.5 $(DESTDIR)$(man5dir)/ ++ $(INSTALL) -m 644 at.allow.5 $(DESTDIR)$(man5dir)/ + cd $(DESTDIR)$(man5dir) && $(LN_S) -f at.allow.5 at.deny.5 +- $(INSTALL) -g root -o root -m 644 $(DOCS) $(DESTDIR)$(atdocdir) ++ $(INSTALL) -m 644 $(DOCS) $(DESTDIR)$(atdocdir) + rm -f $(DESTDIR)$(mandir)/cat1/at.1* $(DESTDIR)$(mandir)/cat1/batch.1* \ + $(DESTDIR)$(mandir)/cat1/atq.1* + rm -f $(DESTDIR)$(mandir)/cat1/atd.8* diff --git a/SOURCES/at-3.1.18-nitpicks.patch b/at-3.2.5-nitpicks.patch similarity index 68% rename from SOURCES/at-3.1.18-nitpicks.patch rename to at-3.2.5-nitpicks.patch index 2bcaebb..3765552 100644 --- a/SOURCES/at-3.1.18-nitpicks.patch +++ b/at-3.2.5-nitpicks.patch @@ -1,7 +1,19 @@ -diff -up at-3.1.18/atd.c.nit at-3.1.18/atd.c ---- at-3.1.18/atd.c.nit 2016-03-23 12:46:49.222277787 +0100 -+++ at-3.1.18/atd.c 2016-03-23 12:47:50.521639804 +0100 -@@ -196,6 +196,18 @@ myfork() +diff -ur b/at.1.in a/at.1.in +--- b/at.1.in 2022-01-29 17:42:19.000000000 +0100 ++++ a/at.1.in 2022-02-22 15:19:47.598996428 +0100 +@@ -226,7 +226,7 @@ + .BR batch . + Queues with higher letters run with increased niceness. The special + queue "=" is reserved for jobs which are currently running. +-.P ++ + If a job is submitted to a queue designated with an uppercase letter, the + job is treated as if it were submitted to batch at the time of the job. + Once the time is reached, the batch processing rules with respect to load +diff -ur b/atd.c a/atd.c +--- b/atd.c 2022-02-22 15:14:02.736336912 +0100 ++++ a/atd.c 2022-02-22 15:19:02.163909540 +0100 +@@ -197,6 +197,18 @@ #define fork myfork #endif @@ -20,7 +32,7 @@ diff -up at-3.1.18/atd.c.nit at-3.1.18/atd.c #ifdef WITH_SELINUX static int -@@ -339,6 +351,9 @@ run_file(const char *filename, uid_t uid +@@ -340,6 +352,9 @@ free(newname); return; } @@ -30,51 +42,39 @@ diff -up at-3.1.18/atd.c.nit at-3.1.18/atd.c /* Let's see who we mail to. Hopefully, we can read it from * the command file; if not, send it to the owner, or, failing that, * to root. -@@ -507,6 +522,9 @@ run_file(const char *filename, uid_t uid +@@ -508,6 +523,9 @@ if (setuid(uid) < 0) perr("Cannot set user id"); -+ if (SIG_ERR == signal(SIGCHLD, SIG_DFL)) ++ if (SIG_ERR == signal(SIGCHLD, SIG_DFL)) + perr("Cannot reset signal handler to default"); + chdir("/"); execle("/bin/sh", "sh", (char *) NULL, nenvp); -@@ -572,6 +590,9 @@ run_file(const char *filename, uid_t uid +@@ -573,6 +591,9 @@ if (setuid(uid) < 0) perr("Cannot set user id"); -+ if (SIG_ERR == signal(SIGCHLD, SIG_DFL)) ++ if (SIG_ERR == signal(SIGCHLD, SIG_DFL)) + perr("Cannot reset signal handler to default"); + chdir ("/"); #if defined(SENDMAIL) -@@ -699,6 +720,7 @@ run_loop() +@@ -707,6 +728,7 @@ * Let's remove the lockfile and reschedule. */ strncpy(lock_name, dirent->d_name, sizeof(lock_name)); -+ lock_name[sizeof(lock_name)-1] = '\0'; ++ lock_name[sizeof(lock_name)-1] = '\0'; lock_name[0] = '='; unlink(lock_name); next_job = now; -@@ -733,6 +755,7 @@ run_loop() +@@ -741,6 +763,7 @@ run_batch++; if (strcmp(batch_name, dirent->d_name) > 0) { strncpy(batch_name, dirent->d_name, sizeof(batch_name)); -+ batch_name[sizeof(batch_name)-1] = '\0'; ++ batch_name[sizeof(batch_name)-1] = '\0'; batch_uid = buf.st_uid; batch_gid = buf.st_gid; batch_queue = queue; -diff -up at-3.1.18/at.1.in.nit at-3.1.18/at.1.in ---- at-3.1.18/at.1.in.nit 2015-12-06 16:45:10.000000000 +0100 -+++ at-3.1.18/at.1.in 2016-03-23 12:46:49.226277876 +0100 -@@ -210,7 +210,7 @@ queue for - .BR batch . - Queues with higher letters run with increased niceness. The special - queue "=" is reserved for jobs which are currently running. --.P -+ - If a job is submitted to a queue designated with an uppercase letter, the - job is treated as if it were submitted to batch at the time of the job. - Once the time is reached, the batch processing rules with respect to load diff --git a/SOURCES/at-3.1.18-noabort.patch b/at-3.2.5-noabort.patch similarity index 69% rename from SOURCES/at-3.1.18-noabort.patch rename to at-3.2.5-noabort.patch index 1154fb9..2d72301 100644 --- a/SOURCES/at-3.1.18-noabort.patch +++ b/at-3.2.5-noabort.patch @@ -1,7 +1,7 @@ -diff -up at-3.1.18/atd.c.noabort at-3.1.18/atd.c ---- at-3.1.18/atd.c.noabort 2016-03-23 12:49:15.147520116 +0100 -+++ at-3.1.18/atd.c 2016-03-23 12:49:15.148520138 +0100 -@@ -349,9 +349,12 @@ run_file(const char *filename, uid_t uid +diff -ur b/atd.c a/atd.c +--- b/atd.c 2022-02-22 16:09:15.683717386 +0100 ++++ a/atd.c 2022-02-22 16:12:48.992989327 +0100 +@@ -344,9 +344,12 @@ */ pid = fork(); @@ -17,7 +17,7 @@ diff -up at-3.1.18/atd.c.noabort at-3.1.18/atd.c else if (pid != 0) { free(mailname); free(newname); -@@ -669,15 +672,19 @@ run_loop() +@@ -659,16 +662,20 @@ * up. */ @@ -28,10 +28,11 @@ diff -up at-3.1.18/atd.c.noabort at-3.1.18/atd.c + return next_job; + } - if (nothing_to_do && buf.st_mtime <= last_chg) + if (nothing_to_do && buf.st_mtime == last_chg) return next_job; last_chg = buf.st_mtime; + hupped = 0; - if ((spool = opendir(".")) == NULL) - perr("Cannot read " ATJOB_DIR); + if ((spool = opendir(".")) == NULL) { diff --git a/SOURCES/at-3.1.20-pam.patch b/at-3.2.5-pam.patch similarity index 78% rename from SOURCES/at-3.1.20-pam.patch rename to at-3.2.5-pam.patch index 418fa84..941da0a 100644 --- a/SOURCES/at-3.1.20-pam.patch +++ b/at-3.2.5-pam.patch @@ -1,7 +1,7 @@ -diff -up at-3.1.20/at.c.pam at-3.1.20/at.c ---- at-3.1.20/at.c.pam 2016-06-28 22:18:00.000000000 +0200 -+++ at-3.1.20/at.c 2016-07-01 09:44:22.251683924 +0200 -@@ -144,18 +144,13 @@ sigc(int signo) +diff -ur b/at.c a/at.c +--- b/at.c 2022-01-29 17:42:19.000000000 +0100 ++++ a/at.c 2022-02-23 18:42:45.941757090 +0100 +@@ -155,18 +155,12 @@ /* If the user presses ^C, remove the spool file and exit */ if (fcreated) { @@ -16,20 +16,19 @@ diff -up at-3.1.20/at.c.pam at-3.1.20/at.c - unlink(atfile); - setregid(effective_gid, real_gid); - /* -+ unlink(atfile); PRIV_END - */ } exit(EXIT_FAILURE); } -@@ -315,26 +310,19 @@ writefile(time_t runtimer, char queue) +@@ -326,26 +320,19 @@ * bit. Yes, this is a kluge. */ cmask = umask(S_IRUSR | S_IWUSR | S_IXUSR); - seteuid(real_uid); + if ((seteuid(effective_uid)) < 0) + perr("Error in seteuid: %s", errno); - if ((fd = open(atfile, O_CREAT | O_EXCL | O_TRUNC | O_WRONLY, S_IRUSR)) == -1) + if ((fd = open(atfile, O_CREAT | O_EXCL | O_TRUNC | O_WRONLY | O_SYNC, S_IRUSR)) == -1) perr("Cannot create atjob file %.500s", atfile); - seteuid(effective_uid); @@ -52,7 +51,7 @@ diff -up at-3.1.20/at.c.pam at-3.1.20/at.c /* We've successfully created the file; let's set the flag so it * gets removed in case of an interrupt or error. */ -@@ -673,7 +661,7 @@ process_jobs(int argc, char **argv, int +@@ -733,7 +720,7 @@ We need the unprivileged uid here since the file is owned by the real (not effective) uid. */ @@ -61,7 +60,7 @@ diff -up at-3.1.20/at.c.pam at-3.1.20/at.c if (queue == '=') { fprintf(stderr, "Warning: deleting running job\n"); -@@ -682,8 +670,8 @@ process_jobs(int argc, char **argv, int +@@ -742,8 +729,8 @@ perr("Cannot unlink %.500s", dirent->d_name); rc = EXIT_FAILURE; } @@ -71,7 +70,7 @@ diff -up at-3.1.20/at.c.pam at-3.1.20/at.c done = 1; break; -@@ -693,7 +681,7 @@ process_jobs(int argc, char **argv, int +@@ -753,7 +740,7 @@ FILE *fp; int ch; @@ -80,7 +79,7 @@ diff -up at-3.1.20/at.c.pam at-3.1.20/at.c fp = fopen(dirent->d_name, "r"); if (fp) { -@@ -706,7 +694,7 @@ process_jobs(int argc, char **argv, int +@@ -768,7 +755,7 @@ perr("Cannot open %.500s", dirent->d_name); rc = EXIT_FAILURE; } @@ -89,10 +88,10 @@ diff -up at-3.1.20/at.c.pam at-3.1.20/at.c } break; -diff -up at-3.1.20/atd.c.pam at-3.1.20/atd.c ---- at-3.1.20/atd.c.pam 2016-06-28 22:14:39.000000000 +0200 -+++ at-3.1.20/atd.c 2016-07-01 09:44:22.251683924 +0200 -@@ -91,6 +91,10 @@ int selinux_enabled = 0; +diff -ur b/atd.c a/atd.c +--- b/atd.c 2022-01-29 17:42:19.000000000 +0100 ++++ a/atd.c 2022-02-23 18:50:53.743511813 +0100 +@@ -91,6 +91,10 @@ /* Macros */ @@ -103,7 +102,7 @@ diff -up at-3.1.20/atd.c.pam at-3.1.20/atd.c #define BATCH_INTERVAL_DEFAULT 60 #define CHECK_INTERVAL 3600 -@@ -114,7 +118,7 @@ static int run_as_daemon = 0; +@@ -115,7 +119,7 @@ static volatile sig_atomic_t term_signal = 0; @@ -112,7 +111,7 @@ diff -up at-3.1.20/atd.c.pam at-3.1.20/atd.c #include static pam_handle_t *pamh = NULL; -@@ -123,15 +127,7 @@ static const struct pam_conv conv = { +@@ -124,15 +128,7 @@ NULL }; @@ -129,7 +128,7 @@ diff -up at-3.1.20/atd.c.pam at-3.1.20/atd.c /* Signal handlers */ RETSIGTYPE -@@ -292,7 +288,7 @@ run_file(const char *filename, uid_t uid +@@ -293,7 +289,7 @@ char fmt[64]; unsigned long jobno; int rc; @@ -138,7 +137,7 @@ diff -up at-3.1.20/atd.c.pam at-3.1.20/atd.c int retcode; #endif -@@ -449,17 +445,11 @@ run_file(const char *filename, uid_t uid +@@ -450,17 +446,11 @@ fstat(fd_out, &buf); size = buf.st_size; @@ -161,12 +160,12 @@ diff -up at-3.1.20/atd.c.pam at-3.1.20/atd.c #endif close(STDIN_FILENO); -@@ -473,7 +463,14 @@ run_file(const char *filename, uid_t uid - else if (pid == 0) { +@@ -475,6 +465,14 @@ char *nul = NULL; char **nenvp = &nul; -+ char **pam_envp=0L; ++ char **pam_envp=0L; ++ + PRIV_START +#ifdef WITH_PAM + pam_envp = pam_getenvlist(pamh); @@ -176,16 +175,15 @@ diff -up at-3.1.20/atd.c.pam at-3.1.20/atd.c /* Set up things for the child; we want standard input from the * input file, and standard output and error sent to our output file. */ -@@ -492,8 +489,6 @@ run_file(const char *filename, uid_t uid +@@ -493,7 +491,6 @@ close(fd_in); close(fd_out); - PRIV_START -- - nice((tolower((int) queue) - 'a' + 1) * 2); - #ifdef WITH_SELINUX -@@ -514,9 +509,9 @@ run_file(const char *filename, uid_t uid + nice((tolower((int) queue) - 'a') * 2); + +@@ -515,9 +512,9 @@ chdir("/"); @@ -198,7 +196,7 @@ diff -up at-3.1.20/atd.c.pam at-3.1.20/atd.c PRIV_END } /* We're the parent. Let's wait. -@@ -529,14 +524,6 @@ run_file(const char *filename, uid_t uid +@@ -530,14 +527,6 @@ */ waitpid(pid, (int *) NULL, 0); @@ -213,7 +211,7 @@ diff -up at-3.1.20/atd.c.pam at-3.1.20/atd.c /* Send mail. Unlink the output file after opening it, so it * doesn't hang around after the run. */ -@@ -567,8 +554,13 @@ run_file(const char *filename, uid_t uid +@@ -568,8 +557,13 @@ unlink(newname); free(newname); @@ -227,7 +225,7 @@ diff -up at-3.1.20/atd.c.pam at-3.1.20/atd.c PRIV_START if (initgroups(pentry->pw_name, pentry->pw_gid)) -@@ -590,7 +582,20 @@ run_file(const char *filename, uid_t uid +@@ -591,7 +585,20 @@ perr("Exec failed for mail command"); PRIV_END @@ -236,7 +234,7 @@ diff -up at-3.1.20/atd.c.pam at-3.1.20/atd.c + syslog(LOG_ERR, "fork of mailer failed: %m"); + } + /* Parent */ -+ waitpid(mail_pid, (int *) NULL, 0); ++ waitpid(mail_pid, (int *) NULL, 0); } + +#ifdef WITH_PAM @@ -248,10 +246,10 @@ diff -up at-3.1.20/atd.c.pam at-3.1.20/atd.c exit(EXIT_SUCCESS); } -diff -up at-3.1.20/config.h.in.pam at-3.1.20/config.h.in ---- at-3.1.20/config.h.in.pam 2015-12-18 21:29:24.000000000 +0100 -+++ at-3.1.20/config.h.in 2016-07-01 09:44:22.251683924 +0200 -@@ -68,8 +68,8 @@ +diff -ur b/config.h.in a/config.h.in +--- b/config.h.in 2022-01-29 17:42:19.000000000 +0100 ++++ a/config.h.in 2022-02-23 18:51:31.467570176 +0100 +@@ -74,8 +74,8 @@ /* Define to 1 if you have the header file. */ #undef HAVE_NLIST_H @@ -262,10 +260,10 @@ diff -up at-3.1.20/config.h.in.pam at-3.1.20/config.h.in /* Define to 1 if you have the `pstat_getdynamic' function. */ #undef HAVE_PSTAT_GETDYNAMIC -diff -up at-3.1.20/configure.ac.pam at-3.1.20/configure.ac ---- at-3.1.20/configure.ac.pam 2016-06-28 22:55:52.000000000 +0200 -+++ at-3.1.20/configure.ac 2016-07-01 09:45:23.268092527 +0200 -@@ -78,7 +78,7 @@ AC_FUNC_GETLOADAVG +diff -ur b/configure.ac a/configure.ac +--- b/configure.ac 2022-01-29 17:42:19.000000000 +0100 ++++ a/configure.ac 2022-02-23 18:53:08.516720324 +0100 +@@ -97,7 +97,7 @@ AC_CHECK_FUNCS(getcwd mktime strftime setreuid setresuid sigaction waitpid) AC_CHECK_HEADERS(security/pam_appl.h, [ PAMLIB="-lpam" @@ -274,7 +272,7 @@ diff -up at-3.1.20/configure.ac.pam at-3.1.20/configure.ac ]) dnl Checking for programs -@@ -239,6 +239,13 @@ AC_ARG_WITH(daemon_username, +@@ -260,6 +260,13 @@ ) AC_SUBST(DAEMON_USERNAME) @@ -288,10 +286,10 @@ diff -up at-3.1.20/configure.ac.pam at-3.1.20/configure.ac AC_ARG_WITH(selinux, [ --with-selinux Define to run with selinux (default=check)], [], -diff -up at-3.1.20/Makefile.in.pam at-3.1.20/Makefile.in ---- at-3.1.20/Makefile.in.pam 2016-07-01 09:44:22.250683901 +0200 -+++ at-3.1.20/Makefile.in 2016-07-01 09:44:22.252683947 +0200 -@@ -68,7 +68,7 @@ LIST = Filelist Filelist.asc +diff -ur b/Makefile.in a/Makefile.in +--- b/Makefile.in 2022-02-23 18:33:26.999892289 +0100 ++++ a/Makefile.in 2022-02-23 18:53:28.600751396 +0100 +@@ -76,7 +76,7 @@ all: at atd atd.service atrun at: $(ATOBJECTS) @@ -300,9 +298,9 @@ diff -up at-3.1.20/Makefile.in.pam at-3.1.20/Makefile.in rm -f $(CLONES) $(LN_S) -f at atq $(LN_S) -f at atrm -diff -up at-3.1.20/perm.c.pam at-3.1.20/perm.c ---- at-3.1.20/perm.c.pam 2015-08-22 00:09:22.000000000 +0200 -+++ at-3.1.20/perm.c 2016-07-01 09:44:22.252683947 +0200 +diff -ur b/perm.c a/perm.c +--- b/perm.c 2022-01-29 17:42:19.000000000 +0100 ++++ a/perm.c 2022-02-23 18:56:21.401018761 +0100 @@ -51,6 +51,14 @@ #define PRIV_END while(0) #endif @@ -318,7 +316,7 @@ diff -up at-3.1.20/perm.c.pam at-3.1.20/perm.c /* Structures and unions */ -@@ -108,18 +116,45 @@ user_in_file(const char *path, const cha +@@ -108,18 +116,45 @@ int check_permission() { @@ -367,10 +365,10 @@ diff -up at-3.1.20/perm.c.pam at-3.1.20/perm.c allow = user_in_file(ETCDIR "/at.allow", pentry->pw_name); if (allow==0 || allow==1) return allow; -diff -up at-3.1.20/privs.h.pam at-3.1.20/privs.h ---- at-3.1.20/privs.h.pam 2015-08-22 00:09:22.000000000 +0200 -+++ at-3.1.20/privs.h 2016-07-01 09:44:22.252683947 +0200 -@@ -144,3 +144,63 @@ extern gid_t real_gid, effective_gid, da +diff -ur b/privs.h a/privs.h +--- b/privs.h 2022-01-29 17:42:19.000000000 +0100 ++++ a/privs.h 2022-02-23 18:58:20.920203690 +0100 +@@ -144,3 +144,62 @@ #error "Cannot implement user ID swapping without setreuid or setresuid" #endif #endif @@ -433,4 +431,3 @@ diff -up at-3.1.20/privs.h.pam at-3.1.20/privs.h +} + +#endif -+ diff --git a/SOURCES/at-aarch64.patch b/at-aarch64.patch similarity index 100% rename from SOURCES/at-aarch64.patch rename to at-aarch64.patch diff --git a/SPECS/at.spec b/at.spec similarity index 81% rename from SPECS/at.spec rename to at.spec index 6e063a3..0baaac6 100644 --- a/SPECS/at.spec +++ b/at.spec @@ -1,38 +1,36 @@ %bcond_without pam -Summary: Job spooling tools -Name: at -Version: 3.1.20 -Release: 12%{?dist} +Summary: Job spooling tools +Name: at +Version: 3.2.5 +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: GPLv3+ and GPLv2+ and ISC and MIT and Public Domain -Group: System Environment/Daemons -URL: http://ftp.debian.org/debian/pool/main/a/at +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://ftp.debian.org/debian/pool/main/a/at/at_%{version}.orig.tar.gz +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 -Source3: atd.sysconf -Source5: atd.systemd +Source1: pam_atd +Source3: atd.sysconf +Source5: atd.systemd -Patch0: at-aarch64.patch -Patch1: at-3.1.18-make.patch -Patch2: at-3.1.20-pam.patch -Patch4: at-3.1.14-opt_V.patch -Patch5: at-3.1.20-shell.patch -Patch6: at-3.1.18-nitpicks.patch -Patch8: at-3.1.14-fix_no_export.patch -Patch9: at-3.1.14-mailwithhostname.patch -Patch10: at-3.1.14-usePOSIXtimers.patch -Patch12: at-3.1.20-aborted-jobs.patch -Patch13: at-3.1.18-noabort.patch -Patch14: at-3.1.16-fclose-error.patch -Patch15: at-3.1.16-clear-nonjobs.patch -Patch16: at-3.1.18-utc-dst.patch -Patch17: at-3.1.20-lock-locks.patch -Patch18: at-3.1.20-document-n.patch -Patch19: at-3.1.20-log-jobs.patch +Patch: at-aarch64.patch +Patch: at-3.2.5-make.patch +Patch: at-3.2.5-pam.patch +Patch: at-3.1.14-opt_V.patch +Patch: at-3.2.2-shell.patch +Patch: at-3.2.5-nitpicks.patch +Patch: at-3.1.14-fix_no_export.patch +Patch: at-3.2.5-mailwithhostname.patch +Patch: at-3.2.5-aborted-jobs.patch +Patch: at-3.2.5-noabort.patch +Patch: at-3.1.16-fclose-error.patch +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-address-issues-from-static-analyzer.patch BuildRequires: gcc BuildRequires: flex flex-static bison autoconf @@ -46,6 +44,7 @@ BuildRequires: pam-devel Conflicts: crontabs <= 1.5 # No, I'm not kidding BuildRequires: smtpdaemon +BuildRequires: make Requires(post): systemd-units Requires(preun): systemd-units @@ -66,62 +65,44 @@ need to be repeated at the same time every day/week, etc. you should use crontab instead. %prep -%setup -q +%autosetup -N cp %{SOURCE1} . -%patch0 -p1 -b .arm -%patch1 -p1 -b .make -%patch2 -p1 -b .pam -%patch4 -p1 -b .opt_V -%patch5 -p1 -b .shell -%patch6 -p1 -b .nit -%patch8 -p1 -b .export -%patch9 -p1 -b .mail -%patch10 -p1 -b .posix -%patch12 -p1 -b .aborted -%patch13 -p1 -b .noabort -%patch14 -p1 -b .fclose -%patch15 -p1 -b .clear-nojobs -%patch16 -p1 -b .dst -%patch17 -p1 -b .lock-locks -%patch18 -p1 -b .document-n -%patch19 -p1 -b .log-jobs +%autopatch -p1 %build -# patch9 touches configure.in -autoconf # uselles files rm -f lex.yy.* y.tab.* + %configure --with-atspool=%{_localstatedir}/spool/at/spool \ - --with-jobdir=%{_localstatedir}/spool/at \ - --with-daemon_username=root \ - --with-daemon_groupname=root \ - --with-selinux \ -%if %{with pam} - --with-pam -%endif + --with-jobdir=%{_localstatedir}/spool/at \ + --with-daemon_username=root \ + --with-daemon_groupname=root \ + --with-selinux \ + %{?with_pam:--with-pam} make %install make install \ - DAEMON_USERNAME=`id -nu`\ - DAEMON_GROUPNAME=`id -ng` \ - DESTDIR=%{buildroot}\ - sbindir=%{buildroot}%{_prefix}/sbin\ - bindir=%{buildroot}%{_bindir}\ - prefix=%{buildroot}%{_prefix}\ - exec_prefix=%{buildroot}%{_prefix}\ - docdir=%{buildroot}/usr/doc\ - mandir=%{buildroot}%{_mandir}\ - etcdir=%{buildroot}%{_sysconfdir} \ - ATJOB_DIR=%{buildroot}%{_localstatedir}/spool/at \ - ATSPOOL_DIR=%{buildroot}%{_localstatedir}/spool/at/spool \ - INSTALL_ROOT_USER=`id -nu` \ - INSTALL_ROOT_GROUP=`id -nu`; + DAEMON_USERNAME=`id -nu` \ + DAEMON_GROUPNAME=`id -ng` \ + DESTDIR=%{buildroot} \ + sbindir=%{_prefix}/sbin \ + bindir=%{_bindir} \ + datadir=%{_datadir} \ + prefix=%{_prefix} \ + exec_prefix=%{_prefix} \ + docdir=%{_prefix}/doc \ + mandir=%{_mandir} \ + etcdir=%{_sysconfdir} \ + ATJOB_DIR=%{_localstatedir}/spool/at \ + ATSPOOL_DIR=%{_localstatedir}/spool/at/spool \ + INSTALL_ROOT_USER=`id -nu` \ + INSTALL_ROOT_GROUP=`id -nu`; echo > %{buildroot}%{_sysconfdir}/at.deny mkdir docs -cp %{buildroot}/%{_prefix}/doc/at/* docs/ +cp %{buildroot}%{_prefix}/doc/at/* docs/ mkdir -p %{buildroot}%{_sysconfdir}/pam.d install -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/pam.d/atd @@ -167,25 +148,104 @@ chown root:root %{_localstatedir}/spool/at/.SEQ %files %license Copyright COPYING %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 +%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(0755,root,root) %{_sbindir}/atd %{_mandir}/man*/* %{_bindir}/batch %{_bindir}/atrm %{_bindir}/atq -%attr(4755,root,root) %{_bindir}/at -%attr(0644,root,root) /%{_unitdir}/atd.service +%attr(4755,root,root) %{_bindir}/at +%{_datadir}/at/batch-job +%attr(0644,root,root) /%{_unitdir}/atd.service %changelog -* Mon Apr 04 2022 Jan Staněk - 3.1.20-12 -- Add preceding newline to delimiter in at-3.1.20-shell.patch - Resolves: rhbz#2070450 +* Wed Nov 06 2024 Ondřej Pohořelský - 3.2.5-12 +- Address issues from static analyzer + Resolves: RHEL-44999 + +* Tue Oct 29 2024 Troy Dawson - 3.2.5-11 +- Bump release for October 2024 mass rebuild: + Resolves: RHEL-64018 + +* Mon Jun 24 2024 Troy Dawson - 3.2.5-10 +- Bump release for June 2024 mass rebuild + +* 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 + +* 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 + +* 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 + +* Thu Mar 31 2022 Jan Staněk - 3.2.5-3 +- Add preceding newline to delimiter in at-3.2.2-shell.patch + +* Tue Mar 08 2022 Ondřej Pohořelský - 3.2.5-2 +- Add mising directory and batch-job script into at-3.2.5-make.patch +- Defined datadir in %%install section and listed batch-job in %%files section + +* Tue Mar 01 2022 Ondřej Pohořelský - 3.2.5-1 +- Update to new upstream release +- Removed at-3.1.14-usePOSIXtimers.patch and at-3.2.23-coverity-fix.patch, because + upstream implemented them +- Defined folder paths without %%{buildroot} in order to make them work with latest + Makefile changes +- Resolves: rhbz#2048132 + +* Wed Jan 19 2022 Fedora Release Engineering - 3.2.2-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Wed Jul 21 2021 Fedora Release Engineering - 3.2.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Fri May 21 2021 Ondřej Pohořelský - 3.2.2-1 +- Update to new upstream release + +* Fri Apr 16 2021 Jan Staněk - 3.1.23-8 +- Patch issues found by coverity (rhbz#1938678) + +* Tue Mar 02 2021 Zbigniew Jędrzejewski-Szmek - 3.1.23-7 +- Rebuilt for updated systemd-rpm-macros + See https://pagure.io/fesco/issue/2583. + +* Tue Jan 26 2021 Fedora Release Engineering - 3.1.23-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Mon Jul 27 2020 Fedora Release Engineering - 3.1.23-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Tue Jan 28 2020 Fedora Release Engineering - 3.1.23-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Wed Jul 24 2019 Fedora Release Engineering - 3.1.23-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Thu Jan 31 2019 Fedora Release Engineering - 3.1.23-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Mon Aug 27 2018 Tomáš Mráz - 3.1.23-1 +- new upstream release + +* Thu Jul 12 2018 Fedora Release Engineering - 3.1.20-12 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild * Wed May 23 2018 Tomáš Mráz - 3.1.20-11 - log the jobs being run @@ -404,7 +464,7 @@ chown root:root %{_localstatedir}/spool/at/.SEQ * Wed Dec 3 2008 Marcela Mašláňová - 3.1.10-27 - 464393 add script into pm-utils, because daemon wasn't taking all jobs - after suspend/hibernate + after suspend/hibernate * Fri Oct 24 2008 Marcela Mašláňová - 3.1.10-26 - update init script according to SysVInitScript diff --git a/SOURCES/atd.sysconf b/atd.sysconf similarity index 100% rename from SOURCES/atd.sysconf rename to atd.sysconf diff --git a/SOURCES/atd.systemd b/atd.systemd similarity index 69% rename from SOURCES/atd.systemd rename to atd.systemd index abe24c1..962b0d0 100644 --- a/SOURCES/atd.systemd +++ b/atd.systemd @@ -1,11 +1,13 @@ [Unit] -Description=Job spooling tools +Description=Deferred execution scheduler +Documentation=man:atd(8) After=syslog.target systemd-user-sessions.service [Service] EnvironmentFile=/etc/sysconfig/atd ExecStart=/usr/sbin/atd -f $OPTS IgnoreSIGPIPE=no +KillMode=process [Install] WantedBy=multi-user.target diff --git a/SOURCES/pam_atd b/pam_atd similarity index 100% rename from SOURCES/pam_atd rename to pam_atd diff --git a/sources b/sources new file mode 100644 index 0000000..87c3785 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (at_3.2.5.orig.tar.gz) = 542e8948bbdc1d06934070cbfe242688b541ef6342c6b0351255f8b9d7a3ed915a9304b5cf5442dfc15845b3d2b926ebecbfc5bccd204519d0a2775b27f8139c