Skip to content

Add support for deterministic build#46

Open
avtobiff wants to merge 1 commit into
hawk:masterfrom
avtobiff:enable-deterministic-build
Open

Add support for deterministic build#46
avtobiff wants to merge 1 commit into
hawk:masterfrom
avtobiff:enable-deterministic-build

Conversation

@avtobiff
Copy link
Copy Markdown

@avtobiff avtobiff commented Sep 8, 2022

Enable reproducible builds by creating a deterministic build environment.

  • Create a deterministic build environment with the new configure option --enable-deterministic-build.

Deterministic builds:

  • Replaces +debug_info erlc flag with +deterministic.

  • Strips runpty from non-deterministic data.

Enable reproducible builds by creating a deterministic build
environment.

* Create a deterministic build environment with the new configure
  option --enable-deterministic-build.

Deterministic builds:

* Replaces +debug_info erlc flag with +deterministic.

* Strips runpty from non-deterministic data.
@avtobiff
Copy link
Copy Markdown
Author

avtobiff commented Sep 8, 2022

This patch enables deterministic builds for binaries.

Testing reproducible builds by

# git clone lux.git
cp -a lux lux2
for d in lux lux2; do
    mkdir -p /tmp/$d
    cd $d
    autoconf;
    ./configure --enable-deterministic-build
    make DESTDIR=/tmp/$d all install
    cd ..
done;
diffoscope /tmp/lux /tmp/lux2

Now diffoscope only returns timestamps as difference, trivial to fix.

However if the docs are rebuilt the build path is included in the
resulting lux.html file, since lux generates log directories
automatically from the invocation path and a sub directory
containing timestamp.

It is possibly to remedy this by running the examples for the docs
with

lux --log_dir /tmp/lux_logs examples

It might look a bit weird, to not have the default path lux uses.
Perhaps the docs aren't recreated at build anyway, but just
installed as is and recreated when needed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant