--- Begin Message ---
Package: discover
Version: 2.0.7-3
Severity: wishlist
Tags: patch
It would be useful to have a tool in Debian mapping from hardware to
debian packages, allowing the user to automatically install the
packages needed to support special hardware like laptops, DVD players,
RAID controllers, scanners, digital cameras etc.
The changes needed in discover to support this are minimal. One need
to decide which XML structure to use when storing this information,
and then add a script to extract the information. It would be useful
to add code in an udeb to install these packages at install time.
I suggest storing it like this, using the data path
package/debian/name, and the debian version number to handle different
package names in different versions. I'm not sure how to list several
packages if there are more than one relevant package for a given piece
of hardware. Listing several <data class='name' ...> did not work.
<?xml version='1.0' encoding='UTF-8'?>
<device_list bus='pci'>
<device model='2653' vendor='8086' model_name='testmodel'>
<data class='package'>
<data class='debian' version='[3.0, 3.1)'>
<data class='name'>testpackage-woody</data>
</data>
<data class='debian' version='[3.1,inf)'>
<data class='name'>testpackage-sarge</data>
</data>
</data>
</device>
</device_list>
It can then be extracted using a command like this:
/sbin/discover --data-path=package/debian/name --data-version=3.1 all
Here is file to store in scripts/discover-aptinstall, which detect all
relevant packages and install them using aptitude install.
#! /bin/sh
# $Progeny$
# Copyright 2002 Hewlett-Packard Company
# Copyright 2004 Progeny Linux Systems, Inc.
# Copyright 2006 Petter Reinholdtsen
#
# Based on discover-modprobe, modified to install debian packages instead
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
# THE COPYRIGHT HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
# DEALINGS IN THE SOFTWARE.
# Too bad we don't have something like sysexits.h for POSIX sh...
EX_USAGE=64
# These defaults are only used if discover-config can not be found.
# This is the case if /usr isn't mounted yet.
sysconfdir=/etc
localstatedir=/var
discover=discover
types="all"
if [ -x /usr/bin/discover-config ]; then
sysconfdir="$(discover-config --sysconfdir)"
localstatedir="$(discover-config --localstatedir)"
fi
if [ -x /sbin/discover ]; then
discover=/sbin/discover
elif [ -x /usr/bin/discover ]; then
discover=/usr/bin/discover
elif [ -x /bin/discover-static ]; then
discover=/bin/discover-static
fi
conf="${sysconfdir}/discover-aptinstall.conf"
[ -e ${conf} ] && . "${conf}"
usage ()
{
cat <<EOF
usage: $0 [-nv]
EOF
}
###############################################################################
nop=
verbose=false
while getopts nv ch; do
case $ch in
n)
nop=echo
;;
v)
verbose=true
;;
?)
usage
exit ${EX_USAGE}
esac
done
shift $((${OPTIND} - 1))
###############################################################################
${verbose} && printf "Discovering hardware: "
version=3.1 # Debian/sarge
packages=$(${discover} --data-path=package/debian/name \
--data-version=${version} ${types} | grep -E -v '^ *$' | sort -u)
${verbose} && echo ${packages}
$nop aptitude install $packages
exit 0
--- End Message ---
--- Begin Message ---
Source: discover
Source-Version: 2.1.0-1
We believe that the bug you reported is fixed in the latest version of
discover, which is due to be installed in the Debian FTP archive:
discover-udeb_2.1.0-1_i386.udeb
to pool/main/d/discover/discover-udeb_2.1.0-1_i386.udeb
discover_2.1.0-1.diff.gz
to pool/main/d/discover/discover_2.1.0-1.diff.gz
discover_2.1.0-1.dsc
to pool/main/d/discover/discover_2.1.0-1.dsc
discover_2.1.0-1_i386.deb
to pool/main/d/discover/discover_2.1.0-1_i386.deb
discover_2.1.0.orig.tar.gz
to pool/main/d/discover/discover_2.1.0.orig.tar.gz
libdiscover-dev_2.1.0-1_i386.deb
to pool/main/d/discover/libdiscover-dev_2.1.0-1_i386.deb
libdiscover2_2.1.0-1_i386.deb
to pool/main/d/discover/libdiscover2_2.1.0-1_i386.deb
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to 382454@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Petter Reinholdtsen <pere@debian.org> (supplier of updated discover package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Format: 1.7
Date: Fri, 11 Aug 2006 22:21:55 +0200
Source: discover
Binary: discover-udeb libdiscover2 discover libdiscover-dev
Architecture: source i386
Version: 2.1.0-1
Distribution: unstable
Urgency: low
Maintainer: Petter Reinholdtsen <pere@debian.org>
Changed-By: Petter Reinholdtsen <pere@debian.org>
Description:
discover - hardware identification system
discover-udeb - hardware identification system (udeb) (udeb)
libdiscover-dev - hardware identification library development files
libdiscover2 - hardware identification library
Closes: 300906 304923 306169 307125 310944 335322 351381 363025 369598 382454
Changes:
discover (2.1.0-1) unstable; urgency=low
.
[ Otavio Salvador ]
* Remove the externals repositories.
* Add a fresh copy of buildtools, portability and doctools dated
2005-07-16.
* Add debian/update-buildsystem to allow us to sync with Progeny build
system.
* Fix build problem installing the bug script since the directory wasn't
create at build time.
* Cleanup the package building a bit and fix the problem using dh_strip.
* Fix a compiler warning about signess with gcc-4.0.
* Applied patch from Jean Christophe André <progfou@gmail.com> to fix
already loaded module detection. (Closes: #307125)
* Change place to store crashfile on /lib/discover/. (Closes: #306169)
.
[ Petter Reinholdtsen ]
* Convert discover-modprobe (called from init.d script) to use Linux
Software Base functions when present. Add suggest on lsb-base.
* Add support for vendor default entries, to make it possible to
return 'ati' and 'nv' drivers for unrecognized ATI and nVidia
cards. This includes a change to the DTD. Patch from Daniel
Stone and ubuntu.
* Include reportbug helper script to get useful info in bug reports.
.
[ Jeff Licquia ]
* Add a mechanism for the sysdeps to pass information back to
discover, and make that information available for query under
the "device" data node.
.
[ Petter Reinholdtsen ]
* Take over this package from QA.
* Add discover-aptinstall, installing hardware related
debian packages. (Closes: #382454)
* Do not install init.d script, and remove traces of it if present.
It is no longer useful as udev do a much better job based on the
/lib/modules/*/modules.* files provided by the kernel.
This make the boot order irrelevant. (Closes: #310944, #369598, #363025)
* Add LSB info to the init.d script in the source directory, for those
interested in using it. (Closes: #335322)
* Update Standards-Version from 3.6.2to 3.7.2. No changes needed.
* Remove directory /var/state/discover/ if it exist. It haven't
been used since version 1.2-1. (Closes: #304923)
* Teach discover-modprobe to handle modules with names which
are a substring of other module names. Patch from Branden Robinson.
(Closes: #300906)
* Remove vim instructions at the end of debian/changelog to keep lintian
happy.
* Update to use debhelper 4. Add ${misc:Depends} to depends lines.
* Remove all traces of the obsolete cdrom question. (Closes: #351381)
Files:
dfe6c977a4f7bcb96865e30f24cccccf 676 admin optional discover_2.1.0-1.dsc
1b25a36a8984d461fe4a74b5c162ec31 650186 admin optional discover_2.1.0.orig.tar.gz
59796d5036699d6ade08c507327c699b 99207 admin optional discover_2.1.0-1.diff.gz
243bd7d6688793a0588c42daac94bbb8 305384 admin optional discover_2.1.0-1_i386.deb
dff6b58872bd470cda417cce97d67618 98060 libs optional libdiscover2_2.1.0-1_i386.deb
9c47f28219c1f315ca3c7c22bed7e4ef 112406 libdevel optional libdiscover-dev_2.1.0-1_i386.deb
eed71e015c07b61b0dc1263aa60a6bd1 272324 debian-installer extra discover-udeb_2.1.0-1_i386.udeb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
iD8DBQFE3OmM20zMSyow1ykRArrcAJ9R4XCvo80YBUbwU0WEYS0KIxEuPACgsjpx
m6oVEaG9iKLSfsDSbsjo5I4=
=RxIE
-----END PGP SIGNATURE-----
--- End Message ---