aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabriel Arakaki Giovanini <mail@gabrielgio.me>2022-10-14 21:55:10 +0200
committerGabriel Arakaki Giovanini <mail@gabrielgio.me>2022-10-14 22:01:58 +0200
commitdea84da8bb781552be49070a56deb87234bbb399 (patch)
treef8ba8fee3a07f1b4979caeb7e494815b473e6a06
parentdeb0273e93022c9dbbf8f0c0159139b273279b15 (diff)
downloadapkbuilds-dea84da8bb781552be49070a56deb87234bbb399.tar.gz
apkbuilds-dea84da8bb781552be49070a56deb87234bbb399.tar.bz2
apkbuilds-dea84da8bb781552be49070a56deb87234bbb399.zip
fix: Use local alpine to look for apks
Sourcehut's pkgkit was assuming that the remote server was alpine, thus running apk command to rewrite the remote alpine APKINDEX. This won't work on my setup since I have a fedora server (for now).
-rwxr-xr-xpkgkit24
1 files changed, 14 insertions, 10 deletions
diff --git a/pkgkit b/pkgkit
index 9fd7a69..735d177 100755
--- a/pkgkit
+++ b/pkgkit
@@ -253,20 +253,24 @@ update_index() (
. /etc/os-release
aver="$(get_aver)"
+ tmp_repo="/tmp/$aver/"
path="$remote_path/$aver/$arch"
set -x
- ssh "$remote" \
- find "$path" -type f -name '*.apk' -print0 |
- ssh "$remote" xargs -0 apk index \
- --rewrite-arch "$(uname -m)" \
- -x "$path"/APKINDEX.tar.gz \
- -o "$path"/APKINDEX.unsigned.tar.gz
+ # since my remote server is not alpine I have to download the repo localy
rsync --blocking-io -rP \
- "$remote:$path/APKINDEX.unsigned.tar.gz" \
- /tmp/APKINDEX.tar.gz
- abuild-sign /tmp/APKINDEX.tar.gz
- rsync --blocking-io -rP /tmp/APKINDEX.tar.gz "$remote:$path/"
+ "$remote:$path/" \
+ "$tmp_repo"
+
+ find "tmp_repo" -type f -name '*.apk' -print0 |
+ xargs -0 apk index \
+ --rewrite-arch "$(uname -m)" \
+ -x "$tmp_repo"/APKINDEX.tar.gz \
+ -o "$tmp_repo"/APKINDEX.unsigned.tar.gz
+
+ abuild-sign "$tmp_repo/APKINDEX.unsigned.tar.gz"
+ rsync --blocking-io -rP "$tmp_repo/APKINDEX.unsigned.tar.gz" \
+ "$remote:$path/APKINDEX.tar.gz"
set +x
)