Source: tty-solitaire Version: 1.3.0-1 Severity: wishlist Tags: patch User: reproducible-bui...@lists.alioth.debian.org Usertags: buildpath X-Debbugs-Cc: reproducible-b...@lists.alioth.debian.org
Hi, Whilst working on the Reproducible Builds effort [0] we noticed that tty-solitaire could not be built reproducibly. This is because it embedded the build path in the documentation via --usage and help2man: -usage: \fI\,/build/1st/tty\-solitaire\-1.3.0/ttysolitaire\/\fP [OPTIONS] +usage: \fI\,/build/2/tty\-solitaire\-1.3.0/2nd/ttysolitaire\/\fP [OPTIONS] A patch is attached that changes the usage output to not include the full contents of argv[0], but strip them using basename(3). [0] https://reproducible-builds.org/ Regards, -- ,''`. : :' : Chris Lamb `. `'` la...@debian.org / chris-lamb.co.uk `-
--- a/debian/patches/0001-reproducible-build.patch 1970-01-01 01:00:00.000000000 +0100 --- b/debian/patches/0001-reproducible-build.patch 2021-08-30 03:19:25.835174888 +0100 @@ -0,0 +1,22 @@ +Description: Make the build reproducible +Author: Chris Lamb <la...@debian.org> +Last-Update: 2021-08-30 + +--- tty-solitaire-1.3.0.orig/src/ttysolitaire.c ++++ tty-solitaire-1.3.0/src/ttysolitaire.c +@@ -1,5 +1,6 @@ + #include <errno.h> + #include <getopt.h> ++#include <libgen.h> + #include <locale.h> + #include <ncurses.h> + #include <stdlib.h> +@@ -33,7 +34,7 @@ int main(int argc, char *argv[]) { + {"no-background-color", no_argument, &no_background_color, 1}, + {0, 0, 0, 0}}; + +- program_name = argv[0]; ++ program_name = basename(argv[0]); + + while ((option = getopt_long(argc, argv, "hvp:", options, &option_index)) != + -1) { --- a/debian/patches/series 1970-01-01 01:00:00.000000000 +0100 --- b/debian/patches/series 2021-08-30 03:18:51.789327094 +0100 @@ -0,0 +1 @@ +0001-reproducible-build.patch