Repository navigation
feat(packaging): add the shared nfpm and check-descriptions actions - #13
Merged
Merged
Conversation
Builds rpm or deb packages from nfpm configurations, caches them and optionally uploads them. It relies on the variable expansion, the signing rule and the target option of nfpm instead of editing the configurations.
mushroomempires
previously approved these changes
Nov 27, 2026
tuntoja
previously approved these changes
Nov 30, 2026
The check of centreon, centreon-collect and centreon-modules, unchanged: every nfpm package must have its own synopsis and rpm summary.
Same errors as the Python script, without PyYAML nor the temporary environment that installed it.
This reverts commit ea27ab6.
tuntoja
approved these changes
Nov 30, 2026
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.
Description
Two more actions for the
packagingpackage. First,packaging/nfpm, the shared version of the localpackage-nfpm/packageactions (6 repositories, 15 variants once their maintained branches are counted). Both go in the samepackaging1.0.0 release asparse-distrib.${COMMIT_HASH}and their other values as variables (withexpand: trueon thecontentsentries using one in a path), the key file variable decides the signature, and--targetwrites the packages in the working directory.@APACHE_USER@/@APACHE_GROUP@: nfpm does not read the owner of a file from the environment.deb_release,deb_copyrightandallow_unsigned. What a single repository needs stays in its workflows; the README lists, per repository, the inputs and the changes its switch needs.The switch of a repository therefore changes its configurations too (
@COMMIT_HASH@to${COMMIT_HASH}, and for a few@luaver@or@PHP_MIN_VERSION@to variables), in the same pull request as its workflows.Second,
packaging/check-descriptions: thecheck-package-descriptions.pyscript that centreon, centreon-collect and centreon-modules each carry (identical on 11 branches), moved here unchanged. Every nfpm package must have its own synopsis and rpm summary. It needs PyYAML: it uses the one of the runner, installs a pinned version in a temporary environment when there is none, and fails with a clear message when it cannot.Behavior changes of
packaging/nfpma reviewer cannot guess from the diff:key.gpgin the workspace.allow_unsigned: "true"builds it unsigned instead, which centreon needs for the pull requests coming from forks. The key is only written for an rpm build.@UPPERCASE@placeholder left in a configuration fails the step in every repository; centreon-agent had no such check.package_extensionandstabilityare no longer inputs.NEXT_MAJOR_VERSIONneeds no branch-specific code: six months later before 26.10, the next month since.<release>+deb12u1instead of<release>~bookworm, which Debian sorts as newer for the same release.description(2.38.0 and before ship${COMMIT_HASH}as is). The repositories use 2.41.0 to 2.43.4, except centreon-stream-connector-scripts (2.35.2), which upgrades when it switches.actions/cache/savev6.1.0; the callers restore them with older versions of the action.Equivalence with the local copies:
develop,dev-26.10.x,dev-25.10.x,dev-24.10.xof centreon, centreon-collect, centreon-modules;developof centreon-plugins, centreon-stream-connector-scripts, centreon-agent) was run next to this script with a stand-in of nfpm, on 7 distributions, 4 stabilities and several versions, the configurations of the shared side being written the new way.LUA_VERSIONvariable, and the suffix of its debs, changed on purpose.descriptionandcontentspaths withexpand: trueare expanded, the owner of a file is not, empty key variables build an unsigned rpm, and a passphrase-protected key gives an rpm carrying RSA and PGP signatures.Tests and checks:
lintbuilds a real, unsigned package with nfpm 2.43.4 inside Debian and AlmaLinux containers, cache step included, and runs the description check on the package definition of this repository.Not covered here, to check when the callers switch:
Fixes: MON-216366