Repository navigation
feat(packaging): add RPM and Debian packages for the server - #515
Merged
Merged
Conversation
- .goreleaser.yml: the config is config|noreplace. Plain config is %config in the rpm, so an upgrade shipping a changed example replaced the edited file (old one saved as .rpmsave) and the restart in postinstall then ran on CHANGE_ME. - The config holds the database password and was installed 0644: ship it 0640 and chgrp it to openartifact in postinstall (every install and upgrade, since an upgrade replaces an unedited conffile). - postinstall generates OPENARTIFACT_SECRET_KEY once into /etc/openartifact/openartifact.env (0640 root:openartifact, not packaged, so removal keeps it); the unit loads it with EnvironmentFile=-. Without it upstream passwords, webhook secrets and signing keys were stored unencrypted. - Drop mise.toml: no SPDX header (REUSE check fails), unrelated to packaging and a second place pinning Go/bun (bun 1.4.5 vs BUN_VERSION 1.4.4 in CI). - docs: rpm file names carry the release (-1), sudoedit instead of Debian-only editor, config permissions and the secret key file. Tested: GoReleaser snapshot; dpkg -i on debian:13 and dnf/rpm on fedora 45 (rpm 6.1): user, 0750 state dirs, 0640 root:openartifact config and env file, an edited config kept over a reinstall with a changed example (.dpkg-dist / .rpmnew), key unchanged, verify passes as the openartifact user, removal keeps the env file.
Collaborator
|
Thanks @hgomez, this is a good addition. I built it with a GoReleaser snapshot and installed the packages in
Smaller changes:
What the container tests confirmed: the user exists, the state directories are |
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
.deband.rpmserver packages via GoReleasernfpms(x86_64 + aarch64), next to the existing tar.gz/zip archivespackaging/server/{postinstall,preremove}.shandpackaging/systemd/openartifact.servicefor systemd installsdist/*.deb,dist/*.rpm) inrelease.ymldocs/getting-started/installation.mdTesting
dist/openartifact-0.0.0~SNAPSHOT_73f6d81c-1.{x86_64,aarch64}.rpmproduced.deb/.rpmverified against the packaging scripts (postinstall/preremove, systemd unit)