Debian Bug report logs - #688410
nginx: Don't fail installing nginx-{naxsi, light, full, extras} if /etc/nginx/sites-* doesn't exist

version graph

Package: nginx-extras; Maintainer for nginx-extras is Kartik Mistry <kartik@debian.org>; Source for nginx-extras is src:nginx.

Reported by: Andreas Marschke <andreas.marschke@gmail.com>

Date: Sat, 22 Sep 2012 14:30:02 UTC

Severity: normal

Tags: patch, unreproducible

Found in version nginx/1.2.1-2.2

Fixed in version nginx/1.2.4-1

Done: Kartik Mistry <kartik@debian.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Kartik Mistry <kartik@debian.org>:
Bug#688410; Package nginx-extras. (Sat, 22 Sep 2012 14:30:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Andreas Marschke <andreas.marschke@gmail.com>:
New Bug report received and forwarded. Copy sent to Kartik Mistry <kartik@debian.org>. (Sat, 22 Sep 2012 14:30:04 GMT) Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Andreas Marschke <andreas.marschke@gmail.com>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: nginx: Don't fail installing nginx-{naxsi, light, full, extras} if /etc/nginx/sites-* doesn't exist
Date: Sat, 22 Sep 2012 16:27:01 +0200
[Message part 1 (text/plain, inline)]
Package: nginx-extras
Version: 1.2.1-2.2
Severity: serious
Tags: patch
Justification: 6

Hi! 

When installing nginx-{naxsi,light,full,extras} the postinst scripts
create a symlink in /etc/nginx/sites-enabled/default from
/etc/nginx/sites-available/default if /etc/nginx/sites-enabled/default
doesn't exist. This script does not check if /etc/nginx/sites-enabled or
/etc/nginx/sites-available are in existance.

This results in breakage of these packages when installing them on an
existing nginx configuration without sites-enabled/sites-available. 

The attached patch should fix this by testing wether or not
sites-enabled/sites-available do exist and only then also will create
the symbolic link.

Hope it helps,

Andreas Marschke.

-- System Information:
Debian Release: wheezy/sid
  APT prefers testing
  APT policy: (990, 'testing'), (10, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.2.0-3-amd64 (SMP w/4 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages nginx-extras depends on:
ii  libc6                       2.13-35
ii  libexpat1                   2.1.0-1
ii  libgd2-noxpm                2.0.36~rc1~dfsg-6.1
ii  libgeoip1                   1.4.8+dfsg-3
ii  liblua5.1-0                 5.1.5-4
ii  libpam0g                    1.1.3-7.1
ii  libpcre3                    1:8.30-5
ii  libperl5.14                 5.14.2-13
ii  libssl1.0.0                 1.0.1c-4
ii  libxml2                     2.8.0+dfsg1-5
ii  libxslt1.1                  1.1.26-13
ii  nginx-common                1.2.1-2.2
ii  perl                        5.14.2-13
ii  perl-base [perlapi-5.14.2]  5.14.2-13
ii  zlib1g                      1:1.2.7.dfsg-13

nginx-extras recommends no packages.

nginx-extras suggests no packages.

-- no debconf information
[nginx-sites-exists.patch (text/x-diff, attachment)]

Severity set to 'normal' from 'serious' Request was from anarcat <anarcat@debian.org> to control@bugs.debian.org. (Sun, 30 Sep 2012 03:45:03 GMT) Full text and rfc822 format available.

Added tag(s) unreproducible. Request was from anarcat <anarcat@debian.org> to control@bugs.debian.org. (Sun, 30 Sep 2012 03:45:03 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Kartik Mistry <kartik@debian.org>:
Bug#688410; Package nginx-extras. (Sun, 30 Sep 2012 03:54:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to anarcat <anarcat@debian.org>:
Extra info received and forwarded to list. Copy sent to Kartik Mistry <kartik@debian.org>. (Sun, 30 Sep 2012 03:54:03 GMT) Full text and rfc822 format available.

Message #14 received at 688410@bugs.debian.org (full text, mbox):

From: anarcat <anarcat@debian.org>
To: Andreas Marschke <andreas.marschke@gmail.com>
Cc: 688410@bugs.debian.org
Subject: Re: Bug#688410: nginx: Don't fail installing nginx-{naxsi, light, full, extras} if /etc/nginx/sites-* doesn't exist
Date: Sat, 29 Sep 2012 23:42:45 -0400
[Message part 1 (text/plain, inline)]
severity 688410 normal
tags 688410 + unreproducible
thanks

Hi,

On Sat, Sep 22, 2012 at 04:27:01PM +0200, Andreas Marschke wrote:
> Hi! 
> 
> When installing nginx-{naxsi,light,full,extras} the postinst scripts
> create a symlink in /etc/nginx/sites-enabled/default from
> /etc/nginx/sites-available/default if /etc/nginx/sites-enabled/default
> doesn't exist. This script does not check if /etc/nginx/sites-enabled or
> /etc/nginx/sites-available are in existance.
> 
> This results in breakage of these packages when installing them on an
> existing nginx configuration without sites-enabled/sites-available. 

The patch is okay, but I do not understand why this is necessary.

I could not actually reproduce this. I tried to upgrade from existing
packages or purge my nginx install and pre-create /etc/nginx then
install the package, I didn't see any such problems.

Could you clarify how we could reproduce this bug?

In the meantime, I am downgrading the severity of this bug as I do not
see this affecting current installs on wheezy.

A.
-- 
We are discreet sheep; we wait to see how the drove is going, and then go
with the drove.
                        - Mark Twain
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Kartik Mistry <kartik@debian.org>:
Bug#688410; Package nginx-extras. (Sun, 07 Oct 2012 15:27:06 GMT) Full text and rfc822 format available.

Acknowledgement sent to Andreas Marschke <andreas.marschke@gmail.com>:
Extra info received and forwarded to list. Copy sent to Kartik Mistry <kartik@debian.org>. (Sun, 07 Oct 2012 15:27:06 GMT) Full text and rfc822 format available.

Message #19 received at 688410@bugs.debian.org (full text, mbox):

From: Andreas Marschke <andreas.marschke@gmail.com>
To: anarcat <anarcat@debian.org>
Cc: 688410@bugs.debian.org
Subject: Re: Bug#688410: nginx: Don't fail installing nginx-{naxsi, light, full, extras} if /etc/nginx/sites-* doesn't exist
Date: Sun, 7 Oct 2012 17:14:26 +0200
[Message part 1 (text/plain, inline)]
Hi!

Appended is a shell log from me first installing nginx and then
replacing it with nginx-extras by installing it. This means /etc/nginx
is still existing the prior config is withheld from the removal of the
original nginx package. 

If then nginx-extras is installed with the old config and
/etc/nginx/site-* not existing the installation will fail. 

Have fun!

Andreas.

On Sat, Sep 29, 2012 at 11:42:45PM -0400, anarcat wrote:
> severity 688410 normal
> tags 688410 + unreproducible
> thanks
> 
> Hi,
> 
> On Sat, Sep 22, 2012 at 04:27:01PM +0200, Andreas Marschke wrote:
> > Hi! 
> > 
> > When installing nginx-{naxsi,light,full,extras} the postinst scripts
> > create a symlink in /etc/nginx/sites-enabled/default from
> > /etc/nginx/sites-available/default if /etc/nginx/sites-enabled/default
> > doesn't exist. This script does not check if /etc/nginx/sites-enabled or
> > /etc/nginx/sites-available are in existance.
> > 
> > This results in breakage of these packages when installing them on an
> > existing nginx configuration without sites-enabled/sites-available. 
> 
> The patch is okay, but I do not understand why this is necessary.
> 
> I could not actually reproduce this. I tried to upgrade from existing
> packages or purge my nginx install and pre-create /etc/nginx then
> install the package, I didn't see any such problems.
> 
> Could you clarify how we could reproduce this bug?
> 
> In the meantime, I am downgrading the severity of this bug as I do not
> see this affecting current installs on wheezy.
> 
> A.
> -- 
> We are discreet sheep; we wait to see how the drove is going, and then go
> with the drove.
>                         - Mark Twain



-- 
Cheers,

Andreas Marschke
[log.nginx.txt (text/plain, attachment)]

Information forwarded to debian-bugs-dist@lists.debian.org, Kartik Mistry <kartik@debian.org>:
Bug#688410; Package nginx-extras. (Mon, 29 Oct 2012 23:15:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Michael Lustfield <michael@lustfield.net>:
Extra info received and forwarded to list. Copy sent to Kartik Mistry <kartik@debian.org>.

Your message did not contain a Subject field. They are recommended and useful because the title of a $gBug is determined using this field. Please remember to include a Subject field in your messages in future.

(Mon, 29 Oct 2012 23:15:03 GMT) Full text and rfc822 format available.


Message #24 received at 688410@bugs.debian.org (full text, mbox):

From: Michael Lustfield <michael@lustfield.net>
To: 688410@bugs.debian.org
Date: Mon, 29 Oct 2012 18:12:21 -0500
tags 688410 - unreproducible
thanks

It's definitely an edge case that this would ever crop up. It's a pretty safe
sanity check that only takes a few extra clock cycles during the installation.

I do have to wonder, however, if that symlink should not be moved to
nginx-common.postinstall...

I have a feeling that we'll end up doing this which should eliminate that
potential issue entirely.

-- 
Michael Lustfield



Reply sent to Kartik Mistry <kartik@debian.org>:
You have taken responsibility. (Tue, 30 Oct 2012 06:36:21 GMT) Full text and rfc822 format available.

Notification sent to Andreas Marschke <andreas.marschke@gmail.com>:
Bug acknowledged by developer. (Tue, 30 Oct 2012 06:36:21 GMT) Full text and rfc822 format available.

Message #29 received at 688410-close@bugs.debian.org (full text, mbox):

From: Kartik Mistry <kartik@debian.org>
To: 688410-close@bugs.debian.org
Subject: Bug#688410: fixed in nginx 1.2.4-1
Date: Tue, 30 Oct 2012 06:32:46 +0000
Source: nginx
Source-Version: 1.2.4-1

We believe that the bug you reported is fixed in the latest version of
nginx, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 688410@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Kartik Mistry <kartik@debian.org> (supplier of updated nginx package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Tue, 30 Oct 2012 10:10:34 +0530
Source: nginx
Binary: nginx nginx-doc nginx-common nginx-full nginx-full-dbg nginx-light nginx-light-dbg nginx-extras nginx-extras-dbg nginx-naxsi nginx-naxsi-dbg nginx-naxsi-ui
Architecture: source all amd64
Version: 1.2.4-1
Distribution: unstable
Urgency: low
Maintainer: Kartik Mistry <kartik@debian.org>
Changed-By: Kartik Mistry <kartik@debian.org>
Description: 
 nginx      - small, powerful, scalable web/proxy server
 nginx-common - small, powerful, scalable web/proxy server - common files
 nginx-doc  - small, powerful, scalable web/proxy server - documentation
 nginx-extras - nginx web/proxy server (extended version)
 nginx-extras-dbg - nginx web/proxy server (extended version) - debugging symbols
 nginx-full - nginx web/proxy server (standard version)
 nginx-full-dbg - nginx web/proxy server (standard version) - debugging symbols
 nginx-light - nginx web/proxy server (basic version)
 nginx-light-dbg - nginx web/proxy server (basic version) - debugging symbols
 nginx-naxsi - nginx web/proxy server (version with naxsi)
 nginx-naxsi-dbg - nginx web/proxy server (version with naxsi) - debugging symbols
 nginx-naxsi-ui - nginx web/proxy server - naxsi configuration front-end
Closes: 679601 679879 680712 681381 681758 682360 683704 683870 688410 1031515
Changes: 
 nginx (1.2.4-1) unstable; urgency=low
 .
   [ Michael Lustfield ]
   * debian/nginx-common.nginx.init
     + Added --retry to start-stop-daemon. (Closes: #682360)
     + Added $named to Required-Start/Stop. (Closes: #679879)
     + Added some other modifications after testing. (LP: #1033856)
   * debian/rules:
     + Added -DFORTIFY_SOURCE=2 -fstack-protector to build flags.
       (Closes: #680712)
   * debian/nginx-common.install:
     + Moved default docs to /usr/share/nginx/html. (Closes: #1031515)
   * debian/rules:
     + Set prefix to /usr/share/nginx.
   * debian/po/fr.po
     + Updated French translation file. (Closes: #679601)
   * debian/logrotate:
     + Removed semicolon after an fi statement. (Closes: #683870)
   * debian/copyright:
     + Removed trailing slash from File: fields.
   * Changed /var/run to /run in multiple files. (LP: #1050516)
   * debian/nginx-common.dirs:
     + Added /run to .dirs to avoid conflicts with backports. (LP: #1072641)
   * debian/nginx-*.postinst:
     + Added sites-enabled/available directory checks. (Closes: #688410)
       - Thanks Andreas Marschke <andreas.marschke@gmail.com>
     + Moved the symlink creation to nginx-common.
   * Updated debconf templates.
   * conf/sites-available/default:
     + Updated root to point at /usr/share/nginx/html instead of www.
 .
   [ Kartik Mistry ]
   * Acknowledged NMUs (Closes: #681758, #681381)
   * New upstream release (Closes: #683704)
   * debian/po/*.po:
     + Removed ^M characters from headers.
     + Fixed all files with recent unneeded template change.
Checksums-Sha1: 
 4237fbd2fc49cb77308536f54abe959b9858cdb6 2092 nginx_1.2.4-1.dsc
 e3de0b2b82095f26e96bdb461ba36472d3e7cdda 724309 nginx_1.2.4.orig.tar.gz
 ceace4c75402125ae82252807ee8345b3a100691 1370321 nginx_1.2.4-1.debian.tar.gz
 44b82bbfd6eac3b3cfdc016fd865c6341a21fca1 62338 nginx_1.2.4-1_all.deb
 95bd27ff1672189dd9d66a1fd96740a4d1fffa01 75788 nginx-doc_1.2.4-1_all.deb
 4ef79a6193346425fac98f5c994661954a10214d 74556 nginx-common_1.2.4-1_all.deb
 b305d42702deb765b525373403dd13a8c8349e93 352306 nginx-naxsi-ui_1.2.4-1_all.deb
 08404eef6368cf64e2ecba7280e03f5854e0369e 438148 nginx-full_1.2.4-1_amd64.deb
 1a59cc6c387ede9dcfad4c50c43ffaaeb4cdd68e 3098448 nginx-full-dbg_1.2.4-1_amd64.deb
 feaa4423262b5bac2e7ffd02afe1f740d6239b07 321396 nginx-light_1.2.4-1_amd64.deb
 21c415459b75516af53b51bf76e30941e9e42050 2154056 nginx-light-dbg_1.2.4-1_amd64.deb
 450a7ac581846a31bc9fffc9a5c7144a90389c00 604342 nginx-extras_1.2.4-1_amd64.deb
 bdfd22e2ba9d73881ef7e02ced0c94cc03bbf636 4580538 nginx-extras-dbg_1.2.4-1_amd64.deb
 fdd936d82d0b7cb5cfa5d59e40868f84ae24096a 360500 nginx-naxsi_1.2.4-1_amd64.deb
 58a68d5aa61b754610991e7c6894de96a60d059d 2283936 nginx-naxsi-dbg_1.2.4-1_amd64.deb
Checksums-Sha256: 
 c96c4b51d58dede1ae961cadb1eecac295603c36282762829f54da1383300f26 2092 nginx_1.2.4-1.dsc
 c587c25f2fa9c9dde6a58cbaf7bf2c808ee360cfa3cdaf00a13a33f728d96c43 724309 nginx_1.2.4.orig.tar.gz
 da27c97fc5e96cc2281e7e0cb76562d53828ae00ead8d6d0ec47be80673ab02d 1370321 nginx_1.2.4-1.debian.tar.gz
 b5d6d308e9891d759253c788c548be63f40a6a5cde84fdd2a375b95160e12f8a 62338 nginx_1.2.4-1_all.deb
 d92da3a136808700765d3c70b883e3889fba19933efe75d5b6c2ac56b48e1377 75788 nginx-doc_1.2.4-1_all.deb
 da0a53d0b5a4bb9415aad42108f66980a821ae742dbd50cf46996180aef9f319 74556 nginx-common_1.2.4-1_all.deb
 82a642703a13a42afbfa264090975d318c558c70d8fa83e672ab701b21272211 352306 nginx-naxsi-ui_1.2.4-1_all.deb
 56f13ff266f4ed99bb11e0b94e64707abd3504c9b0038d45881352f7ff45b456 438148 nginx-full_1.2.4-1_amd64.deb
 d813f43d559736396ecda300a60c61e01445a841c5828d95311b391581efc7a0 3098448 nginx-full-dbg_1.2.4-1_amd64.deb
 ccf5a66dab7f661e91d9cfdd4ec6d74983f5cef4415b8cfbc92943902ebbd297 321396 nginx-light_1.2.4-1_amd64.deb
 92cb5c1272cda85dae4442f9053a2ff91a36279284ca82fad5ee6e61d9d2d3a5 2154056 nginx-light-dbg_1.2.4-1_amd64.deb
 b5cb96f8a0b74ac6e905ecca84ac168b83fceb9ccc21782e6d8a4d15b445f285 604342 nginx-extras_1.2.4-1_amd64.deb
 da62cd38548dc8b42de1b4e9f0620d094ed73ceb8cc84c6d9503eead99b8e916 4580538 nginx-extras-dbg_1.2.4-1_amd64.deb
 f687f7151fca72421ad2cf94c8003813b6bf720d7dbcd7b2c9b9556782e1658d 360500 nginx-naxsi_1.2.4-1_amd64.deb
 cbd8cbeae7cec136dee302c79da73f3cd3426b77d7f45870a3af3eb5ae1a2469 2283936 nginx-naxsi-dbg_1.2.4-1_amd64.deb
Files: 
 edc625b55db5b554cb8362271ff37408 2092 httpd optional nginx_1.2.4-1.dsc
 a7c9a515f632c8cbb07ab67392208088 724309 httpd optional nginx_1.2.4.orig.tar.gz
 c22c94fd802b9369b947febad7bde6ae 1370321 httpd optional nginx_1.2.4-1.debian.tar.gz
 2cf68b16600d96ee86d720310ec2adb4 62338 httpd optional nginx_1.2.4-1_all.deb
 780f0675b0d18860851a3e0b49d865c4 75788 doc optional nginx-doc_1.2.4-1_all.deb
 30b2359cc30c482479bbc78fb38db64c 74556 httpd optional nginx-common_1.2.4-1_all.deb
 3c164f12b6d0c24720001a62d411f097 352306 httpd extra nginx-naxsi-ui_1.2.4-1_all.deb
 d9ca647ae97c49de63f50db6a2f8d103 438148 httpd optional nginx-full_1.2.4-1_amd64.deb
 0feeac6b541ecbf0aabf15bb5c459651 3098448 debug extra nginx-full-dbg_1.2.4-1_amd64.deb
 1bbe589bd63f1b697cdd0fffc7a6f143 321396 httpd extra nginx-light_1.2.4-1_amd64.deb
 b5cdffddd43496e02237736ac6899dc2 2154056 debug extra nginx-light-dbg_1.2.4-1_amd64.deb
 abb0d648a6eb00b1daf7eac421788730 604342 httpd extra nginx-extras_1.2.4-1_amd64.deb
 ce6324c651fd2743aa4489e942a4ff10 4580538 debug extra nginx-extras-dbg_1.2.4-1_amd64.deb
 244b9a2738f6772106fea651c5199ced 360500 httpd extra nginx-naxsi_1.2.4-1_amd64.deb
 0596e86c0d87c172f0506af330f06528 2283936 debug extra nginx-naxsi-dbg_1.2.4-1_amd64.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAlCPancACgkQoRg/jtECjI10TgCgk/j8+9w0Aq7TYq34g/I1kkk0
IecAoKEdVlzM9SZXWrd3vYZS2sfPb0vz
=+JWe
-----END PGP SIGNATURE-----




Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Mon, 03 Jun 2013 07:38:07 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Wed Apr 23 18:00:16 2014; Machine Name: buxtehude.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.