aboutsummaryrefslogtreecommitdiff
path: root/pkgkit
diff options
context:
space:
mode:
authorGabriel Arakaki Giovanini <mail@gabrielgio.me>2022-12-26 15:20:41 +0100
committerGabriel Arakaki Giovanini <mail@gabrielgio.me>2022-12-26 15:20:41 +0100
commit49e92cf705771c2a47fed50f95b42ab65a49e77a (patch)
treebfea35471a544613b130fa77a8e4ca3f0427e243 /pkgkit
parentb13ca1652f870af62f05fbb7d455aab1898eab0a (diff)
downloadapkbuilds-49e92cf705771c2a47fed50f95b42ab65a49e77a.tar.gz
apkbuilds-49e92cf705771c2a47fed50f95b42ab65a49e77a.tar.bz2
apkbuilds-49e92cf705771c2a47fed50f95b42ab65a49e77a.zip
fix: Add jellyfin again
Diffstat (limited to 'pkgkit')
-rwxr-xr-xpkgkit36
1 files changed, 17 insertions, 19 deletions
diff --git a/pkgkit b/pkgkit
index 60d1474..4afc8e9 100755
--- a/pkgkit
+++ b/pkgkit
@@ -17,7 +17,7 @@ usage() {
get_pkgvar() (
var="$1"
-set +u
+ set +u
. APKBUILD
eval 'printf "%s\n" "$'"$var"'"'
)
@@ -93,8 +93,10 @@ add_repo() {
openssl genrsa -out "$key" 2048
)
fi
+ pkey="$(basename "$key").pub"
sudo openssl rsa -in $key -pubout \
- -out /etc/apk/keys/$(basename "$key").pub
+ -out /etc/apk/keys/"$pkey"
+ cp /etc/apk/keys/"$pkey" ~/.abuild/"$pkey"
if [ $set_default -eq 1 ]
then
echo "PACKAGER_PRIVKEY="'"'$key'"' >> \
@@ -225,7 +227,7 @@ upload_pkg() (
aver="$(get_aver)"
set -x
- path="$remote_path/$aver/$arch"
+ path="$remote_path/$aver/$repo/$arch"
ssh "$remote" mkdir -p "$path"
url=$(echo "$remote" | cut -d@ -f2)
@@ -253,24 +255,20 @@ update_index() (
. /etc/os-release
aver="$(get_aver)"
- tmp_repo="/tmp/$aver/"
- path="$remote_path/$aver/$arch"
-
- # since my remote server is not alpine I have to download the repo localy
- rsync --blocking-io -rP \
- "$remote:$path/" \
- "$tmp_repo"
+ path="$remote_path/$aver/$repo/$arch"
set -x
- 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"
+ 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
+ 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/"
set +x
)