diff --git a/at-atq-timeformat.patch b/at-atq-timeformat.patch new file mode 100644 index 0000000..c24dc43 --- /dev/null +++ b/at-atq-timeformat.patch @@ -0,0 +1,92 @@ +Index: at.c +=================================================================== +--- at.c.orig 2014-07-25 10:59:06.264608764 +0200 ++++ at.c 2014-07-25 11:00:04.036607665 +0200 +@@ -132,9 +132,10 @@ + 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 */ + +@@ -494,7 +495,7 @@ + + 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... */ +@@ -608,7 +609,7 @@ + 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); +@@ -805,7 +806,7 @@ + */ + if (strcmp(pgm, "atq") == 0) { + program = ATQ; +- options = "hq:V"; ++ options = "hq:Vo:"; + } else if (strcmp(pgm, "atrm") == 0) { + program = ATRM; + options = "hV"; +@@ -889,6 +890,10 @@ + timer -= timer % 60; + break; + ++ case 'o': ++ timeformat = optarg; ++ break; ++ + default: + usage(); + break; +Index: at.1.in +=================================================================== +--- at.1.in.orig 2014-07-25 10:59:06.204608765 +0200 ++++ at.1.in 2014-07-25 11:17:27.828587820 +0200 +@@ -29,6 +29,8 @@ + .RB [ -V ] + .RB [ -q + .IR queue ] ++.RB [ -o ++.IR timeformat ] + .br + .B at + .RB [ -rd ] +@@ -254,6 +256,9 @@ + .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 +=================================================================== +--- panic.c.orig 2014-07-25 10:59:06.168608765 +0200 ++++ panic.c 2014-07-25 11:06:20.232600513 +0200 +@@ -96,7 +96,7 @@ + " at [-V] [-q x] [-f file] [-mMlbv] -t time\n" + " at -c job ...\n" + " at [-V] -l [job ...]\n" +- " atq [-V] [-q x]\n" ++ " atq [-V] [-q x] [-o timeformat]\n" + " at [ -rd ] job ...\n" + " atrm [-V] job ...\n" + " batch\n"); diff --git a/at.changes b/at.changes index 1481882..a46672d 100644 --- a/at.changes +++ b/at.changes @@ -10,6 +10,12 @@ Mon Jul 28 03:32:36 UTC 2014 - crrodriguez@opensuse.org - Restore needed call to fillup_only that went lost in the previous change. +------------------------------------------------------------------- +Fri Jul 25 09:20:31 UTC 2014 - pgajdos@suse.com + +- introduced -o switch for atq [bnc#879402] + * added at-atq-timeformat.patch + ------------------------------------------------------------------- Mon Jun 16 14:27:26 UTC 2014 - vdziewiecki@suse.com diff --git a/at.spec b/at.spec index 8cefe5c..b2a01e2 100644 --- a/at.spec +++ b/at.spec @@ -58,6 +58,8 @@ Patch22: at-piddir.patch Patch23: at-secure_getenv.patch #PATCH-FIX-OPENSUSE backport privs from 3.1.8 (bnc#849720) Patch24: at-backport-old-privs.patch +#PATCH-FEATURE-UPSTREAM introduce -o argument for atq (bnc#879402) +Patch25: at-atq-timeformat.patch BuildRequires: autoconf >= 2.69 BuildRequires: automake @@ -102,6 +104,7 @@ This program allows you to run jobs at specified times. %patch22 %patch23 -p1 %patch24 -p1 +%patch25 %build rm -fv y.tab.c y.tab.h lex.yy.c lex.yy.o y.tab.o