Debian

Available patches from Ubuntu

To see Ubuntu differences wrt. to Debian, write down a grep-dctrl query identifying the packages you're interested in:
grep-dctrl -n -sPackage Sources.Debian
(e.g. -FPackage linux-ntfs or linux-ntfs)

Modified packages are listed below:

Debian ( Changelog | PTS | Bugs ) Ubuntu ( Changelog | txt | LP | Bugs ) | Diff from Ubuntu

Source: apt-xapian-index

apt-xapian-index (0.51ubuntu1) focal; urgency=low * Merge from Debian unstable. Remaining changes: - Prefer native packages over foreign packages. - Do not crash if the DB is already locked. - Do not modify the DB "in-place" with --update - debian/patches/01_axi_cjk_support.patch: - Activate the CJK support when indexing the database. - debian/patches/02_axi-pkgname-mangled-term.patch: - add XPM term that contains a mangled version of the pkgname. - plugins/app-install.py: - Ignore file not found errors due to a race condition. - debian/patches/06_32bit_sizes.patch: Watch out for package sizes that don't fit in 32 bits. - debian/patches/07_glib_import.patch: Fix the import of GLib and GObject. - Bump the minimum version for removal of the dbus service; this delta can be dropped after the release of Ubuntu 20.04. - Build with quilt -- Julian Andres Klode <juliank@ubuntu.com> Fri, 27 Mar 2020 12:20:11 +0100

