--- jockey-0.9.2.orig/gtk/jockey-gtk +++ jockey-0.9.2/gtk/jockey-gtk @@ -22,6 +22,8 @@ import gobject import glib +import gi +gi.require_version('Gtk', '2.0') from gi.repository import GdkPixbuf, Gtk, Notify import jockey.ui --- jockey-0.9.2.orig/po/Makefile +++ jockey-0.9.2/po/Makefile @@ -0,0 +1 @@ +GETTEXT_PACKAGE=jockey --- jockey-0.9.2.orig/tests/detection.py +++ jockey-0.9.2/tests/detection.py @@ -776,7 +776,7 @@ finally: OSLib.inst.packaging_system = orig_pkgsys handlers = backend.available() - self.assertEqual(handlers, ['printer:openprinting-ppds-postscript-hp:Postscript-HP']) + self.assertEqual(handlers, ['printer:openprinting-ppds-postscript-hp:20091009']) hi = backend.handler_info(handlers[0]) self.assertEqual(hi['package'], 'openprinting-ppds-postscript-hp') @@ -799,7 +799,7 @@ finally: OSLib.inst.packaging_system = orig_pkgsys handlers = backend.available() - self.assertEqual(handlers, ['printer:epson-inkjet-printer-n10-nx127:epson-n10-nx127']) + self.assertEqual(handlers, ['printer:epson-inkjet-printer-n10-nx127:1.0.0']) hi = backend.handler_info(handlers[0]) self.assert_(hi['package'].startswith('epson-inkjet-')) --- jockey-0.9.2.orig/tests/sandbox.py +++ jockey-0.9.2/tests/sandbox.py @@ -251,6 +251,11 @@ 'This is yummy, but uninteresting.'), 'free': False, }, + 'linux-dev': { + 'description': ('fake kernel headers', + 'includes for building kernel modules'), + 'free': True, + }, }, 'http://vaportech.com/x1': { 'spam-x1': { @@ -307,6 +312,8 @@ self.help_available = False self.help_called = False + self.kernel_header_package = 'linux-dev' + def reset_packages(self): '''Reset repositories and packages.''' --- jockey-0.9.2.orig/tests/handlers.py +++ jockey-0.9.2/tests/handlers.py @@ -234,6 +234,7 @@ self.assert_(h.changed()) self.assert_(h.enabled()) self.assert_(OSLib.inst.package_installed('mesa-vanilla')) + self.failIf(OSLib.inst.package_installed('linux-dev')) self.failIf(OSLib.inst.module_blacklisted('vanilla3d')) h.disable() @@ -250,6 +251,22 @@ h.package = 'nonexisting' self.assertEqual(h.available(), False) + def test_kmod_package_kernelheaders(self): + '''KernelModuleHandler: package needing kernel headers''' + + self.failIf(OSLib.inst.package_installed('mesa-vanilla')) + h = jockey.handlers.KernelModuleHandler(self.backend, + 'vanilla3d', rationale='Get full graphics acceleration speed') + h.package = 'mesa-vanilla' + h.needs_kernel_headers = True + + h.enable() + self.assert_(h.changed()) + self.assert_(h.enabled()) + self.assert_(OSLib.inst.package_installed('mesa-vanilla')) + self.assert_(OSLib.inst.package_installed('linux-dev')) + self.failIf(OSLib.inst.module_blacklisted('vanilla3d')) + def test_kmod_package_used(self): '''KernelModuleHandler: used() with third-party packages''' @@ -869,6 +886,72 @@ self.assert_(OSLib.inst.module_blacklisted('vanilla3d')) self.failIf(os.path.exists(OSLib.inst.xorg_conf_path)) + def test_xorg_driver_no_xorgconf_nodriver(self): + '''XorgDriverHandler without a default xorg.conf and no explicit "Driver"''' + + os.unlink(OSLib.inst.xorg_conf_path) + + h = XorgDriverHandler(self.backend, 'vanilla3d', 'mesa-vanilla', None, + None, extra_conf_options={'SuperSpeed': 'true'}, + add_modules=['glx'], disable_modules=['dri2'], + name='Vanilla accelerated graphics driver') + + self.failIf(h.free()) + self.failIf(h.changed()) + self.assertEqual(h.can_change(), None) # should create an xorg.conf from scratch + self.failIf(h.enabled()) + self.assertEqual(h.available(), None) + + self.failIf(h.enable()) + self.assert_(h.changed()) + self.assert_(h.enabled()) + self.assert_(OSLib.inst.package_installed('mesa-vanilla')) + self.failIf(OSLib.inst.module_blacklisted('vanilla3d')) + + conf = open(OSLib.inst.xorg_conf_path).read() + self.failIf(re.search('^\s*driver', conf, re.I|re.M)) + self.assert_(re.search('^\s*option\s*"SuperSpeed"\s*"true"\s*$', conf, re.I|re.M)) + self.assert_(re.search('^\s*load\s*"glx"\s*$', conf, re.I|re.M)) + self.assert_(re.search('^\s*disable\s*"dri2"\s*$', conf, re.I|re.M)) + self.failIf(re.search('^\s*load\s*"dri"\s*$', conf, re.I|re.M)) + + # should remove xorg.conf again + self.failIf(h.disable()) + self.assert_(h.changed()) + self.failIf(h.enabled()) + self.failIf(OSLib.inst.package_installed('mesa-vanilla')) + self.assert_(OSLib.inst.module_blacklisted('vanilla3d')) + self.failIf(os.path.exists(OSLib.inst.xorg_conf_path)) + + def test_xorg_driver_nobackup_nodriver(self): + '''XorgDriverHandler with no xorg.conf backup and no explicit "Driver"''' + + h = XorgDriverHandler(self.backend, 'vanilla3d', 'mesa-vanilla', None, + None, extra_conf_options={'SuperSpeed': 'true'}, + add_modules=['glx'], disable_modules=['dri2'], remove_modules=['dri'], + name='Vanilla accelerated graphics driver') + + self.failIf(h.enable()) + conf = open(OSLib.inst.xorg_conf_path).read() + # should keep the "Driver" as it was before + self.assert_(re.search('^\s*driver\s*"vanilla"\s*$', conf, re.I|re.M)) + self.assert_(re.search('^\s*option\s*"SuperSpeed"\s*"true"\s*$', conf, re.I|re.M)) + self.assert_(re.search('^\s*load\s*"glx"\s*$', conf, re.I|re.M)) + self.assert_(re.search('^\s*disable\s*"dri2"\s*$', conf, re.I|re.M)) + self.failIf(re.search('^\s*load\s*"dri"\s*$', conf, re.I|re.M)) + + # unlink backup file + os.unlink(os.path.join(OSLib.inst.backup_dir, 'mesa-vanilla.oldconf')) + + self.failIf(h.disable()) + conf = open(OSLib.inst.xorg_conf_path).read() + self.assert_(re.search('^\s*driver\s*"vanilla"\s*$', conf, re.I|re.M)) + self.failIf('SuperSpeed' in conf) + self.failIf(re.search('^\s*load\s*"glx"\s*$', conf, re.I|re.M)) + # modules which were explicitly disabled should be removed + self.failIf(re.search('^\s*disable\s*"dri2"\s*$', conf, re.I|re.M)) + self.assert_(re.search('^\s*load\s*"dri"\s*$', conf, re.I|re.M)) + def test_xorg_invalid_conf(self): '''XorgDriverHandler with invalid xorg.conf''' --- jockey-0.9.2.orig/tests/oslib.py +++ jockey-0.9.2/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, urllib2, subprocess +import unittest, os, tempfile, shutil, urllib2, 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,99 @@ # 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() + try: + self.sandbox_oslib.install_package('myppd', None, 'deb file://' + archive + ' /', + None) + # if we are run as root, this might succeed, and we clean up again + self.assert_(self.sandbox_oslib.package_installed('myppd')) + self.sandbox_oslib.remove_package('myppd', None) + except SystemError, e: + # this fails as non-root, as apt can't be told to not chroot(RootDir) + self.assertEqual(str(e), 'installArchives() failed') + + def test_package_install_thirdparty_unsigned_binary(self): + '''package installation for unsigned third-party repo, binary''' - self.failIf(o.package_installed(test_package), - '%s must not be installed for this test' % test_package) + archive = self._create_archive() + try: + self.sandbox_oslib.install_package('binary', None, + 'deb file://' + archive + ' /', None) + self.fail('installing unsigned binary package is not allowed') + except SystemError, e: + self.assert_('no trusted origin' in str(e)) + + 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() + try: + self.sandbox_oslib.install_package('binary', None, + 'deb file://' + archive + ' /', test_gpg_fp) + # if we are run as root, this might succeed, and we clean up again + self.assert_(self.sandbox_oslib.package_installed('binary')) + self.sandbox_oslib.remove_package('binary', None) + except SystemError, e: + # this fails as non-root, as apt can't be told to not chroot(RootDir) + self.assertEqual(str(e), 'installArchives() failed') + finally: + self._stop_keyserver() + + 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 +''') - # test without progress reporting - o.install_package(test_package, None) - self.assert_(o.package_installed(test_package)) - o.remove_package(test_package, None) - self.failIf(o.package_installed(test_package)) + f.close() + f = open(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 +287,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 +394,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 +430,108 @@ http.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') + apt.apt_pkg.init_system() + + 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')) + 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.2.orig/jockey/detection.py +++ jockey-0.9.2/jockey/detection.py @@ -589,9 +589,8 @@ s.get('level', 'voluntary'), s['url']) did.properties['long_description'] = {'C': desc} - # needed to disambiguate e. g. splix and splix2 - if driver != did.properties['package']: - did.properties['version'] = driver.replace('driver/', '') + if 'version' in pkgs[pkg]: + did.properties['version'] = pkgs[pkg]['version'] if fingerprint: did.properties['fingerprint'] = fingerprint --- jockey-0.9.2.orig/jockey/xorg_driver.py +++ jockey-0.9.2/jockey/xorg_driver.py @@ -44,7 +44,10 @@ - backend, module, driver_package, name, description, rationale: as in KernelModuleHandler - xorg_driver: name of the X.org driver as it appears in xorg.conf - - alt_free_driver: free fallback driver if this one gets disabled + (None if the driver will be detected automatically, then it won't be + changed) + - alt_free_driver: free fallback driver if this one gets disabled (None + if xorg_driver is None) - extra_conf_options: dictionary of extra "Option"s that go into the Device section of xorg.conf - add_modules: list of modules that get added to the "Module" section @@ -61,7 +64,14 @@ self.add_modules = add_modules self.disable_modules = disable_modules self.remove_modules = remove_modules - + + if self.xorg_driver: + self.old_conf = os.path.join(OSLib.inst.backup_dir, self.xorg_driver + '.oldconf') + self.no_conf = os.path.join(OSLib.inst.backup_dir, self.xorg_driver + '.noconf') + else: + self.old_conf = os.path.join(OSLib.inst.backup_dir, self.package + '.oldconf') + self.no_conf = os.path.join(OSLib.inst.backup_dir, self.package + '.noconf') + if os.path.exists(OSLib.inst.xorg_conf_path): try: self.xorg_conf = XKit.xutils.XUtils(OSLib.inst.xorg_conf_path) @@ -101,13 +111,16 @@ def enabled(self): if self.xorg_conf: - if self.xorg_conf.isDriverEnabled(self.xorg_driver) == False: - logging.debug('XorgDriverHandler isDriverEnabled (%s, %s, %s): considering xorg driver disabled', - self.module, self.package, self.xorg_driver) - return False - - logging.debug('XorgDriverHandler(%s, %s, %s): xorg.conf driver matches', - self.module, self.package, self.xorg_driver) + if self.xorg_driver: + if self.xorg_conf.isDriverEnabled(self.xorg_driver) == False: + logging.debug('XorgDriverHandler(%s, %s, %s).enabled(): considering xorg driver disabled', + self.module, self.package, self.xorg_driver) + return False + + logging.debug('XorgDriverHandler(%s, %s, %s).enabled(): xorg.conf driver matches', + self.module, self.package, self.xorg_driver) + else: + logging.debug('XorgDriverHandler(%s, %s).enabled(): No X.org driver set, not checking') else: logging.debug('%s: xkit object does not exist!', self.module) return False @@ -169,48 +182,50 @@ # see if the same proprietary driver is in use # in the xorg.conf. If so do not create a backup has_proprietary = False - it = 0 - for section in self.xorg_conf.globaldict['Device']: - try: - driver = self.xorg_conf.getDriver('Device', it) - if driver == self.xorg_driver: - has_proprietary = True - break - except XKit.xorgparser.OptionException: - # no driver is specified - pass - it += 1 + if self.xorg_driver: + it = 0 + for section in self.xorg_conf.globaldict['Device']: + try: + driver = self.xorg_conf.getDriver('Device', it) + if driver == self.xorg_driver: + has_proprietary = True + break + except XKit.xorgparser.OptionException: + # no driver is specified + pass + it += 1 # backup the current xorg.conf if os.path.exists(OSLib.inst.xorg_conf_path): if not has_proprietary: - open(os.path.join(OSLib.inst.backup_dir, self.xorg_driver + - '.oldconf'), 'w').write( - open(OSLib.inst.xorg_conf_path).read()) + open(self.old_conf, 'w').write(open(OSLib.inst.xorg_conf_path).read()) else: - open(os.path.join(OSLib.inst.backup_dir, self.xorg_driver + '.noconf'), 'w') + open(self.no_conf, 'w') relevant_devices = [] - if len(self.xorg_conf.globaldict['Device']) == 0: - # Create a new Device section. "device" = position of the section - device = self.xorg_conf.makeSection('Device', identifier='Default Device') - relevant_devices.append(device) - # Set the driver - self.xorg_conf.setDriver('Device', self.xorg_driver, device) - else: - # Get the relevant sections by checking the ServerLayout section - # in case of multiple screens layouts or modify all the Device - # sections - devices = self.xorg_conf.getDevicesInUse() - if len(devices) > 0: - relevant_devices = devices + if self.xorg_driver or self.extra_conf_options: + if len(self.xorg_conf.globaldict['Device']) == 0: + # Create a new Device section. "device" = position of the section + device = self.xorg_conf.makeSection('Device', identifier='Default Device') + relevant_devices.append(device) + # Set the driver + if self.xorg_driver: + self.xorg_conf.setDriver('Device', self.xorg_driver, device) else: - relevant_devices = self.xorg_conf.globaldict['Device'].keys() - for device in relevant_devices: - self.xorg_conf.setDriver('Device', self.xorg_driver, device) - logging.debug('XorgDriverHandler device sections (%s)' % ( - str(self.xorg_conf.globaldict['Device']))) + # Get the relevant sections by checking the ServerLayout section + # in case of multiple screens layouts or modify all the Device + # sections + devices = self.xorg_conf.getDevicesInUse() + if len(devices) > 0: + relevant_devices = devices + else: + relevant_devices = self.xorg_conf.globaldict['Device'].keys() + if self.xorg_driver: + for device in relevant_devices: + self.xorg_conf.setDriver('Device', self.xorg_driver, device) + logging.debug('XorgDriverHandler device sections (%s)' % ( + str(self.xorg_conf.globaldict['Device']))) module_sections = self.xorg_conf.globaldict['Module'] have_modules = len(module_sections) > 0 @@ -256,24 +271,24 @@ if OSLib.inst.package_installed(self.package): return - noconf = os.path.join(OSLib.inst.backup_dir, self.xorg_driver + '.noconf') - oldconf = os.path.join(OSLib.inst.backup_dir, self.xorg_driver + '.oldconf') - # if we previously didn't have an xorg.conf, delete it - if os.path.exists(noconf): - logging.debug('XorgDriverHandler.disable(%s): previously had no xorg.conf, deleting xorg.conf', self.xorg_driver) - os.unlink(noconf) + if os.path.exists(self.no_conf): + logging.debug('XorgDriverHandler.disable(%s): previously had no xorg.conf, deleting xorg.conf', + self.xorg_driver or self.package) + os.unlink(self.no_conf) if os.path.exists(OSLib.inst.xorg_conf_path): os.unlink(OSLib.inst.xorg_conf_path) self.xorg_conf = XKit.xutils.XUtils() # if we have the previous xorg.conf, restore that - elif os.path.exists(oldconf): - logging.debug('XorgDriverHandler.disable(%s): restoring xorg.conf backup', self.xorg_driver) - open(OSLib.inst.xorg_conf_path, 'w').write(open(oldconf).read()) - os.unlink(oldconf) + elif os.path.exists(self.old_conf): + logging.debug('XorgDriverHandler.disable(%s): restoring xorg.conf backup', + self.xorg_driver or self.package) + open(OSLib.inst.xorg_conf_path, 'w').write(open(self.old_conf).read()) + os.unlink(self.old_conf) self.xorg_conf = XKit.xutils.XUtils(OSLib.inst.xorg_conf_path) else: # no backup, so mangle current config manually - logging.debug('XorgDriverHandler.disable(%s): missing xorg.conf, reversing changes from enable()', self.xorg_driver) + logging.debug('XorgDriverHandler.disable(%s): missing xorg.conf, reversing changes from enable()', + self.xorg_driver or self.package) relevant_devices = [] if len(self.xorg_conf.globaldict['Device']) > 0: @@ -308,14 +323,16 @@ reference=True) for device_section in relevant_devices: - self.xorg_conf.setDriver('Device', self.alt_free_driver, device_section) + if self.alt_free_driver: + self.xorg_conf.setDriver('Device', self.alt_free_driver, device_section) for k, v in self.extra_conf_options.iteritems(): self.xorg_conf.removeOption('Device', k, v, position=device_section) self.disable_config_hook() - logging.debug('XorgDriverHandler.disable(%s): writing restored xorg.conf', self.xorg_driver) + logging.debug('XorgDriverHandler.disable(%s): writing restored xorg.conf', + self.xorg_driver or self.package) self.xorg_conf.writeFile(OSLib.inst.xorg_conf_path) return False --- jockey-0.9.2.orig/jockey/handlers.py +++ jockey-0.9.2/jockey/handlers.py @@ -53,6 +53,11 @@ By default, available handlers are announced in AbstractUI.check(). If you want to have a handler which is available, but not announced that way, set self.annonuce to False. + + If a handler needs to build a kernel module from source, it should set + self.needs_kernel_headers to True. Then the handler will try to install + the matching kernel header package for the currently running kernel. + (See OSLib.kernel_header_package). ''' self._hwids = [] # covered HardwareIDs self._changed = False @@ -63,6 +68,7 @@ self._rationale = rationale self.license = None self.announce = True + self.needs_kernel_headers = False # the following properties are not specified in the ctor, since they # might be changed after instantiation; @@ -241,6 +247,17 @@ immediately successful, or False if the system needs to be rebooted for the changes to become effective. ''' + # first ensure that the kernel header packages are installed, if + # requested + if self.needs_kernel_headers and OSLib.inst.kernel_header_package: + try: + self.backend.install_package(OSLib.inst.kernel_header_package) + except ValueError: + # package not available; most likely we have a custom kernel? + logging.error('enabling %s: Unable to install kernel header package %s', + self.id(), OSLib.inst.kernel_header_package) + pass + if self.package: self.backend.install_package(self.package, self.repository, self.repository_sign_fp) --- jockey-0.9.2.orig/jockey/ui.py +++ jockey-0.9.2/jockey/ui.py @@ -47,6 +47,18 @@ assert str == 'False' return False +# Avoid having to do .encode('UTF-8') everywhere. This is a pain; I wish +# Python supported something like "sys.stdout.encoding = 'UTF-8'". +def fix_stdouterr(): + import codecs + import locale + def null_decode(input, errors='strict'): + return input, len(input) + sys.stdout = codecs.EncodedFile(sys.stdout, locale.getpreferredencoding()) + sys.stdout.decode = null_decode + sys.stderr = codecs.EncodedFile(sys.stderr, locale.getpreferredencoding()) + sys.stderr.decode = null_decode + class AbstractUI(dbus.service.Object): '''Abstract user interface. @@ -62,9 +74,11 @@ gettext.install('jockey', unicode=True) (self.argv_options, self.argv_args) = self.parse_argv() + fix_stdouterr() if not OSLib.inst: - OSLib.inst = OSLib(client_only=not self.argv_options.no_dbus) + OSLib.inst = OSLib(client_only=not self.argv_options.no_dbus, + target_kernel=self.argv_options.kernel) if self.argv_options.check: time.sleep(self.argv_options.check) @@ -374,6 +388,9 @@ help=self._('Run as session D-BUS server.')) parser.add_option ('--no-dbus', action='store_true', default=False, help=self._('Do not use D-BUS for communicating with the backend. Needs root privileges.')) + parser.add_option ('-k', '--kernel', type='string', + help=_('Use a different target kernel version than the currently running one. This is only relevant with --no-dbus.')) + #parser.add_option ('--debug', action='store_true', # dest='debug', default=False, # help=self._('Enable debugging messages.')) @@ -655,7 +672,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 @@ -884,11 +901,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.2.orig/jockey/oslib.py +++ jockey-0.9.2/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,18 +20,38 @@ 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 fork(self): + '''Reroute stdout/stderr to files, so that we can log them''' + + self.stdout = tempfile.TemporaryFile() + self.stderr = tempfile.TemporaryFile() + p = os.fork() + if p == 0: + os.dup2(self.stdout.fileno(), sys.stdout.fileno()) + os.dup2(self.stderr.fileno(), sys.stderr.fileno()) + return p + class OSLib: '''Encapsulation of operating system/Linux distribution specific operations.''' # global default instance inst = None - def __init__(self, client_only=False): + def __init__(self, client_only=False, target_kernel=None): '''Set default paths and load the module blacklist. Distributors might want to override some default paths. If client_only is True, this only initializes functionality which is needed by clients, and which can be done without special privileges. + + If target_kernel is given, it is used instead of the default + os.uname()[2]. This is primarily useful for distribution installers + where the target system kernel differs from the installer kernel. ''' # relevant stuff for clients and backend self._get_os_version() @@ -93,69 +113,114 @@ # this is the generally recommended DNS round-robin, but usually very # slow: #self.gpg_key_server = 'keys.gnupg.net' - self.gpg_key_server = 'keyserver.ubuntu.com' + self.gpg_key_server = 'hkp://keyserver.ubuntu.com:80' + + if target_kernel: + self.target_kernel = target_kernel + else: + self.target_kernel = os.uname()[2] + + # Package which provides include files for the currently running + # kernel. If the system ensures that kernel headers are always + # 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]. + # 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) @@ -186,43 +251,95 @@ An unknown package should raise a ValueError. Any installation failure should be raised as a SystemError. ''' - if repository or fingerprint: - raise NotImplementedError('PackageKit default implementation does not currently support repositories or fingerprints') - - # this will check if the package exists - self.package_description(package) - - pkcon = subprocess.Popen(['pkcon', 'install', '-v', package], - stdout=subprocess.PIPE, stderr=subprocess.PIPE) + class MyFetchProgress(apt.FetchProgress): + def __init__(self, callback): + apt.FetchProgress.__init__(self) + self.callback = callback + + def pulse(self): + # 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 - re_progress = re.compile('progress-changed (\d+), (\d+),') + 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') - 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))) + 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: - progress_cb(phase or 'download', -1, -1) - elif 'WARNING' in line: - fail = True - - err += pkcon.stderr.read() - if pkcon.wait() != 0 or not self.package_installed(package): - raise SystemError('package %s failed to install: %s' % (package, err)) - + logging.error('Binary package %s has no trusted origin, rejecting', package) + if repository and repository_added: + self._remove_repository(repository) + raise SystemError('Binary package %s has no trusted origin, rejecting' % package) + + pkg.markInstall() + inst_p = progress_cb and MyInstallProgress(progress_cb) or None + c.commit(progress_cb and MyFetchProgress(progress_cb) or None, inst_p) + if inst_p: + inst_p.stdout.seek(0) + out = inst_p.stdout.read() + inst_p.stdout.close() + inst_p.stderr.seek(0) + err = inst_p.stderr.read() + inst_p.stderr.close() + + if out: + logging.debug(out) + if err: + logging.error(err) + except apt.cache.FetchCancelledException as e: + return False + except (apt.cache.LockFailedException, apt.cache.FetchFailedException) as e: + logging.warning('Package fetching failed: %s', str(e)) + raise SystemError(str(e)) + return True + def remove_package(self, package, progress_cb): '''Uninstall the given package. @@ -236,35 +353,46 @@ Any removal failure should be raised as a SystemError. ''' - pkcon = subprocess.Popen(['pkcon', 'remove', '-v', package], - stdout=subprocess.PIPE, stderr=subprocess.PIPE) + os.environ['DEBIAN_FRONTEND'] = 'noninteractive' + os.environ['PATH'] = '/sbin:/usr/sbin:/bin:/usr/bin' + + class MyInstallProgress(_CapturedInstallProgress): + def __init__(self, callback): + _CapturedInstallProgress.__init__(self) + self.callback = callback + + def statusChange(self, pkg, percent, status): + logging.debug('remove progress statusChange %s %f' % (pkg, percent)) + self.callback(percent, 100.0) - re_progress = re.compile('progress-changed (\d+), (\d+),') + logging.debug('Removing package: %s', package) - have_progress = False - err = '' - fail = False - while pkcon.poll() == None: - line = pkcon.stdout.readline() - if line == '': - break - if fail: - err += line - if 'status-changed remove' in line: - have_progress = True - elif progress_cb and 'progress-changed' in line: - m = re_progress.search(line) - if m and have_progress: - progress_cb(int(m.group(1)), int(m.group(2))) - else: - progress_cb(-1, -1) - elif 'WARNING' in line: - fail = True - - err += pkcon.stderr.read() - pkcon.wait() - if self.package_installed(package): - raise SystemError('package %s failed to remove: %s' % (package, err)) + c = apt.Cache() + try: + try: + c[package].markDelete() + except KeyError: + logging.debug('Package %s does not exist, aborting', package) + return False + inst_p = progress_cb and MyInstallProgress(progress_cb) or None + c.commit(None, inst_p) + if inst_p: + inst_p.stdout.seek(0) + out = inst_p.stdout.read() + inst_p.stdout.close() + inst_p.stderr.seek(0) + err = inst_p.stderr.read() + inst_p.stderr.close() + + if out: + logging.debug(out) + if err: + logging.error(err) + except apt.cache.LockFailedException 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. @@ -272,12 +400,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. @@ -289,14 +415,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): @@ -335,7 +471,8 @@ '--no-default-keyring', '--primary-keyring', default_keyring, '--keyserver', self.gpg_key_server, '--recv-key', keyid], stdout=subprocess.PIPE, stderr=subprocess.PIPE, - env={'PATH': os.environ.get('PATH', '')}) + env={'PATH': os.environ.get('PATH', ''), + 'http_proxy': os.environ.get('http_proxy', '')}) (out, err) = gpg.communicate() if fingerprint not in self._gpg_keyring_fingerprints(default_keyring): @@ -397,7 +534,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. @@ -405,7 +552,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. @@ -414,7 +561,10 @@ appropriate topic, etc. This gets the current UI object passed, which can be used to determine whether GTK/KDE is used, etc. ''' - pass + if 'gtk' in str(ui.__class__).lower(): + import gobject + gobject.spawn_async(['yelp', 'ghelp:hardware#jockey'], + flags=gobject.SPAWN_SEARCH_PATH) # # The following functions have a reasonable default implementation for @@ -448,7 +598,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.''' @@ -573,9 +734,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 @@ -585,7 +749,29 @@ If this is not supported, simply return an empty dictionary here. ''' - return {} + result = {} + if cache is None: + cache = apt.Cache() + for package in cache: + 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. @@ -631,7 +817,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. @@ -644,4 +839,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.2.orig/data/handlers/broadcom_wl.py +++ jockey-0.9.2/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.2.orig/data/handlers/sl_modem.py +++ jockey-0.9.2/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.2.orig/data/handlers/dvb_usb_firmware.py +++ jockey-0.9.2/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.2.orig/data/handlers/vmware-client.py +++ jockey-0.9.2/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.2.orig/data/handlers/nouveau3d.py +++ jockey-0.9.2/data/handlers/nouveau3d.py @@ -0,0 +1,33 @@ +# (c) 2011 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 Nouveau3DHandler(KernelModuleHandler): + '''Handler for experimental Nouveau 3D support''' + + def __init__(self, ui): + KernelModuleHandler.__init__(self, ui, 'nouveau', + name=_('Experimental 3D support for NVIDIA cards'), + description=_('This driver provides a highly experimental 3D acceleration for NVIDIA graphics cards, as a free alternative to the proprietary driver.\n\n' + 'You need to restart your desktop session after installation.') + ) + self.package = 'libgl1-mesa-dri-experimental' + + def id(self): + '''Return an unique identifier of the handler.''' + + return 'xorg:' + self.module + + def available(self): + r = KernelModuleHandler.available(self) + if r is not None: + return r + return self.module_loaded(self.module) --- jockey-0.9.2.orig/data/handlers/nvidia.py +++ jockey-0.9.2/data/handlers/nvidia.py @@ -0,0 +1,170 @@ +# (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 +import subprocess + +# dummy stub for xgettext +def _(x): return x + +class NvidiaDriverBase(XorgDriverHandler): + '''Abstract base class for a particular NVidia driver version.''' + + def __init__(self, backend, version): + self._free = False + XorgDriverHandler.__init__(self, backend, 'nvidia_' + version, + 'nvidia-' + version, + None, None, {'NoLogo': 'True'}, + remove_modules=['dri', 'GLcore'], + name=_('NVIDIA accelerated graphics driver'), + 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 = Alternatives('gl_conf') + self.version = version + self.needs_kernel_headers = True + + 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 + + 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) + self._alternatives.set_alternative(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() + self._alternatives.set_alternative(open_drivers) + subprocess.call(['update-initramfs', '-u']) + subprocess.call(['update-initramfs', '-u', '-k', os.uname()[2]]) + + return False + + def recommended(self): + if self._recommended == None: + nd = NvidiaDetection() + self._recommended = self.package == nd.selectDriver() + return self._recommended + + def enabled(self): + # See if nvidia (e.g. nvidia-current) is the current alternative + target_alternative = self._alternatives.get_alternative_by_name(self.package) + current_alternative = self._alternatives.get_current_alternative() + + if current_alternative != target_alternative: + logging.debug('%s is not the alternative in use', self.module) + return False + + #if self.xorg_conf has NoneType, AttributeError will be raised + if 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 + return not OSLib.inst.module_blacklisted(self._module_alias) and \ + not OSLib.inst.module_blacklisted(self.module) + + #return KernelModuleHandler.enabled(self) + + def used(self): + '''Return if the handler is currently in use.''' + + if self.changed() and self.enabled(): + return False + + # See if "nvidia" is loaded and if the alias corresponds to nvidia_$flavour + return KernelModuleHandler.module_loaded(self._module_alias) and \ + self._alternatives.resolve_module_alias(self._module_alias) == self.module and \ + (self.package is None or OSLib.inst.package_installed(self.package)) + + def enables_composite(self): + '''Return whether this driver supports the composite extension.''' + + # When using an upstream installation, or -new/-legacy etc., we already + # have composite + if KernelModuleHandler.module_loaded('nvidia'): + logging.debug('enables_composite(): already using nvidia driver from nondefault package') + return False + + # neither vesa nor nv support composite, so safe to say yes here + return True + +class NvidiaDriverCurrent(NvidiaDriverBase): + def __init__(self, backend): + NvidiaDriverBase.__init__(self, backend, 'current') + +class NvidiaDriver173(NvidiaDriverBase): + def __init__(self, backend): + NvidiaDriverBase.__init__(self, backend, '173') + +class NvidiaDriver96(NvidiaDriverBase): + def __init__(self, backend): + NvidiaDriverBase.__init__(self, backend, '96') + + 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) + --- jockey-0.9.2.orig/data/handlers/madwifi.py +++ jockey-0.9.2/data/handlers/madwifi.py @@ -0,0 +1,72 @@ +# (c) 2009 Canonical Ltd. +# Author: Martin Pitt +# License: GPL v2 or later + +import logging, subprocess, os.path + +from jockey.oslib import OSLib +from jockey.handlers import Handler, KernelModuleHandler + +# dummy stub for xgettext +def _(x): return x + +class MadwifiHandler(KernelModuleHandler): + '''Handler for the Madwifi driver. + + The free ath5k driver should work with most Atheros cards nowadays, but on + some models madwifi still works better (or at all). This driver (ath_pci) + should be disabled by default by blacklisting it in self.blacklist_file. + ''' + def __init__(self, ui): + KernelModuleHandler.__init__(self, ui, 'ath_pci', + name=_('Alternate Atheros "madwifi" driver'), + description=_('Alternate "madwifi" driver for Atheros wireless LAN cards.'), + rationale=_('Only activate this driver if you have problems ' + 'with your wireless LAN connection.\n\n' + 'The free "ath5k" driver should work with most ' + 'Atheros cards nowadays, but on some computers this ' + 'alternate (but proprietary) driver still works better, ' + 'or at all.')) + self._free = False + # do not announce this if ath5k works + self.announce = not self.module_loaded('ath5k') + self.blacklist_file = os.path.join(os.path.dirname( + OSLib.inst.module_blacklist_file), 'blacklist-ath_pci.conf') + + def can_change(self): + if not os.path.exists(self.blacklist_file): + return _('You removed the configuration file %s') % self.blacklist_file + return None + + def enable(self): + Handler.enable(self) + self._update_blacklist('ath5k') + subprocess.call([OSLib.inst.modprobe_path, self.module]) + self.read_loaded_modules() + return self.rebind(self.module) + + def disable(self): + self._update_blacklist(self.module) + self.read_loaded_modules() + Handler.disable(self) + return False + + def _update_blacklist(self, module): + '''Update self.blacklist_file to blacklist given module.''' + + logging.debug('MadwifiHandler._update_blacklist(%s)' % module) + + lines = [] + f = open(self.blacklist_file) + for l in f: + if l.startswith('blacklist '): + l = 'blacklist %s\n' % module + lines.append(l) + f.close() + f = open(self.blacklist_file + '.new', 'w') + for l in lines: + f.write(l) + f.close() + os.rename(self.blacklist_file + '.new', self.blacklist_file) + + OSLib.inst._load_module_blacklist() --- jockey-0.9.2.orig/data/handlers/fglrx.py +++ jockey-0.9.2/data/handlers/fglrx.py @@ -0,0 +1,120 @@ +# -*- 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 +import subprocess + +# dummy stub for xgettext +def _(x): return x + +class FglrxDriver(XorgDriverHandler): + def __init__(self, backend): + self._free = False + XorgDriverHandler.__init__(self, backend, 'fglrx', 'fglrx', + None, None, add_modules=['glx'], disable_modules=[], + name=_('ATI/AMD proprietary FGLRX graphics driver'), + description=_('3D-accelerated proprietary graphics driver for ' + 'ATI cards.'), + rationale=_('This driver is required to fully utilise the 3D ' + 'potential of some ATI graphics cards, as well as provide ' + '2D acceleration of newer cards.')) + + self._alternatives = Alternatives('gl_conf') + self.needs_kernel_headers = True + + 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) + self._alternatives.set_alternative(fglrx_alternative) + subprocess.call(['update-initramfs', '-u']) + subprocess.call(['update-initramfs', '-u', '-k', os.uname()[2]]) + + def enabled(self): + # See if fglrx is the current alternative + target_alternative = self._alternatives.get_alternative_by_name(self.package) + current_alternative = self._alternatives.get_current_alternative() + + if current_alternative != target_alternative: + logging.debug('%s is not the alternative in use', self.module) + return False + + return XorgDriverHandler.enabled(self) + + def disable(self): + # make sure that fglrx-kernel-source is removed too + XorgDriverHandler.disable(self) + #kernel_source = 'fglrx-kernel-source' + #self.backend.remove_package(kernel_source) + + # Set the alternative back to open drivers + open_drivers = self._alternatives.get_open_drivers_alternative() + self._alternatives.set_alternative(open_drivers) + subprocess.call(['update-initramfs', '-u']) + subprocess.call(['update-initramfs', '-u', '-k', os.uname()[2]]) + + return False + + def enables_composite(self): + '''Return whether this driver supports the composite extension.''' + + if not self.xorg_conf: + return False + + # the radeon X.org driver supports composite nowadays, so don't force + # installation of fglrx upon those users. Treat absent driver + # configuration as radeon, since that's what X.org should autodetect. + # Only suggest fglrx if people use something else, like vesa. + try: + if self.xorg_conf.getDriver('Device', 0) in ['fglrx', 'ati', 'radeon', None]: + return False + except (XKit.xorgparser.OptionException, XKit.xorgparser.SectionException) as error: + return False # unconfigured driver -> defaults to ati + + return True + --- jockey-0.9.2.orig/data/modaliases/b43 +++ jockey-0.9.2/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.2.orig/data/modaliases/disable-upstream-nvidia +++ jockey-0.9.2/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.2.orig/backend/jockey-backend +++ jockey-0.9.2/backend/jockey-backend @@ -42,6 +42,8 @@ parser.add_option ( '--test', action='store_true', dest='test', default=False, help=_('Run on session D-BUS (only for testing)')) + parser.add_option ( '-k', '--kernel', type='string', + help=_('Use a different target kernel version than the currently running one.')) (opts, args) = parser.parse_args() return (opts, args) @@ -61,12 +63,11 @@ argv_options, argv_args = parse_argv() setup_logging(argv_options.debug, argv_options.logfile) +OSLib.inst = OSLib(target_kernel=argv_options.kernel) if argv_options.test: - OSLib.inst = OSLib() svr = jockey.backend.Backend.create_dbus_server(session_bus=True, handler_dir=argv_options.handler_dir) else: - OSLib.inst = OSLib() svr = jockey.backend.Backend.create_dbus_server( handler_dir=argv_options.handler_dir) if argv_options.timeout == 0: --- jockey-0.9.2.orig/backend/com.ubuntu.DeviceDriver.service +++ jockey-0.9.2/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.2.orig/debian/jockey-gtk.install +++ jockey-0.9.2/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.2.orig/debian/jockey-common.postinst +++ jockey-0.9.2/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.2.orig/debian/jockey-kde.install +++ jockey-0.9.2/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.2.orig/debian/pycompat +++ jockey-0.9.2/debian/pycompat @@ -0,0 +1 @@ +2 --- jockey-0.9.2.orig/debian/watch +++ jockey-0.9.2/debian/watch @@ -0,0 +1,2 @@ +version=3 +http://launchpad.net/jockey/+download .*/jockey-([0-9.]+)\.tar\.gz --- jockey-0.9.2.orig/debian/jockey.ubiquity +++ jockey-0.9.2/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.2.orig/debian/jockey-common.logrotate +++ jockey-0.9.2/debian/jockey-common.logrotate @@ -0,0 +1,9 @@ +/var/log/jockey.log { + daily + rotate 10 + copytruncate + delaycompress + compress + notifempty + missingok +} --- jockey-0.9.2.orig/debian/dh-modaliases.install +++ jockey-0.9.2/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.2.orig/debian/compat +++ jockey-0.9.2/debian/compat @@ -0,0 +1 @@ +5 --- jockey-0.9.2.orig/debian/apport_hook.py +++ jockey-0.9.2/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.2.orig/debian/rules +++ jockey-0.9.2/debian/rules @@ -0,0 +1,23 @@ +#!/usr/bin/make -f + +DEB_PYTHON2_MODULE_PACKAGES = jockey-common + +include /usr/share/cdbs/1/rules/debhelper.mk +include /usr/share/cdbs/1/class/python-distutils.mk +include /usr/share/cdbs/1/rules/langpack.mk + +DEB_DH_INSTALL_SOURCEDIR := debian/tmp + +clean:: + rm -f po/*.pot + +install/jockey-common:: + install -m0644 -D debian/apport_hook.py \ + debian/$(cdbs_curpkg)/usr/share/apport/package-hooks/source_jockey.py + + install -m0755 -D debian/jockey.ubiquity \ + debian/$(cdbs_curpkg)/usr/lib/ubiquity/target-config/31jockey_pkgs + +install/dh-modaliases:: + mkdir -p debian/$(cdbs_curpkg)/usr/share/man/man1 + pod2man -c Debhelper -r "$(DEB_VERSION)" debian/debhelper/dh_modaliases debian/$(cdbs_curpkg)/usr/share/man/man1/dh_modaliases.1 --- jockey-0.9.2.orig/debian/control +++ jockey-0.9.2/debian/control @@ -0,0 +1,77 @@ +Source: jockey +Section: admin +Priority: optional +Build-Depends: cdbs (>= 0.4.43), + debhelper (>= 5.0.51), + 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/ubuntu + +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 (>= 0.2.15.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-2.0 (>= 2.23.90-0ubuntu2), + gir1.2-notify-0.7, + gir1.2-appindicator-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.2.orig/debian/jockey-common.dirs +++ jockey-0.9.2/debian/jockey-common.dirs @@ -0,0 +1 @@ +/var/cache/jockey --- jockey-0.9.2.orig/debian/changelog +++ jockey-0.9.2/debian/changelog @@ -0,0 +1,1666 @@ +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.2.orig/debian/jockey-common.postrm +++ jockey-0.9.2/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.2.orig/debian/jockey-common.install +++ jockey-0.9.2/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.2.orig/debian/copyright +++ jockey-0.9.2/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.2.orig/debian/source/format +++ jockey-0.9.2/debian/source/format @@ -0,0 +1 @@ +1.0 --- jockey-0.9.2.orig/debian/debhelper/dh_modaliases +++ jockey-0.9.2/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.2.orig/debian/debhelper/modaliases.pm +++ jockey-0.9.2/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.2.orig/debian/debhelper/test_dh_modaliases +++ jockey-0.9.2/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"