Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for deterministic build #46

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

avtobiff
Copy link

@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
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