Skip to content

Commit 572d766

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 572d766

File tree

3 files changed

+4
-522
lines changed

3 files changed

+4
-522
lines changed

lsb_release/src/.gitignore

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

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)