From c017074677a1ca3586478fbed76fb74e524b86d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josu=C3=A9=20Tille?= Date: Wed, 7 Feb 2024 12:10:20 +0100 Subject: [PATCH 01/16] Simpify permission set and avoid to set all perms each time --- scripts/_common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index 4d4bdd7..87f2374 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -178,7 +178,7 @@ set_permissions() { chown "$app:$app" -R /var/log/$app chmod u=rwX,g=rX,o= -R /var/log/$app - find $data_dir \( \! -perm u=rwX,g=rX,-o= \ + find $data_dir \( \! -perm -o= \ -o \! -user $app \ -o \! -group $app \) \ -exec chown $app:$app {} \; \ From fd49fc543a5bdfa88c53326322b20d7dd7a92d06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josu=C3=A9=20Tille?= Date: Mon, 8 Apr 2024 00:32:51 +0200 Subject: [PATCH 02/16] Use systemd is-active instead of systemd status --- scripts/backup | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/backup b/scripts/backup index 6fef85d..de2e1ea 100755 --- a/scripts/backup +++ b/scripts/backup @@ -15,7 +15,7 @@ source /usr/share/yunohost/helpers #================================================= ynh_print_info --message="Declaring files to be backed up..." -if [[ ! "$(systemctl status $app)" =~ "Active: inactive (dead)" ]]; then +if systemctl is-active $app --quiet; then ynh_print_warn --message="It's hightly recommended to make your backup when the service is stopped. Please stop $app service with this command before to run the backup 'systemctl stop $app.service'" fi From 40e081cecd32d7876e0aead2409986b306c600ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josu=C3=A9=20Tille?= Date: Fri, 26 Apr 2024 21:58:54 +0200 Subject: [PATCH 03/16] Use = intead of space for helper args to avoid issue with parameter --- scripts/install | 2 +- scripts/restore | 2 +- scripts/upgrade | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/install b/scripts/install index 115aa71..8231484 100755 --- a/scripts/install +++ b/scripts/install @@ -52,7 +52,7 @@ ynh_add_systemd_config yunohost service add "$app" --description=XWiki --log="/var/log/$app/$app.log" -ynh_use_logrotate --logfile "/var/log/$app" +ynh_use_logrotate --logfile="/var/log/$app" #================================================= # INSTALL EXTENSIONS diff --git a/scripts/restore b/scripts/restore index b3b4aac..a8ef1aa 100755 --- a/scripts/restore +++ b/scripts/restore @@ -35,7 +35,7 @@ set_permissions systemctl enable $app.service --quiet yunohost service add $app --description=XWiki --log="/var/log/$app/$app.log" -ynh_use_logrotate --logfile "/var/log/$app" +ynh_use_logrotate --logfile="/var/log/$app" #================================================= # GENERIC FINALIZATION diff --git a/scripts/upgrade b/scripts/upgrade index 371a951..7a7bf68 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -11,7 +11,7 @@ source /usr/share/yunohost/helpers upgrade_type=$(ynh_check_app_version_changed) -if ynh_compare_current_package_version --comparison le --version '14.10.8~ynh1'; then +if ynh_compare_current_package_version --comparison=le --version='14.10.8~ynh1'; then ynh_die --mesage='Upgrade from this version is not supported. Please backup and restore manually the data after a clean new install' fi @@ -47,7 +47,7 @@ ynh_add_systemd_config yunohost service add "$app" --description=XWiki --log="/var/log/$app/$app.log" -ynh_use_logrotate --logfile "/var/log/$app" +ynh_use_logrotate --logfile="/var/log/$app" #================================================= # ADD A CONFIGURATION From dbfd8a66aff7142120b10ee8c5e9faa9a4873b07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josu=C3=A9=20Tille?= Date: Sat, 27 Apr 2024 01:00:20 +0200 Subject: [PATCH 04/16] Fix shell check --- scripts/_common.sh | 50 +++++++++++++++++++++++----------------------- scripts/backup | 2 +- scripts/change_url | 14 ++++++------- scripts/install | 14 ++++++------- scripts/remove | 4 ++-- scripts/restore | 8 ++++---- scripts/upgrade | 12 +++++------ 7 files changed, 52 insertions(+), 52 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index 87f2374..c713c0b 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -24,7 +24,7 @@ else install_on_root=false path2=${path/#\//}/ # path=/xwiki -> xwiki/ path3=${path/#\//} # path=/xwiki -> xwiki - web_inf_path="$install_dir"/webapps$path/WEB-INF + web_inf_path="$install_dir/webapps$path/WEB-INF" fi #================================================= @@ -34,18 +34,18 @@ fi enable_super_admin() { super_admin_pwd=$(ynh_string_random) super_admin_config="xwiki.superadminpassword=$super_admin_pwd" - ynh_add_config --template=xwiki.cfg --destination=/etc/$app/xwiki_conf.cfg - ln -f /etc/$app/xwiki_conf.cfg "$web_inf_path"/xwiki.cfg - chmod 400 /etc/$app/xwiki_conf.cfg - chown "$app:$app" /etc/$app/xwiki_conf.cfg + ynh_add_config --template=xwiki.cfg --destination=/etc/"$app"/xwiki_conf.cfg + ln -f /etc/"$app"/xwiki_conf.cfg "$web_inf_path"/xwiki.cfg + chmod 400 /etc/"$app"/xwiki_conf.cfg + chown "$app:$app" /etc/"$app"/xwiki_conf.cfg } disable_super_admin() { super_admin_config='#' - ynh_add_config --template=xwiki.cfg --destination=/etc/$app/xwiki_conf.cfg - ln -f /etc/$app/xwiki_conf.cfg "$web_inf_path"/xwiki.cfg - chmod 400 /etc/$app/xwiki_conf.cfg - chown "$app:$app" /etc/$app/xwiki_conf.cfg + ynh_add_config --template=xwiki.cfg --destination=/etc/"$app"/xwiki_conf.cfg + ln -f /etc/"$app"/xwiki_conf.cfg "$web_inf_path"/xwiki.cfg + chmod 400 /etc/"$app"/xwiki_conf.cfg + chown "$app:$app" /etc/"$app"/xwiki_conf.cfg } install_exension() { @@ -66,12 +66,12 @@ install_exension() { local status_raw local state_request - chmod 700 $temp_dir - chown root:root $temp_dir + chmod 700 "$temp_dir" + chown root:root "$temp_dir" - ynh_add_config --template=install_extensions.xml --destination=$temp_dir/install_extensions.xml + ynh_add_config --template=install_extensions.xml --destination="$temp_dir"/install_extensions.xml status_raw=$($curl -i --user "superadmin:$super_admin_pwd" -X PUT -H 'Content-Type: text/xml' "http://127.0.0.1:$port/${path2}rest/jobs?jobType=install&async=true" --upload-file $temp_dir/install_extensions.xml) - state_request=$(echo $status_raw | $xq -x '//jobStatus/ns2:state') + state_request=$(echo "$status_raw" | $xq -x '//jobStatus/ns2:state') while true; do sleep 5 @@ -152,14 +152,14 @@ install_source() { elif [ "$path" == /root ]; then ynh_die --message='Path "/root" not supported' elif [ "$path" != /xwiki ]; then - mv "$install_dir"/webapps/xwiki "$install_dir"/webapps$path + mv "$install_dir"/webapps/xwiki "$install_dir/webapps$path" fi } add_config() { - ynh_add_config --template=hibernate.cfg.xml --destination=/etc/$app/hibernate.cfg.xml - ynh_add_config --template=xwiki.cfg --destination=/etc/$app/xwiki_conf.cfg - ynh_add_config --template=xwiki.properties --destination=/etc/$app/xwiki_conf.properties + ynh_add_config --template=hibernate.cfg.xml --destination=/etc/"$app"/hibernate.cfg.xml + ynh_add_config --template=xwiki.cfg --destination=/etc/"$app"/xwiki_conf.cfg + ynh_add_config --template=xwiki.properties --destination=/etc/"$app"/xwiki_conf.properties # Note that using /etc/xwiki/xwiki.cfg or /etc/xwiki/xwiki.properties is hard coded on the application # And using this break multi instance feature so we must use an other path @@ -172,16 +172,16 @@ set_permissions() { chmod -R u+rwX,o-rwx "$install_dir" chown -R "$app:$app" "$install_dir" - chmod -R u=rwX,g=rX,o= /etc/$app - chown -R "$app:$app" /etc/$app + chmod -R u=rwX,g=rX,o= /etc/"$app" + chown -R "$app:$app" /etc/"$app" - chown "$app:$app" -R /var/log/$app - chmod u=rwX,g=rX,o= -R /var/log/$app + chown "$app:$app" -R /var/log/"$app" + chmod u=rwX,g=rX,o= -R /var/log/"$app" - find $data_dir \( \! -perm -o= \ - -o \! -user $app \ - -o \! -group $app \) \ - -exec chown $app:$app {} \; \ + find "$data_dir" \( \! -perm -o= \ + -o \! -user "$app" \ + -o \! -group "$app" \) \ + -exec chown "$app:$app" {} \; \ -exec chmod u=rwX,g=rX,o= {} \; } diff --git a/scripts/backup b/scripts/backup index de2e1ea..7d7515d 100755 --- a/scripts/backup +++ b/scripts/backup @@ -15,7 +15,7 @@ source /usr/share/yunohost/helpers #================================================= ynh_print_info --message="Declaring files to be backed up..." -if systemctl is-active $app --quiet; then +if systemctl is-active "$app" --quiet; then ynh_print_warn --message="It's hightly recommended to make your backup when the service is stopped. Please stop $app service with this command before to run the backup 'systemctl stop $app.service'" fi diff --git a/scripts/change_url b/scripts/change_url index 77b52b4..1fd1da4 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -16,7 +16,7 @@ source /usr/share/yunohost/helpers #================================================= ynh_script_progression --message="Stopping a systemd service..." --weight=1 -ynh_systemd_action --service_name=$app --action=stop +ynh_systemd_action --service_name="$app" --action=stop #================================================= # MODIFY URL IN NGINX CONF @@ -27,15 +27,15 @@ ynh_change_url_nginx_config ynh_script_progression --message="Updating xwiki configuration..." --weight=1 -if [ $new_path != $old_path ]; then - if $install_on_root; then - mv "$install_dir"/webapps$old_path "$install_dir"/webapps/root +if [ "$new_path" != "$old_path" ]; then + if "$install_on_root"; then + mv "$install_dir/webapps$old_path" "$install_dir"/webapps/root elif [ "$path" == /root ]; then ynh_die --message='Path "/root" not supported' elif [ $old_path == / ]; then - mv "$install_dir"/webapps/root "$install_dir"/webapps$new_path + mv "$install_dir"/webapps/root "$install_dir/webapps$new_path" else - mv "$install_dir"/webapps$old_path "$install_dir"/webapps$new_path + mv "$install_dir/webapps$old_path" "$install_dir/webapps$new_path" fi fi add_config @@ -48,7 +48,7 @@ set_permissions #================================================= ynh_script_progression --message="Starting a systemd service..." --weight=1 -ynh_systemd_action --service_name=$app --action=start --log_path=systemd --line_match="$systemd_match_start_line" +ynh_systemd_action --service_name="$app" --action=start --log_path=systemd --line_match="$systemd_match_start_line" wait_xwiki_started #================================================= diff --git a/scripts/install b/scripts/install index 8231484..287e813 100755 --- a/scripts/install +++ b/scripts/install @@ -13,15 +13,15 @@ source /usr/share/yunohost/helpers # APP "BUILD" (DEPLOYING SOURCES, VENV, COMPILING ETC) #================================================= -if [ -n "$(ls -A $data_dir)" ]; then +if [ -n "$(ls -A "$data_dir")" ]; then old_data_dir_path="${data_dir}_$(date '+%Y%m%d.%H%M%S')" ynh_print_warn "Data directory was not empty. Data was moved to $old_data_dir_path" - mkdir -p $old_data_dir_path + mkdir -p "$old_data_dir_path" mv -t "$old_data_dir_path" "$data_dir"/* fi mkdir -p /var/log/"$app" -mkdir -p /etc/$app +mkdir -p /etc/"$app" #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE @@ -61,9 +61,9 @@ ynh_use_logrotate --logfile="/var/log/$app" enable_super_admin # Start a systemd service -ynh_systemd_action --service_name=$app --action=start --log_path=systemd --line_match="$systemd_match_start_line" +ynh_systemd_action --service_name="$app" --action=start --log_path=systemd --line_match="$systemd_match_start_line" -if [ $install_standard_flavor -eq 1 ]; then +if [ "$install_standard_flavor" -eq 1 ]; then ynh_script_progression --message='Installing flavor...' wait_for_flavor_install fi @@ -72,7 +72,7 @@ ynh_script_progression --message='Installing LDAP extension...' --weight=1 install_exension 'org.xwiki.contrib.ldap:ldap-authenticator' "$ldap_version" # Disable super admin -ynh_systemd_action --service_name=$app --action=stop +ynh_systemd_action --service_name="$app" --action=stop disable_super_admin #================================================= @@ -82,7 +82,7 @@ disable_super_admin #================================================= ynh_script_progression --message='Starting a systemd service...' --weight=1 -ynh_systemd_action --service_name=$app --action=start --log_path=systemd --line_match="$systemd_match_start_line" +ynh_systemd_action --service_name="$app" --action=start --log_path=systemd --line_match="$systemd_match_start_line" wait_xwiki_started #================================================= diff --git a/scripts/remove b/scripts/remove index 8b5abd6..d0fad6f 100755 --- a/scripts/remove +++ b/scripts/remove @@ -17,10 +17,10 @@ source /usr/share/yunohost/helpers ynh_script_progression --message="Removing system configurations related to $app..." --weight=1 # 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 +if ynh_exec_warn_less yunohost service status "$app" >/dev/null then ynh_script_progression --message="Removing $app service integration..." --weight=1 - yunohost service remove $app + yunohost service remove "$app" fi ynh_secure_remove --file="/etc/$app" diff --git a/scripts/restore b/scripts/restore index a8ef1aa..4737f23 100755 --- a/scripts/restore +++ b/scripts/restore @@ -22,7 +22,7 @@ ynh_restore #================================================= ynh_script_progression --message="Restoring the database..." --weight=1 -ynh_psql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./db.sql +ynh_psql_connect_as --user="$db_user" --password="$db_pwd" --database="$db_name" < ./db.sql #================================================= # RESTORE SYSTEM CONFIGURATIONS @@ -32,8 +32,8 @@ ynh_script_progression --message="Restoring system configurations related to $ap mkdir -p /var/log/"$app" set_permissions -systemctl enable $app.service --quiet -yunohost service add $app --description=XWiki --log="/var/log/$app/$app.log" +systemctl enable "$app".service --quiet +yunohost service add "$app" --description=XWiki --log="/var/log/$app/$app.log" ynh_use_logrotate --logfile="/var/log/$app" @@ -44,7 +44,7 @@ ynh_use_logrotate --logfile="/var/log/$app" #================================================= ynh_script_progression --message="Reloading NGINX web server and $app's service..." --weight=1 -ynh_systemd_action --service_name=$app --action=start --log_path=systemd --line_match="$systemd_match_start_line" +ynh_systemd_action --service_name="$app" --action=start --log_path=systemd --line_match="$systemd_match_start_line" wait_xwiki_started ynh_systemd_action --service_name=nginx --action=reload diff --git a/scripts/upgrade b/scripts/upgrade index 7a7bf68..92eb21d 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -9,7 +9,7 @@ source _common.sh source /usr/share/yunohost/helpers -upgrade_type=$(ynh_check_app_version_changed) +upgrade_type="$(ynh_check_app_version_changed)" if ynh_compare_current_package_version --comparison=le --version='14.10.8~ynh1'; then ynh_die --mesage='Upgrade from this version is not supported. Please backup and restore manually the data after a clean new install' @@ -20,7 +20,7 @@ fi #================================================= ynh_script_progression --message='Stopping a systemd service..' --weight=1 -ynh_systemd_action --service_name=$app --action=stop --log_path="/var/log/$app/$app.log" +ynh_systemd_action --service_name="$app" --action=stop --log_path="/var/log/$app/$app.log" #================================================= # "REBUILD" THE APP (DEPLOY NEW SOURCES, RERUN NPM BUILD...) @@ -63,9 +63,9 @@ set_permissions enable_super_admin # Start a systemd service -ynh_systemd_action --service_name=$app --action=start --log_path=systemd --line_match="$systemd_match_start_line" +ynh_systemd_action --service_name="$app" --action=start --log_path=systemd --line_match="$systemd_match_start_line" -if [ $install_standard_flavor -eq 1 ]; then +if [ "$install_standard_flavor" -eq 1 ]; then ynh_script_progression --message='Upgrading flavor...' wait_for_flavor_install fi @@ -74,7 +74,7 @@ ynh_script_progression --message='Upgrading LDAP extension...' --weight=1 install_exension 'org.xwiki.contrib.ldap:ldap-authenticator' "$ldap_version" # Disable super admin -ynh_systemd_action --service_name=$app --action=stop +ynh_systemd_action --service_name="$app" --action=stop disable_super_admin #================================================= @@ -84,7 +84,7 @@ disable_super_admin #================================================= ynh_script_progression --message='Starting a systemd service...' --weight=1 -ynh_systemd_action --service_name=$app --action=start --log_path=systemd --line_match="$systemd_match_start_line" +ynh_systemd_action --service_name="$app" --action=start --log_path=systemd --line_match="$systemd_match_start_line" wait_xwiki_started #================================================= From 96aff679e6185235d989412ba820224e37525d98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josu=C3=A9=20Tille?= Date: Tue, 28 May 2024 00:42:39 +0200 Subject: [PATCH 05/16] Fix install extension jobRequest file --- conf/install_extensions.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/conf/install_extensions.xml b/conf/install_extensions.xml index 16b077c..dda1a41 100644 --- a/conf/install_extensions.xml +++ b/conf/install_extensions.xml @@ -2,7 +2,7 @@ extension - provision + action __JOB_ID__ @@ -29,7 +29,7 @@ namespaces - xwiki:xwiki + wiki:xwiki From 8f5719b30edbe71825d5c27da0ec5f845ea8bf63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josu=C3=A9=20Tille?= Date: Tue, 28 May 2024 00:43:06 +0200 Subject: [PATCH 06/16] Enable libreoffice for odt export --- conf/xwiki.properties | 4 ++-- manifest.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/conf/xwiki.properties b/conf/xwiki.properties index f185673..cabd93d 100644 --- a/conf/xwiki.properties +++ b/conf/xwiki.properties @@ -340,7 +340,7 @@ environment.permanentDirectory = __DATA_DIR__ #-# Type of the openoffice server instance used by officeimporter component. #-# 0 - Internally managed server instance. (Default) #-# 1 - Externally managed (local) server instance. -# openoffice.serverType = 0 +openoffice.serverType = 0 #-# [Since 12.1RC1] #-# Port numbers used for connecting to the openoffice server instance. @@ -351,7 +351,7 @@ environment.permanentDirectory = __DATA_DIR__ #-# [Since 1.9M2] #-# If the openoffice server should be started / connected upon XE start. #-# Default value is false -# openoffice.autoStart = false +openoffice.autoStart = true #-# [Since 1.8RC3] #-# Path to openoffice installation (serverType:0 only). diff --git a/manifest.toml b/manifest.toml index bee3523..d4eadbd 100644 --- a/manifest.toml +++ b/manifest.toml @@ -109,7 +109,7 @@ ram.runtime = "1G" admin.label = "Admins" [resources.apt] - packages = ["openjdk-17-jre", "postgresql"] + packages = ["openjdk-17-jre", "postgresql", "libreoffice"] [resources.database] type = "postgresql" From 650f64beda3b564445d4438a493c89d5f6ef7f59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josu=C3=A9=20Tille?= Date: Tue, 28 May 2024 00:43:43 +0200 Subject: [PATCH 07/16] Update XWiki to 16.3.1 --- manifest.toml | 26 +++++++++++++------------- scripts/_common.sh | 4 ++-- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/manifest.toml b/manifest.toml index d4eadbd..c0c5610 100644 --- a/manifest.toml +++ b/manifest.toml @@ -5,7 +5,7 @@ name = "XWiki" description.en = "Collaboration tool based on the wiki principle" description.fr = "Outil de collaboration basé sur le principe du wiki" -version = "15.10.1~ynh1" +version = "16.3.1~ynh1" maintainers = ["Josué Tille"] @@ -61,31 +61,31 @@ ram.runtime = "1G" [resources.sources] [resources.sources.main] - url = "https://nexus.xwiki.org/nexus/content/groups/public/org/xwiki/platform/xwiki-platform-distribution-jetty-hsqldb/15.10.1/xwiki-platform-distribution-jetty-hsqldb-15.10.1.zip" - sha256 = "76efd6e1c58b8557034a3e25271963392b8b5e125af97d932210823510586e9f" + url = "https://nexus.xwiki.org/nexus/content/groups/public/org/xwiki/platform/xwiki-platform-distribution-jetty-hsqldb/16.3.1/xwiki-platform-distribution-jetty-hsqldb-16.3.1.zip" + sha256 = "cb82326455089ef2f2d6a0631821f74530a8043aeee3486265482b58fbaa0e79" format = "zip" [resources.sources.jdbc] - url = "https://jdbc.postgresql.org/download/postgresql-42.7.0.jar" + url = "https://jdbc.postgresql.org/download/postgresql-42.7.3.jar" rename = "postgresql-42.7.0.jar" - sha256 = "90c39c97ac309b5767882f9beef913244da029204af2d2982c2b45bcfcb42624" + sha256 = "a2644cbfba1baa145ff7e8c8ef582a6eed7a7ec4ca792f7f054122bdec756268" # Note that xq is available on debian package since debian 12 # So on bookworm should just remove this and use official package [resources.sources.xq_tool] in_subdir= false - i386.url = "https://github.com/sibprogrammer/xq/releases/download/v1.2.3/xq_1.2.3_linux_386.tar.gz" - i386.sha256 = "fc500e887d825f6cbedecdbfb3a272e1a88473b1f1a1b92075cab429d3d6fc64" + i386.url = "https://github.com/sibprogrammer/xq/releases/download/v1.2.4/xq_1.2.4_linux_386.tar.gz" + i386.sha256 = "f51e27493fb49dee53f3511ad6f4710f8fb7014e6ba0796d3c6d2eee6ceef914" - amd64.url = "https://github.com/sibprogrammer/xq/releases/download/v1.2.3/xq_1.2.3_linux_amd64.tar.gz" - amd64.sha256 = "d510d97a247ad9b5a4e92759ea9b1b6be07d9f18187209b359525744e1bb8947" + amd64.url = "https://github.com/sibprogrammer/xq/releases/download/v1.2.4/xq_1.2.4_linux_amd64.tar.gz" + amd64.sha256 = "96148dc3ce4fede9ab47b26fa07f1ada950dfd61ae54db7013c76a410945302f" - armhf.url = "https://github.com/sibprogrammer/xq/releases/download/v1.2.3/xq_1.2.3_linux_armv7.tar.gz" - armhf.sha256 = "f9b01ba7d77965f292f3c1b8c164267367507e16a8951b67733a539d7f73eecb" + armhf.url = "https://github.com/sibprogrammer/xq/releases/download/v1.2.4/xq_1.2.4_linux_armv7.tar.gz" + armhf.sha256 = "9b08c33f1a3dd1f7a6a82dd91ef7dfb5297d0c3ea2ccfc6ee616393667862d56" - arm64.url = "https://github.com/sibprogrammer/xq/releases/download/v1.2.3/xq_1.2.3_linux_arm64.tar.gz" - arm64.sha256 = "a8989b2b1a5254033aebacb72ffea77964d6903d809361001dbf1ed09a0c6550" + arm64.url = "https://github.com/sibprogrammer/xq/releases/download/v1.2.4/xq_1.2.4_linux_arm64.tar.gz" + arm64.sha256 = "414ea9fde3c6e669f034465c21aa095bc3c10a3e3dd8c2989ee8073605274bf9" # # INFO need also to update extensions version on _common.sh diff --git a/scripts/_common.sh b/scripts/_common.sh index c713c0b..48f7747 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -6,8 +6,8 @@ super_admin_config='#' systemd_match_start_line='oxtjl.NotifyListener:main: ----------------------------------' -flavor_version='15.10.1' -ldap_version='9.12.0' +flavor_version='16.3.1' +ldap_version='9.15.2' if [ $install_standard_flavor -eq 1 ]; then distribution_default_ui="distribution.defaultUI=org.xwiki.platform:xwiki-platform-distribution-flavor-mainwiki/$flavor_version" From 22fbacbac13921a37010430e0ecf12906ddf2df9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josu=C3=A9=20Tille?= Date: Tue, 28 May 2024 00:44:16 +0200 Subject: [PATCH 08/16] Simplify the way to check of install/upgrade flavor and fix typo --- scripts/_common.sh | 28 ++++++---------------------- 1 file changed, 6 insertions(+), 22 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index 48f7747..3a91061 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -76,7 +76,7 @@ install_exension() { while true; do sleep 5 - status_raw=$($curl --user "superadmin:$super_admin_pwd" -X GET -H 'Content-Type: text/xml' "http://127.0.0.1:$port/${path2}rest/jobstatus/extension/provision/$job_id") + status_raw=$($curl --user "superadmin:$super_admin_pwd" -X GET -H 'Content-Type: text/xml' "http://127.0.0.1:$port/${path2}rest/jobstatus/extension/action/$job_id") state_request=$(echo "$status_raw" | $xq -x '//jobStatus/state') if [ -z "$state_request" ]; then @@ -96,7 +96,7 @@ install_exension() { } wait_xwiki_started() { - local res='meta http-equiv="refresh" content="1"'$ + local res='meta http-equiv="refresh" content="1"' local curl='curl --silent --show-error' while echo "$res" | grep -q 'meta http-equiv="refresh" content="1"'; do @@ -106,31 +106,15 @@ wait_xwiki_started() { } wait_for_flavor_install() { - local flavor_job_id='org.xwiki.platform%3Axwiki-platform-distribution-flavor-mainwiki/wiki%3Axwiki' - local status_raw - local state_request - local xq=$install_dir/xq_tool/xq - local curl='curl --silent --show-error' + local status_header # Need to call main page to start xwiki service wait_xwiki_started while true; do - status_raw=$($curl --user "superadmin:$super_admin_pwd" -X GET -H 'Content-Type: text/xml' "http://127.0.0.1:$port/${path2}rest/jobstatus/extension/action/$flavor_job_id") - state_request=$(echo "$status_raw" | $xq -x '//jobStatus/state') - - if [ -z "$state_request" ]; then - ynh_die --message="Invalid answer: '$status_raw'" - elif [ "$state_request" == FINISHED ]; then - # Check if error happen - error_msg=$(echo "$status_raw" | $xq -x '//jobStatus/errorMessage') - if [ -z "$error_msg" ]; then - break - else - ynh_die --message="Error while installing extension 'org.xwiki.platform%3Axwiki-platform-distribution-flavor-mainwiki'. Error: $error_msg" - fi - elif [ "$state_request" != RUNNING ]; then - ynh_die --message="Invalid status '$state_request'" + status_header="$(curl --silent --show-error -I "http://127.0.0.1:$port/${path2}bin/view/Main/")" + if ! echo "$status_header" | grep -q -E 'Location:[[:space:]].*/Distribution\?xredirect='; then + break fi sleep 10 done From 8e8990429372b8d34d4fb40f7c7a99c5bfaab218 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josu=C3=A9=20Tille?= Date: Tue, 28 May 2024 00:44:49 +0200 Subject: [PATCH 09/16] Add auto update --- auto_update/auto_update.sh | 88 +++++++++++++++++++++++ auto_update/auto_update_config_example.sh | 1 + 2 files changed, 89 insertions(+) create mode 100644 auto_update/auto_update.sh create mode 100644 auto_update/auto_update_config_example.sh diff --git a/auto_update/auto_update.sh b/auto_update/auto_update.sh new file mode 100644 index 0000000..ce5ed10 --- /dev/null +++ b/auto_update/auto_update.sh @@ -0,0 +1,88 @@ +#!/bin/bash + +set -eu + +readonly app_name=xwiki + +get_from_manifest() { + result=$(python3 <&1 | tee "${app_name}_build_temp.log" + return "${PIPESTATUS[0]}" +} + +app_prev_version="$(get_from_manifest ".version" | cut -d'~' -f1)" +app_version="$app_prev_version" + +if check_app_version +then + set +eu + upgrade_app + res=$? + set -eu + if [ $res -eq 0 ]; then + result="Success" + else + result="Failed" + fi + msg="Build: $app_name version $app_version\n" + msg+="$(cat ${app_name}_build_temp.log)" + echo -e "$msg" | mail.mailutils -a "Content-Type: text/plain; charset=UTF-8" -s "Autoupgrade $app_name : $result" "$notify_email" +fi diff --git a/auto_update/auto_update_config_example.sh b/auto_update/auto_update_config_example.sh new file mode 100644 index 0000000..daecfc8 --- /dev/null +++ b/auto_update/auto_update_config_example.sh @@ -0,0 +1 @@ +notify_email="hello@world.tld" From 011dac579f42e2595d01fb0a9b6f8ba4f4cc37d7 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Mon, 27 May 2024 22:45:53 +0000 Subject: [PATCH 10/16] Auto-update READMEs --- ALL_README.md | 8 ++++++++ README.md | 30 ++++++++++++++-------------- README_es.md | 50 +++++++++++++++++++++++++++++++++++++++++++++++ README_eu.md | 50 +++++++++++++++++++++++++++++++++++++++++++++++ README_fr.md | 34 ++++++++++++++++---------------- README_gl.md | 50 +++++++++++++++++++++++++++++++++++++++++++++++ README_zh_Hans.md | 50 +++++++++++++++++++++++++++++++++++++++++++++++ 7 files changed, 240 insertions(+), 32 deletions(-) create mode 100644 ALL_README.md create mode 100644 README_es.md create mode 100644 README_eu.md create mode 100644 README_gl.md create mode 100644 README_zh_Hans.md diff --git a/ALL_README.md b/ALL_README.md new file mode 100644 index 0000000..152f2e7 --- /dev/null +++ b/ALL_README.md @@ -0,0 +1,8 @@ +# All available README files by language + +- [Read the README in English](README.md) +- [Lea el README en español](README_es.md) +- [Irakurri README euskaraz](README_eu.md) +- [Lire le README en français](README_fr.md) +- [Le o README en galego](README_gl.md) +- [阅读中文(简体)的 README](README_zh_Hans.md) diff --git a/README.md b/README.md index d974915..e6c3ba0 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ @@ -9,18 +9,18 @@ It shall NOT be edited by hand. [![Install XWiki with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=xwiki) -*[Lire ce readme en français.](./README_fr.md)* +*[Read this README in other languages.](./ALL_README.md)* -> *This package allows you to install XWiki quickly and simply on a YunoHost server. -If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/install) to learn how to install it.* +> *This package allows you to install XWiki quickly and simply on a YunoHost server.* +> *If you don't have YunoHost, please consult [the guide](https://yunohost.org/install) to learn how to install it.* ## Overview XWiki is an Open Source wiki engine (LGPLv2) suitable for use by workgroups (associations, companies, etc.). The software allows the rapid creation of small applications to meet different information management needs. -**Shipped version:** 15.10.1~ynh1 +**Shipped version:** 16.3.1~ynh1 -**Demo:** https://playground.xwiki.org/xwiki/bin/view/Main/WebHome +**Demo:** ## Screenshots @@ -28,20 +28,20 @@ XWiki is an Open Source wiki engine (LGPLv2) suitable for use by workgroups (ass ## Documentation and resources -* Official app website: -* Official user documentation: -* Official admin documentation: -* Upstream app code repository: -* YunoHost Store: -* Report a bug: +- Official app website: +- Official user documentation: +- Official admin documentation: +- Upstream app code repository: +- YunoHost Store: +- Report a bug: ## Developer info -Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/xwiki_ynh/tree/testing). +Please send your pull request to the [`testing` branch](https://github.com/YunoHost-Apps/xwiki_ynh/tree/testing). -To try the testing branch, please proceed like that. +To try the `testing` branch, please proceed like that: -``` bash +```bash sudo yunohost app install https://github.com/YunoHost-Apps/xwiki_ynh/tree/testing --debug or sudo yunohost app upgrade xwiki -u https://github.com/YunoHost-Apps/xwiki_ynh/tree/testing --debug diff --git a/README_es.md b/README_es.md new file mode 100644 index 0000000..27755be --- /dev/null +++ b/README_es.md @@ -0,0 +1,50 @@ + + +# XWiki para Yunohost + +[![Nivel de integración](https://dash.yunohost.org/integration/xwiki.svg)](https://dash.yunohost.org/appci/app/xwiki) ![Estado funcional](https://ci-apps.yunohost.org/ci/badges/xwiki.status.svg) ![Estado En Mantención](https://ci-apps.yunohost.org/ci/badges/xwiki.maintain.svg) + +[![Instalar XWiki con Yunhost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=xwiki) + +*[Leer este README en otros idiomas.](./ALL_README.md)* + +> *Este paquete le permite instalarXWiki rapidamente y simplement en un servidor YunoHost.* +> *Si no tiene YunoHost, visita [the guide](https://yunohost.org/install) para aprender como instalarla.* + +## Descripción general + +XWiki is an Open Source wiki engine (LGPLv2) suitable for use by workgroups (associations, companies, etc.). The software allows the rapid creation of small applications to meet different information management needs. + +**Versión actual:** 16.3.1~ynh1 + +**Demo:** + +## Capturas + +![Captura de XWiki](./doc/screenshots/XWiki-standard-help.jpg) + +## Documentaciones y recursos + +- Sitio web oficial: +- Documentación usuario oficial: +- Documentación administrador oficial: +- Repositorio del código fuente oficial de la aplicación : +- Catálogo YunoHost: +- Reportar un error: + +## Información para desarrolladores + +Por favor enviar sus correcciones a la [`branch testing`](https://github.com/YunoHost-Apps/xwiki_ynh/tree/testing + +Para probar la rama `testing`, sigue asÍ: + +```bash +sudo yunohost app install https://github.com/YunoHost-Apps/xwiki_ynh/tree/testing --debug +o +sudo yunohost app upgrade xwiki -u https://github.com/YunoHost-Apps/xwiki_ynh/tree/testing --debug +``` + +**Mas informaciones sobre el empaquetado de aplicaciones:** diff --git a/README_eu.md b/README_eu.md new file mode 100644 index 0000000..b663207 --- /dev/null +++ b/README_eu.md @@ -0,0 +1,50 @@ + + +# XWiki YunoHost-erako + +[![Integrazio maila](https://dash.yunohost.org/integration/xwiki.svg)](https://dash.yunohost.org/appci/app/xwiki) ![Funtzionamendu egoera](https://ci-apps.yunohost.org/ci/badges/xwiki.status.svg) ![Mantentze egoera](https://ci-apps.yunohost.org/ci/badges/xwiki.maintain.svg) + +[![Instalatu XWiki YunoHost-ekin](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=xwiki) + +*[Irakurri README hau beste hizkuntzatan.](./ALL_README.md)* + +> *Pakete honek XWiki YunoHost zerbitzari batean azkar eta zailtasunik gabe instalatzea ahalbidetzen dizu.* +> *YunoHost ez baduzu, kontsultatu [gida](https://yunohost.org/install) nola instalatu ikasteko.* + +## Aurreikuspena + +XWiki is an Open Source wiki engine (LGPLv2) suitable for use by workgroups (associations, companies, etc.). The software allows the rapid creation of small applications to meet different information management needs. + +**Paketatutako bertsioa:** 16.3.1~ynh1 + +**Demoa:** + +## Pantaila-argazkiak + +![XWiki(r)en pantaila-argazkia](./doc/screenshots/XWiki-standard-help.jpg) + +## Dokumentazioa eta baliabideak + +- Aplikazioaren webgune ofiziala: +- Erabiltzaileen dokumentazio ofiziala: +- Administratzaileen dokumentazio ofiziala: +- Jatorrizko aplikazioaren kode-gordailua: +- YunoHost Denda: +- Eman errore baten berri: + +## Garatzaileentzako informazioa + +Bidali `pull request`a [`testing` abarrera](https://github.com/YunoHost-Apps/xwiki_ynh/tree/testing). + +`testing` abarra probatzeko, ondorengoa egin: + +```bash +sudo yunohost app install https://github.com/YunoHost-Apps/xwiki_ynh/tree/testing --debug +edo +sudo yunohost app upgrade xwiki -u https://github.com/YunoHost-Apps/xwiki_ynh/tree/testing --debug +``` + +**Informazio gehiago aplikazioaren paketatzeari buruz:** diff --git a/README_fr.md b/README_fr.md index cd8a0d1..2818d0e 100644 --- a/README_fr.md +++ b/README_fr.md @@ -1,6 +1,6 @@ # XWiki pour YunoHost @@ -9,18 +9,18 @@ It shall NOT be edited by hand. [![Installer XWiki avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=xwiki) -*[Read this readme in english.](./README.md)* +*[Lire le README dans d'autres langues.](./ALL_README.md)* -> *Ce package vous permet d’installer XWiki rapidement et simplement sur un serveur YunoHost. -Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l’installer et en profiter.* +> *Ce package vous permet d’installer XWiki rapidement et simplement sur un serveur YunoHost.* +> *Si vous n’avez pas YunoHost, consultez [ce guide](https://yunohost.org/install) pour savoir comment l’installer et en profiter.* ## Vue d’ensemble XWiki est un moteur de wiki Open Source (LGPLv2) adapté à un usage pour des groupes de travail (associations, entreprises…). Le logiciel permet la création rapide de petites applications pour répondre à différents besoins de gestion de l'information. -**Version incluse :** 15.10.1~ynh1 +**Version incluse :** 16.3.1~ynh1 -**Démo :** https://playground.xwiki.org/xwiki/bin/view/Main/WebHome +**Démo :** ## Captures d’écran @@ -28,23 +28,23 @@ XWiki est un moteur de wiki Open Source (LGPLv2) adapté à un usage pour des gr ## Documentations et ressources -* Site officiel de l’app : -* Documentation officielle utilisateur : -* Documentation officielle de l’admin : -* Dépôt de code officiel de l’app : -* YunoHost Store: -* Signaler un bug : +- Site officiel de l’app : +- Documentation officielle utilisateur : +- Documentation officielle de l’admin : +- Dépôt de code officiel de l’app : +- YunoHost Store : +- Signaler un bug : ## Informations pour les développeurs -Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/xwiki_ynh/tree/testing). +Merci de faire vos pull request sur la [branche `testing`](https://github.com/YunoHost-Apps/xwiki_ynh/tree/testing). -Pour essayer la branche testing, procédez comme suit. +Pour essayer la branche `testing`, procédez comme suit : -``` bash +```bash sudo yunohost app install https://github.com/YunoHost-Apps/xwiki_ynh/tree/testing --debug ou sudo yunohost app upgrade xwiki -u https://github.com/YunoHost-Apps/xwiki_ynh/tree/testing --debug ``` -**Plus d’infos sur le packaging d’applications :** \ No newline at end of file +**Plus d’infos sur le packaging d’applications :** diff --git a/README_gl.md b/README_gl.md new file mode 100644 index 0000000..68b4075 --- /dev/null +++ b/README_gl.md @@ -0,0 +1,50 @@ + + +# XWiki para YunoHost + +[![Nivel de integración](https://dash.yunohost.org/integration/xwiki.svg)](https://dash.yunohost.org/appci/app/xwiki) ![Estado de funcionamento](https://ci-apps.yunohost.org/ci/badges/xwiki.status.svg) ![Estado de mantemento](https://ci-apps.yunohost.org/ci/badges/xwiki.maintain.svg) + +[![Instalar XWiki con YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=xwiki) + +*[Le este README en outros idiomas.](./ALL_README.md)* + +> *Este paquete permíteche instalar XWiki de xeito rápido e doado nun servidor YunoHost.* +> *Se non usas YunoHost, le a [documentación](https://yunohost.org/install) para saber como instalalo.* + +## Vista xeral + +XWiki is an Open Source wiki engine (LGPLv2) suitable for use by workgroups (associations, companies, etc.). The software allows the rapid creation of small applications to meet different information management needs. + +**Versión proporcionada:** 16.3.1~ynh1 + +**Demo:** + +## Capturas de pantalla + +![Captura de pantalla de XWiki](./doc/screenshots/XWiki-standard-help.jpg) + +## Documentación e recursos + +- Web oficial da app: +- Documentación oficial para usuarias: +- Documentación oficial para admin: +- Repositorio de orixe do código: +- Tenda YunoHost: +- Informar dun problema: + +## Info de desenvolvemento + +Envía a túa colaboración á [rama `testing`](https://github.com/YunoHost-Apps/xwiki_ynh/tree/testing). + +Para probar a rama `testing`, procede deste xeito: + +```bash +sudo yunohost app install https://github.com/YunoHost-Apps/xwiki_ynh/tree/testing --debug +ou +sudo yunohost app upgrade xwiki -u https://github.com/YunoHost-Apps/xwiki_ynh/tree/testing --debug +``` + +**Máis info sobre o empaquetado da app:** diff --git a/README_zh_Hans.md b/README_zh_Hans.md new file mode 100644 index 0000000..9893388 --- /dev/null +++ b/README_zh_Hans.md @@ -0,0 +1,50 @@ + + +# YunoHost 上的 XWiki + +[![集成程度](https://dash.yunohost.org/integration/xwiki.svg)](https://dash.yunohost.org/appci/app/xwiki) ![工作状态](https://ci-apps.yunohost.org/ci/badges/xwiki.status.svg) ![维护状态](https://ci-apps.yunohost.org/ci/badges/xwiki.maintain.svg) + +[![使用 YunoHost 安装 XWiki](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=xwiki) + +*[阅读此 README 的其它语言版本。](./ALL_README.md)* + +> *通过此软件包,您可以在 YunoHost 服务器上快速、简单地安装 XWiki。* +> *如果您还没有 YunoHost,请参阅[指南](https://yunohost.org/install)了解如何安装它。* + +## 概况 + +XWiki is an Open Source wiki engine (LGPLv2) suitable for use by workgroups (associations, companies, etc.). The software allows the rapid creation of small applications to meet different information management needs. + +**分发版本:** 16.3.1~ynh1 + +**演示:** + +## 截图 + +![XWiki 的截图](./doc/screenshots/XWiki-standard-help.jpg) + +## 文档与资源 + +- 官方应用网站: +- 官方用户文档: +- 官方管理文档: +- 上游应用代码库: +- YunoHost 商店: +- 报告 bug: + +## 开发者信息 + +请向 [`testing` 分支](https://github.com/YunoHost-Apps/xwiki_ynh/tree/testing) 发送拉取请求。 + +如要尝试 `testing` 分支,请这样操作: + +```bash +sudo yunohost app install https://github.com/YunoHost-Apps/xwiki_ynh/tree/testing --debug +或 +sudo yunohost app upgrade xwiki -u https://github.com/YunoHost-Apps/xwiki_ynh/tree/testing --debug +``` + +**有关应用打包的更多信息:** From 77349f1ce12fcbf353daf5f5b227a7fc405a3d26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josu=C3=A9=20Tille?= Date: Tue, 28 May 2024 00:46:59 +0200 Subject: [PATCH 11/16] Add PR and Issue templates --- .github/ISSUE_TEMPLATE.md | 55 ++++++++++++++++++++++++++++++++ .github/PULL_REQUEST_TEMPLATE.md | 16 ++++++++++ 2 files changed, 71 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE.md create mode 100644 .github/PULL_REQUEST_TEMPLATE.md diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md new file mode 100644 index 0000000..2729a6b --- /dev/null +++ b/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,55 @@ +--- +name: Bug report +about: When creating a bug report, please use the following template to provide all the relevant information and help debugging efficiently. + +--- + +**How to post a meaningful bug report** +1. *Read this whole template first.* +2. *Determine if you are on the right place:* + - *If you were performing an action on the app from the webadmin or the CLI (install, update, backup, restore, change_url...), you are on the right place!* + - *Otherwise, the issue may be due to the app itself. Refer to its documentation or repository for help.* + - *When in doubt, post here and we will figure it out together.* +3. *Delete the italic comments as you write over them below, and remove this guide.* +--- + +### Describe the bug + +*A clear and concise description of what the bug is.* + +### Context + +- Hardware: *VPS bought online / Old laptop or computer / Raspberry Pi at home / Internet Cube with VPN / Other ARM board / ...* +- YunoHost version: x.x.x +- I have access to my server: *Through SSH | through the webadmin | direct access via keyboard / screen | ...* +- Are you in a special context or did you perform some particular tweaking on your YunoHost instance?: *no / yes* + - If yes, please explain: +- Using, or trying to install package version/branch: +- If upgrading, current package version: *can be found in the admin, or with `yunohost app info $app_id`* + +### Steps to reproduce + +- *If you performed a command from the CLI, the command itself is enough. For example:* + ```sh + sudo yunohost app install the_app + ``` +- *If you used the webadmin, please perform the equivalent command from the CLI first.* +- *If the error occurs in your browser, explain what you did:* + 1. *Go to '...'* + 2. *Click on '...'* + 3. *Scroll down to '...'* + 4. *See error* + +### Expected behavior + +*A clear and concise description of what you expected to happen. You can remove this section if the command above is enough to understand your intent.* + +### Logs + +*When an operation fails, YunoHost provides a simple way to share the logs.* +- *In the webadmin, the error message contains a link to the relevant log page. On that page, you will be able to 'Share with Yunopaste'. If you missed it, the logs of previous operations are also available under Tools > Logs.* +- *In command line, the command to share the logs is displayed at the end of the operation and looks like `yunohost log display [log name] --share`. If you missed it, you can find the log ID of a previous operation using `yunohost log list`.* + +*After sharing the log, please copypaste directly the link provided by YunoHost (to help readability, no need to copypaste the entire content of the log here, just the link is enough...)* + +*If applicable and useful, add screenshots to help explain your problem.* diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..ef70e18 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,16 @@ +## Problem + +- *Description of why you made this PR* + +## Solution + +- *And how do you fix that problem* + +## PR Status + +- [ ] Code finished and ready to be reviewed/tested +- [ ] The fix/enhancement were manually tested (if applicable) + +## Automatic tests + +Automatic tests can be triggered on https://ci-apps-dev.yunohost.org/ *after creating the PR*, by commenting "!testme", "!gogogadgetoci" or "By the power of systemd, I invoke The Great App CI to test this Pull Request!". (N.B. : for this to work you need to be a member of the Yunohost-Apps organization) From e325aa5d9ed5933de1270386e6278e62eac80fa0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josu=C3=A9=20Tille?= Date: Thu, 30 May 2024 22:09:00 +0200 Subject: [PATCH 12/16] Fix app version retrivement --- auto_update/auto_update.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/auto_update/auto_update.sh b/auto_update/auto_update.sh index ce5ed10..146b428 100644 --- a/auto_update/auto_update.sh +++ b/auto_update/auto_update.sh @@ -20,10 +20,11 @@ EOL check_app_version() { local app_remote_version=$(curl https://nexus.xwiki.org/nexus/content/groups/public/org/xwiki/platform/xwiki-platform-distribution-jetty-hsqldb/maven-metadata.xml | - xq --indent 0 -x '//metadata/versioning/versions' | + xq -x '//metadata/versioning/versions' | sed -E 's|\s*(.*)\s*|\1|g' | grep -v '\-rc-' | grep -v '\-milestone-' | + grep -v '^$' | python3 -c 'import sys from packaging.version import Version versions = sys.stdin.read().splitlines() From f3e1c435c2e6ce107dbd80dbc082b544ac1cbdae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josu=C3=A9=20Tille?= Date: Thu, 30 May 2024 22:41:58 +0200 Subject: [PATCH 13/16] Fix unset var --- auto_update/auto_update.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/auto_update/auto_update.sh b/auto_update/auto_update.sh index 146b428..96280ed 100644 --- a/auto_update/auto_update.sh +++ b/auto_update/auto_update.sh @@ -31,7 +31,7 @@ versions = sys.stdin.read().splitlines() versions.sort(key=Version) print(versions[-1])') - local jdbc_version=$(curl 'https://api.github.com/repos/pgjdbc/pgjdbc/releases/latest' -H 'Host: api.github.com' --compressed | jq -r ".tag_name" | cut -dL -f2) + jdbc_version=$(curl 'https://api.github.com/repos/pgjdbc/pgjdbc/releases/latest' -H 'Host: api.github.com' --compressed | jq -r ".tag_name" | cut -dL -f2) ## Check if new build is needed if [[ "$app_version" != "$app_remote_version" ]] From 0bc004c5f3046e3dc84bc65461fac695b48c4ee1 Mon Sep 17 00:00:00 2001 From: App auto update Date: Thu, 30 May 2024 20:43:37 +0000 Subject: [PATCH 14/16] Upgrade xwiki to 16.4.0 --- manifest.toml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/manifest.toml b/manifest.toml index c0c5610..d663709 100644 --- a/manifest.toml +++ b/manifest.toml @@ -5,7 +5,7 @@ name = "XWiki" description.en = "Collaboration tool based on the wiki principle" description.fr = "Outil de collaboration basé sur le principe du wiki" -version = "16.3.1~ynh1" +version = "16.4.0~ynh1" maintainers = ["Josué Tille"] @@ -61,13 +61,13 @@ ram.runtime = "1G" [resources.sources] [resources.sources.main] - url = "https://nexus.xwiki.org/nexus/content/groups/public/org/xwiki/platform/xwiki-platform-distribution-jetty-hsqldb/16.3.1/xwiki-platform-distribution-jetty-hsqldb-16.3.1.zip" - sha256 = "cb82326455089ef2f2d6a0631821f74530a8043aeee3486265482b58fbaa0e79" + url = "https://nexus.xwiki.org/nexus/content/groups/public/org/xwiki/platform/xwiki-platform-distribution-jetty-hsqldb/16.4.0/xwiki-platform-distribution-jetty-hsqldb-16.4.0.zip" + sha256 = "5cfc373198bb7386a573dfcbfa8352af4ce0017b49911ec724900fb58cf7bace" format = "zip" [resources.sources.jdbc] url = "https://jdbc.postgresql.org/download/postgresql-42.7.3.jar" - rename = "postgresql-42.7.0.jar" + rename = "postgresql-42.7.3.jar" sha256 = "a2644cbfba1baa145ff7e8c8ef582a6eed7a7ec4ca792f7f054122bdec756268" # Note that xq is available on debian package since debian 12 From 75363d9de6c46a75157208f0066262895438b883 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Thu, 30 May 2024 20:46:04 +0000 Subject: [PATCH 15/16] Auto-update READMEs --- README.md | 2 +- README_es.md | 2 +- README_eu.md | 2 +- README_fr.md | 2 +- README_gl.md | 2 +- README_zh_Hans.md | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index e6c3ba0..55d4568 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ It shall NOT be edited by hand. XWiki is an Open Source wiki engine (LGPLv2) suitable for use by workgroups (associations, companies, etc.). The software allows the rapid creation of small applications to meet different information management needs. -**Shipped version:** 16.3.1~ynh1 +**Shipped version:** 16.4.0~ynh1 **Demo:** diff --git a/README_es.md b/README_es.md index 27755be..08706fe 100644 --- a/README_es.md +++ b/README_es.md @@ -18,7 +18,7 @@ No se debe editar a mano. XWiki is an Open Source wiki engine (LGPLv2) suitable for use by workgroups (associations, companies, etc.). The software allows the rapid creation of small applications to meet different information management needs. -**Versión actual:** 16.3.1~ynh1 +**Versión actual:** 16.4.0~ynh1 **Demo:** diff --git a/README_eu.md b/README_eu.md index b663207..5e43e97 100644 --- a/README_eu.md +++ b/README_eu.md @@ -18,7 +18,7 @@ EZ editatu eskuz. XWiki is an Open Source wiki engine (LGPLv2) suitable for use by workgroups (associations, companies, etc.). The software allows the rapid creation of small applications to meet different information management needs. -**Paketatutako bertsioa:** 16.3.1~ynh1 +**Paketatutako bertsioa:** 16.4.0~ynh1 **Demoa:** diff --git a/README_fr.md b/README_fr.md index 2818d0e..5339058 100644 --- a/README_fr.md +++ b/README_fr.md @@ -18,7 +18,7 @@ Il NE doit PAS être modifié à la main. XWiki est un moteur de wiki Open Source (LGPLv2) adapté à un usage pour des groupes de travail (associations, entreprises…). Le logiciel permet la création rapide de petites applications pour répondre à différents besoins de gestion de l'information. -**Version incluse :** 16.3.1~ynh1 +**Version incluse :** 16.4.0~ynh1 **Démo :** diff --git a/README_gl.md b/README_gl.md index 68b4075..9320196 100644 --- a/README_gl.md +++ b/README_gl.md @@ -18,7 +18,7 @@ NON debe editarse manualmente. XWiki is an Open Source wiki engine (LGPLv2) suitable for use by workgroups (associations, companies, etc.). The software allows the rapid creation of small applications to meet different information management needs. -**Versión proporcionada:** 16.3.1~ynh1 +**Versión proporcionada:** 16.4.0~ynh1 **Demo:** diff --git a/README_zh_Hans.md b/README_zh_Hans.md index 9893388..d5ba5ed 100644 --- a/README_zh_Hans.md +++ b/README_zh_Hans.md @@ -18,7 +18,7 @@ XWiki is an Open Source wiki engine (LGPLv2) suitable for use by workgroups (associations, companies, etc.). The software allows the rapid creation of small applications to meet different information management needs. -**分发版本:** 16.3.1~ynh1 +**分发版本:** 16.4.0~ynh1 **演示:** From e7421a071b35dee99ed07c674232a30654fa2066 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josu=C3=A9=20Tille?= Date: Thu, 30 May 2024 22:50:29 +0200 Subject: [PATCH 16/16] Fix retrive version --- auto_update/auto_update.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/auto_update/auto_update.sh b/auto_update/auto_update.sh index 96280ed..e130c82 100644 --- a/auto_update/auto_update.sh +++ b/auto_update/auto_update.sh @@ -4,6 +4,8 @@ set -eu readonly app_name=xwiki +source auto_update_config.sh + get_from_manifest() { result=$(python3 <