--- jockey-0.6.orig/kde/jockey-kde +++ jockey-0.6/kde/jockey-kde @@ -211,7 +211,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.''' --- jockey-0.6.orig/kde/jockey-kde.desktop.in +++ jockey-0.6/kde/jockey-kde.desktop.in @@ -8,4 +8,5 @@ Exec=jockey-kde Categories=Qt;KDE;System; OnlyShowIn=KDE; +X-KDE-SubstituteUID=true X-Ubuntu-Gettext-Domain=jockey --- jockey-0.6.orig/tests/oslib.py +++ jockey-0.6/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, tempfile, shutil +import unittest, os, tempfile, shutil, sys, re from jockey.oslib import OSLib import sandbox @@ -154,33 +154,62 @@ self.assert_('/bin/tail' in coreutils_files or '/usr/bin/tail' in coreutils_files) - def test_package_install(self): - '''package installation/removal - - This will just do some very shallow tests if this is not run as root. + 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. ''' - # test package; this is most likely not installed yet (test suite will - # abort if it is) - test_package = 'lrzsz' - - # use real OSLib here, not test suite's fake implementation + ui = sandbox.TestUI() o = OSLib() + o.install_package('foobar', None) + o.remove_package('foobar', None) - self.assertRaises(SystemError, o.install_package, 'nonexisting', None) - # this should not crash, since it is not installed - o.remove_package('nonexisting', None) + def test_ubuntu_repositories(self): + '''Ubuntu implementation of repository add/removal/query''' - if os.getuid() != 0: - return + o = OSLib() + try: + o.apt_jockey_source = OSLib.inst.workdir + '/' + o.apt_jockey_source + o.apt_sources = OSLib.inst.workdir + '/' + o.apt_sources - self.failIf(o.package_installed(test_package), - '%s must not be installed for this test' % test_package) + 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 +''') - # test without progress reporting - o.install_package(test_package, None) - self.assert_(o.package_installed(test_package)) - o.remove_package(test_package, None) - self.failIf(o.package_installed(test_package)) + 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') def test_has_repositories(self): '''has_repositories() @@ -190,3 +219,25 @@ ''' o = OSLib() self.assertEqual(o.has_repositories(), True) + + def test_ubuntu_package_header_modaliases(self): + '''package_header_modaliases()''' + + o = OSLib() + map = o.package_header_modaliases() + if not map: + print >> sys.stderr, '[skip, no data available] ', + return + + module_name_re = re.compile('^[a-wA-Z0-9_]+$') + alias_re = re.compile('^[a-z]+:[a-zA-Z0-9_*-]+$') + for p, ma_map in map.iteritems(): + # p should be a valid package name + self.assertNotEqual(o.package_description(p), '') + + for module, aliases in ma_map.iteritems(): + self.assert_(module_name_re.match(module), 'invalid module name ' + module) + self.assertNotEqual(len(aliases), 0) + for a in aliases: + self.assert_(alias_re.match(a), 'invalid modalias of %s: %s' % (module, a)) + --- jockey-0.6.orig/jockey/ui.py +++ jockey-0.6/jockey/ui.py @@ -659,7 +659,7 @@ return False except BackendCrashError: self._dbus_iface = None - self.error_message('', '%s\n\n https://launchpad.net/jockey/+filebug\n\n%s' % ( + self.error_message('', '%s\n\n ubuntu-bug jockey-common\n\n%s' % ( self._('Sorry, the Jockey backend crashed. Please file a bug at:'), self._('Trying to recover by restarting backend.'))) return False @@ -882,11 +882,10 @@ self.ui_init() # we want to show progress self.have_ui = True self.search_only = False - # Note: This could be set to True if we know that we only look for - # remote drivers. E. g. if you don't support local printer driver - # handlers, you could do: - #if hwid.startswith('printer_deviceid:'): - # self.search_only = True + # Ubuntu does not currently support local printer driver handlers, so + # let's speed up the lookup of remote ones + if hwid.startswith('printer_deviceid:'): + self.search_only = True b = self.backend() --- jockey-0.6.orig/jockey/oslib.py +++ jockey-0.6/jockey/oslib.py @@ -20,6 +20,22 @@ import fcntl, os, subprocess, sys, logging, re, tempfile, time from glob import glob +import warnings +warnings.simplefilter('ignore', FutureWarning) +import apt + +class _CapturedInstallProgress(apt.InstallProgress): + def fork(self): + '''Reroute stdout/stderr to files, so that we can log them''' + + self.stdout = tempfile.TemporaryFile() + self.stderr = tempfile.TemporaryFile() + p = os.fork() + if p == 0: + os.dup2(self.stdout.fileno(), sys.stdout.fileno()) + os.dup2(self.stderr.fileno(), sys.stderr.fileno()) + return p + class OSLib: '''Encapsulation of operating system/Linux distribution specific operations.''' @@ -80,67 +96,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', '--filter=newest', - 'get-details', package], stdin=subprocess.PIPE, - stdout=subprocess.PIPE, stderr=subprocess.PIPE) - # we send an "1" to select package if several versions - # are available (--filter is broken in at least Fedora 10) - out = pkcon.communicate('1\n')[0] - m = re.search("^\s*license:\s*'?(.*)'?$", out, re.M) - if m: - # TODO: check more licenses here - return m.group(1).lower().startswith('gpl') or \ - m.group(1).lower() in ('free', '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.lower() + 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', '--filter=newest', - 'get-details', package], stdin=subprocess.PIPE, - stdout=subprocess.PIPE, stderr=subprocess.PIPE) - # we send an "1" to select package if several versions - # are available (--filter is broken in at least Fedora 10) - out = pkcon.communicate('1\n')[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', '--filter=installed', - 'get-files', package], stdin=subprocess.PIPE, + pkcon = subprocess.Popen(['dpkg', '-L', package], stdout=subprocess.PIPE, stderr=subprocess.PIPE) - # we send an "1" to select package if several versions - # are available (--filter is broken in at least Fedora 10) - out = pkcon.communicate('1\n')[0] - if pkcon.returncode == 0 and '\n ' in out: - return [l.strip() for l in out.splitlines() if l.startswith(' ')] + out = pkcon.communicate()[0] + if pkcon.returncode == 0: + return out.splitlines() else: raise ValueError, 'package %s is not installed' % package @@ -159,37 +200,59 @@ Any installation failure should be raised as a SystemError. ''' - pkcon = subprocess.Popen(['pkcon', 'install', '-v', package], - stdout=subprocess.PIPE, stderr=subprocess.PIPE) + 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(_CapturedInstallProgress): + def __init__(self, callback): + _CapturedInstallProgress.__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' + apt.apt_pkg.Config.set('DPkg::options::','--force-confnew') - re_progress = re.compile('progress-changed (\d+), (\d+),') + c = apt.Cache() + try: + try: + c[package].markInstall() + except KeyError: + logging.debug('Package %s does not exist, aborting', package) + return False + inst_p = progress_cb and MyInstallProgress(progress_cb) or None + c.commit(progress_cb and MyFetchProgress(progress_cb) or None, inst_p) + if inst_p: + inst_p.stdout.seek(0) + out = inst_p.stdout.read() + inst_p.stdout.close() + inst_p.stderr.seek(0) + err = inst_p.stderr.read() + inst_p.stderr.close() + + if out: + logging.debug(out) + if err: + logging.error(err) + 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 - phase = None - err = '' - fail = False - while pkcon.poll() == None: - line = pkcon.stdout.readline() - if line == '': - break - if fail: - err += line - if 'status-changed download' in line: - phase = 'download' - elif 'status-changed commit' in line: - phase = 'install' - elif progress_cb and 'progress-changed' in line: - m = re_progress.search(line) - if m and phase: - progress_cb(phase, int(m.group(1)), int(m.group(2))) - else: - progress_cb(phase or 'download', -1, -1) - elif 'WARNING' in line: - fail = True - - err += pkcon.stderr.read() - if pkcon.wait() != 0 or not self.package_installed(package): - raise SystemError, 'package %s failed to install: %s' % (package, err) - def remove_package(self, package, progress_cb): '''Uninstall the given package. @@ -203,35 +266,46 @@ Any removal failure should be raised as a SystemError. ''' - pkcon = subprocess.Popen(['pkcon', 'remove', '-v', package], - stdout=subprocess.PIPE, stderr=subprocess.PIPE) + os.environ['DEBIAN_FRONTEND'] = 'noninteractive' + os.environ['PATH'] = '/sbin:/usr/sbin:/bin:/usr/bin' + + class MyInstallProgress(_CapturedInstallProgress): + def __init__(self, callback): + _CapturedInstallProgress.__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) - re_progress = re.compile('progress-changed (\d+), (\d+),') + logging.debug('Removing package: %s', package) - have_progress = False - err = '' - fail = False - while pkcon.poll() == None: - line = pkcon.stdout.readline() - if line == '': - break - if fail: - err += line - if 'status-changed remove' in line: - have_progress = True - elif progress_cb and 'progress-changed' in line: - m = re_progress.search(line) - if m and have_progress: - progress_cb(int(m.group(1)), int(m.group(2))) - else: - progress_cb(-1, -1) - elif 'WARNING' in line: - fail = True - - err += pkcon.stderr.read() - pkcon.wait() - if self.package_installed(package): - raise SystemError, 'package %s failed to remove: %s' % (package, err) + c = apt.Cache() + try: + try: + c[package].markDelete() + except KeyError: + logging.debug('Package %s does not exist, aborting', package) + return False + inst_p = progress_cb and MyInstallProgress(progress_cb) or None + c.commit(None, inst_p) + if inst_p: + inst_p.stdout.seek(0) + out = inst_p.stdout.read() + inst_p.stdout.close() + inst_p.stderr.seek(0) + err = inst_p.stderr.read() + inst_p.stderr.close() + + if out: + logging.debug(out) + if err: + logging.error(err) + except apt.cache.LockFailedException, e: + logging.debug('could not lock apt cache, aborting: %s', str(e)) + raise SystemError, str(e) + + return True def has_repositories(self): '''Check if package repositories are available. @@ -239,12 +313,10 @@ This might not be the case after a fresh installation, when package indexes haven't been downloaded yet. ''' - pkcon = subprocess.Popen(['pkcon', 'get-details', 'bash'], + apt_policy = subprocess.Popen(['apt-cache', 'policy', 'dkms'], stdout=subprocess.PIPE, stderr=subprocess.PIPE) - out = pkcon.communicate()[0] - # PK can't detect package sizes without repositories - m = re.search("^\s*size:\s*0 bytes$", out, re.M) - return m == None + out = apt_policy.communicate()[0] + return '://' in out def update_repository_indexes(self, progress_cb): '''Download package repository indexes. @@ -256,14 +328,23 @@ regularly. Passes '-1' for current and/or total if time cannot be determined. ''' - pkcon = subprocess.Popen(['pkcon', 'refresh'], - stdout=subprocess.PIPE, stderr=subprocess.PIPE) + os.environ['PATH'] = '/sbin:/usr/sbin:/bin:/usr/bin' + + class MyProgress(apt.FetchProgress): + def __init__(self, callback): + apt.FetchProgress.__init__(self) + self.callback = callback + + def pulse(self): + self.callback(self.percent, 100.0) + + c = apt.Cache() + try: + c.update(progress_cb and MyProgress(progress_cb) or None) + except apt.cache.LockFailedException, e: + logging.debug('could not lock apt cache, aborting: %s', str(e)) + raise SystemError, str(e) - while pkcon.poll() == None: - time.sleep(0.3) - if progress_cb: - progress_cb(-1, -1) - pkcon.wait() return self.has_repositories() def packaging_system(self): @@ -294,19 +375,68 @@ 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) + 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) 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. @@ -314,7 +444,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. @@ -323,7 +453,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#jockey'], + flags=gobject.SPAWN_SEARCH_PATH) # # The following functions have a reasonable default implementation for @@ -357,7 +490,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.''' @@ -482,7 +634,10 @@ The default implementation does nothing. ''' - pass + try: + subprocess.call(['/usr/share/update-notifier/notify-reboot-required']) + except OSError: + pass def package_header_modaliases(self): '''Get modalias map from package headers. @@ -494,5 +649,24 @@ If this is not supported, simply return an empty dictionary here. ''' - return {} + result = {} + for package in apt.Cache(): + try: + m = package.candidate.record['Modaliases'] + except KeyError: + continue + + try: + for part in m.split(')'): + part = part.strip() + if not part: + continue + module, lst = part.split('(') + for alias in lst.split(','): + result.setdefault(package.name, {}).setdefault(module, + []).append(alias.strip()) + except ValueError: + logging.error('Package %s has invalid modalias header: %s' % ( + package.name, m)) + return result --- jockey-0.6.orig/data/handlers/broadcom_wl.py +++ jockey-0.6/data/handlers/broadcom_wl.py @@ -0,0 +1,54 @@ +# (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._free = False + KernelModuleHandler.__init__(self, ui, 'wl', + name=_('Broadcom STA wireless driver')) + self.package = 'bcmwl-kernel-source' + self._auto_install = True + + 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('b43legacy') + b43_loaded = KernelModuleHandler.module_loaded('bcm43xx') or \ + KernelModuleHandler.module_loaded('b43') or \ + KernelModuleHandler.module_loaded('b43legacy') + logging.debug('BroadcomWLHandler enabled(): kmod %s, bcm43xx: %s, b43: %s, b43legacy: %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 not b43_loaded) or (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('b43legacy') or + KernelModuleHandler.module_loaded('bcm43xx')) + + def enable(self): + subprocess.call(['/sbin/rmmod', 'b43']) + subprocess.call(['/sbin/rmmod', 'b43legacy']) + subprocess.call(['/sbin/rmmod', 'bcm43xx']) + subprocess.call(['/sbin/rmmod', 'ssb']) + KernelModuleHandler.enable(self) + --- jockey-0.6.orig/data/handlers/sl_modem.py +++ jockey-0.6/data/handlers/sl_modem.py @@ -0,0 +1,59 @@ +# -*- coding: utf-8 -*- +# (c) 2008 Canonical Ltd. +# Author: Martin Pitt +# License: GPL v2 or later + +import re, os.path, logging, subprocess + +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*\]') + self.modem_as_subdevice_re = re.compile('^card [0-9].*[mM]odem') + + def available(self): + '''Check /proc/asound/cards and aplay -l 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)) + + try: + aplay = subprocess.Popen(['aplay', '-l'], env={}, + stdout=subprocess.PIPE, stderr=subprocess.PIPE) + (aplay_out, aplay_err) = aplay.communicate() + except OSError, e: + logging.error('could not open aplay -l: %s' % str(e)) + return False + + if aplay.returncode != 0: + logging.error('aplay -l failed with %i: %s' % (aplay.returncode, + aplay_err)) + return False + + for row in aplay_out.splitlines(): + if self.modem_as_subdevice_re.match(row): + return True + + return False + + def used(self): + return self.enabled() and os.path.exists('/dev/modem') --- jockey-0.6.orig/data/handlers/dvb_usb_firmware.py +++ jockey-0.6/data/handlers/dvb_usb_firmware.py @@ -0,0 +1,51 @@ +# (c) 2009 Canonical Ltd. +# Author: Martin Pitt +# License: GPL v2 or later + +import logging, subprocess + +from jockey.oslib import OSLib +from jockey.handlers import KernelModuleHandler + +# dummy stub for xgettext +def _(x): return x + +class DvbUsbFirmwareHandler(KernelModuleHandler): + '''Handler for USB DVB cards which need firmware. + + We implement our own available() here, since dvb_usb itself does not have + modaliases (it's a dependency of particular drivers such as dib7000p). + ''' + def __init__(self, ui): + KernelModuleHandler.__init__(self, ui, 'dvb_usb', + name=_('Firmware for DVB cards')) + self.package = 'linux-firmware-nonfree' + self._free = False + self._do_rebind = False # does not work, don't bother + + 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 available(self): + r = KernelModuleHandler.available(self) + if r is not None: + return r + return self.module_loaded(self.module) + + def enable(self): + KernelModuleHandler.enable(self) + + # rebinding does not work, we have to unload/reload + mods = [] + proc_modules = open(OSLib.inst.proc_modules) + for line in open(OSLib.inst.proc_modules): + if 'dvb_usb' in line: + mods.append(line.split()[0]) + logging.debug('reloading modules: %s' % ' '.join(mods)) + subprocess.call([OSLib.inst.modprobe_path, '-r'] + mods) + subprocess.call([OSLib.inst.modprobe_path, '-a'] + mods) --- jockey-0.6.orig/data/handlers/nvidia.py +++ jockey-0.6/data/handlers/nvidia.py @@ -0,0 +1,184 @@ +# (c) 2008 Canonical Ltd. +# Authors: Martin Pitt +# Alberto Milone +# License: GPL v2 or later + +import logging, os + +from jockey.handlers import KernelModuleHandler +from jockey.xorg_driver import XorgDriverHandler +from jockey.oslib import OSLib +import XKit +from NvidiaDetector.nvidiadetector import NvidiaDetection +from NvidiaDetector.alternatives import Alternatives +import subprocess + +# dummy stub for xgettext +def _(x): return x + +class NvidiaDriverBase(XorgDriverHandler): + '''Abstract base class for a particular NVidia driver version.''' + + def __init__(self, backend, version): + self._free = False + XorgDriverHandler.__init__(self, backend, 'nvidia_' + version, + 'nvidia-' + version, + '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._module_alias = 'nvidia' + self._recommended = None + self._do_rebind = False + self._alternatives = Alternatives('gl_conf') + self.version = version + + 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.version == '96': + self.xorg_conf.addOption('Screen', 'AddARGBGLXVisuals', 'True', optiontype='Option', position=0) + + # temporary hack to make "current" work with the xserver ABI + #if self.version == 'current': + # if len(self.xorg_conf.globaldict['ServerFlags']) == 0: + # self.xorg_conf.makeSection('ServerFlags') + # + # self.xorg_conf.addOption('ServerFlags', 'IgnoreABI', '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 enable(self): + # Ensure that the necessary kernel headers need to be installed + kernel_headers = 'linux-headers-' + os.uname()[2] + try: + self.backend.install_package(kernel_headers) + except ValueError: + # package not available; most likely we have a custom kernel? + pass + + XorgDriverHandler.enable(self) + + # Set the alternative to NVIDIA + nvidia_alternative = self._alternatives.get_alternative_by_name(self.package) + self._alternatives.set_alternative(nvidia_alternative) + subprocess.call(['update-initramfs', '-u']) + subprocess.call(['update-initramfs', '-u', '-k', os.uname()[2]]) + + 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) +# if int(flavour) >= 180: +# self.backend.remove_package('nvidia-%s-libvdpau' % flavour) + try: + self.backend.remove_package('nvidia-settings') + except SystemError: + pass + + # Set the alternative back to open drivers + open_drivers = self._alternatives.get_open_drivers_alternative() + self._alternatives.set_alternative(open_drivers) + subprocess.call(['update-initramfs', '-u']) + subprocess.call(['update-initramfs', '-u', '-k', os.uname()[2]]) + + return False + + def recommended(self): + if self._recommended == None: + nd = NvidiaDetection() + self._recommended = self.package == nd.selectDriver() + return self._recommended + + def enabled(self): + # See if nvidia (e.g. nvidia-current) is the current alternative + target_alternative = self._alternatives.get_alternative_by_name(self.package) + current_alternative = self._alternatives.get_current_alternative() + + if current_alternative != target_alternative: + logging.debug('%s is not the alternative in use', self.module) + return False + + #if self.xorg_conf has NoneType, AttributeError will be raised + if self.xorg_conf: + if self.xorg_conf.isDriverEnabled(self.xorg_driver) == False: + logging.debug('%s the driver is not enabled in all of the relevant device sections', self.module) + return False + else: + logging.debug('%s: xkit object does not exist!', self.module) + return False + + # Make sure that neither the alias nor the actual module are blacklisted + return not OSLib.inst.module_blacklisted(self._module_alias) and \ + not OSLib.inst.module_blacklisted(self.module) + + #return KernelModuleHandler.enabled(self) + + def used(self): + '''Return if the handler is currently in use.''' + + if self.changed() and self.enabled(): + return False + + # See if "nvidia" is loaded and if the alias corresponds to nvidia_$flavour + return KernelModuleHandler.module_loaded(self._module_alias) and \ + self._alternatives.resolve_module_alias(self._module_alias) == self.module and \ + self.package is None or OSLib.inst.package_installed(self.package) + + 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 + +class NvidiaDriverCurrent(NvidiaDriverBase): + def __init__(self, backend): + NvidiaDriverBase.__init__(self, backend, 'current') + +class NvidiaDriver173(NvidiaDriverBase): + def __init__(self, backend): + NvidiaDriverBase.__init__(self, backend, '173') + +class NvidiaDriver96(NvidiaDriverBase): + def __init__(self, backend): + NvidiaDriverBase.__init__(self, backend, '96') --- jockey-0.6.orig/data/handlers/madwifi.py +++ jockey-0.6/data/handlers/madwifi.py @@ -0,0 +1,72 @@ +# (c) 2009 Canonical Ltd. +# Author: Martin Pitt +# License: GPL v2 or later + +import logging, subprocess, os.path + +from jockey.oslib import OSLib +from jockey.handlers import Handler, KernelModuleHandler + +# dummy stub for xgettext +def _(x): return x + +class MadwifiHandler(KernelModuleHandler): + '''Handler for the Madwifi driver. + + The free ath5k driver should work with most Atheros cards nowadays, but on + some models madwifi still works better (or at all). This driver (ath_pci) + should be disabled by default by blacklisting it in self.blacklist_file. + ''' + def __init__(self, ui): + KernelModuleHandler.__init__(self, ui, 'ath_pci', + name=_('Alternate Atheros "madwifi" driver'), + description=_('Alternate "madwifi" driver for Atheros wireless LAN cards.'), + rationale=_('Only activate this driver if you have problems ' + 'with your wireless LAN connection.\n\n' + 'The free "ath5k" driver should work with most ' + 'Atheros cards nowadays, but on some computers this ' + 'alternate (but proprietary) driver still works better, ' + 'or at all.')) + self._free = False + # do not announce this if ath5k works + self.announce = not self.module_loaded('ath5k') + self.blacklist_file = os.path.join(os.path.dirname( + OSLib.inst.module_blacklist_file), 'blacklist-ath_pci.conf') + + def can_change(self): + if not os.path.exists(self.blacklist_file): + return _('You removed the configuration file %s') % self.blacklist_file + return None + + def enable(self): + Handler.enable(self) + self._update_blacklist('ath5k') + subprocess.call([OSLib.inst.modprobe_path, self.module]) + self.read_loaded_modules() + return self.rebind(self.module) + + def disable(self): + self._update_blacklist(self.module) + self.read_loaded_modules() + Handler.disable(self) + return False + + def _update_blacklist(self, module): + '''Update self.blacklist_file to blacklist given module.''' + + logging.debug('MadwifiHandler._update_blacklist(%s)' % module) + + lines = [] + f = open(self.blacklist_file) + for l in f: + if l.startswith('blacklist '): + l = 'blacklist %s\n' % module + lines.append(l) + f.close() + f = open(self.blacklist_file + '.new', 'w') + for l in lines: + f.write(l) + f.close() + os.rename(self.blacklist_file + '.new', self.blacklist_file) + + OSLib.inst._load_module_blacklist() --- jockey-0.6.orig/data/handlers/fglrx.py +++ jockey-0.6/data/handlers/fglrx.py @@ -0,0 +1,117 @@ +# -*- coding: utf-8 -*- +# (c) 2008 Canonical Ltd. +# Authors: Martin Pitt +# Alberto Milone +# License: GPL v2 or later + +import logging, os + +import XKit.xorgparser +from jockey.xorg_driver import XorgDriverHandler +from NvidiaDetector.alternatives import Alternatives +import subprocess + +# dummy stub for xgettext +def _(x): return x + +class FglrxDriver(XorgDriverHandler): + def __init__(self, backend): + self._free = False + XorgDriverHandler.__init__(self, backend, 'fglrx', '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.')) + + self._alternatives = Alternatives('gl_conf') + + 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 enable(self): + # Ensure that the necessary kernel headers need to be installed + kernel_headers = 'linux-headers-' + os.uname()[2] + try: + self.backend.install_package(kernel_headers) + except ValueError: + # package not available; most likely we have a custom kernel? + pass + + XorgDriverHandler.enable(self) + + # Set the alternative to FGLRX + fglrx_alternative = self._alternatives.get_alternative_by_name(self.package) + self._alternatives.set_alternative(fglrx_alternative) + subprocess.call(['update-initramfs', '-u']) + subprocess.call(['update-initramfs', '-u', '-k', os.uname()[2]]) + + def enabled(self): + # See if fglrx is the current alternative + target_alternative = self._alternatives.get_alternative_by_name(self.package) + current_alternative = self._alternatives.get_current_alternative() + + if current_alternative != target_alternative: + logging.debug('%s is not the alternative in use', self.module) + return False + + return XorgDriverHandler.enabled(self) + + 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) + + # Set the alternative back to open drivers + open_drivers = self._alternatives.get_open_drivers_alternative() + self._alternatives.set_alternative(open_drivers) + subprocess.call(['update-initramfs', '-u']) + subprocess.call(['update-initramfs', '-u', '-k', os.uname()[2]]) + + 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 False # unconfigured driver -> defaults to ati + + return True + --- jockey-0.6.orig/data/modaliases/b43 +++ jockey-0.6/data/modaliases/b43 @@ -0,0 +1,2 @@ +# taken from b43-fwcutter postinsts +alias pci:v000014E4d00004315sv*sd*bc*sc*i* b43 firmware-b43-lpphy-installer --- jockey-0.6.orig/data/modaliases/disable-upstream-nvidia +++ jockey-0.6/data/modaliases/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.6.orig/debian/jockey-gtk.install +++ jockey-0.6/debian/jockey-gtk.install @@ -0,0 +1,5 @@ +usr/bin/*-gtk +usr/share/jockey/*gtk*.ui +usr/share/applications/*-gtk.* +usr/share/autostart/*-gtk.desktop etc/xdg/autostart/ +usr/share/dbus-1/services --- jockey-0.6.orig/debian/jockey-common.postinst +++ jockey-0.6/debian/jockey-common.postinst @@ -0,0 +1,28 @@ +#!/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 + + # modutils recently introduced .conf suffix requirement + if dpkg --compare-versions "$2" lt-nl "0.5-0ubuntu3"; then + for f in /etc/modprobe.d/blacklist-bcm43 /etc/modprobe.d/blacklist-local; do + if [ -e "$f" ] && [ ! -e "$f.conf" ]; then + mv "$f" "$f.conf" + fi + done + fi +fi + +#DEBHELPER# --- jockey-0.6.orig/debian/jockey-kde.install +++ jockey-0.6/debian/jockey-kde.install @@ -0,0 +1,5 @@ +usr/bin/*-kde +usr/share/applications/*-kde.* +usr/share/autostart/*-kde.desktop etc/xdg/autostart/ +usr/share/jockey/*Dialog*.ui +usr/share/jockey/*Window*.ui --- jockey-0.6.orig/debian/pycompat +++ jockey-0.6/debian/pycompat @@ -0,0 +1 @@ +2 --- jockey-0.6.orig/debian/watch +++ jockey-0.6/debian/watch @@ -0,0 +1,2 @@ +version=3 +http://launchpad.net/jockey/+download .*/jockey-([0-9.]+)\.tar\.gz --- jockey-0.6.orig/debian/jockey.ubiquity +++ jockey-0.6/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.6.orig/debian/jockey-common.logrotate +++ jockey-0.6/debian/jockey-common.logrotate @@ -0,0 +1,9 @@ +/var/log/jockey.log { + daily + rotate 10 + copytruncate + delaycompress + compress + notifempty + missingok +} --- jockey-0.6.orig/debian/dh-modaliases.install +++ jockey-0.6/debian/dh-modaliases.install @@ -0,0 +1,2 @@ +../debhelper/dh_modaliases usr/bin +../debhelper/modaliases.pm usr/share/perl5/Debian/Debhelper/Sequence --- jockey-0.6.orig/debian/compat +++ jockey-0.6/debian/compat @@ -0,0 +1 @@ +5 --- jockey-0.6.orig/debian/apport_hook.py +++ jockey-0.6/debian/apport_hook.py @@ -0,0 +1,20 @@ +import os.path, os + +import apport.hookutils + +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" + + apport.hookutils.attach_file_if_exists(report, '/var/log/jockey.log') + apport.hookutils.attach_hardware(report) --- jockey-0.6.orig/debian/rules +++ jockey-0.6/debian/rules @@ -0,0 +1,24 @@ +#!/usr/bin/make -f + +DEB_PYTHON_SYSTEM := pycentral +export DH_PYCENTRAL=include-links + +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_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 + +install/dh-modaliases:: + mkdir -p debian/$(cdbs_curpkg)/usr/share/man/man1 + pod2man -c Debhelper -r "$(DEB_VERSION)" debian/debhelper/dh_modaliases debian/$(cdbs_curpkg)/usr/share/man/man1/dh_modaliases.1 --- jockey-0.6.orig/debian/control +++ jockey-0.6/debian/control @@ -0,0 +1,67 @@ +Source: jockey +Section: admin +Priority: optional +Build-Depends: cdbs (>= 0.4.43), + debhelper (>= 5.0.51), + python-central (>= 0.6.11), + python-distutils-extra (>= 2.4), + python (>= 2.5) +Maintainer: Martin Pitt +Standards-Version: 3.9.1 +XS-Python-Version: all +Vcs-Bzr: https://code.launchpad.net/~ubuntu-core-dev/jockey/ubuntu + +Package: jockey-common +Architecture: all +XB-Python-Version: ${python:Versions} +Depends: ${python:Depends}, ${misc:Depends}, python-xdg, python-xkit, python-dbus, python-apt, policykit-1 +Recommends: nvidia-common (>= 0.2.15.1), fglrx-modaliases +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}, ${misc:Depends}, jockey-common (= ${binary:Version}), + python-notify (>= 0.1.1-0ubuntu2), python-xdg, synaptic, + policykit-1-gnome +Recommends: python-appindicator (>= 0.0.6) +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}, ${misc:Depends}, jockey-common (= ${binary:Version}), python-kde4, + kdebase-runtime +Replaces: jockey-common (<= 0.5.2) +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. + +Package: dh-modaliases +Architecture: all +Depends: ${perl:Depends}, + ${misc:Depends} +Enhances: debhelper +Description: debhelper extension for scanning kernel module aliases + dh_modaliases is useful for packages that ship third-party kernel modules, + either in binary form, or as sources (with e. g. DKMS). It extracts the + modules' modaliases from either the compile .ko files themselves (for packages + which ship them in compiled form, using modinfo), or from a package file + debian/packagename.modaliases. + . + This enables software which is looking for missing driver packages (such as + Jockey or the operating system installer) to identify which package(s) will + provide a driver for a piece of hardware, identified by its modalias. --- jockey-0.6.orig/debian/jockey-common.dirs +++ jockey-0.6/debian/jockey-common.dirs @@ -0,0 +1 @@ +/var/cache/jockey --- jockey-0.6.orig/debian/changelog +++ jockey-0.6/debian/changelog @@ -0,0 +1,1356 @@ +jockey (0.6-0ubuntu2) natty; urgency=low + + * debian/control: Drop bcmwl-modaliases recommends, it's replaced with + a package header now. + + -- Martin Pitt Thu, 25 Nov 2010 20:16:50 +0100 + +jockey (0.6-0ubuntu1) natty; urgency=low + + [ Alberto Milone ] + * data/handlers/nvidia.py: + - Re-enable nvidia-96 now that it's compatible with xserver 1.9. + (LP: #626974). + + [ Martin Pitt ] + * New upstream release 0.6: + - Add support and test case for reading modaliases from package headers. + - Put back "Additional Drivers" progress window title. Thanks Bilal + Akhtar! (LP: #323815) + - jockey/detection.py, get_hardware(): Disable printer detection. + cupshelpers.getDevices() is excruciatingly slow (about 15 seconds), and + jockey is not normally used directly to install printer drivers. + Instead, system-config-printer picks up new printers, and calls jockey + with the device ID, so jockey does not need to detect printers by + itself. + - jockey-kde: Use runtime .ui loading instead of pykdeuic4; the latter + just keeps breaking. + - gtk/jockey-gtk.ui: Drop obsolete has_separator property; Explicitly set + topmost GtkVBox fill property to True, as the default changed in GTK 3.0 + (GNOME #634592) + - Various test suite fixes. + * debian/control: Drop now obsolete python-{qt4,kde}* build dependencies. + * debian/jockey-kde.install: Install the KDE *.ui files. + * jockey/oslib.py, has_repositories(): Greatly speed up (5 seconds → + negligible) by calling "apt-cache policy" instead of creating an + apt.Cache() object. + * Drop data/handlers/b43.py, our linux-firmware package ships the b43 + firmware now. Also, the wl driver is generally a lot better. + * Add support for putting modalias definitions in driver package's + debian/control, so that we can replace the /usr/share/jockey/modaliases/* + lists with lookups in the package database (see blueprint + hardware-desktop-n-package-field-modaliases). With this we can drop the + foo-modaliases packages, and shipping third-party driver packages will + just work in Jockey without any further integration. + - Add debian/debhelper/dh_jockey: Debhelper program to produce a + ${modaliases} substvar from scanning .ko files or + debian/packagename.modaliases. + - Add debian/debhelper/test_dh_jockey: Automatic test script for + dh_jockey. + - Add debian/debhelper/modaliases.pm: dh_auto sequencer for dh_modaliases. + - debian/control: Add dh-modaliases package. + - debian/dh-modaliases.install: Install dh_modaliases and modaliases.pm. + - debian/rules: Create manpage from dh_modaliases POD. + - jockey/oslib.py: Add apt implementation for package_header_modaliases(). + - tests/oslib.py: Add test case for our package_header_modaliases() + implementation. This only really tests anything if there is at least one + package with a "Modaliases:" field in the local apt repository. + * jockey/oslib.py: Change deprecated apt.apt_pkg.Config.Set() to .set(). + * debian/rules: Drop simple-patchsys.mk, we don't need it (patches are + inline, maintained in bzr). + + -- Martin Pitt Thu, 25 Nov 2010 19:49:00 +0100 + +jockey (0.5.10-0ubuntu5.1) maverick-proposed; urgency=low + + * Change B43Handler to deal with the various firmware-b43*installer + packages. This requires adding a modalias file for + firmware-b43-lpphy-installer (LP: #655111) + + -- Michael Vogt Thu, 07 Oct 2010 12:20:31 +0200 + +jockey (0.5.10-0ubuntu5) maverick; urgency=low + + * data/handlers/nvidia.py: + - Re-enable nvidia-173 now that it's compatible with xserver 1.9. + + -- Alberto Milone Mon, 04 Oct 2010 15:40:02 +0200 + +jockey (0.5.10-0ubuntu4) maverick; urgency=low + + * data/handlers/fglrx.py, nvidia.py: + - Re-enable fglrx now that it's compatible with xserver 1.9. + - Make sure that the initramfs is updated for both the newest kernel + and for the current kernel, so as to be consistent with the default + behaviour of the DKMS template that both driver packages use. + + -- Alberto Milone Thu, 23 Sep 2010 13:15:03 +0200 + +jockey (0.5.10-0ubuntu3) maverick; urgency=low + + * Add support for bypassing local detection for search_driver(). (Merged + from trunk). Thanks to Till Kamppeter for the initial patches! + * jockey/ui.py: Ubuntu does not currently support local printer driver + handlers, so speed up the lookup of remote ones by disabling local + detection of hardware/handlers in search_driver() if we are looking for a + printer driver. (Note that this is a hack, but the speedup is significant) + (LP: #574396) + * Add OSLib.notify_reboot_required() and call it in set_handler_enabled(). + Merged from trunk, and add Ubuntu specific implementation using + /usr/share/update-notifier/notify-reboot-required in OSLib. (LP: #570215) + * data/handlers/b43.py: Install firmware-b43-installer package instead of + b43-fwcutter. (LP: #595344) + + -- Martin Pitt Wed, 15 Sep 2010 13:35:48 +0200 + +jockey (0.5.10-0ubuntu2) maverick; urgency=low + + * data/handlers/nvidia.py: + - Don't set the IgnoreABI option in xorg.conf any longer as nvidia- + current is now ABI compatible with the new xserver. + + -- Alberto Milone Tue, 07 Sep 2010 10:49:54 +0200 + +jockey (0.5.10-0ubuntu1) maverick; urgency=low + + * New upstream release: + - ui --list: show auto-install flag + - Add flag file based auto install mode + - Add a title to the "search drivers" dialog. Thanks to Bilal Akhtar! + (LP: #616569) + - Rename "Hardware Drivers" to "Additional Drivers", to point out that + Jockey is not responsible for all kinds of drivers. Thanks to Robert + Roth for the initial patch. (LP: #409338) + - Hide "Remove" button if a driver needs reboot. Thanks to Bilal Akhtar + for the initial patch! (LP: #600804) + * debian/control: Add missing ${misc:Depends}. + * debian/control: No need to build-depend on python-dev. + * debian/control: Fix nvidia-common dependency. + * Add debian/source/format: "1.0", since changes are bzr maintained. + * debian/control: Bump Standards-Version to 3.9.1. + + -- Martin Pitt Tue, 24 Aug 2010 20:05:24 +0200 + +jockey (0.5.9-0ubuntu2) maverick; urgency=low + + * data/handlers/fglrx.py, nvidia.py: + - Temporarily disable fglrx, nvidia 96 and 173 and ignore the fact that nvidia + current claims to be ABI incompatible with the new xserver. + + -- Alberto Milone Thu, 12 Aug 2010 16:06:53 +0200 + +jockey (0.5.9-0ubuntu1) maverick; urgency=low + + * New upstream release. Changes since our last snapshot: + - Add a fake modalias file for local testing + - Update translations from Launchpad and update German ones + - Fix Polish translation. (LP: #451968) + - Add Handler.auto_install() flag and --auto-install mode. Thanks to Evan + Dandrea! + * data/handlers/broadcom_wl.py: Mark for automatic installation. + + -- Martin Pitt Fri, 23 Jul 2010 15:13:49 +0200 + +jockey (0.5.8-0ubuntu8) lucid; urgency=low + + * data/handlers/fglrx.py, nvidia.py: + - Do not check the non null value of current_alternative and + target_alternative. This caused jockey to skip the condition + that we really wanted to test (i.e. do the two alternatives + match?) and show the driver as enabled when the target + alternative didn't exist (as the package hadn't been installed + yet) (LP: #562226). + + -- Alberto Milone Mon, 19 Apr 2010 10:36:10 +0200 + +jockey (0.5.8-0ubuntu7) lucid; urgency=low + + [ Alberto Milone ] + * Do not check that the module is loaded in enabled() in the nvidia + handler, as this is what we should do in used(). Just make sure + that the module and its alias are not blacklisted. This prevents + Jockey from claiming that the installation of nvidia driver failed + when when it didn't (LP: #552653). + + [ Jonathan Thomas ] + * Don't crash when closed with the "x" button (LP: #552723, LP: #398912). + Thanks ThorbjørnTux! + + [ Martin Pitt ] + * i18n "Install Drivers" string. (LP: #542552) + + -- Alberto Milone Mon, 12 Apr 2010 10:13:16 +0200 + +jockey (0.5.8-0ubuntu6) lucid; urgency=low + + * data/handlers/fglrx.py: + - Re-enable the fglrx handler and make it use the alternatives system + (LP: #496225). + * data/handlers/nvidia.py: + - See if the module alias is loaded and then check what module it + corresponds to in order to see if it's really enabled (LP: #547066). + This involved overriding the enabled() and the used() methods. + * jockey/xorg_driver.py: + - Simplify the logic in the enabled() method by only relying on + X-Kit's isDriverEnabled() method. This will avoid getting false + positives in the case in which the 1st Device section (i.e. the + only one that we used to check) uses the right driver but the + same section is irrelevant as it's not mentioned in the + ServerLayout section. + + -- Alberto Milone Tue, 30 Mar 2010 15:48:37 +0200 + +jockey (0.5.8-0ubuntu5) lucid; urgency=low + + * Merge fixed KDE .ui file from trunk, thanks Jonathan Thomas! This fixes + the crash on jockey-kde startup. + * debian/control: Revert the python-distutils-extra build dependency bump, + not necessary any more with the fix above. + + -- Martin Pitt Fri, 26 Mar 2010 17:50:00 +0100 + +jockey (0.5.8-0ubuntu4) lucid; urgency=low + + * Merge bug fix from trunk: + - ui.py: Fix _check_repositories() to not invoke the UI and error dialogs + in --check mode. (LP: #540750) + * debian/control: Bump python-distutils-extra build dependency, to ensure we + build correct -kde packages. (LP: #543707) + + -- Martin Pitt Fri, 26 Mar 2010 17:41:56 +0100 + +jockey (0.5.8-0ubuntu3) lucid; urgency=low + + [ Martin Pitt ] + * jockey/oslib.py: Use "dkms" instead of "bash" for testing whether we have + repositories. This works slightly better with third-party repositories. + + [ Mario Limonciello ] + * data/handlers/fglrx.py: The package name is now just "fglrx" rather than + xorg-driver-fglrx. + + -- Mario Limonciello Thu, 25 Mar 2010 01:01:14 -0500 + +jockey (0.5.8-0ubuntu2) lucid; urgency=low + + * Merge fixes from trunk: + - ui.py, check(): If the user is running Jockey with package installation + or another long-running task in parallel, the automatic --check + invocation will time out on connecting to the backend. This is not + fatal, just print an error message instead of crashing. (LP: #403955) + - jockey-gtk: Fix progress dialogs to not be maximizable. (LP: #537911) + - Do not parent the KMessageBox, since in some cases the errors can come + before the MainWindow is initialized. Thanks Jonathan Thomas! + + -- Martin Pitt Sat, 20 Mar 2010 22:36:55 +0100 + +jockey (0.5.8-0ubuntu1) lucid; urgency=low + + * New upstream bug fix release: + - Make Control-C work properly. Thanks Adys! (LP: #479548) + - Read system vendor/product from sysfs, not from hal + - OSLib: Add new method has_repositories(), as a foundation for fixing + #442776 + - backend.py, new_used_available(): Skip check if no package repositories + are available, to avoid writing an empty cache file and thus never + showing Jockey notifications again once they become available. + (LP: #442776) + - Shutdown D-BUS backend on UI shutdown, to not start the next UI with + potentially outdated information. + - backend.py: Expose has_repositories() and update_repository_indexes() to + clients. + - ui.py: Download/update package indexes if they are missing. + (LP: #439530) + * jockey/oslib.py: Provide an apt implementation of has_repositories(). + * jockey/oslib.py: Provide an apt implementation of + update_repository_indexes(). + + -- Martin Pitt Thu, 11 Mar 2010 17:48:11 +0100 + +jockey (0.5.7-0ubuntu1) lucid; urgency=low + + * New upstream release: + - gtk/autostart/jockey-gtk.desktop.in: Fix regression from r596, add back + "--check" mode. This fixes jockey always popping up after session start. + - kde: Set the bugEmail variable and add it to the KAboutData constructor + (LP: #398920) + - kde: Bump notification pixmap size down to 22x22, for consistency with + other KDE apps + - kde: Optimize KIcon usage in general + + -- Martin Pitt Thu, 11 Feb 2010 15:40:43 +0100 + +jockey (0.5.6-0ubuntu2) lucid; urgency=low + + * data/handlers/nvidia.py: Update to the new nvidia package structure that + we have in lucid. + + -- Martin Pitt Fri, 05 Feb 2010 13:27:29 -0800 + +jockey (0.5.6-0ubuntu1) lucid; urgency=low + + [ Alberto Milone ] + * debian/control: + - Recommend nvidia-common > 0.2.15 because of the new alternatives + class. + * data/handlers/nvidia.py: + - Add support for the new alternatives system by using the + Alternatives class from nvidia-common. + * data/handlers/fglrx.py: + - Keep fglrx disabled until AMD provides us with a driver that is + compatible with Lucid's xserver. + + [ Martin Pitt ] + * New upstream version: + - xorg_driver.py, enable(): Do not mangle xorg.conf if module is not + available after package installation. (LP: #451305) + - ui.py, set_handler_enabled(): Give an error message pointing to the log + file if driver installation fails. (LP: #451305) + - nvidia.py: Remove options for version 71, it does not work with current + X.org versions any more + - backend.py: Explicitly pass start-time to PolicyKit CheckAuthorization + call, to work with polkit-1 0.95. (LP: #491136) + - jockey-kde notification fixes, thanks Jonathan Thomas + - Add libappindicator support, thanks Conor Curran + - Add do_blacklist argument in the ctor of the KernelModuleHandler class, + thanks Alberto Milone + * Drop 01_app_indicator_integration.patch: Applied upstream. + * gtk/autostart/jockey-gtk.desktop.in: Replace "--check 60" with new + X-GNOME-Autostart-Delay option. (Cherrypicked from trunk) + * debian/control: Explicitly depend on python-kde4 to have a working + pykdeuic4, until the dependency gets fixed. + + -- Martin Pitt Mon, 01 Feb 2010 16:27:41 -0800 + +jockey (0.5.5-0ubuntu6) lucid; urgency=low + + * debian/control + - Added recommends for python-appindicator (>= 0.0.6) to jockey-gtk + + -- Ken VanDine Fri, 08 Jan 2010 16:10:41 -0500 + +jockey (0.5.5-0ubuntu5) lucid; urgency=low + + * debian/patches/01_app_indicator_integration.patch + - Adds application indicator support (LP: #497879) + * debian/rules + - added simple-patchsys.mk + + -- Ken VanDine Fri, 08 Jan 2010 15:13:20 -0500 + +jockey (0.5.5-0ubuntu4) lucid; urgency=low + + * data/handlers/nvidia.py: Remove suppressing of driver version 71, it's not + available any more at all. + * Merge bug fixes from trunk: + - backend.py: Explicitly pass start-time to PolicyKit CheckAuthorization + call, to work with polkit-1 0.95. (LP: #491136) + - Remove options for version 71, it does not work with current X.org + versions any more. + + -- Martin Pitt Fri, 04 Dec 2009 18:46:36 +0100 + +jockey (0.5.5-0ubuntu3) karmic-proposed; urgency=low + + * Merge bug fixes from trunk: + - xorg_driver.py, enable(): Do not mangle xorg.conf if module is not + available after package installation. (LP: #451305, part 1) + - ui.py, set_handler_enabled(): Give an error message pointing to the log + file if driver installation fails. (LP: #451305, part 2) + * data/handlers/{fglrx,nvidia}.py: Override enable() method to first try and + install the corresponding kernel headers for the current kernel, to + eliminate a common reason for driver installation failure. + (LP: #451305, part 3) + + -- Martin Pitt Mon, 09 Nov 2009 14:30:34 +0100 + +jockey (0.5.5-0ubuntu2) karmic; urgency=low + + * data/handlers/b43.py: Remove bcmwl-kernel-source on installation, so that + it actually has a chance to work when wl was active before. (LP: #443185) + + -- Martin Pitt Thu, 22 Oct 2009 21:58:32 +0200 + +jockey (0.5.5-0ubuntu1) karmic; urgency=low + + * New upstream bug fix release: + - jockey-kde: Fix broken icons. (LP: #438940) + + -- Martin Pitt Fri, 02 Oct 2009 13:27:28 +0200 + +jockey (0.5.4-0ubuntu1) karmic; urgency=low + + * New upstream bug fix release: + - Update tests for openprinting.org changes; LaserJet 3020 does not exist + any more, replace with DesignJet 3050CP. + - Handler: Reload module blacklist after installing a driver package, + since it might ship blacklists. + - setup.py: Fix DistUtilsExtra version check. (LP: #428337) + - jockey-gtk: Check for having $DISPLAY at startup to avoid crashes. + (LP: #204134) + * ui.py: Fix error message parsing, thanks to rugby471! (LP: #386375) + * Add data/handlers/dvb_usb_firmware.py: Handler for DVB USB cards which + need to have the linux-firmware-nonfree package installed. (LP: #223212) + + -- Martin Pitt Mon, 21 Sep 2009 18:31:45 +0200 + +jockey (0.5.3-0ubuntu3) karmic; urgency=low + + [ Martin Pitt ] + * broadcom_wl.py: Run rmmod with full path, since the backend doesn't have a + $PATH when being activated by D-Bus. (LP: #403925) + + -- Mario Limonciello Fri, 07 Aug 2009 16:02:26 -0500 + +jockey (0.5.3-0ubuntu2) karmic; urgency=low + + * debian/control: Bump python-distutils-extra build dep (needs at least + 2.4). + * debian/jockey-common.install: Update path for PolicyKit files. + + -- Martin Pitt Tue, 14 Jul 2009 17:42:12 +0200 + +jockey (0.5.3-0ubuntu1) karmic; urgency=low + + * New upstream release: + - Add a text frontend, 'jockey-text'. Although the GTK and KDE frontends + can be launched and scripted command line, they are dependent upon + DISPLAY being set. This text frontend has the ability to run in a true + text only environment. (By Mario Limonciello) (LP: #394688) + - Ported to polkit-1. + * debian/control: Update policykit dependencies to policykit-1. Drop + policykit-kde, since it does not exist so far. + * Merge bug fix from trunk: Move X-KDE-autostart-phase: field from menu to + autostart .desktop. + * kde/jockey-kde, kde/jockey-kde.desktop.in: Reintroduce code to run + frontend as root, since there is no KDE frontend for polkit-1 yet. + * data/handlers/broadcom_wl.py: rmmod b43 and friends before enabling wl, so + that it will work on the fly. (LP: #393689) + + -- Martin Pitt Tue, 14 Jul 2009 17:27:14 +0200 + +jockey (0.5.2-0ubuntu1) karmic; urgency=low + + * New upstream release 0.5.1: + - Add yum detection to packaging_system. + - Implement package installation/removal with PackageKit. (Not used in + Ubuntu right now). + - Fully functional on Fedora Core 10. + * New upstream release 0.5.2: + - Convert build system to DistUtilsExtra.auto. + - kde/jockey-kde.desktop.in: Move autostart to phase 2, for smoother + login. (LP: #369733) + - ui.py: Make proprietary driver warning less scary. (LP: #381805) + - jockey-gtk: port from glade to GtkBuilder. + * debian/control: Bump python-distutils-extra build dependency to ensure + availability of DistUtilsExtra.auto. + * debian/control: Drop obsolete python-glade2 dependency. + * debian/jockey-gtk.install: Install *.ui file instead of *.glade. + * jockey/oslib.py, ui_help(): Update yelp location for help, thanks Matthew + East! (LP: #274845) + * data/handlers/broadcom_wl.py: Require package bcmwl-kernel-source. Drop + our handling of the module blacklisting, bcmwl-kernel-source now does that + by itself. (LP: #381678) + * Move jockey.kdeui Python modules from jockey-common to jockey-kde. + * debian/control: Drop obsolete restricted-manager-* conflicts/replaces. + * debian/rules: Drop call to dh_icons, cdbs has done that for us for a long + time. + * debian/control: Bump Standards-Version to 3.8.2 (no changes necessary). + * debian/control: Recommend bcmwl-modaliases, so that the driver is detected + by default. (LP: #381683) + + -- Martin Pitt Mon, 29 Jun 2009 16:21:37 +0200 + +jockey (0.5-0ubuntu10) jaunty; urgency=low + + * kde/jockey-kde: Revert Ubuntu specific change to call application through + kdesu from the applet. This isn't necessary any more with policykit-kde. + (LP: #357133) + + -- Martin Pitt Tue, 07 Apr 2009 09:39:26 -0700 + +jockey (0.5-0ubuntu9) jaunty; urgency=low + + * jockey/ui.py: Fix previous change to not break existing translations. + (LP: #353081) + + -- Martin Pitt Mon, 06 Apr 2009 14:47:05 -0700 + +jockey (0.5-0ubuntu8) jaunty; urgency=low + + * Merge fixes from trunk: + - ui.py, get_ui_driver_name(): If driver has a version, show it. + - nvidia.py: Set self.version instead of mangling name(), to avoid + breaking translations. (LP: #353081) + - Update German translations. + + -- Martin Pitt Mon, 06 Apr 2009 10:55:13 -0700 + +jockey (0.5-0ubuntu7) jaunty; urgency=low + + * Add support for unannounced drivers, i. e. drivers which do not cause + --check to report newly available drivers. This is a prerequisite for + LP #346078. (Cherrypicked from trunk.) + * data/handlers/madwifi.py: Only announce this driver through --check if + ath5k is not loaded. (LP: #346078) + * debian/control: Add alternative policykit-{gnome,kde} dependencies, to + make it possible to install -kde on GNOME or -gnome on KDE. + * jockey-gtk: Improve default height of driver list VPane, depending on + number of available drivers. (Cherrypicked from trunk) (LP: #291028) + + -- Martin Pitt Wed, 01 Apr 2009 11:03:44 +0200 + +jockey (0.5-0ubuntu6) jaunty; urgency=low + + * jockey/ui.py: If the backend crashes, ask the user to file a bug with + ubuntu-bug, not on Launchpad. + + -- Martin Pitt Fri, 27 Mar 2009 18:42:01 +0100 + +jockey (0.5-0ubuntu5) jaunty; urgency=low + + * Add debian/watch. + * Add bzr-builddeb configuration. + * data/handlers/fglrx.py: Enable again, 2:8.600-0ubuntu1 works on Jaunty + now. + * Merge bug fixes from trunk: + - Fix KernelModuleHandler.available() to return False when the handler + package is not available. This fixes the situation that Jockey + advertises e. g. the nvidia driver before apt-get update was run, or on + "free software only" installs. (LP: #341647) + - kde/jockey-kde.desktop.in: Do not run as root any more, PolicyKit-KDE + exists now; update README.txt + - kde/jockey-kde: Port to knotify4. UIF exception approval and original + patch by Jonathan Riddell. Now properly i18n'ed and integrated into + standard build system. + - Update German translations. + * debian/control: Add policykit-kde dependency to jockey-kde. + * Add madwifi handler (merged from trunk). This now takes care of properly + flipping the blacklisting between ath5k and ath_pci (LP: #323830), and + fixes the description and freeness state (LP: #290264) + * jockey/oslib.py: Overwrite apt.InstallProgress.fork() to capture the + child's stdout/stderr into temporary files, and then send that to logging. + Before this, apt/dpkg output was sent to oblivion, making it hard to + remotely debug package installation problems. (LP: #280291) + + -- Martin Pitt Wed, 18 Mar 2009 20:04:01 +0100 + +jockey (0.5-0ubuntu4) jaunty; urgency=low + + * Merge bug fixes from trunk: + - Fix KDE autostart file. + - handlers.py: Fix crash if closing /sys file during rebind fails + (LP: #335567) + - nvidia.py: Do not attempt to rebind driver, it's doomed to fail anyway. + * nvidia.py: Remove -libvdpau for driver >= 180, and nvidia-settings, when + removing the driver. + + -- Martin Pitt Mon, 16 Mar 2009 19:26:56 +0100 + +jockey (0.5-0ubuntu3) jaunty; urgency=low + + * data/handlers/broadcom_wl.py: Fix spelling of the b43legacy module. + * data/handlers/broadcom_wl.py: Fix ordering of module loading if b44 is + needed/loaded as well: Blacklist b44, and load it in the "install wl" + rule, so that wl always comes first. (LP: #333903) + * Merge bug fixes from trunk: + - oslib.py: Do not grab lsb-release stderr. + - oslib.py: Append ".conf" suffix to blacklist file, since current + modutils deprecates anything else. + * data/handlers/{b43,broadcom_wl}.py: Rename blacklist-bcm43 to + blacklist-bcm43.conf, for the same reason. + * debian/jockey-common.postinst: Rename blacklist-{bcm43,local} to *.conf on + upgrades. + + -- Martin Pitt Sat, 07 Mar 2009 15:34:09 +0100 + +jockey (0.5-0ubuntu2) jaunty; urgency=low + + [ Martin Pitt ] + * Merge bug fixes from trunk: + - Replace Exception.message with str(Exception), since .message is + deprecated in Python 2.6. + * Python transition: Build for all Python versions again, to work + with 2.6. Include links in the .deb, bump python-central + build dependency for this. + * debian/rules: Drop DEB_PYTHON_INSTALL_ARGS_ALL setting; + --no-compile is set by default nowadays, and explicitly setting it + hides python-distutils.mk's --install-layout option. + * data/handlers/sl_modem.py: Recognize modems which are subdevices + of alsa cards, and thus only appear in "aplay -l", not in + /proc/asound/cards. Thanks to Peteris Krisjanis for the patch! + (LP: #295158) + + [ Mario Limonciello ] + * data/handlers/broadcom_wl.py: + - if we don't offer b43 at all with the card, and the Broadcom STA + driver is loaded, it is implicitly "enabled". (LP: #288211) + + -- Martin Pitt Fri, 27 Feb 2009 09:04:16 +0100 + +jockey (0.5-0ubuntu1) jaunty; urgency=low + + * Final 0.5 upstream release. Compared to our previous snapshot this + just provides updated translations. + * The clean orig.tar.gz now finally drops the erroneous emblems. + (LP: #330421) + * debian/apport_hook.py: Attach /var/log/jockey.log and hardware + information. + + -- Martin Pitt Tue, 24 Feb 2009 16:47:31 +0100 + +jockey (0.5~beta3-0ubuntu13) jaunty; urgency=low + + * backend.py, new_used_available(): Always write check cache, so + that we avoid starting --check from autostart .desktop if there + are no drivers. + + -- Martin Pitt Mon, 02 Feb 2009 09:57:37 +0100 + +jockey (0.5~beta3-0ubuntu12) jaunty; urgency=low + + * nvidia.py: Re-enable, current versions should now work with + current X.org. + + -- Martin Pitt Sun, 01 Feb 2009 21:15:37 +0100 + +jockey (0.5~beta3-0ubuntu11) jaunty; urgency=low + + * Merge bug fixes from trunk: + - autostart *.desktop.in: Only run if /var/cache/jockey/check does + not exist. + - Update D-Bus policy for the backend (LP: #318745) + - Move status icons from emblems/ to actions/, emblems/ are wrong. + * oslib.py, add_repository(): Intercept {Lock,Fetch}FailedException + similarly to install_package(). (LP: #287468) + + -- Martin Pitt Thu, 29 Jan 2009 17:37:07 +0100 + +jockey (0.5~beta3-0ubuntu10) jaunty; urgency=low + + * data/handlers/{fglrx,nvidia}.py: Disable for now, they do not + currently work with X.org 1.6. + + -- Martin Pitt Wed, 17 Dec 2008 10:29:26 +0100 + +jockey (0.5~beta3-0ubuntu9) jaunty; urgency=low + + * Merge from trunk: + - jockey-gtk: Enlarge driver list if there are more than 3 available + drivers. (LP: #291028) + - ui.py: If an activated driver has a package, label the action "Remove", + not "Deactivate". (LP: #284435) + - Update German translations. + * backend/com.ubuntu.DeviceDriver.service: Write debug log to + /var/log/jockey.log by default when starting the backend. (LP: #290036) + * Add debian/jockey-common.logrotate for rotating jockey.log. + * data/handlers/broadcom_wl.py: If b44 is loaded, don't disable the entire + handler, but instead install a "wl" modprobe handler which removes ssb and + b44 first, then loads wl, and reloads b44 again, which makes both devices + work. (LP: #289845) + + -- Martin Pitt Fri, 28 Nov 2008 11:57:56 +0100 + +jockey (0.5~beta3-0ubuntu8) jaunty; urgency=low + + * Merge bug fixes from trunk: + - Replace enabled/disabled icons with more decent variant, thanks Kenneth + Wimer! (LP: #290239) + - backend.py: Rewrite timeout behaviour for more robustness; do not time + out right after a long method call. + - Intercept crashes of the backend (which manifest as D-BUS NoReply + error), present an error message, and restart backend. (LP: #273600) + - jockey-gtk: Fix crash if nothing is selected in the tree view after an + operation. (LP: #283887) + - fglrx.py: Unconfigured driver defaults to ati, which already provides + compositing. (LP: #285879) + * jockey/oslib.py, install_package(): Use --force-confnew to fix hang/crash + on "EOF on stdin at conffile prompt", since the jockey backend does not + have any terminal or interactivity. This fixes fglrx install failure when + the upstream installer was previously used. This still keeps .dpkg-old + configuration backups, and using a tool like Jockey should "make it work". + (LP: #283765) + * data/handlers/b43.py: Add missing OSLib import. (LP: #295530) + + -- Martin Pitt Mon, 24 Nov 2008 20:31:53 +0100 + +jockey (0.5~beta3-0ubuntu7) jaunty; urgency=low + + * Merge changes from trunk: + - Prevent corrupting the tree view when clicking on the tray applet + multiple times. (LP: #278071) + - Update translations from Rosetta. + * data/handlers/nvidia.py: Unblacklist nvidia driver version 96, it has been + fixed in intrepid-proposed (see LP #251107). (LP: #293107) + + -- Martin Pitt Mon, 10 Nov 2008 17:24:09 +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.6.orig/debian/jockey-common.postrm +++ jockey-0.6/debian/jockey-common.postrm @@ -0,0 +1,7 @@ +#!/bin/sh -e + +if [ "$1" = remove ]; then + rm -rf /var/cache/jockey +fi + +#DEBHELPER# --- jockey-0.6.orig/debian/jockey-common.install +++ jockey-0.6/debian/jockey-common.install @@ -0,0 +1,11 @@ +usr/lib/python*/*/jockey/*.py +usr/lib/python*/*/*.egg-info +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/polkit-1 +usr/share/jockey/jockey-backend +usr/bin/jockey-text --- jockey-0.6.orig/debian/copyright +++ jockey-0.6/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.6.orig/debian/source/format +++ jockey-0.6/debian/source/format @@ -0,0 +1 @@ +1.0 --- jockey-0.6.orig/debian/debhelper/dh_modaliases +++ jockey-0.6/debian/debhelper/dh_modaliases @@ -0,0 +1,149 @@ +#!/usr/bin/perl -w + +=head1 NAME + +dh_modaliases - scan kmod modaliases and provide a substvar for them + +=cut + +use strict; +use File::Find; +use Debian::Debhelper::Dh_Lib; + +=head1 SYNOPSIS + +B [S>] + +=head1 DESCRIPTION + +B is useful for packages that ship third-party kernel modules, +either in binary form, or as sources (with e. g. DKMS). It extracts the +modules' modaliases from either the compile .ko files themselves (for packages +which ship them in compiled form, using B), or from a package file +BIB<.modaliases> (see below). + +I creates a package substitution variable C<${modaliases}> which you should add +to C as + +=over 4 + +XB-Modaliases: ${modaliases} + +=back + +This enables software which is looking for missing driver packages (such as +Jockey or the operating system installer) to identify which package(s) will +provide a driver for a piece of hardware, identified by its modalias. + +=head1 PACKAGE MODALIAS FILES + +If a package ships source code (using DKMS, module-assistant, etc.) instead of +compiled binary kernel modules, then B can't figure out the +modaliases by scanning the *.ko files, and you have to provide the modalias +list manually as a package file BIB<.modaliases>. + +The format matches the /lib/modules/`uname -r`/modules.alias file from the +Linux kernel. Examples: + +=over 4 + +alias ssb:v1234id5678 snd_super_booster +alias pci:v000010DEd0000004Esv*sd*bc03sc*i* nvidia_current + +=back + +You can generate such a list if you locally build and install this module, and +then run + +=over 4 + +modinfo mymodname | perl -nae 'print "alias $1 mymodname\n" if /^alias:\s+(.*)$/' + +=back + +(replacing "mymodname" with the actual module name). + +=head1 OPTIONS + +The standard debhelper options are supported. + +=cut + +init(); + +my $aliases; + +sub modalises_from_ko { + my $name = $_; + return unless /\.ko$/; + return if -l $_ or -d $_; # Skip directories and symlinks + + # See if we were asked to exclude this file. + foreach my $f (@{$dh{EXCLUDE}}) { + return if ($File::Find::name =~ m/\Q$f\E/); + } + + my ($modname) = ($name =~ /^(.*)\.ko$/); + $modname =~ s/-/_/g; # canonical names are with underscores + my @a; + open M, '-|', 'modinfo', $name or die "open: $!"; + while () { + if (/^alias:\s*(.*)$/) { + verbose_print("$File::Find::name: module $modname has alias $1"); + push @a, $1; + } + } + if ($aliases) { + $aliases .= ', '; + } + $aliases .= $modname . '(' . (join ', ', @a) . ')'; +} + +sub modalises_from_pkgfile { + my %module_alias_map = (); + open F, $_[0]; + while () { + next if /^#/; + + if (/^alias\s*([^[:space:]]+)\s*([^[:space:]]+)/) { + verbose_print("package file $_[0]: module $2 has alias $1"); + push @{$module_alias_map{$2}}, $1; + } else { + warning("$_[0]: cannot translate line into modalias: $_"); + } + } + + foreach my $m (sort keys %module_alias_map) { + if ($aliases) { + $aliases .= ', '; + } + $aliases .= $m . '(' . (join ', ', @{$module_alias_map{$m}}) . ')'; + } +} + +foreach my $package (@{$dh{DOPACKAGES}}) +{ + my $tmp = tmpdir($package); + + delsubstvar($package, 'modaliases'); + $aliases = ''; + my $manual_list = pkgfile($package, 'modaliases'); + if ($manual_list) { + modalises_from_pkgfile $manual_list; + } else { + find(\&modalises_from_ko, tmpdir($package)); + } + addsubstvar($package, 'modaliases', $aliases); +} + +=head1 SEE ALSO + +L, L + +This program is an extension to debhelper. + +=head1 AUTHOR + +Martin Pitt + +=cut --- jockey-0.6.orig/debian/debhelper/modaliases.pm +++ jockey-0.6/debian/debhelper/modaliases.pm @@ -0,0 +1,11 @@ +#!/usr/bin/perl +# debhelper sequence file for dh_modaliases + +use warnings; +use strict; +use Debian::Debhelper::Dh_Lib; + +insert_after("dh_install", "dh_modaliases"); + +1; + --- jockey-0.6.orig/debian/debhelper/test_dh_modaliases +++ jockey-0.6/debian/debhelper/test_dh_modaliases @@ -0,0 +1,74 @@ +#!/bin/sh +# test dh_modaliases +set -e + +fail() +{ + /bin/echo -e "$1" + exit 1 +} + +dh=$(dirname `readlink -f $0`)/dh_modaliases +module=`modinfo snd_hda_intel | grep ^filename: | awk '{print $2}'` + +# build sandbox +D=`mktemp -d` +trap "rm -r $D" 0 HUP INT QUIT ILL ABRT FPE SEGV PIPE TERM +cd $D + +# create test package +mkdir -p src/debian +cd src + +cat < debian/control +Source: foo +Build-Depends: debhelper (>= 7) +Maintainer: Joe Tester + +Package: foo +Architecture: any +Description: test +Depends: \${shlibs:Depends} +XB-Modaliases: \${modaliases} +EOF +cat < debian/rules +#!/usr/bin/make -f +%: + dh \$@ + +override_dh_install: + dh_install + install -m 644 -D $module debian/foo/lib/modules/extra/`basename $module` + $dh -v +EOF +cat < debian/changelog +foo (1) test; urgency=low + + * Test + + -- Joe Tester Thu, 18 Nov 2010 16:15:29 +0100 +EOF +echo 7 > debian/compat + +# build it and check the generated headers from the .ko +#dpkg-buildpackage -us -uc +# +#header=`dpkg -I ../foo_1_*.deb` +#echo "$header" | grep -q '^[[:space:]]*Package: foo$' || fail "No proper Package: header in\n$header" +#echo "$header" | grep -q '^[[:space:]]*Modaliases: snd_hda_intel(pci:v00001022d\*sv\*sd\*bc04sc03i00\*, pci:.*i\*.*)$' || fail "No proper modalises in\n$header" +# +# now add a manual modalias file +cat < debian/foo.modaliases +alias ssb:v1234id0000 `basename $module .ko` +alias pci:DEADBEEF `basename $module .ko` ignorethispackagename +alias pci:98765 testmod +EOF + +# build it and check the generated headers from the .ko +dpkg-buildpackage -us -uc + +header=`dpkg -I ../foo_1_*.deb` +echo "$header" | grep -q '^[[:space:]]*Package: foo$' || fail "No proper Package: header in\n$header" +echo "$header" | grep -q "^[[:space:]]*Modaliases: `basename $module .ko`(ssb:v1234id0000, pci:DEADBEEF), testmod(pci:98765)$" || fail "No proper modalises in\n$header" + +echo "PASSED"