Commit graph

121 commits

Author SHA1 Message Date
Alexandre Aubin
1e1409c7d7 helpers2.1: logging tweak in ynh_die 2024-06-30 19:43:18 +02:00
Alexandre Aubin
fcaa366e91 helpers2.1: zzzz 2024-06-30 19:28:18 +02:00
Alexandre Aubin
f2b5f0f22c helpers2.1: when using ynh_die, also return the error via YNH_STDRETURN such that it can be obtained from the python and displayed in the main error message, to increase the chance that people may read it and have something more useful than "An error happened in the script" 2024-06-30 18:53:54 +02:00
Alexandre Aubin
a48bfa67de helpers2.1: change source patches location + raise an error instead of a warning when a patch fails to apply on CI
Co-authored-by: Félix Piédallu <felix@piedallu.me>
2024-06-30 17:46:52 +02:00
Alexandre Aubin
3f973669fc helpers2.1: fix automigration of phpversion to php_version 2024-06-30 01:37:56 +02:00
Alexandre Aubin
a18d5f26f2 helpers2.1: zgrblg 2024-06-30 00:21:40 +02:00
Alexandre Aubin
eee84c5f66 helpers2.1: also run _ynh_apply_default_permissions in ynh_restore to be consistent (also because the user uid on the new system may be different than in the archive etc) 2024-06-29 21:32:53 +02:00
Alexandre Aubin
d47c87e57d helpers2.1: wrmbgl 2024-06-29 20:16:52 +02:00
Alexandre Aubin
3e1c9ebaf7 Fix getopts error handling ... 2024-06-29 19:21:08 +02:00
Alexandre Aubin
44bbc34967
Merge pull request #1716 from Salamandar/ynh_secure_remove
Fix ynh_safe_rm: check if target is not a broken symlink before erorring out.
2024-06-29 17:23:50 +02:00
Alexandre Aubin
7b2959a3eb helpers2.1: forgot to rename the apt call in mongodb helpers 2024-06-29 17:18:20 +02:00
Alexandre Aubin
1dfc47d1d7 helpers2.1: in logrotate, make sure to also chown $app the log dir 2024-06-28 20:21:56 +02:00
Alexandre Aubin
ef68485c5f Use the group defined in the manifest by default 2024-06-28 19:24:07 +02:00
Alexandre Aubin
656ff823a9 Also handle files in /etc/$app 2024-06-28 18:56:18 +02:00
Alexandre Aubin
ae3018cdd0 Infer the necessity to use www-data as group from the presence of alias or root in nginx.conf 2024-06-28 18:39:12 +02:00
Alexandre Aubin
8b8768fd77 Only set www-data as group for webapps 2024-06-28 18:09:49 +02:00
Alexandre Aubin
75d7042974
Update helpers/helpers.v2.1.d/utils: use regex matching to check if path is child from a parent path 2024-06-28 16:56:28 +02:00
Alexandre Aubin
3b26ccc2a5 Properly handle case where $parent is empty to simplify condition 2024-06-28 16:55:39 +02:00
Alexandre Aubin
3608c5678c Proper 'if' cases to distinguish between $install_dir vs regular files in $install_dir and $data_dir 2024-06-28 16:45:43 +02:00
Alexandre Aubin
d9d404a5b2 ynh_setup_source: apply default perms *after* extracting files to hopefully remove the need to manually chown/chmod 2024-06-28 16:06:40 +02:00
8846381d47 Rework _ynh_apply_default_permissions, only check if target is a child of install_dir. 2024-06-28 16:03:17 +02:00
650481a58a ynh_safe_rm: Check if target is a symlink
When calling ynh_safe_rm to a broken symlink, the function was erroring out.
(test -e was following the symlink and returning false)
We need to also check if it is a symlink before exiting.
2024-06-28 15:01:59 +02:00
Alexandre Aubin
997388dc79 helpers2.1: fix __PATH__/ handling 2024-06-25 14:16:04 +02:00
Alexandre Aubin
e3bebeac98 helpers2.1: typo in getopts 2024-06-24 22:13:16 +02:00
Alexandre Aubin
2af4c157d9 helpers/mongo: less noisy output when checking the avx flag is here in /proc/cpuinfo 2024-06-24 21:35:35 +02:00
Alexandre Aubin
0aad13cd2f helpers2.1: oopsies in apt helper 2024-06-24 19:11:28 +02:00
Alexandre Aubin
2895d4d99b helpers: Misc cleaning / reorganizing to prepare new doc 2024-06-24 17:42:37 +02:00
Alexandre Aubin
1fb80e5d24 helpers2.1: drop ynh_apps helper because only a single app is using it ... 2024-06-24 06:09:58 +02:00
Alexandre Aubin
30467f8bc3 helpers2.1: fix bad syntax in ynh_app_upstream_version 2024-06-23 20:04:17 +02:00
Alexandre Aubin
d8c3ff4c8a helpers2.1: forgot to propagate the 'goenv latest' fix from helpers v1 2024-06-23 16:35:58 +02:00
Alexandre Aubin
2b1f74268f helpers2.1: var rename / cosmetic etc for nodejs/ruby/go version and install directories 2024-06-23 15:21:25 +02:00
Alexandre Aubin
5f6df6a859 helpers2.1: for some reason sudo -E doesn't preserve PATH even though it's exported, so we gotta explicitly use --preserve-env=PATH 2024-06-23 14:49:11 +02:00
Alexandre Aubin
b3409729a6 helpers2.1: when using ynh_systemctl to reload/start/restart a service with a wait_until and it timesout, handle it as a filure rather than keep going 2024-06-23 14:36:55 +02:00
Alexandre Aubin
9298738d06 helpers2.1: display 100 lines instead of 20 in CI context when service fails to start 2024-06-23 14:30:57 +02:00
Alexandre Aubin
262453f132 helpers2.1: change default timeout of ynh_systemctl to 60s instead of 300s 2024-06-23 14:27:37 +02:00
Alexandre Aubin
d4857834f3 helpers2.1: sudo -u$app -> sudo -u $app 2024-06-23 14:13:17 +02:00
Alexandre Aubin
3942ea12ae helpers2.1: fix ynh_config_add_logrotate when no arg is passed 2024-06-23 14:08:31 +02:00
Alexandre Aubin
be3df69326
Merge pull request #1873 from YunoHost/ynh_app_setting_set_default
helpers: add a new ynh_app_setting_set_default to replace the unecessarily complex 'if [ -z ${foo:-} ]' trick
2024-06-23 00:59:26 +02:00
Alexandre Aubin
7caf7e8b3e
Merge pull request #1874 from YunoHost/rework_fpm_settings_madness
helpers2.1: rework the fpm usage/footprint madness
2024-06-23 00:59:00 +02:00
Alexandre Aubin
e558513609 helpers2.1: fix positional arg parsing in ynh_psql_create_user 2024-06-22 22:52:31 +02:00
Alexandre Aubin
3d728d90ce helpers2.1: rework the fpm usage/footprint madness 2024-06-22 01:59:18 +02:00
Alexandre Aubin
1b5074d857 helpers: add a new ynh_app_setting_set_default to replace the unecessarily complex 'if [ ${foo:-} ]' trick 2024-06-21 18:30:05 +02:00
Alexandre Aubin
dd8db1883a helpers2.1: drop unused 'local source' mechanism from ynh_setup_source 2024-06-21 16:26:14 +02:00
Alexandre Aubin
06c8fbc881 logs: misc ad-hoc tweaks to limit the noise in log sharing 2024-06-21 16:26:07 +02:00
Alexandre Aubin
41b958113a helpers2.1: unbound var @_@ 2024-06-20 19:06:14 +02:00
e0a9bafde2 helpers.v2.1: Add ynh_in_ci_tests to check if the scripts are running in CI or not 2024-06-20 16:37:22 +02:00
Alexandre Aubin
eab36d069d helper2.1: refactor composer helper again: workdir is $install_dir unless $composer_workdir is defined. ynh_composer_install only downloads composer. ynh_composer_exec runs composer command as $app unless composer_user=root is defined prior to calling the helper 2024-06-20 16:15:57 +02:00
Alexandre Aubin
b47aedc932 helpers: remove god forsaken clumsy node_update cron job >_> 2024-06-20 14:02:56 +02:00
Alexandre Aubin
f22c6ec3e9 helpers2.1: ynh_systemd_action -> ynh_systemctl 2024-06-20 13:47:05 +02:00
Alexandre Aubin
d9b9aa1884 helpers2.1: use positional args for file checksum helpers 2024-06-20 13:44:09 +02:00