all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
blob ee3510a1d093a28c95763e1e7f2f062aed0848a9 974 bytes (raw)
name: gnu/packages/patches/docbook-utils-helpers-support.patch 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
 
Author: Reiner Herrmann <reiner@reiner-h.de>
Description: Support SOURCE_DATE_EPOCH for timestamps
 To allow generating documents in a reproducible way,
 allow overriding the timestamp through the environment.
 .
 See also: https://reproducible-builds.org/specs/source-date-epoch/
Bug-Debian: https://bugs.debian.org/800797

--- a/helpers/docbook2man-spec.pl
+++ b/helpers/docbook2man-spec.pl
@@ -57,6 +57,7 @@
 use SGMLS;			# Use the SGMLS package.
 use SGMLS::Output;		# Use stack-based output.
 use SGMLS::Refs;
+use POSIX qw(strftime setlocale LC_TIME);
 
 ########################################################################
 # SGMLSPL script produced automatically by the script sgmlspl.pl
@@ -279,6 +280,10 @@
 _END_BANNER
 
 	my $date = `date "+%d %B %Y"`;
+	if ($ENV{SOURCE_DATE_EPOCH}) {
+		setlocale(LC_TIME, "C");
+		$date = strftime("%d %B %Y", gmtime($ENV{SOURCE_DATE_EPOCH} || time));
+	}
 	my $manpage_date = $manpage_date || $date ;
 
 	output '.TH "';

debug log:

solving ee3510a1d0 ...
found ee3510a1d0 in https://yhetil.org/guix/6c92eb83-361b-7eb3-fd63-8b582b9b41db@disroot.org/

applying [1/1] https://yhetil.org/guix/6c92eb83-361b-7eb3-fd63-8b582b9b41db@disroot.org/
diff --git a/gnu/packages/patches/docbook-utils-helpers-support.patch b/gnu/packages/patches/docbook-utils-helpers-support.patch
new file mode 100644
index 0000000000..ee3510a1d0

1:22: trailing whitespace.
 
1:27: trailing whitespace.
 
1:28: space before tab in indent.
 	my $date = `date "+%d %B %Y"`;
1:33: space before tab in indent.
 	my $manpage_date = $manpage_date || $date ;
1:34: trailing whitespace.
 
Checking patch gnu/packages/patches/docbook-utils-helpers-support.patch...
Applied patch gnu/packages/patches/docbook-utils-helpers-support.patch cleanly.
warning: squelched 1 whitespace error
warning: 6 lines add whitespace errors.

index at:
100644 ee3510a1d093a28c95763e1e7f2f062aed0848a9	gnu/packages/patches/docbook-utils-helpers-support.patch

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.