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

Make the build reproducible #269

Merged
merged 1 commit into from Jun 30, 2023

Conversation

lamby
Copy link
Contributor

@lamby lamby commented Jun 29, 2023

Whilst working on the Reproducible Builds effort in Debian, I noticed that bitstring could not be built reproducibly.

This was because the documentation used the build year in the documentation:

│ │ │ ├── ./usr/share/doc/python-bitstring-doc/html/bitarray.html
│ │ │ │ @@ -973,11 +973,11 @@
│ │ │ │               >previous</a> |</li>
│ │ │ │          <li class="nav-item nav-item-0"><a href="index.html">bitstring 4.0 documentation</a> &#187;</li>
│ │ │ │            <li class="nav-item nav-item-1"><a href="reference.html" >Reference</a> &#187;</li>
│ │ │ │          <li class="nav-item nav-item-this"><a href="">BitArray Class</a></li>
│ │ │ │        </ul>
│ │ │ │      </div>
│ │ │ │      <div class="footer" role="contentinfo">
│ │ │ │ -        &#169; Copyright 2023 - 2023, Scott Griffiths.
│ │ │ │ +        &#169; Copyright 2023 - 2024, Scott Griffiths.
│ │ │ │      </div>
│ │ │ │    </body>
│ │ │ │  </html>

This patch bases this value on the SOURCE_DATE_EPOCH environment variable (if available). I originally filed this in Debian as bug #1039932.

Whilst working on the Reproducible Builds effort [0] in Debian, I noticed
that bitstring could not be built reproducibly.

This was because the documentation used the build year in the
documentation:

```
│ │ │ ├── ./usr/share/doc/python-bitstring-doc/html/bitarray.html
│ │ │ │ @@ -973,11 +973,11 @@
│ │ │ │               >previous</a> |</li>
│ │ │ │          <li class="nav-item nav-item-0"><a href="index.html">bitstring 4.0 documentation</a> &scott-griffiths#187;</li>
│ │ │ │            <li class="nav-item nav-item-1"><a href="reference.html" >Reference</a> &scott-griffiths#187;</li>
│ │ │ │          <li class="nav-item nav-item-this"><a href="">BitArray Class</a></li>
│ │ │ │        </ul>
│ │ │ │      </div>
│ │ │ │      <div class="footer" role="contentinfo">
│ │ │ │ -        &scott-griffiths#169; Copyright 2023 - 2023, Scott Griffiths.
│ │ │ │ +        &scott-griffiths#169; Copyright 2023 - 2024, Scott Griffiths.
│ │ │ │      </div>
│ │ │ │    </body>
│ │ │ │  </html>
```

This patch bases this value on the SOURCE_DATE_EPOCH environment variable
(if available).

I originally filed this in Debian as bug #1039932 [1].

 [0] https://reproducible-builds.org/
 [1] https://bugs.debian.org/1039932
@scott-griffiths scott-griffiths merged commit ba5c2dd into scott-griffiths:main Jun 30, 2023
17 checks passed
@scott-griffiths
Copy link
Owner

Looks fine to me. Thanks.

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.

None yet

2 participants