apkbuilds @ dea84da8bb781552be49070a56deb87234bbb399

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).
diff --git a/pkgkit b/pkgkit
index 9fd7a69e427016a722ece5d9b1eb6b1702a8cd39..735d1771910ccbd73fefe9c132df7bc665b3c8fe 100755
--- a/pkgkit
+++ b/pkgkit
@@ -253,20 +253,24 @@
 	. /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
 )