fix: Small changes affecting packaging and cleanup#2641
fix: Small changes affecting packaging and cleanup#2641Syedowais312 wants to merge 3 commits intounikraft:stagingfrom
Conversation
fb76d9d to
5714893
Compare
|
Hi @nderjung @craciunoiuc, |
nderjung
left a comment
There was a problem hiding this comment.
Please see our contribution guidelines for commit hygiene.
824da23 to
2b2e350
Compare
2b2e350 to
f0c3303
Compare
craciunoiuc
left a comment
There was a problem hiding this comment.
some more comments my side
| CONFIG="${HOME}/.config/kraftkit/config.yaml" | ||
|
|
||
| # Defaults | ||
| CACHE_DIR="${HOME}/.cache/kraftkit" | ||
| DATA_DIR="${HOME}/.local/share/kraftkit" |
There was a problem hiding this comment.
Clean up for other users also
There was a problem hiding this comment.
Do you want cleanup to apply only to the invoking user, or also root’s home when KraftKit was used via sudo? I want to avoid removing unrelated users’ data
There was a problem hiding this comment.
Pull request overview
Adds package-removal cleanup for KraftKit by shipping a helper script via nfpm and wiring it into the Debian postrm hook, aiming to remove user runtime artifacts on uninstall/purge.
Changes:
- Add
scripts/cleanup-artifacts.shand install it as/usr/libexec/kraftkit/cleanup-artifactsin nfpm packages - Add
packaging/deb/postrmand register it as the nfpmpostremovescript - Update GoReleaser configs (stable + staging) to include the helper + postremove hook (and adjust build tags/ignore matrix)
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 7 comments.
| File | Description |
|---|---|
| scripts/cleanup-artifacts.sh | Cleanup helper that attempts to derive artifact directories from config and delete them |
| packaging/deb/postrm | Debian post-remove maintainer script invoking cleanup and deleting config on purge |
| .goreleaser-staging.yaml | nfpm packaging updates to ship helper and run postremove hook |
| .goreleaser-stable.yaml | nfpm packaging updates to ship helper and run postremove hook |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: syedowais312 <syedowais312sf@gmail.com>
Signed-off-by: syedowais312 <syedowais312sf@gmail.com>
f0c3303 to
8d1acbc
Compare
|
Please do a pass and click |
Install the cleanup-artifacts helper in the package and register the preremove and postremove scripts. Enable container image storage and openpgp plugins. Signed-off-by: syedowais312 <syedowais312sf@gmail.com>
8d1acbc to
1a59a58
Compare
Done. I have reviewed the comments and resolved the conversations where the issues have been addressed. The suggested changes that made sense have been applied... |
Summary
Clean up leftover runtime artifacts when the KraftKit package is
removed or purged.
Changes
postrmhookTesting
.deb, verified artifactscloses: #2550