isenkram-0.6/0000755000000000000000000000000012172056143010057 5ustar isenkram-0.6/tasksel/0000755000000000000000000000000012172054331011522 5ustar isenkram-0.6/tasksel/packages/0000755000000000000000000000000012172054331013300 5ustar isenkram-0.6/tasksel/packages/for-current-hardware0000755000000000000000000000003412172054331017264 0ustar #!/bin/sh # isenkram-lookup isenkram-0.6/tasksel/descs/0000755000000000000000000000000012172054331012623 5ustar isenkram-0.6/tasksel/descs/isenkram.desc0000644000000000000000000000037612172054331015302 0ustar 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 isenkram-0.6/isenkram-autoinstall-firmware0000755000000000000000000000543312172054331015767 0ustar #!/bin/sh # # Find missing firmware files requested by the kernel, and install the # binary packages with the files from the non-free section. # # This script was copied from auto-addfirmware from the debian-edu-config # package. 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 if [ ! -e /lib/firmware/$fwfile ] ; then fwfiles="${fwfiles:+$fwfiles }$fwfile" fi done if [ -z "$fwfiles" ] ; then echo "info: did not find any firmware files requested by loaded kernel modules. exiting" exit 1 fi echo "info: kernel drivers requested extra firmware:" $fwfiles tmpdir=$(mktemp -d) cd $tmpdir || exit 1 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*)" 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 echo "info: Updating APT sources after adding non-free APT source" apt-get -qq update fi if [ "$binpkgs" ] ; then # Install firmware packages echo "info: trying to install $binpkgs" apt-get -qq install -y $binpkgs else echo "info: No new firmware package with requested firmware detected." fi cleanup isenkram-0.6/Contributors0000644000000000000000000000011612172054331012472 0ustar Petter Reinholdtsen pere (at) hungry.com Helmut Grohne helmut (at) subdivi.de isenkram-0.6/setup.py0000755000000000000000000000055512172054331011576 0ustar from distutils.core import setup setup(name='Isenkram', version='0.1', description="Suggest packages to install when inserting new hardware", author="Petter Reinholdtsen", author_email="pere@hungry.com", url='http://anonscm.debian.org/gitweb/?p=collab-maint/isenkram.git', packages = ['isenkram', ], license='GPL', ) isenkram-0.6/NOTES0000644000000000000000000002164212172054331010674 0ustar Make it easier to get pluggable hardware working in Debian ========================================================== Imagine you just bought yourself ColorHug[1] or a LEGO Mindstorms NXT[2], and you plug it into your trusty old Debian computer to test it, but nothing happen. There is no meny option to use it, and no feedback from the system on what is missing. Despite the fact that the software to use these dongles are present in Debian and only a short 'apt-get install' away, there is no automatic way to let the user know about this. 1) 2) Ubuntu got Jockey to handle these things, and Mandriva got Harddrake, but there is nothing in Debian to implement this yet. But neither the Ubuntu nor Mandriva solution handle many hot-pluggable devices. They mostly focus on video and wireless network cards, required to get the machine working, not the vast collection of fun and useful packages in Debian for the Arduino, the Mark And Spenser Rocket Launcer, the Yubikey or the Simtec entropyKey. This is an area where Debian can do better. :) To rectify this, I propose to implement a system to let the user know what to install and make it easy to install it. The idea is simple: 1) Listen for notifications when new hardware is plugged in (dbus, kernel events, something?) dbus events can be fetched when hal is installed using 'dbus-montor --system' udev kernel events can be fetched from the kernel using "/sbin/udevadm monitor --kernel --environment" 2) For new hardware, look up which packages include drivers/support software. 3a)Show dialog to the user proposing to install the packages. or 3b)Show desktop notification suggesting to install package. 4) Install requested packages. The machanism used to install packages can be PackageKit or something else. How many packages are hardware dependent? ----------------------------------------- It is hard to guess. One way to measure it is to see how many packages provide udev rules, as these probably affect hardware devices. For example using apt-file in unstable 2013-01-12 give this result: % apt-file search /lib/udev/rules.d|cut -d: -f1|sort -u|wc -l 136 % Another is to look at Ubuntu, and how many packages have a Modaliases entry in the Packages files. For Ubuntu Quantal it is around 25 packages. The discover based implementation --------------------------------- The discover package and data format support mapping PCI and USB devices to anything, and have been used in the past to map to XFree86 package, kernel module and debian package. The last feature is used here to figure out what package to install. The discover-pkginstall script is used to figure out what package support the current hardware set. To add a new mapping, an entry like this need to be added in the discover-data package. For an USB device, this block would go into the usb-device.xml file: pymissile 2013-01-09 pere@hungry.com This system have the advantage of working without any help from package maintainers or the FTP masters in Debian (which could help inject Modaliases headers to the Packages files if the packages themselves lack the information). It is also easier to backport, as there is only one or two packages (discover-data and discover) that need to change. But it has a disadvange of being centrally controlled, and thus harder for most people in Debian to add mapping for new hardware. The Ubuntu modalias based implementation ---------------------------------------- The Ubuntu approach is to add a new header binary package Modaliases in debian/control, listing the PCI or USB device IDs (aka modalias) handled by a given package. The design is based on how modprobe and the kernel work on Linux. The entries look like this: Modaliases: module(:, :) The bus:alias-specification is compared with the content of /sys//bus/devices/*/modalias using file globbing rules, and the matching packages are proposed to the user. Here is an example from Ubuntu Universe: Package: virtualbox-guest-dkms Modaliases: vboxguest(pci:v000080EEd0000CAFEsv00000000sd00000000bc*sc*i*) Users with machines including a device with the PCI vendor ID 08EE and model ID CAVE subvendor ID 0 and subdevice 0 will get a suggestion to install the virtualbox-guest-dkms package in Ubuntu. The module part is either a kernel module name or a string useful to identify the driver. This mechanism allow us to match packages not only to USB or PCI IDs, but DMI and ACPI information. My old Thinkpad have this entry in /sys/devices/virtual/dmi/id/modalias: dmi:bvnIBM:bvr1UETB6WW(1.66):bd06/15/2005:svnIBM:pn2371H4G:pvrThinkPadX40:rvnIBM:rn2371H4G:rvrNotAvailable:cvnIBM:ct10:cvrNotAvailable: Thus the same mechanism can be used to match packages to specific laptop models as long as ACPI or DMI information can be used to identify them. The complete list if relevant modalias entries for a given machine can be found using cat $(find /sys -name modalias) | sort -u Kernel modules include modalias matching rules to report which hardware they support, and modprobe can be used to list the relevant modules. Here is an example from my laptop % /sbin/modprobe --show-depends acpi:IBM0071:PNP0511: insmod /lib/modules/2.6.32-5-686/kernel/lib/crc-ccitt.ko insmod /lib/modules/2.6.32-5-686/kernel/net/irda/irda.ko insmod /lib/modules/2.6.32-5-686/kernel/drivers/net/irda/nsc-ircc.ko % The lowlevel handling in Ubuntu is provided in ubuntu-drivers-common[3] and the GUI is implemented in jockey[4]. 3) 4) The same mechanism should work for Debian too, and seem to be generic enough for any PCI and USB specific package. Information about the modalias values are available from and blueprints for the Ubuntu implementation can be found at and . This system could be used directly by debian-installer to figure out what packages to install, as the Packages file is available for parsing there. It will work for both deb and udeb packages. It will make the Packages file slightly larger. Based on counts from Ubuntu Quantal (around 25 packages) and the current discover-data info (12 USB related packages, not sure about the PCI related packages), it will probably affect less than 100 packages in the Debian archive. The Madriva implementation -------------------------- I am told that Mandriva will suggest which packages to install when a printer is plugged in. I am not quite sure how this is done, but I believe the Harddrake system is involved. Debian DEP-11 proposal ---------------------- Part of the DEP-11 proposal is a suggestion to add mappings from packages to USB and PCI devices in a new file in the Debian archive. The details are available from . The current proposal seem to have too few features to beat the Ubuntu implementation. The two fields for USB and PCI IDs will not be able to match an entire subclass of packages, nor a range of IDs without listing each ID. https://launchpad.net/ubuntu/natty/+source/jockey/+changelog PackageKit API -------------- I belive there are two packages in Debian providing the PackageKit API. One is packagekit, the other is aptdaemon. The PackageKit API provide a mechanism to look up a modalias and get a list of packages back. It can also look up MIME types, fonts etc. DEP-11 is a proposal to provide the information required for this to work. http://wiki.debian.org/PackageKit/ItemNotFound http://gitorious.org/packagekit/packagekit/blobs/master/docs/provides-component-naming.txt Debtags proposal ---------------- It would be possible to use debtags to map USB/PCI ids to packages. A tag like hardware::usb::1d6b:0001 for packages handling the USB device with vendor ID 1d6b and model ID 0001, and hardware::pci::8086:1077 for packages handling the PCI device with vendor ID 8086 and model ID 1077. A proposal was sent to the debtags-devel mailing list[5] but did not receive any positive feedback. This have is not as flexible as the Modaliases proposal and will fill the debtags database with information that perhaps do not belong there. 5) There is a similar project in Fedora[6]. 6) isenkram-0.6/TODO0000644000000000000000000000064312172054331010547 0ustar A few things to fix with isenkram - improve error handling - get rid of memory leaks in isenkramd. memory footprint raises after first popup. - reduse memory usage of isenkramd. - make sure isenkramd only suggest to install packages that exist. - show more end user friendly names of devices fetched from usb.ids and pci.ids. - decide better timeouts for the notification and the installation request. isenkram-0.6/modalias-format.txt0000644000000000000000000001451712172054331013704 0ustar Modalias decoded ================ This document try to explain what the different types of modalias values stands for. It is in part based on information from , , and . The modalias entries for a given Linux machine can be found using this shell script: cat $(find /sys/devices -name modalias) | sort -u The supported modalias globs for a given kernel module can be found using modinfo: % /sbin/modinfo psmouse | grep alias: alias: serio:ty05pr*id*ex* alias: serio:ty01pr*id*ex* % PCI subtype ----------- A typical PCI entry can look like this. This is an Intel Host Bridge memory controller: pci:v00008086d00002770sv00001028sd000001ADbc06sc00i00 This represent these values: v 00008086 (vendor) d 00002770 (device) sv 00001028 (subvendor) sd 000001AD (subdevice) bc 06 (bus class) sc 00 (bus subclass) i 00 (interface) The vendor/device values are the same values outputted from 'lspci -n' as 8086:2770. The bus class/subclass is also shown by lspci as 0600. The 0600 class is a host bridge. Other useful bus values are 0300 (VGA compatible card) and 0200 (Ethernet controller). Not sure how to figure out the interface value, nor what it means. USB subtype ----------- Some typical USB entries can look like this. This is an internal USB hub in a laptop: usb:v1D6Bp0001d0206dc09dsc00dp00ic09isc00ip00 Here is the values included in this alias: v 1D6B (device vendor) p 0001 (device product) d 0206 (bcddevice) dc 09 (device class) dsc 00 (device subclass) dp 00 (device protocol) ic 09 (interface class) isc 00 (interface subclass) ip 00 (interface protocol) The 0900 device class/subclass means hub. Some times the relevant class is in the interface class section. For a simple USB web camera, these alias entries show up: usb:v0AC8p3420d5000dcEFdsc02dp01ic01isc01ip00 usb:v0AC8p3420d5000dcEFdsc02dp01ic01isc02ip00 usb:v0AC8p3420d5000dcEFdsc02dp01ic0Eisc01ip00 usb:v0AC8p3420d5000dcEFdsc02dp01ic0Eisc02ip00 Interface class 0E01 is video control, 0E02 is video streaming (aka camera), 0101 is audio control device and 0102 is audio streaming (aka microphone). Thus this is a camera with microphone included. Here are some USB device and interface classes. The complete list can be found at : 01XX Audio 07XX Printer 09XX HUB 0Bxx Chip/SmartCard 0EXX Video E0XX Wireless EFXX Miscellaneous Device ACPI subtype ------------ The ACPI type is used for several non-PCI/USB stuff. This is an IR receiver in a Thinkpad X40: acpi:IBM0071:PNP0511: The values between the colons are IDs. DMI subtype ----------- The DMI table contain lots of information about the computer case and model. This is an entry for a IBM Thinkpad X40, fetched from /sys/devices/virtual/dmi/id/modalias: dmi:bvnIBM:bvr1UETB6WW(1.66):bd06/15/2005:svnIBM:pn2371H4G:pvrThinkPadX40:rvnIBM:rn2371H4G:rvrNotAvailable:cvnIBM:ct10:cvrNotAvailable: The values present are bvn IBM (BIOS vendor) bvr 1UETB6WW(1.66) (BIOS version) bd 06/15/2005 (BIOS date) svn IBM (system vendor) pn 2371H4G (product name) pvr ThinkPadX40 (product version) rvn IBM (board vendor) rn 2371H4G (board name) rvr NotAvailable (board version) cvn IBM (chassis vendor) ct 10 (chassis type) cvr NotAvailable (chassis version) The chassis type 10 is Notebook. Other interesting values can be found in the dmidecode source: 3 Desktop 4 Low Profile Desktop 5 Pizza Box 6 Mini Tower 7 Tower 8 Portable 9 Laptop 10 Notebook 11 Hand Held 12 Docking Station 13 All In One 14 Sub Notebook 15 Space-saving 16 Lunch Box 17 Main Server Chassis 18 Expansion Chassis 19 Sub Chassis 20 Bus Expansion Chassis 21 Peripheral Chassis 22 RAID Chassis 23 Rack Mount Chassis 24 Sealed-case PC 25 Multi-system 26 CompactPCI 27 AdvancedTCA 28 Blade 29 Blade Enclosing The chassis type values are not always accurately set in the DMI table. For example my home server is a tower, but the DMI modalias claim it is a desktop. SerIO subtype ------------- This type is used for PS/2 mouse plugs. One example is from my test machine: serio:ty01pr00id00ex00 The values present are ty 01 (type) pr 00 (prototype) id 00 (id) ex 00 (extra) This type is supported by the psmouse driver. I am not sure what the valid values are. Other subtypes -------------- There are heaps of other modalias subtypes according to file2alias.c. There is the rest of the list from that source: amba, ap, bcma, ccw, css, eisa, hid, i2c, ieee1394, input, ipack, isapnp, mdio, of, parisc, pcmcia, platform, scsi, sdio, spi, ssb, vio, virtio, vmbus, x86cpu and zorro. I did not spend time documenting all of these, as they do not seem relevant for my intended use with mapping hardware to packages when new stuff is inserted during run time. Looking up kernel modules using modalias values ----------------------------------------------- To check which kernel modules provide support for a given modalias, one can use the following shell script: for id in $(cat $(find /sys -name modalias)|sort -u); do \ echo "$id" ; \ /sbin/modprobe --show-depends "$id"|sed 's/^/ /' ; \ done The output can look like this (only the first few entries as the list is very long on my test machine): acpi:ACPI0003: insmod /lib/modules/2.6.32-5-686/kernel/drivers/acpi/ac.ko acpi:device: FATAL: Module acpi:device: not found. acpi:IBM0068: insmod /lib/modules/2.6.32-5-686/kernel/drivers/char/nvram.ko insmod /lib/modules/2.6.32-5-686/kernel/drivers/leds/led-class.ko insmod /lib/modules/2.6.32-5-686/kernel/net/rfkill/rfkill.ko insmod /lib/modules/2.6.32-5-686/kernel/drivers/platform/x86/thinkpad_acpi.ko acpi:IBM0071:PNP0511: insmod /lib/modules/2.6.32-5-686/kernel/lib/crc-ccitt.ko insmod /lib/modules/2.6.32-5-686/kernel/net/irda/irda.ko insmod /lib/modules/2.6.32-5-686/kernel/drivers/net/irda/nsc-ircc.ko [...] isenkram-0.6/isenkramd0000755000000000000000000001625512172054331011770 0ustar #!/usr/bin/python # -*- coding: utf-8 -*- """ User Daemon to suggest packages to install when new hardware is inserted into the machine. """ # Copyright (C) 2013 Petter Reinholdtsen # AptDaemon gtk client code based on gtk-demo, copyright (C) 2008-2009 # Sebastian Heinlein # # Licensed under the GNU General Public License Version 2 # # 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 string #import pygtk import gtk import gobject import gudev import pynotify import subprocess import glob import fnmatch import isenkram.lookup import aptdaemon.client from aptdaemon.gtkwidgets import AptErrorDialog, \ AptConfirmDialog, \ AptProgressDialog import aptdaemon.errors class AptDaemonGUIClient(object): """Provides a graphical interface to aptdaemon.""" def _run_transaction(self, transaction): dia = AptProgressDialog(transaction, parent=self.win) dia.run(close_on_finished=True, show_error=True, reply_handler=lambda: True, error_handler=self._on_error) def _simulate_trans(self, trans): trans.simulate(reply_handler=lambda: self._confirm_deps(trans), error_handler=self._on_error) def _confirm_deps(self, trans): if [pkgs for pkgs in trans.dependencies if pkgs]: dia = AptConfirmDialog(trans, parent=self.win) res = dia.run() dia.hide() if res != gtk.RESPONSE_OK: return self._run_transaction(trans) def _on_error(self, error): try: raise error except aptdaemon.errors.NotAuthorizedError: # Silently ignore auth failures return except aptdaemon.errors.TransactionFailed as error: pass except Exception as error: error = aptdaemon.errors.TransactionFailed(aptdaemon.enums.ERROR_UNKNOWN, str(error)) dia = AptErrorDialog(error) dia.run() dia.hide() def request_installation(self, *args): self.ac.install_packages([self.package], reply_handler=self._simulate_trans, error_handler=self._on_error) def __init__(self, package): self.win = None self.package = package self.loop = gobject.MainLoop() self.ac = aptdaemon.client.AptClient() def run(self): self.loop.run() # Keep refs needed for callback to work n = None npkgs = None def notify_pleaseinstall(notification=None, action=None, data=None): pkgs = data pkgsstr = string.join(pkgs, " ") # print pkgs print "info: button clicked, installing %s" % pkgsstr demo = AptDaemonGUIClient(pkgs[0]) demo.request_installation() def notify(bus, vendor, device, pkgs): pkgstr = string.join(pkgs, " ") text = "New %s device [%04x:%04x] supported by package(s) %s." \ % (bus, vendor, device, pkgstr) title = "New %s device" % bus print "info: " + text # Initializite pynotify if not pynotify.init("isenkramd"): return False global n global npkgs npkgs = pkgs n = pynotify.Notification(title, text) n.set_timeout(10000) n.add_action("clicked", "Please install program(s)", notify_pleaseinstall, npkgs) n.show() return True def is_pkg_installed(packagename): cmd = ["dpkg", "-l", packagename] p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) retval = False while True: retcode = p.poll() line = p.stdout.readline() if 0 == line.find("ii "): retval = True if(retcode is not None): break return retval def devid2modalias(bus, vendor, device): target = "%s:v%04xp%04xd*" % (bus, vendor, device) modalias = None for filename in glob.iglob("/sys/bus/%s/devices/*/modalias" % bus): f = open(filename) line = f.readline().strip() # print line, target if fnmatch.fnmatch(line, target): modalias = line # print filename f.close() return modalias def get_pkg_suggestions_aptmodaliases(modalias): print "info: checking apt modaliases info" return isenkram.lookup.pkgs_handling_apt_modaliases([modalias]) def get_pkg_suggestions_mymodaliases(modalias): print "info: checking my modaliases file (from svn)" return isenkram.lookup.pkgs_handling_extra_modaliases([modalias]) def get_pkg_suggestions(modalias): pkgs = [] # discoverpkgs = get_pkg_suggestions_discover(bus, vendor, device) # pkgs.extend(discoverpkgs) aptpkgs = get_pkg_suggestions_aptmodaliases(modalias) pkgs.extend(aptpkgs) mypkgs = get_pkg_suggestions_mymodaliases(modalias) pkgs.extend(mypkgs) return pkgs def uevent_callback(client, action, device, user_data): modalias = device.get_property("MODALIAS") # Map loaded kernel modules to lkmodule:modulename "modalias" if ("add" == action and "module" == device.get_subsystem()): modalias = "lkmodule:%s" % (device.get_property("DEVPATH").split("/"))[2] if ("add" == action and modalias is not None): device_vendor = device.get_property("ID_VENDOR_ENC") device_model = device.get_property("ID_MODEL_ENC") print "uevent %s %s %s" % (device_vendor, device_model, modalias) bus = device.get_subsystem() if "usb" == bus: print "info: discovered USB device %s %s" % (device_vendor, device_model) pkgs = get_pkg_suggestions(modalias) # print "Suggestions: ", pkgs newpkg = [] alreadyinstalled = [] for pkg in pkgs: if not is_pkg_installed(pkg): newpkg.append(pkg) else: alreadyinstalled.append(pkg) print "info: not proposing already installed package(s) %s" % \ string.join(alreadyinstalled, ', ') if 0 < len(newpkg): vendorid, deviceid, bcdevice = \ device.get_property("PRODUCT").split("/") notify(bus, int(vendorid, 16), int(deviceid, 16), newpkg) def main(): client = gudev.Client([]) client.connect("uevent", uevent_callback, None) loop = gobject.MainLoop() print "info: ready to accept hardware events" loop.run() if __name__ == '__main__': main() isenkram-0.6/isenkram-lookup0000755000000000000000000000227612172054331013131 0ustar #!/usr/bin/python # Copyright (C) 2013 Petter Reinholdtsen # # Licensed under the GNU General Public License Version 2 # # 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 if __name__ == '__main__': main() isenkram-0.6/modaliases0000644000000000000000000002177712172054331012136 0ustar Package: alsa-firmware-loaders Modaliases: unused(usb:v1604p8000d*, usb:v1604p8001d*, usb:v1604p8004d*, usb:v1604p8005d*, usb:v1604p8006d*, usb:v1604p8007d*) Package: argyll Modaliases: unused(usb:v04DBp005Bd*, usb:v0670p0001d*, usb:v0765pD020d*, usb:v0765pD092d*, usb:v0765pD094d*, usb:v085Cp0200d*, usb:v085Cp0300d*, usb:v0971p2000d*, usb:v0971p2001d*, usb:v0971p2003d*, usb:v0971p2005d*, usb:v0971p2007d*) Package: b43-fwcutter Modaliases: unused(pci:v000014E4d00004312sv*, pci:v000014E4d00004320sv*) Package: bluez-firmware Modaliases: unused(usb:v0C10p0000d*) Package: bluez Modaliases: unused(lkmodule:bluetooth) Package: brltty Modaliases: unused(usb:v0403pF208d*, usb:v0403pFE70d*, usb:v0403pFE71d*, usb:v0403pFE72d*, usb:v0403pFE73d*, usb:v0403pFE74d*, usb:v0403pFE75d*, usb:v0403pFE76d*, usb:v0403pFE77d*, usb:v0452p0100d*, usb:v045Ep930Ad*, usb:v045Ep930Bd*, usb:v06B0p0001d*, usb:v0798p0001d*, usb:v0798p0624d*, usb:v0798p0640d*, usb:v0798p0680d*, usb:v0904p2000d*, usb:v0904p2001d*, usb:v0904p2002d*, usb:v0904p2007d*, usb:v0904p2008d*, usb:v0904p2009d*, usb:v0904p2010d*, usb:v0904p2011d*, usb:v0904p2014d*, usb:v0904p2015d*, usb:v0904p2016d*, usb:v0904p3000d*, usb:v0921p1200d*, usb:v0F4Ep0100d*, usb:v0F4Ep0111d*, usb:v0F4Ep0112d*, usb:v0F4Ep0114d*, usb:v10C4pEA60d*, usb:v10C4pEA80d*, usb:v1C71pC005d*, usb:v1FE4p0003d*, usb:v1FE4p0044d*, usb:v1FE4p0054d*, usb:v1FE4p0074d*, usb:v1FE4p0081d*, usb:v1FE4p0082d*, usb:v1FE4p0083d*, usb:v1FE4p0084d*, usb:v1FE4p0086d*, usb:v1FE4p0087d*, usb:v1FE4p008Ad*, usb:v1FE4p008Bd*, usb:v4242p0001d*, usb:vC251p1122d*, usb:vC251p1123d*, usb:vC251p1124d*, usb:vC251p1125d*, usb:vC251p1126d*, usb:vC251p1127d*, usb:vC251p1128d*, usb:vC251p1129d*, usb:vC251p112Ad*, usb:vC251p112Bd*, usb:vC251p112Cd*, usb:vC251p112Dd*, usb:vC251p112Ed*, usb:vC251p112Fd*, usb:vC251p1130d*, usb:vC251p1131d*, usb:vC251p1132d*) Package: calibre Modaliases: unused(usb:v2237p*d*ic08isc*ip*, usb:v0525pA4A5d*ic08isc*ip*) Package: cheese Modaliases: unused(usb:v*p*d*dc*dsc*dp*ic0Eisc01ip*) Package: colorhug-client Modaliases: unused(usb:v04D8pF8DAd*) Package: ekeyd Modaliases: unused(usb:v20DFp0001d*) 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*) Package: gphoto2 Modaliases: unused(usb:v04A9p30BFd*) Package: gpsbabel Modaliases: unused(usb:v091Ep0003d*) Package: gpsbabel-gui Modaliases: unused(usb:v091Ep0003d*) Package: gpsman Modaliases: unused(usb:v091Ep0003d*) Package: gpstrans Modaliases: unused(usb:v091Ep0003d*) Package: gtkpod Modaliases: unused(usb:v05ACp1300d*) Package: hdapsd Modaliases: unused(dmi:*:pn*:pvrThinkPad*:rvn*) Package: hpijs-ppds Modaliases: unused(usb:v03F0p0004d*, usb:v03F0p0104d*, usb:v03F0p0111d*, usb:v03F0p0204d*, usb:v03F0p0304d*, usb:v03F0p0311d*, usb:v03F0p0404d*, usb:v03F0p0504d*, usb:v03F0p0604d*, usb:v03F0p0704d*, usb:v03F0p0712d*, usb:v03F0p0804d*, usb:v03F0p0904d*, usb:v03F0p1004d*, usb:v03F0p1104d*, usb:v03F0p1151d*, usb:v03F0p1204d*, usb:v03F0p1504d*, usb:v03F0p1604d*, usb:v03F0p1904d*, usb:v03F0p1C17d*, usb:v03F0p1E11d*, usb:v03F0p2004d*, usb:v03F0p2104d*, usb:v03F0p2304d*, usb:v03F0p2811d*, usb:v03F0p2D11d*, usb:v03F0p3102d*, usb:v03F0p3104d*, usb:v03F0p3304d*, usb:v03F0p3404d*, usb:v03F0p3504d*, usb:v03F0p3C02d*, usb:v03F0p3D11d*, usb:v03F0p3F11d*, usb:v03F0p5004d*, usb:v03F0p6004d*, usb:v03F0p6104d*, usb:v03F0p6204d*, usb:v03F0p6602d*, usb:v03F0p7004d*, usb:v03F0p7104d*, usb:v03F0p7204d*, usb:v03F0p7304d*, usb:v03F0pA004d*) Package: hplip Modaliases: unused(usb:v03F0p0004d*, usb:v03F0p0104d*, usb:v03F0p0111d*, usb:v03F0p0204d*, usb:v03F0p0304d*, usb:v03F0p0311d*, usb:v03F0p0404d*, usb:v03F0p0504d*, usb:v03F0p0604d*, usb:v03F0p0704d*, usb:v03F0p0712d*, usb:v03F0p0804d*, usb:v03F0p0904d*, usb:v03F0p1004d*, usb:v03F0p1104d*, usb:v03F0p1151d*, usb:v03F0p1204d*, usb:v03F0p1504d*, usb:v03F0p1604d*, usb:v03F0p1904d*, usb:v03F0p1C17d*, usb:v03F0p1E11d*, usb:v03F0p2004d*, usb:v03F0p2104d*, usb:v03F0p2304d*, usb:v03F0p2811d*, usb:v03F0p2D11d*, usb:v03F0p3102d*, usb:v03F0p3104d*, usb:v03F0p3304d*, usb:v03F0p3404d*, usb:v03F0p3504d*, usb:v03F0p3C02d*, usb:v03F0p3D11d*, usb:v03F0p3F11d*, usb:v03F0p5004d*, usb:v03F0p6004d*, usb:v03F0p6104d*, usb:v03F0p6204d*, usb:v03F0p6602d*, usb:v03F0p7004d*, usb:v03F0p7104d*, usb:v03F0p7204d*, usb:v03F0p7304d*, usb:v03F0pA004d*) Package: ipw3945-source Modaliases: unused(pci:v00008086d00004222sv*, pci:v00008086d00004227sv*, pci:v00008086d00004229sv*) Package: ipw3945d Modaliases: unused(pci:v00008086d00004229sv*) Package: kde-config-tablet Modaliases: unused(lkmodule:wacom) Package: libpam-fprintd Modaliases: unused(usb:v147Ep2020d*) Package: mkgmap Modaliases: unused(usb:v091Ep0003d*) Package: nbc Modaliases: unused(usb:v0694p0002d*) Package: nut-hal-drivers Modaliases: unused(usb:v0001p0000d*, usb:v03F0p1F01d*, usb:v03F0p1F02d*, usb:v03F0p1F06d*, usb:v03F0p1F0Ad*, usb:v0463p0001d*, usb:v0463pFFFFd*, usb:v047CpFFFFd*, usb:v050Dp0375d*, usb:v050Dp0551d*, usb:v050Dp0750d*, usb:v050Dp0751d*, usb:v050Dp0900d*, usb:v050Dp0910d*, usb:v050Dp0912d*, usb:v050Dp0980d*, usb:v050Dp1100d*, usb:v051Dp0002d*, usb:v0592p0002d*, usb:v05B8p0000d*, usb:v0665p5161d*, usb:v06DAp0002d*, usb:v06DAp0003d*, usb:v06DApFFFFd*, usb:v0764p0005d*, usb:v0764p0501d*, usb:v0764p0601d*, usb:v0925p1234d*, usb:v09AEp0001d*, usb:v09AEp1003d*, usb:v09AEp1007d*, usb:v09AEp1008d*, usb:v09AEp2005d*, usb:v09AEp2007d*, usb:v09AEp3012d*, usb:v09AEp3014d*, usb:v09AEp4001d*, usb:v09AEp4002d*, usb:v09AEp4003d*, usb:v0D9Fp00A2d*, usb:v0D9Fp00A3d*, usb:v0D9Fp00A4d*, usb:v0D9Fp00A5d*, usb:v0D9Fp00A6d*, usb:v0F03p0001d*, usb:v10AFp0001d*, usb:vFFFFp0000d*) Package: nqc Modaliases: unused(usb:v0694p0001d*) Package: open-vm-toolbox Modaliases: unused(dmi:*:svnVMWare*:*) Package: open-vm-tools Modaliases: unused(dmi:*:svnVMWare*:*) Package: pcmciautils Modaliases: unused(pci:v*d*sv*sd*bc06sc07i*) Package: pcscd Modaliases: unused(usb:v20A0p4107d*, usb:v0B97p7772d*, usb:*ic0Bisc00ip*) Package: pidgin-blinklight Modaliases: unused(dmi:*:pn*:pvrThinkPad*:rvn*) Package: pymissile Modaliases: unused(usb:v1130p0202d*) Package: python-nxt Modaliases: unused(usb:v0694p0002d*) Package: qlandkartegt Modaliases: unused(usb:v091Ep0003d*) Package: qlandkartegt-garmin Modaliases: unused(usb:v091Ep0003d*) Package: rt2x00-source Modaliases: unused(pci:v00001814d00000101sv*, pci:v00001814d00000201sv*, pci:v00001814d00000301sv*, pci:v00001814d00000302sv*, pci:v00001814d00000401sv*) Package: sispmctl Modaliases: unused(usb:v04B4pFD10d*, usb:v04B4pFD11d*, usb:v04B4pFD12d*, usb:v04B4pFD13d*) Package: splix Modaliases: unused(usb:v04E8p323Ad*, usb:v04E8p323Bd*, usb:v04E8p323Dd*, usb:v04E8p3242d*, usb:v04E8p324Cd*, usb:v04E8p324Dd*, usb:v04E8p325Bd*, usb:v04E8p325Fd*, usb:v04E8p3260d*, usb:v04E8p3268d*, usb:v04E8p3276d*, usb:v04E8p341Bd*, usb:v04E8p3426d*) Package: t2n Modaliases: unused(usb:v0694p0002d*) Package: thinkfan Modaliases: unused(dmi:*:pn*:pvrThinkPad*:rvn*) Package: thinkfinger-tools Modaliases: unused(usb:v08FFp2580d*) Package: tleds Modaliases: unused(dmi:*:pn*:pvrThinkPad*:rvn*) Package: tp-smapi-dkms Modaliases: unused(dmi:*:pn*:pvrThinkPad*:rvn*) Package: tp-smapi-source Modaliases: unused(dmi:*:pn*:pvrThinkPad*:rvn*) Package: tpb Modaliases: unused(dmi:*:pn*:pvrThinkPad*:rvn*) Package: usbmuxd Modaliases: unused(usb:v05ACp129[0-9A]d*) Package: viking Modaliases: unused(usb:v091Ep0003d*) Package: virtualbox-ose-guest-x11 Modaliases: unused(pci:v000080EEd0000BEEFsv*) Package: xawtv Modaliases: unused(pci:v*d*sv*sd*bc04sc00i*) Package: xserver-xorg-video-qxl Modaliases: unused(pci:v00001B36d00000100sv*) Package: xserver-xorg-input-vmmouse Modaliases: unused(dmi:*:svnVMWare*:*) Package: xserver-xorg-video-vmware Modaliases: unused(dmi:*:svnVMWare*:*) Package: xserver-xorg-input-wacom Modaliases: unused(lkmodule:wacom) Package: yubikey-personalization Modaliases: unused(usb:v1050p0010d*) Package: zd1211-firmware Modaliases: unused(usb:v083Ap4505d*) isenkram-0.6/isenkram/0000755000000000000000000000000012172054331011665 5ustar isenkram-0.6/isenkram/__init__.py0000644000000000000000000000155412172054331014003 0ustar # Copyright (C) 2013 Petter Reinholdtsen # # Licensed under the GNU General Public License Version 2 # # 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 " isenkram-0.6/isenkram/lookup.py0000644000000000000000000001124712172054331013555 0ustar #!/usr/bin/python # Copyright (C) 2013 Petter Reinholdtsen # # Licensed under the GNU General Public License Version 2 # # 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 sys import apt import fnmatch import os import urllib import errno pkgdir = "/usr/share/isenkram" def my_modaliases(): modaliases = set() for dirpath, _, filenames in os.walk("/sys/devices"): if "modalias" in filenames: with open(dirpath + "/modalias") as sysfile: modaliases.add(sysfile.read().strip()) with open ("/proc/modules") as procfile: line = procfile.readline() while line: modalias = "lkmodule:%s" % (line.split(" "))[0] modaliases.add(modalias) line = procfile.readline() procfile.close() return list(modaliases) def modalias_match(alias, candidates): # print "modalias_match('%s', %s)" % (alias, candidates) for part in candidates.split(')'): part = part.strip(', ') if not part: continue module, lst = part.split('(') for candidate in lst.split(','): candidate = candidate.strip() bus = candidate.split(':', 1)[0] # print bus, alias, candidate # print candidate, alias if fnmatch.fnmatch(alias, candidate): # print "Match" return True return False def pkgs_handling_apt_modaliases(modaliaslist): cache = apt.Cache() cache.open(None) thepkgs = {} for pkg in cache: version = pkg.candidate if version is None: version = pkg.installed if version is None: continue record = version.record if not record.has_key('Modaliases'): continue modaliases = record['Modaliases'] for modalias in modaliaslist: if modalias_match(modalias, modaliases): thepkgs[pkg.name] = True return thepkgs.keys() def check_packages_file(pkghash, fileref, modaliaslist): line = fileref.readline() while line: header, sep, packagename = line.strip().partition(": ") header, sep, modaliases = fileref.readline().strip().partition(": ") blank = fileref.readline() for modalias in modaliaslist: # print "Match ", packagename, " ", modalias, " ", modaliases if modalias_match(modalias, modaliases): pkghash[packagename] = True line = fileref.readline() fileref.close() def pkgs_handling_extra_modaliases(modaliaslist): """ Look up package-hardware mappings from svn and local file """ thepkgs = {} url = "http://anonscm.debian.org/gitweb/?p=collab-maint/isenkram.git;a=blob_plain;f=modaliases;hb=HEAD" try: f = urllib.urlopen(url) check_packages_file(thepkgs, f, modaliaslist) except IOError, e: if errno.ENOENT == e.errno: # Most likely lack network connection pass try: try: f = open("modaliases") check_packages_file(thepkgs, f, modaliaslist) except IOError as e: f = open(pkgdir + "/modaliases") check_packages_file(thepkgs, f, modaliaslist) f.close() for dirpath, _, filenames in os.walk(pkgdir + "/modaliases.d"): for filename in filenames: with open(dirpath + "/modalias") as aliasfile: check_packages_file(thepkgs, aliasfile, modaliaslist) except: # Ignore errors pass # print thepkgs return thepkgs.keys() def main(): 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)): print " %s" %pkg print "Locating packages supporting this hardware (APT):" for pkg in sorted(pkgs_handling_apt_modaliases(hwaliases)): print " %s" %pkg if __name__ == '__main__': main() isenkram-0.6/isenkramd.desktop0000644000000000000000000000035412172054331013426 0ustar [Desktop Entry] Exec=isenkramd Type=Application Terminal=false Name=Isenkram GenericName=Package suggestions for hardware Comment=Suggest new packages when hardware devices are plugged in Categories=System;HardwareSettings;Electronics; isenkram-0.6/discover-data2modaliases0000755000000000000000000000432112172054331014653 0ustar #!/usr/bin/perl use strict; use warnings; use XML::Simple; use Data::Dumper; my $basedir = $ARGV[0] || "/lib/discover"; my %pkgmap; for my $bus ("pci", "usb") { my $ref = XMLin("$basedir/$bus-device.xml"); for my $device (@{$ref->{'device'}}) { # print Dumper($device); if (exists $device->{'data'}) { my $entries; if ("ARRAY" eq ref $device->{'data'}) { $entries = @{$device->{'data'}}; } else { $entries = $device->{'data'}; } for my $data ($entries) { if ("HASH" eq ref $data && "package" eq $data->{'class'}) { # print Dumper($data); my $vendor = uc($device->{'vendor'}); my $model = uc($device->{'model'}); my @pkgentries; # print Dumper($data->{data}[0]->{'data'}); if ("ARRAY" eq ref $data->{data}[0]->{'data'}) { @pkgentries = @{$data->{data}[0]->{'data'}}; } else { @pkgentries = $data->{data}[0]->{'data'}; } # print Dumper(@pkgentries); for my $pkgentry (@pkgentries) { my $pkglist = $pkgentry->{'content'}; for my $pkg (split(/ /, $pkglist)) { my $modalias; if ("usb" eq $bus) { $modalias = "usb:v${vendor}p${model}d*"; } elsif ("pci" eq $bus) { $modalias = "pci:v0000${vendor}d0000${model}sv*"; } else { } if (exists $pkgmap{$pkg}) { push(@{$pkgmap{$pkg}}, $modalias); } else { $pkgmap{$pkg} = [$modalias]; } } } } } } } } for my $pkg (sort keys %pkgmap) { print "Package: $pkg\n"; print "Modaliases: $pkg(".join(", ", sort @{$pkgmap{$pkg}}), ")\n"; print "\n"; } isenkram-0.6/debian/0000755000000000000000000000000012172056132011277 5ustar isenkram-0.6/debian/copyright0000644000000000000000000000165412172054331013237 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0 Files: * Copyright: © 2013, Petter Reinholdtsen License: GPL-2.0+ License: GPL-2.0+ This package 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 package 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, see . On Debian systems, the complete text of the GNU General Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". isenkram-0.6/debian/isenkram.dirs0000644000000000000000000000004012172054331013764 0ustar usr/share/isenkram/modaliases.d isenkram-0.6/debian/control0000644000000000000000000000170012172054331012677 0ustar Source: isenkram Section: misc Priority: optional Maintainer: Petter Reinholdtsen Build-Depends: debhelper (>= 8), po-debconf Build-Depends-Indep: dash (>= 0.5.4-12) , python (>= 2.6.6-3~) , python-gudev , python-gobject , python-notify , aptdaemon , python-aptdaemon-gtk , libgnome2-perl Standards-Version: 3.9.4 Vcs-Browser: http://anonscm.debian.org/gitweb/?p=collab-maint/isenkram.git Vcs-Git: git://anonscm.debian.org/collab-maint/isenkram.git Package: isenkram Replaces: hw-support-handler (<< 0.1~) Conflicts: hw-support-handler (<< 0.1~) Priority: extra Architecture: all Depends: ${misc:Depends} , ${python:Depends} , python-gudev , python-gobject , python-notify , python-aptdaemon-gtk , libgnome2-perl , lsb-release Recommends: aptdaemon Description: Suggest packages to install when inserting new hardware Try to figure out which packages to suggest for use with a freshly inserted hardware device. isenkram-0.6/debian/isenkram.install0000644000000000000000000000041312172054331014475 0ustar 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 isenkram-0.6/debian/changelog0000644000000000000000000000667412172054331013165 0ustar 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 (Closes: #714117). Thanks to Raf Czlonka for noticing. -- Petter Reinholdtsen Wed, 26 Jun 2013 11:18:34 +0200 isenkram (0.4) unstable; urgency=low * Change modaliases file to suggest calibre when Kobo and PocketBook ebook readers are inserted. Patch from Marius Kotsbak. * New tool isenkram-autoinstall-firmware to automatically detect and install required firmware packages for the current machine. -- Petter Reinholdtsen Tue, 25 Jun 2013 11:01:29 +0200 isenkram (0.3) unstable; urgency=low * Search for modalias files in /sys/devices/ instead of /sys/, to speed up the process and avoid looking in irrelevant parts of /sys/. * Change aptdaemon dependency to recommend, to make it possible to use isenkram from the command line without installing aptdaemon (Closes: #704666). -- Petter Reinholdtsen Sun, 07 Apr 2013 07:13:08 +0200 isenkram (0.2) experimental; urgency=low * Change installation system to use setup.py to install the python module. * Update build rules to use dh_python2, after tip from Stuart Prescott. * Implement support for looking up packages claiming support for a given kernel module using the lkmodule:module "modalias" notation. Use it to propose wacom related packages. * Correct symlink created in /etc/xdg/autostart/ to point to the correct file. Clean up old symlink in postinst. Thanks to Bob Rosbag for discovering it. * Make aptdaemon integration more robust, based on example code from the Wheezy version of python-aptdaemon-gtk. Thanks to Bob Rosbag for the debugging. * Change behaviour. Suggest packages every time a piece of hardware is inserted, instead of only the first time. This seem to be less confusing for users. * Make it possible to provide ones own package/hw mappings by adding files in /usr/share/isenkram/modaliases.d/. -- Petter Reinholdtsen Sun, 27 Jan 2013 15:53:21 +0100 isenkram (0.1) pere-squeeze; urgency=low * Initial release (Closes: #699077). * Inserts XDG autostart entry in /etc/xdg/autostart/ to run automatically when users log in. * Handle both Modaliases headers in APT database, hardware mappings from the git repository and hardware mappings provided locally in the package. * Notify the user via dbus desktop notification events. * Use PackageKit API from aptdaemon to handle the package installation. -- Petter Reinholdtsen Wed, 23 Jan 2013 12:25:31 +0100 isenkram-0.6/debian/isenkram.postrm0000644000000000000000000000023712172054331014357 0ustar #!/bin/sh set -e # Remove incorrect symlink. dpkg-maintscript-helper rm_conffile \ /etc/xdg/autostart/isenkram.desktop 0.1 isenkram -- "$@" #DEBHELPER# isenkram-0.6/debian/compat0000644000000000000000000000000212172054331012474 0ustar 8 isenkram-0.6/debian/isenkram.links0000644000000000000000000000011612172054331014147 0ustar usr/share/applications/isenkramd.desktop /etc/xdg/autostart/isenkramd.desktop isenkram-0.6/debian/rules0000755000000000000000000000005412172054331012355 0ustar #!/usr/bin/make -f %: dh $@ --with python2 isenkram-0.6/debian/substvars0000644000000000000000000000001612172054331013252 0ustar misc:Depends= isenkram-0.6/debian/isenkram.preinst0000644000000000000000000000023712172054331014517 0ustar #!/bin/sh set -e # Remove incorrect symlink. dpkg-maintscript-helper rm_conffile \ /etc/xdg/autostart/isenkram.desktop 0.1 isenkram -- "$@" #DEBHELPER# isenkram-0.6/debian/isenkram.postinst0000644000000000000000000000023712172054331014716 0ustar #!/bin/sh set -e # Remove incorrect symlink. dpkg-maintscript-helper rm_conffile \ /etc/xdg/autostart/isenkram.desktop 0.1 isenkram -- "$@" #DEBHELPER# isenkram-0.6/README0000644000000000000000000000173712172054331010744 0ustar The Isenkram project ==================== This is a simple system to propose to the logged in user any Debian packages that would be useful to support a given given piece of inserted hardware. The name is old facened Norwegian, where it mean metal tool like hammers, saws, nails, screws, etc, or a shop where such stuff is sold. It is similar to the German word eisenkram. The isenkram package install its autostart rule in the /etc/xdg/autostart/ directory, and the daemon handling hardware detection should start automatically when a user log if using any XDG compatible desktop environment. Latest source ------------- The latest source can be found in the Debian collab-maint git repository. Visit to look at it, or fetch the latest version using git clone git://anonscm.debian.org/collab-maint/isenkram.git Report bugs ----------- Report bugs via email to pere (at) hungry.com. Patches are most welcome.