Bug#1032517: nginx settings deleted on upgrade
On Wed, 08 Mar 2023 13:47:47 +0100 Ralf Jung wrote: > Package: nginx > Version: 1.22.1-7 > Severity: grave > Justification: causes non-serious data loss > > Dear Maintainer, > > last weekend I did an "apt upgrade" of my system as usual, asking apt to > prune configuration files for packages that are being uninstalled. > Now I realize that my nginx stopped working, and it turns out its > configuration files are just completely gone. > Look like the recent package reorganization went wrong and actually deletes > configuration under certain conditions -- that's pretty bad. > Package updates shouldn't cause a loss of configuration files, even when > pruning packages that are not present any more. > > Kind regards, > Ralf > > -- System Information: > Debian Release: bookworm/sid > APT prefers testing > APT policy: (990, 'testing'), (500, 'testing-debug'), (100, 'unstable') > Architecture: amd64 (x86_64) > Foreign Architectures: i386 > > Kernel: Linux 6.1.0-5-amd64 (SMP w/8 CPU threads; PREEMPT) > Kernel taint flags: TAINT_USER > Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not > set > Shell: /bin/sh linked to /usr/bin/dash > Init: systemd (via /run/systemd/system) > LSM: AppArmor: enabled > > Versions of packages nginx depends on: > ii debconf [debconf-2.0] 1.5.82 > ii iproute2 6.1.0-1 > ii libc6 2.36-8 > ii libcrypt1 1:4.4.33-2 > ii libpcre2-8-0 10.42-1 > ii libssl3 3.0.8-1 > ii zlib1g 1:1.2.13.dfsg-1 > > nginx recommends no packages. > > Versions of packages nginx suggests: > ii fcgiwrap 1.1.0-14 > pn nginx-doc > ii ssl-cert 1.1.2 > > -- Configuration Files: > /etc/nginx/fastcgi.conf [Errno 2] No such file or directory: > '/etc/nginx/fastcgi.conf' > /etc/nginx/fastcgi_params [Errno 2] No such file or directory: > '/etc/nginx/fastcgi_params' > /etc/nginx/koi-utf [Errno 2] No such file or directory: '/etc/nginx/koi-utf' > /etc/nginx/koi-win [Errno 2] No such file or directory: '/etc/nginx/koi-win' > /etc/nginx/mime.types [Errno 2] No such file or directory: > '/etc/nginx/mime.types' > /etc/nginx/nginx.conf [Errno 2] No such file or directory: > '/etc/nginx/nginx.conf' > /etc/nginx/proxy_params [Errno 2] No such file or directory: > '/etc/nginx/proxy_params' > /etc/nginx/scgi_params [Errno 2] No such file or directory: > '/etc/nginx/scgi_params' > /etc/nginx/sites-available/default [Errno 2] No such file or directory: > '/etc/nginx/sites-available/default' > /etc/nginx/snippets/fastcgi-php.conf [Errno 2] No such file or directory: > '/etc/nginx/snippets/fastcgi-php.conf' > /etc/nginx/snippets/snakeoil.conf [Errno 2] No such file or directory: > '/etc/nginx/snippets/snakeoil.conf' > /etc/nginx/uwsgi_params [Errno 2] No such file or directory: > '/etc/nginx/uwsgi_params' > /etc/nginx/win-utf [Errno 2] No such file or directory: '/etc/nginx/win-utf' > Отправлено с iPhone
Bug#1032517: [Pkg-nginx-maintainers] Bug#1032517: Bug#1032517:
I would suggest that we move the configuration files out of `nginx` main and keep it as a separate binary package, whether we call it `nginx-common` or `nginx-config` or whatever. In either case, there are benefits to having the configuration file *separate* from the binaries (see Apache where apache2-bin containing the binaries and apache2-common which has the config defaults as an example) and I would NOT merge both the NGINX executable provider and the config provider binaries together at the moment. Thomas On 3/13/23 10:51, Jan Mojzis wrote: Unless we find a better solution, then we will need to rollback the configuration back to nginx-common package. ___ Pkg-nginx-maintainers mailing list pkg-nginx-maintain...@alioth-lists.debian.net https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-nginx-maintainers
Bug#1032517: [Pkg-nginx-maintainers] Bug#1032517:
Unless we find a better solution, then we will need to rollback the configuration back to nginx-common package.
Bug#1032517: [Pkg-nginx-maintainers] Bug#1032517:
> > Jan, > Did default config files in /etc/nginx/ moved from nginx-common to nginx ? Yes, config files moved to the nginx package, and nginx-common is empty metapackage (since 1.22.1-6). Jan
Bug#1032517: [Pkg-nginx-maintainers] Bug#1032517:
Le jeu. 9 mars 2023 à 15:00, Piotr Jurkiewicz < piotr.jerzy.jurkiew...@gmail.com> a écrit : > On Wed, 8 Mar 2023 19:05:39 +0100 Jan Mojzis wrote: > > Hello, > > can You please send me the steps how i can reproduce it > > - packages list/versions before the upgrade > > - exact apt/apt-get command > > - packages list/versions after the upgrade > > > > Jan > > > > > > I used aptitude to perform upgrade. > > Before upgrade: > > ii libnginx-mod-http-echo 1.22.0-3 amd64 > ii libnginx-mod-http-perl 1.22.0-3 amd64 > ri nginx-common 1.22.0-3 all > ii nginx-light1.22.0-3 amd64 > ii python3-certbot-nginx 1.29.0-1 all > > After: > > ii libnginx-mod-http-echo 1:0.63-4 amd64 > ii libnginx-mod-http-perl 1.22.1-7 amd64 > ii nginx 1.22.1-7 amd64 > ii nginx-common 1.22.1-7 all > ii nginx-light1.22.1-7 all > ii python3-certbot-nginx 2.1.0-2 all > > Then I used aptitude to purge leftover configuration files: > > # aptitude purge ?config-files > The following packages will be REMOVED: >emacsen-common{p} libpython3.10-minimal{p} nginx-common{p} > php8.1-cli{p} php8.1-common{p} php8.1-fpm{p} php8.1-opcache{p} > php8.1-readline{p} python3.10-minimal{p} > 0 packages upgraded, 0 newly installed, 9 to remove and 0 not upgraded. > Need to get 0 B of archives. After unpacking 0 B will be used. > Do you want to continue? [Y/n/?] y > Jan, Did default config files in /etc/nginx/ moved from nginx-common to nginx ? Jérémy
Bug#1032517:
On Wed, 8 Mar 2023 19:05:39 +0100 Jan Mojzis wrote: Hello, can You please send me the steps how i can reproduce it - packages list/versions before the upgrade - exact apt/apt-get command - packages list/versions after the upgrade Jan I used aptitude to perform upgrade. Before upgrade: ii libnginx-mod-http-echo 1.22.0-3 amd64 ii libnginx-mod-http-perl 1.22.0-3 amd64 ri nginx-common 1.22.0-3 all ii nginx-light1.22.0-3 amd64 ii python3-certbot-nginx 1.29.0-1 all After: ii libnginx-mod-http-echo 1:0.63-4 amd64 ii libnginx-mod-http-perl 1.22.1-7 amd64 ii nginx 1.22.1-7 amd64 ii nginx-common 1.22.1-7 all ii nginx-light1.22.1-7 all ii python3-certbot-nginx 2.1.0-2 all Then I used aptitude to purge leftover configuration files: # aptitude purge ?config-files The following packages will be REMOVED: emacsen-common{p} libpython3.10-minimal{p} nginx-common{p} php8.1-cli{p} php8.1-common{p} php8.1-fpm{p} php8.1-opcache{p} php8.1-readline{p} python3.10-minimal{p} 0 packages upgraded, 0 newly installed, 9 to remove and 0 not upgraded. Need to get 0 B of archives. After unpacking 0 B will be used. Do you want to continue? [Y/n/?] y
Bug#1032517:
Hello, can You please send me the steps how i can reproduce it - packages list/versions before the upgrade - exact apt/apt-get command - packages list/versions after the upgrade Jan
Bug#1032517: nginx settings deleted on upgrade
I can confirm this bug. Happened to me twice yesterday. The problem occurs also when pruning is being done after system upgrade, in a separate step.
Bug#1032517: nginx settings deleted on upgrade
Package: nginx Version: 1.22.1-7 Severity: grave Justification: causes non-serious data loss Dear Maintainer, last weekend I did an "apt upgrade" of my system as usual, asking apt to prune configuration files for packages that are being uninstalled. Now I realize that my nginx stopped working, and it turns out its configuration files are just completely gone. Look like the recent package reorganization went wrong and actually deletes configuration under certain conditions -- that's pretty bad. Package updates shouldn't cause a loss of configuration files, even when pruning packages that are not present any more. Kind regards, Ralf -- System Information: Debian Release: bookworm/sid APT prefers testing APT policy: (990, 'testing'), (500, 'testing-debug'), (100, 'unstable') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 6.1.0-5-amd64 (SMP w/8 CPU threads; PREEMPT) Kernel taint flags: TAINT_USER Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set Shell: /bin/sh linked to /usr/bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled Versions of packages nginx depends on: ii debconf [debconf-2.0] 1.5.82 ii iproute2 6.1.0-1 ii libc6 2.36-8 ii libcrypt1 1:4.4.33-2 ii libpcre2-8-0 10.42-1 ii libssl33.0.8-1 ii zlib1g 1:1.2.13.dfsg-1 nginx recommends no packages. Versions of packages nginx suggests: ii fcgiwrap 1.1.0-14 pn nginx-doc ii ssl-cert 1.1.2 -- Configuration Files: /etc/nginx/fastcgi.conf [Errno 2] No such file or directory: '/etc/nginx/fastcgi.conf' /etc/nginx/fastcgi_params [Errno 2] No such file or directory: '/etc/nginx/fastcgi_params' /etc/nginx/koi-utf [Errno 2] No such file or directory: '/etc/nginx/koi-utf' /etc/nginx/koi-win [Errno 2] No such file or directory: '/etc/nginx/koi-win' /etc/nginx/mime.types [Errno 2] No such file or directory: '/etc/nginx/mime.types' /etc/nginx/nginx.conf [Errno 2] No such file or directory: '/etc/nginx/nginx.conf' /etc/nginx/proxy_params [Errno 2] No such file or directory: '/etc/nginx/proxy_params' /etc/nginx/scgi_params [Errno 2] No such file or directory: '/etc/nginx/scgi_params' /etc/nginx/sites-available/default [Errno 2] No such file or directory: '/etc/nginx/sites-available/default' /etc/nginx/snippets/fastcgi-php.conf [Errno 2] No such file or directory: '/etc/nginx/snippets/fastcgi-php.conf' /etc/nginx/snippets/snakeoil.conf [Errno 2] No such file or directory: '/etc/nginx/snippets/snakeoil.conf' /etc/nginx/uwsgi_params [Errno 2] No such file or directory: '/etc/nginx/uwsgi_params' /etc/nginx/win-utf [Errno 2] No such file or directory: '/etc/nginx/win-utf' -- debconf information: nginx/log-symlinks: