Skip to content

Reproducible builds: Write the rpm changelog entry with a fixed date - #10834

Merged
linus-mullvad merged 1 commit into
mainfrom
reproducible-builds-rpm-changelog
Jul 30, 2026
Merged

Reproducible builds: Write the rpm changelog entry with a fixed date#10834
linus-mullvad merged 1 commit into
mainfrom
reproducible-builds-rpm-changelog

Conversation

@linus-mullvad

@linus-mullvad linus-mullvad commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator

Another day, another reproducible builds PR. Joke intended (the fact that this PR stops the RPM build to break on different days)

fpm stamps the %changelog entry it generates with the build machine current date at build time. Its deb output copies SOURCE_DATE_EPOCH (as it should) into the attribute that date is read from, but its rpm output never does, so the entry followed the wall clock. rpm parses the date into the CHANGELOGTIME header, so two rpms built from the same commit on different days differed.

Pass the entry to fpm instead of letting it generate one, since reproducible builds require it to be fixed. The date is formatted in UTC, so the time zone of the build machine cannot shift it across a day boundary either. fpm renders it in local time.

This workaround is due to a bug in fpm. It should honor SOURCE_DATE_EPOCH, but it does not. I reported it upstream at jordansissel/fpm#2154.


This change is Reviewable

@linus-mullvad
linus-mullvad requested review from dlon and olmoh July 30, 2026 07:40
@linus-mullvad
linus-mullvad force-pushed the reproducible-builds-rpm-changelog branch from cb2acd1 to e5b8fda Compare July 30, 2026 07:50
dlon
dlon previously approved these changes Jul 30, 2026

@dlon dlon left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

@dlon reviewed 1 file and all commit messages, and made 1 comment.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved.

@linus-mullvad

Copy link
Copy Markdown
Collaborator Author

I contributed a PR upstream that fixes the bug in fpm. If they merge that, and when electron-builder bumps to the fixed version, we can remove this workaround again. jordansissel/fpm#2155

fpm stamps the %changelog entry it generates with the current date. Its
deb output copies SOURCE_DATE_EPOCH into the attribute that date is read
from, but its rpm output never does, so the entry followed the wall
clock. rpm parses the date into the CHANGELOGTIME header, so two rpms
built from the same commit on different days differed.

Pass the entry to fpm instead of letting it generate one, since
reproducible builds require it to be fixed. The date is formatted in
UTC, so the time zone of the build machine cannot shift it across a day
boundary either. fpm renders it in local time.
@linus-mullvad
linus-mullvad force-pushed the reproducible-builds-rpm-changelog branch from e5b8fda to 7b31a2e Compare July 30, 2026 09:35
@linus-mullvad
linus-mullvad merged commit 3d96d45 into main Jul 30, 2026
13 of 15 checks passed
@linus-mullvad
linus-mullvad deleted the reproducible-builds-rpm-changelog branch July 30, 2026 09:42
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.

2 participants