Skip to content

feat: Add reproducible Debian package builds and distribution - #7617

Open
MoeMahhouk wants to merge 50 commits into
sigp:unstablefrom
MoeMahhouk:deb-packaging
Open

feat: Add reproducible Debian package builds and distribution#7617
MoeMahhouk wants to merge 50 commits into
sigp:unstablefrom
MoeMahhouk:deb-packaging

Conversation

@MoeMahhouk

@MoeMahhouk MoeMahhouk commented Jun 17, 2025

Copy link
Copy Markdown
Contributor

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
Comment thread lighthouse/lighthouse.service Outdated
Comment thread lighthouse/lighthouse.service Outdated
Comment thread lighthouse/lighthouse.service Outdated
Comment thread lighthouse/lighthouse.service Outdated
@@ -0,0 +1,188 @@
name: reproducible-build

Copy link
Copy Markdown

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
Copy Markdown

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
Copy Markdown
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
Copy Markdown

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
Copy Markdown
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
@MoeMahhouk
MoeMahhouk marked this pull request as ready for review January 8, 2026 14:42
@chong-he

Copy link
Copy Markdown
Member

cargo sort CI is failing, can you fix this?

@MoeMahhouk is this still a work in progress?

@chong-he , yes it is. I will open it up for review this week after clearing up some feedback. Then I would like to get your and your team's feedback on it to bring it to final shape

cargo sort CI is failing, can you fix this?

@chong-he chong-he added waiting-on-author The reviewer has suggested changes and awaits thier implementation. and removed work-in-progress PR is a work-in-progress labels Jan 12, 2026
@MoeMahhouk

Copy link
Copy Markdown
Contributor Author

cargo sort CI is failing, can you fix this?

@MoeMahhouk is this still a work in progress?

@chong-he , yes it is. I will open it up for review this week after clearing up some feedback. Then I would like to get your and your team's feedback on it to bring it to final shape

cargo sort CI is failing, can you fix this?

Done

@chong-he chong-he added ready-for-review The code is ready for review and removed waiting-on-author The reviewer has suggested changes and awaits thier implementation. labels Jan 14, 2026
@chong-he

Copy link
Copy Markdown
Member

I have a look at this PR, from my understanding, this will include a .deb package in the release alongside with other binary files?

I am wondering what is the use case here?

@MoeMahhouk

Copy link
Copy Markdown
Contributor Author

I have a look at this PR, from my understanding, this will include a .deb package in the release alongside with other binary files?

I am wondering what is the use case here?

The use case here is that those reproducibly built debian packages can be utilized to accelerate workflows that require building images that includes lighthouse. For example, BuilderNet VM image. In mkosi, you could use debian packages during the image build process which would reduce the build time substantially. Beside that use case, there are also other use-cases for such users that prefer downloading and installing lighthouse using debian packages. In addition, the binary within is built reproducibly for security purposes.
There are probably other use-cases too but those that come to my mind now. Maybe @bakhtin could also share more here

@bakhtin

bakhtin commented Jan 26, 2026

Copy link
Copy Markdown

@chong-he I agree with what Moe described regarding the use-cases for a *.deb package. It also makes easier for people running nodes to install a *.deb package that comes with a systemd service definition baking in basic CLI options of Lighthouse simplifying managing the service.

MoeMahhouk and others added 4 commits February 9, 2026 12:31
Removes changes from sigp#7892 (beacon head monitor), sigp#8748 (bootnode fix),
and sigp#8749 (v8.1.0 release) that were inadvertently pulled in by merging
stable into this branch. These are not part of the deb-packaging work.
@mergify

mergify Bot commented Feb 10, 2026

Copy link
Copy Markdown

This pull request has merge conflicts. Could you please resolve them @MoeMahhouk? 🙏

@mergify mergify Bot added waiting-on-author The reviewer has suggested changes and awaits thier implementation. and removed ready-for-review The code is ready for review labels Feb 10, 2026
@dapplion

Copy link
Copy Markdown
Collaborator

Cleaned up unrelated changes that were pulled into the PR diff by merging stable into this branch. The stable branch contained commits from #7892 (beacon head monitor), #8748 (bootnode fix), and #8749 (v8.1.0 release) that reached unstable through a different merge path, causing them to show up as part of this PR's diff.

Merged latest upstream unstable and reset all non-deb-packaging files to match, so the PR diff now only contains the intended changes:

  • .github/workflows/docker-reproducible.yml — extract .deb artifacts
  • .github/workflows/release-reproducible.yml — sign and publish workflow
  • Dockerfile.reproducible — build .deb in Docker
  • Makefile — deb packaging targets
  • lighthouse/Cargo.toml — cargo-deb metadata
  • lighthouse/debian/lighthouse.service — systemd unit
  • lighthouse/debian/prerm — pre-removal script

@chong-he chong-he added ready-for-review The code is ready for review and removed waiting-on-author The reviewer has suggested changes and awaits thier implementation. labels Feb 10, 2026
@niccoloraspa

Copy link
Copy Markdown

Could we get this merged before next release? We would really love to use deb packages 🙏

@antondlr

Copy link
Copy Markdown
Member

@MoeMahhouk sorry for the silence on this, but it's been on my mind, and I'd like to propose a different direction: see #9147
I'd very much appreciate your input on this matter!

@MoeMahhouk

MoeMahhouk commented May 4, 2026

Copy link
Copy Markdown
Contributor Author

@MoeMahhouk sorry for the silence on this, but it's been on my mind, and I'd like to propose a different direction: see #9147 I'd very much appreciate your input on this matter!

@antondlr No problems, thanks for revisiting this PR back.
I have reviewed your proposal PR and left you comments directly on it.
If I see correctly, the proposal PR does a solid refactoring but it missed the purpose of this PR which is debian packaging.
Is that not wanted anymore?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

infra-ci ready-for-review The code is ready for review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants