Source: nasm
Version: 2.11.08
Severity: wishlist
Tags: patch
Usertags: timestamps fileordering hostname umask


While working on the “reproducible builds” effort [1], we have noticed
that nasm could not be built reproducibly.

The attached patch sorts keys from a hash table listing fonts to ensure a stable file order when creating the postscript and pdf documentation. Once applied, nasm can be built reproducibly in our
current experimental framework.
* sort 'keys' for reproducibility.

Author: Raymond Nicholson <>

The information above should follow the Patch Tagging Guidelines, please
checkout to learn about the format. Here
are templates for supplementary fields that you might want to add:

Origin: <vendor|upstream|other>, <url of original patch>
Bug: <url in upstream bugtracker>
Forwarded: <no|not-needed|url proving that it has been forwarded>
Reviewed-By: <name and email of someone who approved the patch>
Last-Update: <YYYY-MM-DD>

--- nasm-2.11.08.orig/doc/
+++ nasm-2.11.08/doc/
@@ -968,18 +968,18 @@ print "%%Pages: $curpage\n";
 print "%%BoundingBox: 0 0 ", $psconf{pagewidth}, ' ', $psconf{pageheight}, "\n";
 print "%%Creator: (NASM\n";
 print "%%DocumentData: Clean7Bit\n";
-print "%%DocumentFonts: ", join(' ', keys(%ps_all_fonts)), "\n";
-print "%%DocumentNeededFonts: ", join(' ', keys(%ps_all_fonts)), "\n";
+print "%%DocumentFonts: ", join(' ', sort keys(%ps_all_fonts)), "\n";
+print "%%DocumentNeededFonts: ", join(' ', sort keys(%ps_all_fonts)), "\n";
 print "%%Orientation: Portrait\n";
 print "%%PageOrder: Ascend\n";
 print "%%EndComments\n";
 print "%%BeginProlog\n";
 # Emit the configurables as PostScript tokens
-foreach $c ( keys(%psconf) ) {
+foreach $c ( sort keys(%psconf) ) {
     print "/$c ", $psconf{$c}, " def\n";
-foreach $c ( keys(%psbool) ) {
+foreach $c ( sort keys(%psbool) ) {
     print "/$c ", ($psbool{$c}?'true':'false'), " def\n";
@@ -1007,7 +1007,7 @@ print "  definefont pop\n";
 print "} def\n";
 # Emit fontset definitions
-foreach $font ( keys(%ps_all_fonts) ) {
+foreach $font ( sort keys(%ps_all_fonts) ) {
     print '/',$font,'-NASM /',$font," nasmenc\n";
Reproducible-builds mailing list

Reply via email to