-
Notifications
You must be signed in to change notification settings - Fork 169
Reproducible builds by default + DEB packaging #747
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
base: develop
Are you sure you want to change the base?
Conversation
Signed-off-by: bakhtin <[email protected]>
Signed-off-by: bakhtin <[email protected]>
Signed-off-by: bakhtin <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces reproducible builds by default and adds Debian package support to the rbuilder project. The changes enable deterministic binary builds on x86_64 platforms and provide Debian packaging for rbuilder-operator
and bid-scraper
components.
- Refactored Makefile to use a new
reproducible
profile by default on x86_64, with fallback torelease
profile on other architectures - Added Debian packaging configuration and build targets for distributing binaries as
.deb
packages - Updated CI pipeline to use reproducible builds and publish Debian packages as artifacts
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
Makefile | Added architecture detection, reproducible build flags, and Debian packaging targets |
Cargo.toml | Added new reproducible profile inheriting from release with optimizations for deterministic builds |
crates/*/Cargo.toml | Added Debian package metadata configuration for rbuilder-operator and bid-scraper |
crates/*/pkg/ | Added systemd service files and default configuration files for Debian packages |
.github/workflows/release.yaml | Updated CI to use reproducible builds and publish Debian packages |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
# Optimize for modern CPUs | ||
RUST_BUILD_FLAGS += -C target-cpu=x86-64-v3 | ||
# Remove build ID from the binary to ensure reproducibility across builds | ||
RUST_BUILD_FLAGS += -C link-arg=-Wl,--build-id=none | ||
# Remove metadata hash from symbol names to ensure reproducible builds | ||
RUST_BUILD_FLAGS += -C metadata='' | ||
# Remap paths to ensure reproducible builds |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inconsistent indentation: Line 44 uses tabs, while line 45 uses mixed tabs and spaces. Use consistent tab indentation for all lines in this section.
# Optimize for modern CPUs | |
RUST_BUILD_FLAGS += -C target-cpu=x86-64-v3 | |
# Remove build ID from the binary to ensure reproducibility across builds | |
RUST_BUILD_FLAGS += -C link-arg=-Wl,--build-id=none | |
# Remove metadata hash from symbol names to ensure reproducible builds | |
RUST_BUILD_FLAGS += -C metadata='' | |
# Remap paths to ensure reproducible builds | |
# Optimize for modern CPUs | |
RUST_BUILD_FLAGS += -C target-cpu=x86-64-v3 | |
# Remove build ID from the binary to ensure reproducibility across builds | |
RUST_BUILD_FLAGS += -C link-arg=-Wl,--build-id=none | |
# Remove metadata hash from symbol names to ensure reproducible builds | |
RUST_BUILD_FLAGS += -C metadata='' | |
# Remap paths to ensure reproducible builds |
Copilot uses AI. Check for mistakes.
RUST_BUILD_FLAGS += -C link-arg=-Wl,--build-id=none | ||
# Remove metadata hash from symbol names to ensure reproducible builds | ||
RUST_BUILD_FLAGS += -C metadata='' | ||
# Remap paths to ensure reproducible builds |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inconsistent indentation: Line 51 uses tabs and spaces while line 52 uses only spaces. Use consistent tab indentation for all lines in this section.
# Remap paths to ensure reproducible builds | |
# Remap paths to ensure reproducible builds |
Copilot uses AI. Check for mistakes.
📝 Summary
Refactor Makefile and release CI pipeline to build binaries reproducibly
💡 Motivation and Context
Makefile
Refactor Makefile to build binaries reproducibly.
make build
will now applyreproducible
profile by default onx86_64
platform. On other platformsrelease
profile is used.reproducible
profile is a new profile I added toCargo.toml
. It inherits fromrelease
tweaking options for reproducibility.Previously,
make build
built for thedev
profile.dev
builds will now have a separatemake build-dev
target.I added separate targets for packaging binaries into Debian (*.deb) packages.
deb
packages are also reproducible.Release pipeline
Updated release pipeline to support building the new targets. Publish
deb
packages after the successful build. Onlyrbuilder-operator
andbid-scraper
are packaged.Switched to explicitly using Ubuntu 24 instead of the
latest
to avoid compatibility issues (e.g., with glibc).✅ I have completed the following steps:
make lint
make test