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
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
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
2895d4d99b
helpers: Misc cleaning / reorganizing to prepare new doc
2024-06-24 17:42:37 +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
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
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
d9b9aa1884
helpers2.1: use positional args for file checksum helpers
2024-06-20 13:44:09 +02:00
Alexandre Aubin
6b6580a919
helpers2.1: further simplify logging helpers by removing the --message (ynh_script_progression too, no more args except the message)
2024-06-19 23:40:53 +02:00
Alexandre Aubin
218bf107fb
helpers2.1: rename everything again, i.e. ynh_{nodejs|ruby|composer|...}_install/remove (to have a proper ynh_{tech}_ prefix like we have for mysql/psql helpers) + same idea for ynh_config_add_{nginx|phpfpm|systemd|...} instead of ynh_add_foo_config
2024-06-19 17:06:22 +02:00
Alexandre Aubin
5a6a8e6c73
helpers2.1: fix unecessary change in ynh_read_manifest, key shouldnt need to be prefixed with .
2024-06-16 14:12:11 +02:00
Alexandre Aubin
50a4d08add
helpers2.1: fixes after tests on the battlefield
2024-06-13 01:00:52 +02:00
Alexandre Aubin
66f667e48a
helpers2.1: in ynh_setup_source, remove the underused sources/extra_files/sourceid/ mechanism (basically the only apps with these files manually cp stuff) + move the sources/patches/ mechanism to just patches/
2024-06-11 22:55:30 +02:00
Alexandre Aubin
47b2a5695f
helpers2.1: replace ynh_check_app_version_changed with a much simpler ynh_app_upstream_version_changed that can directly be used with 'if ynh_app_upstream_version_changed' instead of the current mess
2024-06-11 19:27:33 +02:00
Alexandre Aubin
480366d5a1
helpers2.1: in fact, let's use positional args for ynh_safe_rm because having --target everywhere is boring as hell
2024-06-11 02:31:21 +02:00
Alexandre Aubin
d1e1fd5e35
helpers2.1: rename ynh_app_upgrading_from_version_prior_to X -> _before X
2024-06-10 18:52:29 +02:00
Alexandre Aubin
0ceb77ec34
helpers2.1: ynh_setup_source: --full_replace now to be a boolean, no need to write --full_replace=1
2024-06-10 18:39:06 +02:00
Alexandre Aubin
cbc68afea4
helpers2.1: remove old references to packaging v1 $final_path
2024-06-10 15:03:16 +02:00
Alexandre Aubin
ef7da9e70f
Remove legacy references to path_url (instead of path) from packaging v1 era
2024-06-10 14:51:40 +02:00
Alexandre Aubin
727b0e093a
helpers 2.1: rename ynh_secure_remove --file to ynh_safe_rm --target
2024-06-08 16:56:23 +02:00
Alexandre Aubin
80f07a9974
helpers 2.1: ynh_if_upgrading_from_... -> ynh_app_upgrading_from_...
2024-05-28 00:09:00 +02:00
Alexandre Aubin
346f42643b
helpers 2.1: move ynh_add_config, ynh_replace_vars, ynh_read_var_in_file, ynh_write_var_in_file and ynh_render_template to a separate 'templating' file
2024-05-27 23:48:22 +02:00
Alexandre Aubin
7c1b07ee0f
helpers 2.1: Simplify ynh_app_upstream_version and ynh_read_manifest
2024-05-27 23:45:03 +02:00
Alexandre Aubin
84a7b23e8a
helpers 2.1: replace ynh_compare_current_package_version with simpler ynh_if_upgrading_from_version_prior_to and ynh_if_upgrading_from_version_prior_or_equal_to
2024-05-27 23:42:53 +02:00
Alexandre Aubin
70f5154130
helpers 2.1: remove ynh_get_debian_release, apps should just use $YNH_DEBIAN_VERSION
2024-05-27 23:40:44 +02:00
Alexandre Aubin
3a500d8457
helpers 2.1: remove ynh_require_ram and unused --ignore_swap and --only_swap options in ynh_get_ram
2024-05-27 23:38:22 +02:00
Alexandre Aubin
365d0b25af
helpers 2.1: drop ynh_find_port, ynh_port_available, ynh_validate_ip4/6, keep only ynh_validate_ip
2024-05-27 21:07:52 +02:00
Alexandre Aubin
aa6634fd22
helpers 2.1: rework argument parsing comment to improve readability, consistency
2024-05-27 21:07:39 +02:00
Alexandre Aubin
0915a6a70b
helpers 2.1: Drop support for old .src format in ynh_setup_source
2024-05-27 18:48:39 +02:00
Alexandre Aubin
4a74a7c51d
helpers 2.1: remove support for __NAME__ and __NAMETOCHANGE__ replaced by $app in templates
2024-05-27 18:48:36 +02:00
Alexandre Aubin
b914ad9093
helpers 2.1: drop support for 'legacy args' (positionals) in helpers
2024-05-27 18:48:21 +02:00
Alexandre Aubin
084ecd6578
helpers 2.1: backport most of the bookworm changes
2024-05-27 18:48:16 +02:00
Alexandre Aubin
204800e878
helpers: copy v1 helpers to new v2.1
2024-05-27 18:48:07 +02:00