rpms/at/devel nonposix.patch,NONE,1.1 at.spec,1.64,1.65

Marcela Mašláňová (mmaslano) fedora-extras-commits at redhat.com
Tue Mar 25 14:01:17 UTC 2008


Author: mmaslano

Update of /cvs/pkgs/rpms/at/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv28846

Modified Files:
	at.spec 
Added Files:
	nonposix.patch 
Log Message:
Use ISO format instead of posix.


nonposix.patch:

--- NEW FILE nonposix.patch ---
diff -up at-3.1.10/at.c.nonposix at-3.1.10/at.c
--- at-3.1.10/at.c.nonposix	2008-03-25 14:54:09.000000000 +0100
+++ at-3.1.10/at.c	2008-03-25 14:57:46.000000000 +0100
@@ -92,6 +92,7 @@
 #define SIZE 255
 
 #define TIMEFORMAT_POSIX	"%a %b %e %T %Y"
+#define TIMEFORMAT_ISO		"%Y-%m-%d %H:%M"
 #define TIMESIZE	50
 
 enum {
@@ -490,7 +491,15 @@ writefile(time_t runtimer, char queue)
 
     runtime = localtime(&runtimer);
 
-    strftime(timestr, TIMESIZE, TIMEFORMAT_POSIX, runtime);
+    /* We only use the sick POSIX time format if POSIXLY_CORRECT
+       is set.  Otherwise, we use ISO format.
+     */
+
+    if (getenv("POSIXLY_CORRECT") != NULL) {
+	strftime(timestr, TIMESIZE, TIMEFORMAT_POSIX, runtime);
+    } else {
+	strftime(timestr, TIMESIZE, TIMEFORMAT_ISO, runtime);
+    }
     fprintf(stderr, "job %ld at %s\n", jobno, timestr);
 
     /* Signal atd, if present. Usual precautions taken... */
@@ -588,8 +597,11 @@ list_jobs(void)
 	runtimer = 60 * (time_t) ctm;
 	runtime = localtime(&runtimer);
 
-	strftime(timestr, TIMESIZE, TIMEFORMAT_POSIX, runtime);
-
+	if (getenv("POSIXLY_CORRECT") != NULL) {
+	    strftime(timestr, TIMESIZE, TIMEFORMAT_POSIX, runtime);
+	} else {
+	    strftime(timestr, TIMESIZE, TIMEFORMAT_ISO, runtime);
+	}
 	if ((pwd = getpwuid(buf.st_uid)))
 	  printf("%ld\t%s %c %s\n", jobno, timestr, queue, pwd->pw_name);
 	else


Index: at.spec
===================================================================
RCS file: /cvs/pkgs/rpms/at/devel/at.spec,v
retrieving revision 1.64
retrieving revision 1.65
diff -u -r1.64 -r1.65
--- at.spec	28 Feb 2008 09:34:57 -0000	1.64
+++ at.spec	25 Mar 2008 14:00:46 -0000	1.65
@@ -6,7 +6,7 @@
 Summary: Job spooling tools
 Name: at
 Version: 3.1.10
-Release: 22%{?dist}
+Release: 23%{?dist}
 License: GPLv2+
 Group: System Environment/Daemons
 URL: http://ftp.debian.org/debian/pool/main/a/at
@@ -32,6 +32,7 @@
 Patch15: at-3.1.10-PIE.patch
 Patch16: at-3.1.10-pamfix.patch
 Patch17: at-3.1.10-setuids.patch 
+Patch18: nonposix.patch
 
 BuildRequires: fileutils chkconfig /etc/init.d
 BuildRequires: flex bison autoconf
@@ -83,6 +84,7 @@
 %patch15 -p1 -b .PIE
 %patch16 -p1 -b .pamfix
 %patch17 -p1 -b .setuids
+%patch18 -p1 -b .nonposix
 
 %build
 # patch10 touches configure.in
@@ -185,6 +187,9 @@
 %attr(4755,root,root)	%{_bindir}/at
 
 %changelog
+* Tue Mar 25 2008 Marcela Maslanova <mmaslano at redhat.com> - 3.1.10-23
+- 436952 use local instead of posix output date/time format.
+
 * Thu Feb 28 2008 Marcela Maslanova <mmaslano at redhat.com> - 3.1.10-22
 - #435250 mixed OPTS and OPTIONS variable in sysconfig
 




More information about the fedora-extras-commits mailing list