Accepting request 839548 from home:jengelh:branches:Base:System

- Update to release 3.2.1

OBS-URL: https://build.opensuse.org/request/show/839548
OBS-URL: https://build.opensuse.org/package/show/Base:System/at?expand=0&rev=114
This commit is contained in:
Ralf Lang 2020-10-05 12:16:26 +00:00 committed by Git OBS Bridge
parent e78c5af7cf
commit 957ad8d870
18 changed files with 279 additions and 256 deletions

View File

@ -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

View File

@ -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 @@ Index: at.c
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 @@ Index: at.c
}
else {
perr("Cannot open %.500s", dirent->d_name);
rc = EXIT_FAILURE;
}

View File

@ -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;

View File

@ -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 @@ Index: at-3.1.13/parsetime.y
if (exectime < currtime)
panic("refusing to create job destined in the past");
return exectime;
}
else {

View File

@ -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 @@ Index: at.c
/* 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 @@ Index: at.c
{
/* 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 @@ Index: at.c
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 @@ Index: at.c
/* 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 @@ Index: at.c
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 @@ Index: at.c
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"

View File

@ -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)

View File

@ -6,14 +6,14 @@ http://bugzilla.novell.com/780259
---
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 @@ Index: Makefile.in
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 @@ Index: Makefile.in
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 @@ Index: atd.c
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()])
)

View File

@ -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 @@ Index: Makefile.in
+ $(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 @@ Index: Makefile.in
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 @@ Index: Problems
- 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 @@ Index: 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
* 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 @@ Index: atd.c
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 @@ Index: atd.c
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 @@ Index: atd.c
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 @@ Index: configure.ac
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)

View File

@ -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

View File

@ -5,11 +5,15 @@ it under the terms of the GNU General Public License as published by
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);

View File

@ -1,64 +1,14 @@
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 */
+char *timeformat = TIMEFORMAT_POSIX; /* time format (atq) */
/* Function declarations */
@@ -513,7 +514,7 @@ writefile(time_t runtimer, char queue)
runtime = localtime(&runtimer);
- strftime(timestr, TIMESIZE, TIMEFORMAT_POSIX, runtime);
+ strftime(timestr, TIMESIZE, timeformat, runtime);
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)
runtimer = 60 * (time_t) ctm;
runtime = localtime(&runtimer);
- strftime(timestr, TIMESIZE, TIMEFORMAT_POSIX, runtime);
+ strftime(timestr, TIMESIZE, timeformat, runtime);
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)
*/
if (strcmp(pgm, "atq") == 0) {
program = ATQ;
- options = "hq:V";
+ options = "hq:Vo:";
} else if (strcmp(pgm, "atrm") == 0) {
program = ATRM;
options = "hV";
@@ -908,6 +909,10 @@ main(int argc, char **argv)
timer -= timer % 60;
break;
+ case 'o':
+ timeformat = optarg;
+ break;
+
default:
usage();
break;
Index: at.1.in
===================================================================
--- at.1.in.orig
+++ at.1.in
@@ -29,6 +29,8 @@ at, batch, atq, atrm \- queue, examine,
--- 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 ]
@ -67,7 +17,7 @@ Index: at.1.in
.br
.B at
.RB [ \-rd ]
@@ -260,6 +262,9 @@ Times displayed will be in the format "T
@@ -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.
@ -77,12 +27,62 @@ Index: at.1.in
.SH FILES
.I @ATJBD@
.br
Index: panic.c
Index: at-3.2.0/at.c
===================================================================
--- panic.c.orig
+++ panic.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 */
@@ -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);
+ strftime(timestr, TIMESIZE, timeformat, runtime);
fprintf(stderr, "job %ld at %s\n", jobno, timestr);
/* Signal atd, if present. Usual precautions taken... */
@@ -648,7 +649,7 @@ list_jobs(long *joblist, int len)
runtimer = 60 * (time_t) ctm;
runtime = localtime(&runtimer);
- strftime(timestr, TIMESIZE, TIMEFORMAT_POSIX, runtime);
+ strftime(timestr, TIMESIZE, timeformat, runtime);
if ((pwd = getpwuid(buf.st_uid)))
printf("%ld\t%s %c %s\n", jobno, timestr, queue, pwd->pw_name);
@@ -845,7 +846,7 @@ main(int argc, char **argv)
*/
if (strcmp(pgm, "atq") == 0) {
program = ATQ;
- options = "hq:V";
+ options = "hq:Vo:";
} else if (strcmp(pgm, "atrm") == 0) {
program = ATRM;
options = "hV";
@@ -931,6 +932,10 @@ main(int argc, char **argv)
}
break;
+ case 'o':
+ timeformat = optarg;
+ break;
+
default:
usage();
break;
Index: at-3.2.0/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"

View File

@ -8,14 +8,14 @@ back the PRIV_START/PRIV_END + fchown where needed.
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 @@ Index: at-3.1.13/at.c
}
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 @@ Index: at-3.1.13/at.c
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 @@ Index: at-3.1.13/at.c
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 @@ Index: at-3.1.13/at.c
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;

View File

@ -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

View File

@ -1,27 +1,12 @@
--- at-3.1.13.orig/configure.ac
+++ at-3.1.13/configure.ac
@@ -17,8 +17,9 @@ AC_SUBST(VERSION)
AC_CANONICAL_HOST
dnl Checks for programs.
-
-AC_PROG_CC
+AC_USE_SYSTEM_EXTENSIONS
+AC_PROG_CC_STDC
+AC_SYS_LARGEFILE
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_YACC
@@ -58,6 +59,7 @@ AC_CHECK_LIB(fl,yywrap,
PKG_CHECK_MODULES([HX], [libHX])
+AC_CHECK_FUNCS([__secure_getenv secure_getenv])
dnl Checks for header files.
AC_HEADER_DIRENT
AC_HEADER_STDC
--- at-3.1.13.orig/at.c
+++ at-3.1.13/at.c
---
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'
@ -37,12 +22,36 @@
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)
@@ -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
dnl Checks for programs.
-
-AC_PROG_CC
+AC_USE_SYSTEM_EXTENSIONS
+AC_PROG_CC_STDC
+AC_SYS_LARGEFILE
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_YACC
@@ -56,6 +57,7 @@ AC_CHECK_LIB(fl,yywrap,
PKG_CHECK_MODULES([HX], [libHX])
+AC_CHECK_FUNCS([__secure_getenv secure_getenv])
dnl Checks for header files.
AC_HEADER_DIRENT
AC_HEADER_STDC

View File

@ -1,3 +1,22 @@
-------------------------------------------------------------------
Fri Oct 2 21:20:32 UTC 2020 - Jan Engelhardt <jengelh@inai.de>
- 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.
-------------------------------------------------------------------
Wed Feb 19 10:54:34 UTC 2020 - Kristyna Streitova <kstreitova@suse.com>

43
at.spec
View File

@ -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: autoconf >= 2.69
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 @@ autoreconf -fvi
--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 %{SOURCE2} %{buildroot}%{_sysconfdir}/pam.d/atd
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 @@ install -m644 %{SOURCE3} %{buildroot}%{_fillupdir}
%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

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:97450aa954aaa8a70218cc8e61a33df9fee9f86527e9f861de302fb7a3c81710
size 126284

3
at_3.2.1.orig.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:aabe6e5cb6dd19fe9fb25c2747492f2db38762b95ea41b86f949609c39fb55c4
size 127577