Modifications :
  1. Download patch debian/patches/02_axi-pkgname-mangled-term.patch

    --- 0.51/debian/patches/02_axi-pkgname-mangled-term.patch 1970-01-01 00:00:00.000000000 +0000 +++ 0.51ubuntu1/debian/patches/02_axi-pkgname-mangled-term.patch 2019-06-27 09:35:49.000000000 +0000 @@ -0,0 +1,13 @@ +--- a/axi/indexer.py ++++ b/axi/indexer.py +@@ -531,6 +531,10 @@ + # Index the package name with a special prefix, to be able to find this + # document by exact package name match + document.add_term("XP"+pkg.name) ++ # the query parser is very unhappy about "-" in the pkgname, this ++ # breaks e.g. FLAG_WILDCARD based matching, so we add a mangled ++ # name here ++ document.add_term("XPM"+pkg.name.replace("-","_")) + # Have all the various plugins index their things + for addon in self.plugins: + addon.obj.index(document, pkg)
  2. Download patch axi/indexer.py

    --- 0.51/axi/indexer.py 2020-03-08 12:19:12.000000000 +0000 +++ 0.51ubuntu1/axi/indexer.py 2020-03-27 11:05:54.000000000 +0000 @@ -565,6 +565,11 @@ class Indexer(object): for idx, pkg in enumerate(cache): if not pkg.candidate: continue + # multiarch: do not index foreign arch if there is a native + # archive version available (unless the pkg is installed) + if (not pkg.installed and + ":" in pkg.name and pkg.name.split(":")[0] in cache): + continue # Print progress if idx % 200 == 0: self.progress.progress(100*idx/count) yield self.get_document_from_apt(pkg) @@ -639,7 +644,11 @@ class Indexer(object): """ Update the index """ - db = xapian.WritableDatabase(pathname, xapian.DB_CREATE_OR_OPEN) + try: + db = xapian.WritableDatabase(pathname, xapian.DB_CREATE_OR_OPEN) + except xapian.DatabaseLockError as e: + self.progress.warning("DB Update failed, database locked") + return cache = self.aptcache() count = len(cache)
  3. Download patch plugins/app-install.py

    --- 0.51/plugins/app-install.py 2020-03-08 12:19:12.000000000 +0000 +++ 0.51ubuntu1/plugins/app-install.py 2020-03-27 10:48:33.000000000 +0000 @@ -88,8 +88,11 @@ class AppInstall(object): maxts = 0 for f in os.listdir(APPINSTALLDIR): if f[0] == '.' or not f.endswith(".desktop"): continue - ts = os.path.getmtime(os.path.join(APPINSTALLDIR, f)) - if ts > maxts: maxts = ts + try: + ts = os.path.getmtime(os.path.join(APPINSTALLDIR, f)) + if ts > maxts: maxts = ts + except OSError: # ignore file not found #752195 (potential race) + pass return dict( timestamp = maxts, values = [
  4. Download patch debian/rules

    --- 0.51/debian/rules 2020-03-08 12:19:12.000000000 +0000 +++ 0.51ubuntu1/debian/rules 2020-03-27 10:48:30.000000000 +0000 @@ -5,7 +5,7 @@ RELEASE_PACKAGE=apt-xapian-index PFX=$(CURDIR)/debian/apt-xapian-index %: - dh $@ --with=python3 --buildsystem=pybuild + dh $@ --with=python3,quilt --buildsystem=pybuild override_dh_auto_build: dh_auto_build
  5. Download patch debian/control

    --- 0.51/debian/control 2020-03-08 12:19:12.000000000 +0000 +++ 0.51ubuntu1/debian/control 2020-03-27 10:47:40.000000000 +0000 @@ -1,9 +1,11 @@ Source: apt-xapian-index Section: admin Priority: optional -Maintainer: Debian QA Group <packages@qa.debian.org> +Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> +XSBC-Original-Maintainer: Debian QA Group <packages@qa.debian.org> Build-Depends: debhelper-compat (= 12), + quilt, Build-Depends-Indep: bash-completion (>= 1:2.1-4.2~), dh-python,
  6. Download patch debian/preinst

    --- 0.51/debian/preinst 2020-03-08 12:19:12.000000000 +0000 +++ 0.51ubuntu1/debian/preinst 2020-03-08 15:15:54.000000000 +0000 @@ -2,7 +2,7 @@ #DEBHELPER# -dpkg-maintscript-helper rm_conffile /etc/dbus-1/system.d/org.debian.AptXapianIndex.conf 0.46 apt-xapian-index -- "$@" +dpkg-maintscript-helper rm_conffile /etc/dbus-1/system.d/org.debian.AptXapianIndex.conf 0.49ubuntu1~ apt-xapian-index -- "$@" dpkg-maintscript-helper rm_conffile /etc/bash_completion.d/axi-cache 0.47+nmu2~ apt-xapian-index -- "$@" exit 0
  7. Download patch debian/patches/07_glib_import.patch

    --- 0.51/debian/patches/07_glib_import.patch 1970-01-01 00:00:00.000000000 +0000 +++ 0.51ubuntu1/debian/patches/07_glib_import.patch 2019-06-27 09:35:49.000000000 +0000 @@ -0,0 +1,20 @@ +## Description: fix import of GLib and GObject +## Author: Carlo Vanini <silhusk@gmail.com> +## Bug-Ubuntu: https://bugs.launchpad.net/bugs/1579834 +## Last-Update: 2016-07-07 +Index: apt-xapian-index-0.47ubuntu9/tests/dbus-update-apt-xapian-index.py +=================================================================== +--- apt-xapian-index-0.47ubuntu9.orig/tests/dbus-update-apt-xapian-index.py ++++ apt-xapian-index-0.47ubuntu9/tests/dbus-update-apt-xapian-index.py +@@ -4,7 +4,10 @@ from __future__ import print_function + + import dbus + import os +-import glib ++try: ++ from gi.repository import GLib as glib ++except ImportError: ++ import glib + import dbus.mainloop.glib + dbus.mainloop.glib.DBusGMainLoop(set_as_default=True) +
  8. Download patch debian/patches/06_32bit_sizes.patch

    --- 0.51/debian/patches/06_32bit_sizes.patch 1970-01-01 00:00:00.000000000 +0000 +++ 0.51ubuntu1/debian/patches/06_32bit_sizes.patch 2019-06-27 09:35:49.000000000 +0000 @@ -0,0 +1,47 @@ +Description: On 32 bit systems, large packages like astrometry-data-2mass-00 + can have an installed size that doesn't fit in 32 bits, generating an + OverflowError. Xapian doesn't catch this and thus returns a value with an + exception set, causing a chained SystemError. In either case, catch the + exception and treat it as if the size is -1, i.e. don't add it to the + document. +Author: Barry Warsaw <barry@ubuntu.com> +Bug: https://bugs.launchpad.net/ubuntu/+source/xapian1.3-bindings/+bug/1527745 + +--- a/plugins/sizes.py ++++ b/plugins/sizes.py +@@ -95,9 +95,15 @@ + return + + if self.val_inst_size != -1: +- document.add_value(self.val_inst_size, xapian.sortable_serialise(instSize)); ++ try: ++ document.add_value(self.val_inst_size, xapian.sortable_serialise(instSize)); ++ except (OverflowError, SystemError): ++ pass + if self.val_pkg_size != -1: +- document.add_value(self.val_pkg_size, xapian.sortable_serialise(pkgSize)); ++ try: ++ document.add_value(self.val_pkg_size, xapian.sortable_serialise(pkgSize)); ++ except (OverflowError, SystemError): ++ pass + + def indexDeb822(self, document, pkg): + """ +@@ -116,9 +122,15 @@ + return + + if self.val_inst_size != -1: +- document.add_value(self.val_inst_size, xapian.sortable_serialise(instSize)); ++ try: ++ document.add_value(self.val_inst_size, xapian.sortable_serialise(instSize)); ++ except (OverflowError, SystemError): ++ pass + if self.val_pkg_size != -1: +- document.add_value(self.val_pkg_size, xapian.sortable_serialise(pkgSize)); ++ try: ++ document.add_value(self.val_pkg_size, xapian.sortable_serialise(pkgSize)); ++ except (OverflowError, SystemError): ++ pass + + def init(): + """
  9. Download patch debian/patches/series

    --- 0.51/debian/patches/series 1970-01-01 00:00:00.000000000 +0000 +++ 0.51ubuntu1/debian/patches/series 2020-03-27 10:49:26.000000000 +0000 @@ -0,0 +1,4 @@ +01_axi_cjk_support.patch +02_axi-pkgname-mangled-term.patch +06_32bit_sizes.patch +07_glib_import.patch
  10. Download patch debian/patches/01_axi_cjk_support.patch

    --- 0.51/debian/patches/01_axi_cjk_support.patch 1970-01-01 00:00:00.000000000 +0000 +++ 0.51ubuntu1/debian/patches/01_axi_cjk_support.patch 2019-06-27 09:35:49.000000000 +0000 @@ -0,0 +1,150 @@ +=== modified file 'axi-cache' +Index: apt-xapian-index-0.49ubuntu2/axi-cache +=================================================================== +--- apt-xapian-index-0.49ubuntu2.orig/axi-cache ++++ apt-xapian-index-0.49ubuntu2/axi-cache +@@ -43,6 +43,9 @@ + XDG_CACHE_HOME = os.environ.get("XDG_CACHE_HOME", os.path.expanduser("~/.cache")) + CACHEFILE = os.path.join(XDG_CACHE_HOME, "axi-cache.state") + ++# Activate support for the CJK tokenizer ++os.environ["XAPIAN_CJK_NGRAM"] = "1" ++ + try: + from ConfigParser import RawConfigParser + import re +Index: apt-xapian-index-0.49ubuntu2/axi/indexer.py +=================================================================== +--- apt-xapian-index-0.49ubuntu2.orig/axi/indexer.py ++++ apt-xapian-index-0.49ubuntu2/axi/indexer.py +@@ -641,6 +641,9 @@ + self.progress.end() + return unchanged, outdated, obsolete + ++ def is_cjk_enabled (self): ++ return "XAPIAN_CJK_NGRAM" in os.environ ++ + def updateIndex(self, pathname): + """ + Update the index +@@ -650,6 +653,12 @@ + except xapian.DatabaseLockError: + self.progress.warning("DB Update failed, database locked") + return ++ ++ # Make sure the index CJK-compatible ++ if self.is_cjk_enabled() and db.get_metadata("cjk_ngram") != b"1": ++ self.progress.notice("The index %s is not CJK-compatible, rebuilding it" % axi.XAPIANINDEX) ++ return self.rebuild() ++ + cache = self.aptcache() + count = len(cache) + +@@ -710,6 +719,11 @@ + + # Create a new Xapian index + db = xapian.WritableDatabase(pathname, xapian.DB_CREATE_OR_OVERWRITE) ++ ++ # Mark the new index as CJK-enabled if relevant ++ if self.is_cjk_enabled(): ++ db.set_metadata("cjk_ngram", "1") ++ + # It seems to be faster without transactions, at the moment + #db.begin_transaction(False) + +Index: apt-xapian-index-0.49ubuntu2/test/test_indexer.py +=================================================================== +--- apt-xapian-index-0.49ubuntu2.orig/test/test_indexer.py ++++ apt-xapian-index-0.49ubuntu2/test/test_indexer.py +@@ -6,6 +6,7 @@ + import shutil + import subprocess + import tools ++import xapian + + def smallcache(pkglist=["apt", "libept-dev", "gedit"]): + class sc(object): +@@ -61,6 +62,11 @@ + # Ensure that we have an index + self.assertCleanIndex() + ++ def testAptRebuildWithCJK(self): ++ os.environ["XAPIAN_CJK_NGRAM"] = "1" ++ self.testAptRebuild() ++ del os.environ["XAPIAN_CJK_NGRAM"] ++ + def testDeb822Rebuild(self): + pkgfile = os.path.join(axi.XAPIANDBPATH, "packages") + subprocess.check_call("apt-cache show apt libept-dev gedit > " + pkgfile, shell=True) +@@ -117,6 +123,55 @@ + # Ensure that we did not create a new index + self.assertEqual(open(axi.XAPIANINDEX).read(), curidx) + ++ def testIncrementalRebuildWithCJK(self): ++ os.environ["XAPIAN_CJK_NGRAM"] = "1" ++ self.testIncrementalRebuild() ++ del os.environ["XAPIAN_CJK_NGRAM"] ++ ++ def testIncrementalRebuildUpgradingtoCJK(self): ++ # Perform the initial indexing without CJK enabled ++ self.assertFalse("XAPIAN_CJK_NGRAM" in os.environ) ++ progress = axi.indexer.SilentProgress() ++ pre_indexer = axi.indexer.Indexer(progress, True) ++ pre_indexer._test_wrap_apt_cache(smallcache(["apt", "libept-dev", "gedit"])) ++ self.assert_(pre_indexer.lock()) ++ self.assert_(pre_indexer.setupIndexing()) ++ pre_indexer.rebuild() ++ pre_indexer = None ++ curidx = open(axi.XAPIANINDEX).read() ++ ++ # Ensure that we have an index ++ self.assertCleanIndex() ++ ++ # Prepare an incremental update ++ self.indexer._test_wrap_apt_cache(smallcache(["apt", "coreutils", "gedit"])) ++ ++ # No other indexers are running, ensure lock succeeds ++ self.assert_(self.indexer.lock()) ++ ++ # An index exists the plugin modification timestamps are the same, so ++ # we need to force the indexer to run ++ self.assert_(not self.indexer.setupIndexing()) ++ self.assert_(self.indexer.setupIndexing(force=True)) ++ ++ # Perform a rebuild with CJK enabled ++ os.environ["XAPIAN_CJK_NGRAM"] = "1" ++ self.indexer.incrementalUpdate() ++ del os.environ["XAPIAN_CJK_NGRAM"] ++ ++ # Close the indexer ++ self.indexer = None ++ ++ # Ensure that we have an index ++ self.assertCleanIndex() ++ ++ # Ensure that we created a new index (because we reindexed to get CJK) ++ self.assertNotEqual(open(axi.XAPIANINDEX).read(), curidx) ++ ++ # Double check that we set the CJK flag in the index ++ db = xapian.Database(axi.XAPIANINDEX) ++ self.assertEqual(db.get_metadata("cjk_ngram"), b"1") ++ + def testIncrementalRebuildFromEmpty(self): + # Prepare an incremental update + self.indexer._test_wrap_apt_cache(smallcache()) +Index: apt-xapian-index-0.49ubuntu2/update-apt-xapian-index +=================================================================== +--- apt-xapian-index-0.49ubuntu2.orig/update-apt-xapian-index ++++ apt-xapian-index-0.49ubuntu2/update-apt-xapian-index +@@ -24,6 +24,11 @@ + + from __future__ import print_function + ++import os ++# Activate support for the CJK tokenizer ++os.environ["XAPIAN_CJK_NGRAM"] = "1" ++ ++ + # + # Main program body + #
  11. Download patch debian/postinst

    --- 0.51/debian/postinst 2020-03-08 12:19:12.000000000 +0000 +++ 0.51ubuntu1/debian/postinst 2020-03-08 15:15:54.000000000 +0000 @@ -13,7 +13,7 @@ else IONICE="" fi -dpkg-maintscript-helper rm_conffile /etc/dbus-1/system.d/org.debian.AptXapianIndex.conf 0.46 apt-xapian-index -- "$@" +dpkg-maintscript-helper rm_conffile /etc/dbus-1/system.d/org.debian.AptXapianIndex.conf 0.49ubuntu1~ apt-xapian-index -- "$@" dpkg-maintscript-helper rm_conffile /etc/bash_completion.d/axi-cache 0.47+nmu2~ apt-xapian-index -- "$@" case "$1" in
  12. Download patch debian/postrm

    --- 0.51/debian/postrm 2020-03-08 12:19:12.000000000 +0000 +++ 0.51ubuntu1/debian/postrm 2020-03-08 15:15:54.000000000 +0000 @@ -2,7 +2,7 @@ set -e -dpkg-maintscript-helper rm_conffile /etc/dbus-1/system.d/org.debian.AptXapianIndex.conf 0.46 apt-xapian-index -- "$@" +dpkg-maintscript-helper rm_conffile /etc/dbus-1/system.d/org.debian.AptXapianIndex.conf 0.49ubuntu1~ apt-xapian-index -- "$@" dpkg-maintscript-helper rm_conffile /etc/bash_completion.d/axi-cache 0.47+nmu2~ apt-xapian-index -- "$@" if [ "$1" = "remove" -o "$1" = "purge" ]; then
  13. Download patch debian/cron.weekly

    --- 0.51/debian/cron.weekly 2020-03-08 12:19:12.000000000 +0000 +++ 0.51ubuntu1/debian/cron.weekly 2020-03-08 15:15:54.000000000 +0000 @@ -23,8 +23,8 @@ if [ -x "$CMD" ] then if [ -x "$IONICE" ] then - nice -n 19 $IONICE -c 3 $CMD --update --quiet + nice -n 19 $IONICE -c 3 $CMD --quiet else - nice -n 19 $CMD --update --quiet + nice -n 19 $CMD --quiet fi fi
  1. apt-xapian-index