From bce0530dc27c0866da49dab4eacde24b97c4870a Mon Sep 17 00:00:00 2001 From: Richard Hughes Date: Mon, 1 Aug 2011 13:00:27 +0100 Subject: [PATCH 1/5] New upstream release. Manually convert the results of GetDetails to unicode. Parse the new style .discinfo files for F15 Ignore local packages when calculating the simulate list Allow the user to remove PackageKit-yum if PackageKit-zif is installed Resolves: #719916, #709865 --- .gitignore | 1 + PackageKit.spec | 18 +++++++++++++++--- sources | 2 +- 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 81da4d4..0184024 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ PackageKit-0.6.7.tar.bz2 /PackageKit-0.6.14.tar.bz2 /PackageKit-0.6.15.tar.bz2 /PackageKit-0.6.16.tar.xz +/PackageKit-0.6.17.tar.xz diff --git a/PackageKit.spec b/PackageKit.spec index 95439a5..ddc555c 100644 --- a/PackageKit.spec +++ b/PackageKit.spec @@ -2,7 +2,7 @@ Summary: Package management service Name: PackageKit -Version: 0.6.16 +Version: 0.6.17 Release: 1%{?dist} License: GPLv2+ and LGPLv2+ URL: http://www.packagekit.org @@ -15,7 +15,7 @@ Patch0: PackageKit-0.3.8-Fedora-Vendor.conf.patch Patch1: PackageKit-0.4.4-Fedora-turn-off-time.conf.patch Requires: PackageKit-glib = %{version}-%{release} -Requires: PackageKit-yum = %{version}-%{release} +Requires: PackageKit-backend Requires: shared-mime-info Requires: comps-extras @@ -63,7 +63,10 @@ cross-architecture API. Summary: PackageKit YUM backend Group: System Environment/Libraries Requires: yum >= 3.2.19 +# python(gio) +Requires: pygobject2 Requires: %{name} = %{version}-%{release} +Provides: PackageKit-backend %description yum A backend for PackageKit to enable yum functionality. @@ -73,6 +76,7 @@ Summary: PackageKit Zif backend Group: System Environment/Libraries Requires: zif >= 0.1.3 Requires: %{name} = %{version}-%{release} +Provides: PackageKit-backend %description zif A backend for PackageKit to enable Zif functionality. @@ -256,7 +260,7 @@ user to restart the computer or remove and re-insert the device. --enable-smart \ --enable-introspection \ %endif - --with-default-backend=yum \ + --with-default-backend=yum,zif \ --disable-local \ --disable-ruck \ --disable-strict \ @@ -460,6 +464,14 @@ update-mime-database %{_datadir}/mime &> /dev/null || : %{_includedir}/PackageKit/backend/*.h %changelog +* Mon Aug 01 2011 Richard Hughes - 0.6.17-1 +- New upstream release. +- Manually convert the results of GetDetails to unicode. +- Parse the new style .discinfo files for F15 +- Ignore local packages when calculating the simulate list +- Allow the user to remove PackageKit-yum if PackageKit-zif is installed +- Resolves: #719916, #709865 + * Mon Jul 04 2011 Richard Hughes - 0.6.16-1 - New upstream release. - Do not try to parse any arguments in command-not-found. diff --git a/sources b/sources index 3d08ab4..5a87b30 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -a829166f881dab2aa19e0f130ff8b33d PackageKit-0.6.16.tar.xz +922666418e2697eb2248ee5de31ef967 PackageKit-0.6.17.tar.xz From cff0f52d6dddd6f9c9f7de2ac8d37a0e48053eeb Mon Sep 17 00:00:00 2001 From: Richard Hughes Date: Tue, 2 Aug 2011 11:10:15 +0100 Subject: [PATCH 2/5] Ensure the moc files are re-generated by manually deleting them. --- PackageKit.spec | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/PackageKit.spec b/PackageKit.spec index ddc555c..07c7273 100644 --- a/PackageKit.spec +++ b/PackageKit.spec @@ -3,7 +3,7 @@ Summary: Package management service Name: PackageKit Version: 0.6.17 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ and LGPLv2+ URL: http://www.packagekit.org Source0: http://www.packagekit.org/releases/%{name}-%{version}.tar.xz @@ -262,10 +262,12 @@ user to restart the computer or remove and re-insert the device. %endif --with-default-backend=yum,zif \ --disable-local \ - --disable-ruck \ --disable-strict \ --disable-tests +rm lib/packagekit-qt/src/*.moc +rm lib/packagekit-qt2/*.moc + make %{?_smp_mflags} %install @@ -464,6 +466,9 @@ update-mime-database %{_datadir}/mime &> /dev/null || : %{_includedir}/PackageKit/backend/*.h %changelog +* Tue Aug 02 2011 Richard Hughes - 0.6.17-2 +- Ensure the moc files are re-generated by manually deleting them. + * Mon Aug 01 2011 Richard Hughes - 0.6.17-1 - New upstream release. - Manually convert the results of GetDetails to unicode. From 1345086c41820552e2bb966530965f810877301f Mon Sep 17 00:00:00 2001 From: Richard Hughes Date: Mon, 5 Sep 2011 14:55:45 +0100 Subject: [PATCH 3/5] New upstream release. Fix a small memory leak in the glib client library Ignore missing obsoleted updates rather than failing the update Fix a warning when doing 'pkcon repo-list --filter=~devel' Make the lsof plugin not lookup hostnames Remove the duplicate 'The software is not from a trusted source' --- .gitignore | 1 + PackageKit.spec | 15 ++++++++++----- sources | 2 +- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 0184024..4074f5a 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,4 @@ PackageKit-0.6.7.tar.bz2 /PackageKit-0.6.15.tar.bz2 /PackageKit-0.6.16.tar.xz /PackageKit-0.6.17.tar.xz +/PackageKit-0.6.18.tar.xz diff --git a/PackageKit.spec b/PackageKit.spec index 07c7273..c4a7877 100644 --- a/PackageKit.spec +++ b/PackageKit.spec @@ -2,8 +2,8 @@ Summary: Package management service Name: PackageKit -Version: 0.6.17 -Release: 2%{?dist} +Version: 0.6.18 +Release: 1%{?dist} License: GPLv2+ and LGPLv2+ URL: http://www.packagekit.org Source0: http://www.packagekit.org/releases/%{name}-%{version}.tar.xz @@ -265,9 +265,6 @@ user to restart the computer or remove and re-insert the device. --disable-strict \ --disable-tests -rm lib/packagekit-qt/src/*.moc -rm lib/packagekit-qt2/*.moc - make %{?_smp_mflags} %install @@ -466,6 +463,14 @@ update-mime-database %{_datadir}/mime &> /dev/null || : %{_includedir}/PackageKit/backend/*.h %changelog +* Mon Sep 05 2011 Richard Hughes - 0.6.18-1 +- New upstream release. +- Fix a small memory leak in the glib client library +- Ignore missing obsoleted updates rather than failing the update +- Fix a warning when doing 'pkcon repo-list --filter=~devel' +- Make the lsof plugin not lookup hostnames +- Remove the duplicate 'The software is not from a trusted source' + * Tue Aug 02 2011 Richard Hughes - 0.6.17-2 - Ensure the moc files are re-generated by manually deleting them. diff --git a/sources b/sources index 5a87b30..a8f34e5 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -922666418e2697eb2248ee5de31ef967 PackageKit-0.6.17.tar.xz +bf7c76a95f40252fc5225e0bbfe1fe82 PackageKit-0.6.18.tar.xz From 043e7dde6743be3a7ba3df90290baea298b08d00 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Thu, 8 Sep 2011 20:25:47 -0400 Subject: [PATCH 4/5] fix segfault --- PackageKit.spec | 9 ++++++++- pk-glib-signal.patch | 23 +++++++++++++++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 pk-glib-signal.patch diff --git a/PackageKit.spec b/PackageKit.spec index c4a7877..f29c46e 100644 --- a/PackageKit.spec +++ b/PackageKit.spec @@ -3,7 +3,7 @@ Summary: Package management service Name: PackageKit Version: 0.6.18 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ and LGPLv2+ URL: http://www.packagekit.org Source0: http://www.packagekit.org/releases/%{name}-%{version}.tar.xz @@ -14,6 +14,9 @@ Patch0: PackageKit-0.3.8-Fedora-Vendor.conf.patch # Fedora specific: the yum backend doesn't do time estimation correctly Patch1: PackageKit-0.4.4-Fedora-turn-off-time.conf.patch +# upstream fix +Patch2: pk-glib-signal.patch + Requires: PackageKit-glib = %{version}-%{release} Requires: PackageKit-backend Requires: shared-mime-info @@ -250,6 +253,7 @@ user to restart the computer or remove and re-insert the device. %setup -q %patch0 -p1 -b .fedora %patch1 -p1 -b .no-time +%patch2 -p1 -b .glib-signal %build %configure \ @@ -463,6 +467,9 @@ update-mime-database %{_datadir}/mime &> /dev/null || : %{_includedir}/PackageKit/backend/*.h %changelog +* Thu Sep 8 2011 Matthias Clasen - 0.6.18-2 +- Fix segfault with glib 2.29.90 + * Mon Sep 05 2011 Richard Hughes - 0.6.18-1 - New upstream release. - Fix a small memory leak in the glib client library diff --git a/pk-glib-signal.patch b/pk-glib-signal.patch new file mode 100644 index 0000000..2fc564c --- /dev/null +++ b/pk-glib-signal.patch @@ -0,0 +1,23 @@ +diff -up PackageKit-0.6.18/src/pk-main.c.signal PackageKit-0.6.18/src/pk-main.c +--- PackageKit-0.6.18/src/pk-main.c.signal 2011-09-08 20:17:51.479976840 -0400 ++++ PackageKit-0.6.18/src/pk-main.c 2011-09-08 20:20:33.134971062 -0400 +@@ -271,13 +271,13 @@ main (int argc, char *argv[]) + goto exit_program; + } + +-#if GLIB_CHECK_VERSION(2,29,4) ++#if GLIB_CHECK_VERSION(2,29,90) + /* do stuff on ctrl-c */ +- g_unix_signal_add_watch_full (SIGINT, +- G_PRIORITY_DEFAULT, +- pk_main_sigint_cb, +- loop, +- NULL); ++ g_unix_signal_add_full (G_PRIORITY_DEFAULT, ++ SIGINT, ++ pk_main_sigint_cb, ++ loop, ++ NULL); + #else + signal (SIGINT, pk_main_sigint_handler); + #endif From 4345b038016c89ddd7492b4f86aa1bae69d3e187 Mon Sep 17 00:00:00 2001 From: Nils Philippsen Date: Thu, 27 Oct 2011 12:45:08 +0200 Subject: [PATCH 5/5] fix yum encoding issues seen with kpackagekit (#668282) --- PackageKit-0.6.19-yum-encoding.patch | 110 +++++++++++++++++++++++++++ PackageKit.spec | 7 +- 2 files changed, 116 insertions(+), 1 deletion(-) create mode 100644 PackageKit-0.6.19-yum-encoding.patch diff --git a/PackageKit-0.6.19-yum-encoding.patch b/PackageKit-0.6.19-yum-encoding.patch new file mode 100644 index 0000000..6073b0b --- /dev/null +++ b/PackageKit-0.6.19-yum-encoding.patch @@ -0,0 +1,110 @@ +From a7d50f5f4a9f69e33075fbe05d4ae42158d1b9c9 Mon Sep 17 00:00:00 2001 +From: Nils Philippsen +Date: Wed, 26 Oct 2011 17:31:36 +0200 +Subject: [PATCH 1/2] python: implement and use utf8 stream writer for stdout, + stderr + +The C-side (glib) really wants stuff to be encoded in UTF-8. +(cherry picked from commit b5a5011f31d6062cd00ee6b02ddf356d691e67e6) +--- + lib/python/packagekit/backend.py | 45 ++++++++++++++++++++++++++++++++++++++ + 1 files changed, 45 insertions(+), 0 deletions(-) + +diff --git a/lib/python/packagekit/backend.py b/lib/python/packagekit/backend.py +index ae7bbad..4c7fd2c 100644 +--- a/lib/python/packagekit/backend.py ++++ b/lib/python/packagekit/backend.py +@@ -37,8 +37,49 @@ def _to_unicode(txt, encoding='utf-8'): + txt = unicode(txt, encoding, errors='replace') + return txt + ++def _to_utf8(txt, errors='replace'): ++ '''convert practically anything to a utf-8-encoded byte string''' ++ ++ # convert to unicode object ++ if isinstance(txt, str): ++ txt = txt.decode('utf-8', errors=errors) ++ if not isinstance(txt, basestring): ++ # try to convert non-string objects like exceptions ++ try: ++ # if txt.__unicode__() exists, or txt.__str__() returns ASCII ++ txt = unicode(txt) ++ except UnicodeDecodeError: ++ # if txt.__str__() exists ++ txt = str(txt).decode('utf-8', errors=errors) ++ except: ++ # no __str__(), __unicode__() methods, use representation ++ txt = unicode(repr(txt)) ++ ++ # return encoded as UTF-8 ++ return txt.encode('utf-8', errors=errors) ++ + # Classes + ++class _UTF8Writer(codecs.StreamWriter): ++ ++ encoding = 'utf-8' ++ ++ def __init__(self, stream, errors='replace'): ++ codecs.StreamWriter.__init__(self, stream, errors) ++ ++ def encode(self, inp, errors='strict'): ++ try: ++ l = len(inp) ++ except TypeError: ++ try: ++ l = len(unicode(inp)) ++ except: ++ try: ++ l = len(str(inp)) ++ except: ++ l = 1 ++ return (_to_utf8(inp, errors=errors), l) ++ + class PkError(Exception): + def __init__(self, code, details): + self.code = code +@@ -49,6 +90,10 @@ class PkError(Exception): + class PackageKitBaseBackend: + + def __init__(self, cmds): ++ # Make sys.stdout/stderr cope with UTF-8 ++ sys.stdout = _UTF8Writer(sys.stdout) ++ sys.stderr = _UTF8Writer(sys.stderr) ++ + # Setup a custom exception handler + installExceptionHandler(self) + self.cmds = cmds +-- +1.7.6.4 + + +From 01226fbdfc6cd9f03183048c7531ed324d4b5412 Mon Sep 17 00:00:00 2001 +From: Nils Philippsen +Date: Wed, 26 Oct 2011 17:33:18 +0200 +Subject: [PATCH 2/2] yum: don't let yum.misc.setup_locale() override stdout + codec + +Use our own stdout/stderr wrappers, as what codecs.getwriter() supplies +only works for unicode, but not for already encoded data. +(cherry picked from commit 31b9a6942a65f8eeeb67c6ea376429e8c5eac43f) +--- + backends/yum/yumBackend.py | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/backends/yum/yumBackend.py b/backends/yum/yumBackend.py +index 479ee2d..dfed1a2 100755 +--- a/backends/yum/yumBackend.py ++++ b/backends/yum/yumBackend.py +@@ -3482,7 +3482,7 @@ class PackageKitYumBase(yum.YumBase): + raise PkError(ERROR_FAILED_CONFIG_PARSING, _to_unicode(e)) + + # setup to use LANG for descriptions +- yum.misc.setup_locale(override_time=True) ++ yum.misc.setup_locale(override_time=True, override_codecs=False) + + self.missingGPGKey = None + self.dsCallback = DepSolveCallback(backend) +-- +1.7.6.4 + diff --git a/PackageKit.spec b/PackageKit.spec index f29c46e..25872e4 100644 --- a/PackageKit.spec +++ b/PackageKit.spec @@ -3,7 +3,7 @@ Summary: Package management service Name: PackageKit Version: 0.6.18 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2+ and LGPLv2+ URL: http://www.packagekit.org Source0: http://www.packagekit.org/releases/%{name}-%{version}.tar.xz @@ -16,6 +16,7 @@ Patch1: PackageKit-0.4.4-Fedora-turn-off-time.conf.patch # upstream fix Patch2: pk-glib-signal.patch +Patch3: PackageKit-0.6.19-yum-encoding.patch Requires: PackageKit-glib = %{version}-%{release} Requires: PackageKit-backend @@ -254,6 +255,7 @@ user to restart the computer or remove and re-insert the device. %patch0 -p1 -b .fedora %patch1 -p1 -b .no-time %patch2 -p1 -b .glib-signal +%patch3 -p1 -b .yum-encoding %build %configure \ @@ -467,6 +469,9 @@ update-mime-database %{_datadir}/mime &> /dev/null || : %{_includedir}/PackageKit/backend/*.h %changelog +* Thu Oct 27 2011 Nils Philippsen - 0.6.18-3 +- fix yum encoding issues seen with kpackagekit (#668282) + * Thu Sep 8 2011 Matthias Clasen - 0.6.18-2 - Fix segfault with glib 2.29.90