Source: gfxboot Severity: normal Tags: patch User: reproducible-bui...@lists.alioth.debian.org Usertags: username X-Debbugs-Cc: reproducible-b...@lists.alioth.debian.org
Various cpio archives shipped in gfxboot contain the user id and group id of the build user: https://tests.reproducible-builds.org/debian/rb-pkg/bullseye/amd64/diffoscope-results/gfxboot.html etc/bootsplash/example_01/cdrom/bootlogo -rw-r--r--···1·····1111·····1111····42639·2020-12-24·13:17:48.000000·init vs. -rw-r--r--···1·····2222·····2222····42639·2022-01-26·19:45:05.000000·init The attached patch fixes this by passing the owner argument to the cpio calls when creating the archives. Unfortunately, the cpio archives also embed the timestamps of the files included, which will likely vary between builds, so this does not resolve all reproducibility issues with these archives. Thanks for maintaining gfxboot! live well, vagrant
From 7a670f72d5305aaf692597f1748937d552d290a3 Mon Sep 17 00:00:00 2001 From: Vagrant Cascadian <vagr...@reproducible-builds.org> Date: Thu, 31 Dec 2020 08:57:55 +0000 Subject: [PATCH 1/2] Patch calls to create cpio archives to set owner and group. --- bin/unpack_bootlogo | 2 +- gfxboot | 4 ++-- themes/openSUSE/Makefile | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/bin/unpack_bootlogo b/bin/unpack_bootlogo index ec83d0b..7672e16 100755 --- a/bin/unpack_bootlogo +++ b/bin/unpack_bootlogo @@ -48,7 +48,7 @@ sub unpack_bootlogo } } - open P, "| cd $tmp; cpio --quiet -o >../bootlogo"; + open P, "| cd $tmp; cpio --quiet --owner=+0:+0 -o >../bootlogo"; print P "$_\n" for grep $_, @files; if($xdir) { print P "$_\n" for @ext } close P; diff --git a/gfxboot b/gfxboot index f7cda36..4015dd2 100755 --- a/gfxboot +++ b/gfxboot @@ -2597,7 +2597,7 @@ sub pack_archive } if(@pack_list) { - open $f, "| ( cd $dir ; cpio --quiet -o ) >$file/$archive"; + open $f, "| ( cd $dir ; cpio --quiet --owner=+0:+0 -o ) >$file/$archive"; print $f join("\n", @pack_list); close $f; } @@ -2606,7 +2606,7 @@ sub pack_archive else { $file = $gfxboot_tmp->file; - $i = system "cd $dir ; find . | cpio --quiet -o >$file 2>/dev/null"; + $i = system "cd $dir ; find . | cpio --quiet --owner=+0:+0 -o >$file 2>/dev/null"; die "$file: failed to create archive\n" if $i; } diff --git a/themes/openSUSE/Makefile b/themes/openSUSE/Makefile index 3a71f9b..1c8de69 100644 --- a/themes/openSUSE/Makefile +++ b/themes/openSUSE/Makefile @@ -56,7 +56,7 @@ ifdef DEFAULT_LANG @echo $(DEFAULT_LANG) >bootlogo.dir/lang endif @sh -c 'cd bootlogo.dir; chmod +t * ; chmod -t init languages' - @sh -c 'cd bootlogo.dir; echo * | sed -e "s/ /\n/g" | cpio --quiet -o >../bootlogo' + @sh -c 'cd bootlogo.dir; echo * | sed -e "s/ /\n/g" | cpio --quiet --owner=+0:+0 -o >../bootlogo' message: src/main.bin src/gfxboot.cfg help-boot/.ready po/.ready fonts/.ready @rm -rf message.dir @@ -71,7 +71,7 @@ ifdef DEFAULT_LANG @echo $(DEFAULT_LANG) >message.dir/lang @echo $(DEFAULT_LANG) >>message.dir/languages endif - @sh -c 'cd message.dir; echo * | sed -e "s/ /\n/g" | cpio --quiet -o >../message' + @sh -c 'cd message.dir; echo * | sed -e "s/ /\n/g" | cpio --quiet --owner=+0:+0 -o >../message' clean: @for i in $(SUBDIRS) ; do [ ! -f $$i/Makefile ] || make -C $$i clean || break ; done -- 2.20.1
signature.asc
Description: PGP signature