Hello community, here is the log from the commit of package at for openSUSE:Factory checked in at 2020-10-08 13:09:00 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/at (Old) and /work/SRC/openSUSE:Factory/.at.new.4249 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "at" Thu Oct 8 13:09:00 2020 rev:76 rq:839560 version:3.2.1 Changes: -------- --- /work/SRC/openSUSE:Factory/at/at.changes 2020-02-22 18:57:25.173288479 +0100 +++ /work/SRC/openSUSE:Factory/.at.new.4249/at.changes 2020-10-08 13:09:55.443049658 +0200 @@ -1,0 +2,19 @@ +Fri Oct 2 21:20:32 UTC 2020 - Jan Engelhardt <[email protected]> + +- Update to release 3.2.1 + * Print time of new job before the input of the commands. + * Do not drop seconds on -t option. + * Start using nice levels from 0 instead of 2. + * Correctly handle DST when specifying a UTC time. +- Modernize specfile constructs / drop old ones. +- Do not silence errors from useradd/groupadd. +- Refreshed at-3.1.13-documentation-dir.patch, + at-3.1.13-leak-fix.patch, at-3.1.13-massive_batch.patch, + at-3.1.13-tomorrow.patch, at-3.1.14-joblist.patch, + at-3.1.14-makefile-deps.patch, + at-3.1.14-parse-suse-sysconfig.patch, at-3.1.14.patch, + at-3.1.8-denylist.patch, at-3.1.8-jobdir-mtime.patch, + at-atq-timeformat.patch, at-backport-old-privs.patch, + at-piddir.patch, at-secure_getenv.patch for %autosetup. + +------------------------------------------------------------------- Old: ---- at_3.1.23.orig.tar.gz New: ---- at_3.2.1.orig.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ at.spec ++++++ --- /var/tmp/diff_new_pack.lPh9Jc/_old 2020-10-08 13:09:56.179050325 +0200 +++ /var/tmp/diff_new_pack.lPh9Jc/_new 2020-10-08 13:09:56.183050328 +0200 @@ -22,12 +22,12 @@ %endif Name: at -Version: 3.1.23 +Version: 3.2.1 Release: 0 Summary: A Job Manager License: GPL-2.0-or-later -URL: http://ftp.debian.org/debian/pool/main/a/at -Source: http://ftp.debian.org/debian/pool/main/a/at/%{name}_%{version}.orig.tar.gz +URL: http://blog.calhariz.com/index.php/tag/at +Source: http://software.calhariz.com/at/%{name}_%{version}.orig.tar.gz Source2: atd.pamd Source3: sysconfig.atd Source5: atd.service @@ -62,41 +62,22 @@ BuildRequires: automake BuildRequires: bison BuildRequires: flex -BuildRequires: libHX-devel -BuildRequires: libselinux-devel BuildRequires: pam-devel BuildRequires: pkgconfig BuildRequires: systemd-rpm-macros +BuildRequires: pkgconfig(libHX) +BuildRequires: pkgconfig(libselinux) Requires(post): %fillup_prereq Requires(pre): %{_sbindir}/groupadd Requires(pre): %{_sbindir}/useradd Requires(pre): permissions Recommends: smtp_daemon -BuildRoot: %{_tmppath}/%{name}-%{version}-build -%{?systemd_requires} %description This program allows you to run jobs at specified times. %prep -%setup -q -%patch0 -%patch4 -%patch10 -%patch11 -%patch15 -%patch16 -%patch17 -p1 -%patch19 -%patch20 -%patch21 -p1 -%patch22 -%patch23 -p1 -%patch24 -p1 -%patch25 -%patch27 -p1 -%patch28 -p1 -%patch29 -p1 +%autosetup -p1 %build export SENDMAIL=%{_sbindir}/sendmail @@ -109,7 +90,7 @@ --with-daemon_username=at \ --with-daemon_groupname=at -make %{?_smp_mflags} +%make_build %install install -d %{buildroot}{%{_sysconfdir}/pam.d,%{_bindir},%{_sbindir},%{_mandir}/man{1,5,8},%{_fillupdir}} @@ -130,8 +111,10 @@ install -m644 %{SOURCE3} %{buildroot}%{_fillupdir} %pre -%{_sbindir}/groupadd -g 25 -o -r at 2> /dev/null || : -%{_sbindir}/useradd -r -o -g at -u 25 -s /bin/false -c "Batch jobs daemon" -d %{_localstatedir}/spool/atjobs at 2> /dev/null || : +getent group at >/dev/null || %{_sbindir}/groupadd -g 25 -o -r at +getent passwd at >/dev/null || %{_sbindir}/useradd -r -o -g at -u 25 \ + -s /bin/false -c "Batch jobs daemon" \ + -d %{_localstatedir}/spool/atjobs at %service_add_pre atd.service %preun @@ -149,8 +132,8 @@ %service_del_postun atd.service %files -%defattr(-,root,root) -%doc Problems Copyright COPYING README ChangeLog timespec +%doc Problems README ChangeLog timespec +%license COPYING Copyright %config(noreplace) %{_sysconfdir}/at.deny %{_sbindir}/rcatd %config %attr(644,root,root) %{_sysconfdir}/pam.d/atd ++++++ at-3.1.13-documentation-dir.patch ++++++ --- /var/tmp/diff_new_pack.lPh9Jc/_old 2020-10-08 13:09:56.207050350 +0200 +++ /var/tmp/diff_new_pack.lPh9Jc/_new 2020-10-08 13:09:56.207050350 +0200 @@ -1,8 +1,12 @@ -Index: at.1.in +--- + at.1.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: at-3.2.0/at.1.in =================================================================== ---- at.1.in.orig -+++ at.1.in -@@ -132,7 +132,7 @@ the past, the job will run as soon as po +--- at-3.2.0.orig/at.1.in ++++ at-3.2.0/at.1.in +@@ -136,7 +136,7 @@ the past, the job will run as soon as po it will run more likely at 8:05pm. .PP The definition of the time specification can be found in ++++++ at-3.1.13-leak-fix.patch ++++++ --- /var/tmp/diff_new_pack.lPh9Jc/_old 2020-10-08 13:09:56.215050357 +0200 +++ /var/tmp/diff_new_pack.lPh9Jc/_new 2020-10-08 13:09:56.215050357 +0200 @@ -1,10 +1,12 @@ -Index: at.c +--- + at.c | 4 ++++ + 1 file changed, 4 insertions(+) + +Index: at-3.2.0/at.c =================================================================== ---- at.c.orig -+++ at.c -@@ -616,10 +616,13 @@ list_jobs(long *joblist, int len) - if ((pwd = getpwuid(buf.st_uid))) - printf("%ld\t%s %c %s\n", jobno, timestr, queue, pwd->pw_name); +--- at-3.2.0.orig/at.c ++++ at-3.2.0/at.c +@@ -658,6 +658,9 @@ list_jobs(long *joblist, int len) else printf("%ld\t%s %c\n", jobno, timestr, queue); } @@ -14,11 +16,7 @@ PRIV_END } - static int - process_jobs(int argc, char **argv, int what) -@@ -698,10 +701,11 @@ process_jobs(int argc, char **argv, int - if (fp) { - while ((ch = getc(fp)) != EOF) { +@@ -740,6 +743,7 @@ process_jobs(int argc, char **argv, int putchar(ch); } done = 1; @@ -26,5 +24,3 @@ } else { perr("Cannot open %.500s", dirent->d_name); - rc = EXIT_FAILURE; - } ++++++ at-3.1.13-massive_batch.patch ++++++ --- /var/tmp/diff_new_pack.lPh9Jc/_old 2020-10-08 13:09:56.223050365 +0200 +++ /var/tmp/diff_new_pack.lPh9Jc/_new 2020-10-08 13:09:56.227050368 +0200 @@ -1,7 +1,11 @@ -Index: atd.c +--- + atd.c | 15 +++++++++------ + 1 file changed, 9 insertions(+), 6 deletions(-) + +Index: at-3.2.0/atd.c =================================================================== ---- atd.c.orig -+++ atd.c +--- at-3.2.0.orig/atd.c ++++ at-3.2.0/atd.c @@ -108,9 +108,10 @@ static char *namep; static double load_avg = LOADAVG_MX; static time_t now; ++++++ at-3.1.13-tomorrow.patch ++++++ --- /var/tmp/diff_new_pack.lPh9Jc/_old 2020-10-08 13:09:56.235050376 +0200 +++ /var/tmp/diff_new_pack.lPh9Jc/_new 2020-10-08 13:09:56.235050376 +0200 @@ -1,12 +1,14 @@ -Index: at-3.1.13/parsetime.y +--- + parsetime.y | 5 +++++ + 1 file changed, 5 insertions(+) + +Index: at-3.2.0/parsetime.y =================================================================== ---- at-3.1.13.orig/parsetime.y -+++ at-3.1.13/parsetime.y -@@ -504,10 +504,15 @@ parsetime(time_t currtime, int argc, cha - if (isgmt) { - exectime -= timezone; - if (currtm.tm_isdst && !exectm.tm_isdst) - exectime -= 3600; +--- at-3.2.0.orig/parsetime.y ++++ at-3.2.0/parsetime.y +@@ -518,6 +518,11 @@ parsetime(time_t currtime, int argc, cha + else + unsetenv("TZ"); } + /* exectime zeroes its seconds, thus we need +60, + * else "now" will be scheduled to tomorrow */ @@ -16,5 +18,3 @@ if (exectime < currtime) panic("refusing to create job destined in the past"); return exectime; - } - else { ++++++ at-3.1.14-joblist.patch ++++++ --- /var/tmp/diff_new_pack.lPh9Jc/_old 2020-10-08 13:09:56.243050383 +0200 +++ /var/tmp/diff_new_pack.lPh9Jc/_new 2020-10-08 13:09:56.243050383 +0200 @@ -1,8 +1,13 @@ -Index: at.c +--- + at.c | 52 ++++++++++++++++++++++++++++++++++++++++++++++++---- + panic.c | 1 + + 2 files changed, 49 insertions(+), 4 deletions(-) + +Index: at-3.2.0/at.c =================================================================== ---- at.c.orig -+++ at.c -@@ -134,7 +134,9 @@ static void sigc(int signo); +--- at-3.2.0.orig/at.c ++++ at-3.2.0/at.c +@@ -135,7 +135,9 @@ static void sigc(int signo); static void alarmc(int signo); static char *cwdname(void); static void writefile(time_t runtimer, char queue); @@ -13,7 +18,7 @@ /* Signal catching functions */ -@@ -566,8 +568,20 @@ writefile(time_t runtimer, char queue) +@@ -587,8 +589,20 @@ writefile(time_t runtimer, char queue) return; } @@ -35,7 +40,7 @@ { /* List all a user's jobs in the queue, by looping through ATJOB_DIR, * or everybody's if we are root -@@ -606,6 +620,10 @@ list_jobs(void) +@@ -627,6 +641,10 @@ list_jobs(void) if (sscanf(dirent->d_name, "%c%5lx%8lx", &queue, &jobno, &ctm) != 3) continue; @@ -46,7 +51,7 @@ if (atqueue && (queue != atqueue)) continue; -@@ -727,6 +745,29 @@ process_jobs(int argc, char **argv, int +@@ -748,6 +766,29 @@ process_jobs(int argc, char **argv, int return rc; } /* delete_jobs */ @@ -76,8 +81,8 @@ /* Global functions */ void * -@@ -752,6 +793,8 @@ main(int argc, char **argv) - char *options = "q:f:MmbvlrdhVct:"; /* default options for at */ +@@ -773,6 +814,8 @@ main(int argc, char **argv) + char *options = "q:f:Mmu:bvlrdhVct:"; /* default options for at */ int disp_version = 0; time_t timer = 0; + long *joblist = NULL; @@ -85,7 +90,7 @@ struct passwd *pwe; struct group *ge; -@@ -889,8 +932,9 @@ main(int argc, char **argv) +@@ -912,8 +955,9 @@ main(int argc, char **argv) case ATQ: REDUCE_PRIV(daemon_uid, daemon_gid) @@ -97,13 +102,13 @@ break; case ATRM: -Index: panic.c +Index: at-3.2.0/panic.c =================================================================== ---- panic.c.orig -+++ panic.c +--- at-3.2.0.orig/panic.c ++++ at-3.2.0/panic.c @@ -95,6 +95,7 @@ usage(void) - fprintf(stderr, "Usage: at [-V] [-q x] [-f file] [-mMlbv] timespec ...\n" - " at [-V] [-q x] [-f file] [-mMlbv] -t time\n" + fprintf(stderr, "Usage: at [-V] [-q x] [-f file] [-u username] [-mMlbv] timespec ...\n" + " at [-V] [-q x] [-f file] [-u username] [-mMlbv] -t time\n" " at -c job ...\n" + " at [-V] -l [job ...]\n" " atq [-V] [-q x]\n" ++++++ at-3.1.14-makefile-deps.patch ++++++ --- /var/tmp/diff_new_pack.lPh9Jc/_old 2020-10-08 13:09:56.251050390 +0200 +++ /var/tmp/diff_new_pack.lPh9Jc/_new 2020-10-08 13:09:56.251050390 +0200 @@ -1,7 +1,11 @@ -Index: at-3.1.14/Makefile.in +--- + Makefile.in | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +Index: at-3.2.0/Makefile.in =================================================================== ---- at-3.1.14.orig/Makefile.in -+++ at-3.1.14/Makefile.in +--- at-3.2.0.orig/Makefile.in ++++ at-3.2.0/Makefile.in @@ -77,9 +77,12 @@ at: $(ATOBJECTS) atd: $(RUNOBJECTS) $(CC) $(LDFLAGS) -o atd $(RUNOBJECTS) $(LIBS) $(PAMLIB) $(SELINUXLIB) ++++++ at-3.1.14-parse-suse-sysconfig.patch ++++++ --- /var/tmp/diff_new_pack.lPh9Jc/_old 2020-10-08 13:09:56.259050398 +0200 +++ /var/tmp/diff_new_pack.lPh9Jc/_new 2020-10-08 13:09:56.263050401 +0200 @@ -6,14 +6,14 @@ --- Makefile.in | 4 ++-- atd.c | 21 +++++++++++++++++++++ - configure.in | 44 +++++++++++++++++++++++++++----------------- - 3 files changed, 50 insertions(+), 19 deletions(-) + configure.ac | 2 ++ + 3 files changed, 25 insertions(+), 2 deletions(-) -Index: Makefile.in +Index: at-3.2.0/Makefile.in =================================================================== ---- Makefile.in.orig -+++ Makefile.in -@@ -28,7 +28,7 @@ LEX = @LEX@ +--- at-3.2.0.orig/Makefile.in ++++ at-3.2.0/Makefile.in +@@ -29,7 +29,7 @@ LEX = @LEX@ LEXLIB = @LEXLIB@ CC = @CC@ @@ -22,7 +22,7 @@ LDFLAGS = @LDFLAGS@ LFILE = $(ATJOB_DIR)/.SEQ DEFS = @DEFS@ -DVERSION=\"$(VERSION)\" \ -@@ -36,7 +36,7 @@ DEFS = @DEFS@ -DVERSION=\"$(VERSION)\" +@@ -37,7 +37,7 @@ DEFS = @DEFS@ -DVERSION=\"$(VERSION)\" -DDAEMON_USERNAME=\"$(DAEMON_USERNAME)\" \ -DDAEMON_GROUPNAME=\"$(DAEMON_GROUPNAME)\" \ -DLFILE=\"$(LFILE)\" -Wall @@ -31,10 +31,10 @@ LIBOBJS = @LIBOBJS@ INSTALL = @INSTALL@ PAMLIB = @PAMLIB@ -Index: atd.c +Index: at-3.2.0/atd.c =================================================================== ---- atd.c.orig -+++ atd.c +--- at-3.2.0.orig/atd.c ++++ at-3.2.0/atd.c @@ -74,6 +74,10 @@ #include <syslog.h> #endif @@ -77,10 +77,10 @@ namep = argv[0]; if (chdir(ATJOB_DIR) != 0) perr("Cannot change to " ATJOB_DIR); -Index: configure.ac +Index: at-3.2.0/configure.ac =================================================================== ---- configure.ac.orig -+++ configure.ac +--- at-3.2.0.orig/configure.ac ++++ at-3.2.0/configure.ac @@ -54,6 +54,8 @@ AC_CHECK_LIB(fl,yywrap, [Define to 1 if we need to provide our own yywrap()]) ) ++++++ at-3.1.14.patch ++++++ --- /var/tmp/diff_new_pack.lPh9Jc/_old 2020-10-08 13:09:56.271050408 +0200 +++ /var/tmp/diff_new_pack.lPh9Jc/_new 2020-10-08 13:09:56.275050412 +0200 @@ -1,8 +1,15 @@ -Index: Makefile.in +--- + Makefile.in | 46 +++++++++++++++++++++++----------------------- + Problems | 2 +- + atd.c | 16 +++++++++++++--- + configure.ac | 2 +- + 4 files changed, 38 insertions(+), 28 deletions(-) + +Index: at-3.2.0/Makefile.in =================================================================== ---- Makefile.in.orig -+++ Makefile.in -@@ -91,41 +91,41 @@ atrun: atrun.in +--- at-3.2.0.orig/Makefile.in ++++ at-3.2.0/Makefile.in +@@ -93,41 +93,41 @@ atrun: atrun.in $(CC) -c $(CFLAGS) $(DEFS) $*.c install: all @@ -52,10 +59,9 @@ + $(INSTALL) -m 644 tmpman $(IROOT)$(man8dir)/atrun.8 rm -f tmpman - $(INSTALL) -g root -o root -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 at.allow.5 $(IROOT)$(man5dir)/ -+ cd $(IROOT)$(man5dir) && $(LN_S) -f at.allow.5 at.deny.5 + 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* @@ -68,13 +74,11 @@ fi dist: checkin $(DIST) $(LIST) Filelist.asc -Index: Problems +Index: at-3.2.0/Problems =================================================================== ---- Problems.orig -+++ Problems -@@ -3,10 +3,10 @@ Possible reasons why at may not run for - - HAVE you run ./configure ? If that fails for some - mysterious reasons, you can also do a +--- at-3.2.0.orig/Problems ++++ at-3.2.0/Problems +@@ -5,7 +5,7 @@ Possible reasons why at may not run for make -f Makefile.old install @@ -83,14 +87,11 @@ - If you find numerous 'try again' error messages in your syslog files, you have too many processes running; recompile your kernel for a - larger number -Index: atd.c +Index: at-3.2.0/atd.c =================================================================== ---- atd.c.orig -+++ atd.c -@@ -314,11 +314,16 @@ run_file(const char *filename, uid_t uid - jobno, filename); - } +--- at-3.2.0.orig/atd.c ++++ at-3.2.0/atd.c +@@ -388,7 +388,12 @@ run_file(const char *filename, uid_t uid if ((fflags = fcntl(fd_in, F_GETFD)) < 0) perr("Error in fcntl"); @@ -104,11 +105,7 @@ /* * 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 - * opened as "root" but it is read as "daemon" which fails over -@@ -431,10 +436,13 @@ run_file(const char *filename, uid_t uid - perr("Cannot change group"); - +@@ -512,6 +517,9 @@ run_file(const char *filename, uid_t uid if (setuid(uid) < 0) perr("Cannot set user id"); @@ -118,11 +115,7 @@ chdir("/"); if (execle("/bin/sh", "sh", (char *) NULL, nenvp) != 0) - perr("Exec failed for /bin/sh"); - -@@ -612,11 +620,12 @@ run_loop() - if (run_time + CHECK_INTERVAL <= now) { - +@@ -699,7 +707,8 @@ run_loop() /* Something went wrong the last time this was executed. * Let's remove the lockfile and reschedule. */ @@ -132,11 +125,7 @@ lock_name[0] = '='; unlink(lock_name); next_job = now; - nothing_to_do = 0; - } -@@ -646,11 +655,12 @@ run_loop() - * at a higher priority than anything before, keep its - * filename. +@@ -733,7 +742,8 @@ run_loop() */ run_batch++; if (strcmp(batch_name, dirent->d_name) > 0) { @@ -146,15 +135,11 @@ batch_uid = buf.st_uid; batch_gid = buf.st_gid; batch_queue = queue; - } - } -Index: configure.ac +Index: at-3.2.0/configure.ac =================================================================== ---- configure.ac.orig -+++ configure.ac -@@ -130,11 +130,11 @@ else - fi - AC_DEFINE_UNQUOTED(PIDFILE, "$PIDDIR/atd.pid", [What is the name of our PID file?]) +--- at-3.2.0.orig/configure.ac ++++ at-3.2.0/configure.ac +@@ -132,7 +132,7 @@ AC_DEFINE_UNQUOTED(PIDFILE, "$PIDDIR/atd AC_MSG_RESULT($PIDDIR) AC_MSG_CHECKING(location of spool directory) @@ -163,5 +148,3 @@ sp=/var/spool AC_MSG_RESULT(Using existing /var/spool/at{jobs|run}) elif test -d /var/spool/cron ; then - sp=/var/spool/cron - AC_MSG_RESULT(/var/spool/cron) ++++++ at-3.1.8-denylist.patch ++++++ --- /var/tmp/diff_new_pack.lPh9Jc/_old 2020-10-08 13:09:56.283050419 +0200 +++ /var/tmp/diff_new_pack.lPh9Jc/_new 2020-10-08 13:09:56.287050423 +0200 @@ -1,5 +1,11 @@ ---- at.deny.orig -+++ at.deny +--- + at.deny | 24 ++++++------------------ + 1 file changed, 6 insertions(+), 18 deletions(-) + +Index: at-3.2.0/at.deny +=================================================================== +--- at-3.2.0.orig/at.deny ++++ at-3.2.0/at.deny @@ -1,24 +1,12 @@ -alias -backup ++++++ at-3.1.8-jobdir-mtime.patch ++++++ --- /var/tmp/diff_new_pack.lPh9Jc/_old 2020-10-08 13:09:56.295050430 +0200 +++ /var/tmp/diff_new_pack.lPh9Jc/_new 2020-10-08 13:09:56.295050430 +0200 @@ -5,11 +5,15 @@ the Free Software Foundation; either version 2 of the License, or (at your option) any later version. -Index: atd.c +--- + atd.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: at-3.2.0/atd.c =================================================================== ---- atd.c.orig -+++ atd.c -@@ -792,7 +792,7 @@ run_loop() +--- at-3.2.0.orig/atd.c ++++ at-3.2.0/atd.c +@@ -644,7 +644,7 @@ run_loop() if (stat(".", &buf) == -1) perr("Cannot stat " ATJOB_DIR); ++++++ at-atq-timeformat.patch ++++++ --- /var/tmp/diff_new_pack.lPh9Jc/_old 2020-10-08 13:09:56.307050441 +0200 +++ /var/tmp/diff_new_pack.lPh9Jc/_new 2020-10-08 13:09:56.307050441 +0200 @@ -1,23 +1,46 @@ -Index: at.c +--- + at.1.in | 5 +++++ + at.c | 11 ++++++++--- + panic.c | 2 +- + 3 files changed, 14 insertions(+), 4 deletions(-) + +Index: at-3.2.0/at.1.in =================================================================== ---- at.c.orig -+++ at.c -@@ -132,9 +132,10 @@ int fcreated; - char *namep; - char atfile[] = ATJOB_DIR "/12345678901234"; - --char *atinput = (char *) 0; /* where to get input from */ --char atqueue = 0; /* which queue to examine for jobs (atq) */ --char atverify = 0; /* verify time instead of queuing job */ -+char *atinput = (char *) 0; /* where to get input from */ -+char atqueue = 0; /* which queue to examine for jobs (atq) */ -+char atverify = 0; /* verify time instead of queuing job */ +--- at-3.2.0.orig/at.1.in ++++ at-3.2.0/at.1.in +@@ -33,6 +33,8 @@ at, batch, atq, atrm \- queue, examine, + .RB [ \-V ] + .RB [ \-q + .IR queue ] ++.RB [ -o ++.IR timeformat ] + .br + .B at + .RB [ \-rd ] +@@ -269,6 +271,9 @@ Times displayed will be in the format "T + .B + \-c + cats the jobs listed on the command line to standard output. ++.TP 8 ++.BI \-o " fmt" ++strftime-like time format used for the job list + .SH FILES + .I @ATJBD@ + .br +Index: at-3.2.0/at.c +=================================================================== +--- at-3.2.0.orig/at.c ++++ at-3.2.0/at.c +@@ -136,6 +136,7 @@ char *atinput = (char *) 0; /* where to + char atqueue = 0; /* which queue to examine for jobs (atq) */ + char atverify = 0; /* verify time instead of queuing job */ + char *mail_rcpt = (char *) 0; /* user to send mail to */ +char *timeformat = TIMEFORMAT_POSIX; /* time format (atq) */ /* Function declarations */ -@@ -513,7 +514,7 @@ writefile(time_t runtimer, char queue) - +@@ -534,7 +535,7 @@ writefile(time_t runtimer, char queue) + /* This line maybe superfluous after commit 11cb731bb560eb7bff4889c5528d5f776606b0d3 */ runtime = localtime(&runtimer); - strftime(timestr, TIMESIZE, TIMEFORMAT_POSIX, runtime); @@ -25,7 +48,7 @@ fprintf(stderr, "job %ld at %s\n", jobno, timestr); /* Signal atd, if present. Usual precautions taken... */ -@@ -627,7 +628,7 @@ list_jobs(long *joblist, int len) +@@ -648,7 +649,7 @@ list_jobs(long *joblist, int len) runtimer = 60 * (time_t) ctm; runtime = localtime(&runtimer); @@ -34,7 +57,7 @@ if ((pwd = getpwuid(buf.st_uid))) printf("%ld\t%s %c %s\n", jobno, timestr, queue, pwd->pw_name); -@@ -824,7 +825,7 @@ main(int argc, char **argv) +@@ -845,7 +846,7 @@ main(int argc, char **argv) */ if (strcmp(pgm, "atq") == 0) { program = ATQ; @@ -43,8 +66,8 @@ } else if (strcmp(pgm, "atrm") == 0) { program = ATRM; options = "hV"; -@@ -908,6 +909,10 @@ main(int argc, char **argv) - timer -= timer % 60; +@@ -931,6 +932,10 @@ main(int argc, char **argv) + } break; + case 'o': @@ -54,35 +77,12 @@ default: usage(); break; -Index: at.1.in -=================================================================== ---- at.1.in.orig -+++ at.1.in -@@ -29,6 +29,8 @@ at, batch, atq, atrm \- queue, examine, - .RB [ \-V ] - .RB [ \-q - .IR queue ] -+.RB [ -o -+.IR timeformat ] - .br - .B at - .RB [ \-rd ] -@@ -260,6 +262,9 @@ Times displayed will be in the format "T - .B - \-c - cats the jobs listed on the command line to standard output. -+.TP 8 -+.BI \-o " fmt" -+strftime-like time format used for the job list - .SH FILES - .I @ATJBD@ - .br -Index: panic.c +Index: at-3.2.0/panic.c =================================================================== ---- panic.c.orig -+++ panic.c +--- at-3.2.0.orig/panic.c ++++ at-3.2.0/panic.c @@ -96,7 +96,7 @@ usage(void) - " at [-V] [-q x] [-f file] [-mMlbv] -t time\n" + " at [-V] [-q x] [-f file] [-u username] [-mMlbv] -t time\n" " at -c job ...\n" " at [-V] -l [job ...]\n" - " atq [-V] [-q x]\n" ++++++ at-backport-old-privs.patch ++++++ --- /var/tmp/diff_new_pack.lPh9Jc/_old 2020-10-08 13:09:56.315050448 +0200 +++ /var/tmp/diff_new_pack.lPh9Jc/_new 2020-10-08 13:09:56.315050448 +0200 @@ -8,14 +8,14 @@ References: https://bugzilla.novell.com/show_bug.cgi?id=849720 --- - at.c | 12 ++++-------- - 1 file changed, 4 insertions(+), 8 deletions(-) + at.c | 31 ++++++++++--------------------- + 1 file changed, 10 insertions(+), 21 deletions(-) -Index: at-3.1.13/at.c +Index: at-3.2.0/at.c =================================================================== ---- at-3.1.13.orig/at.c -+++ at-3.1.13/at.c -@@ -154,18 +154,11 @@ sigc(int signo) +--- at-3.2.0.orig/at.c ++++ at-3.2.0/at.c +@@ -155,18 +155,11 @@ sigc(int signo) /* If the user presses ^C, remove the spool file and exit */ if (fcreated) { @@ -35,7 +35,7 @@ } exit(EXIT_FAILURE); } -@@ -325,18 +318,14 @@ writefile(time_t runtimer, char queue) +@@ -326,18 +319,14 @@ writefile(time_t runtimer, char queue) * bit. Yes, this is a kluge. */ cmask = umask(S_IRUSR | S_IWUSR | S_IXUSR); @@ -54,7 +54,7 @@ PRIV_END -@@ -679,11 +668,7 @@ process_jobs(int argc, char **argv, int +@@ -719,11 +708,7 @@ process_jobs(int argc, char **argv, int switch (what) { case ATRM: @@ -67,7 +67,7 @@ if (queue == '=') { fprintf(stderr, "Warning: deleting running job\n"); -@@ -693,7 +678,7 @@ process_jobs(int argc, char **argv, int +@@ -733,7 +718,7 @@ process_jobs(int argc, char **argv, int rc = EXIT_FAILURE; } @@ -76,7 +76,7 @@ done = 1; break; -@@ -703,21 +688,25 @@ process_jobs(int argc, char **argv, int +@@ -743,21 +728,25 @@ process_jobs(int argc, char **argv, int FILE *fp; int ch; ++++++ at-piddir.patch ++++++ --- /var/tmp/diff_new_pack.lPh9Jc/_old 2020-10-08 13:09:56.323050455 +0200 +++ /var/tmp/diff_new_pack.lPh9Jc/_new 2020-10-08 13:09:56.327050459 +0200 @@ -1,6 +1,12 @@ ---- configure.ac.orig -+++ configure.ac -@@ -136,6 +136,7 @@ elif test -d /usr/run ; then +--- + configure.ac | 1 + + 1 file changed, 1 insertion(+) + +Index: at-3.2.0/configure.ac +=================================================================== +--- at-3.2.0.orig/configure.ac ++++ at-3.2.0/configure.ac +@@ -130,6 +130,7 @@ elif test -d /usr/run ; then else PIDDIR="$ETCDIR" fi ++++++ at-secure_getenv.patch ++++++ --- /var/tmp/diff_new_pack.lPh9Jc/_old 2020-10-08 13:09:56.335050466 +0200 +++ /var/tmp/diff_new_pack.lPh9Jc/_new 2020-10-08 13:09:56.335050466 +0200 @@ -1,5 +1,40 @@ ---- at-3.1.13.orig/configure.ac -+++ at-3.1.13/configure.ac +--- + at.c | 10 +++++++++- + configure.ac | 6 ++++-- + 2 files changed, 13 insertions(+), 3 deletions(-) + +Index: at-3.2.0/at.c +=================================================================== +--- at-3.2.0.orig/at.c ++++ at-3.2.0/at.c +@@ -97,6 +97,14 @@ + #define DEFAULT_QUEUE 'a' + #define BATCH_QUEUE 'b' + ++#ifndef HAVE_SECURE_GETENV ++# ifdef HAVE___SECURE_GETENV ++# define secure_getenv __secure_getenv ++# else ++# error neither secure_getenv nor __secure_getenv is available ++# endif ++#endif ++ + enum { + ATQ, BATCH, ATRM, AT, CAT + }; /* what program we want to run */ +@@ -372,7 +380,7 @@ writefile(time_t runtimer, char queue) + */ + mailname = getlogin(); + if (mailname == NULL) +- mailname = getenv("LOGNAME"); ++ mailname = secure_getenv("LOGNAME"); + if (mailname == NULL || mailname[0] == '\0' || getpwnam(mailname) == NULL) { + pass_entry = getpwuid(real_uid); + if (pass_entry != NULL) +Index: at-3.2.0/configure.ac +=================================================================== +--- at-3.2.0.orig/configure.ac ++++ at-3.2.0/configure.ac @@ -17,8 +17,9 @@ AC_SUBST(VERSION) AC_CANONICAL_HOST @@ -12,7 +47,7 @@ AC_PROG_INSTALL AC_PROG_LN_S AC_PROG_YACC -@@ -58,6 +59,7 @@ AC_CHECK_LIB(fl,yywrap, +@@ -56,6 +57,7 @@ AC_CHECK_LIB(fl,yywrap, PKG_CHECK_MODULES([HX], [libHX]) @@ -20,29 +55,3 @@ dnl Checks for header files. AC_HEADER_DIRENT AC_HEADER_STDC ---- at-3.1.13.orig/at.c -+++ at-3.1.13/at.c -@@ -97,6 +97,14 @@ - #define DEFAULT_QUEUE 'a' - #define BATCH_QUEUE 'b' - -+#ifndef HAVE_SECURE_GETENV -+# ifdef HAVE___SECURE_GETENV -+# define secure_getenv __secure_getenv -+# else -+# error neither secure_getenv nor __secure_getenv is available -+# endif -+#endif -+ - enum { - ATQ, BATCH, ATRM, AT, CAT - }; /* what program we want to run */ -@@ -359,7 +367,7 @@ writefile(time_t runtimer, char queue) - */ - mailname = getlogin(); - if (mailname == NULL) -- mailname = getenv("LOGNAME"); -+ mailname = secure_getenv("LOGNAME"); - if (mailname == NULL || mailname[0] == '\0' || getpwnam(mailname) == NULL) { - pass_entry = getpwuid(real_uid); - if (pass_entry != NULL) ++++++ at_3.1.23.orig.tar.gz -> at_3.2.1.orig.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/at-3.1.23/ChangeLog new/at-3.2.1/ChangeLog --- old/at-3.1.23/ChangeLog 2018-07-24 14:41:23.000000000 +0200 +++ new/at-3.2.1/ChangeLog 2019-08-04 14:16:16.000000000 +0200 @@ -199,3 +199,20 @@ at 3.1.23 (2018-07-24): Jose M Calhariz Finalised script to release software. + +at 3.2.0 (2019-07-24): + Jose M Calhariz + Print time of new job before the input of the commands, Closes #863045 + Do not drop seconds on -t option, Closes #792040 + Start using nice levels from 0 instead of 2. Closes #519716 + Correctly handle DST when specifying a UTC time. Closes #364975 + Gerhard Poul: + Add flag to send email to other user. MR 5 + +at 3.2.1~WIP+1 + Jose M Calhariz + Include config.h on parsetime.l, see + 88a3bed41de234220f007c785e3aa45bd62446c6 for more info and + original author. + Check if libc provides __isleap() macro, see + 02a0a98d94b24284177dad7747edbdc3088d63cd diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/at-3.1.23/at.1.in new/at-3.2.1/at.1.in --- old/at-3.1.23/at.1.in 2018-07-24 14:41:23.000000000 +0200 +++ new/at-3.2.1/at.1.in 2019-08-04 14:16:16.000000000 +0200 @@ -8,6 +8,8 @@ .IR queue ] .RB [ \-f .IR file ] +.RB [ \-u +.IR username ] .RB [ \-mMlv ] .IR timespec " ...\&" .br @@ -17,6 +19,8 @@ .IR queue ] .RB [ \-f .IR file ] +.RB [ \-u +.IR username ] .RB [ \-mMkv ] .RB [ \-t .IR time ] @@ -226,6 +230,11 @@ .B \-M Never send mail to the user. .TP 8 +.BI \-u " username" +Sends mail to +.I username +rather than the current user. +.TP 8 .BI \-f " file" Reads the job from .I file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/at-3.1.23/at.c new/at-3.2.1/at.c --- old/at-3.1.23/at.c 2018-07-24 14:41:23.000000000 +0200 +++ new/at-3.2.1/at.c 2019-08-04 14:16:16.000000000 +0200 @@ -127,6 +127,7 @@ char *atinput = (char *) 0; /* where to get input from */ char atqueue = 0; /* which queue to examine for jobs (atq) */ char atverify = 0; /* verify time instead of queuing job */ +char *mail_rcpt = (char *) 0; /* user to send mail to */ /* Function declarations */ @@ -352,22 +353,36 @@ if ((fp = fdopen(fd, "w")) == NULL) panic("Cannot reopen atjob file"); - /* Get the userid to mail to, first by trying getlogin(), which reads - * /var/run/utmp, then from LOGNAME, finally from getpwuid(). - */ - mailname = getlogin(); - if (mailname == NULL) - mailname = getenv("LOGNAME"); - if (mailname == NULL || mailname[0] == '\0' || getpwnam(mailname) == NULL) { - pass_entry = getpwuid(real_uid); - if (pass_entry != NULL) - mailname = pass_entry->pw_name; + if (mail_rcpt != NULL) + /* If the userid to mail to has been set on the command-line, then + * validate the user and continue + */ + if (getpwnam(mail_rcpt) != NULL) + mailname = mail_rcpt; + else { + char msg[80]; + snprintf(msg, sizeof(msg), "Cannot find username %s", mail_rcpt); + panic(msg); + } + else { + /* Get the userid to mail to, first by trying getlogin(), which reads + * /var/run/utmp, then from LOGNAME, finally from getpwuid(). + */ + mailname = getlogin(); + if (mailname == NULL) + mailname = getenv("LOGNAME"); + if (mailname == NULL || mailname[0] == '\0' || getpwnam(mailname) == NULL) { + pass_entry = getpwuid(real_uid); + if (pass_entry != NULL) + mailname = pass_entry->pw_name; + } } if ((mailname == NULL) || (mailname[0] == '\0') || (strlen(mailname) > mailsize) ) { panic("Cannot find username to mail output to"); } + if (atinput != (char *) NULL) { fpin = freopen(atinput, "r", stdin); if (fpin == NULL) @@ -479,6 +494,11 @@ istty = isatty(fileno(stdin)); if (istty) { + runtime = localtime(&runtimer); + + strftime(timestr, TIMESIZE, TIMEFORMAT_POSIX, runtime); + fprintf(stderr, "at %s\n", timestr); + fprintf(stderr, "at> "); fflush(stderr); } @@ -512,6 +532,7 @@ close(fd2); + /* This line maybe superfluous after commit 11cb731bb560eb7bff4889c5528d5f776606b0d3 */ runtime = localtime(&runtimer); strftime(timestr, TIMESIZE, TIMEFORMAT_POSIX, runtime); @@ -749,7 +770,7 @@ char *pgm; int program = AT; /* our default program */ - char *options = "q:f:MmbvlrdhVct:"; /* default options for at */ + char *options = "q:f:Mmu:bvlrdhVct:"; /* default options for at */ int disp_version = 0; time_t timer = 0; struct passwd *pwe; @@ -806,6 +827,10 @@ send_mail = -1; break; + case 'u': /* send mail to specific user */ + mail_rcpt = optarg; + break; + case 'f': atinput = optarg; break; @@ -860,8 +885,6 @@ fprintf(stderr, "invalid date format: %s\n", optarg); exit(EXIT_FAILURE); } - /* drop seconds */ - timer -= timer % 60; break; default: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/at-3.1.23/atd.c new/at-3.2.1/atd.c --- old/at-3.1.23/atd.c 2018-07-24 14:41:23.000000000 +0200 +++ new/at-3.2.1/atd.c 2019-08-04 14:16:16.000000000 +0200 @@ -494,7 +494,7 @@ PRIV_START - nice((tolower((int) queue) - 'a' + 1) * 2); + nice((tolower((int) queue) - 'a') * 2); #ifdef WITH_SELINUX if (selinux_enabled > 0) { @@ -674,10 +674,10 @@ /* 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. *\/ */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/at-3.1.23/config.h.in new/at-3.2.1/config.h.in --- old/at-3.1.23/config.h.in 2018-07-24 14:41:23.000000000 +0200 +++ new/at-3.2.1/config.h.in 2019-08-04 14:16:16.000000000 +0200 @@ -44,6 +44,9 @@ /* Define to 1 if you have the <inttypes.h> header file. */ #undef HAVE_INTTYPES_H +/* Define to 1 if libc provides __isleap macro */ +#undef HAVE_ISLEAP + /* Define to 1 if you have the `dgc' library (-ldgc). */ #undef HAVE_LIBDGC diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/at-3.1.23/configure new/at-3.2.1/configure --- old/at-3.1.23/configure 2018-07-24 14:41:23.000000000 +0200 +++ new/at-3.2.1/configure 2019-08-04 14:16:16.000000000 +0200 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for at 3.1.23. +# Generated by GNU Autoconf 2.69 for at 3.2.1. # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. @@ -577,8 +577,8 @@ # Identity of this package. PACKAGE_NAME='at' PACKAGE_TARNAME='at' -PACKAGE_VERSION='3.1.23' -PACKAGE_STRING='at 3.1.23' +PACKAGE_VERSION='3.2.1' +PACKAGE_STRING='at 3.2.1' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1277,7 +1277,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures at 3.1.23 to adapt to many kinds of systems. +\`configure' configures at 3.2.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1343,7 +1343,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of at 3.1.23:";; + short | recursive ) echo "Configuration of at 3.2.1:";; esac cat <<\_ACEOF @@ -1441,7 +1441,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -at configure 3.1.23 +at configure 3.2.1 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1917,7 +1917,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by at $as_me 3.1.23, which was +It was created by at $as_me 3.2.1, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2272,7 +2272,7 @@ -VERSION=3.1.23 +VERSION=3.2.1 if test "X$CFLAGS" = "X"; then CFLAGS="-O2 -g -Wall" fi @@ -4419,6 +4419,23 @@ fi +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include <time.h> +#ifndef __isleap +# error __isleap macro not defined +#endif + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + +$as_echo "#define HAVE_ISLEAP 1" >>confdefs.h + + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext for ac_func in vprintf do : @@ -5827,7 +5844,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by at $as_me 3.1.23, which was +This file was extended by at $as_me 3.2.1, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -5889,7 +5906,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -at config.status 3.1.23 +at config.status 3.2.1 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/at-3.1.23/configure.ac new/at-3.2.1/configure.ac --- old/at-3.1.23/configure.ac 2018-07-24 14:41:23.000000000 +0200 +++ new/at-3.2.1/configure.ac 2019-08-04 14:16:16.000000000 +0200 @@ -1,11 +1,11 @@ dnl Process this file with autoconf to produce a configure script. -AC_INIT(at, 3.1.23) +AC_INIT([at],[3.2.1]) AC_CONFIG_SRCDIR(at.c) AC_PREFIX_DEFAULT(/usr) AC_CONFIG_HEADER(config.h) -AC_PREREQ([2.64]) +AC_PREREQ([2.69]) VERSION=AC_PACKAGE_VERSION if test "X$CFLAGS" = "X"; then @@ -40,12 +40,10 @@ esac AC_MSG_CHECKING(__attribute__((noreturn))) -AC_TRY_COMPILE([], [void __attribute__((noreturn)) panic(void);], - AC_MSG_RESULT(yes) +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[void __attribute__((noreturn)) panic(void);]])],[AC_MSG_RESULT(yes) AC_DEFINE(HAVE_ATTRIBUTE_NORETURN, 1, - [Define to 1 if compiler supports __attribute__((noreturn))]), - AC_MSG_RESULT(no) -) + Define to 1 if compiler supports __attribute__((noreturn)))],[AC_MSG_RESULT(no) +]) dnl Checks for libraries. AC_CHECK_LIB(fl,yywrap, @@ -63,7 +61,18 @@ dnl Checks for typedefs, structures, and compiler characteristics. AC_C_CONST -AC_TYPE_SIGNAL +AC_DIAGNOSE([obsolete],[your code may safely assume C89 semantics that RETSIGTYPE is void. +Remove this warning and the `AC_CACHE_CHECK' when you adjust the code.])dnl +AC_CACHE_CHECK([return type of signal handlers],[ac_cv_type_signal],[AC_COMPILE_IFELSE( +[AC_LANG_PROGRAM([#include <sys/types.h> +#include <signal.h> +], + [return *(signal (0, 0)) (0) == 1;])], + [ac_cv_type_signal=int], + [ac_cv_type_signal=void])]) +AC_DEFINE_UNQUOTED([RETSIGTYPE],[$ac_cv_type_signal],[Define as the return type of signal handlers + (`int' or `void').]) + AC_TYPE_UID_T AC_TYPE_MODE_T AC_TYPE_OFF_T @@ -71,6 +80,15 @@ AC_TYPE_SIZE_T AC_STRUCT_TM +dnl Checks for macros. +AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ +#include <time.h> +#ifndef __isleap +# error __isleap macro not defined +#endif +]])], [ + AC_DEFINE(HAVE_ISLEAP, 1, [Define to 1 if libc provides __isleap macro]) +], []) dnl Checks for library functions. AC_FUNC_VPRINTF diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/at-3.1.23/draft new/at-3.2.1/draft --- old/at-3.1.23/draft 1970-01-01 01:00:00.000000000 +0100 +++ new/at-3.2.1/draft 2019-08-04 14:16:16.000000000 +0200 @@ -0,0 +1,13 @@ +#!/bin/bash + +set -e + +VERSION=$(grep AC_INIT configure.ac | cut -f 2 -d , | tr -d ")" | tr -d " ") +echo "Going to draft version: $VERSION" +echo "Press enter to continue:" +read enter +autoconf + +git archive --format=tar --prefix=at-$VERSION/ --output=../at_$VERSION.orig.tar HEAD +gzip -v9 ../at_$VERSION.orig.tar + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/at-3.1.23/panic.c new/at-3.2.1/panic.c --- old/at-3.1.23/panic.c 2018-07-24 14:41:23.000000000 +0200 +++ new/at-3.2.1/panic.c 2019-08-04 14:16:16.000000000 +0200 @@ -92,8 +92,8 @@ { /* Print usage and exit. */ - fprintf(stderr, "Usage: at [-V] [-q x] [-f file] [-mMlbv] timespec ...\n" - " at [-V] [-q x] [-f file] [-mMlbv] -t time\n" + fprintf(stderr, "Usage: at [-V] [-q x] [-f file] [-u username] [-mMlbv] timespec ...\n" + " at [-V] [-q x] [-f file] [-u username] [-mMlbv] -t time\n" " at -c job ...\n" " atq [-V] [-q x]\n" " at [ -rd ] job ...\n" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/at-3.1.23/parsetime.l new/at-3.2.1/parsetime.l --- old/at-3.1.23/parsetime.l 2018-07-24 14:41:23.000000000 +0200 +++ new/at-3.2.1/parsetime.l 2019-08-04 14:16:16.000000000 +0200 @@ -4,6 +4,7 @@ #include <time.h> #include "y.tab.h" #include "parsetime.h" +#include "config.h" char *last_token = NULL; char **my_argv; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/at-3.1.23/parsetime.y new/at-3.2.1/parsetime.y --- old/at-3.1.23/parsetime.y 2018-07-24 14:41:23.000000000 +0200 +++ new/at-3.2.1/parsetime.y 2019-08-04 14:16:16.000000000 +0200 @@ -3,13 +3,20 @@ #include <stdlib.h> #include <string.h> #include <stdio.h> +#include "panic.h" #include "parsetime.h" #include "panic.h" #define YYDEBUG 1 +#ifndef HAVE_ISLEAP +#define __isleap(y) \ + ((y) % 4 == 0 && ((y) % 100 != 0 || (y) % 400 == 0)) +#endif + struct tm exectm; static int isgmt; +static char *tz = NULL; static int yearspec; static int time_only; @@ -170,6 +177,12 @@ timezone_name : UTC { isgmt = 1; + if (getenv("TZ")) { + tz = (char *) malloc(strlen(getenv("TZ")) + 1); + strcpy(tz, getenv("TZ")); + } + if (setenv("TZ", "UTC0", 1) == -1) + panic("Virtual memory exhausted"); } ; @@ -502,9 +515,13 @@ if (exectime == (time_t)-1) return 0; if (isgmt) { - exectime -= timezone; - if (currtm.tm_isdst && !exectm.tm_isdst) - exectime -= 3600; + if (tz) { + if (setenv("TZ", tz, 1) == -1) + panic("Virtual memory exhausted"); + free(tz); + } + else + unsetenv("TZ"); } if (exectime < currtime) panic("refusing to create job destined in the past"); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/at-3.1.23/release new/at-3.2.1/release --- old/at-3.1.23/release 2018-07-24 14:41:23.000000000 +0200 +++ new/at-3.2.1/release 2019-08-04 14:16:16.000000000 +0200 @@ -2,7 +2,7 @@ set -e -VERSION=$(grep AC_INIT configure.ac | cut -f 2 -d , | tr -d ")" | tr -d " ") +VERSION=$(grep AC_INIT configure.ac | cut -f 2 -d , | tr -d ")" | tr -d " []") echo "Going to release version: $VERSION" echo "Press enter to continue:" read enter
