>:| still not working

This commit is contained in:
Mitsuba100
2026-03-23 15:58:07 +01:00
parent e1a0e5b114
commit a7b6795a46

View File

@@ -27,7 +27,7 @@ jobs:
- name: Update Repository Database - name: Update Repository Database
run: | run: |
cd x86_64 cd x86_64
# Remove old DB and sig files for a clean build # Remove all old DB and sig files to ensure a 100% clean rebuild
rm -f hyprarch-repo.db* hyprarch-repo.files* rm -f hyprarch-repo.db* hyprarch-repo.files*
mkdir -p db_temp mkdir -p db_temp
@@ -37,13 +37,14 @@ jobs:
gpg --detach-sign --batch --no-armor --local-user 236328A7F2C2001E "$pkg" gpg --detach-sign --batch --no-armor --local-user 236328A7F2C2001E "$pkg"
# 2. Extract specific metadata (Strict Cleaning) # 2. Extract specific metadata (Strict Cleaning)
# This logic avoids grabbing comments like "# Generated by..."
pkgname=$(bsdtar -xOf "$pkg" .PKGINFO | grep "^pkgname =" | cut -d' ' -f3) pkgname=$(bsdtar -xOf "$pkg" .PKGINFO | grep "^pkgname =" | cut -d' ' -f3)
pkgver=$(bsdtar -xOf "$pkg" .PKGINFO | grep "^pkgver =" | cut -d' ' -f3) pkgver=$(bsdtar -xOf "$pkg" .PKGINFO | grep "^pkgver =" | cut -d' ' -f3)
pkgdesc=$(bsdtar -xOf "$pkg" .PKGINFO | grep "^pkgdesc =" | cut -d' ' -f3- | sed "s/['\"]//g") pkgdesc=$(bsdtar -xOf "$pkg" .PKGINFO | grep "^pkgdesc =" | cut -d' ' -f3- | sed "s/['\"]//g")
mkdir -p "db_temp/$pkgname-$pkgver" mkdir -p "db_temp/$pkgname-$pkgver"
# Manually construct the 'desc' file to avoid "unknown key" errors # Manually construct a clean 'desc' file for Pacman
{ {
echo "%NAME%" echo "%NAME%"
echo "$pkgname" echo "$pkgname"
@@ -69,7 +70,7 @@ jobs:
} > "db_temp/$pkgname-$pkgver/desc" } > "db_temp/$pkgname-$pkgver/desc"
done done
# 3. Compress the metadata into a real Arch DB # 3. Pack the database metadata
cd db_temp cd db_temp
tar -c * | gzip -9 > ../hyprarch-repo.db.tar.gz tar -c * | gzip -9 > ../hyprarch-repo.db.tar.gz
cd .. cd ..
@@ -77,10 +78,11 @@ jobs:
# 4. Sign the database itself # 4. Sign the database itself
gpg --detach-sign --batch --no-armor --local-user 236328A7F2C2001E hyprarch-repo.db.tar.gz gpg --detach-sign --batch --no-armor --local-user 236328A7F2C2001E hyprarch-repo.db.tar.gz
# 5. Finalize files # 5. Finalize files (Ensure both .db and .files are clean)
cp hyprarch-repo.db.tar.gz hyprarch-repo.db cp hyprarch-repo.db.tar.gz hyprarch-repo.db
cp hyprarch-repo.db.tar.gz.sig hyprarch-repo.db.sig cp hyprarch-repo.db.tar.gz.sig hyprarch-repo.db.sig
cp hyprarch-repo.db.tar.gz hyprarch-repo.files cp hyprarch-repo.db.tar.gz hyprarch-repo.files
cp hyprarch-repo.db.tar.gz hyprarch-repo.files.tar.gz
rm -rf db_temp rm -rf db_temp
- name: Generate Subfolder Index - name: Generate Subfolder Index
@@ -137,7 +139,7 @@ jobs:
git config --global user.email "github-actions[bot]@users.noreply.github.com" git config --global user.email "github-actions[bot]@users.noreply.github.com"
git add . git add .
if ! git diff-index --quiet HEAD; then if ! git diff-index --quiet HEAD; then
git commit -m "Final Fix: Clean Metadata and GPG Signed DB" git commit -m "Final Infrastructure Fix: Clean DB/Files and GPG Signing"
git push git push
else else
echo "Nothing to change." echo "Nothing to change."