[Pkg-alsa-devel] [Debian ALSA CVS] debian/alsa-driver/debian (5 files)

Steve Kowalik stevenk@haydn.debian.org
Tue, 20 Apr 2004 15:43:50 -0600


    Date: Tuesday, April 20, 2004 @ 15:43:50
  Author: stevenk
    Path: /cvsroot/pkg-alsa/debian/alsa-driver/debian

Modified: alsa-source.config alsa-source.templates changelog control rules

Herein continues the New World Order for ALSA.
Rewrite the debconfage for alsa-source.
Clean up debian/rules.
Stop alsa-base depending on a few things.


-----------------------+
 alsa-source.config    |  156 +++---------------------------------------------
 alsa-source.templates |    2 
 changelog             |   46 ++++++++++----
 control               |    2 
 rules                 |   48 +++++---------
 5 files changed, 65 insertions(+), 189 deletions(-)


Index: debian/alsa-driver/debian/alsa-source.config
diff -u debian/alsa-driver/debian/alsa-source.config:1.22 debian/alsa-driver/debian/alsa-source.config:1.23
--- debian/alsa-driver/debian/alsa-source.config:1.22	Fri May 16 04:54:57 2003
+++ debian/alsa-driver/debian/alsa-source.config	Tue Apr 20 15:43:50 2004
@@ -1,150 +1,18 @@
-#!/usr/bin/perl -w
+#!/bin/sh
 
-package Debconf::Client::ConfModuleX;
+set -e
 
-# Ripped right out of libapache-sessionx-perl, thanks to Angus Lees.
+. /usr/share/debconf/confmodule
 
-#
-# Add the error checking behaviour that I think
-# Debconf::Client::ConfModule should have anyway
-#
+db_version 2.0
+db_capb multiselect
 
-use Debconf::Client::ConfModule;
+if [ -f /etc/alsa-source.conf ]; then
+    mv /etc/alsa-source.conf /etc/alsa/alsa-source.conf
+fi
 
