[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#704729: unblock: alsa-base/1.0.25+3 (pre-approval)



Package: release.debian.org
Severity: normal
User: release.debian.org@packages.debian.org
Usertags: unblock

I've prepared an update for alsa-base, to deal with a conffile fuckup that
happened moths ago and unfortunately got unnoticed by me until recently.

The rough story is: alsa-base, until +1, was doing Weird Shit™ with its
handling of /etc/default/alsa, which wasn't even a conffile. When I got
rid of all of that in +2, I accidentally got the new conffile renamed to
/e/d/alsa-base due to using debhelper to install it. The script that
sources it wasn't updated to look in the new location, and of course users
were left with the old "conffile" and the new one in the filesystem.

The updated package tries to fix this for people upgrading from squeeze
and also for current testing users which already have both files.

Additionally, it marks the package as MA: foreign. SVN also had two old
commits that add a missing pre-dependency on dpkg, and remove redundant
dirs from debian/alsa-base.dirs. If these two old commits are
unacceptable, I'll revert and rebuild, but I've checked that the package
contents are identical.

Finally, plese note this is probably (and hopefully) the final upload of
alsa-base. Marco and I have agreed to transplant the modprobe.d bits in
kmod, and let the "alsa" script die, as it was useful 8 years ago, but
probably not so much today. In short, I think this bug needs fix now, or
it won't ever be.

unblock alsa-base/1.0.25+3

Thanks for considering,
Jordi


-- System Information:
Debian Release: 7.0
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 3.5-trunk-amd64 (SMP w/2 CPU cores)
Locale: LANG=ca_ES.UTF-8@valencia, LC_CTYPE=ca_ES.UTF-8@valencia (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
diff -Nru alsa-base-1.0.25+2+nmu2/debian/alsa alsa-base-1.0.25+3/debian/alsa
--- alsa-base-1.0.25+2+nmu2/debian/alsa	2012-05-20 01:20:03.000000000 +0200
+++ alsa-base-1.0.25+3/debian/alsa	2013-04-01 07:05:11.000000000 +0200
@@ -15,10 +15,10 @@
 MYNAME=/usr/sbin/alsa
 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
 
-# Default values of variables in /etc/default/alsa
+# Default values of variables in /etc/default/alsa-base
 force_unload_modules_before_suspend=""
 
-[ -f /etc/default/alsa ] && . /etc/default/alsa
+[ -f /etc/default/alsa-base ] && . /etc/default/alsa-base
 
 # $* MESSAGE
 warn() { echo "${MYNAME}: Warning: $* " >&2 ; }
diff -Nru alsa-base-1.0.25+2+nmu2/debian/alsa-base.dirs alsa-base-1.0.25+3/debian/alsa-base.dirs
--- alsa-base-1.0.25+2+nmu2/debian/alsa-base.dirs	2012-02-26 12:56:39.000000000 +0100
+++ alsa-base-1.0.25+3/debian/alsa-base.dirs	2013-04-01 07:02:21.000000000 +0200
@@ -1,5 +1 @@
-etc/modprobe.d
-usr/share/alsa-base
-usr/share/lintian/overrides
-usr/share/bug/alsa-base
 usr/sbin
diff -Nru alsa-base-1.0.25+2+nmu2/debian/alsa-base.postrm alsa-base-1.0.25+3/debian/alsa-base.postrm
--- alsa-base-1.0.25+2+nmu2/debian/alsa-base.postrm	2012-05-20 14:23:19.000000000 +0200
+++ alsa-base-1.0.25+3/debian/alsa-base.postrm	2013-04-04 06:50:44.000000000 +0200
@@ -5,6 +5,9 @@
 if [ "$1" = "purge" ]; then
 	# Remove run time files
 	rm -rf /var/run/alsa
+
+	# Remove stray file
+	rm -f /etc/default/alsa
 fi
 
 #DEBHELPER#
diff -Nru alsa-base-1.0.25+2+nmu2/debian/alsa-base.preinst alsa-base-1.0.25+3/debian/alsa-base.preinst
--- alsa-base-1.0.25+2+nmu2/debian/alsa-base.preinst	2012-07-08 23:49:56.000000000 +0200
+++ alsa-base-1.0.25+3/debian/alsa-base.preinst	2013-04-05 06:24:05.000000000 +0200
@@ -12,4 +12,27 @@
 	[ -d /etc/apm ]           && rmdir --ignore-fail-on-non-empty /etc/apm
 fi
 
+case "$1" in
+    install|upgrade)
+	# Handle upgrade of /etc/default/alsa → /etc/default/alsa-base
+	if [ -f /etc/default/alsa ]; then
+		OLDMD5SUM="b0f9824c2d4288aa89df3777668f0d99"
+		CURMD5SUM=$(md5sum /etc/default/alsa | sed -e 's/ .*//')
+		# Upgrades prior to the file rename
+		if dpkg --compare-versions "$2" lt "1.0.25+2"; then
+			if [ "$OLDMD5SUM" = "$CURMD5SUM" ]; then
+				rm -f /etc/default/alsa
+			else
+				mv /etc/default/alsa /etc/default/alsa-base
+			fi
+		# Upgrades from current testing: both files exist
+		# If the old file was modified, just leave it there
+		elif dpkg --compare-versions "$2" lt "1.0.25+3"; then
+			if [ "$OLDMD5SUM" = "$CURMD5SUM" ]; then
+				rm -f /etc/default/alsa
+			fi
+		fi
+	fi
+esac
+
 #DEBHELPER#
diff -Nru alsa-base-1.0.25+2+nmu2/debian/changelog alsa-base-1.0.25+3/debian/changelog
--- alsa-base-1.0.25+2+nmu2/debian/changelog	2012-08-26 17:57:22.000000000 +0200
+++ alsa-base-1.0.25+3/debian/changelog	2013-04-05 06:28:30.000000000 +0200
@@ -1,3 +1,22 @@
+alsa-base (1.0.25+3) unstable; urgency=low
+
+  * Add Pre-Depends dpkg (>= 1.15.7.2~), for dpkg-maintscript-helper.
+  * Drop all dirs but usr/sbin from alsa-base.dirs. dh will take care.
+  * Mark alsa-base Mult-Arch: foreign.
+  * In 1.0.25+2, we started using dh_installinit to install the
+    default file as /etc/default/alsa-base, and make it a proper conffile.
+    However, the alsa script still expected to read defaults from
+    /etc/default/alsa. Update it to use the new path (closes: #680914).
+    Additionally, make sure that if we're upgrading from versions prior to
+    this change, and a /etc/default/alsa file already exists and its
+    md5sum isn't known, it'll get renamed to alsa-base in order to
+    preserve user changes.
+    For testing users, the old file will be removed if it was pristine,
+    and otherwise it'll stay unused in the filesystem.
+  * Try to remove /etc/default/alsa on purge.
+
+ -- Jordi Mallach <jordi@debian.org>  Thu, 04 Apr 2013 23:28:24 -0500
+
 alsa-base (1.0.25+2+nmu2) unstable; urgency=high
 
   * Non-maintainer upload.
diff -Nru alsa-base-1.0.25+2+nmu2/debian/control alsa-base-1.0.25+3/debian/control
--- alsa-base-1.0.25+2+nmu2/debian/control	2012-05-20 13:50:37.000000000 +0200
+++ alsa-base-1.0.25+3/debian/control	2013-04-01 20:29:32.000000000 +0200
@@ -12,10 +12,12 @@
 Package: alsa-base
 Architecture: all
 Provides: alsa
+Pre-Depends: dpkg (>= 1.15.7.2~)
 Depends: ${misc:Depends}, kmod, procps, udev
 Recommends: alsa-utils
 Suggests: alsa-oss, oss-compat
 Breaks: linux-sound-base
+Multi-Arch: foreign
 Description: ALSA driver configuration files
  This package contains various configuration files for
  the ALSA drivers.

Reply to: