diff --git a/.forgejo/workflows/build-libostree-backport.yml b/.forgejo/workflows/build-libostree-backport.yml index b6b99ba..b026ff2 100644 --- a/.forgejo/workflows/build-libostree-backport.yml +++ b/.forgejo/workflows/build-libostree-backport.yml @@ -161,8 +161,34 @@ jobs: curl -v -H "Authorization: Bearer ${{ secrets.ACCESS_TOKEN }}" \ "https://git.raines.xyz/api/v1/repos/robojerk/libostree-dev/packages" 2>&1 + - name: Upload to Debian Package Registry (Primary) + run: | + echo "=== Attempting Debian Package Registry upload ===" + + # 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 Debian Package Registry..." + + # Extract filename for the package + filename=$(basename "$deb_file") + + echo "File: $filename" + + # Upload to Forgejo's Debian Package Registry using proper endpoint + # PUT https://forgejo.example.com/api/packages/{owner}/debian/pool/{distribution}/{component}/upload + curl --user "robojerk:${{ secrets.ACCESS_TOKEN }}" \ + --upload-file "$deb_file" \ + "https://git.raines.xyz/api/packages/robojerk/debian/pool/noble/main/upload" + + echo "Debian Package Registry upload completed for $deb_file" + fi + done + - name: Upload to Generic Package Registry (Fallback) run: | + echo "=== Attempting Generic Package Registry upload (fallback) ===" + # Upload each .deb package to Forgejo's Generic Package Registry for deb_file in release-assets/*.deb; do if [ -f "$deb_file" ]; then @@ -183,6 +209,6 @@ jobs: --upload-file "$deb_file" \ "https://git.raines.xyz/api/packages/robojerk/generic/$package_name/$version/$filename" - echo "Upload completed for $deb_file" + echo "Generic Package Registry upload completed for $deb_file" fi done \ No newline at end of file diff --git a/check-workflow.sh b/check-workflow.sh new file mode 100755 index 0000000..eb6e4be --- /dev/null +++ b/check-workflow.sh @@ -0,0 +1,41 @@ +#!/bin/bash + +echo "=== Forgejo Workflow Status Checker ===" +echo "" + +echo "1. Check if workflow is running..." +echo " Visit: https://git.raines.xyz/robojerk/libostree-dev/actions" +echo "" + +echo "2. Check latest workflow run logs..." +echo " Look for the most recent 'Build libostree Backport' run" +echo " Click on it to see the detailed logs" +echo "" + +echo "3. Look for these specific sections in the logs:" +echo " - 'Test API endpoints' step" +echo " - 'Upload to Generic Package Registry' step" +echo " - Any error messages or HTTP status codes" +echo "" + +echo "4. Common issues to check:" +echo " - Authentication errors (401, 403)" +echo " - Endpoint not found (404)" +echo " - Network connectivity issues" +echo "" + +echo "5. If you see errors, please share:" +echo " - The exact error messages" +echo " - HTTP status codes" +echo " - Any API response content" +echo "" + +echo "=== Quick Commands ===" +echo "To check if Forgejo is running:" +echo "docker ps | grep forgejo" +echo "" +echo "To check Forgejo logs:" +echo "docker logs forgejo" +echo "" +echo "To restart Forgejo with new config:" +echo "docker-compose down && docker-compose up -d" \ No newline at end of file diff --git a/update-libostree-readme.sh b/update-libostree-readme.sh new file mode 100755 index 0000000..2ca5cef --- /dev/null +++ b/update-libostree-readme.sh @@ -0,0 +1,170 @@ +#!/bin/bash + +# Script to update libostree-dev README with latest build information +# This works around the Forgejo workflow input field issue + +set -e + +# Configuration +REPO_URL="https://git.raines.xyz/robojerk/libostree-dev" +WORKFLOW_RUN_ID="11" # Latest successful build +BUILD_DATE=$(date -u '+%Y-%m-%d %H:%M:%S UTC') +VERSION="2025.2-1~noble1" + +# Colors for output +GREEN='\033[0;32m' +BLUE='\033[0;34m' +YELLOW='\033[1;33m' +NC='\033[0m' + +echo -e "${BLUE}Updating libostree-dev README with latest build information...${NC}" + +# Create the updated README content +cat > README.md << 'EOF' +# libostree-dev Backport + +Compiles a backport of libostree-dev for Ubuntu Noble. + +## Source and Target + +- **Source**: Ubuntu "Questing Quokka" (questing) - libostree 2025.2-1 +- **Target**: Ubuntu "Noble Numbat" (noble) - Ubuntu 24.04 LTS + +## For Debian + +- **Source**: Debian sid +- **Target**: Debian trixie + +## Usage + +This repository contains the CI/CD workflow and scripts to build a backport of libostree 2025.2-1 for Ubuntu Noble, which is required for bootc compatibility. + +## 📦 Download Latest Build + +**Last Built**: 2025-07-21 07:35:00 UTC +**Version**: 2025.2-1~noble1 +**Target**: Ubuntu Noble (24.04 LTS) +**Build ID**: [11](https://git.raines.xyz/robojerk/libostree-dev/actions/runs/11) + +### ⚠️ Important Note + +The CI/CD workflow successfully builds the packages, but there are currently issues with the Forgejo Package Registry uploads. The packages are built successfully but not yet accessible via direct download links. + +### Current Status + +- ✅ **Build Process**: Working correctly +- ✅ **Package Creation**: All packages built successfully +- ❌ **Package Registry**: Upload issues being resolved +- 🔄 **Manual Download**: Available via workflow artifacts + +### How to Get the Packages + +#### Option 1: Download from Workflow Artifacts (Current) +Since the package registry uploads are having issues, you can download the packages directly from the workflow artifacts: + +1. **Go to the Actions page**: https://git.raines.xyz/robojerk/libostree-dev/actions +2. **Find the latest successful build** (Build #11) +3. **Click on the build** to view details +4. **Download the artifacts** (if available) or check the build logs for package locations + +#### Option 2: Build Locally (Recommended) +The most reliable way to get the packages is to build them locally: + +```bash +# Clone the repository +git clone https://git.raines.xyz/robojerk/libostree-dev.git +cd libostree-dev + +# Run the backport script +./libostree-dev_noble_backport.sh +``` + +#### Option 3: Manual Build Process +If you prefer to build manually: + +```bash +# Install build dependencies +sudo apt update +sudo apt install -y devscripts build-essential wget git + +# Create build directory +mkdir -p /opt/Projects/ostree-backport-noble +cd /opt/Projects/ostree-backport-noble + +# Download source from Ubuntu Questing +wget http://archive.ubuntu.com/ubuntu/pool/universe/o/ostree/ostree_2025.2-1.dsc +wget http://archive.ubuntu.com/ubuntu/pool/universe/o/ostree/ostree_2025.2.orig.tar.xz +wget http://archive.ubuntu.com/ubuntu/pool/universe/o/ostree/ostree_2025.2-1.debian.tar.xz + +# Extract and build +dpkg-source -x ostree_2025.2-1.dsc +cd ostree-2025.2 +dch --newversion "2025.2-1~noble1" --distribution "noble-backports" -b "Backport for bootc compatibility" +sudo apt build-dep ./ +dpkg-buildpackage -us -uc -b +``` + +### Available Packages + +The build creates these packages: +- `gir1.2-ostree-1.0_2025.2-1~noble1_amd64.deb` +- `libostree-1-1_2025.2-1~noble1_amd64.deb` +- `libostree-dev_2025.2-1~noble1_amd64.deb` +- `libostree-doc_2025.2-1~noble1_all.deb` +- `ostree-boot_2025.2-1~noble1_amd64.deb` +- `ostree-tests_2025.2-1~noble1_amd64.deb` +- `ostree_2025.2-1~noble1_amd64.deb` + +### Installation Instructions + +1. **Download or build the packages** using one of the methods above +2. **Install the packages**: + ```bash + sudo dpkg -i *.deb + sudo apt --fix-broken install -y + ``` +3. **Verify installation**: + ```bash + dpkg -l | grep libostree + pkg-config --modversion ostree-1 + ``` + +### Build Information + +- **Source Version**: 2025.2-1 from Ubuntu Questing +- **Target Distribution**: Ubuntu Noble (24.04 LTS) +- **Build Date**: 2025-07-21 07:35:00 UTC +- **Build Status**: ✅ Success (packages built) +- **Registry Status**: 🔄 Upload issues being resolved +- **Packages Built**: 7 packages (main + debug symbols) + +### Troubleshooting + +If you encounter issues: + +1. **Check package dependencies**: `sudo apt --fix-broken install -y` +2. **Verify libostree version**: `pkg-config --modversion ostree-1` +3. **Check for conflicts**: `dpkg -l | grep libostree` +4. **Reboot if needed**: Some applications may need a reboot to use the new libostree version + +### Future Improvements + +- 🔧 Fix Forgejo Package Registry upload issues +- 📦 Enable direct download links +- 🔄 Automate package distribution +- 📋 Improve build documentation + +--- + +*This backport is required for bootc compatibility on Ubuntu Noble. See [bootc-deb repository](https://git.raines.xyz/robojerk/bootc-deb) for the bootc package that uses this libostree backport.* +EOF + +echo -e "${GREEN}README.md updated with accurate build information!${NC}" +echo -e "${YELLOW}Note: Package registry uploads are currently having issues.${NC}" +echo -e "${BLUE}The README now includes:${NC}" +echo " - Accurate status of build vs registry uploads" +echo " - Multiple ways to get the packages" +echo " - Local build instructions" +echo " - Troubleshooting guide" +echo "" +echo -e "${BLUE}You can now commit and push this updated README to the repository.${NC}" \ No newline at end of file