-use base qw(Exporter);
-
-BEGIN {
-  *EXPORT_OK = \@Debconf::Client::ConfModule::EXPORT_OK;
-  *EXPORT_TAGS = \%Debconf::Client::ConfModule::EXPORT_TAGS;
-}
-
-sub AUTOLOAD {
-  my $cmd = our $AUTOLOAD;
-  $cmd =~ s|.*:||;
-
-  my ($ret, $text) = &{"Debconf::Client::ConfModule::$cmd"}(@_);
-  if ($ret == 0 or $ret >= 30 && $ret < 100) {
-    # expected return values
-    return wantarray ? ($ret, $text) : $text;
-  }
-
-  $cmd = uc $cmd;
-  my $msg = $text ? "$text ($ret)" : "code $ret";
-
-  require Carp;
-  if ($ret < 10 || $ret >= 110) {
-    Carp::confess("Debconf $cmd returned reserved error code? $msg");
-  } elsif ($ret < 20) {
-    # Dump @_ ?
-    Carp::croak("Debconf $cmd: invalid parameters: $msg");
-  } elsif ($ret < 30) {
-    Carp::confess("Debconf $cmd: syntax error: $msg");
-  } else { # $ret < 110
-    Carp::confess("Debconf $cmd: debconf internal error: $msg");
-  }
-}
-
-1;
-
-package main;
-
-sub move_file {
-    my ($src, $dst) = @_;
-    rename($src, $dst) or system("mv $src $dst");
-}
-
-BEGIN { Debconf::Client::ConfModuleX->import(qw(:all)) }
-
-use strict;
-
-version('2.0');
-capb('multiselect');
-
-my @alsa_modules = metaget("alsa-common/card-list", "choices");
-my %alsa_modules_list = ();
-foreach (split(/, /, $alsa_modules[1])) {
-  /^([^\s]+)\s(.+)/;
-  $alsa_modules_list{$1} = $2;
-}
-$alsa_modules_list{all} = "";
-
-if (-f "/etc/alsa-source.conf") {
-  move_file("/etc/alsa-source.conf", "/etc/alsa/alsa-source.conf");
-}
-
-my %debconf_config = ('has_pnp' => '', 'debug' => '', 'cards_to_be_built' => '');
-
-foreach my $key (keys(%debconf_config)) {
-  my @tmp_deb = get("alsa-source/$key");
-  $debconf_config{$key} = $tmp_deb[1];
-}
-
-my @config_lines = ();
-if (-f "/etc/alsa/alsa-source.conf") {
-  open(ALSACONF, "</etc/alsa/alsa-source.conf");
-  foreach (<ALSACONF>) {
-    if (/^ALSA_/) {
-      chomp;
-      push(@config_lines, $_);
-    }
-  }
-  close ALSACONF;
-}
-
-my %parsed_config = ();
-
-foreach (@config_lines) {
-  my @tmp_array = split(/=/, $_);
-  $tmp_array[1] =~ s/"(.*)"/$1/;
-  $parsed_config{lc($tmp_array[0])} = $tmp_array[1];
-}
-
-if (!exists($parsed_config{alsa_nopnp})) {
-	$parsed_config{alsa_nopnp} = "n";
-}
-if (!exists($parsed_config{alsa_debug})) {
-	$parsed_config{alsa_debug} = "n";
-}
-if (!exists($parsed_config{alsa_cards})) {
-	$parsed_config{alsa_cards} = "all";
-}
-
-subst("alsa-source/cards_to_be_built", "alsa_modules", $alsa_modules[1]);
-
-# If the config file exists, believe it, otherwise debconf.
-if (-f "/etc/alsa/alsa-source.conf") {
-  my $tmp_card_array = "";
-  foreach (split(/, /, $parsed_config{alsa_cards})) {
-    $tmp_card_array .= "$_ $alsa_modules_list{$_}, ";
-  }
-  $tmp_card_array =~ s/\, $//;
-  set("alsa-source/cards_to_be_built", $tmp_card_array);
-  if ($parsed_config{alsa_nopnp} eq "y") {
-    set("alsa-source/has_pnp", "false");
-  } else {
-    set("alsa-source/has_pnp", "true");
-  }
-  if ($parsed_config{alsa_debug} eq "y") {
-    set("alsa-source/debug", "true");
-  } else {
-    set("alsa-source/debug", "false");
-  }
-} else {
-  if ($debconf_config{cards_to_be_built}) {
-    set("alsa-source/cards_to_be_built", $debconf_config{cards_to_be_built});
-  } else {
-    set("alsa-source/cards_to_be_built", "all");
-  }
-  if ($debconf_config{has_pnp}) {
-    set("alsa-source/has_pnp", $debconf_config{has_pnp});
-  }
-  if ($debconf_config{debug}) {
-    set("alsa-source/debug", $debconf_config{debug});
-  }
-}
-
-input("medium", "alsa-source/has_pnp");
-input("medium", "alsa-source/debug");
-input("medium", "alsa-source/cards_to_be_built");
-go();
+db_input medium alsa-source/has_pnp || true
+db_input medium alsa-source/debug || true
+db_input medium alsa-source/cards_to_be_built || true
+db_go
 
Index: debian/alsa-driver/debian/alsa-source.templates
diff -u debian/alsa-driver/debian/alsa-source.templates:1.2 debian/alsa-driver/debian/alsa-source.templates:1.3
--- debian/alsa-driver/debian/alsa-source.templates:1.2	Tue Aug 26 05:29:18 2003
+++ debian/alsa-driver/debian/alsa-source.templates	Tue Apr 20 15:43:50 2004
@@ -13,7 +13,7 @@
 
 Template: alsa-source/cards_to_be_built
 Type: multiselect
