From 4b25dedbbe457167f7a525d50c2ee4b079b6fe7a Mon Sep 17 00:00:00 2001 From: yalh76 Date: Wed, 30 Jun 2021 05:08:36 +0200 Subject: [PATCH] Apply example_ynh make bullseye ready --- check_process | 4 +- conf/nginx.conf | 40 ++++++++++---------- conf/systemd.service | 2 +- doc/.gitkeep | 0 doc/DISCLAIMER.md | 3 ++ doc/screenshots/.gitkeep | 0 doc/screenshots/screenshot1.png | Bin 0 -> 8077 bytes manifest.json | 4 ++ scripts/_common.sh | 2 +- scripts/install | 5 +-- scripts/remove | 1 + scripts/restore | 3 -- scripts/upgrade | 63 +++++++++++++++----------------- 13 files changed, 64 insertions(+), 63 deletions(-) create mode 100644 doc/.gitkeep create mode 100644 doc/DISCLAIMER.md create mode 100644 doc/screenshots/.gitkeep create mode 100644 doc/screenshots/screenshot1.png diff --git a/check_process b/check_process index 03d9e18..8c37801 100644 --- a/check_process +++ b/check_process @@ -2,8 +2,8 @@ ; pre-install sudo git clone https://github.com/YunoHost/CI_package_check /home/CI_package_check ; Manifest - domain="domain.tld" (DOMAIN) - path="/path" (PATH) + domain="domain.tld" + path="/path" ; Checks pkg_linter=1 setup_sub_dir=1 diff --git a/conf/nginx.conf b/conf/nginx.conf index 043af6c..c9a0b99 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,27 +1,29 @@ #sub_path_only rewrite ^__PATH__$ __PATH__/ permanent; location __PATH__/ { - alias __FINALPATH__/; - if ($scheme = http) { - rewrite ^ https://$server_name$request_uri? permanent; - } + # Path to source + alias __FINALPATH__/ ; - proxy_pass http://127.0.0.1:__PORT__/; + if ($scheme = http) { + rewrite ^ https://$server_name$request_uri? permanent; + } - proxy_http_version 1.1; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection "Upgrade"; + proxy_pass http://127.0.0.1:__PORT__/; - # Include SSOWAT user panel. - include conf.d/yunohost_panel.conf.inc; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "Upgrade"; - location __PATH__/logs { - alias /home/CI_package_check/logs/; - autoindex on; - } - - location __PATH__/badges/ { - alias /home/CI_package_check/badges/; - autoindex on; - } + # Include SSOWAT user panel. + include conf.d/yunohost_panel.conf.inc; + + location __PATH__/logs { + alias /home/CI_package_check/logs/; + autoindex on; + } + + location __PATH__/badges/ { + alias /home/CI_package_check/badges/; + autoindex on; + } } diff --git a/conf/systemd.service b/conf/systemd.service index d7c7185..0921e3d 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -7,7 +7,7 @@ Type=simple Restart=always User=__APP__ Group=__APP__ -WorkingDirectory=__FINALPATH__ +WorkingDirectory=__FINALPATH__/ ExecStart=__FINALPATH__/venv/bin/python ./run.py [Install] diff --git a/doc/.gitkeep b/doc/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/doc/DISCLAIMER.md b/doc/DISCLAIMER.md new file mode 100644 index 0000000..1411346 --- /dev/null +++ b/doc/DISCLAIMER.md @@ -0,0 +1,3 @@ +* Any known limitations, constrains or stuff not working, such as (but not limited to): + * You need to install [CI_package_check](https://github.com/YunoHost/CI_package_check) using the build_CI.sh script before installing YunoRunner + * When YunoRunner is installed, modify the systemd script to add the path of the script analyseCI.sh. The default systemd is configured to `/home/CI_package_check/analyseCI.sh` diff --git a/doc/screenshots/.gitkeep b/doc/screenshots/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/doc/screenshots/screenshot1.png b/doc/screenshots/screenshot1.png new file mode 100644 index 0000000000000000000000000000000000000000..099048dd16404965c944d32ff538218dd35335aa GIT binary patch literal 8077 zcmeHrXH=6-w>G|rs0jGV1E?ri=v6_8^eVk5MGPGcATq884>?6fI!PQu0k8h7sD-u8LNSJuQ0S2nijPeYR-qcM^W<{?=W!POkf3Vr? zIZ`8!bRCfk8%r|Cz11mjUEg&qxnZUzC$tbNhol=Y>|xT-MEplQ`Ck>&!oZL_Tmu|K z-O+tNbuiFdP}nEMy8}@hh&}Y-I3mepFf;B|%tn%lihfpZ$Wy!L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hvCd5ZIJ5a;_{$ut(G3Iy@o;0HTJxpX|Q`eO-+Mb+SUbv1(o3k$3qdqI&@ z7d)P^DfLB5Xo@nQV9K>`3Iz*3+D?d8v{=*db)d siE+QQiol;YU?!%g45s!!EZ(1~zl!4MylA2H_>U@sC#E`eT24{_1wRCTumAu6 literal 0 HcmV?d00001 diff --git a/manifest.json b/manifest.json index 11d96a2..b8244cf 100644 --- a/manifest.json +++ b/manifest.json @@ -8,6 +8,10 @@ }, "version": "2021-06-30~ynh1", "url": "https://github.com/YunoHost/yunorunner", + "upstream": { + "license": "GPL-3.0-or-later", + "code": "https://github.com/YunoHost/yunorunner" + }, "license": "GPL-3.0-or-later", "maintainer": { "name": "" diff --git a/scripts/_common.sh b/scripts/_common.sh index 732d36c..ee77031 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -9,7 +9,7 @@ pkg_dependencies="python3-venv python3-dev python3-pip sqlite3" yunorunner_repository="https://github.com/YunoHost/yunorunner" -yunorunner_release="eda079abcfdddbcefa1ceb863f9224b1cc077eb2" +yunorunner_release="9cde6e979a59424396659fa934323a677ba8c960" #================================================= # PERSONAL HELPERS diff --git a/scripts/install b/scripts/install index 4cb2ff6..202e137 100644 --- a/scripts/install +++ b/scripts/install @@ -71,7 +71,7 @@ ynh_install_app_dependencies $pkg_dependencies ynh_script_progression --message="Configuring system user..." # Create a system user -ynh_system_user_create --username=$app --home_dir="$final_path" +ynh_system_user_create --username=$app --home_dir=$final_path #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE @@ -110,9 +110,6 @@ pushd $final_path python3 -m venv venv venv/bin/pip install --upgrade pip venv/bin/pip install -r requirements-frozen.txt - #Fix current websocket version error (2019-02-14) - venv/bin/pip uninstall -y websockets - venv/bin/pip install 'websockets>=6.0,<7.0' popd #================================================= diff --git a/scripts/remove b/scripts/remove index c561c2c..524c878 100644 --- a/scripts/remove +++ b/scripts/remove @@ -26,6 +26,7 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path) # REMOVE SERVICE INTEGRATION IN YUNOHOST #================================================= +# Remove the service from the list of services known by YunoHost (added from `yunohost service add`) if ynh_exec_warn_less yunohost service status $app >/dev/null then ynh_script_progression --message="Removing $app service integration..." diff --git a/scripts/restore b/scripts/restore index dc2d712..ff8d889 100644 --- a/scripts/restore +++ b/scripts/restore @@ -94,9 +94,6 @@ pushd $final_path python3 -m venv venv venv/bin/pip install --upgrade pip venv/bin/pip install -r requirements-frozen.txt - #Fix current websocket version error (2019-02-14) - venv/bin/pip uninstall -y websockets - venv/bin/pip install 'websockets>=6.0,<7.0' popd #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 392ee1a..677b0ec 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -28,35 +28,6 @@ ynh_script_progression --message="Checking version..." upgrade_type=$(ynh_check_app_version_changed) -#================================================= -# ENSURE DOWNWARD COMPATIBILITY -#================================================= -ynh_script_progression --message="Ensuring downward compatibility..." - -# If port doesn't exist, create it -if [ -z "$port" ]; then - port=4242 - ynh_app_setting_set --app=$app --key=port --value=$port -fi - -if [[ ! -d "$final_path/.git/" ]] -then - git init "$final_path" - pushd "$final_path" - git remote add origin "$yunorunner_repository" - popd -fi - -# Cleaning legacy permissions -if ynh_legacy_permissions_exists; then - ynh_legacy_permissions_delete_all - - ynh_app_setting_delete --app=$app --key=is_public -fi - -# Remove Pythonz -ynh_secure_remove --file="$final_path/.pythonz" - #================================================= # CLOSE A PORT #================================================= @@ -96,13 +67,42 @@ ynh_script_progression --message="Stopping a systemd service..." ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd" --line_match="Stopped YunoRunner CI" +#================================================= +# ENSURE DOWNWARD COMPATIBILITY +#================================================= +ynh_script_progression --message="Ensuring downward compatibility..." + +# If port doesn't exist, create it +if [ -z "$port" ]; then + port=4242 + ynh_app_setting_set --app=$app --key=port --value=$port +fi + +if [[ ! -d "$final_path/.git/" ]] +then + git init "$final_path" + pushd "$final_path" + git remote add origin "$yunorunner_repository" + popd +fi + +# Cleaning legacy permissions +if ynh_legacy_permissions_exists; then + ynh_legacy_permissions_delete_all + + ynh_app_setting_delete --app=$app --key=is_public +fi + +# Remove Pythonz +ynh_secure_remove --file="$final_path/.pythonz" + #================================================= # CREATE DEDICATED USER #================================================= ynh_script_progression --message="Making sure dedicated system user exists..." # Create a dedicated user (if not existing) -ynh_system_user_create --username=$app --home_dir="$final_path" +ynh_system_user_create --username=$app --home_dir=$final_path #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE @@ -149,9 +149,6 @@ pushd $final_path python3 -m venv venv venv/bin/pip install --upgrade pip venv/bin/pip install -r requirements-frozen.txt - #Fix current websocket version error (2019-02-14) - venv/bin/pip uninstall -y websockets - venv/bin/pip install 'websockets>=6.0,<7.0' popd #=================================================