Skip to content

Commit 6821036

Browse files
committed
Make the build reproducible
help2man was vendored as part of d5d5253 (Fix bugs reported by Dominique, 2000-10-06) because at the time, help2man did not have a --version-option argument and one needed to be patched in. However, as of help2man 1.29, released in July 2003, this option was added. Remove the vendored version of help2man and use the help2man on the system. It's been released for long enough that all users should be using a version of help2man that's less than 22 years old. This helps because distros such as Arch Linux patch the vendored version of help2man in order to make the build reproducible[0]. However, help2man has been updated to support $SOURCE_DATE_EPOCH for a long time now. Add -n to the gzip call so that the timestamp of the files are not saved. While we're at it, add the generated files to the .gitignore. [0]: https://gitlab.archlinux.org/archlinux/packaging/packages/lsb-release/-/blob/e5ce86591a488e1089e1c246a296adc70679588b/lsb_release_make_man_page_reproducible.patch
1 parent a25a4fc commit 6821036

File tree

4 files changed

+9
-527
lines changed

4 files changed

+9
-527
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*.1
2+
*.1.gz

lsb_release/README

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
This directory contains:
22

3-
src - directory containing the source for lsb_release
3+
src - directory containing the source for lsb_release
44
lsb-release.spec - the spec file for generating RPM packages for lsb_release
55
debian - directory containing the necessary configuration files for
66
generating a deb packages for lsb_release
@@ -9,10 +9,10 @@ debian - directory containing the necessary configuration files for
99
Generating a release
1010
--------------------
1111

12-
The man page for lsb_release is automatically created by a modified
13-
version of the help2man program when the packages are constructed. The
14-
Makefile in the src subdirectory contains the command line arguments
15-
needed. The modified version of help2mn is included in this package.
12+
The man page for lsb_release is automatically created by the help2man
13+
program when the packages are constructed. Please ensure that the
14+
program is available on the build system. The Makefile in the src
15+
subdirectory contains the command line arguments needed.
1616

1717
1. Checkout a tagged release (eg Release_1_1) or a snapshot
1818

lsb_release/src/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ all: man
2121
man: lsb_release.1.gz
2222

2323
lsb_release.1.gz: lsb_release
24-
@./help2man -N --include ./lsb_release.examples --alt_version_key=program_version ./lsb_release >lsb_release.1
25-
@gzip -9f lsb_release.1
24+
@help2man -N --include ./lsb_release.examples --version-option=--program_version ./lsb_release >lsb_release.1
25+
@gzip -9fn lsb_release.1
2626

2727
install: all
2828
install -D -m 644 lsb_release.1.gz ${mandir}/man1/lsb_release.1.gz

0 commit comments

Comments
 (0)