-_Choices: all, ${alsa_modules}
+_Choices: all, ad1816a (ISA: Analog Devices SoundPort AD1816), ad1848 (ISA: Generic AD1848/CS4248), ali5451 (PCI: ALi PCI Audio M5451), als100 (ISA: Avance Logic ALS100), als4000 (PCI: Avance Logic ALS4000), atiixp (PCI: ATI IXP 150/200/250 AC97 controllers), au8810 (PCI: Aureal Advantage), au8820 (PCI: Aureal Vortex), au8830 (PCI: Aureal Vortex 2), azt2320 (ISA: Aztech Systems AZT2320), azt3328 (PCI: Aztech Systems AZF3328), cmi8330 (ISA: C-Media CMI8330), bt87x (PCI: Bt878/Bt879 TV card audio), cmipci (PCI: C-Media 8738 or 8338), cs4231 (ISA: Cirrus Logic CS4231), cs4232 (ISA: Cirrus Logic CS4232), cs4236 (ISA: Cirrus Logic CS4236), cs4281 (PCI: Cirrus Logic CS4281), cs46xx (PCI: Cirrus Logic (Sound Fusion) CS4280/CS461x/CS462x/CS463x), dt019x (ISA: Diamond Technologies DT-0197H), dummy (Dummy (/dev/null) soundcard), emu10k1 (PCI: EMU10K1 (SB Live! or E-mu APS)), ens1370 (PCI: (Creative) Ensoniq AudioPCI 1370), ens1371 (PCI: (Creative) Ensoniq AudioPCI 1371), es1688 (ISA: ESS ES1688), es18xx (ISA: ESS ES18XX), es1938 (PCI: ESS ES1938/1946 (Solo-1)), es1968 (PCI: ESS ES1968/1978 (Maestro-1/2/2E)), es968 (ISA: ESS ES968), fm801 (PCI: ForteMedia FM801), gusclassic (ISA: Gravis UltraSound Classic), gusextreme (ISA: Gravis UltraSound Extreme), gusmax (ISA: Gravis UltraSound MAX), harmony (PCI: Harmony/Vivace sound chip), hdsp (PCI: RME Hammerfall DSP), hdspm (PCI: RME HDSP MADI board), ice1712 (PCI: ICEnsemble ICE1712 (Envy24)), ice1724 (PCI: ICEnsemble ICE1724 / VIA VT1724 (Envy24HT)), intel8x0 (PCI: Intel i810/i820/i830/i840/MX440 integrated audio), intel8x0m (PCI: Intel i8x0 software modem driver), interwave (ISA: InterWave / Gravis UltraSound PnP), interwave-stb (ISA: InterWave + TEA6330T (UltraSound 32-Pro)), korg1212 (PCI: Korg 1212 IO), maestro3 (PCI: ESS Allegro/Maestro3), mixart (PCI: Digigram miXart), mpu401 (ISA: Generic MPU-401 UART), msnd-pinnacle (ISA: Turtle Beach MultiSound Pinnacle), mtpav (ISA: MOTU MidiTimePiece AV multiport MIDI), nm256 (PCI: NeoMagic NM256AV/ZX), opl3sa2 (ISA: Yamaha OPL3-SA2/SA3), opti92x-ad1848 (ISA: OPTi 82C92x - AD1848), opti92x-cs4231 (ISA: Generic AD1848/CS424), opti93x (ISA: OPTi 82C93x), pc98-cs4232 (ISA: PC '98 Cirrus Logic CS4232), pdaudiocf (PCMCIA: Sound Core PDAudioCF), pdplus (PCI: Marian/Sek'D Prodif Plus), powermac (PowerMac), rme32 (PCI: RME Digi32 or 32/8 or 32 PRO), rme96 (PCI: RME Digi96 or 96/8 or 96/8 PRO), rme9652 (PCI: RME Digi9652 (Hammerfall)), sa11xx-uda1341 (ARM iPAQ uda1341), sb16 (ISA: Sound Blaster 16), sb8 (ISA: Sound Blaster 1.0/2.0/Pro), sbawe (ISA: Sound Blaster AWE 32/64), serial-u16550 (ISA: UART16550 - MIDI only), serialmidi (Generic serial MIDI), sgalaxy (ISA: Aztech Sound Galaxy), sonicvibes (PCI: S3 SonicVibes), sscape (ISA: Ensoniq SoundScape PnP), trident (PCI: Trident 4D-Wave DX/NX; SiS 7018), usb-audio (USB: USB Audio), usb-usx2y (USB: Tascam US-122 and US-428), via82xx (PCI: VIA VT8233/82C686A South Bridge), virmidi (Virtual MIDI soundcard), vx222 (PCI: Digigram VX222 V2/Mic), vxpocket (PCMCIA: Digigram VXpocket), vxp440 (PCMCIA: Digigram VXpocket 440), wavefront (ISA: Turtle Beach Maui/Tropez/Tropez+ (Wavefront)), ymfpci (PCI: Yamaha YMF724/740/744/754)
 _Description: Select cards to be built.
  You can choose cards to be built by selecting cards you want. Each
  selection is a same name to a option of configure script '--with-cards'.
