TOOLS-3662: ship astools.conf via copy-if-absent install script - #83
Merged
Conversation
Ship the shared astools.conf template as an owned sample under /opt/aerospike/doc/aql/ and seed /etc/aerospike/astools.conf from it only when the file is absent (deb/rpm post-install and macOS pkgbuild postinstall). The live file is deliberately not owned by the package, so the standalone tools and the aerospike-tools bundle coexist without conffile conflicts and user edits survive upgrades. Wired as both --after-install and --after-upgrade because fpm's deb template runs an install-only hook only on fresh configure. TOOLS-3662
The el8 minimal container has no cmp (diffutils); use a coreutils cat comparison instead so the content check runs everywhere.
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.
What
Standalone tool packages ship no
astools.conf, so a fresh install leaves the user without the config template. This adds it back without re-introducing conffile-ownership conflicts with theaerospike-toolsbundle.pkg/astools.conf.sample: byte-identical copy of the canonicaletc/astools.conftemplate.pkg/postinst.sh(deb--after-install+--after-upgrade, rpm%post): seeds/etc/aerospike/astools.conffrom/opt/aerospike/doc/aql/astools.conf.sampleonly when the file is absent.pkg/mac-scripts/postinstall: same copy-if-absent logic for the macOS.pkg, target-volume aware.pkg/Makefile: stage the owned sample under/opt/aerospike/doc/aql/(mac:/usr/local/aerospike/doc/aql/); wire the scripts.pkg/astools.conf.The live
/etc/aerospike/astools.confis deliberately not owned by the package. Result: standalone tools and theaerospike-toolsbundle coexist with no dpkg/rpm conflict over the path, and user edits are never touched.Wired as both
--after-installand--after-upgrade: fpm's deb template routes an install-only hook intoafter_upgrade()that never runs on upgrade or reinstall, so both are required for existing installs to get the file.Tests
New
.github/bin/test/test_astools_conf.batsruns in the linux and mac install jobs (kept out of the sharedtest_execute.bats, which is reused by the docker smoke job on the host):Docker smoke test asserts the image carries
/etc/aerospike/astools.conf.TOOLS-3662