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

Bug#725154: pu: package oss-compat/2



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

Hi,

oss-compat in stable suffers from two serious bugs:
  * 660803, related to changes in kmod (and causing issues when
    installing Debian Edu wheezy);
  * 718241, which was initially just a tracking bug for testing but
    also applies to wheezy.

The latter bug doesn't contain much rationale; basically the issue is
that oss-compat installs modprobe configuration to load OSS modules
automatically, and since this takes the form of a configuration file,
the modules are still loaded even when oss-compat is removed (but not
purged). This is undesirable in and of itself, but it also complicates
for future upgrades: anything causing an automatic removal of
oss-compat will be broken if it requires the modules not to load
(cf. osspd which now provides oss-compat; I'd like oss-compat in
jessie to recommend osspd).

The attached patch fixes these two bugs in wheezy in the same way as
in jessie; the relevant versions of the package have been in jessie
for a while.

Regards,

Stephen


-- System Information:
Debian Release: jessie/sid
  APT prefers testing
  APT policy: (500, 'testing'), (500, 'stable'), (200, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.10-3-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_GB.utf8, LC_CTYPE=en_GB.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
diff --git a/debian/changelog b/debian/changelog
index 533343f..57a79dd 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,12 @@
+oss-compat (2+deb7u1) wheezy; urgency=low
+
+  * Use softdep directives in the modprobe configuration. (Closes:
+    #660803.)
+  * Remove oss-compat.conf when removing the package, so it doesn't load
+    the OSS modules when configured but not installed. (Closes: #718241.)
+
+ -- Stephen Kitt <skitt@debian.org>  Wed, 02 Oct 2013 07:30:56 +0200
+
 oss-compat (2) unstable; urgency=low
 
   [ Stephen Kitt ]
diff --git a/debian/postinst b/debian/postinst
index e0fe783..ca1d9b5 100644
--- a/debian/postinst
+++ b/debian/postinst
@@ -32,6 +32,8 @@ case "$1" in
         fi
         # Cleanup stable configuration link
         [ -L ${oldconffile} ] && rm -f ${oldconffile}
+        # Wheezy configuration file (using install directives)
+        [ -f ${curconffile} ] && [ "$(md5sum ${curconffile} | cut -d\  -f1)" = "88222606b0a3ba8b0825c5000c754e6f" ] && cp /lib/oss-compat/linux $
 
         if lsmod | grep -q "^snd " ; then
           modprobe snd || true
diff --git a/debian/prerm b/debian/prerm
new file mode 100644
index 0000000..3cb73d4
--- /dev/null
+++ b/debian/prerm
@@ -0,0 +1,26 @@
+#!/bin/sh
+set -e
+
+case "$1" in
+    remove)
+	conffile=/etc/modprobe.d/oss-compat.conf
+	# If the installed file matches a known version, remove it
+	if [ -f ${conffile} ]; then
+	    md5sum=$(md5sum ${conffile} | cut -d\  -f1)
+	    # Wheezy version
+	    md5wheezy=88222606b0a3ba8b0825c5000c754e6f
+	    # Jessie version
+	    md5jessie=cb772524a069ec273d7ca6db520388c1
+	    if [ "${md5sum}" = "${md5wheezy}" -o "${md5sum}" = "${md5jessie}" ]; then
+		rm -f /etc/modprobe.d/oss-compat.conf
+	    fi
+	fi
+	;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
diff --git a/linux b/linux
index 98c8b57..d24b108 100644
--- a/linux
+++ b/linux
@@ -1,3 +1,3 @@
-install snd-pcm modprobe --ignore-install snd-pcm $CMDLINE_OPTS && { modprobe --quiet snd-pcm-oss ; : ; }
-install snd-mixer modprobe --ignore-install snd-mixer $CMDLINE_OPTS && { modprobe --quiet snd-mixer-oss ; : ; }
-install snd-seq modprobe --ignore-install snd-seq $CMDLINE_OPTS && { modprobe --quiet snd-seq-midi ; modprobe --quiet snd-seq-oss ; : ; }
+softdep snd-pcm post: snd-pcm-oss
+softdep snd-mixer post: snd-mixer-oss
+softdep snd-seq post: snd-seq-midi snd-seq-oss

Reply to: