Source: console-setup
Version: 1.143
Severity: wishlist
Tags: patch
User: reproducible-builds@lists.alioth.debian.org
Usertags: umask locale fileordering
X-Debbugs-Cc: reproducible-builds@lists.alioth.debian.org
Hi!
While working on the "reproducible builds" effort [1], we have noticed
that console-setup could not be built reproducibly.
There are three remaining issues:
- different umasks cause differences in the mode of uuencoded files
- $(wildcard ...) in Makefiles is unsorted, which causes randomly
ordered entries in charmap_functions.sh
- files are listed in debian/preprocessor with `ls *.{psf,acm}`, which
is sorted, but sorted differently depending on the locale.
The attached patch fixes those issues.
Regards,
Reiner
[1]: https://wiki.debian.org/ReproducibleBuilds
diff --git a/Fonts/Makefile b/Fonts/Makefile
index 3769cbe..452f8fa 100644
--- a/Fonts/Makefile
+++ b/Fonts/Makefile
@@ -330,7 +330,7 @@ $(ALL_BSD_FONTS) :
$(equivalents) $(symbolsets) $(size) $@ $(@:%.raw=%.raw.sfm)
%.fnt : %.raw
- uuencode $< $(*F) >$@
+ umask 022; uuencode $< $(*F) >$@
gzipped_linux_fonts : $(GZIPPED_LINUX_FONTS)
@@ -355,7 +355,7 @@ $(SCRNMAPS) : somefont = \
$(SCRNMAPS) : sfm = $(somefont:%.fnt=%.raw.sfm)
$(SCRNMAPS) : $(UUENCODED_BSD_FONTS) $./freebsd.set $./fbsdmap
- $(fntdir)/fbsdmap --binaryscm $(fntdir)/freebsd.set $(sfm) \
+ umask 022; $(fntdir)/fbsdmap --binaryscm $(fntdir)/freebsd.set $(sfm) \
$(fntdir)/../acm/$(encoding).acm | \
uuencode $(encoding_fontset) >$@
diff --git a/Keyboard/Makefile b/Keyboard/Makefile
index d5e4e8b..3313210 100644
--- a/Keyboard/Makefile
+++ b/Keyboard/Makefile
@@ -27,7 +27,7 @@ $./%.ekbd :
$./charmap_functions.sh : $(acmfiles)
$(kbddir)/make_charmap_functions $(kbddir)/../acm $(charmaps) >$@
-acmfiles := $(wildcard $./../acm/*.acm)
+acmfiles := $(sort $(wildcard $./../acm/*.acm))
charmaps := $(basename $(notdir $(acmfiles)))
diff --git a/debian/preprocessor b/debian/preprocessor
index 89b6717..4f0d1a7 100755
--- a/debian/preprocessor
+++ b/debian/preprocessor
@@ -46,13 +46,13 @@ awk '
}
/## *FONTSETS *##/ {
printf "fontsets='\''";
- system("cd Fonts && ls *.psf | sed '\''s/.psf$//'\''");
+ system("cd Fonts && LC_ALL=C ls *.psf | sed '\''s/.psf$//'\''");
printf "'\''";
next;
}
/## *CHARMAPS *##/ {
printf "charmaps='\''";
- system("ls acm/*.acm |sed -e '\''s/^acm.//'\'' -e '\''s/.acm$//'\''");
+ system("LC_ALL=C ls acm/*.acm |sed -e '\''s/^acm.//'\'' -e '\''s/.acm$//'\''");
printf "UTF-8'\''\n";
next;
}
Attachment:
signature.asc
Description: PGP signature