This change introduces nasm-3.02 nasm-next
(among current 2.XX to avoid world rebuild)
Differences from current nasm package:
builds from git, not from tarball
this requires autoconf-2.72, automake, which for ‘bootstrap phase
manpages are generated, so new deps: asciidoc, xmlto, docbook-xsl
as a bonus one can build from latest commit on master --with-branch=nasm-next=master
or hack on nasm with guix shell -D nasm-next
initially I thought to just add 3.02 to my private channel to test if the issue I had with -g -F dwarf was fixed by upstream, then was nerdsniped into fixing ghostscript reproducibility and thought the work I have done was valuable enough as is
but after Yelninei’s comment, I reconsidered that adding nasm-next from git is even better idea
pdf documentation generation is reintroduced (I think I have fixed all reproducibility issues)
new deps:
font-google-roboto, font-google-roboto-monoperl-font-ttf, perl-sort-versionsfontconfigghostscriptas Yelninei pointed out this creates a cyclic dependency due to libturbo
if one would be to update the current nasm@2, I think the good idea is to introduce nasm-minimal
which would be dependent only on perl and python-wrapper for running tests
and replace libturbo’s nasm with nasm-minimal
texinfo dep is dropped
reason being: since 2017 nasm no longer generates and supports info pages
python-wrapper is added as dep
reason being: nasm used travis target for tests for quite some time
and a week ago on branch master travis target took place of legacy perl scripts
now it is both perl and python
Also bunch of ignored errors are fixed in check phase.
I added ‘make golden’ phase prior to check.
Historically around 2016 when nasm was introduced into guix by Jan Nieuwenhuizen
commit: 8472bdecb634e2f3015a61e16c59b62831b82ea9
It suffered from bunch of reproducibility issues, most importantly: the pdf documentation generation was not reproducible. Later, around that time, pdf documentation was fixed through removal of pdf documentation in make file.
First via patch (Jan Nieuwenhuizen), later via introduced substitute* phase (Efraim Flashner)
commit: a837997cab842026bde1d5c0fac3a2d5258fe06f commit: 161fb9be8edf37cf52c3d223214d81e4cbb7a787
Since then the package was mostly version bumped to meet latest version of nasm and resolve building issues because of removed pdf.
I have found out that Debian around 2017 fixed several reproducibility issues for their nasm packages.
Which are still relevant today.
patches: https://sources.debian.org/patches/nasm/3.01-1/ https://sources.debian.org/patches/nasm/3.01-1/0007-doc-sort-keys-for-reproducibility.patch/ https://sources.debian.org/patches/nasm/3.01-1/0003-debian-debian-patches-04-reproducible-build.patch.patch/
discussion: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=820194
upd:
Initially thought to use these patches.
But ended up using env vars like PERL_HASH_SEED, GS_GENERATE_UUIDS instead.
reasons:
The last GS_GENERATE_UUIDS fixes the issue with ghostscript adding /CreationDate to the document
the behavior of this GS_GENERATE_UUIDS env var was introduced into guix around 2021.
https://issues.guix.gnu.org/issue/49640 commit: db5962c68099f835350c24c8a3f889b9fa1f8a8e
$ guix size nasm | tail -n1 # before
total: 78.1 MiB
$ ./pre-inst-env guix size nasm-next | tail -n1 # after
total: 79.6 MiB
./pre-inst-env guix build -k -P1 nasm-next):
/gnu/store/8srdrmzbaqlwqbs82vjki1r86psbz42l-nasm-next-3.02
https://www.nasm.us/doc/nasmac.html
guix size.guix lint (./pre-inst-env guix lint nasm-next).The change doesn’t break guix pull (guix pull --url=/path/to/your/checkout --profile=/tmp/guix.master --no-channel-files --disable-authentication).
./pre-inst-env guix build --check nasm-next
successfully built /gnu/store/w2v7r87vwcifxxx24ksf5s5ahpccvkgk-nasm-next-3.02.drv
successfully built /gnu/store/w2v7r87vwcifxxx24ksf5s5ahpccvkgk-nasm-next-3.02.drv
/gnu/store/8srdrmzbaqlwqbs82vjki1r86psbz42l-nasm-next-3.02
pull request made