ampache does not configure webserver correctly

Bug #676234 reported by Charlie_Smotherman
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
ampache (Ubuntu)
Fix Released
Undecided
Unassigned
Maverick
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: ampache

This is specific to maverick (ampache-3.5.4-7ubuntu1), Natty (ampache-3.5.4-8ubuntu4) is not affected by this bug.

TEST CASE
1) apt-get install ampache
2) launch web browser and go to http://localhost/ampache, you will get "404 Not Found" when you should get the web install page.

Corrected $webserver typo in ampache.preinst, ampache.postinst, and ampache.postrm. Also corrected a bad copy and paste in ampache.postrm which did not allow the webserver config to be reloaded on purge.

Added a conditional statement to ampache.preinst so if ampache.conf sym link is not present it will be created and the webserver config will be reloaded.

description: updated
Changed in ampache (Ubuntu):
status: New → Fix Released
tags: added: verification-needed
Revision history for this message
Martin Pitt (pitti) wrote :

The patch uploaded to maverick-proposed looks backwards:

         for webserver in $webservers; do
             webserver=${webserver%,}
- if [ "$webserver" = "lighttpd" ] ; then
+ if [ "$webservers" = "lighttpd" ] ; then

Since this is a loop, the original version definitively looks correct.

Revision history for this message
Charlie_Smotherman (cjsmo) wrote :

Bah, I created the debdiff backwards the package was correct :(

Reuploaded ampache-3.5.4-7ubuntu2.2 and added a new debdiff.

Best regards
Charlie Smotherman

Revision history for this message
DodgeV83 (spamfrelow) wrote :

I fixed this with a

sudo ln -s /etc/ampache/ampache.conf /etc/apache2/conf.d/

Will this cause problems when the real fix is deployed?

Revision history for this message
Martin Pitt (pitti) wrote :

No, I wasn't looking at the attached debdiff, but the uploaded debdiff. Also, please reuse the original 3.5.4-7ubuntu2.1 version number and changelog, uploading a changelog that just says "No change rebuild." without any bug reference is invalid for an SRU.

Revision history for this message
Charlie_Smotherman (cjsmo) wrote :

Reuploaded ampache-3.5.4-7ubuntu2.1

Hopefully this will help explain things, "webservers" is set in the line above that is not included in the diff

db_get ampache/webserver_type || true
webservers="$RET"

So using $webservers is correct, unless there is a better way of correcting this?

Best regards
Charlie

Revision history for this message
Martin Pitt (pitti) wrote :

If the debconf result is supposed to be a list, the original code was correct. If it's only a single value, then the "for" loop doesn't make sense, but the original code would still be correct. But the uploaded SRU change just doesn't make sense this way:

         for webserver in $webservers; do
             webserver=${webserver%,}
- if [ "$webserver" = "lighttpd" ] ; then
+ if [ "$webservers" = "lighttpd" ] ; then

Also, the source package was built in a strange way (not using the Ubuntu dpkg?), it's missing the Launchpad-Bugs-Fixed: line in the source.changes.

Revision history for this message
Charlie_Smotherman (cjsmo) wrote :

pitti,

I have removed the "for" loop in ampache.postrm and ampache.postinst. Once I started looking at the code closer I said to myself "yea know he's right you really don't need that "for" loop". The code looks simpler, easier to read, cleaner, thanks for the suggestion :) I will also be making these changes in debian thx again.

Charlie

Revision history for this message
Jonathan Riddell (jr) wrote :

Sitting in maverick-proposed unapproved queue. ubuntu-sru subcribed, needs approval

Revision history for this message
Martin Pitt (pitti) wrote :

Charlie, was the fixed "for" loop done in natty as well?

Changed in ampache (Ubuntu Maverick):
status: New → Fix Committed
Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Accepted ampache into maverick-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Revision history for this message
Martin Pitt (pitti) wrote :

Any testers?

Revision history for this message
Charlie_Smotherman (cjsmo) wrote :

Pitti,

Sorry for taking so long I got caught up in another project I'm working on and actually forgot about this. The upgrade from 7ubuntu1 => 7ubuntu2.1 succeeds and you can get to the web install pages, however 7ubuntu2.1 fails when doing a fresh install. I have prepared 7ubuntu2.2 and attached a diff of the changes. I have changed natty to use a Virtualhost and a2ensite in the postinst and a2dissite in postrm.

Revision history for this message
Martin Pitt (pitti) wrote :

Accepted ampache into maverick-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Revision history for this message
Rik Goldman (rikgoldman) wrote :

I will test this evening (16th) and reply with notes about my success.

Revision history for this message
Rik Goldman (rikgoldman) wrote :

Works like a charm using the instructions Charlie linked to: https://wiki.ubuntu.com/Testing/EnableProposed . firefox localhost/ampache picked up the configuration page. Going through the rest of the configuration now.

Revision history for this message
Rik Goldman (rikgoldman) wrote :

Continuing from my message above - rest of the configuration works smoothly. Great! Thanks.

Martin Pitt (pitti)
tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ampache - 3.5.4-7ubuntu2.2

---------------
ampache (3.5.4-7ubuntu2.2) maverick-proposed; urgency=low

  * Removed second test in the conditional statememt in ampache_install().
    (LP: #676234)
 -- Charlie Smotherman <email address hidden> Mon, 31 Jan 2011 19:40:15 -0500

Changed in ampache (Ubuntu Maverick):
status: Fix Committed → Fix Released
tags: added: testcase
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.