From dea84da8bb781552be49070a56deb87234bbb399 Mon Sep 17 00:00:00 2001 From: Gabriel Arakaki Giovanini Date: Fri, 14 Oct 2022 21:55:10 +0200 Subject: 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). --- pkgkit | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) (limited to 'pkgkit') 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 ) -- cgit v1.2.3