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

7.0.x: reproducible builds: use consistent date in man pages #10778

Closed
wants to merge 5 commits into from

Conversation

jasonish
Copy link
Member

@jasonish jasonish commented Apr 5, 2024

Backport of #10755.

Skips the CI updates as they were not needed in 7.0, and it's not a clean backport.

Includes #10777.

jasonish added 5 commits April 5, 2024 10:07
/home/jason/oisf/dev/suricata/master/doc/userguide/conf.py:74: SyntaxWarning: invalid escape sequence '\('
  "AC_INIT\(\[suricata\],\s*\[(.*)?\]\)",

(cherry picked from commit 4c16032)
Stop checking the ./revision file for the git revision info, its never
created.

(cherry picked from commit c00c2b1)
By default, when Sphinx generates the man pages, the current date will
be embedded in them. This can be set to a specific date with the
"today" variable. Typically the date embedded in manpages in the
release date.

To achieve this, attempt to use the environment variable, RELEASE_DATE
to set the "today" variable, reverting back to the empty string if not
set. It is up to our build system to properly set this date.

Ticket: OISF#6911
(cherry picked from commit 51bf1c3)
Sphinx embeds a date in the generated man pages, and to provide
reproducible builds this date needs to be provided to Sphinx,
otherwise it will use the current date.

If building from Git, extract the date from the most recent commit. In
a release, this commit would be the commit that sets the version so is
accurate.

If .git does not exist, use the most recent data found in the
ChangeLog.

The ChangeLog is not used when building from git, as the main/master
branch may not have recent enough timestamps.

This should provide a consistent date when re-building the
distribution from the same non-git archive, or from the same git
commit.

Ticket: OISF#6911
(cherry picked from commit b58dd5e)
In worktree scenarios, .git is a file. Assuming its a directory causes
the release date to check the ChangeLog instead of the last commit,
while not a big issue, can be confusing.
@jasonish jasonish requested review from jufajardini and a team as code owners April 5, 2024 16:47
Copy link

codecov bot commented Apr 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.40%. Comparing base (80d2c6e) to head (7b734a3).

Additional details and impacted files
@@              Coverage Diff               @@
##           main-7.0.x   #10778      +/-   ##
==============================================
- Coverage       82.51%   82.40%   -0.12%     
==============================================
  Files             976      976              
  Lines          275061   275061              
==============================================
- Hits           226979   226669     -310     
- Misses          48082    48392     +310     
Flag Coverage Δ
fuzzcorpus 63.58% <ø> (-0.23%) ⬇️
suricata-verify 61.64% <ø> (-0.04%) ⬇️
unittests 62.90% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

@victorjulien
Copy link
Member

Merged in #10793, thanks!

@jasonish jasonish deleted the 7.0.x-repro-docs/v1 branch April 10, 2024 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants