diff --git a/README.md b/README.md index 9c2312b..d44b478 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,8 @@ [![Create Repo for RustDesk latest and nightly](https://github.com/xlionjuan/rustdesk-rpm-repo/actions/workflows/create-repo.yml/badge.svg)](https://github.com/xlionjuan/rustdesk-rpm-repo/actions/workflows/create-repo.yml) +[Click me if you're using SUSE](#rustdesk-rpm-suse-repo) + > [!IMPORTANT] > This is ***unofficial*** [RustDesk](https://github.com/rustdesk/rustdesk/) RPM repo, what I can say is *trust me bro*, it is your decision to trust me or not. @@ -66,3 +68,43 @@ to upgrade manually, still better than download manually. > [!CAUTION] > Don't asking me to doing this. + + + +# rustdesk-rpm-suse-repo + +> [!NOTE] +> Testing + +## Architectures +This repo provides two architectures + +* `amd64` (x86_64) +* `arm64` (aarch64) + +## Import RPM repo +### latest + +```bash +curl -fsSl https://xlionjuan.github.io/rustdesk-rpm-repo/latest-suse.repo | sudo tee /etc/zypp/repos.d/xlion-rustdesk-rpm-suse-repo.repo +``` + +### nightly + +```bash +curl -fsSl https://xlionjuan.github.io/rustdesk-rpm-repo/nightly-suse.repo | sudo tee /etc/zypp/repos.d/xlion-rustdesk-rpm-suse-repo.repo +``` + +## Install/Upgrade RustDesk + +```bash +sudo zypper in rustdesk +``` + +## Update to same version number of nightly + +Because RustDesk didn't change its version number or add special identify when releasing nightly, so you could run + +```bash +sudo zypper in --force rustdesk +``` \ No newline at end of file diff --git a/createrepo-latest.sh b/createrepo-latest.sh index e7af6e1..0becdef 100644 --- a/createrepo-latest.sh +++ b/createrepo-latest.sh @@ -1,10 +1,15 @@ #!/bin/bash +set -oue pipefail + # Sign RPM rpm --addsign wwwroot/latest/*.rpm +rpm --addsign wwwroot/latest-suse/*.rpm # Create repo createrepo_c wwwroot/latest +createrepo_c wwwroot/latest-suse # Sign Repo gpg --detach-sign --armor wwwroot/latest/repodata/repomd.xml +gpg --detach-sign --armor wwwroot/latest-suse/repodata/repomd.xml diff --git a/createrepo-nightly.sh b/createrepo-nightly.sh index ae51501..4af62f7 100644 --- a/createrepo-nightly.sh +++ b/createrepo-nightly.sh @@ -1,10 +1,15 @@ #!/bin/bash +set -oue pipefail + # Sign RPM rpm --addsign wwwroot/nightly/*.rpm +rpm --addsign wwwroot/nightly-suse/*.rpm # Create repo createrepo_c wwwroot/nightly +createrepo_c wwwroot/nightly-suse # Sign Repo gpg --detach-sign --armor wwwroot/nightly/repodata/repomd.xml +gpg --detach-sign --armor wwwroot/nightly-suse/repodata/repomd.xml diff --git a/rustdesk_latest.sh b/rustdesk_latest.sh index f14aec7..f4fa3fc 100644 --- a/rustdesk_latest.sh +++ b/rustdesk_latest.sh @@ -1,5 +1,7 @@ #!/bin/bash +set -oue pipefail + # Define the repository and the tag you want to fetch REPO="rustdesk/rustdesk" #TAG="latest" # Change this to any tag you want @@ -17,19 +19,17 @@ fi # Use jq to parse JSON data and find the asset URL RUSTDESK_URL_AMD64=$(echo "$RELEASE_DATA" | jq -r '.assets[] | select(.name | contains("x86_64") and endswith(".rpm") and (contains("suse") | not)) | .browser_download_url' | head -n 1) RUSTDESK_URL_ARM64=$(echo "$RELEASE_DATA" | jq -r '.assets[] | select(.name | contains("aarch64") and endswith(".rpm") and (contains("suse") | not)) | .browser_download_url' | head -n 1) - - -# Check if the asset URL was found -#if [ -z "$RUSTDESK_URL" ]; then -# echo "No matching file found." -#else -# echo "RUSTDESK_URL=\"$RUSTDESK_URL\"" -#fi +RUSTDESK_URL_AMD64_SUSE=$(echo "$RELEASE_DATA" | jq -r '.assets[] | select(.name | contains("x86_64") and endswith(".rpm") and contains("suse")) | .browser_download_url' | head -n 1) +RUSTDESK_URL_ARM64_SUSE=$(echo "$RELEASE_DATA" | jq -r '.assets[] | select(.name | contains("aarch64") and endswith(".rpm") and contains("suse")) | .browser_download_url' | head -n 1) echo "--------------------RESULT--------------------" echo "RUSTDESK_URL_AMD64=\"$RUSTDESK_URL_AMD64\"" echo "RUSTDESK_URL_ARM64=\"$RUSTDESK_URL_ARM64\"" +echo "RUSTDESK_URL_AMD64=\"$RUSTDESK_URL_AMD64_SUSE\"" +echo "RUSTDESK_URL_ARM64=\"$RUSTDESK_URL_ARM64_SUSE\"" echo "" echo "------------------DOWNLOADING-----------------" wget -P wwwroot/latest $RUSTDESK_URL_AMD64 wget -P wwwroot/latest $RUSTDESK_URL_ARM64 +wget -P wwwroot/latest-suse $RUSTDESK_URL_AMD64_SUSE +wget -P wwwroot/latest-suse $RUSTDESK_URL_ARM64_SUSE diff --git a/rustdesk_nightly.sh b/rustdesk_nightly.sh index 9f24b57..c88d159 100644 --- a/rustdesk_nightly.sh +++ b/rustdesk_nightly.sh @@ -1,5 +1,7 @@ #!/bin/bash +set -oue pipefail + # Define the repository and the tag you want to fetch REPO="rustdesk/rustdesk" TAG="nightly" # Change this to any tag you want @@ -17,19 +19,17 @@ fi # Use jq to parse JSON data and find the asset URL RUSTDESK_URL_AMD64=$(echo "$RELEASE_DATA" | jq -r '.assets[] | select(.name | contains("x86_64") and endswith(".rpm") and (contains("suse") | not)) | .browser_download_url' | head -n 1) RUSTDESK_URL_ARM64=$(echo "$RELEASE_DATA" | jq -r '.assets[] | select(.name | contains("aarch64") and endswith(".rpm") and (contains("suse") | not)) | .browser_download_url' | head -n 1) - - -# Check if the asset URL was found -#if [ -z "$RUSTDESK_URL" ]; then -# echo "No matching file found." -#else -# echo "RUSTDESK_URL=\"$RUSTDESK_URL\"" -#fi +RUSTDESK_URL_AMD64_SUSE=$(echo "$RELEASE_DATA" | jq -r '.assets[] | select(.name | contains("x86_64") and endswith(".rpm") and contains("suse")) | .browser_download_url' | head -n 1) +RUSTDESK_URL_ARM64_SUSE=$(echo "$RELEASE_DATA" | jq -r '.assets[] | select(.name | contains("aarch64") and endswith(".rpm") and contains("suse")) | .browser_download_url' | head -n 1) echo "--------------------RESULT--------------------" echo "RUSTDESK_URL_AMD64=\"$RUSTDESK_URL_AMD64\"" echo "RUSTDESK_URL_ARM64=\"$RUSTDESK_URL_ARM64\"" +echo "RUSTDESK_URL_AMD64=\"$RUSTDESK_URL_AMD64_SUSE\"" +echo "RUSTDESK_URL_ARM64=\"$RUSTDESK_URL_ARM64_SUSE\"" echo "" echo "------------------DOWNLOADING-----------------" wget -P wwwroot/nightly $RUSTDESK_URL_AMD64 wget -P wwwroot/nightly $RUSTDESK_URL_ARM64 +wget -P wwwroot/latest-suse $RUSTDESK_URL_AMD64_SUSE +wget -P wwwroot/latest-suse $RUSTDESK_URL_ARM64_SUSE diff --git a/wwwroot/latest-suse.repo b/wwwroot/latest-suse.repo new file mode 100644 index 0000000..133789b --- /dev/null +++ b/wwwroot/latest-suse.repo @@ -0,0 +1,11 @@ +# Two channels available: latest, nightly. +# Switch by edit the string within baseurl. + +[xlion-rustdesk-rpm-suse-repo] +name=XLion RustDesk RPM SUSE repo +baseurl=https://xlionjuan.github.io/rustdesk-rpm-repo/latest-suse +enabled=1 +autorefresh=1 +gpgcheck=1 +gpgkey=https://xlionjuan.github.io/rustdesk-rpm-repo/pubkey.gpg + diff --git a/wwwroot/latest-suse/.gitkeep b/wwwroot/latest-suse/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/wwwroot/nightly-suse.repo b/wwwroot/nightly-suse.repo new file mode 100644 index 0000000..5334e22 --- /dev/null +++ b/wwwroot/nightly-suse.repo @@ -0,0 +1,11 @@ +# Two channels available: latest, nightly. +# Switch by edit the string within baseurl. + +[xlion-rustdesk-rpm-suse-repo] +name=XLion RustDesk RPM SUSE repo +baseurl=https://xlionjuan.github.io/rustdesk-rpm-repo/nightly-suse +enabled=1 +autorefresh=1 +gpgcheck=1 +gpgkey=https://xlionjuan.github.io/rustdesk-rpm-repo/pubkey.gpg + diff --git a/wwwroot/nightly-suse/.gitkeep b/wwwroot/nightly-suse/.gitkeep new file mode 100644 index 0000000..e69de29