feat: Add reproducible debian packaging and a corresponding CI workflow job#16965
feat: Add reproducible debian packaging and a corresponding CI workflow job#16965MoeMahhouk wants to merge 9 commits intoparadigmxyz:mainfrom
Conversation
mattsse
left a comment
There was a problem hiding this comment.
cant really review this properly, this should also not prevent the existing release setup otherwise we're stuck with this
Yes, currently it is in draft stage to gather feedback and see how the reth team would like to have it best fit in their product. That's being said, I would appreciate your feedback/review on it and I am open to suggestions to make it better fit inside the reth repo |
|
How critical is this to be in the main reth repo rather than a fork, or on some other infrastructure with automation? i.e., if this were not in the main repo, what would be lost? We cannot have the following situation happen:
So this should not be in any workflow that is a prereq for release, or would block release if failing |
Thanks @Rjected for your thorough response!
Intermediate solution: |
Rjected
left a comment
There was a problem hiding this comment.
I have some initial comments / questions, I think building deb packages as part of releases makes sense. I want to make sure that any failures in build-reproducible are caught before we do a release. I am currently leaning towards allow_fail: true on the debian package builds, because we previously had a delayed release due to a failure in make build-reproducible.
.github/workflows/release.yml
Outdated
There was a problem hiding this comment.
if we use target here to distinguish between deb and non-deb builds, the rust-toolchain step will fail because the -deb names are not valid targets.
There was a problem hiding this comment.
right, but we run this first
- uses: dtolnay/rust-toolchain@stable
with:
target: ${{ matrix.configs.target }}which would mean the -deb builds would always fail I think?
Makefile
Outdated
There was a problem hiding this comment.
I think we should add this to https://github.com/paradigmxyz/reth/blob/main/.github/workflows/reproducible-build.yml
There was a problem hiding this comment.
we could have it there as well, but in general, you wouldnt want to publish debian packages that are not reproducible, or do you want to separate that as well and let it publish them despite of that?
There was a problem hiding this comment.
let it publish them despite of that?
I think this, just add make test-deb-reproducible to the reproducible-build workflow. The reproducible-build workflow should test that the build is actually reproducible, and give a warning if something is causing us to not be reproducible. It's currently run via cron
There was a problem hiding this comment.
I added it there now and found out that the reproducible-build workflow is failing because the reproducible-build was not generating reproducible binaries.
So I fixed that now and now testing the workflow if it will pass with both the binaries and debian packaging reproducibility.
bin/reth/debian/reth.service
Outdated
There was a problem hiding this comment.
if we do this / are relying on journald for logs, can set the RUST_LOG to debug? If people run this and something happens to the node, not having debug logs would be rough
There was a problem hiding this comment.
What is the minimalistic set of flags to set for this that you suggest to have here and I will change it.
The main idea is to provide it in the packaging and potentially leave it to the user to modify it with any potential extra flags.
The ones I included here are from our buildernet instance but probably we should do a simple set of flags that you (reth team) recommend.
bin/reth/debian/postrm
Outdated
There was a problem hiding this comment.
I left this commented for feedback if you want to include it as postrm or not. It is more of a product question.
I can include it if you find it useful
bin/reth/Cargo.toml
Outdated
There was a problem hiding this comment.
not sure this is the right email, checking
There was a problem hiding this comment.
Sure, I will change it to the correct mail once you share that with me
97b1c95 to
57a9bcc
Compare
|
Need to review this again, would like to have this |
|
closing this PR as it was later on done within this PR |
This pull request introduces support for building, packaging, and testing Debian
.debpackages for the project. It includes updates to the GitHub Actions workflow, theMakefile, and a new script for verifying reproducibility of Debian packages. Below are the most important changes grouped by theme:GitHub Actions Workflow Enhancements
x86_64-unknown-linux-gnu-debandaarch64-unknown-linux-gnu-deb) to the matrix in.github/workflows/release.yml. These targets include settings for architecture-specific GCC packages and Rust targets.cargo-debfor.debpackage creation..debartifacts as part of the release process. [1] [2]Makefile Updates for Debian Packaging
Makefiletargets for building.debpackages (deb-cargo,deb-cargo-x86_64,deb-cargo-aarch64, anddeb-cargo-all), testing reproducibility, and installing or removing packages locally.clean-debtarget to clean up Debian packaging artifacts and ahelp-debtarget to display Debian-specific build instructions.Reproducibility Testing
scripts/test-deb-reproducible.shto test the reproducibility of.debpackages by comparing two builds and runningdiffoscopefor detailed analysis if differences are found.Documentation and Release Notes
.github/workflows/release.ymlto include information about Debian packages, their installation instructions, and links to PGP signatures and checksums.These changes streamline the process of building and distributing Debian packages, ensuring reproducibility and providing clear documentation for end-users.