File: 97_makehtml.patch

package info (click to toggle)
xymon 4.3.30-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 11,384 kB
  • sloc: ansic: 69,137; sh: 3,601; makefile: 863; javascript: 452; perl: 48
file content (27 lines) | stat: -rw-r--r-- 975 bytes parent folder | download
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
From: Roland Rosenfeld <roland@debian.org>
Date: Sun, 11 Feb 2024 16:46:35 +0100
Forwarded: https://lists.xymon.com/archive/2024-February/048293.html
	   https://github.com/xymon-monitoring/xymon/pull/9
Subject: Make the date header of html man pages reproducible
 Additionally set the hostname to localhost as upstream seems to do, too.

--- a/build/makehtml.sh
+++ b/build/makehtml.sh
@@ -1,7 +1,7 @@
 #!/bin/bash
 
 export LANG=C
-DATE=`date +"%e %b %Y"`
+DATE=`date +"%e %b %Y" --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}"`
 VERSION="$1"
 if [ "$VERSION" = "" ]
 then
@@ -23,7 +23,7 @@ do
 				NAME=`head -n 1 $FILE | awk '{print $2}'`;
 				SECTION=`head -n 1 $FILE | awk '{print $3}'`;
 				(echo ".TH $NAME $SECTION \"Version $VERSION: $DATE\" \"Xymon\""; tail -n +2 $FILE) | \
-				man2html -r - | tail -n +2 >docs/manpages/man$SECT/`basename $FILE`.html
+				man2html -H localhost -r - | tail -n +2 >docs/manpages/man$SECT/`basename $FILE`.html
 			fi
 		done
 	done