feat: switch to Generic Package Registry for reliable uploads
All checks were successful
Build libostree Backport / Build libostree Backport (push) Successful in 10m20s

Replace Debian Package Registry with Generic Package Registry for better
reliability and compatibility. Update workflow to use simpler API format
and organize packages by name/version. Update README with new download
instructions and direct package links.
This commit is contained in:
robojerk 2025-07-21 05:48:22 +00:00
parent e2eee01d08
commit 9e4e1646e6
2 changed files with 30 additions and 28 deletions

View file

@ -138,21 +138,27 @@ jobs:
apt-get update -y
apt-get install -y curl
- name: Upload to Debian Package Registry
- name: Upload to Generic Package Registry
run: |
# Upload each .deb package to Forgejo's Debian Package Registry
# Upload each .deb package to Forgejo's Generic Package Registry
for deb_file in release-assets/*.deb; do
if [ -f "$deb_file" ]; then
echo "Uploading $deb_file to Debian Package Registry..."
echo "Uploading $deb_file to Generic Package Registry..."
# Upload to Forgejo's Debian Package Registry using correct API
# PUT https://forgejo.example.com/api/packages/{owner}/debian/pool/{distribution}/{component}/upload
# Using Authorization: token header as per Forgejo documentation
curl -X PUT \
-H "Authorization: token ${{ secrets.ACCESS_TOKEN }}" \
-H "Content-Type: application/vnd.debian.binary-package" \
# Extract filename for the package
filename=$(basename "$deb_file")
package_name=$(echo "$filename" | cut -d'_' -f1)
version=$(echo "$filename" | cut -d'_' -f2 | cut -d'~' -f1)
echo "Package: $package_name"
echo "Version: $version"
echo "File: $filename"
# Upload to Forgejo's Generic Package Registry
# PUT https://forgejo.example.com/api/packages/{owner}/generic/{package_name}/{package_version}/{file_name}
curl --user "robojerk:${{ secrets.ACCESS_TOKEN }}" \
--upload-file "$deb_file" \
"https://git.raines.xyz/api/packages/robojerk/debian/pool/noble/main/upload"
"https://git.raines.xyz/api/packages/robojerk/generic/$package_name/$version/$filename"
echo "Upload completed for $deb_file"
fi

View file

@ -33,21 +33,17 @@ This repository contains the CI/CD workflow and scripts to build a backport of l
**How to Download**:
### Option 1: Debian Package Registry (Recommended)
Packages are available in Forgejo's Debian Package Registry:
### Option 1: Generic Package Registry (Recommended)
Packages are available in Forgejo's Generic Package Registry:
```bash
# Add the repository
echo "deb https://git.raines.xyz/api/packages/robojerk/debian/ noble main" | sudo tee /etc/apt/sources.list.d/libostree-dev.list
# Update and install
sudo apt update
sudo apt install libostree-dev=2025.2-1~noble1
```
### Option 2: Direct Download from Package Registry
Visit: https://git.raines.xyz/robojerk/libostree-dev/packages
### Option 2: Direct Download Links
Download individual packages directly:
- `libostree-dev_2025.2-1~noble1_amd64.deb` (105KB) - Main development package
- `libostree-1-1_2025.2-1~noble1_amd64.deb` (355KB) - Runtime library
- `ostree_2025.2-1~noble1_amd64.deb` (190KB) - Command line tools
### Available Packages:
- `libostree-dev_2025.2-1~noble1_amd64.deb` (105KB) - Main development package
- `libostree-1-1_2025.2-1~noble1_amd64.deb` (355KB) - Runtime library
@ -69,18 +65,18 @@ Visit: https://git.raines.xyz/robojerk/libostree-dev/packages
### Installation
```bash
# Option 1: Install via Debian Package Registry (Recommended)
echo "deb https://git.raines.xyz/api/packages/robojerk/debian/ noble main" | sudo tee /etc/apt/sources.list.d/libostree-dev.list
sudo apt update
sudo apt install libostree-dev=2025.2-1~noble1
# Option 2: Manual download and install
# Option 1: Download and install from Generic Package Registry
# 1. Visit: https://git.raines.xyz/robojerk/libostree-dev/packages
# 2. Download libostree-dev_2025.2-1~noble1_amd64.deb
# 3. Install:
sudo dpkg -i libostree-dev_2025.2-1~noble1_amd64.deb
sudo apt-get install -f # Install any missing dependencies
# Option 2: Direct download and install
wget https://git.raines.xyz/api/packages/robojerk/generic/libostree-dev/2025.2/libostree-dev_2025.2-1~noble1_amd64.deb
sudo dpkg -i libostree-dev_2025.2-1~noble1_amd64.deb
sudo apt-get install -f
# Verify installation
pkg-config --modversion ostree-1
# Should output: 2025.2