diff -Nru isenkram-0.5/debian/changelog isenkram-0.6/debian/changelog --- isenkram-0.5/debian/changelog 2013-06-26 09:21:00.000000000 +0000 +++ isenkram-0.6/debian/changelog 2013-07-18 21:06:33.000000000 +0000 @@ -1,3 +1,20 @@ +isenkram (0.6) unstable; urgency=low + + * Add tasksel task to allow hardware specific packages detected by + isenkram to be installed by tasksel. Install them by default on + new installations when isenkram is installed before tasksel is + executed, and list the option without selecting it by default + after installation. + * Correct isenkram-autoinstall-firmware of the b43 kernel module, + make sure contrib and non-free APT source is added before trying + to install firmware-b43-installer. + * Make isenkram-autoinstall-firmware more robust and able to search + for firmware in packages present in contrib and non-free. + * Propose to install finger print reading packages fprintd, + fprintd-demo and libpam-fprintd for USB device 147E:2020. + + -- Petter Reinholdtsen Thu, 18 Jul 2013 23:04:04 +0200 + isenkram (0.5) unstable; urgency=low * Rebuild package in unstable to get the python dependencies right diff -Nru isenkram-0.5/debian/isenkram.install isenkram-0.6/debian/isenkram.install --- isenkram-0.5/debian/isenkram.install 2013-06-25 09:02:53.000000000 +0000 +++ isenkram-0.6/debian/isenkram.install 2013-07-18 21:06:33.000000000 +0000 @@ -1,4 +1,7 @@ isenkramd usr/bin +isenkram-lookup usr/bin isenkramd.desktop usr/share/applications modaliases usr/share/isenkram isenkram-autoinstall-firmware usr/sbin +tasksel/packages/for-current-hardware usr/lib/tasksel/packages +tasksel/descs/isenkram.desc usr/share/tasksel/descs diff -Nru isenkram-0.5/isenkram/lookup.py isenkram-0.6/isenkram/lookup.py --- isenkram-0.5/isenkram/lookup.py 2013-04-07 05:14:15.000000000 +0000 +++ isenkram-0.6/isenkram/lookup.py 2013-07-18 21:06:33.000000000 +0000 @@ -124,10 +124,10 @@ return thepkgs.keys() def main(): - hwaliases = my_modaliases() - if 1 < len(sys.argv): hwaliases = sys.argv[1:] + else: + hwaliases = my_modaliases() print "Locating packages supporting this hardware (extra, svn/local):" for pkg in sorted(pkgs_handling_extra_modaliases(hwaliases)): diff -Nru isenkram-0.5/isenkram-autoinstall-firmware isenkram-0.6/isenkram-autoinstall-firmware --- isenkram-0.5/isenkram-autoinstall-firmware 2013-06-25 09:02:53.000000000 +0000 +++ isenkram-0.6/isenkram-autoinstall-firmware 2013-07-18 21:06:33.000000000 +0000 @@ -6,12 +6,17 @@ # This script was copied from auto-addfirmware from the debian-edu-config # package. -tmpdir=$(mktemp -d) -cd $tmpdir || exit 1 - dist=$(lsb_release -cs) arch=$(dpkg --print-architecture) mirror=http://http.debian.net/debian +aptsourcelist=/etc/apt/sources.list.d/isenkram-autoinstall-firmware.list + +add_contrib_nonfree() { + cat < $aptsourcelist +deb $mirror $dist contrib non-free +deb-src $mirror $dist contrib non-free +EOF +} # 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 @@ -22,26 +27,41 @@ if [ -z "$fwfiles" ] ; then echo "info: did not find any firmware files requested by loaded kernel modules. exiting" - exit + exit 1 fi echo "info: kernel drivers requested extra firmware:" $fwfiles +tmpdir=$(mktemp -d) +cd $tmpdir || exit 1 -url="$mirror/dists/$dist/Contents-$arch.gz" -echo "info: fetching $url" -GET $url | gunzip | grep ^lib/firmware > Fw-Contents-$arch +cleanup() { + cd / + rm -rf $tmpdir +} + +# "" is main in Wheezy. +for section in "" "contrib" "non-free"; do + if [ -z "$section" ] ; then + url="$mirror/dists/$dist/Contents-$arch.gz" + else + url="$mirror/dists/$dist/$section/Contents-$arch.gz" + fi + echo "info: fetching $url" + GET $url | gunzip | grep ^lib/firmware > Fw-Contents-$arch$section +done echo "info: 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)" + 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 @@ -55,16 +75,16 @@ echo $binpkginfo | while IFS=/ read section srcpkg binpkg ; do echo $binpkg # Enable the non-free section if it is needed - if [ non-free = "$section" ] ; then - cat < /etc/apt/sources.list.d/isenkram-autoinstall-firmware.list -deb $mirror $dist non-free -deb-src $mirror $dist non-free -EOF + 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 /etc/apt/sources.list.d/isenkram-autoinstall-firmware.list ] ; then +if [ -e $aptsourcelist ] ; then # Fetch updated package lists echo "info: Updating APT sources after adding non-free APT source" apt-get -qq update @@ -77,5 +97,4 @@ else echo "info: No new firmware package with requested firmware detected." fi -cd / -rm -rf $tmpdir +cleanup diff -Nru isenkram-0.5/isenkram-lookup isenkram-0.6/isenkram-lookup --- isenkram-0.5/isenkram-lookup 2013-04-07 05:14:15.000000000 +0000 +++ isenkram-0.6/isenkram-lookup 2013-07-18 21:06:33.000000000 +0000 @@ -1,99 +1,32 @@ -#!/bin/sh +#!/usr/bin/python +# Copyright (C) 2013 Petter Reinholdtsen # -# Look up modalias in package-modalias mapping file(s), and report the -# matching packages. +# Licensed under the GNU General Public License Version 2 # -# If no argument is given, look up all modalias entries found in /sys/devices. -# If an argument is given, look up the modalias given on th command -# line. - -set -e - -ubuntu_lists() { - ubmirror=http://ftp.uninett.no/ubuntu - suite=raring - arch=i386 - for section in main restricted multiverse universe - do - GET $ubmirror/dists/$suite/$section/binary-$arch/Packages.bz2 | bunzip2 - done -} - -debian_lists() { - mirror=http://http.debian.net/debian - suite=sid - arch=i386 - for section in main contrib non-free - do - GET $mirror/dists/$suite/$section/binary-$arch/Packages.bz2 | bunzip2 - done - echo $scriptdir - if [ -r $scriptdir/modaliases ] ; then cat $scriptdir/modaliases; fi - if [ -r /usr/share/isenkram/modaliases ] ; then - cat /usr/share/isenkram/modaliases - fi - GET 'http://anonscm.debian.org/gitweb/?p=collab-maint/isenkram.git;a=blob_plain;f=modaliases;hb=HEAD' -} - -trim_packages() { - grep -E '^Package: |^Modaliases: |^$' \ - | tr "\n" "#" \ - | sed "s/##/\n/g" \ - | grep -E 'Modaliases: ' \ - | tr "\n" "%" | sed "s/%/\n\n/g" \ - | tr "#" "\n" -} - -# To generate a list of packages -#debian_lists | trim_packages -#exit 0 - -get_lists() { - #ubuntu_lists - debian_lists -} - -# Make sure file names do not contain slash by mapping % -> %25 and / -> %2F -escape() { - sed -e 's:%:%25:g' -e 's:/:%2F:g' -} - -pkglookup() { - while read package modaliases ; do - for alias in $(echo $modaliases | tr ")" "\n" | cut -d"(" -f2 | sed "s/, /\n/g" | escape); do -# echo "$package $alias" 1>&2 - if ls "$alias" >/dev/null 2>&1 ; then - echo $package - fi - done - done | sort -u -} - -scriptdir=$(cd $(dirname $0); pwd) - -dir=$(mktemp -d) -cd $dir - -# First, find all relevant modalias entries for the current machine, -# and create a file with the alias name. -if [ "$1" ] ; then - touch "$*" -else - for id in $(find /sys/devices -name modalias -print0 | xargs -0 cat | egrep '^(usb|pci|acpi|dmi):' | sort -u | escape ); do - touch "$id" - done -fi - -# Next, extract package name and modalias glob list, and look up -# packages using shell globbing to match the current systems hardware. -get_lists \ - | grep -E '^Package: |^Modaliases: |^$' \ - | tr "\n" "#" \ - | sed "s/##/\n/g" \ - | tr "#" " " \ - | grep Modaliases: \ - | sed -e 's/^Package: //' -e 's/ Modaliases: / /g' \ - | pkglookup +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +__author__ = "Petter Reinholdtsen " + +import isenkram.lookup + +def main(): + hwaliases = isenkram.lookup.my_modaliases() + pkgs = isenkram.lookup.pkgs_handling_extra_modaliases(hwaliases) + pkgs.extend(isenkram.lookup.pkgs_handling_apt_modaliases(hwaliases)) + for pkg in sorted(pkgs): + print "%s" % pkg -cd / -rm -rf $dir +if __name__ == '__main__': + main() diff -Nru isenkram-0.5/modaliases isenkram-0.6/modaliases --- isenkram-0.5/modaliases 2013-06-25 09:02:53.000000000 +0000 +++ isenkram-0.6/modaliases 2013-07-18 21:06:33.000000000 +0000 @@ -31,6 +31,12 @@ Package: firmware-ipw2x00 Modaliases: unused(pci:v00008086d00004224sv*sd*bc*sc*i*, pci:v00008086d00004223sv*sd*bc*sc*i*, pci:v00008086d00004221sv*sd*bc*sc*i*, pci:v00008086d00004220sv*sd*bc*sc*i*, pci:v00008086d0000104Fsv*sd*bc*sc*i*, pci:v00008086d00001043sv00008086sd00002762bc*sc*i*, pci:v00008086d00001043sv00008086sd00002761bc*sc*i*, pci:v00008086d00001043sv00008086sd00002754bc*sc*i*, pci:v00008086d00001043sv00008086sd00002753bc*sc*i*, pci:v00008086d00001043sv00008086sd00002752bc*sc*i*, pci:v00008086d00001043sv00008086sd00002751bc*sc*i*, pci:v00008086d00001043sv00008086sd00002742bc*sc*i*, pci:v00008086d00001043sv0000103Csd00002741bc*sc*i*, pci:v00008086d00001043sv00008086sd00002741bc*sc*i*, pci:v00008086d00001043sv00008086sd00002732bc*sc*i*, pci:v00008086d00001043sv00008086sd00002731bc*sc*i*, pci:v00008086d00001043sv00008086sd00002722bc*sc*i*, pci:v00008086d00001043sv00008086sd00002721bc*sc*i*, pci:v00008086d00001043sv00008086sd00002712bc*sc*i*, pci:v00008086d00001043sv00008086sd00002711bc*sc*i*, pci:v00008086d00001043sv00008086sd00002702bc*sc*i*, pci:v00008086d00001043sv00008086sd00002701bc*sc*i*) +Package: fprintd +Modaliases: unused(usb:v147Ep2020d*) + +Package: fprintd-demo +Modaliases: unused(usb:v147Ep2020d*) + Package: gkrellm-thinkbat Modaliases: unused(dmi:*:pn*:pvrThinkPad*:rvn*) @@ -70,6 +76,9 @@ Package: kde-config-tablet Modaliases: unused(lkmodule:wacom) +Package: libpam-fprintd +Modaliases: unused(usb:v147Ep2020d*) + Package: mkgmap Modaliases: unused(usb:v091Ep0003d*) diff -Nru isenkram-0.5/tasksel/descs/isenkram.desc isenkram-0.6/tasksel/descs/isenkram.desc --- isenkram-0.5/tasksel/descs/isenkram.desc 1970-01-01 00:00:00.000000000 +0000 +++ isenkram-0.6/tasksel/descs/isenkram.desc 2013-07-18 21:06:33.000000000 +0000 @@ -0,0 +1,8 @@ +Task: isenkram +Section: hardware +Description: Hardware specific packages (autodetected by isenkram) + Based on the detected hardware various hardware specific packages are + proposed. +Test-new-install: mark show +Relevance: 8 +Packages: for-current-hardware diff -Nru isenkram-0.5/tasksel/packages/for-current-hardware isenkram-0.6/tasksel/packages/for-current-hardware --- isenkram-0.5/tasksel/packages/for-current-hardware 1970-01-01 00:00:00.000000000 +0000 +++ isenkram-0.6/tasksel/packages/for-current-hardware 2013-07-18 21:06:33.000000000 +0000 @@ -0,0 +1,3 @@ +#!/bin/sh +# +isenkram-lookup