diff options
| author | Zurab Kvachadze <zurabid2016@gmail.com> | 2025-09-17 12:42:51 +0200 |
|---|---|---|
| committer | Sam James <sam@gentoo.org> | 2025-10-03 05:51:33 +0100 |
| commit | 90988a3d0b1b7f3a12f0df6437cfcbae4e78b83d (patch) | |
| tree | 74fb0b7c37ed147c81f3b36dc2bb9ead6af1d3ef /eclass | |
| parent | 922d60f30560d89525a187f61ba10fa37aeaeae4 (diff) | |
| download | gentoo-90988a3d0b1b7f3a12f0df6437cfcbae4e78b83d.tar.gz gentoo-90988a3d0b1b7f3a12f0df6437cfcbae4e78b83d.tar.bz2 gentoo-90988a3d0b1b7f3a12f0df6437cfcbae4e78b83d.zip | |
eclass/nginx.eclass: change /var/tmp -> /var/cache + use new tmpfiles
This commit changes of the default location of NGINX temporary files
from /var/tmp/nginx (world-writable) to /var/cache/nginx
(root-writable).
Additionally, this revbumps all www-servers/nginx
consumers of nginx.eclass to use the new nginx-r1.tmpfiles, where the
path is updated accordingly.
This fixes 962961 by specifying that the cache directory should only be
pruned on boot, i.e. tmpfiles (even with --remove option) will not
delete the temporary files of *running* NGINX.
Closes: https://bugs.gentoo.org/962961
Signed-off-by: Zurab Kvachadze <zurabid2016@gmail.com>
Part-of: https://github.com/gentoo/gentoo/pull/43823
Closes: https://github.com/gentoo/gentoo/pull/43823
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'eclass')
| -rw-r--r-- | eclass/nginx.eclass | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/eclass/nginx.eclass b/eclass/nginx.eclass index b8992d32875a..8d5272f3acdc 100644 --- a/eclass/nginx.eclass +++ b/eclass/nginx.eclass @@ -612,7 +612,7 @@ nginx_src_configure() { conf="${conf%%-temp-path*}" conf="${conf#--http-}" nginx_flags+=( - "--http-${conf}-temp-path=${EPREFIX}/var/tmp/nginx/${conf//-/_}_temp" + "--http-${conf}-temp-path=${EPREFIX}/var/cache/nginx/${conf//-/_}_temp" ) done < <(econf_ngx --help 2>/dev/null | grep -E -- '--http-([A-Za-z]+-?)+-temp-path') unset conf _txt @@ -939,11 +939,7 @@ nginx_pkg_postinst() { local file for file in "${NGINX_MISC_FILES[@]}"; do if [[ ${file} == *.tmpfiles ]]; then - # NGINX wrtites to /var/tmp/nginx as root during startup, therefore - # we abuse tmpfiles_process to pass the '--remove' option. - # This is done in order to clean possibly non-empty /var/tmp/nginx - # directory in world-writable /var/tmp. - tmpfiles_process --remove "${PN}-tmp.conf" + tmpfiles_process "${PN}-tmp.conf" break fi done |
