YunoHost-Apps / pixelfed_ynh

The federated image shareing service Pixelfed for YunoHost
https://pixelfed.org/
GNU Affero General Public License v3.0
44 stars 15 forks source link

v0.11.2 + change php version to 7.4 #159

Closed lapineige closed 2 years ago

lapineige commented 2 years ago

Problem

Solution

PR Status

Pending until Pixelfed version is released : I wanted to keep in mind that we would need to upgrade PHP version… that's why I made that draft

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)

lapineige commented 2 years ago

!testme

yunohost-bot commented 2 years ago

:rocket: Test Badge

lapineige commented 2 years ago

I don't understand.

(also CI failing, an issue with php7.4 ?)

yalh76 commented 2 years ago

I don't understand.

Done at https://github.com/YunoHost-Apps/pixelfed_ynh/pull/159/commits/9f255da5a4a21a7597d6405479fe9cbad18a1e31

(also CI failing, an issue with php7.4 ?)

It's just because php-fpm is restored before dependencies

yalh76 commented 2 years ago

!testme

yunohost-bot commented 2 years ago

Fingers crossed! Test Badge

lapineige commented 2 years ago

For my culture, what's the use of that check ?

lapineige commented 2 years ago

Upgrade fails:

Info: DEBUG - + ynh_composer_exec --phpversion=7.3 --workdir=/var/www/pixelfed --commands=update Info: DEBUG - + declare -Ar args_array Info: INFO - [######..............] > Updating composer dependencies... Info: DEBUG - + workdir=/var/www/pixelfed Info: DEBUG - + phpversion=7.3 Info: DEBUG - + COMPOSER_HOME=/var/www/pixelfed/.composer Info: DEBUG - + COMPOSER_MEMORY_LIMIT=-1 Info: DEBUG - + php7.3 /var/www/pixelfed/composer.phar update -d /var/www/pixelfed --no-interaction --no-ansi Info: DEBUG - Do not run Composer as root/super user! See https://getcomposer.org/root for details Info: DEBUG - Loading composer repositories with package information Info: DEBUG - Warning from https://repo.packagist.org: Support for Composer 1 is deprecated and some packages will not be available. You should upgrade to Composer 2. See https://blog.packagist.com/deprecating-composer-1-support/ Info: DEBUG - Updating dependencies (including require-dev) Info: DEBUG - Your requirements could not be resolved to an installable set of packages. Info: DEBUG - Info: DEBUG - Problem 1 Info: DEBUG - - This package requires php ^7.4|^8.0 but your HHVM version does not satisfy that requirement. Info: DEBUG - Problem 2 Info: DEBUG - - The requested PHP extension ext-bcmath * is missing from your system. Install or enable PHP's bcmath extension. Info: DEBUG - Info: DEBUG - + ynh_exit_properly

lapineige commented 2 years ago

So: The PHP version used is php7.3 because it's the settings stored for the app in Yunohost settings, not this repository: https://github.com/YunoHost-Apps/pixelfed_ynh/blob/new-PF-version/scripts/upgrade#L28

Should we force it to use the new version https://github.com/YunoHost-Apps/pixelfed_ynh/blob/new-PF-version/scripts/_common.sh#L7 ? So we overwrite that setting first ?

The second issue is PHP extension bcmath missing. We set it here https://github.com/YunoHost-Apps/pixelfed_ynh/blob/new-PF-version/scripts/_common.sh#L11, but I guess that's not the good version ?

@YunoHost-Apps/apps-group I think I will need help to make that app able to upgrade php version on the fly while installing, I don't know what I'm doing here… I would probably miss something 😅 🙏

yalh76 commented 2 years ago

!testme

yunohost-bot commented 2 years ago

:v: Test Badge

lapineige commented 2 years ago

I tried it, no luck :sweat_smile:

Unpacking php7.4-zip (7.4.27-1+0~20211220.57+debian10~1.gbp832572) ...
2022-01-14 20:12:49,609: DEBUG - Setting up php7.4-pgsql (7.4.27-1+0~20211220.57+debian10~1.gbp832572) ...
2022-01-14 20:12:49,616: DEBUG - /bin/bash: BASH_XTRACEFD: 7: invalid value for trace file descriptor
2022-01-14 20:12:49,751: DEBUG - /bin/bash: BASH_XTRACEFD: 7: invalid value for trace file descriptor
2022-01-14 20:12:49,804: DEBUG - 
2022-01-14 20:12:49,804: DEBUG - Creating config file /etc/php/7.4/mods-available/pgsql.ini with new version
2022-01-14 20:12:49,863: DEBUG - /bin/bash: BASH_XTRACEFD: 7: invalid value for trace file descriptor
2022-01-14 20:12:49,994: DEBUG - /bin/bash: BASH_XTRACEFD: 7: invalid value for trace file descriptor
2022-01-14 20:12:50,118: DEBUG - /bin/bash: BASH_XTRACEFD: 7: invalid value for trace file descriptor
2022-01-14 20:12:50,169: DEBUG - 
2022-01-14 20:12:50,169: DEBUG - Creating config file /etc/php/7.4/mods-available/pdo_pgsql.ini with new version
2022-01-14 20:12:50,227: DEBUG - /bin/bash: BASH_XTRACEFD: 7: invalid value for trace file descriptor
2022-01-14 20:12:50,341: DEBUG - Setting up php7.4-imagick (3.6.0-1+0~20211231.34+debian10~1.gbp2575b4) ...
2022-01-14 20:12:50,441: DEBUG - Setting up php7.4-curl (7.4.27-1+0~20211220.57+debian10~1.gbp832572) ...
2022-01-14 20:12:50,453: DEBUG - /bin/bash: BASH_XTRACEFD: 7: invalid value for trace file descriptor
2022-01-14 20:12:50,587: DEBUG - /bin/bash: BASH_XTRACEFD: 7: invalid value for trace file descriptor
2022-01-14 20:12:50,642: DEBUG - 
2022-01-14 20:12:50,643: DEBUG - Creating config file /etc/php/7.4/mods-available/curl.ini with new version
2022-01-14 20:12:50,699: DEBUG - /bin/bash: BASH_XTRACEFD: 7: invalid value for trace file descriptor
2022-01-14 20:12:50,824: DEBUG - Setting up php7.4-fpm (7.4.27-1+0~20211220.57+debian10~1.gbp832572) ...
2022-01-14 20:12:50,846: DEBUG - /bin/bash: BASH_XTRACEFD: 7: invalid value for trace file descriptor
2022-01-14 20:12:50,975: DEBUG - /bin/bash: BASH_XTRACEFD: 7: invalid value for trace file descriptor
2022-01-14 20:12:51,024: DEBUG - 
2022-01-14 20:12:51,024: DEBUG - Creating config file /etc/php/7.4/fpm/php.ini with new version
2022-01-14 20:12:51,091: DEBUG - /bin/bash: BASH_XTRACEFD: 7: invalid value for trace file descriptor
2022-01-14 20:12:52,169: DEBUG - Created symlink /etc/systemd/system/multi-user.target.wants/php7.4-fpm.service -> /lib/systemd/system/php7.4-fpm.service.
2022-01-14 20:12:53,564: DEBUG - Setting up php7.4-bcmath (7.4.27-1+0~20211220.57+debian10~1.gbp832572) ...
2022-01-14 20:12:53,573: DEBUG - /bin/bash: BASH_XTRACEFD: 7: invalid value for trace file descriptor
2022-01-14 20:12:53,711: DEBUG - /bin/bash: BASH_XTRACEFD: 7: invalid value for trace file descriptor
2022-01-14 20:12:53,763: DEBUG - 
2022-01-14 20:12:53,764: DEBUG - Creating config file /etc/php/7.4/mods-available/bcmath.ini with new version
2022-01-14 20:12:53,816: DEBUG - /bin/bash: BASH_XTRACEFD: 7: invalid value for trace file descriptor
2022-01-14 20:12:53,931: DEBUG - Setting up php7.4-intl (7.4.27-1+0~20211220.57+debian10~1.gbp832572) ...
2022-01-14 20:12:53,936: DEBUG - /bin/bash: BASH_XTRACEFD: 7: invalid value for trace file descriptor
2022-01-14 20:12:54,060: DEBUG - /bin/bash: BASH_XTRACEFD: 7: invalid value for trace file descriptor
2022-01-14 20:12:54,112: DEBUG - 
2022-01-14 20:12:54,112: DEBUG - Creating config file /etc/php/7.4/mods-available/intl.ini with new version
2022-01-14 20:12:54,167: DEBUG - /bin/bash: BASH_XTRACEFD: 7: invalid value for trace file descriptor
2022-01-14 20:12:54,301: DEBUG - Setting up php7.4 (7.4.27-1+0~20211220.57+debian10~1.gbp832572) ...
2022-01-14 20:12:54,309: DEBUG - Setting up php7.4-zip (7.4.27-1+0~20211220.57+debian10~1.gbp832572) ...
2022-01-14 20:12:54,317: DEBUG - /bin/bash: BASH_XTRACEFD: 7: invalid value for trace file descriptor
2022-01-14 20:12:54,497: DEBUG - /bin/bash: BASH_XTRACEFD: 7: invalid value for trace file descriptor
2022-01-14 20:12:54,551: DEBUG - 
2022-01-14 20:12:54,552: DEBUG - Creating config file /etc/php/7.4/mods-available/zip.ini with new version
2022-01-14 20:12:54,611: DEBUG - /bin/bash: BASH_XTRACEFD: 7: invalid value for trace file descriptor
2022-01-14 20:12:54,725: DEBUG - Setting up php7.4-igbinary (3.2.6+2.0.8-2+0~20211115.31+debian10~1.gbpfaf284) ...
2022-01-14 20:12:54,829: DEBUG - Setting up php7.4-redis (5.3.5+4.3.0-2+0~20211231.39+debian10~1.gbp134a26) ...
2022-01-14 20:12:54,945: DEBUG - Setting up php7.4-gd (7.4.27-1+0~20211220.57+debian10~1.gbp832572) ...
2022-01-14 20:12:54,957: DEBUG - /bin/bash: BASH_XTRACEFD: 7: invalid value for trace file descriptor
2022-01-14 20:12:55,091: DEBUG - /bin/bash: BASH_XTRACEFD: 7: invalid value for trace file descriptor
2022-01-14 20:12:55,143: DEBUG - 
2022-01-14 20:12:55,143: DEBUG - Creating config file /etc/php/7.4/mods-available/gd.ini with new version
2022-01-14 20:12:55,208: DEBUG - /bin/bash: BASH_XTRACEFD: 7: invalid value for trace file descriptor
2022-01-14 20:12:55,330: DEBUG - Processing triggers for man-db (2.8.5-2) ...
2022-01-14 20:12:55,524: DEBUG - Processing triggers for systemd (241-7~deb10u8) ...
2022-01-14 20:12:55,925: DEBUG - Processing triggers for php7.4-cli (7.4.27-1+0~20211220.57+debian10~1.gbp832572) ...
2022-01-14 20:12:55,933: DEBUG - Processing triggers for php7.4-fpm (7.4.27-1+0~20211220.57+debian10~1.gbp832572) ...
2022-01-14 20:12:56,534: DEBUG - + [[ -n /tmp/tmp.Cu2TArAcg2 ]]
2022-01-14 20:12:56,534: DEBUG - + rm --recursive --force /tmp/tmp.Cu2TArAcg2
2022-01-14 20:12:56,536: DEBUG - + ynh_package_is_installed pixelfed-ynh-deps
2022-01-14 20:12:56,546: DEBUG - + ynh_wait_dpkg_free
2022-01-14 20:12:56,620: DEBUG - + return 0
2022-01-14 20:12:56,620: DEBUG - + grep --count 'ok installed'
2022-01-14 20:12:56,621: DEBUG - + dpkg-query --show '--showformat=${Status}' pixelfed-ynh-deps
2022-01-14 20:12:56,641: DEBUG - + rm /tmp/pixelfed-ynh-deps.control
2022-01-14 20:12:56,643: DEBUG - + [[ -n 7.4 ]]
2022-01-14 20:12:56,643: DEBUG - + update-alternatives --set php /usr/bin/php7.3
2022-01-14 20:12:56,646: DEBUG - + ynh_app_setting_set --app=pixelfed --key=phpversion --value=7.4
2022-01-14 20:12:56,646: DEBUG - + local _globalapp=pixelfed
2022-01-14 20:12:56,718: DEBUG - + app=pixelfed
2022-01-14 20:12:56,718: DEBUG - + [[ phpversion =~ (unprotected|protected|skipped)_ ]]
2022-01-14 20:12:56,718: DEBUG - + ynh_app_setting set pixelfed phpversion 7.4
2022-01-14 20:12:56,765: DEBUG - /usr/share/yunohost/helpers.d/apt: line 328: phpversion: unbound variable
2022-01-14 20:12:56,766: DEBUG - ++ ynh_exit_properly
yalh76 commented 2 years ago

update-alternatives

I don't understand when it happens, can you provide a yunopaste of the full logs ?

lapineige commented 2 years ago

I updated my comment with more detailed log, sorry the log given by Yunohost was too short.

yalh76 commented 2 years ago

!testme

lapineige commented 2 years ago

I took the liberty to cancel the previous CI

It failed ! 😅

2022-01-14 21:41:09,687: INFO - [#####...............] > Upgrading PHP-FPM configuration...
2022-01-14 21:41:09,772: DEBUG - + package=
2022-01-14 21:41:09,772: DEBUG - + use_template=1
2022-01-14 21:41:09,772: DEBUG - + usage=low
2022-01-14 21:41:09,772: DEBUG - + footprint=low
2022-01-14 21:41:09,772: DEBUG - + '[' -n low ']'
2022-01-14 21:41:09,772: DEBUG - + use_template=0
2022-01-14 21:41:09,772: DEBUG - + dedicated_service=0
2022-01-14 21:41:09,772: DEBUG - + phpversion=7.4
2022-01-14 21:41:09,773: DEBUG - ++ ynh_app_setting_get --app=pixelfed --key=phpversion
2022-01-14 21:41:09,774: DEBUG - ++ local _globalapp=pixelfed
2022-01-14 21:41:09,820: DEBUG - ++ app=pixelfed
2022-01-14 21:41:09,820: DEBUG - ++ [[ phpversion =~ (unprotected|protected|skipped)_ ]]
2022-01-14 21:41:09,820: DEBUG - ++ ynh_app_setting get pixelfed phpversion
2022-01-14 21:41:09,864: DEBUG - + local old_phpversion=7.3
2022-01-14 21:41:09,864: DEBUG - + '[' -n 7.3 ']'
2022-01-14 21:41:09,864: DEBUG - + '[' 7.3 '!=' 7.4 ']'
2022-01-14 21:41:09,865: DEBUG - ++ ynh_app_setting_get --app=pixelfed --key=fpm_config_dir
2022-01-14 21:41:09,865: DEBUG - ++ local _globalapp=pixelfed
2022-01-14 21:41:09,895: DEBUG - ++ app=pixelfed
2022-01-14 21:41:09,895: DEBUG - ++ [[ fpm_config_dir =~ (unprotected|protected|skipped)_ ]]
2022-01-14 21:41:09,896: DEBUG - ++ ynh_app_setting get pixelfed fpm_config_dir
2022-01-14 21:41:09,939: DEBUG - + local old_php_fpm_config_dir=/etc/php/7.3/fpm
2022-01-14 21:41:09,939: DEBUG - + local old_php_finalphpconf=/etc/php/7.3/fpm/pool.d/pixelfed.conf
2022-01-14 21:41:09,940: DEBUG - + [[ -f /etc/php/7.3/fpm/pool.d/pixelfed.conf ]]
2022-01-14 21:41:09,940: DEBUG - + ynh_backup_if_checksum_is_different --file=/etc/php/7.3/fpm/pool.d/pixelfed.conf
2022-01-14 21:41:09,949: DEBUG - + local checksum_setting_name=checksum__etc_php_7.3_fpm_pool.d_pixelfed.conf
2022-01-14 21:41:09,950: DEBUG - ++ ynh_app_setting_get --app=pixelfed --key=checksum__etc_php_7.3_fpm_pool.d_pixelfed.conf
2022-01-14 21:41:09,950: DEBUG - ++ local _globalapp=pixelfed
2022-01-14 21:41:09,982: DEBUG - ++ app=pixelfed
2022-01-14 21:41:09,982: DEBUG - ++ [[ checksum__etc_php_7.3_fpm_pool.d_pixelfed.conf =~ (unprotected|protected|skipped)_ ]]
2022-01-14 21:41:09,982: DEBUG - ++ ynh_app_setting get pixelfed checksum__etc_php_7.3_fpm_pool.d_pixelfed.conf
2022-01-14 21:41:10,030: DEBUG - + local checksum_value=8c60406d30e16fa1cf346bc90c49c6bc
2022-01-14 21:41:10,030: DEBUG - + backup_file_checksum=
2022-01-14 21:41:10,030: DEBUG - + '[' -n 8c60406d30e16fa1cf346bc90c49c6bc ']'
2022-01-14 21:41:10,031: DEBUG - + '[' -e /etc/php/7.3/fpm/pool.d/pixelfed.conf ']'
2022-01-14 21:41:10,031: DEBUG - + md5sum --check --status
2022-01-14 21:41:10,033: DEBUG - + ynh_remove_fpm_config
2022-01-14 21:41:10,034: DEBUG - ++ ynh_app_setting_get --app=pixelfed --key=fpm_config_dir
2022-01-14 21:41:10,034: DEBUG - ++ local _globalapp=pixelfed
2022-01-14 21:41:10,066: DEBUG - ++ app=pixelfed
2022-01-14 21:41:10,067: DEBUG - ++ [[ fpm_config_dir =~ (unprotected|protected|skipped)_ ]]
2022-01-14 21:41:10,067: DEBUG - ++ ynh_app_setting get pixelfed fpm_config_dir
2022-01-14 21:41:10,112: DEBUG - + local fpm_config_dir=/etc/php/7.3/fpm
2022-01-14 21:41:10,113: DEBUG - ++ ynh_app_setting_get --app=pixelfed --key=fpm_service
2022-01-14 21:41:10,113: DEBUG - ++ local _globalapp=pixelfed
2022-01-14 21:41:10,146: DEBUG - ++ app=pixelfed
2022-01-14 21:41:10,147: DEBUG - ++ [[ fpm_service =~ (unprotected|protected|skipped)_ ]]
2022-01-14 21:41:10,147: DEBUG - ++ ynh_app_setting get pixelfed fpm_service
2022-01-14 21:41:10,192: DEBUG - + local fpm_service=php7.3-fpm
2022-01-14 21:41:10,192: DEBUG - ++ ynh_app_setting_get --app=pixelfed --key=fpm_dedicated_service
2022-01-14 21:41:10,193: DEBUG - ++ local _globalapp=pixelfed
2022-01-14 21:41:10,224: DEBUG - ++ app=pixelfed
2022-01-14 21:41:10,224: DEBUG - ++ [[ fpm_dedicated_service =~ (unprotected|protected|skipped)_ ]]
2022-01-14 21:41:10,224: DEBUG - ++ ynh_app_setting get pixelfed fpm_dedicated_service
2022-01-14 21:41:10,269: DEBUG - + local dedicated_service=0
2022-01-14 21:41:10,269: DEBUG - + dedicated_service=0
2022-01-14 21:41:10,270: DEBUG - ++ ynh_app_setting_get --app=pixelfed --key=phpversion
2022-01-14 21:41:10,270: DEBUG - ++ local _globalapp=pixelfed
2022-01-14 21:41:10,301: DEBUG - ++ app=pixelfed
2022-01-14 21:41:10,302: DEBUG - ++ [[ phpversion =~ (unprotected|protected|skipped)_ ]]
2022-01-14 21:41:10,302: DEBUG - ++ ynh_app_setting get pixelfed phpversion
2022-01-14 21:41:10,348: DEBUG - + local phpversion=7.3
2022-01-14 21:41:10,348: DEBUG - + phpversion=7.3
2022-01-14 21:41:10,348: DEBUG - + '[' -z /etc/php/7.3/fpm ']'
2022-01-14 21:41:10,348: DEBUG - + ynh_secure_remove --file=/etc/php/7.3/fpm/pool.d/pixelfed.conf
2022-01-14 21:41:10,369: DEBUG - + '[' -e /etc/php/7.3/fpm/conf.d/20-pixelfed.ini ']'
2022-01-14 21:41:10,369: DEBUG - + ynh_package_is_installed --package=php7.3-fpm
2022-01-14 21:41:10,381: DEBUG - + ynh_wait_dpkg_free
2022-01-14 21:41:10,479: DEBUG - + return 0
2022-01-14 21:41:10,480: DEBUG - + grep --count 'ok installed'
2022-01-14 21:41:10,481: DEBUG - + dpkg-query --show '--showformat=${Status}' php7.3-fpm
2022-01-14 21:41:10,499: DEBUG - + ynh_systemd_action --service_name=php7.3-fpm --action=reload
2022-01-14 21:41:10,573: DEBUG - + service_name=php7.3-fpm
2022-01-14 21:41:10,573: DEBUG - + action=reload
2022-01-14 21:41:10,573: DEBUG - + line_match=
2022-01-14 21:41:10,573: DEBUG - + length=20
2022-01-14 21:41:10,573: DEBUG - + log_path=/var/log/php7.3-fpm/php7.3-fpm.log
2022-01-14 21:41:10,573: DEBUG - + timeout=300
2022-01-14 21:41:10,573: DEBUG - + '[' reload == stop ']'
2022-01-14 21:41:10,573: DEBUG - + '[' reload == reload ']'
2022-01-14 21:41:10,573: DEBUG - + action=reload-or-restart
2022-01-14 21:41:10,573: DEBUG - + systemctl reload-or-restart php7.3-fpm
2022-01-14 21:41:10,596: DEBUG - + '[' 7.3 '!=' 7.3 ']'
2022-01-14 21:41:10,596: DEBUG - + '[' -n '' ']'
2022-01-14 21:41:10,597: DEBUG - + local fpm_service=php7.4-fpm
2022-01-14 21:41:10,597: DEBUG - + local fpm_config_dir=/etc/php/7.4/fpm
2022-01-14 21:41:10,597: DEBUG - + mkdir --parents /etc/php/7.4/fpm/pool.d
2022-01-14 21:41:10,604: DEBUG - + ynh_app_setting_set --app=pixelfed --key=fpm_config_dir --value=/etc/php/7.4/fpm
2022-01-14 21:41:10,604: DEBUG - + local _globalapp=pixelfed
2022-01-14 21:41:10,754: DEBUG - + app=pixelfed
2022-01-14 21:41:10,754: DEBUG - + [[ fpm_config_dir =~ (unprotected|protected|skipped)_ ]]
2022-01-14 21:41:10,754: DEBUG - + ynh_app_setting set pixelfed fpm_config_dir /etc/php/7.4/fpm
2022-01-14 21:41:10,805: DEBUG - + ynh_app_setting_set --app=pixelfed --key=fpm_service --value=php7.4-fpm
2022-01-14 21:41:10,805: DEBUG - + local _globalapp=pixelfed
2022-01-14 21:41:10,868: DEBUG - + app=pixelfed
2022-01-14 21:41:10,868: DEBUG - + [[ fpm_service =~ (unprotected|protected|skipped)_ ]]
2022-01-14 21:41:10,868: DEBUG - + ynh_app_setting set pixelfed fpm_service php7.4-fpm
2022-01-14 21:41:10,918: DEBUG - + ynh_app_setting_set --app=pixelfed --key=fpm_dedicated_service --value=0
2022-01-14 21:41:10,918: DEBUG - + local _globalapp=pixelfed
2022-01-14 21:41:10,982: DEBUG - + app=pixelfed
2022-01-14 21:41:10,983: DEBUG - + [[ fpm_dedicated_service =~ (unprotected|protected|skipped)_ ]]
2022-01-14 21:41:10,983: DEBUG - + ynh_app_setting set pixelfed fpm_dedicated_service 0
2022-01-14 21:41:11,030: DEBUG - + ynh_app_setting_set --app=pixelfed --key=phpversion --value=7.4
2022-01-14 21:41:11,031: DEBUG - + local _globalapp=pixelfed
2022-01-14 21:41:11,107: DEBUG - + app=pixelfed
2022-01-14 21:41:11,107: DEBUG - + [[ phpversion =~ (unprotected|protected|skipped)_ ]]
2022-01-14 21:41:11,107: DEBUG - + ynh_app_setting set pixelfed phpversion 7.4
2022-01-14 21:41:11,156: DEBUG - + ynh_app_setting_set --app=pixelfed --key=fpm_footprint --value=low
2022-01-14 21:41:11,156: DEBUG - + local _globalapp=pixelfed
2022-01-14 21:41:11,221: DEBUG - + app=pixelfed
2022-01-14 21:41:11,222: DEBUG - + [[ fpm_footprint =~ (unprotected|protected|skipped)_ ]]
2022-01-14 21:41:11,222: DEBUG - + ynh_app_setting set pixelfed fpm_footprint low
2022-01-14 21:41:11,270: DEBUG - + ynh_app_setting_set --app=pixelfed --key=fpm_usage --value=low
2022-01-14 21:41:11,271: DEBUG - + local _globalapp=pixelfed
2022-01-14 21:41:11,335: DEBUG - + app=pixelfed
2022-01-14 21:41:11,335: DEBUG - + [[ fpm_usage =~ (unprotected|protected|skipped)_ ]]
2022-01-14 21:41:11,335: DEBUG - + ynh_app_setting set pixelfed fpm_usage low
2022-01-14 21:41:11,388: DEBUG - + ynh_get_scalable_phpfpm --usage=low --footprint=low
2022-01-14 21:41:11,435: DEBUG - + footprint=low
2022-01-14 21:41:11,436: DEBUG - + usage=low
2022-01-14 21:41:11,436: DEBUG - + print=0
2022-01-14 21:41:11,436: DEBUG - + '[' low = low ']'
2022-01-14 21:41:11,436: DEBUG - + footprint=20
2022-01-14 21:41:11,436: DEBUG - + '[' 20 -le 20 ']'
2022-01-14 21:41:11,436: DEBUG - + min_spare_servers_factor=8
2022-01-14 21:41:11,436: DEBUG - + '[' low = low ']'
2022-01-14 21:41:11,436: DEBUG - + php_pm=ondemand
2022-01-14 21:41:11,437: DEBUG - ++ ynh_get_ram --total --ignore_swap
2022-01-14 21:41:11,488: DEBUG - ++ ignore_swap=1
2022-01-14 21:41:11,488: DEBUG - ++ only_swap=0
2022-01-14 21:41:11,488: DEBUG - ++ free=0
2022-01-14 21:41:11,488: DEBUG - ++ total=1
2022-01-14 21:41:11,489: DEBUG - +++ awk '{print $1}'
2022-01-14 21:41:11,492: DEBUG - +++ grep 'total memory'
2022-01-14 21:41:11,494: DEBUG - +++ vmstat --stats --unit M
2022-01-14 21:41:11,500: DEBUG - ++ local total_ram=1947
2022-01-14 21:41:11,502: DEBUG - +++ awk '{print $1}'
2022-01-14 21:41:11,505: DEBUG - +++ grep 'total swap'
2022-01-14 21:41:11,506: DEBUG - +++ vmstat --stats --unit M
2022-01-14 21:41:11,511: DEBUG - ++ local total_swap=3894
2022-01-14 21:41:11,511: DEBUG - ++ local total_ram_swap=5841
2022-01-14 21:41:11,511: DEBUG - ++ local ram=5841
2022-01-14 21:41:11,512: DEBUG - ++ ram=1947
2022-01-14 21:41:11,512: DEBUG - ++ echo 1947
2022-01-14 21:41:11,512: DEBUG - + local max_ram=1947
2022-01-14 21:41:11,512: DEBUG - + php_max_children=48
2022-01-14 21:41:11,512: DEBUG - + '[' ondemand = static ']'
2022-01-14 21:41:11,513: DEBUG - ++ at_least_one 48
2022-01-14 21:41:11,513: DEBUG - ++ '[' 48 -le 0 ']'
2022-01-14 21:41:11,514: DEBUG - ++ echo 48
2022-01-14 21:41:11,515: DEBUG - + php_max_children=48
2022-01-14 21:41:11,515: DEBUG - ++ nproc
2022-01-14 21:41:11,518: DEBUG - + local core_number=1
2022-01-14 21:41:11,518: DEBUG - + local max_proc=4
2022-01-14 21:41:11,518: DEBUG - + '[' 48 -gt 4 ']'
2022-01-14 21:41:11,518: DEBUG - + php_max_children=4
2022-01-14 21:41:11,519: DEBUG - ++ ynh_app_setting_get --app=pixelfed --key=php_forced_max_children
2022-01-14 21:41:11,519: DEBUG - ++ local _globalapp=pixelfed
2022-01-14 21:41:11,554: DEBUG - ++ app=pixelfed
2022-01-14 21:41:11,554: DEBUG - ++ [[ php_forced_max_children =~ (unprotected|protected|skipped)_ ]]
2022-01-14 21:41:11,554: DEBUG - ++ ynh_app_setting get pixelfed php_forced_max_children
2022-01-14 21:41:11,600: DEBUG - + local php_forced_max_children=
2022-01-14 21:41:11,600: DEBUG - + '[' -n '' ']'
2022-01-14 21:41:11,600: DEBUG - + '[' ondemand = dynamic ']'
2022-01-14 21:41:11,600: DEBUG - + php_min_spare_servers=0
2022-01-14 21:41:11,601: DEBUG - + php_max_spare_servers=0
2022-01-14 21:41:11,601: DEBUG - + php_start_servers=0
2022-01-14 21:41:11,601: DEBUG - + local phpfpm_path=/var/cache/yunohost/app_tmp_work_dirs/app_uzn7fp17/conf/php-fpm.conf
2022-01-14 21:41:11,601: DEBUG - [__APP__]
2022-01-14 21:41:11,601: DEBUG - 
2022-01-14 21:41:11,601: DEBUG - user = __APP__
2022-01-14 21:41:11,601: DEBUG - group = __APP__
2022-01-14 21:41:11,601: DEBUG - 
2022-01-14 21:41:11,601: DEBUG - chdir = __FINALPATH__
2022-01-14 21:41:11,601: DEBUG - 
2022-01-14 21:41:11,601: DEBUG - listen = /var/run/php/php__PHPVERSION__-fpm-__APP__.sock
2022-01-14 21:41:11,601: DEBUG - listen.owner = www-data
2022-01-14 21:41:11,601: DEBUG - listen.group = www-data
2022-01-14 21:41:11,601: DEBUG - 
2022-01-14 21:41:11,601: DEBUG - pm = __PHP_PM__
2022-01-14 21:41:11,601: DEBUG - pm.max_children = __PHP_MAX_CHILDREN__
2022-01-14 21:41:11,602: DEBUG - pm.max_requests = 500
2022-01-14 21:41:11,602: DEBUG - request_terminate_timeout = 1d
2022-01-14 21:41:11,602: DEBUG - '
2022-01-14 21:41:11,602: DEBUG - + '[' ondemand = dynamic ']'
2022-01-14 21:41:11,602: DEBUG - + '[' ondemand = ondemand ']'
2022-01-14 21:41:11,602: DEBUG - pm.process_idle_timeout = 10s
2022-01-14 21:41:11,602: DEBUG - '
2022-01-14 21:41:11,602: DEBUG - + '[' -e /var/cache/yunohost/app_tmp_work_dirs/app_uzn7fp17/conf/extra_php-fpm.conf ']'
2022-01-14 21:41:11,602: DEBUG - + local finalphpconf=/etc/php/7.4/fpm/pool.d/pixelfed.conf
2022-01-14 21:41:11,602: DEBUG - + ynh_add_config --template=/var/cache/yunohost/app_tmp_work_dirs/app_uzn7fp17/conf/php-fpm.conf --destination=/etc/php/7.4/fpm/pool.d/pixelfed.conf
2022-01-14 21:41:11,632: DEBUG - + '[' -f /var/cache/yunohost/app_tmp_work_dirs/app_uzn7fp17/conf//var/cache/yunohost/app_tmp_work_dirs/app_uzn7fp17/conf/php-fpm.conf ']'
2022-01-14 21:41:11,632: DEBUG - + '[' -f /var/cache/yunohost/app_tmp_work_dirs/app_uzn7fp17/conf/php-fpm.conf ']'
2022-01-14 21:41:11,632: DEBUG - + template_path=/var/cache/yunohost/app_tmp_work_dirs/app_uzn7fp17/conf/php-fpm.conf
2022-01-14 21:41:11,632: DEBUG - + ynh_backup_if_checksum_is_different --file=/etc/php/7.4/fpm/pool.d/pixelfed.conf
2022-01-14 21:41:11,642: DEBUG - + local checksum_setting_name=checksum__etc_php_7.4_fpm_pool.d_pixelfed.conf
2022-01-14 21:41:11,643: DEBUG - ++ ynh_app_setting_get --app=pixelfed --key=checksum__etc_php_7.4_fpm_pool.d_pixelfed.conf
2022-01-14 21:41:11,643: DEBUG - ++ local _globalapp=pixelfed
2022-01-14 21:41:11,674: DEBUG - ++ app=pixelfed
2022-01-14 21:41:11,674: DEBUG - ++ [[ checksum__etc_php_7.4_fpm_pool.d_pixelfed.conf =~ (unprotected|protected|skipped)_ ]]
2022-01-14 21:41:11,674: DEBUG - ++ ynh_app_setting get pixelfed checksum__etc_php_7.4_fpm_pool.d_pixelfed.conf
2022-01-14 21:41:11,721: DEBUG - + local checksum_value=
2022-01-14 21:41:11,721: DEBUG - + backup_file_checksum=
2022-01-14 21:41:11,721: DEBUG - + '[' -n '' ']'
2022-01-14 21:41:11,721: DEBUG - + touch /etc/php/7.4/fpm/pool.d/pixelfed.conf
2022-01-14 21:41:11,722: DEBUG - + chown root:root /etc/php/7.4/fpm/pool.d/pixelfed.conf
2022-01-14 21:41:11,724: DEBUG - + chmod 640 /etc/php/7.4/fpm/pool.d/pixelfed.conf
2022-01-14 21:41:11,725: DEBUG - + cp -f /var/cache/yunohost/app_tmp_work_dirs/app_uzn7fp17/conf/php-fpm.conf /etc/php/7.4/fpm/pool.d/pixelfed.conf
2022-01-14 21:41:11,726: DEBUG - + _ynh_apply_default_permissions /etc/php/7.4/fpm/pool.d/pixelfed.conf
2022-01-14 21:41:11,726: DEBUG - + local target=/etc/php/7.4/fpm/pool.d/pixelfed.conf
2022-01-14 21:41:11,727: DEBUG - ++ tr -d '>= '
2022-01-14 21:41:11,729: DEBUG - ++ jq -r .requirements.yunohost /var/cache/yunohost/app_tmp_work_dirs/app_uzn7fp17/manifest.json
2022-01-14 21:41:11,733: DEBUG - + local ynh_requirement=4.3.0
2022-01-14 21:41:11,733: DEBUG - + '[' -z 4.3.0 ']'
2022-01-14 21:41:11,733: DEBUG - + '[' 4.3.0 == null ']'
2022-01-14 21:41:11,733: DEBUG - + dpkg --compare-versions 4.3.0 ge 4.2
2022-01-14 21:41:11,736: DEBUG - + chmod o-rwx /etc/php/7.4/fpm/pool.d/pixelfed.conf
2022-01-14 21:41:11,737: DEBUG - + chmod g-w /etc/php/7.4/fpm/pool.d/pixelfed.conf
2022-01-14 21:41:11,738: DEBUG - + chown -R root:root /etc/php/7.4/fpm/pool.d/pixelfed.conf
2022-01-14 21:41:11,740: DEBUG - + ynh_system_user_exists pixelfed
2022-01-14 21:41:11,750: DEBUG - + getent passwd pixelfed
2022-01-14 21:41:11,752: DEBUG - + chown pixelfed:pixelfed /etc/php/7.4/fpm/pool.d/pixelfed.conf
2022-01-14 21:41:11,753: DEBUG - + ynh_replace_vars --file=/etc/php/7.4/fpm/pool.d/pixelfed.conf
2022-01-14 21:41:11,764: DEBUG - + test -n /
2022-01-14 21:41:11,764: DEBUG - + local path_url_slash_less=
2022-01-14 21:41:11,764: DEBUG - + ynh_replace_string --match_string=__PATH__/ --replace_string=/ --target_file=/etc/php/7.4/fpm/pool.d/pixelfed.conf
2022-01-14 21:41:11,826: DEBUG - + sed --in-place s@__PATH__/@/@g /etc/php/7.4/fpm/pool.d/pixelfed.conf
2022-01-14 21:41:11,828: DEBUG - + ynh_replace_string --match_string=__PATH__ --replace_string=/ --target_file=/etc/php/7.4/fpm/pool.d/pixelfed.conf
2022-01-14 21:41:11,895: DEBUG - + sed --in-place s@__PATH__@/@g /etc/php/7.4/fpm/pool.d/pixelfed.conf
2022-01-14 21:41:11,897: DEBUG - + test -n pixelfed
2022-01-14 21:41:11,897: DEBUG - + ynh_replace_string --match_string=__NAME__ --replace_string=pixelfed --target_file=/etc/php/7.4/fpm/pool.d/pixelfed.conf
2022-01-14 21:41:11,960: DEBUG - + sed --in-place s@__NAME__@pixelfed@g /etc/php/7.4/fpm/pool.d/pixelfed.conf
2022-01-14 21:41:11,961: DEBUG - + ynh_replace_string --match_string=__NAMETOCHANGE__ --replace_string=pixelfed --target_file=/etc/php/7.4/fpm/pool.d/pixelfed.conf
2022-01-14 21:41:12,024: DEBUG - + sed --in-place s@__NAMETOCHANGE__@pixelfed@g /etc/php/7.4/fpm/pool.d/pixelfed.conf
2022-01-14 21:41:12,026: DEBUG - + ynh_replace_string --match_string=__USER__ --replace_string=pixelfed --target_file=/etc/php/7.4/fpm/pool.d/pixelfed.conf
2022-01-14 21:41:12,089: DEBUG - + sed --in-place s@__USER__@pixelfed@g /etc/php/7.4/fpm/pool.d/pixelfed.conf
2022-01-14 21:41:12,091: DEBUG - + test -n /var/www/pixelfed
2022-01-14 21:41:12,091: DEBUG - + ynh_replace_string --match_string=__FINALPATH__ --replace_string=/var/www/pixelfed --target_file=/etc/php/7.4/fpm/pool.d/pixelfed.conf
2022-01-14 21:41:12,154: DEBUG - + sed --in-place s@__FINALPATH__@/var/www/pixelfed@g /etc/php/7.4/fpm/pool.d/pixelfed.conf
2022-01-14 21:41:12,157: DEBUG - + test -n 7.4
2022-01-14 21:41:12,157: DEBUG - + ynh_replace_string --match_string=__PHPVERSION__ --replace_string=7.4 --target_file=/etc/php/7.4/fpm/pool.d/pixelfed.conf
2022-01-14 21:41:12,221: DEBUG - + sed --in-place s@__PHPVERSION__@7.4@g /etc/php/7.4/fpm/pool.d/pixelfed.conf
2022-01-14 21:41:12,223: DEBUG - + test -n ''
2022-01-14 21:41:12,223: DEBUG - + uniques_vars=($(grep -oP '__[A-Z0-9]+?[A-Z0-9_]*?[A-Z0-9]*?__' $file | sort --unique | sed "s@__\([^.]*\)__@\L\1@g"))
2022-01-14 21:41:12,224: DEBUG - ++ sed 's@__\([^.]*\)__@\L\1@g'
2022-01-14 21:41:12,225: DEBUG - ++ sort --unique
2022-01-14 21:41:12,228: DEBUG - ++ grep -oP '__[A-Z0-9]+?[A-Z0-9_]*?[A-Z0-9]*?__' /etc/php/7.4/fpm/pool.d/pixelfed.conf
2022-01-14 21:41:12,230: DEBUG - + local delimit=@
2022-01-14 21:41:12,230: DEBUG - + for one_var in "${uniques_vars[@]}"
2022-01-14 21:41:12,230: DEBUG - + [[ -v app ]]
2022-01-14 21:41:12,230: DEBUG - + match_string=__APP__
2022-01-14 21:41:12,231: DEBUG - + match_string=__APP__
2022-01-14 21:41:12,231: DEBUG - + replace_string=pixelfed
2022-01-14 21:41:12,231: DEBUG - + replace_string=pixelfed
2022-01-14 21:41:12,231: DEBUG - + replace_string=pixelfed
2022-01-14 21:41:12,231: DEBUG - + sed --in-place s@__APP__@pixelfed@g /etc/php/7.4/fpm/pool.d/pixelfed.conf
2022-01-14 21:41:12,233: DEBUG - + for one_var in "${uniques_vars[@]}"
2022-01-14 21:41:12,233: DEBUG - + [[ -v php_max_children ]]
2022-01-14 21:41:12,233: DEBUG - + match_string=__PHP_MAX_CHILDREN__
2022-01-14 21:41:12,233: DEBUG - + match_string=__PHP_MAX_CHILDREN__
2022-01-14 21:41:12,233: DEBUG - + replace_string=4
2022-01-14 21:41:12,233: DEBUG - + replace_string=4
2022-01-14 21:41:12,233: DEBUG - + replace_string=4
2022-01-14 21:41:12,233: DEBUG - + sed --in-place s@__PHP_MAX_CHILDREN__@4@g /etc/php/7.4/fpm/pool.d/pixelfed.conf
2022-01-14 21:41:12,235: DEBUG - + for one_var in "${uniques_vars[@]}"
2022-01-14 21:41:12,235: DEBUG - + [[ -v php_pm ]]
2022-01-14 21:41:12,235: DEBUG - + match_string=__PHP_PM__
2022-01-14 21:41:12,235: DEBUG - + match_string=__PHP_PM__
2022-01-14 21:41:12,235: DEBUG - + replace_string=ondemand
2022-01-14 21:41:12,236: DEBUG - + replace_string=ondemand
2022-01-14 21:41:12,236: DEBUG - + replace_string=ondemand
2022-01-14 21:41:12,236: DEBUG - + sed --in-place s@__PHP_PM__@ondemand@g /etc/php/7.4/fpm/pool.d/pixelfed.conf
2022-01-14 21:41:12,238: DEBUG - + ynh_store_file_checksum --file=/etc/php/7.4/fpm/pool.d/pixelfed.conf
2022-01-14 21:41:12,238: DEBUG - + update_only=0
2022-01-14 21:41:12,256: DEBUG - + local checksum_setting_name=checksum__etc_php_7.4_fpm_pool.d_pixelfed.conf
2022-01-14 21:41:12,257: DEBUG - ++ cut '--delimiter= ' --fields=1
2022-01-14 21:41:12,259: DEBUG - ++ md5sum /etc/php/7.4/fpm/pool.d/pixelfed.conf
2022-01-14 21:41:12,261: DEBUG - + ynh_app_setting_set --app=pixelfed --key=checksum__etc_php_7.4_fpm_pool.d_pixelfed.conf --value=63310e9e798508ba2bec48d0de8c616c
2022-01-14 21:41:12,261: DEBUG - + local _globalapp=pixelfed
2022-01-14 21:41:12,323: DEBUG - + app=pixelfed
2022-01-14 21:41:12,324: DEBUG - + [[ checksum__etc_php_7.4_fpm_pool.d_pixelfed.conf =~ (unprotected|protected|skipped)_ ]]
2022-01-14 21:41:12,324: DEBUG - + ynh_app_setting set pixelfed checksum__etc_php_7.4_fpm_pool.d_pixelfed.conf 63310e9e798508ba2bec48d0de8c616c
2022-01-14 21:41:12,375: DEBUG - + '[' -n '' ']'
2022-01-14 21:41:12,376: DEBUG - + unset backup_file_checksum
2022-01-14 21:41:12,376: DEBUG - + '[' -e /var/cache/yunohost/app_tmp_work_dirs/app_uzn7fp17/conf/php-fpm.ini ']'
2022-01-14 21:41:12,376: DEBUG - + php-fpm7.4 --test
2022-01-14 21:41:12,377: DEBUG - + php-fpm7.4 --test
2022-01-14 21:41:12,379: WARNING - /usr/share/yunohost/helpers.d/php: line 237: php-fpm7.4: command not found
2022-01-14 21:41:12,380: DEBUG - + true
2022-01-14 21:41:12,380: DEBUG - + ynh_secure_remove --file=/etc/php/7.4/fpm/pool.d/pixelfed.conf
2022-01-14 21:41:12,402: DEBUG - + ynh_die '--message=The new configuration broke php-fpm?'
yalh76 commented 2 years ago

!testme

yunohost-bot commented 2 years ago

Meow :cat2: Test Badge

lapineige commented 2 years ago

Guess what ? It worked !