[debian-edu-commits] debian-edu/ 01/01: Drop our redundant auto-addfirmware script and use the equivalent isenkram-autoinstall-firmware from the isenkram-cli package instead.

Petter Reinholdtsen pere at moszumanska.debian.org
Tue Oct 14 08:57:41 UTC 2014


This is an automated email from the git hooks/post-receive script.

pere pushed a commit to branch master
in repository debian-edu-config.

commit ab2ffa9c519203396d2616230da993f87a288fd2
Author: Petter Reinholdtsen <pere at hungry.com>
Date:   Tue Oct 14 10:57:36 2014 +0200

    Drop our redundant auto-addfirmware script and use the equivalent isenkram-autoinstall-firmware from the isenkram-cli package instead.
---
 Makefile                                       |   1 -
 debian/changelog                               |   6 +-
 debian/control                                 |   1 +
 sbin/debian-edu-hwsetup                        |   2 +-
 share/debian-edu-config/tools/auto-addfirmware | 115 -------------------------
 5 files changed, 4 insertions(+), 121 deletions(-)

diff --git a/Makefile b/Makefile
index 72bf74a..c66a891 100644
--- a/Makefile
+++ b/Makefile
@@ -348,7 +348,6 @@ install: install-testsuite
 	set -e ; for f in \
 		share/debian-edu-config/d-i/finish-install \
 		share/debian-edu-config/d-i/pre-pkgsel \
-		share/debian-edu-config/tools/auto-addfirmware \
 		share/debian-edu-config/tools/passwd \
 		share/debian-edu-config/tools/cups-queue-autoflush \
 		share/debian-edu-config/tools/cups-queue-autoreenable \
diff --git a/debian/changelog b/debian/changelog
index f92ec72..61e0714 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -50,10 +50,8 @@ debian-edu-config (1.810) UNRELEASED; urgency=high
     that the DNS server name is hardcoded.
   * Adjust cf.squid, make sure to run squid-update-cachedir on the
     squid3 config file.
-  * Extend auto-addfirmware to also look in dmesg for requested
-    firmware.
-  * Correct URL selection logic in isenkram-autoinstall-firmware to also
-    handle the main repo for non-Wheezy installation.
+  * Drop our redundant auto-addfirmware script and use the equivalent
+    isenkram-autoinstall-firmware from the isenkram-cli package instead.
 
   [ Holger Levsen ]
   * debian/rules: Convert to dh9 style rules.
diff --git a/debian/control b/debian/control
index 1eef9fa..e1365ff 100644
--- a/debian/control
+++ b/debian/control
@@ -58,6 +58,7 @@ Depends: ${misc:Depends}
  , uuid
  , swaks
  , libpam-python
+ , isenkram-cli
 Recommends: resolvconf, ddccontrol | xresprobe, syslinux, memtest86+, libnotify-bin, lsof, binutils
 Suggests: atftpd | tftpd-hpa
 Breaks: nslcd (<< 0.7.7), dhcp3-client (<< 4.1.1-P1-9), dhcp3-server (<< 4.1.1-P1-9), slapd (<< 2.4.23-5), debian-edu-install (<< 1.521~svn74617)
diff --git a/sbin/debian-edu-hwsetup b/sbin/debian-edu-hwsetup
index 5e1aae1..95647f6 100755
--- a/sbin/debian-edu-hwsetup
+++ b/sbin/debian-edu-hwsetup
@@ -93,4 +93,4 @@ case "$manufacturer" in
 esac
 
 # Autodetect firmware packages and install them
