Skip to content

Conversation

bakhtin
Copy link
Contributor

@bakhtin bakhtin commented Oct 3, 2025

📝 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 apply reproducible profile by default on x86_64 platform. On other platforms release profile is used.

reproducible profile is a new profile I added to Cargo.toml. It inherits from release tweaking options for reproducibility.

Previously, make build built for the dev profile. dev builds will now have a separate make 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. Only rbuilder-operator and bid-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:

  • Run make lint
  • Run make test
  • Added tests (if applicable)

Signed-off-by: bakhtin <[email protected]>
Signed-off-by: bakhtin <[email protected]>
Signed-off-by: bakhtin <[email protected]>
@bakhtin bakhtin changed the title DEB packaging Reproducible builds by default + DEB packaging Oct 3, 2025
@bakhtin bakhtin marked this pull request as ready for review October 3, 2025 18:23
@Copilot Copilot AI review requested due to automatic review settings October 3, 2025 18:23
@bakhtin bakhtin requested a review from sukoneck as a code owner October 3, 2025 18:23
Copy link
Contributor

@Copilot Copilot AI left a 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 to release 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.

Comment on lines +45 to +51
# 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
Copy link
Preview

Copilot AI Oct 3, 2025

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.

Suggested change
# 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
Copy link
Preview

Copilot AI Oct 3, 2025

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.

Suggested change
# Remap paths to ensure reproducible builds
# Remap paths to ensure reproducible builds

Copilot uses AI. Check for mistakes.

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.

1 participant