Skip to content

Add local Debian package build - #7

Open
mhumeSF wants to merge 4 commits into
mainfrom
mh/local-deb-packaging
Open

mhumeSF wants to merge 4 commits into
mainfrom
mh/local-deb-packaging

Conversation

@mhumeSF

@mhumeSF mhumeSF commented Aug 31, 2026

Copy link
Copy Markdown

Adds a containerized Debian package build for the archive services. Everything installs under package-private paths (/usr/lib/monad-services, monad-services-* units), so the package follows Debian policy on /usr/local and co-installs with the monad package without conflicts.

Copilot AI lite review requested due to automatic review settings August 31, 2026 19:29

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds a containerized workflow to build a local monad-services Debian package, including a builder image, packaging script, and systemd unit files under package-private install paths.

Changes:

  • Introduces make deb / make deb-host flows and supporting Dockerfiles for building .deb artifacts.
  • Adds Debian packaging staging logic (binaries + bundled shared libs + control generation) and versioning via git metadata.
  • Adds systemd service units and DEBIAN maintainer scripts into the packaged payload.

Reviewed changes

Copilot reviewed 16 out of 17 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
scripts/package-version Generates Debian version string from last git commit timestamp + short SHA.
scripts/build-deb Stages binaries/libs + Debian metadata and builds the .deb.
scripts/build-binaries Builds release Rust binaries with pinned toolchain/environment.
Makefile Adds targets to build binaries, build builder image, and produce .deb locally or via container.
docker/debian-package/Dockerfile Containerized packaging layer (dpkg tools + patchelf) producing /out artifacts.
docker/builder/Dockerfile Builder toolchain image (Rust + C/C++ deps) for reproducible binary builds.
debian/usr/share/doc/monad-services/copyright Adds Debian copyright metadata.
debian/usr/lib/systemd/system/monad-services-*.service Adds systemd units for the four services pointing to /usr/lib/monad-services/*.
debian/DEBIAN/control.in Control file template with version and computed shlibs depends.
debian/DEBIAN/postinst Maintainer script to reload systemd on configure.
debian/DEBIAN/prerm Maintainer script to stop units on remove/deconfigure.
debian/DEBIAN/postrm Maintainer script to reload/reset-failed units on remove/purge.
.gitignore Ignores dist/ output directory.
.dockerignore Excludes .git, target/, and dist/ from docker build contexts.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread scripts/build-deb Outdated
Comment thread debian/usr/lib/systemd/system/monad-services-archiver.service
Comment thread debian/usr/lib/systemd/system/monad-services-indexer.service
Comment thread debian/usr/lib/systemd/system/monad-services-block-writer.service
Comment thread debian/DEBIAN/prerm
Comment thread debian/DEBIAN/postrm
Comment thread debian/DEBIAN/postinst
@mhumeSF
mhumeSF force-pushed the mh/local-deb-packaging branch 2 times, most recently from 8e90392 to 7ce6f36 Compare August 31, 2026 19:53
Everything installs under package-private paths: /usr/lib/monad-services
binaries and libraries, monad-services-* units, /etc/default/monad-services
config. Debian policy forbids touching /usr/local, and the monad package
owns the archive binary and unit names there, so the private paths satisfy
policy and let the two packages co-install. The monad user is provisioned
outside the package.
Policy 12.5 and 12.7 require both under /usr/share/doc; the changelog is
a stub pointing at the git history.
docker/builder carries everything make build needs, mirroring monad-bft;
the debian-package layer adds only packaging tools on top.
The release profile sets debug = true, so each unstripped binary is
375 MB against 30 MB stripped. Set STRIP_SYMBOLS=0 to keep the symbols.
@mhumeSF
mhumeSF force-pushed the mh/local-deb-packaging branch from c29fce6 to 23cb933 Compare August 31, 2026 20:25
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.

2 participants