--- jockey-0.9.4.orig/jockey/oslib.py +++ jockey-0.9.4/jockey/oslib.py @@ -1,4 +1,4 @@ -# -*- coding: UTF-8 -*- +# -*- coding: utf-8 -*- # (c) 2007 Canonical Ltd. # # This program is free software; you can redistribute it and/or modify @@ -20,6 +20,25 @@ import fcntl, os, subprocess, sys, logging, re, tempfile, time, shutil from glob import glob +import warnings +warnings.simplefilter('ignore', FutureWarning) +import apt + +class _CapturedInstallProgress(apt.InstallProgress): + def __init__(self): + apt.InstallProgress.__init__(self) + self.out = None + + def fork(self): + '''Reroute stdout/stderr to files, so that we can log them''' + + self.out = tempfile.TemporaryFile() + p = os.fork() + if p == 0: + os.dup2(self.out.fileno(), sys.stdout.fileno()) + os.dup2(self.out.fileno(), sys.stderr.fileno()) + return p + class OSLib: '''Encapsulation of operating system/Linux distribution specific operations.''' @@ -109,69 +128,102 @@ # available, or being pulled in via dependencies (and there are not # multiple kernel flavors), it is ok to set this to "None". This should # use self.target_kernel instead of os.uname()[2]. - self.kernel_header_package = None + # Note that we want to install the metapackage here, to ensure upgrades + # will keep working. + flavour = '-'.join(self.target_kernel.split('-')[2:]) + self.kernel_header_package = 'linux-headers-' + flavour + + self.apt_show_cache = {} + self.apt_sources = '/etc/apt/sources.list' + self.apt_jockey_source = '/etc/apt/sources.list.d/jockey.list' + self.apt_trusted_keyring = '/etc/apt/trusted.gpg.d/jockey-drivers.gpg' + + self._current_xorg_video_abi = None # # 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 + else: + raise SystemError('failed to parse package description from ' + '\n'.join(lines)) + + 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) @@ -203,43 +255,95 @@ due to bad packages should be logged, but not raise an exception, as this would just crash the backend. ''' - if repository or fingerprint: - raise NotImplementedError('PackageKit default implementation does not currently support repositories or fingerprints') + class MyFetchProgress(apt.FetchProgress): + def __init__(self, callback): + apt.FetchProgress.__init__(self) + self.callback = callback + + def pulse(self): + # consider download as 40% of the total progress for installation + logging.debug('download progress %s %f' % (pkg, self.percent)) + return not self.callback('download', int(self.percent/2.5+10.5), 100) + + class MyInstallProgress(_CapturedInstallProgress): + def __init__(self, callback): + _CapturedInstallProgress.__init__(self) + self.callback = callback + + def statusChange(self, pkg, percent, status): + # consider install as 50% of the total progress for installation + logging.debug('install progress %s %f' % (pkg, percent)) + self.callback('install', int(percent/4+50.5), 100) + + logging.debug('Installing package: %s', package) + if progress_cb: + progress_cb('download', 0, 100.0) + + if repository: + if not self.repository_enabled(repository): + logging.debug('install_package(): adding repository %s', repository) + self._add_repository(repository, fingerprint, progress_cb) + repository_added = True + else: + logging.debug('install_package(): repository %s already active', repository) + repository_added = False - # this will check if the package exists - self.package_description(package) + os.environ['DEBIAN_FRONTEND'] = 'noninteractive' + # Disconnect from any running Debconf instance. + try: + del os.environ['DEBIAN_HAS_FRONTEND'] + except KeyError: + pass + try: + del os.environ['DEBCONF_USE_CDEBCONF'] + except KeyError: + pass + os.environ['PATH'] = '/sbin:/usr/sbin:/bin:/usr/bin' + apt.apt_pkg.config.set('DPkg::options::','--force-confnew') - pkcon = subprocess.Popen(['pkcon', 'install', '-v', package], - stdout=subprocess.PIPE, stderr=subprocess.PIPE) + c = apt.Cache() + try: + try: + pkg = c[package] + origins = pkg.candidate.origins + except (KeyError, AttributeError): + raise ValueError('Package %s does not exist' % package) + + # if we have a binary package, we require a trusted origin; if we + # don't have one, and we added a repository, remove it again + # note: pkg.candidate.architecture switched away from "all" in Ubuntu 11.04 + if pkg.candidate.record['Architecture'] != 'all': + for o in origins: + if o.trusted: + break + else: + logging.error('Binary package %s has no trusted origin, rejecting', package) + if repository and repository_added: + self._remove_repository(repository) + return - re_progress = re.compile('progress-changed (\d+), (\d+),') + pkg.markInstall() + inst_p = progress_cb and MyInstallProgress(progress_cb) or None + try: + try: + c.commit(progress_cb and MyFetchProgress(progress_cb) or None, inst_p) + finally: + if inst_p and inst_p.out: + inst_p.out.seek(0) + apt_out = inst_p.out.read().decode('UTF-8', errors='replace') + inst_p.out.close() + logging.debug(apt_out) + else: + apt_out = '' + except SystemError as e: + logging.error('Package failed to install:\n' + apt_out) + return + + except apt.cache.FetchCancelledException as e: + return + except (apt.cache.LockFailedException, apt.cache.FetchFailedException) as e: + logging.error('Package fetching failed: %s', str(e)) - 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): - logging.error('package %s failed to install: %s' % (package, err)) - def remove_package(self, package, progress_cb): '''Uninstall the given package. @@ -253,35 +357,49 @@ 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))) + 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 + try: + try: + c.commit(None, inst_p) + finally: + if inst_p and inst_p.out: + inst_p.out.seek(0) + apt_out = inst_p.out.read().decode('UTF-8', errors='replace') + inst_p.out.close() + logging.debug(apt_out) + else: + apt_out = None + except SystemError as e: + if apt_out: + raise SystemError('Package failed to remove:\n' + apt_out) 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)) + raise + except apt.cache.LockFailedException as 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. @@ -289,12 +407,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. @@ -306,14 +422,24 @@ 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): + #logging.debug('index download progress %f' % self.percent) + self.callback(self.percent, 100.0) + + c = apt.Cache() + try: + c.update(progress_cb and MyProgress(progress_cb) or None) + except apt.cache.LockFailedException as 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): @@ -415,7 +541,17 @@ 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. @@ -423,7 +559,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. @@ -432,7 +568,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', 'help:ubuntu-help/hardware-driver-proprietary'], + flags=gobject.SPAWN_SEARCH_PATH) # # The following functions have a reasonable default implementation for @@ -466,7 +605,18 @@ 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('-', '_')) + + return result def module_blacklisted(self, module): '''Check if a module is on the modprobe blacklist.''' @@ -591,9 +741,12 @@ The default implementation does nothing. ''' - pass + try: + subprocess.call(['/usr/share/update-notifier/notify-reboot-required']) + except OSError: + pass - def package_header_modaliases(self): + def package_header_modaliases(self, cache=None): '''Get modalias map from package headers. Driver packages may declare the modaliases that they support in a @@ -603,7 +756,39 @@ If this is not supported, simply return an empty dictionary here. ''' - return {} + result = {} + if cache is None: + cache = apt.Cache() + + # get the system architecture, to avoid getting non-native multi-arch + # packages + dpkg = subprocess.Popen(['dpkg', '--print-architecture'], + stdout=subprocess.PIPE) + system_architecture = dpkg.communicate()[0].strip() + assert dpkg.returncode == 0 + + for package in cache: + if package.architecture() != system_architecture: + continue + try: + m = package.candidate.record['Modaliases'] + except (KeyError, AttributeError): + 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 def ssl_cert_file(self): '''Get file with trusted SSL certificates. @@ -649,7 +834,16 @@ If this returns None, ABI checking is disabled. ''' - return None + if not self._current_xorg_video_abi: + dpkg = subprocess.Popen(['dpkg', '-s', 'xserver-xorg-core'], + stdout=subprocess.PIPE) + out = dpkg.communicate()[0] + if dpkg.returncode == 0: + m = re.search('^Provides: .*(xorg-video-abi-\w+)', out, re.M) + if m: + self._current_xorg_video_abi = m.group(1) + + return self._current_xorg_video_abi def video_driver_abi(self, package): '''Return video ABI for an X.org driver package. @@ -662,4 +856,89 @@ If this returns None, ABI checking is disabled. ''' - return None + abi = None + dpkg = subprocess.Popen(['apt-cache', 'show', package], + stdout=subprocess.PIPE) + out = dpkg.communicate()[0] + if dpkg.returncode == 0: + m = re.search('^Depends: .*(xorg-video-abi-\w+)', out, re.M) + if m: + abi = m.group(1) + + return abi + + # + # Internal helper methods + # + + def _add_repository(self, repository, fingerprint, progress_cb): + '''Add a repository. + + The format for repository is distribution specific. This function + should also download/update the package index for this repository. + + This should throw a ValueError if the repository is invalid or + inaccessible. + + fingerprint, if not None, is a GPG-style fingerprint of that + repository; if present, this method also retrieves that GPG key + from the keyservers and installs it into the packaging system. + ''' + if fingerprint: + self.import_gpg_key(self.apt_trusted_keyring, fingerprint) + + 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, 'a') + print >> f, repository.strip() + f.close() + + class MyFetchProgress(apt.FetchProgress): + def __init__(self, callback): + apt.FetchProgress.__init__(self) + self.callback = callback + + def pulse(self): + self.callback + logging.debug('index download progress %f' % self.percent) + # consider update as 10% of the total progress for installation + return not self.callback('download', int(self.percent/10+.5), 100) + + c = apt.Cache() + try: + logging.debug('_add_repository(): Updating apt lists') + c.update(progress_cb and MyFetchProgress(progress_cb) or None, + sources_list=self.apt_jockey_source) + 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. + ''' + 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) --- jockey-0.9.4.orig/jockey/backend.py +++ jockey-0.9.4/jockey/backend.py @@ -26,7 +26,7 @@ import dbus import dbus.service import dbus.mainloop.glib -from gi.repository import GLib +from gi.repository import GObject from jockey.oslib import OSLib import detection, xorg_driver @@ -75,7 +75,7 @@ _h_exception_exc = exception loop.quit() - loop = GLib.MainLoop() + loop = GObject.MainLoop() global _h_reply_result, _h_exception_exc _h_reply_result = None _h_exception_exc = None @@ -665,13 +665,13 @@ once the server is ready to take requests. ''' dbus.service.Object.__init__(self, self.bus, '/DeviceDriver') - self.main_loop = GLib.MainLoop() + self.main_loop = GObject.MainLoop() self._timeout = False if timeout: def _t(): self.main_loop.quit() return True - GLib.timeout_add(timeout * 1000, _t) + GObject.timeout_add(timeout * 1000, _t) # send parent process a signal that we are ready now if send_usr1: --- jockey-0.9.4.orig/jockey/xorg_driver.py +++ jockey-0.9.4/jockey/xorg_driver.py @@ -16,7 +16,8 @@ '''Abstract handler for a restricted X.org graphics driver.''' -import os.path, logging +import os.path, logging, re +from glob import glob import XKit.xutils import XKit.xorgparser @@ -357,3 +358,26 @@ return False + @classmethod + def loaded_drivers(klass, log_dir='/var/log/'): + '''Return a set of graphics drivers loaded by X.org.''' + + # find the most recent X.org log + log = None + max_time = 0 + for f in glob(os.path.join(log_dir, 'Xorg.*.log')): + mtime = os.stat(f).st_mtime + if mtime > max_time: + max_time = mtime + log = f + + drivers = set() + if not log: + return drivers + + with open(log) as f: + for match in re.finditer('\(II\) Loading.*modules\/drivers\/(.+)_drv\.so', f.read()): + drivers.add(match.group(1)) + + return drivers + --- jockey-0.9.4.orig/jockey/ui.py +++ jockey-0.9.4/jockey/ui.py @@ -568,7 +568,7 @@ h_id = self.backend().check_composite() if h_id: - self.set_handler_enable(h_id, 'enable', True) + self.set_handler_enable(h_id, 'enable', self.argv_options.confirm) return bool(self.backend().handler_info(h_id)['enabled']) self.error_msg(self._('There is no available graphics driver for your system which supports the composite extension, or the current one already supports it.')) @@ -676,7 +676,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 @@ -876,8 +876,8 @@ dbus_name = dbus.service.BusName(DBUS_BUS_NAME, bus) dbus.service.Object.__init__(self, bus, '/GUI') - from gi.repository import GLib - self.dbus_server_main_loop = GLib.MainLoop() + from gi.repository import GObject + self.dbus_server_main_loop = GObject.MainLoop() self.dbus_server_main_loop.run() @classmethod @@ -906,11 +906,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.9.4.orig/jockey/detection.py +++ jockey-0.9.4/jockey/detection.py @@ -736,7 +736,7 @@ for h in backend.handler_pool.itervalues(): if isinstance(h, handlers.KernelModuleHandler) and \ h.module == did['kernel_module'] and \ - (not h.package or not did['package'] or h.package == did['package']): + (not h.package or not 'package' in did or h.package == did['package']): logging.debug('found match in handler pool %s', h) del kwargs['kernel_module'] hclass = h.__class__ --- jockey-0.9.4.orig/tests/oslib.py +++ jockey-0.9.4/tests/oslib.py @@ -1,4 +1,4 @@ -# -*- coding: UTF-8 -*- +# -*- coding: utf-8 -*- '''oslib tests''' @@ -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, subprocess +import unittest, os, tempfile, shutil, subprocess, sys, re, apt from jockey.oslib import OSLib import sandbox @@ -35,9 +35,16 @@ def setUp(self): (fd, self.tempfile) = tempfile.mkstemp() os.close(fd) + self._create_apt_sandbox() def tearDown(self): os.unlink(self.tempfile) + apt_root = os.path.join(OSLib.inst.workdir, 'aptroot') + if os.path.isdir(apt_root): + shutil.rmtree(apt_root) + archive = os.path.join(OSLib.inst.workdir, 'archive') + if os.path.isdir(archive): + shutil.rmtree(archive) def test_module_blacklisting(self): '''module_blacklisted() and blacklist_module()''' @@ -167,14 +174,8 @@ 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. - ''' - # test package; this is most likely not installed yet (test suite will - # abort if it is) - test_package = 'lrzsz' + def test_package_install_unknown(self): + '''package installation/removal for unknown package''' # use real OSLib here, not test suite's fake implementation o = OSLib() @@ -183,17 +184,98 @@ # this should not crash, since it is not installed o.remove_package('nonexisting', None) - if os.getuid() != 0: - return + def test_package_install_thirdparty_unsigned_indep(self): + '''package installation for unsigned third-party repo, arch indep''' + + archive = self._create_archive() + log_offset = sandbox.log.tell() + self.sandbox_oslib.install_package('myppd', None, 'deb file://' + archive + ' /', + None) + log = sandbox.log.getvalue()[log_offset:] + self.assertTrue('Package failed to install' in log) + + # if we are run as root, this might succeed, and we clean up again + self.sandbox_oslib.remove_package('myppd', None) + + def test_package_install_thirdparty_unsigned_binary(self): + '''package installation for unsigned third-party repo, binary''' + + archive = self._create_archive() + log_offset = sandbox.log.tell() + self.sandbox_oslib.install_package('binary', None, + 'deb file://' + archive + ' /', None) + log = sandbox.log.getvalue()[log_offset:] + self.assertTrue('no trusted origin' in log) + + def test_package_install_thirdparty_signed_binary(self): + '''package installation for signed third-party repo, binary''' + + archive = self._create_archive(signed=True) + self._start_keyserver() + log_offset = sandbox.log.tell() + try: + self.sandbox_oslib.install_package('binary', None, + 'deb file://' + archive + ' /', test_gpg_fp) + log = sandbox.log.getvalue()[log_offset:] + self.assertFalse('no trusted origin' in log) + self.assertTrue('Package failed to install' in log) - self.failIf(o.package_installed(test_package), - '%s must not be installed for this test' % test_package) + # if we are run as root, this might succeed, and we clean up again + self.sandbox_oslib.remove_package('binary', None) + finally: + self._stop_keyserver() - # 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)) + def test_package_install_thirdparty_signed_binary_bad_fp(self): + '''package installation for signed third-party repo, binary, bad fingerprint''' + + archive = self._create_archive(signed=True) + self._start_keyserver() + try: + self.sandbox_oslib.install_package('binary', None, + 'deb file://' + archive + ' /', test_gpg_fp.replace('4', '1')) + self.fail('installing binary package with bad GPG key is not allowed') + except SystemError, e: + # this fails as non-root, as apt can't be told to not chroot(RootDir) + self.assert_('failed to import key' in str(e)) + finally: + self._stop_keyserver() + + def test_ubuntu_repositories(self): + '''Ubuntu implementation of repository add/removal/query''' + + f = open(self.sandbox_oslib.apt_sources, 'w') + f.write('''deb file:///tmp/ / +deb-src http://foo.com/foo nerdy other +#deb http://foo.com/foo nerdy universe +deb http://foo.com/foo nerdy main +''') + + f.close() + f = open(self.sandbox_oslib.apt_sources + '.d/fake.list', 'w') + f.write('deb http://ubun.tu test/\ndeb-src http://ubu.tu xxx/\n') + f.close() + + self.assert_(self.sandbox_oslib.repository_enabled('deb file:///tmp/ /')) + self.failIf(self.sandbox_oslib.repository_enabled('deb file:///tmp2/ /')) + self.failIf(self.sandbox_oslib.repository_enabled('deb http://foo.com/foo nerdy other')) + self.failIf(self.sandbox_oslib.repository_enabled('deb http://foo.com/foo nerdy universe')) + self.assert_(self.sandbox_oslib.repository_enabled('deb http://foo.com/foo nerdy main')) + self.assert_(self.sandbox_oslib.repository_enabled('deb http://ubun.tu test/')) + self.failIf(self.sandbox_oslib.repository_enabled('deb http://ubun.tu xxx/')) + + self.failIf(self.sandbox_oslib.repository_enabled('deb http://third.party moo')) + + archive = self._create_archive() + debline = 'deb file://' + archive + ' /' + self.sandbox_oslib._add_repository(debline, None, None) + + self.assert_(self.sandbox_oslib.repository_enabled(debline)) + self.assert_(os.path.exists(self.sandbox_oslib.apt_jockey_source)) + self.sandbox_oslib._remove_repository(debline) + self.failIf(self.sandbox_oslib.repository_enabled(debline)) + self.failIf(os.path.exists(self.sandbox_oslib.apt_jockey_source)) + self.sandbox_oslib._remove_repository(debline) + self.failIf(self.sandbox_oslib.repository_enabled(debline)) def test_has_repositories(self): '''has_repositories() @@ -204,6 +286,45 @@ o = OSLib() self.assertEqual(o.has_repositories(), True) + def test_ubuntu_package_header_modaliases(self): + '''package_header_modaliases() plausibility for Ubuntu packages''' + + o = OSLib() + map = o.package_header_modaliases() + if not map: + return self.skipTest('no data available') + + module_name_re = re.compile('^[a-zA-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)) + + def test_parse_ubuntu_package_header_modalias(self): + '''package_header_modaliases()''' + + class MockPackage(): + pass + class MockVersion(): + pass + o = OSLib() + pkg = MockPackage() + pkg.name = 'foo' + pkg.candidate = MockVersion() + mock_record = { 'Package' : 'foo', + 'Modaliases' : 'mod1(pci1, pci2), mod2(pci1)' + } + pkg.candidate.record = mock_record + res = o.package_header_modaliases([pkg]) + self.assertEqual(res, + {'foo': {'mod1': ['pci1', 'pci2'], 'mod2': ['pci1']}}) + @unittest.skipUnless(OSLib.has_defaultroute(), 'online test') def test_ssl_cert_file(self): '''ssl_cert_file() @@ -272,6 +393,17 @@ os.environ['PATH'] = orig_path self.assertEqual(o._gpg_keyring_fingerprints(self.tempfile), []) + def test_ubuntu_xorg_video_abi(self): + o = OSLib() + self.assert_(o.current_xorg_video_abi().startswith('xorg-video-abi-')) + self.assert_(o.video_driver_abi('nvidia-current').startswith('xorg-video-abi-')) + + def test_ubuntu_kernel_headers(self): + o = OSLib() + (short, long) = o.package_description(o.kernel_header_package) + self.assert_(short) + self.assert_(long) + # # Helper methods # @@ -297,3 +429,108 @@ httpd.stop() shutil.rmtree(os.path.join(OSLib.inst.workdir, 'pks')) + @classmethod + def _create_deb(klass, name, arch, dir): + '''Create a dummy deb with given name and architecture. + + Return the full path of the deb. + ''' + d = os.path.join(OSLib.inst.workdir, name) + os.makedirs(os.path.join(d, 'DEBIAN')) + + open(os.path.join(d, 'DEBIAN', 'control'), 'w').write('''Package: %s +Version: 1 +Priority: optional +Section: devel +Architecture: %s +Maintainer: Joe +Description: dummy package + just a test dummy package +''' % (name, arch)) + + debpath = os.path.join(dir, '%s_1_%s.deb' % (name, arch)) + assert subprocess.call(['dpkg', '-b', d, debpath], + stdout=subprocess.PIPE) == 0 + + shutil.rmtree(d) + assert os.path.exists(debpath) + return debpath + + @classmethod + def _create_archive(klass, signed=False): + '''Create a test archive. + + This will create a deb archive with one Arch: all package "myppd" + and one architecture dependent package "binary". The release is + name is 'testy'. + + If signed is True, the Release file will be signed with the test + suite's GPG key. + + Return the path to the archive. + ''' + archive = os.path.join(OSLib.inst.workdir, 'archive') + os.mkdir(archive) + + dpkg = subprocess.Popen(['dpkg-architecture', '-qDEB_HOST_ARCH'], + stdout=subprocess.PIPE) + host_arch = dpkg.communicate()[0].strip() + assert dpkg.returncode == 0 + + klass._create_deb('myppd', 'all', archive) + klass._create_deb('binary', host_arch, archive) + + assert subprocess.call('apt-ftparchive packages . > Packages', shell=True, + cwd=archive) == 0 + assert subprocess.call('apt-ftparchive -o APT::FTPArchive::Release::Suite=testy release . > Release', + shell=True, cwd=archive) == 0 + + if signed: + assert subprocess.call(['gpg', '--homedir', OSLib.inst.workdir, + '--no-default-keyring', '--primary-keyring', + os.path.join(os.path.dirname(__file__), 'data', 'pubring.gpg'), + '--secret-keyring', + os.path.join(os.path.dirname(__file__), 'data', 'secring.gpg'), + '-abs', '--batch', '-o', os.path.join(archive, 'Release.gpg'), + os.path.join(archive, 'Release')]) == 0 + + return archive + + def _create_apt_sandbox(self): + '''Create sandbox for apt and configure it to use it''' + + apt_root = os.path.join(OSLib.inst.workdir, 'aptroot') + + # we need to symlink the apt_root into itself, as Cache.update()'s + # sources_list argument prepends RootDir + os.makedirs(apt_root + os.path.dirname(apt_root)) + os.symlink(apt_root, apt_root + apt_root) + + apt.apt_pkg.init_config() + apt.apt_pkg.config.set('RootDir', apt_root) + apt.apt_pkg.config.set('Debug::NoLocking', 'true') + #apt.apt_pkg.config.set('Debug::pkgDPkgPM', 'true') + apt.apt_pkg.config.clear('DPkg::Post-Invoke') + apt.apt_pkg.config.clear('DPkg::Pre-Install-Pkgs') + apt.apt_pkg.config.clear('APT::Update::Post-Invoke-Success') + + os.makedirs(os.path.join(apt_root, 'etc', 'apt', 'sources.list.d')) + os.makedirs(os.path.join(apt_root, 'etc', 'apt', 'apt.conf.d')) + os.makedirs(os.path.join(apt_root, 'etc', 'apt', 'trusted.gpg.d')) + os.makedirs(os.path.join(apt_root, 'usr', 'lib', 'apt')) + os.makedirs(os.path.join(apt_root, 'var', 'lib', 'apt', 'lists', 'partial')) + os.makedirs(os.path.join(apt_root, 'var', 'cache', 'apt', 'archives', 'partial')) + os.makedirs(os.path.join(apt_root, 'var', 'log', 'apt')) + dpkglib = os.path.join(apt_root, 'var', 'lib', 'dpkg') + os.symlink('/usr/lib/apt/methods', os.path.join(apt_root, 'usr', 'lib', 'apt', 'methods')) + os.makedirs(dpkglib) + open(os.path.join(dpkglib, 'status'), 'w').close() + open(os.path.join(apt_root, 'etc', 'apt', 'sources.list'), 'w').close() + + # create matching OSLib + self.sandbox_oslib = OSLib() + self.sandbox_oslib.apt_jockey_source = apt_root + self.sandbox_oslib.apt_jockey_source + self.sandbox_oslib.apt_trusted_keyring = apt_root + self.sandbox_oslib.apt_trusted_keyring + self.sandbox_oslib.apt_sources = apt_root + self.sandbox_oslib.apt_sources + self.sandbox_oslib.gpg_key_server = 'localhost' + --- jockey-0.9.4.orig/tests/handlers.py +++ jockey-0.9.4/tests/handlers.py @@ -1008,6 +1008,27 @@ finally: OSLib.inst.video_driver_abi = orig_video_driver_abi + def test_xorg_driver_loaded_drivers(self): + '''XorgDriverHandler.loaded_drivers()''' + + # system one + drivers = XorgDriverHandler.loaded_drivers() + self.assertEqual(type(drivers), type(set())) + if 'DISPLAY' in os.environ: + self.assertGreaterEqual(len(drivers), 1) + + # synthetic + with open(os.path.join(OSLib.inst.workdir, 'Xorg.1.log'), 'w') as f: + f.write('''X.Org X Server 1.10.4 +[ 14.451] (II) LoadModule: "intel" +[ 14.452] (II) Loading /usr/lib/xorg/modules/drivers/intel_drv.so +[ 14.459] (II) LoadModule: "vesa" +[ 14.459] (II) Loading /usr/lib/xorg/modules/drivers/vesa_drv.so +[ 14.452] (II) Loading /usr/lib/xorg/modules/drivers/intel_drv.so +''') + self.assertEqual(XorgDriverHandler.loaded_drivers(OSLib.inst.workdir), + set(['intel', 'vesa'])) + def test_firmware_handler(self): '''standard FirmwareHandler''' --- jockey-0.9.4.orig/backend/com.ubuntu.DeviceDriver.service +++ jockey-0.9.4/backend/com.ubuntu.DeviceDriver.service @@ -1,4 +1,4 @@ [D-BUS Service] Name=com.ubuntu.DeviceDriver -Exec=/usr/share/jockey/jockey-backend --debug -l /var/log/jockey.log +Exec=/bin/sh -c '. /etc/environment; export http_proxy https_proxy ftp_proxy; exec /usr/share/jockey/jockey-backend --debug -l /var/log/jockey.log' User=root --- jockey-0.9.4.orig/debian/control +++ jockey-0.9.4/debian/control @@ -0,0 +1,77 @@ +Source: jockey +Section: admin +Priority: optional +Build-Depends: debhelper (>= 7.0.50~), + dh-translations, + python-distutils-extra (>= 2.4), + python (>= 2.7) +Maintainer: Martin Pitt +Standards-Version: 3.9.1 +XS-Python-Version: >= 2.7 +Vcs-Bzr: https://code.launchpad.net/~ubuntu-core-dev/jockey/oneiric + +Package: jockey-common +Architecture: all +XB-Python-Version: ${python:Versions} +Depends: ${python:Depends}, + ${misc:Depends}, + python-xkit, + python-dbus, + python-apt, + python-pycurl, + policykit-1, +Recommends: nvidia-common (>= 1:0.2.35.1) +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 +Depends: ${python:Depends}, + ${misc:Depends}, + jockey-common (= ${binary:Version}), + python-gobject (>= 2.27.91), + gir1.2-gtk-3.0, + gir1.2-notify-0.7, + gir1.2-appindicator3-0.1, + policykit-1-gnome +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 +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.9.4.orig/debian/compat +++ jockey-0.9.4/debian/compat @@ -0,0 +1 @@ +7 --- jockey-0.9.4.orig/debian/jockey-common.postinst +++ jockey-0.9.4/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.9.4.orig/debian/apport_hook.py +++ jockey-0.9.4/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.9.4.orig/debian/jockey-common.postrm +++ jockey-0.9.4/debian/jockey-common.postrm @@ -0,0 +1,7 @@ +#!/bin/sh -e + +if [ "$1" = remove ]; then + rm -rf /var/cache/jockey +fi + +#DEBHELPER# --- jockey-0.9.4.orig/debian/watch +++ jockey-0.9.4/debian/watch @@ -0,0 +1,2 @@ +version=3 +http://launchpad.net/jockey/+download .*/jockey-([0-9.]+)\.tar\.gz --- jockey-0.9.4.orig/debian/jockey-common.install +++ jockey-0.9.4/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.9.4.orig/debian/jockey-kde.install +++ jockey-0.9.4/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.9.4.orig/debian/dh-modaliases.install +++ jockey-0.9.4/debian/dh-modaliases.install @@ -0,0 +1,2 @@ +../debhelper/dh_modaliases usr/bin +../debhelper/modaliases.pm usr/share/perl5/Debian/Debhelper/Sequence --- jockey-0.9.4.orig/debian/jockey.ubiquity +++ jockey-0.9.4/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.9.4.orig/debian/changelog +++ jockey-0.9.4/debian/changelog @@ -0,0 +1,1840 @@ +jockey (0.9.4-0ubuntu10.2) oneiric-proposed; urgency=low + + * debian/control: bump dependency on nvidia-common (>= 1:0.2.36). + data/handlers/fglrx.py: pass ignore_pattern='-updates' to + get_alternative_by_name so that the library returns the correct + alternative name (LP: #873058). + + -- Alberto Milone Thu, 17 Nov 2011 21:16:29 +0100 + +jockey (0.9.4-0ubuntu10.1) oneiric-proposed; urgency=low + + * debian/control: Update Vcs-Bzr: for oneiric branch. + * jockey/xorg_driver.py, tests/handlers.py: Add + XorgDriverHandler.loaded_drivers(), as a prerequisite for LP#885204. Patch + cherrypicked from trunk r756. + * data/handlers/nvidia.py: Do not offer this driver if intel X.org driver + is loaded. On hybrid systems where intel is active, installing the + proprietary drivers and their libGL breaks intel. (LP: #885204) + + -- Martin Pitt Wed, 02 Nov 2011 14:10:22 -0400 + +jockey (0.9.4-0ubuntu10) oneiric; urgency=low + + * jockey/oslib.py: Update help link (LP: #866085) + + -- Jeremy Bicha Thu, 06 Oct 2011 06:27:46 +0200 + +jockey (0.9.4-0ubuntu9) oneiric; urgency=low + + * Only ask for confirmation in check_composite if --confirm has been set. + Thanks to Evan Dandrea! Patch cherrypicked from trunk r740. + (LP: #855042) + + -- Martin Pitt Thu, 29 Sep 2011 17:22:09 +0200 + +jockey (0.9.4-0ubuntu8) oneiric; urgency=low + + * data/handlers/{fglrx,nvidia}.py: Drop custom id() methods. They were a + thinko and cause the driver IDs to come out as e. g. + "xorg:nvidia_173_updates-update". The module name is meant to provide + the "_update" suffix already (just didn't do yet because of LP #855396) + + -- Martin Pitt Wed, 28 Sep 2011 16:19:54 +0200 + +jockey (0.9.4-0ubuntu7) oneiric; urgency=low + + [ Alberto Milone ] + * data/handlers/fglrx.py: Use the correct name for the module and for the + package in fglrx.py. (LP: #855396) + + [ Martin Pitt ] + * jockey/oslib.py, package_header_modaliases(): Only consider packages for + the system architecture. This avoids creating non-working default handlers + for e. g. fglrx:i386 on an amd64 system. (LP: #855175) + * Drop data/handlers/nouveau3d.py, it's installed by default now. + (LP: #839533) + + -- Martin Pitt Wed, 21 Sep 2011 12:51:55 +0200 + +jockey (0.9.4-0ubuntu6) oneiric; urgency=low + + * data/handlers/{fglrx,nvidia}.py: + - Pass the correct kernel module name when dealing with updates flavours + (LP: #841462). + + -- Alberto Milone Wed, 07 Sep 2011 12:07:50 +0200 + +jockey (0.9.4-0ubuntu5) oneiric; urgency=low + + * jockey/oslib.py: Fix crash if an apt error occurs even before forking the + apt progress backend. (LP: #838276) + + -- Martin Pitt Mon, 05 Sep 2011 16:45:39 +0200 + +jockey (0.9.4-0ubuntu4) oneiric; urgency=low + + * Merge fix from trunk: + - detection.py: Fix crash if Driver ID does not have a package field. + (LP: #837495) + + -- Martin Pitt Thu, 01 Sep 2011 12:21:31 +0200 + +jockey (0.9.4-0ubuntu3) oneiric; urgency=low + + * jockey/ui.py, jockey/backend.py: Use MainLoop from GObject, not from GLib. + Using GLib is broken for pygobject 2.28. This can be reverted once + pygobject gets upgraded to 2.90. (LP: #836599) + + -- Martin Pitt Tue, 30 Aug 2011 07:40:39 +0200 + +jockey (0.9.4-0ubuntu2) oneiric; urgency=low + + * debian/rules: Run debian/testpkgs/clean through sh, as we use V1 source + and can't keep the executable bit there. + + -- Martin Pitt Mon, 22 Aug 2011 12:38:23 +0200 + +jockey (0.9.4-0ubuntu1) oneiric; urgency=low + + * New upstream bug fix release: + - oslib.py: Do not encourage to report package installation failure as + SystemError, it will appear as a backend crash + - jockey-gtk: Fix message_type argument to Gtk.MessageBox constructor + - jockey/ui.py: For invalid combinations of LC_MESSAGES and LC_CTYPE, force + stdout/stderr encoding to UTF-8 instead of C. (LP: #760883) + - Fix GLib and GObject imports to be compatible with the future pygobject + 3.0. (LP: #829186) + - jockey/detection.py, _driverid_to_handler(): In the case that there are + multiple matching custom handlers for a DriverID, also check that their + "package" attribute matches. + - tests/run: Also support specifying individual test method names + * Add debian/testpkgs/: Scripts and equivs control files for dummy + driver packages which are convenient for testing. + * debian/rules: Call debian/testpkgs/clean to ensure that we don't ship + build stuff there. + * data/handlers/{fglrx,nvidia}.py: Prevent crash if + get_alternative_by_name() returns nothing. + * jockey/oslib.py, {install,remove}_package(): Capture apt's stdout/err into + the log file, to get proper error messages when packages fail to install. + (LP: #552300). + * jockey/oslib.py, install_package(): Avoid raising a SystemError when a + package fails to install in apt, as this will appear as a crash in Jockey. + Just point out the error in the log file instead. (LP: #804709) + * tests/oslib.py: Update test cases for above change. + * tests/oslib.py: Fix apt initialization to work with current apt versions. + * data/handlers/{fglrx,nvidia}.py: Also show the -updates variants of the + drivers, which will be updated to newer upstream versions after the + Ubuntu release. (UbuntuSpec:desktop-o-xorg-stakeholders-request) + + -- Martin Pitt Mon, 22 Aug 2011 12:08:02 +0200 + +jockey (0.9.3-0ubuntu1) oneiric; urgency=low + + * New upstream release. Changes since our last trunk merge: + - more Python 3 compatible imports + - ui.py: Move to AppIndicator3 for GTK 3 compatibility + - merge translations, update German fuzzy strings + - fglrx example handler: Rename ATI → AMD (LP: #755260) + * debian/control: Update appindicator GIR dependency. + * Cherrypick changes from trunk: + - gtk/jockey-gtk.desktop.in: Use correct categories to show up on the new + gnome-control-center. Thanks Rodrigo Moya! (LP: #787694) + - Add NoDisplay=true to autostart .desktop file and have jockey-gtk show up + in Unity. Thanks Mike Terry. + + -- Martin Pitt Wed, 13 Jul 2011 16:36:39 +0200 + +jockey (0.9.2-0ubuntu8) oneiric; urgency=low + + * data/handlers/fglrx.py: Add support for multi-arch to the fglrx handler. + + -- Alberto Milone Tue, 05 Jul 2011 11:44:19 +0200 + +jockey (0.9.2-0ubuntu7) oneiric; urgency=low + + * data/handlers/nvidia.py: Properly check invalid alternatives and the + parent class' enabled() method, to avoid showing the nvidia driver as + enabled when it is not even installed. + * data/handlers/fglrx.py: Check invalid alternative, too. + * data/handlers/nvidia.py: Check multiarch alternatives as well. Thanks + Alberto Milone! + * data/handlers/nvidia.py: Fix crash if the free driver alternative is None. + + -- Martin Pitt Wed, 29 Jun 2011 14:53:20 +0100 + +jockey (0.9.2-0ubuntu6) oneiric; urgency=low + + * Convert build system to dh7, using the new dh-translations. + * Move to GTK3: + - gtk/jockey-gtk: Drop forcing GTK version to 2. + - debian/control: Update dependency to gir1.2-gtk-3.0. + + -- Martin Pitt Mon, 16 May 2011 10:02:54 +0200 + +jockey (0.9.2-0ubuntu5) natty; urgency=low + + [ Martin Pitt ] + * data/handlers/nvidia.py: Fix broken condition in used(), which would be + True already if the package was merely installed. (LP: #759804) + * jockey/oslib.py, ignored_modules(): Drop linux-ubuntu-modules, gone long + ago. + * Cherry-pick r720 from trunk to support a new --kernel option on the + backend and frontend with --no-dbus. This allows ubiquity to install a PAE + kernel on the target system and tell jockey to install kernel headers for + that one instead for the running one. Based on a patch from Evan Dandrea, + thanks! (LP: #759804) + * Cherry-pick r721 from trunk: OpenPrintingDriverDB: Use the actual package + version as "version" attribute instead of the driver name. This was a bit + of a thinko back then. Update test cases accordingly. (LP: #744751) + + [ Evan Dandrea ] + * jockey/oslib.py: Disconnect from Debconf before installing packages. + (LP: #759804) + + -- Martin Pitt Tue, 19 Apr 2011 10:43:43 +0200 + +jockey (0.9.2-0ubuntu4) natty; urgency=low + + [ Martin Pitt ] + * data/handlers/nvidia.py: Some cleanup: + - Drop obsolete add_modules=['glx']. + - Drop setting DefaultDepth=24, X.org does that by default now. + - Move version 96 specific code to NvidiaDriver96 class. + - Remove some dead code. + * Merge from trunk: + - XorgDriverHandler: Support None X.org driver to avoid changing the + Driver setting. This is appropriate for drivers which X.org conf + autodetects. + - Add new flag Handler.needs_kernel_headers and install kernel headers if + set. + * data/handlers/{nvidia,fglrx}.py: Stop setting the X.org driver and + alternate free driver. Natty's X.org now prefers the proprietary drivers + over the free ones when available (105_nvidia_fglrx_autodetect.patch). + This allows X.org to fall back to the free driver if the proprietary one + gets broken or out of sync. (LP: #522061) + * jockey/oslib.py: Set kernel header metapackage name from currently running + kernel flavour, and add a small test case that it is a valid package. + * data/handlers/{nvidia,fglrx}.py: Replace custom code to install kernel + headers with setting the needs_kernel_headers flag. + * data/handlers/broadcom_wl.py: Set needs_kernel_headers flag. (LP: #567699) + * jockey/oslib.py, install_packages(): python-apt recently changed + "architecture" field of a candidate Version; where it used to say "all" + it now has the platform name. So switch to + candidate.record['Architecture'] to check if a package is Arch: all. This + unbreaks installation of unsigned third-party PPD packages. + + [ Alberto Milone ] + * data/handlers/fglrx.py: + - Re-enable fglrx. + - Replace tabs with whitespaces. + * data/handlers/nvidia.py: + - Replace tabs with whitespaces. + + -- Martin Pitt Thu, 31 Mar 2011 17:29:28 +0200 + +jockey (0.9.2-0ubuntu3) natty; urgency=low + + * Merge from trunk: + - OSLib.import_gpg_key(): Respect $http_proxy. Thanks Olaf Meeuwissen. + (LP: #733023) + - oslib.py: Switch to default keyserver on port 80 to be more proxy + friendly. (LP: #733029) + + -- Martin Pitt Fri, 11 Mar 2011 18:07:01 +0100 + +jockey (0.9.2-0ubuntu2) natty; urgency=low + + * Merge from trunk: + - Reintroduce __fix_stdouterr(); we need it for proper -l unicode support. + However, delay it until after OptParser, as an already encoded + sys.stderr causes that to crash. (LP: #728744) + + -- Martin Pitt Thu, 10 Mar 2011 17:34:30 +0100 + +jockey (0.9.2-0ubuntu1) natty; urgency=low + + * New upstream bug fix release: + - Add X.org video driver ABI checking. (This was already cherrypicked + in an earlier upload) + - Drop our own verified_https.py and implement GPG fingerprint SSL + checking with pycurl, which gets along with proxies. (LP: #729185) + - Some code cleanup and more test cases. + * debian/control: Add python-pycurl dependency. + + -- Martin Pitt Tue, 08 Mar 2011 16:08:06 +0100 + +jockey (0.9.1-0ubuntu5) natty; urgency=low + + * gtk/jockey-gtk: Update require_version() call to current pygobject API. + Bump python-gobject dependency accordingly. + + -- Martin Pitt Thu, 03 Mar 2011 17:21:07 +0100 + +jockey (0.9.1-0ubuntu4) natty; urgency=low + + * debian/control: Move nvidia-common back to Recommends, as this is only + available on i386/amd64, and we can't do arch specific dependencies for + arch:all packages. (Reopens #704597) + + -- Martin Pitt Mon, 28 Feb 2011 12:12:08 +0100 + +jockey (0.9.1-0ubuntu3) natty; urgency=low + + * Merge from trunk: + - Add X.org video driver ABI checking + * jockey/oslib.py: Implement current_xorg_video_abi() and + video_driver_abi() for Ubuntu. + * data/handlers/nvidia.py: Drop (already commented out) disabling due to ABI + mismatch. With above code, this check now happens dynamically, also works + for third-party repos, and we can stop having to update the handler each + time the ABIs get out of sync. + + -- Martin Pitt Mon, 28 Feb 2011 10:22:06 +0100 + +jockey (0.9.1-0ubuntu2) natty; urgency=low + + * data/handlers/nvidia.py: + - Re-enable nvidia-current now that we have an ABI compatible driver. + + -- Alberto Milone Sun, 27 Feb 2011 16:47:52 +0100 + +jockey (0.9.1-0ubuntu1) natty; urgency=low + + * New upstream bug fix release. Changes since our previous trunk snapshot: + - Do not create standard drivers for disabled custom drivers. This caused + NVidia/FGLRX to still be offered in Jockey, causing a lot of damage. + (LP: #716363) + + -- Martin Pitt Wed, 23 Feb 2011 21:20:34 +0100 + +jockey (0.9-0ubuntu3) natty; urgency=low + + * debian/control: Move nvidia-common from Recommends: to Depends: + (LP: #704597) + * jockey/oslib.py, install_packages(): Fix crash with third-party + repositories that do not have a trusted origin. (LP: #712685) + * Merge fixes from trunk: + - Add --no-dbus UI option. This will use a local Backend instance + instead of communicating with the D-BUS backend interface. This is + suitable for installers where jockey needs to run in a chroot. + (LP: #723223) + - ui.py: Drop __fix_stdouterr(), we are using gettext in unicode + mode, and this leads to crashes with --help. + - ui.py: Show translated driver names with --list + + -- Martin Pitt Wed, 23 Feb 2011 11:53:31 +0100 + +jockey (0.9-0ubuntu2) natty; urgency=low + + * Merge fixes from trunk: + - jockey-gtk: Use glib.GError, not GLib.Error; the latter does not + actually work, and in general the static glib bindings are preferred for + now. (LP: #715753) + - Add VMWare client tools handler. Thanks Martin Owens! (LP: #716738) + * Remove bogus changelog entries in previous upload. + + -- Martin Pitt Tue, 15 Feb 2011 12:58:58 +0100 + +jockey (0.9-0ubuntu1) natty; urgency=low + + * New upstream release: + - First steps towards Python 3 compatibility. + - jockey-gtk: Fix icon lookup constant for PyGI. (LP: #706193) + - Fix crash on nonexisting packages. + - examples/fake.modaliases: Update for current Ubuntu driver name + - jockey-gtk: Use Gtk.ListStore constructor from pygi overrides + - tests/run-gtk: port to GI + - Fix regression from GI port: Properly set up the UI if there are no + drivers available. (LP: #702596) + - jockey-gtk: Fix UnicodeDecodeError crash on translated driver names + - Fix short driver description when getting them from package system + * jockey/oslib.py, package_description(): Fix for current apt output format. + * kde/jockey-kde.desktop.in, kde/jockey-kde: Remove the kdesu hack, + PolicyKit should work well in KDE now. + * debian/control, debian/rules: Move to dh_python2. + + -- Martin Pitt Thu, 03 Feb 2011 19:18:28 +0100 + +jockey (0.8-0ubuntu6) natty; urgency=low + + [ Michael Vogt ] + * jockey/oslib.py: Fix module alias parser error on multiple modules for a + Package. + + [ Martin Pitt ] + * data/handlers/{nvidia,fglrx}.py: Disable drivers, as they are currently + unavailable for the X.org video driver ABI 9. + + -- Martin Pitt Tue, 01 Feb 2011 15:02:02 +0100 + +jockey (0.8-0ubuntu5) natty; urgency=low + + * data/handlers/nvidia.py: Fix typo. + * backend/com.ubuntu.DeviceDriver.service: Export {http,https,ftp}_proxy + variables from /etc/environment into the backend. (LP: #373795) + + -- Martin Pitt Mon, 31 Jan 2011 11:31:56 +0100 + +jockey (0.8-0ubuntu4) natty; urgency=low + + * data/handlers/nvidia.py: Point out that you need to install this in + order to run Unity. + + -- Martin Pitt Wed, 26 Jan 2011 14:43:02 +0100 + +jockey (0.8-0ubuntu3) natty; urgency=low + + * Merge with trunk: + - Add support for hardware enablement handlers. + - If a handler doesn't specify 'free' or 'description' but does include a + binary package name, query the OS for that information. + - jockey-gtk: remove connect_signals GTK2 workaround, works in latest GTK + + -- Mario Limonciello Wed, 19 Jan 2011 12:44:29 -0600 + +jockey (0.8-0ubuntu2) natty; urgency=low + + * Add data/handlers/nouveau3d.py: Handler for installing + libgl1-mesa-dri-experimental on systems where nouveau is loaded. + + -- Martin Pitt Fri, 14 Jan 2011 17:21:44 -0600 + +jockey (0.8-0ubuntu1) natty; urgency=low + + * New upstream release: + - jockey-gtk: Convert from pygtk to gobject-introspection. + * debian/control: Update dependencies to required GIR packages. + * gtk/jockey-gtk: Force using GTK 2.0 for now, as we only have an + appindicator GIR for GTK 2.0. + * debian/control: Wrap dependencies. + * debian/control: Drop obsolete python-xdg dependency. + * debian/control: Drop unnecessary XB-Python-Version headers from -gtk and + -kde packages, and set appropriate XS-Python-Version. + + -- Martin Pitt Sun, 09 Jan 2011 20:46:55 -0600 + +jockey (0.7.1-0ubuntu1) natty; urgency=low + + * New upstream release: + - Move HTTP sever for test suite to separate module for easier reuse. + - tests: Skip online OSLib tests when being offline + - OSLib.install_package(): Fix exception for unknown package + - Add a demo GPG key to tests/, for testing signed archives + - OSLib tests: use local test keyserver + * jockey/oslib.py, install_package(): Don't just require specifying a + fingerprint, but instead fail when trying to install any binary package + without a trusted origin. + * tests/oslib.py: Add local test cases for unsigned/signed binary/arch:all + repository addition, GPG key retrieval, and package installation. + + -- Martin Pitt Sat, 08 Jan 2011 17:30:02 -0600 + +jockey (0.7-0ubuntu2) natty; urgency=low + + * jockey/oslib.py: Add proper progress feedback for updating the apt + indexes. + * jockey/oslib.py: Use apt.Cache.update()'s undocumented, but awesome + sources_list argument to only update jockey's apt sources, not the entire + system's. This dramatically speeds up driver installation. Adjust + index/download/install accordingly (10%/40%/50% now). + + -- Martin Pitt Fri, 07 Jan 2011 15:43:16 +0100 + +jockey (0.7-0ubuntu1) natty; urgency=low + + * New upstream release: + - Add support for repository fingerprints, and retrieve them from + openprinting.org when available. + - Allow binary drivers if they have a valid GPG fingerprint on a trusted + https:// site. This is a lot weaker than our usual archive trust chain, + but as it's very hard to get a chain of trust to printer driver vendors, + relying on good SSL certificates is the next best step, and still much + better than what the average user does when searching and downloading a + driver by himself. + - Add API for retrieving and installing a GPG key based on a fingerprint. + - Merge add_repository() into install_package(), which is much more + practical for verifying whether a package in a new repository ist + trustworthy. + * jockey/oslib.py, tests/oslib.py: Update for merged add_repository(), and + implement GPG retrieval and repository trust checking. This now provides + secure binary third-party drivers. (LP: #604698) + * tests/oslib.py, test_ubuntu_package_header_modaliases(): Fix typo in + regular expression which didn't catch "fglrx" before. + * data/handlers/fglrx.py, data/handlers/nvidia.py: Disable these two + handlers in a live system environment (if /rofs exists). We will most + likely run out of RAM trying to download, build, and install all the + packages in the RAM disk. (LP: #685017) + + -- Martin Pitt Thu, 06 Jan 2011 19:13:24 +0100 + +jockey (0.6-0ubuntu4) natty; urgency=low + + * debian/control: Drop bcmwl-modaliases recommends, it's replaced with + a package header now. + + -- Martin Pitt Sat, 18 Dec 2010 19:06:17 +0100 + +jockey (0.6-0ubuntu3) natty; urgency=low + + * jockey/oslib.py: + - fix crash if a given package has no candidate version + + -- Michael Vogt Wed, 01 Dec 2010 15:05:46 +0100 + +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.9.4.orig/debian/jockey-common.dirs +++ jockey-0.9.4/debian/jockey-common.dirs @@ -0,0 +1 @@ +/var/cache/jockey --- jockey-0.9.4.orig/debian/copyright +++ jockey-0.9.4/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.9.4.orig/debian/jockey-common.logrotate +++ jockey-0.9.4/debian/jockey-common.logrotate @@ -0,0 +1,9 @@ +/var/log/jockey.log { + daily + rotate 10 + copytruncate + delaycompress + compress + notifempty + missingok +} --- jockey-0.9.4.orig/debian/pycompat +++ jockey-0.9.4/debian/pycompat @@ -0,0 +1 @@ +2 --- jockey-0.9.4.orig/debian/rules +++ jockey-0.9.4/debian/rules @@ -0,0 +1,19 @@ +#!/usr/bin/make -f + +DEB_VERSION=$(shell dpkg-parsechangelog | grep ^Version | cut -f2 -d\ |cut -f1 -d-) + +%: + dh "$@" --with translations,python2 + +override_dh_install: + dh_install + install -m0644 -D debian/apport_hook.py \ + debian/jockey-common/usr/share/apport/package-hooks/source_jockey.py + install -m0755 -D debian/jockey.ubiquity \ + debian/jockey-common/usr/lib/ubiquity/target-config/31jockey_pkgs + mkdir -p debian/dh-modaliases/usr/share/man/man1 + pod2man -c Debhelper -r "$(DEB_VERSION)" debian/debhelper/dh_modaliases debian/dh-modaliases/usr/share/man/man1/dh_modaliases.1 + +override_dh_clean: + dh_clean + sh debian/testpkgs/clean --- jockey-0.9.4.orig/debian/jockey-gtk.install +++ jockey-0.9.4/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.9.4.orig/debian/debhelper/test_dh_modaliases +++ jockey-0.9.4/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" --- jockey-0.9.4.orig/debian/debhelper/modaliases.pm +++ jockey-0.9.4/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.9.4.orig/debian/debhelper/dh_modaliases +++ jockey-0.9.4/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.9.4.orig/debian/source/format +++ jockey-0.9.4/debian/source/format @@ -0,0 +1 @@ +1.0 --- jockey-0.9.4.orig/debian/testpkgs/fglrx-updates.control +++ jockey-0.9.4/debian/testpkgs/fglrx-updates.control @@ -0,0 +1,9 @@ +Section: misc +Priority: optional + +Package: fglrx-updates +Version: 9:1.0 +Depends: dkms +Description: dummy fglrx-updates driver (fails) + dummy fglrx +Preinst: fail.sh --- jockey-0.9.4.orig/debian/testpkgs/uninstall +++ jockey-0.9.4/debian/testpkgs/uninstall @@ -0,0 +1,8 @@ +#!/bin/sh +# Remove apt source for dummy packages +set -e +APT_SOURCES=/etc/apt/sources.list.d/jockey-test.list +[ -e $APT_SOURCES ] || exit 0 +echo "Uninstalling $APT_SOURCES..." +sudo rm $APT_SOURCES +sudo apt-get update --- jockey-0.9.4.orig/debian/testpkgs/clean +++ jockey-0.9.4/debian/testpkgs/clean @@ -0,0 +1,4 @@ +#!/bin/sh +# Remove all built files from install +cd $(readlink -f $(dirname $0)) +rm -f *.deb Packages* --- jockey-0.9.4.orig/debian/testpkgs/fglrx.control +++ jockey-0.9.4/debian/testpkgs/fglrx.control @@ -0,0 +1,8 @@ +Section: misc +Priority: optional + +Package: fglrx +Version: 9:1.0 +Depends: dkms +Description: dummy fglrx driver (works) + dummy fglrx --- jockey-0.9.4.orig/debian/testpkgs/install +++ jockey-0.9.4/debian/testpkgs/install @@ -0,0 +1,16 @@ +#!/bin/sh +# Create and install some dummy fglrx/nvidia packages; needs equivs +set -e + +cd $(readlink -f $(dirname $0)) + +for f in *.control; do + equivs-build $f +done + +apt-ftparchive packages . | gzip -9 > Packages.gz + +APT_SOURCES=/etc/apt/sources.list.d/jockey-test.list +echo "Installing $APT_SOURCES..." +echo "deb file://$(pwd)/ /" | sudo tee $APT_SOURCES >/dev/null +sudo apt-get update --- jockey-0.9.4.orig/debian/testpkgs/fail.sh +++ jockey-0.9.4/debian/testpkgs/fail.sh @@ -0,0 +1,4 @@ +#!/bin/sh +set -e +echo "Failing deliberately" >&2 +exit 1 --- jockey-0.9.4.orig/data/modaliases/disable-upstream-nvidia +++ jockey-0.9.4/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.9.4.orig/data/modaliases/b43 +++ jockey-0.9.4/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.9.4.orig/data/handlers/sl_modem.py +++ jockey-0.9.4/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 as 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 as 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.9.4.orig/data/handlers/nvidia.py +++ jockey-0.9.4/data/handlers/nvidia.py @@ -0,0 +1,223 @@ +# (c) 2008 Canonical Ltd. +# Authors: Martin Pitt +# Alberto Milone +# License: GPL v2 or later + +import logging, os, os.path + +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 +from NvidiaDetector.alternatives import MultiArchUtils +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 + if 'update' in version: + name=_('NVIDIA accelerated graphics driver (post-release updates)') + else: + name=_('NVIDIA accelerated graphics driver') + XorgDriverHandler.__init__(self, backend, 'nvidia_' + version.replace('-', '_'), + 'nvidia-' + version, + None, None, {'NoLogo': 'True'}, + remove_modules=['dri', 'GLcore'], + name=name, + description=_('3D-accelerated proprietary graphics driver for ' + 'NVIDIA cards. Required if you want to run Unity.'), + 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' + 'You need to install this driver if you wish to use the Unity ' + 'desktop, enable desktop effects, or run software that ' + 'requires 3D acceleration, such as some games.')) + + self._module_alias = 'nvidia' + self._recommended = None + self._do_rebind = False + (self._alternatives, self._other_alternatives) = self._get_alternatives() + self.version = version + self.needs_kernel_headers = True + + def _get_alternatives(self): + '''Get multi-arch alternatives names''' + arch_utils = MultiArchUtils() + main_name = arch_utils.get_main_alternative_name() + other_name = arch_utils.get_other_alternative_name() + return Alternatives(main_name), Alternatives(other_name) + + def available(self): + # we don't offer this driver in a life CD environment, as we will run + # out of RAM trying to download and install all the packages in the RAM + # disk. + if os.path.isdir('/rofs'): + logging.debug('Disabling Nvidia driver on live system') + return False + + if 'intel' in self.loaded_drivers(): + logging.debug('Disabling Nvidia driver on intel/hybrid system') + return False + + logging.debug('nvidia.available: falling back to default') + return XorgDriverHandler.available(self) + + def enable_config_hook(self): + # 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): + XorgDriverHandler.enable(self) + + # Set the alternative to NVIDIA + nvidia_alternative = self._alternatives.get_alternative_by_name(self.package) + if not nvidia_alternative: + logging.error('%s: get_alternative_by_name(%s) returned nothing' % ( + self.id(), self.package)) + return + self._alternatives.set_alternative(nvidia_alternative) + other_nvidia_alternative = self._other_alternatives.get_alternative_by_name(self.package) + self._other_alternatives.set_alternative(other_nvidia_alternative) + + subprocess.call(['update-initramfs', '-u']) + subprocess.call(['update-initramfs', '-u', '-k', os.uname()[2]]) + + def disable(self): + XorgDriverHandler.disable(self) + if self.package: + 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() + logging.debug('NVidia.disable(%s): open_drivers: %s', self.module, open_drivers) + if open_drivers: + self._alternatives.set_alternative(open_drivers) + other_open_drivers = self._other_alternatives.get_open_drivers_alternative() + logging.debug('NVidia.disable(%s): other_open_drivers: %s', self.module, other_open_drivers) + if other_open_drivers: + self._other_alternatives.set_alternative(other_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() + other_target_alternative = self._other_alternatives.get_alternative_by_name(self.package) + other_current_alternative = self._other_alternatives.get_current_alternative() + + logging.debug('NVidia(%s).enabled(): target_alt %s current_alt %s other target alt %s other current alt %s', + self.module, target_alternative, current_alternative, + other_target_alternative, other_current_alternative) + if current_alternative is None: + return False + + if current_alternative != target_alternative or \ + other_current_alternative != other_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 not self.xorg_conf: + logging.debug('%s: xkit object does not exist!', self.module) + return False + + # Make sure that neither the alias nor the actual module are blacklisted + if OSLib.inst.module_blacklisted(self._module_alias) or OSLib.inst.module_blacklisted(self.module): + logging.debug('%s is blacklisted, so not treating as enabled', self.module) + return False + + kmh_enabled = KernelModuleHandler.enabled(self) + logging.debug('KMH enabled: %s', str(kmh_enabled)) + 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 NvidiaDriverCurrentUpdates(NvidiaDriverBase): + def __init__(self, backend): + NvidiaDriverBase.__init__(self, backend, 'current-updates') + +class NvidiaDriver173(NvidiaDriverBase): + def __init__(self, backend): + NvidiaDriverBase.__init__(self, backend, '173') + +class NvidiaDriver173Updates(NvidiaDriverBase): + def __init__(self, backend): + NvidiaDriverBase.__init__(self, backend, '173-updates') + +class NvidiaDriver96(NvidiaDriverBase): + def __init__(self, backend): + NvidiaDriverBase.__init__(self, backend, '96') + + def enable_config_hook(self): + NvidiaDriverBase.enable_config_hook(self) + + # ensure we have a screen section + if len(self.xorg_conf.globaldict['Screen']) == 0: + screen = self.xorg_conf.makeSection('Screen', identifier='Default Screen') + + # version 96 needs AddARGBGLXVisuals + if self.version == '96': + self.xorg_conf.addOption('Screen', 'AddARGBGLXVisuals', 'True', optiontype='Option', position=0) + +class NvidiaDriver96Updates(NvidiaDriver96): + def __init__(self, backend): + NvidiaDriverBase.__init__(self, backend, '96-updates') + --- jockey-0.9.4.orig/data/handlers/vmware-client.py +++ jockey-0.9.4/data/handlers/vmware-client.py @@ -0,0 +1,28 @@ +# (c) 2009, 2011 Canonical Ltd. +# Author: Martin Owens +# License: GPL v2 or later + +from jockey.handlers import Handler, KernelModuleHandler + +# dummy stub for xgettext +def _(x): return x + +class VmwareClientHandler(KernelModuleHandler): + '''Handler for the VMWARE client tools. + + Allows us to install some nice client tools for VMWARE clients. + ''' + def __init__(self, ui): + KernelModuleHandler.__init__(self, ui, 'vmxnet', + name=_('VMWare Client Tools'), + description=_('Install VMWare client drivers and tools'), + rationale=_('Install the VMWare client drivers and tools' + 'for your VMWare based Ubuntu installation.\n\n' + 'This should help you use Ubuntu in your VM.')) + self.package = 'open-vm-dkms' + self._free = True + + def id(self): + '''Return an unique identifier of the handler.''' + return 'vm:' + self.module + --- jockey-0.9.4.orig/data/handlers/dvb_usb_firmware.py +++ jockey-0.9.4/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.9.4.orig/data/handlers/broadcom_wl.py +++ jockey-0.9.4/data/handlers/broadcom_wl.py @@ -0,0 +1,55 @@ +# (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 + self.needs_kernel_headers = 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.9.4.orig/data/handlers/fglrx.py +++ jockey-0.9.4/data/handlers/fglrx.py @@ -0,0 +1,160 @@ +# -*- coding: utf-8 -*- +# (c) 2008 Canonical Ltd. +# Authors: Martin Pitt +# Alberto Milone +# License: GPL v2 or later + +import logging, os, os.path + +import XKit.xorgparser +from jockey.xorg_driver import XorgDriverHandler +from NvidiaDetector.alternatives import Alternatives +from NvidiaDetector.alternatives import MultiArchUtils +import subprocess + +# dummy stub for xgettext +def _(x): return x + +class FglrxDriver(XorgDriverHandler): + def __init__(self, backend, package=None): + self._free = False + + if package and 'update' in package: + name=_('ATI/AMD proprietary FGLRX graphics driver (post-release updates)') + else: + name=_('ATI/AMD proprietary FGLRX graphics driver') + + XorgDriverHandler.__init__(self, backend, (package and + package.replace('-', '_') or 'fglrx'), (package and + package or 'fglrx'), None, None, add_modules=['glx'], + disable_modules=[], name=name, + 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, self._other_alternatives) = self._get_alternatives() + self.needs_kernel_headers = True + + def _get_alternatives(self): + '''Get multi-arch alternatives names''' + arch_utils = MultiArchUtils() + main_name = arch_utils.get_main_alternative_name() + other_name = arch_utils.get_other_alternative_name() + return Alternatives(main_name), Alternatives(other_name) + + def available(self): + # we don't offer fglrx in a life CD environment, as we will run out of + # RAM trying to download and install all the packages in the RAM disk. + if os.path.isdir('/rofs'): + logging.debug('Disabling fglrx driver on live system') + return False + + logging.debug('fglrx.available: falling back to default') + return XorgDriverHandler.available(self) + + 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): + XorgDriverHandler.enable(self) + + # Set the alternative to FGLRX + fglrx_alternative = self._alternatives.get_alternative_by_name(self.package, ignore_pattern='-updates') + if not fglrx_alternative: + logging.error('%s: get_alternative_by_name(%s) returned nothing' % ( + self.id(), self.package)) + return + self._alternatives.set_alternative(fglrx_alternative) + other_fglrx_alternative = self._other_alternatives.get_alternative_by_name(self.package) + self._other_alternatives.set_alternative(other_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() + other_target_alternative = self._other_alternatives.get_alternative_by_name(self.package) + other_current_alternative = self._other_alternatives.get_current_alternative() + + logging.debug('fglrx.enabled(%s): target_alt %s current_alt %s other target alt %s other current alt %s', + self.module, target_alternative, current_alternative, + other_target_alternative, other_current_alternative) + + if current_alternative is None: + logging.debug('current alternative of %s is None, not enabled', self.module) + return False + if current_alternative != target_alternative or \ + other_current_alternative != other_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() + logging.debug('fglrx.disable(%s): open_drivers: %s', self.module, open_drivers) + if open_drivers: + self._alternatives.set_alternative(open_drivers) + other_open_drivers = self._other_alternatives.get_open_drivers_alternative() + logging.debug('fglrx.disable(%s): other_open_drivers: %s', self.module, other_open_drivers) + if other_open_drivers: + self._other_alternatives.set_alternative(other_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) as error: + return False # unconfigured driver -> defaults to ati + + return True + +class FglrxDriverUpdate(FglrxDriver): + def __init__(self, backend): + FglrxDriver.__init__(self, backend, 'fglrx-updates') --- jockey-0.9.4.orig/data/handlers/madwifi.py +++ jockey-0.9.4/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()