Index: debian/alsa-driver/debian/changelog
diff -u debian/alsa-driver/debian/changelog:1.235 debian/alsa-driver/debian/changelog:1.236
--- debian/alsa-driver/debian/changelog:1.235	Sun Apr 18 14:08:37 2004
+++ debian/alsa-driver/debian/changelog	Tue Apr 20 15:43:50 2004
@@ -3,20 +3,40 @@
   * Steve Kowalik:
     - Actually do some work on this package!
     - Check for the presence of either devfs or udev before creating device 
-      nodes. (Closes: #243876)
-    - Add the "patch" to also load OSS modules when udev is being used.
-      (Closes: #240594) (thanks, Markus Hubig)
-    - Apply patch to the init.d script to not contain duplicated code, and to
-      wait one second after loading the modules. (Closes: #237003, #237452)
-      (thanks, Martin Schwenke)
-    - Provide /etc/hotplug/blacklist.d/alsa-base, which lists every OSS 
-      sound module, current as of 2.6.5. (Closes: #238694) (Not Done)
-  * Jordi Mallach:
-    - debian/alsa-base.apm: oopsy, fix nasty typo in the last upload. Thanks
-      Harald Staub (closes: #238994).
-  * Unreleased.
+      nodes in alsa-base's postinst. (Closes: #243876)
+    - Rewrite the init script to not load modules. Loading modules is now 
+      the responsibility of the user, or hotplug.
+      (Closes: #195516, #203491, #210440, #232380, #237003, #237452, #240594)
+      (Closes: #244068)
+    - Stop alsa-base depending on lsof and procps.
+    - Change the description for alsa-base to no longer mention module
+      loading.
+    - Rewrite the debconf-age for alsa-base:
+      + Stop asking which modules to load. (Closes: #199739, #218655)
+      + Only ask one question about saving mixer settings, in the style of
+        setserial.
+      + This means we can stop doing vile things to the debconf templates in
+        debian/rules.
+      + This also means that alsa can restore on bootup, and not save on
+        shutdown. (Closes: #191501, #232854)
+    - Remove the files under /etc/alsa/modutils, and the symlinks
+      into /etc/modprobe.d and /etc/modutils.
+    - Provide an alsa-base file under /etc/modprobe.d and /etc/modutils 
+      which will load the OSS compatibility modules.
+      (Closes: #229486, #240594)
+    - Blacklist (for hotplug) and skip (for discover) the OSS sound modules.
+      Note that we can include the blacklist automatically for hotplug, but
+      discover doesn't contain the infrastructure for that, so the file for 
+      discover is in /usr/share/doc/alsa-base.
+      (Closes: #238278, #238694, #240125, #242720)
+    - Due to the fact that the init script no longer touches modules, this
+      script has been gutted to a shadow of its former self. (Closes: #238994)
+    - Stop using install -d so liberally in debian/rules.
+    - Rename debian/po/no.po to debian/po/nb.po.
+    - Remove debian/alsa-path, I can't see anything at all that references it.
+  * Unreleased and untested.
 
- -- Steve Kowalik <stevenk@debian.org>  Thu, 15 Apr 2004 22:44:04 +1000
+ -- Steve Kowalik <stevenk@debian.org>  Tue, 20 Apr 2004 09:32:32 +1000
 
 alsa-driver (1.0.4-1) unstable; urgency=low
 
Index: debian/alsa-driver/debian/control
diff -u debian/alsa-driver/debian/control:1.30 debian/alsa-driver/debian/control:1.31
--- debian/alsa-driver/debian/control:1.30	Mon Mar 22 04:30:28 2004
+++ debian/alsa-driver/debian/control	Tue Apr 20 15:43:50 2004
@@ -9,7 +9,7 @@
 Package: alsa-base
 Architecture: all
 Replaces: alsa-modules, alsa-base-0.4
-Depends: psmisc, procps, modutils (>= 2.3.5-1) | module-init-tools, debconf, alsa-utils (>= 1.0.2-2), debianutils (>= 1.6), lsof (>= 4.64)
+Depends: psmisc, modutils (>= 2.3.5-1) | module-init-tools, debconf, alsa-utils (>= 1.0.2-2), debianutils (>= 1.6)
 Suggests: apmd (>= 3.0.2-1)
 Conflicts: alsa-base-0.4, alsa-modules, modutils (= 2.3.20-1), alsaconf (<< 0.4.3b-4), lsof-2.2 (<< 4.64)
 Provides: alsa
Index: debian/alsa-driver/debian/rules
diff -u debian/alsa-driver/debian/rules:1.21 debian/alsa-driver/debian/rules:1.22
--- debian/alsa-driver/debian/rules:1.21	Fri Jan 16 05:16:00 2004
+++ debian/alsa-driver/debian/rules	Tue Apr 20 15:43:50 2004
@@ -22,7 +22,7 @@
 		-o -name \*.orig -o -name \*.rej -o -name \*.bak -o -name \
 		.\*.orig -o -name .\*.rej -o -name .SUMS -o -name TAGS \
 		-o -name .\#\* -o -name core -o \( -path \*/.deps/\* -a -name \
-		\*.P \) \) -exec rm -f {} \;
+		\*.P \) \) -exec $(RM) {} \;
 	-$(RM) build-stamp
 	-$(RM) include/isapnp.h
 	-$(RM) debian/*substvars
@@ -40,42 +40,31 @@
 	dh_testdir
 	dh_testroot
 	dh_installdirs
-	install -d -o root -g root -m 755 debian/alsa-headers/usr/include/sound
 	for f in $(shell cat debian/alsa-headers.headers); do \
-		install -p -o root -g root -m 644 alsa-kernel/include/$$f debian/alsa-headers/usr/include/sound/; \
+		install -p -o root -g root -m644 alsa-kernel/include/$$f debian/alsa-headers/usr/include/sound/; \
 	done
-	for i in alsa-base alsa-source ; do \
-		mv debian/$$i.templates debian/$$i.templates.old; \
-		cat debian/$$i.templates.old debian/alsa-common.templates > debian/$$i.templates; \
-	done
-	install $(INSTALL_UAG) -m 755 debian/alsa-base.apm \
+	install $(INSTALL_UAG) -m755 debian/alsa-base.apm \
 		debian/alsa-base/etc/apm/event.d/alsa
-	install $(INSTALL_UAG) -m 755 snddevices \
+	install $(INSTALL_UAG) -m755 snddevices \
 		debian/alsa-base/usr/share/alsa-base/snddevices
-	install $(INSTALL_UAG) -m 644 debian/modules-snippet.conf \
-		debian/alsa-base/usr/share/alsa-base/modules-snippet.conf
-	install $(INSTALL_UAG) -m 644 debian/alsa-base.conf \
+	install $(INSTALL_UAG) -m644 debian/alsa-base.conf \
 		debian/alsa-base/usr/share/alsa-base/alsa-base.conf
-	install $(INSTALL_UAG) -m 644 debian/alsa-source.conf \
+	install $(INSTALL_UAG) -m644 debian/alsa-source.conf \
 		debian/alsa-source/usr/share/alsa-source/alsa-source.conf
-	install $(INSTALL_UAG) -m 644 debian/devfs.conf \
+	install $(INSTALL_UAG) -m644 debian/devfs.conf \
 		debian/alsa-base/etc/devfs/conf.d/alsa
-	install -o root -o root -m 755 debian/program-wrapper \
+	install -o root -o root -m755 debian/program-wrapper \
 		debian/alsa-base/usr/share/alsa-base
-	install -d -m 755 debian/alsa-base/usr/share/lintian/overrides
-	install -d -m 755 debian/alsa-base/usr/share/linda/overrides
-	install -m 644 debian/alsa-base.lintian debian/alsa-base/usr/share/lintian/overrides/alsa-base
-	install -m 644 debian/alsa-base.linda debian/alsa-base/usr/share/linda/overrides/alsa-base
-	dh_installdebconf
-# Hahaha! Now we can undo our great evilness!
-	for i in alsa-base alsa-source ; do \
-		if [ -f debian/$$i.templates.old ]; then \
-			mv debian/$$i.templates.old debian/$$i.templates; \
-		fi; \
+	for i in modutils modprobe.d ; do \
+		install -m644 debian/alsa-base.$$i debian/alsa-base/etc/$$i/alsa-base; \
 	done
+	install debian/alsa-base.hotplug debian/alsa-base/etc/hotplug/blacklist.d/alsa-base
+	for i in linda lintian ; do \
+		install -m644 debian/alsa-base.$$i debian/alsa-base/usr/share/$$i/overrides/alsa-base ; \
+	done
+	dh_installdebconf
 	dh_installdocs
 	mv debian/alsa-source/usr/share/doc/alsa-source/patch-stamp debian/alsa-source/usr/share/doc/alsa-source/PATCHES
-	dh_installexamples 
 	DH_OPTIONS= dh_installinit --no-start -r --init-script=alsa
 	dh_installman
 	dh_installchangelogs 
@@ -90,12 +79,11 @@
 binary-arch:
 
 build-source:
-	mkdir -p $(SRC_DIR)
+	mkdir -p $(SRC_DIR)/debian
 	find . \( -path './debian' -o -name 'CVS' -o -name '.cvsignore'  -o -name '*-stamp' \) -prune -o -print | cpio -admp $(SRC_DIR)
 	-$(MAKE) -C $(SRC_DIR) clean
 	chown -R root:src debian/alsa-source/usr/src
 	# alsa-source/debian/*
-	install -d $(SRC_DIR)/debian
 	install -m755 debian/alsa-source.rules $(SRC_DIR)/debian/rules
 	install -m644 debian/alsa-source.control $(SRC_DIR)/debian/control
 	install -m644 debian/changelog $(SRC_DIR)/debian/changelog
@@ -106,9 +94,9 @@
 	find debian/alsa-source/usr/src/modules -type d -exec chmod 2775 {} \;
 	# As much as I hate automatically generated stuff, automatically generate
 	# files.
+	major_ver="$(shell head -n 1 debian/changelog | cut -d\( -f2 | cut -d\) -f1 | cut -d. -f1-2)"; \
 	for i in post{inst,rm} ; do \
-		major_ver="$(shell head -1 debian/changelog | cut -d\( -f2 | cut -d\) -f1 | cut -d. -f1-2)"; \
-	cat debian/alsa-modules.$$i | sed -e "s/_MAJORVERSION_/$$major_ver/g" > $(SRC_DIR)/debian/$$i; \
+		cat debian/alsa-modules.$$i | sed -e "s/_MAJORVERSION_/$$major_ver/g" > $(SRC_DIR)/debian/$$i; \
 	done
 	# Build the tarball, debian/* mess over.
 	cd debian/alsa-source/usr/src && tar cf alsa-driver.tar modules