From 0ef2af32e2781c8c5c4e5882a9970b672174f005 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Wed, 26 Jan 2022 00:23:42 +0100 Subject: [PATCH] Fix bullseye --- .gitignore | 2 -- scripts/_common.sh | 4 +--- scripts/install | 49 ++++++++++++++++++++------------------------ scripts/upgrade | 51 +++++++++++++++++++++------------------------- 4 files changed, 46 insertions(+), 60 deletions(-) delete mode 100644 .gitignore diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 783a4ae..0000000 --- a/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -*~ -*.sw[op] diff --git a/scripts/_common.sh b/scripts/_common.sh index edc1383..71ceb03 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -4,9 +4,7 @@ # COMMON VARIABLES #================================================= -YNH_PHP_VERSION="7.3" - -pkg_dependencies="curl php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-gettext php${YNH_PHP_VERSION}-imap php${YNH_PHP_VERSION}-json php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-zip php${YNH_PHP_VERSION}-intl php${YNH_PHP_VERSION}-apcu php${YNH_PHP_VERSION}-curl" +pkg_dependencies="curl php${YNH_PHP_VERSION}-gd php-php-gettext php${YNH_PHP_VERSION}-imap php${YNH_PHP_VERSION}-json php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-zip php${YNH_PHP_VERSION}-intl php${YNH_PHP_VERSION}-apcu php${YNH_PHP_VERSION}-curl" #================================================= # PERSONAL HELPERS diff --git a/scripts/install b/scripts/install index c9d06b5..7b92513 100644 --- a/scripts/install +++ b/scripts/install @@ -102,6 +102,8 @@ ynh_setup_source --dest_dir="$final_path/include/plugins/build/microsoft-teams" ynh_setup_source --dest_dir="$final_path/include/plugins/build/slack" --source_id="plugin-slack" ynh_setup_source --dest_dir="$final_path/include/plugins/build/preventautoscroll" --source_id="plugin-preventautoscroll" +rsync -a "../conf/i18n" "$final_path/include/." + chmod 750 "$final_path" chmod -R o-rwx "$final_path" chown -R $app:www-data "$final_path" @@ -147,40 +149,33 @@ chown $app:www-data "$final_path/include/ost-config.php" #================================================= ynh_script_progression --message="Building plugins..." -mkdir -p "$final_path/include/plugins/build/.config/composer" +ynh_exec_as $app mkdir -p "$final_path/include/plugins/build/.config/composer" export COMPOSER_HOME="$final_path/include/plugins/build/.config/composer" pushd "$final_path/include/plugins/build" - php${phpversion} make.php hydrate - php${phpversion} -dphar.readonly=0 make.php build auth-cas - php${phpversion} -dphar.readonly=0 make.php build auth-ldap - php${phpversion} -dphar.readonly=0 make.php build auth-oauth - php${phpversion} -dphar.readonly=0 make.php build auth-passthru - php${phpversion} -dphar.readonly=0 make.php build storage-fs - php${phpversion} -dphar.readonly=0 make.php build storage-s3 - php${phpversion} -dphar.readonly=0 make.php build archiver - php${phpversion} -dphar.readonly=0 make.php build attachment_preview - php${phpversion} -dphar.readonly=0 make.php build autocloser - php${phpversion} -dphar.readonly=0 make.php build fetch-note - php${phpversion} -dphar.readonly=0 make.php build field-radiobuttons - php${phpversion} -dphar.readonly=0 make.php build fwd-rewriter - php${phpversion} -dphar.readonly=0 make.php build mattermost - php${phpversion} -dphar.readonly=0 make.php build mentioner - php${phpversion} -dphar.readonly=0 make.php build microsoft-teams - php${phpversion} -dphar.readonly=0 make.php build slack - php${phpversion} -dphar.readonly=0 make.php build preventautoscroll - cp *.phar $final_path/include/plugins/. + ynh_exec_warn_less ynh_exec_as $app php$phpversion make.php hydrate + ynh_exec_warn_less ynh_exec_as $app php$phpversion -dphar.readonly=0 make.php build auth-cas + ynh_exec_warn_less ynh_exec_as $app php$phpversion -dphar.readonly=0 make.php build auth-ldap + ynh_exec_warn_less ynh_exec_as $app php$phpversion -dphar.readonly=0 make.php build auth-oauth + ynh_exec_warn_less ynh_exec_as $app php$phpversion -dphar.readonly=0 make.php build auth-passthru + ynh_exec_warn_less ynh_exec_as $app php$phpversion -dphar.readonly=0 make.php build storage-fs + ynh_exec_warn_less ynh_exec_as $app php$phpversion -dphar.readonly=0 make.php build storage-s3 + ynh_exec_warn_less ynh_exec_as $app php$phpversion -dphar.readonly=0 make.php build archiver + ynh_exec_warn_less ynh_exec_as $app php$phpversion -dphar.readonly=0 make.php build attachment_preview + ynh_exec_warn_less ynh_exec_as $app php$phpversion -dphar.readonly=0 make.php build autocloser + ynh_exec_warn_less ynh_exec_as $app php$phpversion -dphar.readonly=0 make.php build fetch-note + ynh_exec_warn_less ynh_exec_as $app php$phpversion -dphar.readonly=0 make.php build field-radiobuttons + ynh_exec_warn_less ynh_exec_as $app php$phpversion -dphar.readonly=0 make.php build fwd-rewriter + ynh_exec_warn_less ynh_exec_as $app php$phpversion -dphar.readonly=0 make.php build mattermost + ynh_exec_warn_less ynh_exec_as $app php$phpversion -dphar.readonly=0 make.php build mentioner + ynh_exec_warn_less ynh_exec_as $app php$phpversion -dphar.readonly=0 make.php build microsoft-teams + ynh_exec_warn_less ynh_exec_as $app php$phpversion -dphar.readonly=0 make.php build slack + ynh_exec_warn_less ynh_exec_as $app php$phpversion -dphar.readonly=0 make.php build preventautoscroll + ynh_exec_warn_less ynh_exec_as $app cp *.phar $final_path/include/plugins/. popd ynh_secure_remove --file="$final_path/include/plugins/build" -#================================================= -# INSTALL LANGUAGE -#================================================= -ynh_script_progression --message="Installing language..." - -rsync -a "../conf/i18n" "$final_path/include/." - #================================================= # SETUP APPLICATION WITH CURL #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 741a130..3a1b332 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -84,7 +84,7 @@ then # Download, check integrity, uncompress and patch the source from app.src ynh_setup_source --dest_dir="$final_path" ynh_setup_source --dest_dir="$final_path/include/plugins/build" --source_id="core-plugins" -ynh_replace_string --match_string="net_ldap2" --replace_string="Net_LDAP2" --target_file="$final_path/include/plugins/build/auth-ldap/plugin.php" + ynh_replace_string --match_string="net_ldap2" --replace_string="Net_LDAP2" --target_file="$final_path/include/plugins/build/auth-ldap/plugin.php" ynh_setup_source --dest_dir="$final_path/include/plugins/build/archiver" --source_id="plugin-archiver" ynh_setup_source --dest_dir="$final_path/include/plugins/build/attachment_preview" --source_id="plugin-attachment_preview" ynh_setup_source --dest_dir="$final_path/include/plugins/build/autocloser" --source_id="plugin-autocloser" @@ -102,6 +102,8 @@ ynh_replace_string --match_string="net_ldap2" --replace_string="Net_LDAP2" --tar ynh_secure_remove --file="$tmpdir" fi +rsync -a "../conf/i18n" "$final_path/include/." + chmod 750 "$final_path" chmod -R o-rwx "$final_path" chown -R $app:www-data "$final_path" @@ -149,40 +151,33 @@ ynh_script_progression --message="Building plugins..." if [ "$upgrade_type" == "UPGRADE_APP" ] then - mkdir -p "$final_path/include/plugins/build/.config/composer" + ynh_exec_as $app mkdir -p "$final_path/include/plugins/build/.config/composer" COMPOSER_HOME="$final_path/include/plugins/build/.config/composer" pushd "$final_path/include/plugins/build" - php${phpversion} make.php hydrate - php${phpversion} -dphar.readonly=0 make.php build auth-cas - php${phpversion} -dphar.readonly=0 make.php build auth-ldap - php${phpversion} -dphar.readonly=0 make.php build auth-oauth - php${phpversion} -dphar.readonly=0 make.php build auth-passthru - php${phpversion} -dphar.readonly=0 make.php build storage-fs - php${phpversion} -dphar.readonly=0 make.php build storage-s3 - php${phpversion} -dphar.readonly=0 make.php build archiver - php${phpversion} -dphar.readonly=0 make.php build attachment_preview - php${phpversion} -dphar.readonly=0 make.php build autocloser - php${phpversion} -dphar.readonly=0 make.php build fetch-note - php${phpversion} -dphar.readonly=0 make.php build field-radiobuttons - php${phpversion} -dphar.readonly=0 make.php build fwd-rewriter - php${phpversion} -dphar.readonly=0 make.php build mattermost - php${phpversion} -dphar.readonly=0 make.php build mentioner - php${phpversion} -dphar.readonly=0 make.php build microsoft-teams - php${phpversion} -dphar.readonly=0 make.php build slack - php${phpversion} -dphar.readonly=0 make.php build preventautoscroll - cp -f *.phar $final_path/include/plugins/. + ynh_exec_warn_less ynh_exec_as $app php$phpversion make.php hydrate + ynh_exec_warn_less ynh_exec_as $app php$phpversion -dphar.readonly=0 make.php build auth-cas + ynh_exec_warn_less ynh_exec_as $app php$phpversion -dphar.readonly=0 make.php build auth-ldap + ynh_exec_warn_less ynh_exec_as $app php$phpversion -dphar.readonly=0 make.php build auth-oauth + ynh_exec_warn_less ynh_exec_as $app php$phpversion -dphar.readonly=0 make.php build auth-passthru + ynh_exec_warn_less ynh_exec_as $app php$phpversion -dphar.readonly=0 make.php build storage-fs + ynh_exec_warn_less ynh_exec_as $app php$phpversion -dphar.readonly=0 make.php build storage-s3 + ynh_exec_warn_less ynh_exec_as $app php$phpversion -dphar.readonly=0 make.php build archiver + ynh_exec_warn_less ynh_exec_as $app php$phpversion -dphar.readonly=0 make.php build attachment_preview + ynh_exec_warn_less ynh_exec_as $app php$phpversion -dphar.readonly=0 make.php build autocloser + ynh_exec_warn_less ynh_exec_as $app php$phpversion -dphar.readonly=0 make.php build fetch-note + ynh_exec_warn_less ynh_exec_as $app php$phpversion -dphar.readonly=0 make.php build field-radiobuttons + ynh_exec_warn_less ynh_exec_as $app php$phpversion -dphar.readonly=0 make.php build fwd-rewriter + ynh_exec_warn_less ynh_exec_as $app php$phpversion -dphar.readonly=0 make.php build mattermost + ynh_exec_warn_less ynh_exec_as $app php$phpversion -dphar.readonly=0 make.php build mentioner + ynh_exec_warn_less ynh_exec_as $app php$phpversion -dphar.readonly=0 make.php build microsoft-teams + ynh_exec_warn_less ynh_exec_as $app php$phpversion -dphar.readonly=0 make.php build slack + ynh_exec_warn_less ynh_exec_as $app php$phpversion -dphar.readonly=0 make.php build preventautoscroll + ynh_exec_warn_less ynh_exec_as $app cp -f *.phar $final_path/include/plugins/. popd ynh_secure_remove --file="$final_path/include/plugins/build" ynh_secure_remove --file="$final_path/setup" fi -#================================================= -# UPGRADE LANGUAGE -#================================================= -ynh_script_progression --message="UPGRADING language..." - -rsync -a "../conf/i18n" "$final_path/include/." - #================================================= # SET THE CRON FILE #=================================================