tags 656553 + patch
thanks
Find attached a patch that fixes three bugs (some of the older combined).
They are mostly maintenance fixes (quick and dirty) as packaging should be
rethought a lot.
diff -Naupr ampache-3.6-alpha1+dfsg.orig/debian/ampache.postinst ampache-3.6-alpha1+dfsg/debian/ampache.postinst
--- ampache-3.6-alpha1+dfsg.orig/debian/ampache.postinst 2011-10-25 19:00:18.000000000 +0200
+++ ampache-3.6-alpha1+dfsg/debian/ampache.postinst 2012-04-15 23:05:14.534895036 +0200
@@ -18,8 +18,8 @@ if [ -e /etc/apache2 ]; then
APE="/etc/apache2/conf.d"
APES="/etc/apache2/sites-enabled/mythweb.conf"
confd=$(ls $APE)
- sa=$(ls /etc/apache2/sites-available)
- se=$(ls /etc/apache2/sites-enabled)
+ sa=$(ls /etc/apache2/sites-available || echo "")
+ se=$(ls /etc/apache2/sites-enabled || echo "")
default_stock="b38ca5a963f52930ede3f4e1958f3275 /etc/apache2/sites-available/default"
AA="b17b1eae00bd0ee2d716394ee28bbc62 /etc/apache2/sites-enabled/ApacheAmpache"
fi
@@ -110,21 +110,19 @@ apache_install() {
default_users=$(md5sum /etc/apache2/sites-available/default)
printf "enabling ApacheAmpache.\n"
if [ "$default_stock" = "$default_users" ]; then
- a2dissite default
- a2ensite ApacheAmpache
+ a2ensite ApacheAmpache || true
rm -f $ELCAMP
rm -f $MAMP
fi
elif [ "$sc010" = "1" ] && [ "$sc101" = "1" ] && [ "$sc102" = "1" ] && \
- [ "$sc103" = "enabled" ] && ["$sc104" = "1" ]; then
+ [ "$sc103" = "enabled" ] && [ "$sc104" = "1" ]; then
printf "need to create ampvhadd\n"
cp -p $APSA/default $APSA/default2
if [ -f $APSA/default2 ]; then
sed -e s'/<\/VirtualHost>//' $APSA/default2 > $APSA/default3
cat $APSA/default3 /usr/share/ampache/vhost > $APSA/ampvhadd
if [ -e $APSA/ampvhadd ]; then
- a2dissite default
- a2ensite ampvhadd
+ a2ensite ampvhadd || true
rm -f $APSA/ApacheAmpache
rm -f $APSA/default2
rm -f $APSA/default3
@@ -160,7 +158,7 @@ mythbuntu_apache_install() {
fi
}
-if [ "$1" = "configure" ] || [ "1" = "upgrade" ]; then
+if [ "$1" = "configure" ] || [ "$1" = "upgrade" ]; then
#find out what type of webserver we have
db_get ampache/webserver_type || true
webservers="$RET"
diff -Naupr ampache-3.6-alpha1+dfsg.orig/debian/ampache.postrm ampache-3.6-alpha1+dfsg/debian/ampache.postrm
--- ampache-3.6-alpha1+dfsg.orig/debian/ampache.postrm 2011-10-25 19:00:18.000000000 +0200
+++ ampache-3.6-alpha1+dfsg/debian/ampache.postrm 2012-04-15 23:00:16.197415810 +0200
@@ -6,7 +6,6 @@ set -e
ELCA=/etc/lighttpd/conf-available
ELCE=/etc/lighttpd/conf-enabled
EAMP=/etc/ampache
-UAMP=/usr/share/ampache
LDM=/usr/sbin/lighty-disable-mod
APES=/etc/apache2/sites-enabled/mythweb.conf
APE=/etc/apache2/conf.d
@@ -34,12 +33,10 @@ lighttpd_remove() {
apache_remove() {
if [ -e /etc/apache2/sites-available/ApacheAmpache ]; then
a2dissite ApacheAmpache
- a2ensite default
rm -f /etc/apache2/sites-available/ApacheAmpache
fi
if [ -e /etc/apache2/sites-available/ampvhadd ]; then
a2dissite ampvhadd
- a2ensite default
rm -f /etc/apache2/sites-available/ampvhadd
fi
}
@@ -59,12 +56,6 @@ if [ "$1" = "remove" ] || [ "$1" = "purg
db_get ampache/restart_webserver || true
if [ "$RET" = "false" ]; then
#This removes everthing except config files.
- if [ -d $UAMP ]; then
- rm -rf $UAMP
- fi
- if [ -d $log ]; then
- rm -rf $log
- fi
if [ -f /etc/logrotate.d/ampache ]; then
rm -f /etc/logrotate.d/ampache
fi
@@ -90,12 +81,6 @@ if [ "$1" = "remove" ] || [ "$1" = "purg
/etc/init.d/$webservers reload 3>/dev/null || true
fi
#This removes everything except config files.
- if [ -d $UAMP ]; then
- rm -rf $UAMP
- fi
- if [ -d $log ]; then
- rm -rf $log
- fi
if [ -f /etc/logrotate.d/ampache ]; then
rm -f /etc/logrotate.d/ampache
fi
diff -Naupr ampache-3.6-alpha1+dfsg.orig/debian/changelog ampache-3.6-alpha1+dfsg/debian/changelog
--- ampache-3.6-alpha1+dfsg.orig/debian/changelog 2012-03-14 19:55:19.000000000 +0100
+++ ampache-3.6-alpha1+dfsg/debian/changelog 2012-04-15 23:06:21.899229257 +0200
@@ -1,5 +1,14 @@
ampache (3.6-alpha1+dfsg-3) unstable; urgency=low
+ * Made postinst and postrm scripts not touch anything they do not own
+ Closes: #656553, #666005
+ * Fixed syntax and logic errors in postinst
+ Closes: #668639
+
+ -- Dominik George <n...@naturalnet.de> Sun, 15 Apr 2012 23:03:08 +0200
+
+ampache (3.6-alpha1+dfsg-3) unstable; urgency=low
+
* Removed dependency on php5-auth-pam as it is being removed from the archive
due to non maintenance, refer to bug 663694 for more information.
Closes: #663005