diff --git a/README.md b/README.md index 229822e..39653b3 100644 --- a/README.md +++ b/README.md @@ -38,17 +38,30 @@ All three installs end up running the same Docker container. **What you need:** Docker Engine. If you don't have it: `curl -fsSL https://get.docker.com | sh`. ```bash -# 1. Install the package -wget http://192.168.1.64:3000/tocmo0nlord/-/packages/debian/dupfinder/1.0.0/files/amd64/dupfinder_1.0.0_amd64.deb -sudo apt install ./dupfinder_1.0.0_amd64.deb +# 1. Add the Gitea apt repo +echo "deb [trusted=yes] http://192.168.1.64:3000/api/packages/tocmo0nlord/debian bookworm main" \ + | sudo tee /etc/apt/sources.list.d/dupfinder.list -# 2. Run first-time setup (asks for photos path + data path) +# 2. Install +sudo apt update +sudo apt install dupfinder + +# 3. Run first-time setup (asks for photos path + data path) sudo dupfinder setup -# 3. Start it +# 4. Start it sudo dupfinder start ``` +> The repo says `bookworm` (Debian 12). For Ubuntu/other distros the package still works — the codename in the URL is just how Gitea organizes the registry. + +> **One-shot install without the apt repo:** +> ```bash +> curl -u tocmo0nlord: -O \ +> http://192.168.1.64:3000/api/packages/tocmo0nlord/debian/pool/bookworm/main/dupfinder_1.0.0_amd64.deb +> sudo apt install ./dupfinder_1.0.0_amd64.deb +> ``` + **Manage the service:** | Command | What it does | diff --git a/debian/build-deb.sh b/debian/build-deb.sh index b8624ca..3174229 100644 --- a/debian/build-deb.sh +++ b/debian/build-deb.sh @@ -99,14 +99,14 @@ if [[ "$NO_UPLOAD" == "true" ]]; then fi info "Uploading to Gitea package registry..." -UPLOAD_URL="$GITEA_URL/api/packages/$GITEA_OWNER/debian/pool/$DISTRO/$COMPONENT" +# Gitea's Debian registry requires HTTP basic auth (user + token-as-password) +# and the literal /upload endpoint — token-bearer auth returns 405. +UPLOAD_URL="$GITEA_URL/api/packages/$GITEA_OWNER/debian/pool/$DISTRO/$COMPONENT/upload" HTTP_STATUS=$(curl -s -o /tmp/gitea_upload_response.txt -w "%{http_code}" \ - -X PUT \ - -H "Authorization: token $GITEA_TOKEN" \ - -H "Content-Type: application/octet-stream" \ - --data-binary @"$BUILD_DIR/$DEB_FILE" \ - "$UPLOAD_URL/$DEB_FILE") + -u "$GITEA_OWNER:$GITEA_TOKEN" \ + --upload-file "$BUILD_DIR/$DEB_FILE" \ + "$UPLOAD_URL") if [[ "$HTTP_STATUS" == "201" || "$HTTP_STATUS" == "200" ]]; then ok "Uploaded successfully (HTTP $HTTP_STATUS)"