[Pkg-nginx-maintainers] Bug#1082373: nginx: nginx missing pre-depends on nginx-common

Thomas Ward teward at thomas-ward.net
Fri Sep 20 19:27:30 BST 2024


For the purposes of argument, the reason nginx I don't think pre-depends on nginx-common is because nginx itself can be pulled in by other packages that then want to maintain their own configuration and roll their own NGINX configuration files.

While I definitely agree it should pre-depend on nginx-common or such, and this was the way in the past, I'm not sure if this is something that we (maintainers) need to fix, if the intent was to let people Depends: nginx and then roll their own config as part of a package install.

I don't disagree this is a large issue, so on Salsa I'll do a pull request for this and then let us discuss on that level before inclusion.  This may end up wontfix if the intent is for people to install nginx without configuration and then roll their own or such.


Thomas



________________________________
From: Michael Prokop <mika at debian.org>
Sent: Friday, September 20, 2024 8:50 AM
To: Debian Bug Tracking System <submit at bugs.debian.org>
Subject: Bug#1082373: nginx: nginx missing pre-depends on nginx-common

Package: nginx
Version: 1.26.0-2
Severity: important

Hi,

nginx fails to install on Debian testing + unstable:

| [...]
| Get:1 http://deb.debian.org/debian unstable/main amd64 nginx-common all 1.26.0-2 [108 kB]
| Get:2 http://deb.debian.org/debian unstable/main amd64 nginx amd64 1.26.0-2 [608 kB]
| Fetched 716 kB in 1s (591 kB/s)
| debconf: delaying package configuration, since apt-utils is not installed
| Selecting previously unselected package nginx-common.
| (Reading database ... 9992 files and directories currently installed.)
| Preparing to unpack .../nginx-common_1.26.0-2_all.deb ...
| Unpacking nginx-common (1.26.0-2) ...
| Selecting previously unselected package nginx.
| Preparing to unpack .../nginx_1.26.0-2_amd64.deb ...
| Unpacking nginx (1.26.0-2) ...
| Setting up nginx (1.26.0-2) ...
| Job for nginx.service failed because the control process exited with error code.
| See "systemctl status nginx.service" and "journalctl -xeu nginx.service" for details.
| invoke-rc.d: initscript nginx, action "start" failed.
| × nginx.service - A high performance web server and a reverse proxy server
|      Loaded: loaded (/usr/lib/systemd/system/nginx.service; 5:185mdisabled; preset: enabled)
|      Active: failed (Result: exit-code) since Fri 2024-09-20 12:42:11 UTC; 24ms ago
|  Invocation: dfd641c3677f4bbaa9c8b75e74c6a748
|        Docs: man:nginx(8)
|     Process: 1979 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=1/FAILURE)
|         CPU: 9ms
|
| Sep 20 12:42:11 f468089c00fc systemd[1]: Starting nginx.service - A high performance web server and a reverse proxy server...
| Sep 20 12:42:11 f468089c00fc nginx[1979]: 2024/09/20 12:42:11 [emerg] 1979#1979: open() "/etc/nginx/nginx.conf" failed (2: No such file or directory)
| Sep 20 12:42:11 f468089c00fc nginx[1979]: nginx: configuration file /etc/nginx/nginx.conf test failed
| Sep 20 12:42:11 f468089c00fc systemd[1]: nginx.service: Control process exited, code=exited, status=1/FAILURE
| Sep 20 12:42:11 f468089c00fc systemd[1]: 5:185m5:185mnginx.service: Failed with result 'exit-code'.
| Sep 20 12:42:11 f468089c00fc systemd[1]: Failed to start nginx.service - A high performance web server and a reverse proxy server.
| dpkg: error processing package nginx (--configure):
|  installed nginx package post-installation script subprocess returned error exit status 1
| dpkg: dependency problems prevent configuration of nginx-common:
|  nginx-common depends on nginx (>= 1.26.0-2); however:
|   Package nginx is not configured yet.
|  nginx-common depends on nginx (<< 1.26.0-2.1~); however:
|   Package nginx is not configured yet.
|
| dpkg: error processing package nginx-common (--configure):
|  dependency problems - leaving unconfigured
| Errors were encountered while processing:
|  nginx
|  nginx-common
| E: Sub-process /usr/bin/dpkg returned an error code (1)

The configuration file `/etc/nginx/nginx.conf` is shipped only by
the nginx-common package, though nginx doesn't pre-depend on it and
therefore might get installed before nginx-common is present.

PS: Probably should even be raised to RC bug?

regards
-mika-
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-nginx-maintainers/attachments/20240920/b08ff4e1/attachment-0002.htm>


More information about the Pkg-nginx-maintainers mailing list