From 75c2cb66eed12ddda2c1182c1797e11e821c8209 Mon Sep 17 00:00:00 2001 From: Zurab Kvachadze Date: Mon, 1 Dec 2025 19:47:25 +0100 Subject: [PATCH] www-servers/nginx: fix fastcgi.conf, nginx-r6.initd regressions from nginx.eclass nginx.eclass prefers fastcgi_params over fastcgi.conf for consistency. For some reason, when I was writing nginx.eclass I missed the fact that fastcgi.conf has one extra `fastcgi_param` vs fastcgi_params. This commit uses fastcgi.conf as new fastcgi_params by renaming the former to the latter. In 8481acdc2c34e960f08cd90ce09068d791e42901[1] ("www-servers/nginx: use default start/stop initd functions"), the custom start() was removed, where the `-c` and `-g` cmdline parameters were hardcoded, which regressed services that were symlinked to /etc/init.d/nginx. This commit fixes both issues at the same time to avoid revbumping ebuilds twice. KEYWORDS were not dropped because this fixes regressions. [1]: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8481acdc2c34e960f08cd90ce09068d791e42901 Closes: https://bugs.gentoo.org/966799 Closes: https://bugs.gentoo.org/966798 Signed-off-by: Zurab Kvachadze Part-of: https://github.com/gentoo/gentoo/pull/44853 Closes: https://github.com/gentoo/gentoo/pull/44853 Signed-off-by: Sam James --- eclass/nginx.eclass | 10 +++++++--- www-servers/nginx/files/nginx-r6.initd | 1 + .../{nginx-1.28.0-r4.ebuild => nginx-1.28.0-r5.ebuild} | 0 .../{nginx-1.29.3-r2.ebuild => nginx-1.29.3-r3.ebuild} | 0 4 files changed, 8 insertions(+), 3 deletions(-) rename www-servers/nginx/{nginx-1.28.0-r4.ebuild => nginx-1.28.0-r5.ebuild} (100%) rename www-servers/nginx/{nginx-1.29.3-r2.ebuild => nginx-1.29.3-r3.ebuild} (100%) diff --git a/eclass/nginx.eclass b/eclass/nginx.eclass index 7185c85095955..1394a5f3da94d 100644 --- a/eclass/nginx.eclass +++ b/eclass/nginx.eclass @@ -795,9 +795,13 @@ nginx_src_install() { # /usr/share/nginx. pushd "${ED}/etc/nginx" >/dev/null || die "pushd failed" # mime-types* are provided by app-misc/mime-types[nginx], .default config - # files are redundant due to CONFIG_PROTECT and fastcgi.conf is a copy of - # fastcgi_params. As for nginx.conf, we ship our own config file. - rm -- *.default mime.types fastcgi.conf nginx.conf || die "rm failed" + # files are redundant due to CONFIG_PROTECT. As for nginx.conf, we ship our + # own config file. + rm -- *.default mime.types nginx.conf || die "rm failed" + # fastcgi.conf is almost identical to fastcgi_params barring the + # SCRIPT_FILENAME param. Rename fastcgi.conf to fastcgi_params to have + # consistent *_params files. See bug 966799. + mv fastcgi.conf fastcgi_params || die "mv failed" popd >/dev/null || die "Returning to the previous directory failed" dodir /usr/share/nginx diff --git a/www-servers/nginx/files/nginx-r6.initd b/www-servers/nginx/files/nginx-r6.initd index 04f92e3b244b3..35c05a9b3bb77 100644 --- a/www-servers/nginx/files/nginx-r6.initd +++ b/www-servers/nginx/files/nginx-r6.initd @@ -17,6 +17,7 @@ pidfile="/run/${RC_SVCNAME}/${RC_SVCNAME}.pid" user=${NGINX_USER:-nginx} group=${NGINX_GROUP:-nginx} retry=${NGINX_TERMTIMEOUT:-"TERM/60/KILL/5"} +command_args="-c \"${NGINX_CONFIGFILE}\" -g 'pid ${pidfile};'" extra_commands="configtest" extra_started_commands="upgrade reload" diff --git a/www-servers/nginx/nginx-1.28.0-r4.ebuild b/www-servers/nginx/nginx-1.28.0-r5.ebuild similarity index 100% rename from www-servers/nginx/nginx-1.28.0-r4.ebuild rename to www-servers/nginx/nginx-1.28.0-r5.ebuild diff --git a/www-servers/nginx/nginx-1.29.3-r2.ebuild b/www-servers/nginx/nginx-1.29.3-r3.ebuild similarity index 100% rename from www-servers/nginx/nginx-1.29.3-r2.ebuild rename to www-servers/nginx/nginx-1.29.3-r3.ebuild