--- jockey-0.5~beta3.orig/MANIFEST.in +++ jockey-0.5~beta3/MANIFEST.in @@ -0,0 +1,7 @@ +include README.txt AUTHORS COPYING ChangeLog po/*.po po/POTFILES.in po/jockey.pot +include tests/run* tests/*.py +recursive-include gtk *.desktop.in *.glade com.ubuntu.DeviceDriver.service +recursive-include kde *.desktop.in *.ui +recursive-include data * +recursive-include examples * +recursive-include backend * --- jockey-0.5~beta3.orig/debian/jockey-gtk.install +++ jockey-0.5~beta3/debian/jockey-gtk.install @@ -0,0 +1,5 @@ +usr/bin/*-gtk +usr/share/jockey/*.glade +usr/share/applications/*-gtk.* +usr/share/autostart/*-gtk.desktop etc/xdg/autostart/ +usr/share/dbus-1/services --- jockey-0.5~beta3.orig/debian/rules +++ jockey-0.5~beta3/debian/rules @@ -0,0 +1,24 @@ +#!/usr/bin/make -f + +DEB_PYTHON_SYSTEM := pycentral +export DH_PYCENTRAL=nomove + +include /usr/share/cdbs/1/rules/debhelper.mk +include /usr/share/cdbs/1/class/python-distutils.mk +include /usr/share/cdbs/1/rules/langpack.mk + +DEB_PYTHON_INSTALL_ARGS_ALL := --no-compile +DEB_DH_INSTALL_SOURCEDIR := debian/tmp + +clean:: + rm -f po/*.pot + +install/jockey-common:: + install -m0644 -D debian/apport_hook.py \ + debian/$(cdbs_curpkg)/usr/share/apport/package-hooks/source_jockey.py + + install -m0755 -D debian/jockey.ubiquity \ + debian/$(cdbs_curpkg)/usr/lib/ubiquity/target-config/31jockey_pkgs + +binary-install/jockey-common:: + dh_icons -p$(cdbs_curpkg) --- jockey-0.5~beta3.orig/debian/changelog +++ jockey-0.5~beta3/debian/changelog @@ -0,0 +1,676 @@ +jockey (0.5~beta3-0ubuntu6) intrepid-proposed; urgency=low + + * data/handlers/nvidia.py: Unblacklist nvidia driver version 96, it has been + fixed in intrepid-proposed (see LP #251107). (LP: #293107) + + -- Martin Pitt Tue, 04 Nov 2008 12:58:13 +0100 + +jockey (0.5~beta3-0ubuntu5) intrepid; urgency=low + + * Merge bug fix from trunk: + - nvidia.py: Drop constructor check for unsupported legacy versions; at + ctor invocation time, the package is not set yet, and this check + should not be upstream in the first place. + - detection.py: Do not instantiate handlers from DriverDBs which are + unavailable. (Pre-requisite for fixing LP #288662) + * data/handlers/nvidia.py: Move test for currently unsupported legacy + versions (96, 71) to available() where it is actually evaluated. + (LP: #288662) + + -- Martin Pitt Fri, 24 Oct 2008 13:43:22 +0200 + +jockey (0.5~beta3-0ubuntu4) intrepid; urgency=low + + * Merge bug fix from trunk: + - kde/jockey-kde.desktop.in: Launch jockey-kde as root, since + policykit-kde does not exist yet. This unbreaks calling it from the + menu. Thanks to Alberto Milone for the fix! + + -- Martin Pitt Wed, 22 Oct 2008 17:36:08 +0200 + +jockey (0.5~beta3-0ubuntu3) intrepid; urgency=low + + * Merge bug fixes from trunk: + - jockey/backend.py, polkit_auth_wrapper(): Also intercept SystemError and + other standard exceptions in the case of a PermissionDeniedByPolicy, i. + e. when popping up the PK auth dialog. Fixes (LP: #274639) for real. + - po/de.po: Unfuzzify. + + -- Martin Pitt Fri, 17 Oct 2008 19:51:42 +0200 + +jockey (0.5~beta3-0ubuntu2) intrepid; urgency=low + + * Merge bug fixes from trunk: + - OpenPrintingDriverDB: Filter out HTML tags from names, they look ugly + and
even breaks the display. + - jockey-gtk: Increase the default width of the license dialog to fit a + standard 80 column text. + - ui.py, search_driver(): Increase timeout from default 30 seconds to 10 + minutes, since driver DB lookup can last quite long (crash fix). + - OpenPrintingDriverDB: Disambiguate drivers by their driver name, not by + supplier; fixes e. g. splix stable vs. development version conflict. + - Backend available(), search_drivers(): Show the recommended drivers + first, so that the default GUI selection will not point to a + non-recommended one by default. + + -- Martin Pitt Thu, 16 Oct 2008 21:37:31 +0200 + +jockey (0.5~beta3-0ubuntu1) intrepid; urgency=low + + * New upstream bug fix release 0.5 beta 3. Compared to our bzr snapshot, + this has the following changes: + - OpenPrintingDriverDB: Show non-recommended drivers, too, but mark the + recommended one appropriately. (LP: #271286) + - get_handlers(): If there is just one driver for a HardwareID, do not + present it as recommended even if the Driver DB marks it as such, since + it is just confusing. + - jockey-gtk: If jockey shipped icons are not available (happens in some + third-party themes), fall back to stock icons instead of crashing. + (LP: #283363) + * oslib.py, package_name(): Remove intra-paragraph line breaks; both GUIs + already do their own line breaking according to the widget width, and + having them in between looks ugly. + + -- Martin Pitt Thu, 16 Oct 2008 12:56:55 +0200 + +jockey (0.5~beta2-0ubuntu3) intrepid; urgency=low + + * Merge change from trunk: + - openprinting.org lookup: Only search for packaged PPD files, not for + cups filters. This is to greatly reduce the potential conflict with + distro packages (until the openprinting.org ones get properly + namespaced), and also because those filters should generally be supplied + as proper Ubuntu packages. + + -- Martin Pitt Thu, 16 Oct 2008 01:33:17 +0200 + +jockey (0.5~beta2-0ubuntu2) intrepid; urgency=low + + * Merge bug fixes from trunk: + - openprinting.org detected handlers: Add supplier and support contacts to + long description. (LP: #269454) + - backend.py, set_enabled(): Report progress signals early when handling + packages, to avoid delays until package manager sends out the first + progress. (LP: #279073) + * data/handlers/fglrx.py: Enable driver again, current version works now. + Also add "Recommends: fglrx-modaliases", so that detection works in a + default installation. (LP: #262819) + + -- Martin Pitt Wed, 15 Oct 2008 00:10:53 +0200 + +jockey (0.5~beta2-0ubuntu1) intrepid; urgency=low + + * New upstream bug fix release 0.5 beta 2. This does not introduce any + actual code changes to our bzr snapshot, but brings down the diff.gz delta + to a sane level again. + + -- Martin Pitt Mon, 13 Oct 2008 18:05:20 +0200 + +jockey (0.5~beta1-0ubuntu5) intrepid; urgency=low + + * Merge bug fixes from trunk: + - ui.py: Explicitly set encoding of stdout and stderr to the locale's + preferred encoding. Thanks to Colin Watson for the approach. + (LP: #280147) + - ui.py, set_handler_enabled(): Show SystemErrors in dialog instead of + crashing. (LP: #274639) + - jockey-kde: Make --check notifications actually work again. + * jockey/oslib.py: Clean up error handling on package installation/removal. + * jockey-kde: Work around the lack of a PolicyKit KDE user agent by starting + the UI through kdesu when clicking on the notification. Add + kdebase-runtime dependency for this. (LP: #274189) + + -- Martin Pitt Mon, 13 Oct 2008 14:40:43 +0200 + +jockey (0.5~beta1-0ubuntu4) intrepid; urgency=low + + * Merge bug fixes from trunk: + - Remove any Disable dri2 (in nvidia.py) from the xorg.conf, otherwise + nvidia-settings and nvidia-xconfig will fail. [Alberto] + - Further clarify fglrx rationale. + - Make the nvidia handler raise an AssertionError if the version of the + driver is < 173, since they do not work with current X.org. [Alberto] + * data/handlers/broadcom_wl.py: Fix crash if wl module is not available. + (LP: #280929) + * data/handlers/fglrx.py: Raise an exception in the ctor, pointing at + LP#247376, since current xorg-driver-fglrx is busted. If this gets fixed + in -updates, this needs to be reverted, and a recommends: to + fglrx-modaliases needs to be added. + + -- Martin Pitt Fri, 10 Oct 2008 18:05:37 +0200 + +jockey (0.5~beta1-0ubuntu3) intrepid; urgency=low + + * Merge bug fixes from trunk: + - Update the name of fglrx; radeonhd etc. are accelerated, too. + (LP: #263359) + - ui.py, backend(): Re-detect device drivers after the backend timed out. + (LP: #273231) + - backend.py, set_enabled(): Propagate exceptions from the enable/disable + threads. (LP: #278034) + - jockey-{gtk,kde}: Fix display of UI elements if no drivers are + available. (LP: #277616, #277702) + - jockey-kde: Actually show a license dialog when clicking on "Details" + for the license. [Alberto] + - Fix enabling/disabling of video drivers if multiple cards are + configured in xorg.conf. [Alberto] + - detection.py, get_printers(): Intercept RuntimeError harder. + (LP: #272721) + + -- Martin Pitt Mon, 06 Oct 2008 13:34:12 +0200 + +jockey (0.5~beta1-0ubuntu2) intrepid; urgency=low + + * Merge some bug fixes from trunk: + - ui.py: Fix "not installed" -> "not activated" string inconsistency. + (LP: #274697) + - Fix typos in German translation. + - Add and use enabled/disabled/free icons from Kenneth Wimer. + - Fix jockey-kde crash when no drivers are available. (LP: #278677) + [Alberto] + - Report indefinite progress if the handler does long non-package + operations (such as rebuilding initramfs), instead of freezing the UI. + - UI: Select first driver by default, and keep selection after + enable/disable. (LP: #274699) + - jockey-kde: Fix display of window text and subtext, and adapt it to + driver changes. (LP: #274558) + - Avoid flickering the progress bar dialog for very fast detect() calls. + - jockey-kde: Fix indeterminate progress bar behaviour, and fix "Searching + for drivers..." progress bar at startup. + - kde/ManagerWindowKDE4.ui: Drop the expander next to the window heading, + it prevented proper resizing. (LP: #274700) + - Various test suite fixes. + * data/handlers/b43.py: Do not show the driver as "in use" if the firmware + is not installed. + * Add data/handlers/broadcom_wl.py: Handler for the alternative Broadcom + 'wl' module. Enabling this will automatically blacklist b43 and bcm43xx. + (LP: #263097) + * data/handlers/b43.py: Remove blacklist-bcm43 on activation. + * data/handlers/b43.py: Add (derived) handler for b43legacy. (LP: #247495) + * data/handlers/b43.py: Actually call the firmware fetching script after the + -fwcutter installation. + + -- Martin Pitt Thu, 02 Oct 2008 20:44:09 +0200 + +jockey (0.5~beta1-0ubuntu1) intrepid; urgency=low + + * New upstream release 0.5 beta 1. Compared to our trunk snapshot, this + has the following changes: + - Fix spawning of "Searching drivers..." progress dialog for invoking the + UI through D-BUS. + - ui.py: Work around some xgettext false positives, so that they won't + appear in the .pot. + - Merge translations, and fully update the German one. + * backend/jockey-backend: Fixed merge error which caused the GTK/KDE tests + to fail in the ubuntu branch. + + -- Martin Pitt Thu, 25 Sep 2008 20:47:09 +0200 + +jockey (0.5~alpha1-0ubuntu5) intrepid; urgency=low + + * Merge bug fixes from trunk: + - Fix XorgDriverHandler to not be "used" right after enabling. + - Make sure that dri2 is not disabled for fglrx, it crashes amdcccle. (LP: + #273320) [Alberto] + - Use a "refresh" icon for drivers where a reboot needs to happen. + (LP: #272238) [Alberto] + - Fix KDE notification and the related test. Work around segfault when + exiting the KDE UI. (LP: #270522) [Alberto] + - search_driver(): Return list of installed files in addition to status + code. Document the return value in README.txt. (LP: #269311) + - Converts search_driver() printer device ID to friendly string (only + supports printers for now). (part of LP #269454) + - Do not make a backup of xorg.conf if the proprietary driver is already + set there, so that we don't automatically revert to a configuration with + the proprietary driver after uninstalling exactly that. [Alberto] + + -- Martin Pitt Wed, 24 Sep 2008 22:40:22 +0200 + +jockey (0.5~alpha1-0ubuntu4) intrepid; urgency=low + + * debian/jockey-kde.install: Drop *.ui files, they are not installed by + upstream any more (creates .py files at build time now). Fixes FTBFS. + Thanks, Alberto Milone! + + -- Martin Pitt Tue, 23 Sep 2008 13:58:46 +0200 + +jockey (0.5~alpha1-0ubuntu3) intrepid; urgency=low + + * Merge some bug fixes from trunk: + - Fix search_drivers() to not return unrelated available handlers. + - Change --search-driver UIs from confirmation dialog to displaying list + of matches. (One half of LP: #269454) + - OpenPrintingDriverDB: Show shortdescription and functionality fields. + (Other half of LP: #269454) + - Drop a lot of redundant probing from add_driverdb() and search_driver(). + - Build KDE .ui -> python on build time, to avoid runtime uic dependency. + (LP: #271317) + - nvidia, fglrx handlers: Remove RgbPath option, it causes X.org to crash. + - ui.py: Update action button strings according to latest recommendations + from Matthew Thomas, thanks! + - ui.py: Properly intercept failure to connect to D-BUS. (LP: #258472) + * Add python-kde4-dev build dependency, now needed to get pykde4uic. + * fglrx, nvidia: Uninstall -kernel-source in disable(), thanks Alberto. + (LP: #251962) + * jockey/oslib.py, install_package(): Intercept SystemError. (LP: #258713, + LP: #272146) + + -- Martin Pitt Mon, 22 Sep 2008 15:39:42 +0200 + +jockey (0.5~alpha1-0ubuntu2) intrepid; urgency=low + + * debian/control: Replace python-qt4 dependency with python-kde4, since + that's required now. (LP: #263017) + * oslib.py, {install,remove}_package(): Intercept apt's LockFailedException + and FetchFailedException. (LP: #268850) + * oslib.py: Fix typo causing crash in remove_repository(), add test cases. + (LP: #269435) + * Merge some bug fixes from trunk: + - Update KDE UI according to recent GTK ui changes. (LP #268163) + - ui.py, set_handler_enable(): Fix reversed logic in determining + enable/disable strings. (LP: #269444) + - fglrx.py: Fix crash if Device section does not configure a driver + (LP: #269565) + - Test suite: check handler behaviour with invalid xorg.conf, fix a few + crashes uncovered by that. (LP: #258064) + - detection.py: Fix crashes if cupsd is not running. (LP: #256780, #255488) + - jockey-gtk: Call gtk.init_check() to test $DISPLAY, and print error + message instead of crashing. (LP: #234252) + - oslib.py, _save_module_blacklist(): Create modules.d directory if it + does not exist. (LP: #229065) + - jockey-gtk: Add license text dialog and link it to the license button + (LP: #269352) + - com.ubuntu.devicedriver.policy.in: Allow non-local driver install + (auth_admin). (LP: #269175) + - Move hardware detection from Backend ctor to separate function, and call + that with long D-BUS timeout and progress dialog. (LP: #253224) + - Various fixes in test suite. + + -- Martin Pitt Tue, 16 Sep 2008 08:10:35 -0700 + +jockey (0.5~alpha1-0ubuntu1) intrepid; urgency=low + + * New upstream release, Alpha 1 of upcoming 0.5: + - GTK user interface shows support and license status of a driver now. + (jockey-printer-driver-support blueprint). + - Refurbished workflow and look of the GTK user interface according to + Matthew Paul Thomas' recommendations. (LP: #268163) Corresponding + changes to the KDE UI are in the works, and will be merged soon. + - Uses X-Kit instead of guidance-backends now, update dependency. + (LP: #269057) + - Fix a few regressions of the PyKDE 4 port. + - Add support for recommended driver versions in the case of multiple + different available versions (such as with the Nvidia driver). + + -- Martin Pitt Fri, 12 Sep 2008 11:57:48 +0200 + +jockey (0.4.1+r360-0ubuntu1) intrepid; urgency=low + + * New upstream snapshot: + - Port KDE frontend to PyKDE, by Jonathan Thomas + + -- Jonathan Riddell Tue, 26 Aug 2008 16:57:30 +0100 + +jockey (0.4+r354-0ubuntu1) intrepid; urgency=low + + * New upstream snapshot: + - Add session D-BUS interface for jockey-gtk, so that programs like + system-config-printer can use the "search_driver" API to request a + driver for a particular hardware component with getting GUI. + - Full backend integration of OpenPrinting.org driver search. + - Various bug fixes. + * jockey/oslib.py: Use python-apt instead of calling apt-get, to get numeric + progress reporting instead of just pulsating. + * Add python-apt dependency, Ubuntu oslib.py uses it now. + * Bump Standards-Version (no changes). + * Bump debhelper build dependency version for dh_icons, thanks lintian. + * jockey/oslib.py: Provide an apt implementation for + {add,remove}_repository() and repository_enabled(). + * backend/jockey-backend: Enable the OpenPrinting.org driver lookup by + default, so that we can test it in intrepid. There is no UI to point out + that these are community provided drivers, this will be done in a later + release. + + -- Martin Pitt Fri, 15 Aug 2008 18:21:08 +0200 + +jockey (0.4+r345-0ubuntu1) intrepid; urgency=low + + * Use upstream snapshot as orig.tar.gz, so that file executable permissions + do not get lost when they are shipped in the diff.gz. This caused the + backend to be installed non-executable. (LP: #251347) + + -- Martin Pitt Thu, 24 Jul 2008 14:24:24 +0200 + +jockey (0.4-0ubuntu2) intrepid; urgency=low + + * jockey/oslib.py, {install,remove}_package(): Explicitly set $PATH, so that + apt-get and dpkg have a chance of working when being called from a D-BUS + spawned process (whose environment has virtually nothing at all). + + -- Martin Pitt Wed, 23 Jul 2008 23:41:14 +0200 + +jockey (0.4-0ubuntu1) intrepid; urgency=low + + * New upstream release 0.4: + - Implements an XML-RPC client for querying a driver database, as + specified on this year's LinuxFoundation Collaboration Summit. There is + no server implementation for this yet, though. + - Add general support for third-party repositories and packages not yet + known to the local system. In the course of this, the functionality of + DriverPackageHandler became merged into the generic Handler class, and + ModulePackageHandler became obsolete (KernelModuleHandler now does all + of this). This made the code a bit shorter and easier, too. + - Add support for python-coverage in the test suite, and add a lot of + missing tests. + - Lots of bug fixes. + * Update to current trunk bzr head: + - Split into privileged D-BUS backend and unprivileged frontends, control + access with PolicyKit. This gets rid of the nasty "gksu/kdesu myself" + code, and makes the service more useful for other desktop applications + which look for drivers. + - Support fourth field in modalias files for specifying a package name (as + done by nvidia-XX-modaliases packages). + - Update NVidia handler to get along with the multiple-versions packages + in Intrepid. + * debian/jockey-common.install: Install D-BUS and PolicyKit configuration + files, and jockey-backend program. + * data/handlers/b43.py: Update to new upstream infrastructure. + * jockey/oslib.py: Reimplement {install,remove}_package() using simple + apt-get calls, with no precise progress information. This is a + quick'n'dirty hack for Intrepid Alpha-3, so that the user at least gets + some kind of visual feedback on package installation. This will be cleaned + up later. + * debian/control: Add python-dbus, policykit dependencies to -common, and + policykit-gnome dependency to -gtk. + * debian/control: Recommend nvidia-common to provide out-of-the-box + detection of nvidia cards, and their matching driver. + + -- Martin Pitt Wed, 23 Jul 2008 16:38:17 +0200 + +jockey (0.3.3-0ubuntu10) intrepid; urgency=low + + * Drop Recommends: of linux-restricted-modules. They transitively pull in + lilo into ubuntu-desktop, and with the split-out fglrx and nvidia drivers + they do not even make sense any more. + + -- Martin Pitt Mon, 14 Jul 2008 09:54:22 +0100 + +jockey (0.3.3-0ubuntu9) intrepid; urgency=low + + * Upload fixes from hardy-proposed to intrepid. + + -- Martin Pitt Mon, 05 May 2008 20:49:10 +0200 + +jockey (0.3.3-0ubuntu8) hardy-proposed; urgency=low + + * fglrx.py: Do not override already installed third-party fglrx driver with + --check-composite. (LP: #221968) + * debian/control: Updated Vcs-Bzr: to point to the hardy branch. + * XorgDriverHandler, nvidia, fglrx: Set identifiers for newly created + sections, they are invalid without one. Thanks to Laszlo Pandy! + (LP: #218478) + * nvidia.py: Fix "enabled" handling: check if the package is installed and + module not blacklisted. (LP: #216650) + * OSLib.open_app(): Wait until the subprocess returned, so that we can check + the system state afterwards. (prerequisite for change below) + * jockey/ui.py, --check-composite: Re-check the system after attempting to + enable the driver, and only signal success (exit with 0) if the driver was + actually enabled. Otherwise, cancelling installation would invalidly + signal success to the caller. (LP: #208026) + + -- Martin Pitt Mon, 28 Apr 2008 19:24:11 +0200 + +jockey (0.3.3-0ubuntu7) hardy; urgency=low + + * Cherrypick a few bug fixes from trunk: + - nvidia.py: Drop AddARGBVisuals and AddARGBGLXVisuals options from legacy + driver. (LP: #211752) + - fglrx.py: Fix detection of autodetected radeon driver. (LP: #207957) + - jockey/ui.py: Intercept IOErrors when writing to stderr. (LP: #204120) + + -- Martin Pitt Tue, 08 Apr 2008 19:34:23 -0500 + +jockey (0.3.3-0ubuntu6) hardy; urgency=low + + * Cherrypick a few bug fixes from trunk: + - nvidia.py: Fix extra screen options to get quoted properly. + (LP: #211368) + - autostart .desktop files: Add Comment field. (LP: #146918) + - POTFILES.in: Add missing desktop files. + + -- Martin Pitt Sun, 06 Apr 2008 11:24:00 -0600 + +jockey (0.3.3-0ubuntu5) hardy; urgency=low + + * jockey/oslib.py: Fix undeclared 'env' variable, residue from fix in + 0.3.3-0ubuntu3. (LP: #189611) + + -- Martin Pitt Fri, 04 Apr 2008 09:16:08 +0200 + +jockey (0.3.3-0ubuntu4) hardy; urgency=low + + * debian/jockey-common.postinst: Remove old restricted-manager autostart XDG + file on upgrades. + + -- Martin Pitt Thu, 03 Apr 2008 18:07:22 +0200 + +jockey (0.3.3-0ubuntu3) hardy; urgency=low + + * jockey/oslib.py: Do not set debconf priority to critical any more. + b43-fwcutter needs the "download firmware" question shown in order to + actually download the firmware, and we do not need it ATM for other + packages. (LP: #197819) + + -- Martin Pitt Thu, 03 Apr 2008 14:49:12 +0200 + +jockey (0.3.3-0ubuntu2) hardy; urgency=low + + * Merge to upstream trunk to pick up a few bug fixes: + - nvidia.py: Add AddARGBGLXVisuals option to Screen section for + nvidia-glx. (LP: #154596) + - nvidia.py: Do not advertise as enabling composite if driver is already + loaded (i. e. installed manually). (LP: #202802) + - fglrx.py: Do not suggest installing fglrx if using the radeon X.org + driver, since that already supports composite (LP: #207957) + - jockey/ui.py: Change --update-db to print an error message instead of + exception (LP: #209594) + - If rebinding a module fails, trigger reboot notification. (LP: #207928) + + -- Martin Pitt Tue, 01 Apr 2008 20:40:50 +0200 + +jockey (0.3.3-0ubuntu1) hardy; urgency=low + + * New upstream bug fix release: + - jockey/xorg_driver.py: Check if _row attribute is present, which is not + the case for Subsections in the "Module" section. (LP: #201160) + - Make --check-composite ask for confirmation. (LP: #202898) + - Enable AddARGBGLXVisuals option for standard nvidia driver. + (LP: #154596) + - KDE: Do not change check boxes if enabling was cancelled. + - KDE: Drop unicode() conversion in confirm_action(), strings are already + unicode (LP: #206169) + - KDE: Disable help button if help is not available. (LP #206169) + + -- Martin Pitt Thu, 27 Mar 2008 12:41:53 +0100 + +jockey (0.3.2-0ubuntu3) hardy; urgency=low + + * Cherrypick some bug fixes from trunk: + - Add automatic testing for all shipped custom handlers in examples/ and + data/handlers/. So far the test suite only covered the standard + handlers. + - This uncovered that the fglrx and nvidia handlers still crash if + xorg.conf does not have a Screen section; fixed for real now. + (LP: #200832) + * data/handlers/b43.py: Add missing import (also uncovered by above test + suite). (LP: #203958) + + -- Martin Pitt Thu, 20 Mar 2008 16:30:32 +0100 + +jockey (0.3.2-0ubuntu2) hardy; urgency=low + + * Final 0.3.2 release (previous Ubuntu upload had a botched version number) + with bug fixes only (no new features). This time also with orig.tar.gz + again. + - fglrx, nvidia handlers: Create screen section if it does not exist. + (LP: #200832) + - Abort gracefully with a proper error message if cache directory does not + exist. (LP: #198433) + - ui.py, check(): Intercept ValueError from package query. This can happen + if the daily apt cron job runs while jockey is running as well and + temporarily causes inconsistent package indexes. (LP: #200089) + - kde/jockey-kde, comfirm_action(): Fix string formatting. (LP: #197777) + - jockey/oslib.py: Fix calling of kdesu. + - kde/jockey-kde: Make --check notifications actually work (LP: #193985) + - Fix the KDE interface test suite. + * debian/rules: Fix apport hook file name. + * debian/apport_hook.py: Add missing import. + * data/handlers/b43.py: Consider driver enabled if firmware files are + installed; testing whether b43-fwcutter is installed (the default + behaviour of ModulePackageHandler) is incorrect here. (LP: #198341) + + -- Martin Pitt Tue, 18 Mar 2008 17:28:32 +0100 + +jockey (0.3.2-0ubuntu1) hardy; urgency=low + + * New upstream bug fix release for KDE frontend changes: + - Add Oxygen icon + - Resize columns to text + - Nodes expanded by default + + -- Ryan Kavanagh Thu, 13 Mar 2008 19:26:16 +0000 + +jockey (0.3.1-0ubuntu1) hardy; urgency=low + + * New upstream bug fix release: + - Fix 'used' detection of nVidia driver. + - Add README.txt. + - Create default xorg.conf if it does not exist. + - More efficient modalias data structures for great detection stage + speedup (typically from > 5 to about 1 second). + - Run --check with niceness 10 and change autostart desktop files to delay + it by a minute, so that it does not slow down session startup. + - Fix --enable and --disable to not ask for confirmation, otherwise they + are useless in noninteractive scripts. + * oslib.py: Cache "apt-cache show" results. + * oslib.py: If we do not have a $DISPLAY, just call apt-get, not + x-terminal-emulator. + + -- Martin Pitt Mon, 10 Mar 2008 15:42:03 +0100 + +jockey (0.3-0ubuntu1) hardy; urgency=low + + * Merge with trunk to update to the 0.3 release. We already had all the new + features like the KDE interface, so this only imports bug fixes, in + particular: + - Update fglrx handler for current upstream version, to actually work + again at all (DisplayDepth) and declare support for composite. Thanks to + Sander Jonkes! (LP: #194963) + - Quiesce backtraces from failed handler instantiation. (LP: #195548) + - Use regular expressions, not fnmatch for modalias pattern matching, + since we do not want to treat '[' and ']' specially. (LP: #193521) + - Port --enable and --disable options from restricted-manager. + (LP: #181832) + - Port --check-composite from restricted-manager. (LP: #193978) + * Fixed Vcs-Bzr field. + * Remove do-release from this branch, it's only useful for upstream + developers on trunk and confusing in the package. + * debian/jockey-common.postinst: Remove --check cache on upgrade from + << 0.3, since the format changed (much more robust now). + + -- Martin Pitt Tue, 04 Mar 2008 16:48:50 +0100 + +jockey (0.2-0ubuntu6) hardy; urgency=low + + * rebuild due to python-central issue + + -- Sebastien Bacher Tue, 19 Feb 2008 22:08:52 +0100 + +jockey (0.2-0ubuntu5) hardy; urgency=low + + * Add debug logging for enabled() to XorgDriver and ModulePackageHandler. + (Cherrypicked from trunk) + * Make window title consistent to .desktop files. (LP: #189689) + (Cherrypicked from trunk) + + -- Martin Pitt Tue, 19 Feb 2008 09:38:46 +0100 + +jockey (0.2-0ubuntu4) hardy; urgency=low + + * Merged Martin Böhm's KDE implementation, thanks a lot! + + -- Martin Pitt Thu, 14 Feb 2008 18:55:10 +0100 + +jockey (0.2-0ubuntu3) hardy; urgency=low + + * At least on current kernel, devices on the SSB bus do not produce modalias + files, they just mention it in 'uevent'. Add detection for those, so that + autodetection of Broadcom wifis (b43 driver) works. (Cherrypicked from + trunk). + * Do not ignore custom handlers which wrap a standard kernel module (which + are ignored by default). (Cherrypicked from trunk) + * Add data/handlers/b43.py: Handler for the b43 Broadcom Wifi module. + + -- Martin Pitt Mon, 11 Feb 2008 09:58:23 +0100 + +jockey (0.2-0ubuntu2) hardy; urgency=low + + * Stop running the tests during build, they need too many build deps. + + -- Martin Pitt Tue, 05 Feb 2008 09:30:48 +0100 + +jockey (0.2-0ubuntu1) hardy; urgency=low + + * New upstream bug fix release: + - Do not create default handlers for nonexisting kernel modules. + (LP: #187148) + - Suppress exceptions (like SIGPIPE) in logging. (LP: #188658) + - Enable UseEdidFreqs for legacy NVidia driver. (LP: #151141) + - Set proper window icon. (LP: #187073) + - Clean up strings in .desktop files (LP: #150205) + - Fix test suite exit code on success. + - Do not set AddARGB{,GLX}Visuals options in standard and new nVidia + handler any more (obsolete). + - Support hiding of help button if help is not available. + * tests/oslib.py: Add simple tests for Ubuntu implementation of package + system query functions. + * jockey/oslib.py, package_description(): Do not crash when apt-cache show + succeeds, but prints nothing. This works around apt bug #18306. + (LP: #186943) + * tests/oslib.py: Add shallow test cases for {install,remove}_packge() to + ensure that they won't crash for the simplest reasons. This reproduces + #186584. + * jockey/oslib.py: Add missing import of time. (LP: #186584, #186883) + * jockey/oslib.py, ui_help_available(): Only show help if yelp is present. + (LP: #186179) + * debian/rules: Run test suite during build (failure causes FTBFS). + + -- Martin Pitt Mon, 04 Feb 2008 18:53:26 +0100 + +jockey (0.1-0ubuntu1) hardy; urgency=low + + * First upstream release 0.1: + - Add installed_packages status file, so that the ubiquity hook actually + works. + - Add test suite for GTK frontend (run through all widgets). + - Import usable translations from restricted-manager. + - Some internal code architecture cleanup. + - Some bug fixes, particularly in FirmwareHandler and build system. + * debian/rules: Remove POT on clean. + + -- Martin Pitt Thu, 31 Jan 2008 12:53:36 +0100 + +jockey (0.1~r139) hardy; urgency=low + + * Add missing python-distutils-extra dependency. + + -- Martin Pitt Fri, 25 Jan 2008 09:20:43 +0000 + +jockey (0.1~r118) hardy; urgency=low + + * Initial release, result of completely rewriting restricted-manager to be + maintainable, robust, and suitable for other distributions. Some features + and the KDE UI still need to be ported. + * See restricted-manager-rewrite specification for details. + + -- Martin Pitt Thu, 17 Jan 2008 15:02:40 +0100 --- jockey-0.5~beta3.orig/debian/jockey-common.postinst +++ jockey-0.5~beta3/debian/jockey-common.postinst @@ -0,0 +1,19 @@ +#!/bin/sh -e + +if [ "$1" = configure ] || [ "$1" = reconfigure ]; then + getent group admin > /dev/null 2>&1 || addgroup --system --quiet admin + chown root:admin /var/cache/jockey + chmod 3775 /var/cache/jockey + + if dpkg --compare-versions "$2" lt-nl "0.3"; then + # format changed between 0.2 and 0.3 + rm -f /var/cache/jockey/check + fi + + # clean up after restricted-manager->jockey package transition + if dpkg --compare-versions "$2" lt "0.3.3-0ubuntu3"; then + rm -f /etc/xdg/autostart/restricted-manager.desktop + fi +fi + +#DEBHELPER# --- jockey-0.5~beta3.orig/debian/jockey-common.install +++ jockey-0.5~beta3/debian/jockey-common.install @@ -0,0 +1,9 @@ +usr/lib/python* +usr/share/icons +usr/share/locale +usr/share/jockey/modaliases +usr/share/jockey/handlers +etc/dbus-1/system.d/ +usr/share/dbus-1/system-services +usr/share/PolicyKit/policy +usr/share/jockey/jockey-backend --- jockey-0.5~beta3.orig/debian/copyright +++ jockey-0.5~beta3/debian/copyright @@ -0,0 +1,25 @@ +This package has been debianized by Martin Pitt + on January 17, 2008. + +Copyright (C) 2007, 2008 Canonical Ltd. +Authors: + Martin Pitt + Martin Böhm + + 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +On Debian systems, the complete text of the GNU General +Public License can be found in `/usr/share/common-licenses/GPL'. + --- jockey-0.5~beta3.orig/debian/apport_hook.py +++ jockey-0.5~beta3/debian/apport_hook.py @@ -0,0 +1,15 @@ +import os.path, os + +XORG_CONF = '/etc/X11/xorg.conf' + +def add_info(report): + try: + report['XorgConf'] = open(XORG_CONF).read() + except IOError: + pass + + report['Devices'] = '' + for dirpath, dirnames, filenames in os.walk("/sys/devices"): + if "modalias" in filenames: + modalias = open(os.path.join(dirpath, "modalias")).read().strip() + report['Devices'] += modalias + "\n" --- jockey-0.5~beta3.orig/debian/jockey-common.dirs +++ jockey-0.5~beta3/debian/jockey-common.dirs @@ -0,0 +1 @@ +/var/cache/jockey --- jockey-0.5~beta3.orig/debian/pycompat +++ jockey-0.5~beta3/debian/pycompat @@ -0,0 +1 @@ +2 --- jockey-0.5~beta3.orig/debian/compat +++ jockey-0.5~beta3/debian/compat @@ -0,0 +1 @@ +5 --- jockey-0.5~beta3.orig/debian/jockey.ubiquity +++ jockey-0.5~beta3/debian/jockey.ubiquity @@ -0,0 +1,14 @@ +#!/bin/sh -e + +# install all packages that were pulled in by enabling modules in +# jockey, since we do save the X.org configuration already. Without the +# accompanying driver packages (like nvidia-glx), the target system would be +# wrecked. + +PKGLIST=/var/cache/jockey/installed_packages + +[ -e $PKGLIST ] || exit 0 + +for p in `cat $PKGLIST`; do + apt-install $p +done --- jockey-0.5~beta3.orig/debian/control +++ jockey-0.5~beta3/debian/control @@ -0,0 +1,56 @@ +Source: jockey +Section: admin +Priority: optional +Build-Depends: cdbs (>= 0.4.43), debhelper (>= 5.0.51), + python-central (>= 0.5.6), python-distutils-extra (>= 1.91.1), + python-dev (>= 2.5), python-qt4-dev (>=4.3.3-2ubuntu1), + python-kde4-dev +Maintainer: Martin Pitt +Standards-Version: 3.8.0 +XS-Python-Version: current +Vcs-Bzr: https://code.launchpad.net/~ubuntu-core-dev/jockey/ubuntu + +Package: jockey-common +Architecture: all +XB-Python-Version: ${python:Versions} +Depends: ${python:Depends}, python-xdg, python-xkit, python-dbus, python-apt, policykit +Recommends: nvidia-common, fglrx-modaliases +Conflicts: restricted-manager-core +Replaces: restricted-manager-core +Provides: restricted-manager-core +Description: user interface and desktop integration for driver management + Jockey provides a user interface for configuring third-party drivers, + such as the Nvidia and ATI fglrx X.org and various Wireless LAN + kernel modules. + . + This package contains the common data shared between the frontends. + +Package: jockey-gtk +Architecture: all +XB-Python-Version: ${python:Versions} +Depends: ${python:Depends}, jockey-common (= ${binary:Version}), + python-notify (>= 0.1.1-0ubuntu2), python-glade2, python-xdg, synaptic, + policykit-gnome +Conflicts: restricted-manager +Replaces: restricted-manager +Provides: restricted-manager +Description: GNOME user interface and desktop integration for driver management + Jockey provides a user interface for configuring third-party drivers, + such as the Nvidia and ATI fglrx X.org and various Wireless LAN + kernel modules. + . + This package contains the GNOME frontend. + +Package: jockey-kde +Architecture: all +XB-Python-Version: ${python:Versions} +Depends: ${python:Depends}, jockey-common (= ${binary:Version}), python-kde4, kdebase-runtime +Conflicts: restricted-manager-kde +Replaces: restricted-manager-kde +Provides: restricted-manager-kde +Description: KDE user interface and desktop integration for driver management + Jockey provides a user interface for configuring third-party drivers, + such as the Nvidia and ATI fglrx X.org and various Wireless LAN + kernel modules. + . + This package contains the KDE frontend. --- jockey-0.5~beta3.orig/debian/jockey-common.postrm +++ jockey-0.5~beta3/debian/jockey-common.postrm @@ -0,0 +1,7 @@ +#!/bin/sh -e + +if [ "$1" = remove ]; then + rm -rf /var/cache/jockey +fi + +#DEBHELPER# --- jockey-0.5~beta3.orig/debian/jockey-kde.install +++ jockey-0.5~beta3/debian/jockey-kde.install @@ -0,0 +1,3 @@ +usr/bin/*-kde +usr/share/applications/*-kde.* +usr/share/autostart/*-kde.desktop etc/xdg/autostart/ --- jockey-0.5~beta3.orig/data/modalias-overrides/disable-upstream-nvidia +++ jockey-0.5~beta3/data/modalias-overrides/disable-upstream-nvidia @@ -0,0 +1,6 @@ +# the nvidia modules have catch-all modaliases, which is wrong; kill +# them off here, and use the linux-restricted-modules overrides files +# instead (which are evaluated later than this file) +reset nvidia +reset nvidia_new +reset nvidia_legacy --- jockey-0.5~beta3.orig/data/handlers/fglrx.py +++ jockey-0.5~beta3/data/handlers/fglrx.py @@ -0,0 +1,75 @@ +# -*- coding: utf-8 -*- +# (c) 2008 Canonical Ltd. +# Author: Martin Pitt +# License: GPL v2 or later + +import XKit.xorgparser +from jockey.xorg_driver import XorgDriverHandler + +# dummy stub for xgettext +def _(x): return x + +class FglrxDriver(XorgDriverHandler): + def __init__(self, backend): + self._free = False + XorgDriverHandler.__init__(self, backend, 'fglrx', 'xorg-driver-fglrx', + 'fglrx', 'ati', add_modules=['glx'], disable_modules=[], + name=_('ATI/AMD proprietary FGLRX graphics driver'), + description=_('3D-accelerated proprietary graphics driver for ' + 'ATI cards.'), + rationale=_('This driver is required to fully utilise the 3D ' + 'potential of some ATI graphics cards, as well as provide ' + '2D acceleration of newer cards.')) + + def enable_config_hook(self): + # TODO: this method should look for the right Screen section(s) and + # if none can be found, use section 0. use get_devices_from_serverlayout() + + # X.org does not work otherwise + if len(self.xorg_conf.globaldict['Screen']) == 0: + self.xorg_conf.makeSection('Screen', identifier='Default Screen') + + self.xorg_conf.addOption('Screen', 'DefaultDepth', '24', position=0, prefix='') + + # make sure that RGB path is not in the xorg.conf otherwise xorg will crash + it = 0 + for section in self.xorg_conf.globaldict['Files']: + try: + self.xorg_conf.removeOption('Files', 'RgbPath', position=it) + except (XKit.xorgparser.OptionException): + pass + it += 1 + + # remove any Disable "dri2" otherwise amdcccle will crash + module_sections = self.xorg_conf.globaldict['Module'] + have_modules = len(module_sections) > 0 + + if have_modules: + for section in module_sections: + self.xorg_conf.removeOption('Module', 'Disable', value='dri2', position=section) + + def disable(self): + # make sure that fglrx-kernel-source is removed too + XorgDriverHandler.disable(self) + kernel_source = 'fglrx-kernel-source' + self.backend.remove_package(kernel_source) + return False + + def enables_composite(self): + '''Return whether this driver supports the composite extension.''' + + if not self.xorg_conf: + return False + + # the radeon X.org driver supports composite nowadays, so don't force + # installation of fglrx upon those users. Treat absent driver + # configuration as radeon, since that's what X.org should autodetect. + # Only suggest fglrx if people use something else, like vesa. + try: + if self.xorg_conf.getDriver('Device', 0) in ['fglrx', 'ati', 'radeon', None]: + return False + except (XKit.xorgparser.OptionException, XKit.xorgparser.SectionException), error: + return True # unconfigured driver -> defaults to ati + + return True + --- jockey-0.5~beta3.orig/data/handlers/broadcom_wl.py +++ jockey-0.5~beta3/data/handlers/broadcom_wl.py @@ -0,0 +1,72 @@ +# (c) 2008 Canonical Ltd. +# Author: Martin Pitt +# License: GPL v2 or later + +import re, os.path, logging, subprocess +from glob import glob + +from jockey.oslib import OSLib +from jockey.handlers import KernelModuleHandler + +# dummy stub for xgettext +def _(x): return x + +class BroadcomWLHandler(KernelModuleHandler): + '''Handler for Broadcom Wifi chipsets which use the wl module.''' + + def __init__(self, ui): + self.bl_file = os.path.join(os.path.dirname( + OSLib.inst.module_blacklist_file), 'blacklist-bcm43') + self._free = False + if KernelModuleHandler.module_loaded('b44'): + raise SystemError, 'BroadcomWLHandler: would break b44, disabling myself' + + KernelModuleHandler.__init__(self, ui, 'wl', + name=_('Broadcom STA wireless driver')) + + def enabled(self): + km = KernelModuleHandler.enabled(self) + bcm = OSLib.inst.module_blacklisted('bcm43xx') + b43 = OSLib.inst.module_blacklisted('b43') + b43_legacy = OSLib.inst.module_blacklisted('b43_legacy') + logging.debug('BroadcomWLHandler enabled(): kmod %s, bcm43xx: %s, b43: %s, b43_legacy: %s' % ( + km and 'enabled' or 'disabled', + bcm and 'blacklisted' or 'enabled', + b43 and 'blacklisted' or 'enabled', + b43_legacy and 'blacklisted' or 'enabled')) + + return km and bcm and b43 and b43_legacy + + def used(self): + '''Return if the handler is currently in use.''' + + return KernelModuleHandler.used(self) and self.enabled() and \ + not (KernelModuleHandler.module_loaded('b43') or + KernelModuleHandler.module_loaded('b43_legacy') or + KernelModuleHandler.module_loaded('bcm43xx')) + + def enable(self): + '''Disable b43 drivers, so that wl can become active.''' + + if not os.path.exists(self.bl_file): + f = open(self.bl_file, 'w') + f.write('''blacklist bcm43xx +blacklist b43 +blacklist b43_legacy +blacklist ssb +''') + f.close() + OSLib.inst._load_module_blacklist() + subprocess.call(['/usr/sbin/update-initramfs', '-u']) + + KernelModuleHandler.enable(self) + + def disable(self): + '''Unblacklist b43 drivers again, so that they trump wl.''' + + if os.path.exists(self.bl_file): + os.unlink(self.bl_file) + OSLib.inst._load_module_blacklist() + subprocess.call(['/usr/sbin/update-initramfs', '-u']) + + KernelModuleHandler.disable(self) --- jockey-0.5~beta3.orig/data/handlers/nvidia.py +++ jockey-0.5~beta3/data/handlers/nvidia.py @@ -0,0 +1,137 @@ +# (c) 2008 Canonical Ltd. +# Author: Martin Pitt +# License: GPL v2 or later + +import logging + +from jockey.handlers import KernelModuleHandler +from jockey.xorg_driver import XorgDriverHandler +from jockey.oslib import OSLib +import XKit +from NvidiaDetector.nvidiadetector import NvidiaDetection + +# dummy stub for xgettext +def _(x): return x + +class NvidiaDriver(XorgDriverHandler): + def __init__(self, backend): + self._free = False + # use "None" as driver_package, since we have several; + # LocalKernelModulesDriverDB overwrites it later with the correct + # package from the modalias lists + XorgDriverHandler.__init__(self, backend, 'nvidia', None, + 'nvidia', 'nv', {'NoLogo': 'True'}, + add_modules=['glx'], disable_modules=[], + remove_modules=['dri', 'GLcore'], + name=_('NVIDIA accelerated graphics driver'), + description=_('3D-accelerated proprietary graphics driver for ' + 'NVIDIA cards.'), + rationale=_('This driver is required to fully utilise ' + 'the 3D potential of NVIDIA graphics cards, as well as provide ' + '2D acceleration of newer cards.\n\n' + 'If you wish to enable desktop effects, this driver is ' + 'required.\n\n' + 'If this driver is not enabled, you will not be able to ' + 'enable desktop effects and will not be able to run software ' + 'that requires 3D acceleration, such as some games.')) + + self._recommended = None + + def id(self): + '''Return an unique identifier of the handler.''' + + if self.package: + i = 'xorg:' + self.module + '-' + self.package.split('-')[-1] + else: + i = 'xorg:' + self.module + if self.driver_vendor: + i += ':' + self.driver_vendor.replace(' ', '_') + return i + + def name(self): + name = XorgDriverHandler.name(self) + if self.package: + name += ' (' + _('version %s') % self.package.split('-')[-1] + ')' + return name + + def available(self): + if self.package: + version = int(self.package.split('-')[-1]) + if version < 96: + logging.debug('NVIDIA legacy driver not currently supported') + return False + return XorgDriverHandler.available(self) + + def enable_config_hook(self): + # set DefaultDepth to 24; X.org does not work otherwise + if len(self.xorg_conf.globaldict['Screen']) == 0: + screen = self.xorg_conf.makeSection('Screen', identifier='Default Screen') + + self.xorg_conf.addOption('Screen', 'DefaultDepth', '24', position=0, prefix='') + + # version 96 needs AddARGBGLXVisuals + if self.package and self.package.endswith('-96'): + self.xorg_conf.addOption('Screen', 'AddARGBGLXVisuals', 'True', optiontype='Option', position=0) + + # version 71 needs a couple of extra driver options + if self.package and self.package.endswith('-71'): + for opt in ('AllowGLXWithComposite', 'UseEdidFreqs'): + self.xorg_conf.addOption('Device', opt, 'True', optiontype='Option', position=0) + + # make sure that RGB path is not in the xorg.conf otherwise xorg will crash + it = 0 + for section in self.xorg_conf.globaldict['Files']: + try: + self.xorg_conf.removeOption('Files', 'RgbPath', position=it) + except (XKit.xorgparser.OptionException): + pass + it += 1 + + # remove any Disable "dri2" otherwise nvidia-settings and nvidia-xconfig will fail + module_sections = self.xorg_conf.globaldict['Module'] + have_modules = len(module_sections) > 0 + + if have_modules: + for section in module_sections: + self.xorg_conf.removeOption('Module', 'Disable', value='dri2', position=section) + + def disable(self): + # make sure that nvidia-VER-kernel-source is removed too + XorgDriverHandler.disable(self) + if self.package: + flavour = self.package.split('-')[-1]#e.g. 177 + kernel_source = 'nvidia-%s-kernel-source' % (flavour) + self.backend.remove_package(kernel_source) + return False + + def recommended(self): + if self._recommended == None: + nd = NvidiaDetection() + self._recommended = self.package == nd.selectDriver() + return self._recommended + + def enabled(self): + #if self.xorg_conf has NoneType, AttributeError will be raised + try: + devices = self.xorg_conf.globaldict['Device'] + try: + driver = self.xorg_conf.getDriver('Device', 0) + except (XKit.xorgparser.OptionException, XKit.xorgparser.SectionException): + driver = None + if len(devices) == 0 or driver != 'nvidia': + return False + except AttributeError: + return False + return KernelModuleHandler.enabled(self) + + def enables_composite(self): + '''Return whether this driver supports the composite extension.''' + + # When using an upstream installation, or -new/-legacy etc., we already + # have composite + if KernelModuleHandler.module_loaded('nvidia'): + logging.debug('enables_composite(): already using nvidia driver from nondefault package') + return False + + # neither vesa nor nv support composite, so safe to say yes here + return True --- jockey-0.5~beta3.orig/data/handlers/b43.py +++ jockey-0.5~beta3/data/handlers/b43.py @@ -0,0 +1,60 @@ +# (c) 2008 Canonical Ltd. +# Author: Martin Pitt +# License: GPL v2 or later + +import re, os.path, logging, subprocess +from glob import glob + +from jockey.handlers import KernelModuleHandler + +class B43Handler(KernelModuleHandler): + '''Handler for Broadcom Wifi chipsets which use the b43 module and + b43-fwcutter.''' + + def __init__(self, ui): + KernelModuleHandler.__init__(self, ui, 'b43') + self.package = 'b43-fwcutter' + + def enabled(self): + '''Return if the handler is enabled. + + 'Enabled' means that the user agreed to use this driver if it is + applicable. + ''' + return KernelModuleHandler.enabled(self) and \ + len(glob('/lib/firmware/b43/*.fw')) > 0 + + def used(self): + '''Return if the handler is currently in use.''' + + return KernelModuleHandler.used(self) and \ + len(glob('/lib/firmware/b43/*.fw')) > 0 + + def id(self): + '''Return an unique identifier of the handler.''' + + i = 'firmware:' + self.module + if self.driver_vendor: + i += ':' + self.driver_vendor.replace(' ', '_') + return i + + def enable(self): + '''Remove blacklist produced by BroadcomWLHandler.''' + + bl_file = '/etc/modprobe.d/blacklist-bcm43' + if os.path.exists(bl_file): + os.unlink(bl_file) + OSLib.inst._load_module_blacklist() + subprocess.call(['/usr/sbin/update-initramfs', '-u']) + + KernelModuleHandler.enable(self) + if os.path.exists('/usr/share/b43-fwcutter/install_bcm43xx_firmware.sh'): + subprocess.call(['/usr/share/b43-fwcutter/install_bcm43xx_firmware.sh']) + +class B43LegacyHandler(B43Handler): + '''Handler for Broadcom Wifi chipsets which use the b43legacy module and + b43-fwcutter.''' + + def __init__(self, ui): + KernelModuleHandler.__init__(self, ui, 'b43legacy') + self.package = 'b43-fwcutter' --- jockey-0.5~beta3.orig/data/handlers/sl_modem.py +++ jockey-0.5~beta3/data/handlers/sl_modem.py @@ -0,0 +1,41 @@ +# -*- coding: utf-8 -*- +# (c) 2008 Canonical Ltd. +# Author: Martin Pitt +# License: GPL v2 or later + +import re, os.path, logging + +from jockey.handlers import Handler + +# dummy stub for xgettext +def _(x): return x + +class SlModem(Handler): + def __init__(self, backend): + Handler.__init__(self, backend, name=_('Software modem'), + rationale=_( + 'This driver enables the usage of many software modems, as ' + 'commonly found in laptops.\n\n' + 'If this driver is not enabled, you will not be able to use ' + 'your modem.')) + self.package = 'sl-modem-daemon' + + self.modem_re = re.compile('^\s*\d+\s*\[Modem\s*\]') + + def available(self): + '''Check /proc/asound/cards for a "Modem" card.''' + + if Handler.available(self) == False: + return False + + try: + for l in open('/proc/asound/cards'): + if self.modem_re.match(l): + return True + except IOError, e: + logging.error('could not open /proc/asound/cards: %s' % str(e)) + + return False + + def used(self): + return self.enabled() and os.path.exists('/dev/modem') --- jockey-0.5~beta3.orig/jockey/oslib.py +++ jockey-0.5~beta3/jockey/oslib.py @@ -20,6 +20,10 @@ import fcntl, os, subprocess, sys, logging, re, tempfile from glob import glob +import warnings +warnings.simplefilter('ignore', FutureWarning) +import apt + class OSLib: '''Encapsulation of operating system/Linux distribution specific operations.''' @@ -81,58 +85,92 @@ self._load_module_blacklist() + self.apt_show_cache = {} + self.apt_sources = '/etc/apt/sources.list' + self.apt_jockey_source = '/etc/apt/sources.list.d/jockey.list' + # # The following package related functions use PackageKit; if that does not # work for your distribution, they must be reimplemented # + def _apt_show(self, package): + '''Return apt-cache show output, with caching. + + Return None if the package does not exist. + ''' + try: + return self.apt_show_cache[package] + except KeyError: + apt = subprocess.Popen(['apt-cache', 'show', package], + stdout=subprocess.PIPE, stderr=subprocess.PIPE) + out = apt.communicate()[0].strip() + if apt.returncode == 0 and out: + result = out + else: + result = None + self.apt_show_cache[package] = result + return result + def is_package_free(self, package): '''Return if given package is free software.''' - pkcon = subprocess.Popen(['pkcon', 'get-details', package], - stdout=subprocess.PIPE, stderr=subprocess.PIPE) - out = pkcon.communicate()[0] - m = re.search("^\s*license:\s*'(.*)'$", out, re.M) - if m: - # TODO: check more licenses here - return m.group(1).lower() in ('free', 'gpl', 'gplv2', 'gplv3', - 'bsd', 'mpl') - else: - raise ValueError, 'package %s does not exist' % package + # TODO: this only works for packages in the official archive + out = self._apt_show(package) + if out: + for l in out.splitlines(): + if l.startswith('Section:'): + s = l.split()[-1] + return not (s.startswith('restricted') or s.startswith('multiverse')) + + raise ValueError, 'package %s does not exist' % package def package_installed(self, package): '''Return if the given package is installed.''' - pkcon = subprocess.Popen(['pkcon', 'resolve', package], + dpkg = subprocess.Popen(["dpkg-query", "-W", "-f${Status}", package], stdout=subprocess.PIPE, stderr=subprocess.PIPE) - out = pkcon.communicate()[0] - return pkcon.returncode == 0 and '\ninstalled ' in out + out = dpkg.communicate()[0] + return dpkg.returncode == 0 and out.split()[-1] == "installed" def package_description(self, package): '''Return a tuple (short_description, long_description) for a package. This should raise a ValueError if the package is not available. ''' - pkcon = subprocess.Popen(['pkcon', 'get-details', package], - stdout=subprocess.PIPE, stderr=subprocess.PIPE) - out = pkcon.communicate()[0] - m = re.search("^\s*description:\s*'(.*?)'$", out, re.M | re.S) - if m: - # TODO: short description (not accessible with pkcon) - return (package, m.group(1)) - else: - raise ValueError, 'package %s does not exist' % package + out = self._apt_show(package) + if out: + lines = out.splitlines() + start = 0 + while start < len(lines)-1: + if lines[start].startswith('Description:'): + break + start += 1 + + short = lines[start].split(' ', 1)[1] + long = '' + for l in lines[start+1:]: + if l == ' .': + long += '\n\n' + elif l.startswith(' '): + long += l.lstrip() + else: + break + + return (short, long) + + raise ValueError, 'package %s does not exist' % package def package_files(self, package): '''Return a list of files shipped by a package. This should raise a ValueError if the package is not installed. ''' - pkcon = subprocess.Popen(['pkcon', 'get-files', package], + pkcon = subprocess.Popen(['dpkg', '-L', package], stdout=subprocess.PIPE, stderr=subprocess.PIPE) out = pkcon.communicate()[0] - if pkcon.returncode == 0 and '\n ' in out: - return [l.strip() for l in out.splitlines() if l.startswith(' ')] + if pkcon.returncode == 0: + return out.splitlines() else: raise ValueError, 'package %s is not installed' % package @@ -155,7 +193,45 @@ Any installation failure should be raised as a SystemError. ''' - raise NotImplementedError, 'subclasses need to implement this' + class MyFetchProgress(apt.FetchProgress): + def __init__(self, callback): + apt.FetchProgress.__init__(self) + self.callback = callback + + def pulse(self): + return not self.callback('download', int(self.percent/2+.5), 100) + + class MyInstallProgress(apt.InstallProgress): + def __init__(self, callback): + apt.InstallProgress.__init__(self) + self.callback = callback + + def statusChange(self, pkg, percent, status): + logging.debug('install progress statusChange %s %f' % (pkg, percent)) + self.callback('install', int(percent/2+50.5), 100) + + logging.debug('Installing package: %s', package) + if progress_cb: + progress_cb('download', 0, 100.0) + + os.environ['DEBIAN_FRONTEND'] = 'noninteractive' + os.environ['PATH'] = '/sbin:/usr/sbin:/bin:/usr/bin' + + c = apt.Cache() + try: + try: + c[package].markInstall() + except KeyError: + logging.debug('Package %s does not exist, aborting', package) + return False + c.commit(progress_cb and MyFetchProgress(progress_cb) or None, + progress_cb and MyInstallProgress(progress_cb) or None) + except apt.cache.FetchCancelledException, e: + return False + except (apt.cache.LockFailedException, apt.cache.FetchFailedException), e: + logging.warning('Package fetching failed: %s', str(e)) + raise SystemError, str(e) + return True def remove_package(self, package, progress_cb): '''Uninstall the given package. @@ -170,7 +246,33 @@ Any removal failure should be raised as a SystemError. ''' - raise NotImplementedError, 'subclasses need to implement this' + os.environ['DEBIAN_FRONTEND'] = 'noninteractive' + os.environ['PATH'] = '/sbin:/usr/sbin:/bin:/usr/bin' + + class MyInstallProgress(apt.InstallProgress): + def __init__(self, callback): + apt.InstallProgress.__init__(self) + self.callback = callback + + def statusChange(self, pkg, percent, status): + logging.debug('remove progress statusChange %s %f' % (pkg, percent)) + self.callback(percent, 100.0) + + logging.debug('Removing package: %s', package) + + c = apt.Cache() + try: + try: + c[package].markDelete() + except KeyError: + logging.debug('Package %s does not exist, aborting', package) + return False + c.commit(None, progress_cb and MyInstallProgress(progress_cb) or None) + except apt.cache.LockFailedException, e: + logging.debug('could not lock apt cache, aborting: %s', str(e)) + raise SystemError, str(e) + + return True def packaging_system(self): '''Return packaging system. @@ -193,19 +295,63 @@ This should throw a ValueError if the repository is invalid or inaccessible. ''' - raise NotImplementedError, 'subclasses need to implement this' + if self.repository_enabled(repository): + logging.debug('add_repository(%s): already active', repository) + return + + if os.path.exists(self.apt_jockey_source): + backup = self.apt_jockey_source + '.bak' + os.rename(self.apt_jockey_source, backup) + else: + backup = None + f = open(self.apt_jockey_source, 'w') + print >> f, repository.strip() + f.close() + + try: + # TODO: progress feedback + c = apt.Cache() + c.update() + except SystemError, e: + logging.error('add_repository(%s): Invalid repository', repository) + if backup: + os.rename(backup, self.apt_jockey_source) + else: + os.unlink(self.apt_jockey_source) + raise ValueError(e.message) def remove_repository(self, repository): '''Remove a repository. The format for repository is distribution specific. ''' - raise NotImplementedError, 'subclasses need to implement this' + if not os.path.exists(self.apt_jockey_source): + return + result = [] + for line in open(self.apt_jockey_source): + if line.strip() != repository: + result.append(line) + if result: + f = open(self.apt_jockey_source, 'w') + f.write('\n'.join(result)) + f.close() + else: + os.unlink(self.apt_jockey_source) def repository_enabled(self, repository): '''Check if given repository is enabled.''' - raise NotImplementedError, 'subclasses need to implement this' + for f in [self.apt_sources] + glob(self.apt_sources + '.d/*.list'): + try: + logging.debug('repository_enabled(%s): checking %s', repository, f) + for line in open(f): + if line.strip() == repository: + logging.debug('repository_enabled(%s): match', repository) + return True + except IOError: + pass + logging.debug('repository_enabled(%s): no match', repository) + return False def ui_help_available(self, ui): '''Return if help is available. @@ -213,7 +359,7 @@ This gets the current UI object passed, which can be used to determine whether GTK/KDE is used, etc. ''' - return False + return os.access('/usr/bin/yelp', os.X_OK) def ui_help(self, ui): '''The UI's help button was clicked. @@ -222,7 +368,10 @@ appropriate topic, etc. This gets the current UI object passed, which can be used to determine whether GTK/KDE is used, etc. ''' - pass + if 'gtk' in str(ui.__class__).lower(): + import gobject + gobject.spawn_async(["yelp", "ghelp:hardware#restricted-manager"], + flags=gobject.SPAWN_SEARCH_PATH) # # The following functions have a reasonable default implementation for @@ -256,7 +405,26 @@ Note that modules which are ignored here, but covered by a custom handler will still be considered. ''' - return set() + # try to get a *.ko file list from the main kernel package to avoid testing + # known-free drivers + dpkg = subprocess.Popen(['dpkg', '-L', 'linux-image-' + os.uname()[2]], + stdout=subprocess.PIPE, stderr=subprocess.PIPE) + out = dpkg.communicate()[0] + result = set() + if dpkg.returncode == 0: + for l in out.splitlines(): + if l.endswith('.ko'): + result.add(os.path.splitext(os.path.basename(l))[0].replace('-', '_')) + + dpkg = subprocess.Popen(['dpkg', '-L', 'linux-ubuntu-modules-' + os.uname()[2]], + stdout=subprocess.PIPE, stderr=subprocess.PIPE) + out = dpkg.communicate()[0] + if dpkg.returncode == 0: + for l in out.splitlines(): + if l.endswith('.ko'): + result.add(os.path.splitext(os.path.basename(l))[0].replace('-', '_')) + + return result def module_blacklisted(self, module): '''Check if a module is on the modprobe blacklist.''' --- jockey-0.5~beta3.orig/jockey/ui.py +++ jockey-0.5~beta3/jockey/ui.py @@ -782,7 +782,13 @@ b = self.backend() def _srch(): - drivers = b.search_driver(hwid) + # TODO: this is a hack: when calling through D-BUS, specify a + # timeout, when calling a local object, the timeout parameter does + # not exist + if hasattr(b, '_locations'): + drivers = self._dbus_iface.search_driver(hwid, timeout=600) + else: + drivers = b.search_driver(hwid) self.current_search = (hwid, drivers) self._call_progress_dialog(self._( --- jockey-0.5~beta3.orig/jockey/backend.py +++ jockey-0.5~beta3/jockey/backend.py @@ -100,22 +100,25 @@ above. ''' try: - return fn(*args, **kwargs) + try: + return fn(*args, **kwargs) + except dbus.DBusException, e: + if e._dbus_error_name == PermissionDeniedByPolicy._dbus_error_name: + # last words in message are privilege and auth result + (priv, auth_result) = e.message.split()[-2:] + if auth_result.startswith('auth_'): + pk_auth = dbus.Interface(dbus.SessionBus().get_object( + 'org.freedesktop.PolicyKit.AuthenticationAgent', '/', False), + 'org.freedesktop.PolicyKit.AuthenticationAgent') + # TODO: provide xid + res = pk_auth.ObtainAuthorization(priv, dbus.UInt32(0), + dbus.UInt32(os.getpid()), timeout=300) + if res: + return fn(*args, **kwargs) + raise PermissionDeniedByPolicy(priv + ' ' + auth_result) + raise except dbus.DBusException, e: - if e._dbus_error_name == PermissionDeniedByPolicy._dbus_error_name: - # last words in message are privilege and auth result - (priv, auth_result) = e.message.split()[-2:] - if auth_result.startswith('auth_'): - pk_auth = dbus.Interface(dbus.SessionBus().get_object( - 'org.freedesktop.PolicyKit.AuthenticationAgent', '/', False), - 'org.freedesktop.PolicyKit.AuthenticationAgent') - # TODO: provide xid - res = pk_auth.ObtainAuthorization(priv, dbus.UInt32(0), - dbus.UInt32(os.getpid()), timeout=300) - if res: - return fn(*args, **kwargs) - raise PermissionDeniedByPolicy(priv + ' ' + auth_result) - elif e._dbus_error_name == InvalidModeException._dbus_error_name: + if e._dbus_error_name == InvalidModeException._dbus_error_name: raise InvalidModeException(e.message) elif e._dbus_error_name == UnknownHandlerException._dbus_error_name: raise UnknownHandlerException(e.message) @@ -204,11 +207,15 @@ raise InvalidModeException( 'invalid mode %s: must be "free", "nonfree", or "any"' % mode) - result = [] + recommended = [] + nonrecommended = [] for (h_id, h) in self.handlers.iteritems(): if h.free() == (mode == 'free'): - result.append(h_id) - return result + if h.recommended(): + recommended.append(h_id) + else: + nonrecommended.append(h_id) + return recommended + nonrecommended @dbus.service.method(DBUS_INTERFACE_NAME, in_signature='', out_signature='as', sender_keyword='sender', @@ -508,7 +515,8 @@ (t, i) = hwid.split(':', 1) hardware_id = detection.HardwareID(t, i) - result = set() + recommended = [] + nonrecommended = [] for db in self.driver_dbs: db.update([hardware_id]) handlers = detection.get_handlers(self, self.driver_dbs, @@ -517,9 +525,12 @@ id = h.id() if id not in self.handlers: self.handlers[id] = h - result.add(id) + if h.recommended(): + recommended.append(id) + else: + nonrecommended.append(id) - return list(result) + return recommended + nonrecommended @dbus.service.signal(DBUS_INTERFACE_NAME) def install_progress(self, phase, curr, total): --- jockey-0.5~beta3.orig/jockey/handlers.py +++ jockey-0.5~beta3/jockey/handlers.py @@ -616,7 +616,9 @@ i = 'printer:' + self.package else: i = 'printer:%s' % self.name() - if self.driver_vendor: + if self.version: + i += ':' + str(self.version) + elif self.driver_vendor: i += ':' + self.driver_vendor.replace(' ', '_') return i --- jockey-0.5~beta3.orig/jockey/detection.py +++ jockey-0.5~beta3/jockey/detection.py @@ -515,8 +515,12 @@ pkgsystem, pkgs[pkg].get('repositories', {})) return + desc = info.get('shortdescription', + info['name']).replace('', '').replace('', + '').replace('
', ' ') + did = DriverID(driver_type='printer_driver', - description={'C': info.get('shortdescription', info['name'])}, + description={'C': desc}, driver_vendor=info.get('supplier', 'openprinting.org').replace(' ', '_'), free=info.get('freesoftware', False), package=_pkgname_from_fname(pkg), @@ -541,6 +545,10 @@ s.get('level', 'voluntary'), s['url']) did.properties['long_description'] = {'C': desc} + # needed to disambiguate e. g. splix and splix2 + if driver != did.properties['package']: + did.properties['version'] = driver.replace('driver/', '') + if 'licensetext' in info: did.properties['license'] = info['licensetext'] @@ -972,6 +980,9 @@ for did in dids: h = _driverid_to_handler(did, backend, mode) if h: + if h.available() == False: + logging.debug('ignoring unavailable handler %s', h) + continue logging.debug('got handler %s', h) h._hwids.append(hwid) available_handlers.add(h) --- jockey-0.5~beta3.orig/po/POTFILES.in +++ jockey-0.5~beta3/po/POTFILES.in @@ -7,6 +7,7 @@ gtk/autostart/jockey-gtk.desktop.in kde/jockey-kde.desktop.in kde/autostart/jockey-kde.desktop.in -examples/handlers/sl_modem.py -examples/handlers/nvidia.py -examples/handlers/fglrx.py +data/handlers/sl_modem.py +data/handlers/nvidia.py +data/handlers/fglrx.py +data/handlers/broadcom_wl.py --- jockey-0.5~beta3.orig/po/de.po +++ jockey-0.5~beta3/po/de.po @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: jockey 0.1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2008-09-29 09:05+0200\n" +"POT-Creation-Date: 2008-10-17 19:48+0200\n" "PO-Revision-Date: 2007-03-19 09:13+0000\n" "Last-Translator: Martin Pitt \n" "Language-Team: German \n" @@ -15,127 +15,127 @@ "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: ../jockey/ui.py:79 +#: ../jockey/ui.py:93 msgid "Cannot connect to D-BUS" msgstr "Kann keine Verbindung zu D-BUS aufbauen" -#: ../jockey/ui.py:87 +#: ../jockey/ui.py:101 ../jockey/ui.py:112 msgid "Searching for available drivers..." msgstr "Suche nach verfügbaren Treibern..." -#: ../jockey/ui.py:119 +#: ../jockey/ui.py:136 msgid "Component" msgstr "Komponente" -#: ../jockey/ui.py:120 +#: ../jockey/ui.py:137 msgid "_Enable" msgstr "_Aktivieren" -#: ../jockey/ui.py:121 +#: ../jockey/ui.py:138 msgid "_Disable" msgstr "_Deaktivieren" -#: ../jockey/ui.py:122 +#: ../jockey/ui.py:139 msgid "Enabled" msgstr "Aktiviert" -#: ../jockey/ui.py:123 +#: ../jockey/ui.py:140 msgid "Disabled" msgstr "Deaktiviert" -#: ../jockey/ui.py:124 +#: ../jockey/ui.py:141 msgid "Status" msgstr "Status" -#: ../jockey/ui.py:125 +#: ../jockey/ui.py:142 msgid "Needs computer restart" msgstr "Benötigt Computer-Neustart" -#: ../jockey/ui.py:126 +#: ../jockey/ui.py:143 msgid "In use" msgstr "In Benutzung" -#: ../jockey/ui.py:127 +#: ../jockey/ui.py:144 msgid "Not in use" msgstr "Nicht benutzt" -#: ../jockey/ui.py:128 +#: ../jockey/ui.py:145 msgid "License:" msgstr "Lizenz:" -#: ../jockey/ui.py:129 +#: ../jockey/ui.py:146 msgid "details" msgstr "Details" #. this is used in the GUI and in --list output to denote free/restricted drivers -#: ../jockey/ui.py:131 +#: ../jockey/ui.py:148 msgid "Free" msgstr "Frei" #. this is used in the GUI and in --list output to denote free/restricted drivers -#: ../jockey/ui.py:133 +#: ../jockey/ui.py:150 msgid "Proprietary" msgstr "Proprietär" -#: ../jockey/ui.py:134 +#: ../jockey/ui.py:151 msgid "Download in progress" msgstr "Lade Datei herunter" -#: ../jockey/ui.py:135 +#: ../jockey/ui.py:152 msgid "Unknown driver" msgstr "Unbekannter Treiber" -#: ../jockey/ui.py:136 +#: ../jockey/ui.py:153 msgid "You are not authorized to perform this action." msgstr "Sie sind nicht berechtigt, diese Aktion auszuführen." #. %s is the name of the operating system -#: ../jockey/ui.py:138 +#: ../jockey/ui.py:155 #, python-format msgid "Tested by the %s developers" msgstr "Getestet von den %s-Entwicklern" #. %s is the name of the operating system -#: ../jockey/ui.py:140 +#: ../jockey/ui.py:157 #, python-format msgid "Not tested by the %s developers" msgstr "Nicht getestet von den %s-Entwicklern" #. this is used when one version of a driver is recommended over others -#: ../jockey/ui.py:142 +#: ../jockey/ui.py:159 msgid "Recommended" msgstr "Empfohlen" -#: ../jockey/ui.py:143 +#: ../jockey/ui.py:160 msgid "License Text for Device Driver" msgstr "Lizenztext für Gerätetreiber" -#: ../jockey/ui.py:152 +#: ../jockey/ui.py:169 msgid "Restricted Hardware Drivers" msgstr "Eingeschränkte Hardware-Treiber" -#: ../jockey/ui.py:154 ../gtk/jockey-gtk.desktop.in.h:2 +#: ../jockey/ui.py:171 ../gtk/jockey-gtk.desktop.in.h:2 #: ../kde/jockey-kde.desktop.in.h:2 msgid "Hardware Drivers" msgstr "Hardware-Treiber" -#: ../jockey/ui.py:164 +#: ../jockey/ui.py:181 msgid "Driver search results" msgstr "Gefundene Treiber" -#: ../jockey/ui.py:180 +#: ../jockey/ui.py:197 msgid "Proprietary drivers are being used to make this computer work properly." msgstr "" "Es werden proprietäre Treiber verwendet damit dieser Computer richtig " "funktioniert." -#: ../jockey/ui.py:183 +#: ../jockey/ui.py:200 msgid "No proprietary drivers are in use on this system." msgstr "Auf diesem System werden keine proprietären Treiber verwendet." #. %(os)s stands for the OS name. Prefix it or suffix it, #. but do not replace it. -#: ../jockey/ui.py:189 +#: ../jockey/ui.py:206 #, python-format msgid "" "Proprietary drivers do not have public source code that %(os)s developers " @@ -151,82 +151,82 @@ "Herstellers abhängen. %(os)s kann diese Treiber nicht berichtigen oder " "verbessern." -#: ../jockey/ui.py:204 +#: ../jockey/ui.py:221 msgid "Graphics driver" msgstr "Grafiktreiber" -#: ../jockey/ui.py:206 +#: ../jockey/ui.py:223 msgid "Firmware" msgstr "Firmware" -#: ../jockey/ui.py:208 +#: ../jockey/ui.py:225 msgid "Device driver" msgstr "Gerätetreiber" -#: ../jockey/ui.py:269 +#: ../jockey/ui.py:286 msgid "_Deactivate" msgstr "_Deaktivieren" -#: ../jockey/ui.py:271 +#: ../jockey/ui.py:288 msgid "This driver is activated and currently in use." msgstr "Dieser Treiber ist aktiviert und in Benutzung." -#: ../jockey/ui.py:275 +#: ../jockey/ui.py:292 msgid "You need to restart the computer to activate this driver." msgstr "" "Der Computer muss neu gestartet werden um diesen Treiber zu aktivieren." -#: ../jockey/ui.py:277 +#: ../jockey/ui.py:294 msgid "This driver is activated but not currently in use." msgstr "Dieser Treiber ist aktiviert, aber nicht in Benutzung." -#: ../jockey/ui.py:279 +#: ../jockey/ui.py:296 msgid "_Activate" msgstr "_Aktivieren" -#: ../jockey/ui.py:283 +#: ../jockey/ui.py:300 msgid "This driver was just disabled, but is still in use." msgstr "Dieser Treiber wurde gerade deaktiviert, aber ist noch in Benutzung." -#: ../jockey/ui.py:285 +#: ../jockey/ui.py:302 msgid "A different version of this driver is in use." msgstr "Eine andere Version dieses Treibers ist in Benutzung." -#: ../jockey/ui.py:287 +#: ../jockey/ui.py:304 msgid "This driver is not activated." msgstr "Dieser Treiber ist nicht aktiviert." -#: ../jockey/ui.py:307 +#: ../jockey/ui.py:324 msgid "Check for newly used or usable drivers and notify the user." msgstr "" "Auf neu benutzte oder neue verfügbare Treiber überprüfen und den Benutzer " "informieren" -#: ../jockey/ui.py:310 +#: ../jockey/ui.py:327 msgid "Query driver databases for newly available or updated drivers." msgstr "Treiber-Datenbank auf neue oder aktualisierte Treiber prüfen" -#: ../jockey/ui.py:313 +#: ../jockey/ui.py:330 msgid "List available drivers and their status." msgstr "Verfügbare Treiber und ihren Status auflisten" -#: ../jockey/ui.py:316 +#: ../jockey/ui.py:333 msgid "List hardware identifiers from this system." msgstr "Hardware-Bezeichner von diesem System auflisten." -#: ../jockey/ui.py:319 +#: ../jockey/ui.py:336 msgid "Enable a driver" msgstr "Einen Treiber aktivieren" -#: ../jockey/ui.py:322 +#: ../jockey/ui.py:339 msgid "Disable a driver" msgstr "Einen Treiber deaktivieren" -#: ../jockey/ui.py:325 +#: ../jockey/ui.py:342 msgid "Ask for confirmation for --enable/--disable" msgstr "Bei --enable/--disable nach Bestätigung fragen" -#: ../jockey/ui.py:328 +#: ../jockey/ui.py:345 msgid "" "Check if there is a graphics driver available that supports composite and " "offer to enable it" @@ -234,7 +234,7 @@ "Prüfen, ob es einen verfügbaren composite-fähigen Grafiktreiber gibt, und " "anbieten, ihn zu installieren" -#: ../jockey/ui.py:333 +#: ../jockey/ui.py:350 msgid "" "Only manage free/nonfree drivers. By default, all available drivers with any " "license are presented." @@ -242,15 +242,15 @@ "Nur freie/unfreie Treiber verwalten. Standardmäßig werden alle Treiber mit " "jeder Lizenz angezeigt." -#: ../jockey/ui.py:337 +#: ../jockey/ui.py:354 msgid "Run as session D-BUS server." msgstr "Sitzungs-D-BUS server starten." -#: ../jockey/ui.py:450 +#: ../jockey/ui.py:467 msgid "Restricted drivers available" msgstr "Eingeschränkte Treiber verfügbar" -#: ../jockey/ui.py:451 +#: ../jockey/ui.py:468 msgid "" "In order to use your hardware more efficiently, you can enable drivers which " "are not free software." @@ -258,21 +258,21 @@ "Um Ihre Hardware effizienter zu nutzen, können Sie Treiber aktivieren die " "nicht freie Software sind." -#: ../jockey/ui.py:454 +#: ../jockey/ui.py:471 msgid "New drivers available" msgstr "Neue Treiber verfügbar" -#: ../jockey/ui.py:455 +#: ../jockey/ui.py:472 msgid "There are new or updated drivers available for your hardware." msgstr "Es gibt neue oder aktualisierte Treiber für Ihre Hardware." -#: ../jockey/ui.py:459 +#: ../jockey/ui.py:476 msgid "New restricted drivers in use" msgstr "Neue eingeschränkte Treiber werden verwendet" #. %(os)s stands for the OS name. Prefix it or suffix it, #. but do not replace it. -#: ../jockey/ui.py:462 +#: ../jockey/ui.py:479 #, python-format msgid "" "In order for this computer to function properly, %(os)s is using driver " @@ -281,7 +281,7 @@ "Damit Ihr Computer ordnungsgemäß funktioniert, verwendet %(os)s Treiber-" "Software, die nicht unterstützt werden kann." -#: ../jockey/ui.py:487 +#: ../jockey/ui.py:504 msgid "" "There is no available graphics driver for your system which supports the " "composite extension, or the current one already supports it." @@ -289,35 +289,35 @@ "Für Ihr System ist kein composite-fähiger Grafiktreiber verfügbar, oder der " "aktuelle unterstützt es bereits." -#: ../jockey/ui.py:493 +#: ../jockey/ui.py:510 msgid "Downloading and installing driver..." msgstr "Treiber herunterladen und installieren..." -#: ../jockey/ui.py:501 +#: ../jockey/ui.py:518 msgid "Removing driver..." msgstr "Entferne Treiber..." -#: ../jockey/ui.py:523 +#: ../jockey/ui.py:540 msgid "Use --list to see available drivers" msgstr "Benutzen Sie --list fuer eine Liste verfügbarer Treiber" -#: ../jockey/ui.py:540 +#: ../jockey/ui.py:557 msgid "Cannot change driver" msgstr "Treiber kann nicht geändert werden" -#: ../jockey/ui.py:553 +#: ../jockey/ui.py:570 msgid "Enable driver?" msgstr "Treiber aktivieren?" -#: ../jockey/ui.py:556 +#: ../jockey/ui.py:573 msgid "Disable driver?" msgstr "Treiber deaktivieren?" -#: ../jockey/ui.py:617 +#: ../jockey/ui.py:639 msgid "Download error" msgstr "Download-Fehler" -#: ../jockey/ui.py:763 +#: ../jockey/ui.py:795 #, python-format msgid "Searching driver for %s..." msgstr "Suche Treiber für %s..." @@ -428,14 +428,14 @@ "Software, die 3D-Beschleunigung erfordert (zum Beispiel einige Spiele), " "nicht nutzen können." -#: ../examples/handlers/nvidia.py:54 +#: ../examples/handlers/nvidia.py:58 #, python-format msgid "version %s" msgstr "Version %s" #: ../examples/handlers/fglrx.py:17 -msgid "ATI accelerated graphics driver" -msgstr "beschleunigter Grafiktreiber von ATI" +msgid "ATI/AMD proprietary FGLRX graphics driver" +msgstr "ATI/AMD proprietärer FGLRX Grafiktreiber" #: ../examples/handlers/fglrx.py:18 msgid "3D-accelerated proprietary graphics driver for ATI cards." @@ -443,10 +443,10 @@ #: ../examples/handlers/fglrx.py:20 msgid "" -"This driver is required to fully utilise the 3D potential of ATI graphics " -"cards, as well as provide 2D acceleration of newer cards." +"This driver is required to fully utilise the 3D potential of some ATI " +"graphics cards, as well as provide 2D acceleration of newer cards." msgstr "" -"Dieser Treiber wird zum vollen Ausschöpfen des 3D-Potentials von ATI-" +"Dieser Treiber wird zum vollen Ausschöpfen des 3D-Potentials von einigen ATI-" "Grafikkarten benötigt und stellt auch 2D-Beschleunigung auf neueren " "Grafikkarten bereit." --- jockey-0.5~beta3.orig/kde/jockey-kde.desktop.in +++ jockey-0.5~beta3/kde/jockey-kde.desktop.in @@ -4,7 +4,9 @@ Icon=jockey-kde Encoding=UTF-8 Type=Application -Exec=/usr/bin/jockey-kde +TryExec=jockey-kde +Exec=jockey-kde Categories=Qt;KDE;System; OnlyShowIn=KDE; X-Ubuntu-Gettext-Domain=jockey +X-KDE-SubstituteUID=true --- jockey-0.5~beta3.orig/kde/jockey-kde +++ jockey-0.5~beta3/kde/jockey-kde @@ -206,7 +206,16 @@ def open_app(self, argument = None): '''Tray activation callback, launch the elevated app.''' - self.ui_show_main() + # TODO: this only works with a KDE PolicyKit, which does not exist yet; + # so work around by calling it through kdesu + # self.ui_show_main() + argv = ['/usr/lib/kde4/libexec/kdesu', sys.argv[0]] + try: + import subprocess + subprocess.call(argv, close_fds=True) + except OSError, e: + logging.error('could not execute %s: %s' % (str(argv), e.message)) + sys.exit(0) def ui_idle(self): '''Redraw app while external package manager progresses.''' @@ -448,9 +457,6 @@ self.current_driver_name) self.dialog_licensetext_ui.textview_license_text.setPlainText(self.current_license_text) self.dialog_licensetext_ui.show() -# self.w('dialog_licensetext').set_default_size(500, 480) -# self.w('dialog_licensetext').run() -# self.w('dialog_licensetext').hide() return True appName = 'jockey' --- jockey-0.5~beta3.orig/gtk/jockey-gtk +++ jockey-0.5~beta3/gtk/jockey-gtk @@ -366,7 +366,7 @@ self.w('label_license_drivername').set_label('%s' % self.current_driver_name) self.w('textview_license_text').get_buffer().set_text(self.current_license_text) - self.w('dialog_licensetext').set_default_size(500, 480) + self.w('dialog_licensetext').set_default_size(600, 480) self.w('dialog_licensetext').run() self.w('dialog_licensetext').hide() return True --- jockey-0.5~beta3.orig/tests/oslib.py +++ jockey-0.5~beta3/tests/oslib.py @@ -18,7 +18,7 @@ # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -import unittest, os +import unittest, os, shutil from jockey.oslib import OSLib import sandbox @@ -166,3 +166,60 @@ self.assert_('/bin/cat' in coreutils_files) self.assert_('/bin/tail' in coreutils_files or '/usr/bin/tail' in coreutils_files) + + def test_ubuntu_package_inst(self): + '''Ubuntu implementation of package installation/removal + + This is very shallow only, and basically tests that the functions do + not crash for the simplest reasons. + ''' + ui = sandbox.TestUI() + o = OSLib() + o.install_package('foobar', None) + o.remove_package('foobar', None) + + def test_ubuntu_repositories(self): + '''Ubuntu implementation of repository add/removal/query''' + + o = OSLib() + try: + o.apt_jockey_source = OSLib.inst.workdir + '/' + o.apt_jockey_source + o.apt_sources = OSLib.inst.workdir + '/' + o.apt_sources + + os.makedirs(o.apt_sources + '.d') + f = open(o.apt_sources, 'w') + f.write('''deb file:///tmp/ +deb-src http://foo.com/foo nerdy other +#deb http://foo.com/foo nerdy universe +deb http://foo.com/foo nerdy main +''') + + f.close() + f = open(o.apt_sources + '.d/fake.list', 'w') + f.write('deb http://ubun.tu test\ndeb-src http://ubu.tu xxx\n') + f.close() + + self.assert_(o.repository_enabled('deb file:///tmp/')) + self.failIf(o.repository_enabled('deb file:///tmp2/')) + self.failIf(o.repository_enabled('deb http://foo.com/foo nerdy other')) + self.failIf(o.repository_enabled('deb http://foo.com/foo nerdy universe')) + self.assert_(o.repository_enabled('deb http://foo.com/foo nerdy main')) + self.assert_(o.repository_enabled('deb http://ubun.tu test')) + self.failIf(o.repository_enabled('deb http://ubun.tu xxx')) + + self.failIf(o.repository_enabled('deb http://third.party moo')) + + try: + o.add_repository('deb http://third.party moo') + except: + pass # TODO: better interception and handling of LockFailedException + self.assert_(o.repository_enabled('deb http://third.party moo')) + self.assert_(os.path.exists(o.apt_jockey_source)) + o.remove_repository('deb http://third.party moo') + self.failIf(o.repository_enabled('deb http://third.party moo')) + self.failIf(os.path.exists(o.apt_jockey_source)) + o.remove_repository('deb http://third.party moo') + self.failIf(o.repository_enabled('deb http://third.party moo')) + finally: + os.unlink(o.apt_sources) + shutil.rmtree(o.apt_sources + '.d') --- jockey-0.5~beta3.orig/tests/backend.py +++ jockey-0.5~beta3/tests/backend.py @@ -481,11 +481,10 @@ # ... and add it to set of available handlers self.assert_('printer:openprinting-ppds-postscript-hp:HP' not in b.available()) - b.add_driverdb('OpenPrintingDriverDB', []) self.assertEqual(b.search_driver( 'printer_deviceid:MFG:Hewlett-Packard;MDL:HP LaserJet 3020'), - ['printer:openprinting-ppds-postscript-hp:HP']) - self.assert_('printer:openprinting-ppds-postscript-hp:HP' in b.available()) + ['printer:openprinting-ppds-postscript-hp:Postscript-HP']) + self.assert_('printer:openprinting-ppds-postscript-hp:Postscript-HP' in b.available()) def test_driver_search_redundancy(self): '''Backend.add_driverdb() and search_driver() avoid redundant actions''' --- jockey-0.5~beta3.orig/tests/detection.py +++ jockey-0.5~beta3/tests/detection.py @@ -378,11 +378,29 @@ def test_localkernelmod_driverdb_packages(self): '''LocalKernelModulesDriverDB properly handles package field''' + # test handler which is unavailable for mesa-vanilla + open (os.path.join(OSLib.inst.handler_dir, 'testhandlers.py'), 'w').write(''' +import jockey.handlers + +class PickyHandler(jockey.handlers.KernelModuleHandler): + def __init__(self, backend): + jockey.handlers.KernelModuleHandler.__init__(self, backend, 'chocolate') + + def available(self): + if self.package == 'mesa-vanilla': + return False + return jockey.handlers.KernelModuleHandler.available(self) +''') + try: f = open(os.path.join(OSLib.inst.modaliases[1], 'pretzel.alias'), 'w') f.write('alias pci:v0000FFF0d*1sv*sd*bc06sc*i* spam pretzel\n') f.close() + f = open(os.path.join(OSLib.inst.modaliases[1], 'picky.alias'), 'w') + f.write('alias pci:v0000FFF0d*1sv*sd*bc06sc*i* chocolate mesa-vanilla\n') + f.close() + result = jockey.detection.get_handlers(jockey.backend.Backend(), jockey.detection.LocalKernelModulesDriverDB()) @@ -391,6 +409,8 @@ if h.module == 'spam': h_pretzel = h break + if h.module == 'chocolate': + self.fail('PickyHandler was instantiated, although it is unavailable for mesa-vanilla') self.assert_(h_pretzel, 'delivered spam kmod handler') self.failIf(h_pretzel.free()) # pretzel packge is nonfree @@ -704,7 +724,7 @@ finally: OSLib.inst.packaging_system = orig_pkgsys handlers = backend.available() - self.assertEqual(handlers, ['printer:openprinting-ppds-postscript-hp:HP']) + self.assertEqual(handlers, ['printer:openprinting-ppds-postscript-hp:Postscript-HP']) hi = backend.handler_info(handlers[0]) self.assertEqual(hi['package'], 'openprinting-ppds-postscript-hp')