diff --git a/.github/workflows/updater.yml b/.github/workflows/updater.yml index ca77fed..ac12a56 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 }} diff --git a/README.md b/README.md index 4ea3679..7e48259 100644 --- a/README.md +++ b/README.md @@ -31,12 +31,16 @@ SimpleTorrent is a a self-hosted remote torrent client, written in Go (golang). - Magnet RSS subscribing supported -**Shipped version:** 1.3.9~ynh6 +**Shipped version:** 1.3.9~ynh7 ## Screenshots ![Screenshot of Simple Torrent](./doc/screenshots/screenshot.png) +## :red_circle: Antifeatures + +- **Upstream not maintained**: This software is not maintained anymore. Expect it to break down over time, be exposed to unfixed security breaches, etc. + ## Documentation and resources * Official admin documentation: diff --git a/README_fr.md b/README_fr.md index 8b7509f..d896122 100644 --- a/README_fr.md +++ b/README_fr.md @@ -31,12 +31,16 @@ SimpleTorrent is a a self-hosted remote torrent client, written in Go (golang). - Magnet RSS subscribing supported -**Version incluse :** 1.3.9~ynh6 +**Version incluse :** 1.3.9~ynh7 ## Captures d’écran ![Capture d’écran de Simple Torrent](./doc/screenshots/screenshot.png) +## :red_circle: Fonctions indésirables + +- **Upstream not maintained**: This software is not maintained anymore. Expect it to break down over time, be exposed to unfixed security breaches, etc. + ## Documentations et ressources * Documentation officielle de l’admin : diff --git a/conf/amd64.src b/conf/amd64.src deleted file mode 100644 index 6489df8..0000000 --- a/conf/amd64.src +++ /dev/null @@ -1,6 +0,0 @@ -SOURCE_URL=https://github.com/boypt/simple-torrent/releases/download/1.3.9/cloud-torrent_linux_amd64_static.gz -SOURCE_SUM=d2f535e4cd0449b357a563cfce79c1f6afcac9b7b3af94e758defc44faa52ebf -SOURCE_SUM_PRG=sha256sum -SOURCE_FORMAT=gz -SOURCE_IN_SUBDIR=false -SOURCE_EXTRACT=false diff --git a/conf/arm64.src b/conf/arm64.src deleted file mode 100644 index 6c4b48d..0000000 --- a/conf/arm64.src +++ /dev/null @@ -1,6 +0,0 @@ -SOURCE_URL=https://github.com/boypt/simple-torrent/releases/download/1.3.9/cloud-torrent_linux_arm64_static.gz -SOURCE_SUM=6f48f8b59bc8d834c6ede1d27ecc1a598b8a0be1dab00622caa6fd047e51eed6 -SOURCE_SUM_PRG=sha256sum -SOURCE_FORMAT=gz -SOURCE_IN_SUBDIR=false -SOURCE_EXTRACT=false diff --git a/conf/i386.src b/conf/i386.src deleted file mode 100644 index dd17e3a..0000000 --- a/conf/i386.src +++ /dev/null @@ -1,6 +0,0 @@ -SOURCE_URL=https://github.com/boypt/simple-torrent/releases/download/1.3.9/cloud-torrent_linux_386_static.gz -SOURCE_SUM=583898eb907c21dbbcb6f33934eae3dc1d6ec2620fdc7689c70a3479049af52b -SOURCE_SUM_PRG=sha256sum -SOURCE_FORMAT=gz -SOURCE_IN_SUBDIR=false -SOURCE_EXTRACT=false diff --git a/manifest.toml b/manifest.toml index 061e47d..d82d5c3 100644 --- a/manifest.toml +++ b/manifest.toml @@ -5,7 +5,7 @@ name = "Simple Torrent" description.en = "Self-hosted remote torrent client" description.fr = "Client torrent distant auto-hébergé" -version = "1.3.9~ynh6" +version = "1.3.9~ynh7" maintainers = ["eric_G"] @@ -15,7 +15,7 @@ admindoc = "https://github.com/boypt/simple-torrent/wiki" code = "https://github.com/boypt/simple-torrent" [integration] -yunohost = ">= 11.1.7" +yunohost = ">= 11.1.15" architectures = ["amd64","i386", "arm64"] multi_instance = true ldap = false @@ -33,10 +33,24 @@ ram.runtime = "50M" default = "/simple-torrent" [install.init_main_permission] + help.en = "If enabled, Simple Torrent will be accessible by people who do not have an account. This can be changed later via the webadmin." + help.fr = "Si cette case est cochée, Simple Torrent sera accessible aux personnes n’ayant pas de compte. Vous pourrez changer ceci plus tard via la webadmin." type = "group" default = "visitors" [resources] + + [resources.sources] + [resources.sources.main] + amd64.url = "https://github.com/boypt/simple-torrent/releases/download/1.3.9/cloud-torrent_linux_amd64_static.gz" + amd64.sha256 = "d2f535e4cd0449b357a563cfce79c1f6afcac9b7b3af94e758defc44faa52ebf" + arm64.url = "https://github.com/boypt/simple-torrent/releases/download/1.3.9/cloud-torrent_linux_arm64_static.gz" + arm64.sha256 = "6f48f8b59bc8d834c6ede1d27ecc1a598b8a0be1dab00622caa6fd047e51eed6" + i386.url = "https://github.com/boypt/simple-torrent/releases/download/1.3.9/cloud-torrent_linux_386_static.gz" + i386.sha256 = "583898eb907c21dbbcb6f33934eae3dc1d6ec2620fdc7689c70a3479049af52b" + extract = false + in_subdir = false + [resources.system_user] [resources.install_dir] diff --git a/scripts/change_url b/scripts/change_url index 6477fa0..76d5031 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -9,49 +9,6 @@ source _common.sh source /usr/share/yunohost/helpers -#================================================= -# RETRIEVE ARGUMENTS -#================================================= - -old_domain=$YNH_APP_OLD_DOMAIN -old_path=$YNH_APP_OLD_PATH - -new_domain=$YNH_APP_NEW_DOMAIN -new_path=$YNH_APP_NEW_PATH - -#================================================= -# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP -#================================================= -ynh_script_progression --message="Backing up $app before changing its URL (may take a while)..." --weight=1 - -# Backup the current version of the app -ynh_backup_before_upgrade -ynh_clean_setup () { - # Remove the new domain config file, the remove script won't do it as it doesn't know yet its location. - ynh_secure_remove --file="/etc/nginx/conf.d/$new_domain.d/$app.conf" - - # restore it if the upgrade fails - ynh_restore_upgradebackup -} -# Exit if an error occurs during the execution of the script -ynh_abort_if_errors - -#================================================= -# CHECK WHICH PARTS SHOULD BE CHANGED -#================================================= - -change_domain=0 -if [ "$old_domain" != "$new_domain" ] -then - change_domain=1 -fi - -change_path=0 -if [ "$old_path" != "$new_path" ] -then - change_path=1 -fi - #================================================= # STANDARD MODIFICATIONS #================================================= @@ -66,29 +23,7 @@ ynh_systemd_action --service_name=$app --action=stop --log_path="/var/log/$app/$ #================================================= ynh_script_progression --message="Updating NGINX web server configuration..." --weight=1 -nginx_conf_path=/etc/nginx/conf.d/$old_domain.d/$app.conf - -# Change the path in the NGINX config file -if [ $change_path -eq 1 ] -then - # Make a backup of the original NGINX config file if modified - ynh_backup_if_checksum_is_different --file="$nginx_conf_path" - # Set global variables for NGINX helper - domain="$old_domain" - path_url="$new_path" - # Create a dedicated NGINX config - ynh_add_nginx_config -fi - -# Change the domain for NGINX -if [ $change_domain -eq 1 ] -then - # Delete file checksum for the old conf file location - ynh_delete_file_checksum --file="$nginx_conf_path" - mv $nginx_conf_path /etc/nginx/conf.d/$new_domain.d/$app.conf - # Store file checksum for the new config file location - ynh_store_file_checksum --file="/etc/nginx/conf.d/$new_domain.d/$app.conf" -fi +ynh_change_url_nginx_config #================================================= # GENERIC FINALISATION @@ -100,13 +35,6 @@ ynh_script_progression --message="Starting a systemd service..." --weight=1 # Start a systemd service ynh_systemd_action --service_name=$app --action=start --log_path=systemd -#================================================= -# RELOAD NGINX -#================================================= -ynh_script_progression --message="Reloading NGINX web server..." --weight=1 - -ynh_systemd_action --service_name=nginx --action=reload - #================================================= # END OF SCRIPT #================================================= diff --git a/scripts/install b/scripts/install index 1a1a84f..3107450 100644 --- a/scripts/install +++ b/scripts/install @@ -15,14 +15,13 @@ source /usr/share/yunohost/helpers ynh_script_progression --message="Setting up source files..." --weight=4 # Download, check integrity, uncompress and patch the source from app.src -ynh_setup_source --dest_dir=$install_dir --source_id=$YNH_ARCH +ynh_setup_source --dest_dir=$install_dir pushd "$install_dir" - gzip --decompress $YNH_ARCH.gz - mv $YNH_ARCH $app + gzip --decompress main --to-stdout > main_dezipped + mv main_dezipped $app popd -chmod 750 "$install_dir" chmod -R o-rwx "$install_dir" chown -R $app:www-data "$install_dir" chmod +x $install_dir/$app diff --git a/scripts/upgrade b/scripts/upgrade index 4625c46..fbd58c9 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -33,15 +33,14 @@ then ynh_script_progression --message="Upgrading source files..." --weight=5 # Download, check integrity, uncompress and patch the source from app.src - ynh_setup_source --dest_dir=$install_dir --source_id=$YNH_ARCH --keep="config.yml" + ynh_setup_source --dest_dir=$install_dir --keep="config.yml" pushd "$install_dir" - gzip --decompress $YNH_ARCH.gz - mv $YNH_ARCH $app - popd + gzip --decompress main --to-stdout > main_dezipped + mv main_dezipped $app + popd fi -chmod 750 "$install_dir" chmod -R o-rwx "$install_dir" chown -R $app:www-data "$install_dir" chmod +x $install_dir/$app