-/usr/share/debian-edu-config/tools/auto-addfirmware
+isenkram-autoinstall-firmware
diff --git a/share/debian-edu-config/tools/auto-addfirmware b/share/debian-edu-config/tools/auto-addfirmware
deleted file mode 100644
index b85f2f5..0000000
--- a/share/debian-edu-config/tools/auto-addfirmware
+++ /dev/null
@@ -1,115 +0,0 @@
-#!/bin/sh
-#
-# Find missing firmware files requested by the kernel, and install the
-# binary packages with the files from the non-free section.
-
-dist=$(debian-edu-current-codename)
-arch=$(dpkg --print-architecture)
-mirror=http://http.debian.net/debian
-aptsourcelist=/etc/apt/sources.list.d/auto-addfirmware.list
-
-loginfo() {
-    echo "info: $@" 1>&2
-}
-
-add_contrib_nonfree() {
-    cat <<EOF > $aptsourcelist
-deb $mirror $dist contrib non-free
-deb-src $mirror $dist contrib non-free
-EOF
-    chmod a+r $aptsourcelist
-}
-
-# Find firmware files requested by loaded kernel drivers.
-for fwfile in $(for module in $(awk '{print $1}' /proc/modules) ; do modinfo $module 2>/dev/null |awk '/^firmware:/ {print $2}'; done|sort -u); do
-    if [ ! -e /lib/firmware/$fwfile ] ; then
-	fwfiles="${fwfiles:+$fwfiles }$fwfile"
-    fi
-done
-
-# Also look in dmesg for requested firmware for modules that refuse to
-# load without their firmware.  See also bug #725714.
-for fwfile in $(dmesg | grep 'firmware: failed' | sed 's/.*firmware: failed to load //' | cut -d" " -f1); do
-    loginfo "looking for firmware file $fwfile requested by kernel"
-    if [ ! -e /lib/firmware/$fwfile ] ; then
-        fwfiles="${fwfiles:+$fwfiles }$fwfile"
-    fi
-done
-
-if [ -z "$fwfiles" ] ; then
-    loginfo "did not find any firmware files requested by loaded kernel modules.  exiting"
-    exit 1
-fi
-loginfo "some kernel driver requested extra firmware files:" $fwfiles
-
-tmpdir=$(mktemp -d)
-cd $tmpdir || exit 1
-
-cleanup() {
-    cd /
-    rm -rf $tmpdir
-}
-
-for section in "main" "contrib" "non-free"; do
-    # "" is main in Wheezy.
-    if [  main = "$section" ] && [ wheezy = "$dist" ]; then
-	url="$mirror/dists/$dist/Contents-$arch.gz"
-    else
-	url="$mirror/dists/$dist/$section/Contents-$arch.gz"
-    fi
-    loginfo "fetching $url"
-    GET $url | gunzip | grep ^lib/firmware > Fw-Contents-$arch$section
-done
-
-loginfo "locating packages with the requested firmware files"
-binpkginfos=""
-binpkgs=""
-for fwfile in $fwfiles ; do
-    fwfilere=$(echo $fwfile | sed -e 's%/%\\/%g' -e 's/\./\\./g')
-    binpkginfo="$(awk "/^lib\/firmware\/$fwfilere/ {print \$2}" Fw-Contents-$arch*)"
-    if [ -z "$binpkginfo" ] ; then
-	# Special case for b43 where the firmware is undistributable
-	# by Debian.
-	case "$fwfile" in
-	    b43/*)
-		add_contrib_nonfree
-		binpkgs="${binpkgs:+$binpkgs }firmware-b43-installer"
-		;;
-	esac
-    else
-	binpkginfos="$binpkginfos $binpkginfo"
-    fi
-done
-
-binpkgs="${binpkgs:+$binpkgs }$(
-for binpkginfo in $binpkginfos ; do
-    echo $binpkginfo |  while IFS=/ read section srcpkg binpkg ; do
-        echo $binpkg
-# Enable the non-free section if it is needed
-	if LC_ALL=C apt-cache show $binpkg 2>&1 | \
-               grep -q 'E: No packages found' \
-           && ( [ non-free = "$section" ] \
-               || [ contrib = "$section" ] ) ; then 
-	    add_contrib_nonfree
-	fi
-    done
-done)"
-
-if [ -e $aptsourcelist ] ; then
-    # Fetch updated package lists
-    loginfo "Updating APT sources after adding non-free APT source"
-    apt-get -qq update
-fi
-
-if [ "$binpkgs" ] ; then
-    if [ "-l" = "$1" ] ; then
-	echo $binpkgs | tr " " "\n"
-    else
-        # Install firmware packages
-	loginfo "trying to install $binpkgs"
-	apt-get -qq install -y $binpkgs
-    fi
-else
-    loginfo "No new firmware package with requested firmware detected."
-fi
-cleanup

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-edu/debian-edu-config.git



More information about the debian-edu-commits mailing list