feat(workflows): add manual package removal workflow#20
Conversation
Adds a workflow_dispatch workflow for manually removing packages from specific distributions in the APT repository. Features: - Manual trigger with inputs for package name, distribution, and architecture - Removes .deb files from the specified distribution pool - Rebuilds repository metadata (Packages, Release files) - Re-signs the repository - Commits and pushes changes Usage: Go to Actions → Remove Package → Run workflow - Enter package name (e.g., cockpit-apt) - Select distribution (stable, unstable, trixie-unstable, etc.) - Select architecture (all, arm64, amd64) Use case: Remove packages that were published to wrong distributions or need to be yanked from the repository. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
There was a problem hiding this comment.
Pull Request Overview
This PR adds a manually-triggered GitHub Actions workflow for removing packages from the APT repository. The workflow allows operators to clean up incorrectly published packages or remove packages that need to be yanked from specific distributions.
Key Changes:
- New workflow with manual trigger (
workflow_dispatch) accepting package name, distribution, and architecture inputs - Implements package removal, metadata regeneration, and repository re-signing
- Creates audit trail through Git commits showing who triggered the removal and what was removed
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| # Sign Release file | ||
| echo "Signing Release file..." | ||
| gpg --default-key "$GPG_KEY_ID" --armor --detach-sign --yes -o Release.gpg Release |
There was a problem hiding this comment.
The GPG signing command is missing the --batch flag that's used in the existing update-repo.yml workflow. This flag prevents GPG from prompting for user input, which is important for automation.
Add the --batch flag for consistency:
gpg --batch --yes --default-key "$GPG_KEY_ID" --armor --detach-sign -o Release.gpg Release| gpg --default-key "$GPG_KEY_ID" --armor --detach-sign --yes -o Release.gpg Release | |
| gpg --batch --default-key "$GPG_KEY_ID" --armor --detach-sign --yes -o Release.gpg Release |
| PACKAGE="${{ github.event.inputs.package_name }}" | ||
| DIST="${{ github.event.inputs.distribution }}" | ||
| ARCH="${{ github.event.inputs.architecture }}" | ||
|
|
There was a problem hiding this comment.
The package name input is not validated and is directly used in shell commands and file operations. A malicious actor could potentially inject shell commands or path traversal sequences (e.g., ../../../etc/passwd).
Add input validation before using the package name:
PACKAGE="${{ github.event.inputs.package_name }}"
# Validate package name (only allow alphanumeric, dash, underscore, dot)
if ! [[ "$PACKAGE" =~ ^[a-zA-Z0-9._+-]+$ ]]; then
echo "❌ Invalid package name. Only alphanumeric characters, dots, dashes, underscores, and plus signs are allowed."
exit 1
fi| # Validate package name (only allow alphanumeric, dot, dash, underscore, plus) | |
| if ! [[ "$PACKAGE" =~ ^[a-zA-Z0-9._+-]+$ ]]; then | |
| echo "❌ Invalid package name. Only alphanumeric characters, dots, dashes, underscores, and plus signs are allowed." | |
| exit 1 | |
| fi |
| ARCH_DIR="dists/$DIST/main/binary-$arch" | ||
| if [ -d "$ARCH_DIR" ]; then | ||
| echo "Generating Packages file for $arch..." | ||
| dpkg-scanpackages --arch $arch "pool/$DIST/main" /dev/null > "$ARCH_DIR/Packages" |
There was a problem hiding this comment.
The dpkg-scanpackages command uses a different path pattern than the existing update-repo.yml workflow. The existing workflow uses dpkg-scanpackages -a $arch "pool/$dist/" /dev/null, scanning the entire pool directory for the distribution.
For consistency with the existing workflow (update-repo.yml line 275), consider using:
dpkg-scanpackages -a $arch "pool/$DIST/" /dev/null > "$ARCH_DIR/Packages" 2>/dev/null || touch "$ARCH_DIR/Packages"Also add the || touch fallback to handle cases where no packages exist, preventing the Packages file from being empty/nonexistent.
| dpkg-scanpackages --arch $arch "pool/$DIST/main" /dev/null > "$ARCH_DIR/Packages" | |
| dpkg-scanpackages --arch $arch "pool/$DIST/" /dev/null > "$ARCH_DIR/Packages" 2>/dev/null || touch "$ARCH_DIR/Packages" |
| if [ -d "$ARCH_DIR" ]; then | ||
| echo "Generating Packages file for $arch..." | ||
| dpkg-scanpackages --arch $arch "pool/$DIST/main" /dev/null > "$ARCH_DIR/Packages" | ||
| gzip -9c "$ARCH_DIR/Packages" > "$ARCH_DIR/Packages.gz" |
There was a problem hiding this comment.
The gzip command uses different flags than the existing update-repo.yml workflow. The existing workflow uses gzip -kf which keeps the original file and forces overwrite, while this uses -9c with output redirection.
For consistency with the existing workflow (update-repo.yml line 276), use:
gzip -kf "$ARCH_DIR/Packages"This is simpler and consistent with the rest of the codebase.
| gzip -9c "$ARCH_DIR/Packages" > "$ARCH_DIR/Packages.gz" | |
| gzip -kf "$ARCH_DIR/Packages" |
| options: | ||
| - all | ||
| - arm64 | ||
| - amd64 |
There was a problem hiding this comment.
The amd64 architecture is listed as an option, but the existing update-repo.yml workflow only creates and manages arm64 and all architectures. This means if a user tries to remove an amd64 package, the workflow will fail because the binary-amd64 directory doesn't exist in the repository structure.
Either remove amd64 from the options if it's not supported, or ensure the workflow can handle it properly:
options:
- all
- arm64| - amd64 |
| find "$POOL_DIR" -name "${PACKAGE}_*_${ARCH}.deb" -type f | while read -r debfile; do | ||
| echo " Removing: $debfile" | ||
| rm -f "$debfile" | ||
| REMOVED_COUNT=$((REMOVED_COUNT + 1)) | ||
| done |
There was a problem hiding this comment.
The REMOVED_COUNT variable is being incremented inside a subshell created by the while read loop in a pipe. This means the counter will not persist outside the loop, and line 73 will always evaluate to 0.
To fix this, use process substitution instead:
while read -r debfile; do
echo " Removing: $debfile"
rm -f "$debfile"
REMOVED_COUNT=$((REMOVED_COUNT + 1))
done < <(find "$POOL_DIR" -name "${PACKAGE}_*_${ARCH}.deb" -type f)| find "$POOL_DIR" -name "${PACKAGE}_*_${ARCH}.deb" -type f | while read -r debfile; do | |
| echo " Removing: $debfile" | |
| rm -f "$debfile" | |
| REMOVED_COUNT=$((REMOVED_COUNT + 1)) | |
| done | |
| while read -r debfile; do | |
| echo " Removing: $debfile" | |
| rm -f "$debfile" | |
| REMOVED_COUNT=$((REMOVED_COUNT + 1)) | |
| done < <(find "$POOL_DIR" -name "${PACKAGE}_*_${ARCH}.deb" -type f) |
| echo "MD5Sum:" >> Release | ||
| find main -type f | while read file; do | ||
| md5sum "$file" | awk '{print " " $1 " " size " " file}' size=$(stat -c%s "$file" 2>/dev/null || stat -f%z "$file") file="$file" >> Release | ||
| done | ||
|
|
||
| echo "SHA256:" >> Release | ||
| find main -type f | while read file; do | ||
| sha256sum "$file" | awk '{print " " $1 " " size " " file}' size=$(stat -c%s "$file" 2>/dev/null || stat -f%z "$file") file="$file" >> Release | ||
| done | ||
|
|
There was a problem hiding this comment.
The manual checksum generation using find, awk, and stat is complex and error-prone. The existing update-repo.yml workflow uses apt-ftparchive release . which automatically generates all checksums (MD5Sum, SHA256, SHA512) in the correct format.
Replace lines 116-125 with:
# Add checksums
apt-ftparchive release . >> ReleaseThis is simpler, more reliable, and consistent with the existing workflow.
| echo "MD5Sum:" >> Release | |
| find main -type f | while read file; do | |
| md5sum "$file" | awk '{print " " $1 " " size " " file}' size=$(stat -c%s "$file" 2>/dev/null || stat -f%z "$file") file="$file" >> Release | |
| done | |
| echo "SHA256:" >> Release | |
| find main -type f | while read file; do | |
| sha256sum "$file" | awk '{print " " $1 " " size " " file}' size=$(stat -c%s "$file" 2>/dev/null || stat -f%z "$file") file="$file" >> Release | |
| done | |
| apt-ftparchive release . >> Release |
| # Sign Release file | ||
| echo "Signing Release file..." | ||
| gpg --default-key "$GPG_KEY_ID" --armor --detach-sign --yes -o Release.gpg Release | ||
| gpg --default-key "$GPG_KEY_ID" --armor --detach-sign --yes --clearsign -o InRelease Release |
There was a problem hiding this comment.
The GPG command incorrectly combines --detach-sign with --clearsign. The --clearsign option creates an inline signature, not a detached signature, so these options are mutually exclusive.
The correct command based on the existing update-repo.yml workflow should be:
gpg --default-key "$GPG_KEY_ID" --batch --yes --clear-sign -o InRelease ReleaseNote: Also removed --armor since --clear-sign already produces ASCII-armored output.
| gpg --default-key "$GPG_KEY_ID" --armor --detach-sign --yes --clearsign -o InRelease Release | |
| gpg --default-key "$GPG_KEY_ID" --batch --yes --clear-sign -o InRelease Release |
Fixes all 8 issues identified by Copilot code review: Security: - Add input validation for package name (prevents injection attacks) Only allows alphanumeric, dots, dashes, underscores, plus signs Bug Fixes: - Fix REMOVED_COUNT subshell issue using process substitution - Remove unsupported amd64 architecture from options - Fix GPG InRelease command (remove --detach-sign, use --clear-sign) Consistency: - Add --batch flag to GPG signing commands - Use dpkg-scanpackages with "pool/$DIST/" path pattern - Use gzip -kf instead of -9c for consistency - Use apt-ftparchive for checksums instead of manual generation All changes align with existing update-repo.yml workflow patterns for consistency across the codebase. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 9 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| DESCRIPTION="Hat Labs Stable APT Repository" | ||
| ;; | ||
| unstable) | ||
| SUITE="unstable" | ||
| CODENAME="unstable" | ||
| DESCRIPTION="Hat Labs Unstable APT Repository" | ||
| ;; | ||
| bookworm-stable) | ||
| SUITE="stable" | ||
| CODENAME="bookworm" | ||
| DESCRIPTION="Hat Labs Bookworm Stable APT Repository" | ||
| ;; | ||
| bookworm-unstable) | ||
| SUITE="unstable" | ||
| CODENAME="bookworm" | ||
| DESCRIPTION="Hat Labs Bookworm Unstable APT Repository" | ||
| ;; | ||
| trixie-stable) | ||
| SUITE="stable" | ||
| CODENAME="trixie" | ||
| DESCRIPTION="Hat Labs Trixie Stable APT Repository" | ||
| ;; | ||
| trixie-unstable) | ||
| SUITE="unstable" | ||
| CODENAME="trixie" | ||
| DESCRIPTION="Hat Labs Trixie Unstable APT Repository" | ||
| ;; | ||
| *) | ||
| SUITE="$DIST" | ||
| CODENAME="$DIST" | ||
| DESCRIPTION="Hat Labs APT Repository" |
There was a problem hiding this comment.
The Description field is inconsistent with the existing update-repo.yml workflow. In update-repo.yml (lines 290-310), the descriptions use "Hat Labs product packages (stable)" and "Halos packages for Debian" for versioned distributions. This inconsistency could confuse users. Consider aligning with the existing format used in update-repo.yml.
| DESCRIPTION="Hat Labs Stable APT Repository" | |
| ;; | |
| unstable) | |
| SUITE="unstable" | |
| CODENAME="unstable" | |
| DESCRIPTION="Hat Labs Unstable APT Repository" | |
| ;; | |
| bookworm-stable) | |
| SUITE="stable" | |
| CODENAME="bookworm" | |
| DESCRIPTION="Hat Labs Bookworm Stable APT Repository" | |
| ;; | |
| bookworm-unstable) | |
| SUITE="unstable" | |
| CODENAME="bookworm" | |
| DESCRIPTION="Hat Labs Bookworm Unstable APT Repository" | |
| ;; | |
| trixie-stable) | |
| SUITE="stable" | |
| CODENAME="trixie" | |
| DESCRIPTION="Hat Labs Trixie Stable APT Repository" | |
| ;; | |
| trixie-unstable) | |
| SUITE="unstable" | |
| CODENAME="trixie" | |
| DESCRIPTION="Hat Labs Trixie Unstable APT Repository" | |
| ;; | |
| *) | |
| SUITE="$DIST" | |
| CODENAME="$DIST" | |
| DESCRIPTION="Hat Labs APT Repository" | |
| DESCRIPTION="Hat Labs product packages (stable)" | |
| ;; | |
| unstable) | |
| SUITE="unstable" | |
| CODENAME="unstable" | |
| DESCRIPTION="Hat Labs product packages (unstable)" | |
| ;; | |
| bookworm-stable) | |
| SUITE="stable" | |
| CODENAME="bookworm" | |
| DESCRIPTION="Hat Labs product packages (bookworm-stable)" | |
| ;; | |
| bookworm-unstable) | |
| SUITE="unstable" | |
| CODENAME="bookworm" | |
| DESCRIPTION="Hat Labs product packages (bookworm-unstable)" | |
| ;; | |
| trixie-stable) | |
| SUITE="stable" | |
| CODENAME="trixie" | |
| DESCRIPTION="Hat Labs product packages (trixie-stable)" | |
| ;; | |
| trixie-unstable) | |
| SUITE="unstable" | |
| CODENAME="trixie" | |
| DESCRIPTION="Hat Labs product packages (trixie-unstable)" | |
| ;; | |
| *) | |
| SUITE="$DIST" | |
| CODENAME="$DIST" | |
| DESCRIPTION="Hat Labs product packages ($DIST)" |
| SUITE="stable" | ||
| CODENAME="stable" | ||
| DESCRIPTION="Hat Labs Stable APT Repository" | ||
| ;; | ||
| unstable) | ||
| SUITE="unstable" | ||
| CODENAME="unstable" | ||
| DESCRIPTION="Hat Labs Unstable APT Repository" | ||
| ;; | ||
| bookworm-stable) | ||
| SUITE="stable" | ||
| CODENAME="bookworm" | ||
| DESCRIPTION="Hat Labs Bookworm Stable APT Repository" | ||
| ;; | ||
| bookworm-unstable) | ||
| SUITE="unstable" | ||
| CODENAME="bookworm" | ||
| DESCRIPTION="Hat Labs Bookworm Unstable APT Repository" | ||
| ;; | ||
| trixie-stable) | ||
| SUITE="stable" | ||
| CODENAME="trixie" | ||
| DESCRIPTION="Hat Labs Trixie Stable APT Repository" | ||
| ;; | ||
| trixie-unstable) | ||
| SUITE="unstable" |
There was a problem hiding this comment.
The Suite value is inconsistent with update-repo.yml. For bookworm-stable, this sets Suite="stable", but update-repo.yml (line 299) sets Suite="bookworm-stable" (using the full distribution name). This inconsistency could break APT repository functionality. The Suite should be set to "$DIST" instead of "stable" to match the existing workflow.
| SUITE="stable" | |
| CODENAME="stable" | |
| DESCRIPTION="Hat Labs Stable APT Repository" | |
| ;; | |
| unstable) | |
| SUITE="unstable" | |
| CODENAME="unstable" | |
| DESCRIPTION="Hat Labs Unstable APT Repository" | |
| ;; | |
| bookworm-stable) | |
| SUITE="stable" | |
| CODENAME="bookworm" | |
| DESCRIPTION="Hat Labs Bookworm Stable APT Repository" | |
| ;; | |
| bookworm-unstable) | |
| SUITE="unstable" | |
| CODENAME="bookworm" | |
| DESCRIPTION="Hat Labs Bookworm Unstable APT Repository" | |
| ;; | |
| trixie-stable) | |
| SUITE="stable" | |
| CODENAME="trixie" | |
| DESCRIPTION="Hat Labs Trixie Stable APT Repository" | |
| ;; | |
| trixie-unstable) | |
| SUITE="unstable" | |
| SUITE="$DIST" | |
| CODENAME="stable" | |
| DESCRIPTION="Hat Labs Stable APT Repository" | |
| ;; | |
| unstable) | |
| SUITE="$DIST" | |
| CODENAME="unstable" | |
| DESCRIPTION="Hat Labs Unstable APT Repository" | |
| ;; | |
| bookworm-stable) | |
| SUITE="$DIST" | |
| CODENAME="bookworm" | |
| DESCRIPTION="Hat Labs Bookworm Stable APT Repository" | |
| ;; | |
| bookworm-unstable) | |
| SUITE="$DIST" | |
| CODENAME="bookworm" | |
| DESCRIPTION="Hat Labs Bookworm Unstable APT Repository" | |
| ;; | |
| trixie-stable) | |
| SUITE="$DIST" | |
| CODENAME="trixie" | |
| DESCRIPTION="Hat Labs Trixie Stable APT Repository" | |
| ;; | |
| trixie-unstable) | |
| SUITE="$DIST" |
| SUITE="stable" | ||
| CODENAME="bookworm" | ||
| DESCRIPTION="Hat Labs Bookworm Stable APT Repository" | ||
| ;; | ||
| bookworm-unstable) | ||
| SUITE="unstable" | ||
| CODENAME="bookworm" | ||
| DESCRIPTION="Hat Labs Bookworm Unstable APT Repository" | ||
| ;; | ||
| trixie-stable) | ||
| SUITE="stable" | ||
| CODENAME="trixie" | ||
| DESCRIPTION="Hat Labs Trixie Stable APT Repository" | ||
| ;; | ||
| trixie-unstable) | ||
| SUITE="unstable" |
There was a problem hiding this comment.
The Suite value is inconsistent with update-repo.yml. For bookworm-unstable, this sets Suite="unstable", but update-repo.yml (line 299) sets Suite="bookworm-unstable" (using the full distribution name). This inconsistency could break APT repository functionality. The Suite should be set to "$DIST" instead of "unstable" to match the existing workflow.
| SUITE="stable" | |
| CODENAME="bookworm" | |
| DESCRIPTION="Hat Labs Bookworm Stable APT Repository" | |
| ;; | |
| bookworm-unstable) | |
| SUITE="unstable" | |
| CODENAME="bookworm" | |
| DESCRIPTION="Hat Labs Bookworm Unstable APT Repository" | |
| ;; | |
| trixie-stable) | |
| SUITE="stable" | |
| CODENAME="trixie" | |
| DESCRIPTION="Hat Labs Trixie Stable APT Repository" | |
| ;; | |
| trixie-unstable) | |
| SUITE="unstable" | |
| SUITE="$DIST" | |
| CODENAME="bookworm" | |
| DESCRIPTION="Hat Labs Bookworm Stable APT Repository" | |
| ;; | |
| bookworm-unstable) | |
| SUITE="$DIST" | |
| CODENAME="bookworm" | |
| DESCRIPTION="Hat Labs Bookworm Unstable APT Repository" | |
| ;; | |
| trixie-stable) | |
| SUITE="$DIST" | |
| CODENAME="trixie" | |
| DESCRIPTION="Hat Labs Trixie Stable APT Repository" | |
| ;; | |
| trixie-unstable) | |
| SUITE="$DIST" |
| SUITE="stable" | ||
| CODENAME="bookworm" | ||
| DESCRIPTION="Hat Labs Bookworm Stable APT Repository" | ||
| ;; | ||
| bookworm-unstable) | ||
| SUITE="unstable" | ||
| CODENAME="bookworm" | ||
| DESCRIPTION="Hat Labs Bookworm Unstable APT Repository" | ||
| ;; | ||
| trixie-stable) | ||
| SUITE="stable" | ||
| CODENAME="trixie" | ||
| DESCRIPTION="Hat Labs Trixie Stable APT Repository" | ||
| ;; | ||
| trixie-unstable) | ||
| SUITE="unstable" |
There was a problem hiding this comment.
The Suite value is inconsistent with update-repo.yml. For trixie-stable, this sets Suite="stable", but update-repo.yml (line 299) sets Suite="trixie-stable" (using the full distribution name). This inconsistency could break APT repository functionality. The Suite should be set to "$DIST" instead of "stable" to match the existing workflow.
| SUITE="stable" | |
| CODENAME="bookworm" | |
| DESCRIPTION="Hat Labs Bookworm Stable APT Repository" | |
| ;; | |
| bookworm-unstable) | |
| SUITE="unstable" | |
| CODENAME="bookworm" | |
| DESCRIPTION="Hat Labs Bookworm Unstable APT Repository" | |
| ;; | |
| trixie-stable) | |
| SUITE="stable" | |
| CODENAME="trixie" | |
| DESCRIPTION="Hat Labs Trixie Stable APT Repository" | |
| ;; | |
| trixie-unstable) | |
| SUITE="unstable" | |
| SUITE="$DIST" | |
| CODENAME="bookworm" | |
| DESCRIPTION="Hat Labs Bookworm Stable APT Repository" | |
| ;; | |
| bookworm-unstable) | |
| SUITE="$DIST" | |
| CODENAME="bookworm" | |
| DESCRIPTION="Hat Labs Bookworm Unstable APT Repository" | |
| ;; | |
| trixie-stable) | |
| SUITE="$DIST" | |
| CODENAME="trixie" | |
| DESCRIPTION="Hat Labs Trixie Stable APT Repository" | |
| ;; | |
| trixie-unstable) | |
| SUITE="$DIST" |
| DESCRIPTION="Hat Labs Trixie Stable APT Repository" | ||
| ;; | ||
| trixie-unstable) | ||
| SUITE="unstable" |
There was a problem hiding this comment.
The Suite value is inconsistent with update-repo.yml. For trixie-unstable, this sets Suite="unstable", but update-repo.yml (line 299) sets Suite="trixie-unstable" (using the full distribution name). This inconsistency could break APT repository functionality. The Suite should be set to "$DIST" instead of "unstable" to match the existing workflow.
| SUITE="unstable" | |
| SUITE="$DIST" |
| DESCRIPTION="Hat Labs Stable APT Repository" | ||
| ;; | ||
| unstable) | ||
| SUITE="unstable" | ||
| CODENAME="unstable" | ||
| DESCRIPTION="Hat Labs Unstable APT Repository" | ||
| ;; | ||
| bookworm-stable) | ||
| SUITE="stable" | ||
| CODENAME="bookworm" | ||
| DESCRIPTION="Hat Labs Bookworm Stable APT Repository" | ||
| ;; | ||
| bookworm-unstable) | ||
| SUITE="unstable" | ||
| CODENAME="bookworm" | ||
| DESCRIPTION="Hat Labs Bookworm Unstable APT Repository" | ||
| ;; | ||
| trixie-stable) | ||
| SUITE="stable" | ||
| CODENAME="trixie" | ||
| DESCRIPTION="Hat Labs Trixie Stable APT Repository" | ||
| ;; | ||
| trixie-unstable) | ||
| SUITE="unstable" | ||
| CODENAME="trixie" | ||
| DESCRIPTION="Hat Labs Trixie Unstable APT Repository" | ||
| ;; | ||
| *) | ||
| SUITE="$DIST" | ||
| CODENAME="$DIST" | ||
| DESCRIPTION="Hat Labs APT Repository" |
There was a problem hiding this comment.
The Description field is inconsistent with the existing update-repo.yml workflow. In update-repo.yml (lines 290-310), the descriptions use "Halos packages for Debian Bookworm (stable)" format. This inconsistency could confuse users. Consider aligning with the existing format used in update-repo.yml.
| DESCRIPTION="Hat Labs Stable APT Repository" | |
| ;; | |
| unstable) | |
| SUITE="unstable" | |
| CODENAME="unstable" | |
| DESCRIPTION="Hat Labs Unstable APT Repository" | |
| ;; | |
| bookworm-stable) | |
| SUITE="stable" | |
| CODENAME="bookworm" | |
| DESCRIPTION="Hat Labs Bookworm Stable APT Repository" | |
| ;; | |
| bookworm-unstable) | |
| SUITE="unstable" | |
| CODENAME="bookworm" | |
| DESCRIPTION="Hat Labs Bookworm Unstable APT Repository" | |
| ;; | |
| trixie-stable) | |
| SUITE="stable" | |
| CODENAME="trixie" | |
| DESCRIPTION="Hat Labs Trixie Stable APT Repository" | |
| ;; | |
| trixie-unstable) | |
| SUITE="unstable" | |
| CODENAME="trixie" | |
| DESCRIPTION="Hat Labs Trixie Unstable APT Repository" | |
| ;; | |
| *) | |
| SUITE="$DIST" | |
| CODENAME="$DIST" | |
| DESCRIPTION="Hat Labs APT Repository" | |
| DESCRIPTION="Halos packages for Debian Stable (stable)" | |
| ;; | |
| unstable) | |
| SUITE="unstable" | |
| CODENAME="unstable" | |
| DESCRIPTION="Halos packages for Debian Unstable (unstable)" | |
| ;; | |
| bookworm-stable) | |
| SUITE="stable" | |
| CODENAME="bookworm" | |
| DESCRIPTION="Halos packages for Debian Bookworm (stable)" | |
| ;; | |
| bookworm-unstable) | |
| SUITE="unstable" | |
| CODENAME="bookworm" | |
| DESCRIPTION="Halos packages for Debian Bookworm (unstable)" | |
| ;; | |
| trixie-stable) | |
| SUITE="stable" | |
| CODENAME="trixie" | |
| DESCRIPTION="Halos packages for Debian Trixie (stable)" | |
| ;; | |
| trixie-unstable) | |
| SUITE="unstable" | |
| CODENAME="trixie" | |
| DESCRIPTION="Halos packages for Debian Trixie (unstable)" | |
| ;; | |
| *) | |
| SUITE="$DIST" | |
| CODENAME="$DIST" | |
| DESCRIPTION="Halos packages for Debian $DIST" |
| DESCRIPTION="Hat Labs Stable APT Repository" | ||
| ;; | ||
| unstable) | ||
| SUITE="unstable" | ||
| CODENAME="unstable" | ||
| DESCRIPTION="Hat Labs Unstable APT Repository" | ||
| ;; | ||
| bookworm-stable) | ||
| SUITE="stable" | ||
| CODENAME="bookworm" | ||
| DESCRIPTION="Hat Labs Bookworm Stable APT Repository" | ||
| ;; | ||
| bookworm-unstable) | ||
| SUITE="unstable" | ||
| CODENAME="bookworm" | ||
| DESCRIPTION="Hat Labs Bookworm Unstable APT Repository" | ||
| ;; | ||
| trixie-stable) | ||
| SUITE="stable" | ||
| CODENAME="trixie" | ||
| DESCRIPTION="Hat Labs Trixie Stable APT Repository" | ||
| ;; | ||
| trixie-unstable) | ||
| SUITE="unstable" | ||
| CODENAME="trixie" | ||
| DESCRIPTION="Hat Labs Trixie Unstable APT Repository" | ||
| ;; | ||
| *) | ||
| SUITE="$DIST" | ||
| CODENAME="$DIST" | ||
| DESCRIPTION="Hat Labs APT Repository" |
There was a problem hiding this comment.
The Description field is inconsistent with the existing update-repo.yml workflow. In update-repo.yml (lines 290-310), the descriptions use "Halos packages for Debian Trixie (stable)" format. This inconsistency could confuse users. Consider aligning with the existing format used in update-repo.yml.
| DESCRIPTION="Hat Labs Stable APT Repository" | |
| ;; | |
| unstable) | |
| SUITE="unstable" | |
| CODENAME="unstable" | |
| DESCRIPTION="Hat Labs Unstable APT Repository" | |
| ;; | |
| bookworm-stable) | |
| SUITE="stable" | |
| CODENAME="bookworm" | |
| DESCRIPTION="Hat Labs Bookworm Stable APT Repository" | |
| ;; | |
| bookworm-unstable) | |
| SUITE="unstable" | |
| CODENAME="bookworm" | |
| DESCRIPTION="Hat Labs Bookworm Unstable APT Repository" | |
| ;; | |
| trixie-stable) | |
| SUITE="stable" | |
| CODENAME="trixie" | |
| DESCRIPTION="Hat Labs Trixie Stable APT Repository" | |
| ;; | |
| trixie-unstable) | |
| SUITE="unstable" | |
| CODENAME="trixie" | |
| DESCRIPTION="Hat Labs Trixie Unstable APT Repository" | |
| ;; | |
| *) | |
| SUITE="$DIST" | |
| CODENAME="$DIST" | |
| DESCRIPTION="Hat Labs APT Repository" | |
| DESCRIPTION="Halos packages for Debian Stable (stable)" | |
| ;; | |
| unstable) | |
| SUITE="unstable" | |
| CODENAME="unstable" | |
| DESCRIPTION="Halos packages for Debian Unstable (unstable)" | |
| ;; | |
| bookworm-stable) | |
| SUITE="stable" | |
| CODENAME="bookworm" | |
| DESCRIPTION="Halos packages for Debian Bookworm (stable)" | |
| ;; | |
| bookworm-unstable) | |
| SUITE="unstable" | |
| CODENAME="bookworm" | |
| DESCRIPTION="Halos packages for Debian Bookworm (unstable)" | |
| ;; | |
| trixie-stable) | |
| SUITE="stable" | |
| CODENAME="trixie" | |
| DESCRIPTION="Halos packages for Debian Trixie (stable)" | |
| ;; | |
| trixie-unstable) | |
| SUITE="unstable" | |
| CODENAME="trixie" | |
| DESCRIPTION="Halos packages for Debian Trixie (unstable)" | |
| ;; | |
| *) | |
| SUITE="$DIST" | |
| CODENAME="$DIST" | |
| DESCRIPTION="Halos packages for Debian $DIST" |
|
|
||
| cat > Release <<EOF | ||
| Origin: Hat Labs | ||
| Label: Hat Labs |
There was a problem hiding this comment.
The Label field value "Hat Labs" is inconsistent with the existing update-repo.yml workflow, which uses "Hat Labs APT Repository" (line 315). This inconsistency could cause confusion. Consider using "Hat Labs APT Repository" to match the existing workflow.
| Label: Hat Labs | |
| Label: Hat Labs APT Repository |
| cat > Release <<EOF | ||
| Origin: Hat Labs | ||
| Label: Hat Labs | ||
| Suite: $SUITE | ||
| Codename: $CODENAME | ||
| Architectures: arm64 all | ||
| Components: main | ||
| Description: $DESCRIPTION | ||
| Date: $(date -Ru) | ||
| EOF |
There was a problem hiding this comment.
The Release file is missing the "Version: 1.0" field that's present in the update-repo.yml workflow (line 318). For consistency across workflows, consider adding this field after the Codename line.
Summary
Adds a manually-triggered workflow for removing packages from specific distributions in the APT repository.
Use Case
This workflow is needed to clean up packages that were:
unstableinstead oftrixie-unstable)Features
Manual Trigger with Inputs:
package_name: Name of package to remove (e.g., cockpit-apt)distribution: Target distribution (stable, unstable, trixie-unstable, etc.)architecture: Package architecture (all, arm64, amd64)Workflow Steps:
Usage
Example: Remove cockpit-apt from unstable
This will remove the
cockpit-aptpackage that was incorrectly published tounstable/main(should have beentrixie-unstable/main):Safety
🤖 Generated with Claude Code