Skip to content

feat: Add reproducible Debian package builds and distribution #7617

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

Draft
wants to merge 8 commits into
base: unstable
Choose a base branch
from

Conversation

MoeMahhouk
Copy link
Contributor

@MoeMahhouk MoeMahhouk commented Jun 17, 2025

Issue Addressed

This pull request introduces workflows and configuration updates to automate the building, testing, and releasing of reproducible Debian packages for the Lighthouse project. Below are the key changes grouped by theme:

New GitHub Actions Workflows

  • Debian Package Release Workflow: Added .github/workflows/release-deb.yml to automate the building, testing, and releasing of reproducible Debian packages for multiple architectures (x86_64 and aarch64). Includes steps for dry-run testing, artifact uploads, and checksum generation.

Proposed Changes

  • Added the required configuration for cargo-deb in lighthouse's Cargo.toml.
  • Added Makefile targets to build the debian packages for different architectures and test their reproducibility
  • Added CI workflow release-deb.yml that builds and pushes the debian packages into assets similar to release-reproducible.yml
  • Added a simple lighthouse.service to be included in the generated lighthouse debian package

Additional Info

This is an incremental work on #7614 and requires it to be merged first

close #7618

@MoeMahhouk MoeMahhouk changed the title Deb packaging feat: Add reproducible Debian package builds and distribution Jun 17, 2025
Type=simple
DynamicUser=true
User=lighthouse
Group=eth
Copy link

Choose a reason for hiding this comment

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

Suggested change
Group=eth
Group=lighthouse

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I thought we wanted to pack, lighthouse, reth and rbuilder in the same group, right?

RestartSec=5
TimeoutStopSec=180
Environment="RUST_LOG=info"
ExecStart=/usr/bin/lighthouse \
Copy link

Choose a reason for hiding this comment

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

You should not assume any specific use-case of a service. I'd simplify it to /usr/bin/lighthouse bn

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah, this is just a dummy/simple systemd service file that will be anyway overwritten during deplyoments as we discussed offline, right?
Otherwise, how would you suggest it to be? just /usr/bin/lighthouse --help?

@@ -0,0 +1,188 @@
name: reproducible-build
Copy link

Choose a reason for hiding this comment

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

I'd avoid imposing a responsibility for verifying reproducibility to third-parties (Lighthouse team in this case). Those who have reproducibility requirements should independently verify it relying on their infra.

Copy link

Choose a reason for hiding this comment

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

The variance in the environment is not sufficient to say that the builds are reproducible. Check out how Debian independently verify reproducibility by building on different OSes with a variable set of tools.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I also followed here the steps of reth and how they are doing it here https://github.com/paradigmxyz/reth/blob/main/.github/workflows/reproducible-build.yml
However, good point on if the lighthouse team would want this to be as part of their workflow or not. I would leave it for them to decide and then we can re-iterate on what the best way to do it

@@ -0,0 +1,142 @@
name: release-reproducible
Copy link

Choose a reason for hiding this comment

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

Can we make reproducible builds a default for Lighthouse? Not an additional target requiring extra effort to support

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I created a separate workflow for the reproducible container builds as separation of concerns similar to what the reth team did here https://github.com/paradigmxyz/reth/blob/main/.github/workflows/release-reproducible.yml

@chong-he chong-he added work-in-progress PR is a work-in-progress infra-ci labels Jun 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infra-ci work-in-progress PR is a work-in-progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants