From dd0b7e63daaec975075ac09a9251ddd38bb74215 Mon Sep 17 00:00:00 2001 From: tituspijean Date: Fri, 24 Feb 2023 00:31:27 +0100 Subject: [PATCH 1/4] [autopatch] Upgrade auto-updater --- .github/workflows/updater.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/updater.yml b/.github/workflows/updater.yml index 4363d38..4a866ff 100644 --- a/.github/workflows/updater.yml +++ b/.github/workflows/updater.yml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Fetch the source code - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: token: ${{ secrets.GITHUB_TOKEN }} - name: Run the updater script @@ -33,7 +33,7 @@ jobs: - name: Create Pull Request id: cpr if: ${{ env.PROCEED == 'true' }} - uses: peter-evans/create-pull-request@v3 + uses: peter-evans/create-pull-request@v4 with: token: ${{ secrets.GITHUB_TOKEN }} commit-message: Update to version ${{ env.VERSION }} From 708c3d77f4cc908b4d539ac40eeb76a9fe944d21 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Thu, 23 Feb 2023 23:31:36 +0000 Subject: [PATCH 2/4] Auto-update README --- README.md | 1 + README_fr.md | 1 + 2 files changed, 2 insertions(+) diff --git a/README.md b/README.md index b723ba4..7882d36 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,7 @@ It shall NOT be edited by hand. # Universal Media Server for YunoHost [![Integration level](https://dash.yunohost.org/integration/ums.svg)](https://dash.yunohost.org/appci/app/ums) ![Working status](https://ci-apps.yunohost.org/ci/badges/ums.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/ums.maintain.svg) + [![Install Universal Media Server with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=ums) *[Lire ce readme en français.](./README_fr.md)* diff --git a/README_fr.md b/README_fr.md index 52521a6..739809d 100644 --- a/README_fr.md +++ b/README_fr.md @@ -6,6 +6,7 @@ It shall NOT be edited by hand. # Universal Media Server pour YunoHost [![Niveau d’intégration](https://dash.yunohost.org/integration/ums.svg)](https://dash.yunohost.org/appci/app/ums) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/ums.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/ums.maintain.svg) + [![Installer Universal Media Server avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=ums) *[Read this readme in english.](./README.md)* From 2f1d38e0c4093080ca145092285077f33972b76c Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Mon, 13 Mar 2023 20:41:20 +0100 Subject: [PATCH 3/4] Fix ynh_setup_source unecessarily complex because not using IN_SUBDIR=true ... --- .github/workflows/updater.sh | 13 +++++-------- conf/{app.x86_64.src => amd64.src} | 3 ++- conf/app.armel.src | 5 ----- conf/{app.arm64.src => arm64.src} | 3 ++- conf/{app.armhf.src => armhf.src} | 3 ++- conf/{app.x86.src => i386.src} | 3 ++- scripts/_common.sh | 20 -------------------- scripts/install | 9 +-------- scripts/upgrade | 7 +------ 9 files changed, 15 insertions(+), 51 deletions(-) rename conf/{app.x86_64.src => amd64.src} (85%) delete mode 100644 conf/app.armel.src rename conf/{app.arm64.src => arm64.src} (84%) rename conf/{app.armhf.src => armhf.src} (84%) rename conf/{app.x86.src => i386.src} (84%) diff --git a/.github/workflows/updater.sh b/.github/workflows/updater.sh index b87e755..a8336e0 100644 --- a/.github/workflows/updater.sh +++ b/.github/workflows/updater.sh @@ -55,19 +55,16 @@ echo "Handling asset at $asset_url" # Leave $src empty to ignore the asset case $asset_url in *"arm64.tgz"*) - src="app.arm64" - ;; - *"armel.tgz"*) - src="app.armel" + src="arm64" ;; *"armhf.tgz"*) - src="app.armhf" + src="armhf" ;; *"x86_64.tgz"*) - src="app.x86_64" + src="amd64" ;; *"x86.tgz"*) - src="app.x86" + src="i386" ;; *) src="" @@ -130,4 +127,4 @@ echo "$(jq -s --indent 4 ".[] | .upstream.version = \"$version\"" manifest.json) # The Action will proceed only if the PROCEED environment variable is set to true echo "PROCEED=true" >> $GITHUB_ENV -exit 0 \ No newline at end of file +exit 0 diff --git a/conf/app.x86_64.src b/conf/amd64.src similarity index 85% rename from conf/app.x86_64.src rename to conf/amd64.src index c55fd1c..43b34fe 100644 --- a/conf/app.x86_64.src +++ b/conf/amd64.src @@ -2,4 +2,5 @@ SOURCE_URL=https://github.com/UniversalMediaServer/UniversalMediaServer/releases SOURCE_SUM=1b009c7deb737641e173a0a82c0b105d8e33a4392de661562e156e4434a4ed17 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tgz -SOURCE_EXTRACT=false +SOURCE_EXTRACT=true +SOURCE_IN_SUBDIR=true diff --git a/conf/app.armel.src b/conf/app.armel.src deleted file mode 100644 index 841c778..0000000 --- a/conf/app.armel.src +++ /dev/null @@ -1,5 +0,0 @@ -SOURCE_URL=https://github.com/UniversalMediaServer/UniversalMediaServer/releases/download/13.2.0/UMS-13.2.0-armel.tgz -SOURCE_SUM=622c1845996472137cd4a47898433ee995802edd6df3d7768f16336d79316452 -SOURCE_SUM_PRG=sha256sum -SOURCE_FORMAT=tgz -SOURCE_EXTRACT=false diff --git a/conf/app.arm64.src b/conf/arm64.src similarity index 84% rename from conf/app.arm64.src rename to conf/arm64.src index ac570d8..acbac5f 100644 --- a/conf/app.arm64.src +++ b/conf/arm64.src @@ -2,4 +2,5 @@ SOURCE_URL=https://github.com/UniversalMediaServer/UniversalMediaServer/releases SOURCE_SUM=f2b05cec5fa6e51b9b5e1884b1ecdb99ca4e11bc0793a5cbea66c0f5c7e03a1a SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tgz -SOURCE_EXTRACT=false +SOURCE_EXTRACT=true +SOURCE_IN_SUBDIR=true diff --git a/conf/app.armhf.src b/conf/armhf.src similarity index 84% rename from conf/app.armhf.src rename to conf/armhf.src index e207017..2b45f90 100644 --- a/conf/app.armhf.src +++ b/conf/armhf.src @@ -2,4 +2,5 @@ SOURCE_URL=https://github.com/UniversalMediaServer/UniversalMediaServer/releases SOURCE_SUM=5e478d40336600517a6f765c49c45bb81c627b76113b571d3ae09e9457429b3e SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tgz -SOURCE_EXTRACT=false +SOURCE_EXTRACT=true +SOURCE_IN_SUBDIR=true diff --git a/conf/app.x86.src b/conf/i386.src similarity index 84% rename from conf/app.x86.src rename to conf/i386.src index 44d24fa..428cfa1 100644 --- a/conf/app.x86.src +++ b/conf/i386.src @@ -2,4 +2,5 @@ SOURCE_URL=https://github.com/UniversalMediaServer/UniversalMediaServer/releases SOURCE_SUM=91a5c534664441064c772dcace5bcef02edac82d8d3c67155ddd803deabeb52c SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tgz -SOURCE_EXTRACT=false +SOURCE_EXTRACT=true +SOURCE_IN_SUBDIR=true diff --git a/scripts/_common.sh b/scripts/_common.sh index 1b69d9d..f0e81ac 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -6,23 +6,3 @@ # dependencies used by the app pkg_dependencies="mediainfo dcraw p7zip" - -mach=`uname -m` - -case "$mach" in - "armv6l" ) mach="armel" - #for some reason, jre is not in the tarball - pkg_dependencies="$pkg_dependencies openjdk-17-jre" ;; - "armv7l" ) if [ $(dpkg --print-architecture) = "armhf" ]; then - mach="armhf" - else - mach="armel" - fi - pkg_dependencies="$pkg_dependencies openjdk-17-jre";; - "armv8l" ) mach="arm64" - pkg_dependencies="$pkg_dependencies openjdk-17-jre" ;; - "aarch64" ) mach="arm64" - pkg_dependencies="$pkg_dependencies openjdk-17-jre" ;; - "x86_64" ) mach="x86_64" ;; - * ) mach="x86" ;; -esac diff --git a/scripts/install b/scripts/install index 86ba412..ecf9788 100755 --- a/scripts/install +++ b/scripts/install @@ -101,16 +101,9 @@ ynh_multimedia_addaccess $app #================================================= ynh_script_progression --message="Setting up source files..." --weight=12 -# Download, check integrity, uncompress and patch the source from app.src -# Create an app.src for the correct compiled version of UMS -# match string are fulfilled in _common.sh -ynh_add_config --template="../conf/app.$mach.src" --destination="../conf/app.src" - ynh_app_setting_set --app=$app --key=final_path --value=$final_path # Download, check integrity, uncompress and patch the source from app.src -ynh_setup_source --dest_dir="$final_path" -tar xfvz $final_path/app.tgz --strip-component=1 --directory=$final_path/ -rm $final_path/app.tgz +ynh_setup_source --dest_dir="$final_path" --source_id="$YNH_ARCH" chmod 750 "$final_path" chmod -R o-rwx "$final_path" diff --git a/scripts/upgrade b/scripts/upgrade index 43bbe47..8fa0aa3 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -87,12 +87,7 @@ ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app if [ "$upgrade_type" == "UPGRADE_APP" ] then ynh_script_progression --message="Upgrading source files..." --weight=5 - - # Download, check integrity, uncompress and patch the source from app.src - ynh_add_config --template="../conf/app.$mach.src" --destination="../conf/app.src" - ynh_setup_source --dest_dir="$final_path" - tar xfvz $final_path/app.tgz --strip-component=1 --directory=$final_path/ - ynh_secure_remove $final_path/app.tgz + ynh_setup_source --dest_dir="$final_path" --source_id="$YNH_ARCH" fi #================================================= From 109adb198c272b3a22f8160a8bb1d7569ea73a2b Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Mon, 13 Mar 2023 20:49:03 +0100 Subject: [PATCH 4/4] tgz = tar.gz I suppose ... --- conf/amd64.src | 2 +- conf/arm64.src | 2 +- conf/armhf.src | 2 +- conf/i386.src | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/conf/amd64.src b/conf/amd64.src index 43b34fe..6c75956 100644 --- a/conf/amd64.src +++ b/conf/amd64.src @@ -1,6 +1,6 @@ SOURCE_URL=https://github.com/UniversalMediaServer/UniversalMediaServer/releases/download/13.2.0/UMS-13.2.0-x86_64.tgz SOURCE_SUM=1b009c7deb737641e173a0a82c0b105d8e33a4392de661562e156e4434a4ed17 SOURCE_SUM_PRG=sha256sum -SOURCE_FORMAT=tgz +SOURCE_FORMAT=tar.gz SOURCE_EXTRACT=true SOURCE_IN_SUBDIR=true diff --git a/conf/arm64.src b/conf/arm64.src index acbac5f..7d1aa9a 100644 --- a/conf/arm64.src +++ b/conf/arm64.src @@ -1,6 +1,6 @@ SOURCE_URL=https://github.com/UniversalMediaServer/UniversalMediaServer/releases/download/13.2.0/UMS-13.2.0-arm64.tgz SOURCE_SUM=f2b05cec5fa6e51b9b5e1884b1ecdb99ca4e11bc0793a5cbea66c0f5c7e03a1a SOURCE_SUM_PRG=sha256sum -SOURCE_FORMAT=tgz +SOURCE_FORMAT=tar.gz SOURCE_EXTRACT=true SOURCE_IN_SUBDIR=true diff --git a/conf/armhf.src b/conf/armhf.src index 2b45f90..4d22ff6 100644 --- a/conf/armhf.src +++ b/conf/armhf.src @@ -1,6 +1,6 @@ SOURCE_URL=https://github.com/UniversalMediaServer/UniversalMediaServer/releases/download/13.2.0/UMS-13.2.0-armhf.tgz SOURCE_SUM=5e478d40336600517a6f765c49c45bb81c627b76113b571d3ae09e9457429b3e SOURCE_SUM_PRG=sha256sum -SOURCE_FORMAT=tgz +SOURCE_FORMAT=tar.gz SOURCE_EXTRACT=true SOURCE_IN_SUBDIR=true diff --git a/conf/i386.src b/conf/i386.src index 428cfa1..e91f82b 100644 --- a/conf/i386.src +++ b/conf/i386.src @@ -1,6 +1,6 @@ SOURCE_URL=https://github.com/UniversalMediaServer/UniversalMediaServer/releases/download/13.2.0/UMS-13.2.0-x86.tgz SOURCE_SUM=91a5c534664441064c772dcace5bcef02edac82d8d3c67155ddd803deabeb52c SOURCE_SUM_PRG=sha256sum -SOURCE_FORMAT=tgz +SOURCE_FORMAT=tar.gz SOURCE_EXTRACT=true SOURCE_IN_SUBDIR=true