feat: implement proper Debian Package Registry setup
All checks were successful
Build libostree Backport / Build libostree Backport (push) Successful in 9m55s
All checks were successful
Build libostree Backport / Build libostree Backport (push) Successful in 9m55s
Replace Generic Package Registry with proper Debian Package Registry using correct API endpoint and authentication. Update workflow to use POST method with form data and proper Bearer token authentication. Update README with professional apt repository setup including GPG key verification and proper installation instructions following Forgejo documentation.
This commit is contained in:
parent
9e4e1646e6
commit
fff0774835
2 changed files with 35 additions and 31 deletions
|
|
@ -138,27 +138,21 @@ jobs:
|
|||
apt-get update -y
|
||||
apt-get install -y curl
|
||||
|
||||
- name: Upload to Generic Package Registry
|
||||
- name: Upload to Debian Package Registry
|
||||
run: |
|
||||
# Upload each .deb package to Forgejo's Generic Package Registry
|
||||
# Upload each .deb package to Forgejo's Debian Package Registry
|
||||
for deb_file in release-assets/*.deb; do
|
||||
if [ -f "$deb_file" ]; then
|
||||
echo "Uploading $deb_file to Generic Package Registry..."
|
||||
echo "Uploading $deb_file to Debian Package Registry..."
|
||||
|
||||
# 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/generic/$package_name/$version/$filename"
|
||||
# Upload to Forgejo's Debian Package Registry using the correct API
|
||||
# POST /api/v1/repos/{owner}/{repo}/packages/debian
|
||||
curl -X POST \
|
||||
-H "Authorization: Bearer ${{ secrets.ACCESS_TOKEN }}" \
|
||||
-F "file=@$deb_file" \
|
||||
-F "distribution=noble" \
|
||||
-F "component=main" \
|
||||
"https://git.raines.xyz/api/v1/repos/robojerk/libostree-dev/packages/debian"
|
||||
|
||||
echo "Upload completed for $deb_file"
|
||||
fi
|
||||
|
|
|
|||
38
README.md
38
README.md
|
|
@ -33,17 +33,25 @@ This repository contains the CI/CD workflow and scripts to build a backport of l
|
|||
|
||||
**How to Download**:
|
||||
|
||||
### Option 1: Generic Package Registry (Recommended)
|
||||
Packages are available in Forgejo's Generic Package Registry:
|
||||
### Option 1: Debian Package Registry (Recommended)
|
||||
Packages are available in Forgejo's Debian Package Registry:
|
||||
|
||||
```bash
|
||||
# Add the repository
|
||||
echo "deb [signed-by=/etc/apt/keyrings/forgejo.gpg] https://git.raines.xyz/api/packages/robojerk/debian/ noble main" | sudo tee /etc/apt/sources.list.d/libostree-dev.list
|
||||
|
||||
# Add the GPG key
|
||||
sudo mkdir -p /etc/apt/keyrings/
|
||||
curl -fsSL https://git.raines.xyz/api/packages/robojerk/debian/Release.key | sudo gpg --dearmor -o /etc/apt/keyrings/forgejo.gpg
|
||||
|
||||
# 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
|
||||
|
|
@ -65,18 +73,20 @@ Download individual packages directly:
|
|||
### Installation
|
||||
|
||||
```bash
|
||||
# Option 1: Download and install from Generic Package Registry
|
||||
# Option 1: Install via Debian Package Registry (Recommended)
|
||||
echo "deb [signed-by=/etc/apt/keyrings/forgejo.gpg] https://git.raines.xyz/api/packages/robojerk/debian/ noble main" | sudo tee /etc/apt/sources.list.d/libostree-dev.list
|
||||
sudo mkdir -p /etc/apt/keyrings/
|
||||
curl -fsSL https://git.raines.xyz/api/packages/robojerk/debian/Release.key | sudo gpg --dearmor -o /etc/apt/keyrings/forgejo.gpg
|
||||
sudo apt update
|
||||
sudo apt install libostree-dev=2025.2-1~noble1
|
||||
|
||||
# Option 2: Manual download and install
|
||||
# 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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue