Ubuntu package installs default website twice

Bug #547267 reported by Daniel Hahler
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
nginx (Debian)
Fix Released
Unknown
nginx (Ubuntu)
Fix Released
High
Bilal Akhtar

Bug Description

Binary package hint: nginx

0.8.53-1ubuntu1 installs the default website twice. And, when dpkg sees this, these things happen:
1) Dpkg halts with an error
2) The debian policy gets violated
3) The default website doesn't get installed

Related branches

Revision history for this message
Daniel Hahler (blueyed) wrote :

High prio, because this is blocking bug 548124.

Changed in nginx (Ubuntu):
importance: Undecided → High
Changed in nginx (Debian):
status: Unknown → Fix Released
Daniel Hahler (blueyed)
Changed in nginx (Ubuntu):
assignee: nobody → Andres Rodriguez (andreserl)
Revision history for this message
Andres Rodriguez (andreserl) wrote :

Hi Daniel,

I'm pretty sure I added this change to fix a bug where users were complaining about nginx was not installing files /var/www/nginx-default. I think that the reference was lost in the changelogs.

Anyways, I do think it is important to install the files in such directory, due to the document root in the default config of nginx references those path/files. Similar behavior is in lighttpd. Now, as I've just read in Lintian report it says

"As an exception, packages are permitted to create the /var/www directory due to its past history as the default document root, but should at most copy over a default file in postinst for a new install" (this is what lighttpd does).

So I would go for changing the installation of these files to postinst. However, I would like to hear your thoughts about this?

Thanks.

Revision history for this message
Daniel Hahler (blueyed) wrote :

Andres, sorry for the late reply.

Yes, using the "exception method", also used by lighttpd, sounds good to me.
However, talking with the Debian maintainer would be better: it would be nice to have no delta in Ubuntu, just for this.

Also, asking in #ubuntu-server might help to decide on that, too.

When changing this, will you do the merge, too? (bug 548124)

Changed in nginx (Ubuntu):
status: New → In Progress
Revision history for this message
Bilal Akhtar (bilalakhtar) wrote :

Andres,
Please fix this one quickly, as it is blocking merge bug #616685 .

Revision history for this message
Bilal Akhtar (bilalakhtar) wrote :

Discussion on #ubuntu-motu:
20:50 < bilalakhtar> andreserl: Can I take bug #547267 from you?
20:50 < ubottu> Launchpad bug 547267 in nginx (Ubuntu) "nginx should not install into /var/www/nginx-default (Debian
                policy)" [High,In progress] https://launchpad.net/bugs/547267
20:52 < andreserl> bilalakhtar, sure go ahead :)
20:52 < bilalakhtar> andreserl: thanks

Changed in nginx (Ubuntu):
assignee: Andres Rodriguez (andreserl) → Bilal Akhtar (bilalakhtar)
Revision history for this message
Michael Lustfield (michaellustfield) wrote :

According to the debian policy, it is acceptable to place basic web files in /var/www because of it's nature.

http://lintian.debian.org/tags/dir-or-file-in-var-www.html
"""As an exception, packages are permitted to create the /var/www directory due to its past history as the default document root, but should at most copy over a default file in postinst for a new install. In this case, please add a Lintian override."""

In my opinion, these files should exist. It offers the ability to install Nginx and verify that it's working without doing any changes to the system.

If we want to be pedantic about this bug, this we could instead of pointing the default website at /var/nginx-default, we could point it at /usr/share/nginx/nginx-default. This may be the best option because it would 1) obey the policy 2) allow the benefits of having a default website.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package nginx - 0.7.67-3ubuntu2

---------------
nginx (0.7.67-3ubuntu2) natty; urgency=low

  * Don't copy the default site directly into /var/www/ in the package,
    but instead keep it in /usr/share/nginx/nginx-default and move it to
    /var/www/nginx-default/ just after installation. (LP: #547267)
 -- Bilal Akhtar <email address hidden> Tue, 02 Nov 2010 21:00:26 +0300

Changed in nginx (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Daniel Hahler (blueyed) wrote :

What is the reason to not do it like Debian does? (see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=572513)

Changed in nginx (Ubuntu):
importance: High → Medium
Revision history for this message
Bilal Akhtar (bilalakhtar) wrote : Re: [Bug 547267] Re: nginx should not install into /var/www/nginx-default (Debian policy)

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

On 11/06/2010 05:40 PM, Daniel Hahler wrote:
> What is the reason to not do it like Debian does? (see
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=572513)
>
> ** Changed in: nginx (Ubuntu)
> Importance: High => Medium
>

The reason I did it this way was because apache2 follows a similar
method to what I have done. My way has the following advantages:
1) The default site is created
2) The Debian Policy is not violated
3) It works very well, and lintian.debian.org suggests this particular
method in case of /var/www/ file installation.

README.Debian still contains info about not installing files in /var/www
, I will remove this info soon.

- --
Bilal Akhtar - Ubuntu Developer, yet still 14 years old.
More information about him can be found on
https://edge.launchpad.net/~bilalakhtar
IRC nick: bilalakhtar
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJM1aBTAAoJENsMxwzgYeH2PdYIALcnqPLTuaSb/oMGcHreBO0U
m7HHlojDv6THXIGdvk/9nEhKbbgKtEAZitqI+6wAvX0yGmZZlY4k30isuW22Wc6U
ZxAD67Vzhb9fZnxhAH9J1GHMnoeCR87N8ILu/08CtPJTk6jOvVJIby4FE2JcSOw0
5IfQjgluDmb6UWJauGHeMQz4ZCiR6yP8rKpYfv0qo2+iZatF+uWK5CpGVjx6bhKb
noovVNP6nphrZYooAmsi1aiEitFfNp4OUNuO6uMxix9US8Gc18k0qxIJKUgr2Z2m
Z43x13j4b4hT3MvQNqJKTDBxfMDMjK1w80Ow6t2wVMCWrYVIrzi+WWMt0PMkT2Y=
=kfc9
-----END PGP SIGNATURE-----

Revision history for this message
Michael Lustfield (michaellustfield) wrote : Re: nginx should not install into /var/www/nginx-default (Debian policy)

Please look at the latest Debian packaging. The default website is created and is also held outside of /var/www/. This complies with lintian and leaves a default website.

It is my opinion that this patch can be removed from the Ubuntu version of the packaging. Here's the relevant piece of the bzr import from the svn branch.

timestamp: Tue 2010-11-02 18:57:13 +0000
message:
  Moving var/www/nginx-default to usr/share/nginx/www
modified:
  changelog
  conf/sites-available/default
  dirs
  nginx.install
  rules

Revision history for this message
Bilal Akhtar (bilalakhtar) wrote :

Thanks Michael for the information, doing that would mean that we are deviating away from upstream; but changing the location of the default website in the config is the best way.

Merging the change from Debian.

(BTW, why did Bhavani merge the package when I had commented on M-o-M that I would take the merge?)

Revision history for this message
Bilal Akhtar (bilalakhtar) wrote :

Hmm, so the package in Ubuntu is broken ATM! Why did Bhavani merge so ruthlessly? /me is fixing

summary: - nginx should not install into /var/www/nginx-default (Debian policy)
+ Ubuntu package installs default website twice
Changed in nginx (Ubuntu):
importance: Medium → High
status: Fix Released → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package nginx - 0.8.53-1ubuntu2

---------------
nginx (0.8.53-1ubuntu2) natty; urgency=low

  * Drop all Ubuntu changes that have landed in Debian in 0.8.53-1,
    except for:
    - debian/patches/nginx-html5-codecs.diff: Add support for html5 codecs.
 -- Bilal Akhtar <email address hidden> Mon, 29 Nov 2010 09:46:37 +0300

Changed in nginx (Ubuntu):
status: In Progress → Fix Released
description: updated
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.