Giter Club home page Giter Club logo

Comments (5)

vinoski avatar vinoski commented on May 28, 2024

Are these results with or without the recently-added YAWS_DETERMINISTIC_BUILD environment variable set?

from yaws.

vinoski avatar vinoski commented on May 28, 2024

I see that with YAWS_DETERMINISTIC_BUILD set we get diffoscope hits like this in the yaws script:

 -yawsdir="/tmp/yrb1/lib/yaws"
 -vardir="/tmp/yrb1/var"
 +yawsdir="/tmp/yrb2/lib/yaws"
 +vardir="/tmp/yrb2/var"

But are these, and other similar diffs in yaws.conf and config files, really violations of reproducible builds? I see on the Reproducible Builds website that

By promising identical results are always generated from a given source, this allows multiple third parties to come to a consensus on a โ€œcorrectโ€ result, highlighting any deviations as suspect and worthy of scrutiny.

Focusing on the "from a given source" part of the above sentence: IMO configuring two builds each with a different install prefix means you have two different sources. A better check IMO would be to see the differences between two builds from the same configuration. There, I think the only differences we'd see are the datetimes embedded in the yaws.pdf and yaws.dvi files, for example:

 -CreationDate: "D:20220107104252-05'00'"
 +CreationDate: "D:20220107105033-05'00'"
  Creator: 'LaTeX with hyperref'
  Keywords: ''
 -ModDate: "D:20220107104252-05'00'"
 +ModDate: "D:20220107105033-05'00'"

from yaws.

avtobiff avatar avtobiff commented on May 28, 2024

Are these results with or without the recently-added YAWS_DETERMINISTIC_BUILD environment variable set?

These are the results without it set. I missed that this was pushed recently,
even though it is current HEAD on master. Sorry.

Focusing on the "from a given source" part of the above sentence: IMO configuring two builds each with a different install prefix means you have two different sources. A better check IMO would be to see the differences between two builds from the same configuration.

I can agree with this. Using DESTDIR this will not be an issue.

I think the only differences we'd see are the datetimes embedded in the yaws.pdf (...)

The PR #447 documents reproducible builds for YAWS and also makes
yaws.ps generation deterministic if SOURCE_DATE_EPOCH is set.
Generating yaws.pdf is done with pdflatex which already uses
SOURCE_DATE_EPOCH.

from yaws.

avtobiff avatar avtobiff commented on May 28, 2024

After further investigation this needs to be reopened.

Building in separate source directories uncovered some issues
that breaks reproducible builds.

The following build method was used, copy a pristine yaws repo
to another path, build, and install, like so:

$ export YAWS_DETERMINISTIC_BUILD=true
$ export SOURCE_DATE_EPOCH=$(date +%s)
$ cd yaws
$ git clean -fdxq
$ cd ..
$ cp -a yaws yaws2

# first build
$ cd yaws
$ autoreconf -fi
$ ./configure --prefix=/usr
$ make all doc apps
$ make DESTDIR=/tmp/yaws1 install

# second build
$ cd ../yaws2
$ autoreconf -fi
$ ./configure --prefix=/usr
$ make all doc apps
$ make DESTDIR=/tmp/yaws2 install

Running diffoscope /tmp/yaws1 /tmp/yaws2 uncovered
that several things were not built deterministically:

  • Build environment paths included in BEAM files
  • SHELL taken from build environment and used in Makefiles
  • Build environment paths included in Makefiles
  • mime_types.erl used build environment path in include

The PR #448 solves these things.

However more work is needed.

The following files are not built deterministically, and I don't
quite understand why not.

examples/ebin/advanced_echo_callback.beam
examples/ebin/authmod_gssapi.beam
examples/ebin/basic_echo_callback_extended.beam
examples/ebin/server_sent_events.beam

It might be something in the LocT, Local Functions, section
of the BEAM file. More investigation is needed.

For details and status of reproducible builds of the yaws Debian
package see the reproducible builds CI page. [0]

[0] https://tests.reproducible-builds.org/debian/rb-pkg/unstable/amd64/yaws.html

from yaws.

avtobiff avatar avtobiff commented on May 28, 2024

The following files are not built deterministically, and I don't quite understand why not.

examples/ebin/advanced_echo_callback.beam
examples/ebin/authmod_gssapi.beam
examples/ebin/basic_echo_callback_extended.beam
examples/ebin/server_sent_events.beam

These files differ because +debug_info is used.

Removing +debug_info when building the examples
if YAWS_DETERMINISTIC_BUILD is set resolves it.

from yaws.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.