Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
meson-python
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Debian Python Team
packages
meson-python
Commits
b17dbeae
Commit
b17dbeae
authored
9 months ago
by
Simon McVittie
Browse files
Options
Downloads
Patches
Plain Diff
Add patch to make the documentation build reproducible
Thanks: Chris Lamb Closes: #1076806
parent
69e7be0a
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
debian/patches/Make-the-documentation-reproducible-when-rebuilt.patch
+57
-0
57 additions, 0 deletions
...es/Make-the-documentation-reproducible-when-rebuilt.patch
debian/patches/series
+1
-0
1 addition, 0 deletions
debian/patches/series
with
58 additions
and
0 deletions
debian/patches/Make-the-documentation-reproducible-when-rebuilt.patch
0 → 100644
+
57
−
0
View file @
b17dbeae
From: Chris Lamb <lamby@debian.org>
Date: Tue, 23 Jul 2024 14:37:05 +0100
Subject: Make the documentation reproducible when rebuilt
The Reproducible Builds project aims to arrange for rebuilding the same
source code in a sufficiently similar environment to produce the same
installable packages every time, as a way to discourage supply-chain
attacks by making it possible to verify that a particular installable
package was built from the claimed source code.
Previously, if meson-python was built twice, at least a year apart,
then its documentation would contain different copyright dates. The
SOURCE_DATE_EPOCH environment variable is used here to avoid that
difference: the intention is that environments that want to produce
reproducible packages will set SOURCE_DATE_EPOCH to some suitable fixed
date (perhaps the date of the most recent git commit) which is held
constant across rebuilds.
See the specification for SOURCE_DATE_EPOCH for more details:
https://reproducible-builds.org/docs/source-date-epoch/
[smcv: Added commit message]
Co-authored-by: Simon McVittie <smcv@debian.org>
Bug-Debian: https://bugs.debian.org/1076806
Forwarded: https://github.com/mesonbuild/meson-python/pull/652
---
docs/conf.py | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/docs/conf.py b/docs/conf.py
index d191a89..5f39f0e 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -16,15 +16,21 @@
import datetime
import os
+import time
import sys
sys.path.insert(0, os.path.abspath('..'))
import mesonpy
+build_date = datetime.datetime.fromtimestamp(
+ int(os.environ.get('SOURCE_DATE_EPOCH', time.time())),
+ tz=datetime.timezone.utc,
+)
+
# -- Project information -----------------------------------------------------
project = 'meson-python'
-copyright = f'2021\N{EN DASH}{datetime.date.today().year} The meson-python developers'
+copyright = f'2021\N{EN DASH}{build_date.year} The meson-python developers'
# The short X.Y version
version = mesonpy.__version__
This diff is collapsed.
Click to expand it.
debian/patches/series
+
1
−
0
View file @
b17dbeae
TST-adapt-to-changes-in-pyproject-metadata-0.8.0.patch
Make-the-documentation-reproducible-when-rebuilt.patch
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment