[packages/PackageKit] - updated to 0.8.13 - removed obsolete poldek patch - added zif bcond (off by default)

qboosh qboosh at pld-linux.org
Sun Nov 24 10:26:52 CET 2013


commit 53810c7cca39386314a804e6491810c2661cbd8e
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sun Nov 24 10:27:26 2013 +0100

    - updated to 0.8.13
    - removed obsolete poldek patch
    - added zif bcond (off by default)

 PackageKit-poldek.patch | 128 ------------------------------------------------
 PackageKit.spec         |  66 +++++++++++++++++--------
 2 files changed, 46 insertions(+), 148 deletions(-)
---
diff --git a/PackageKit.spec b/PackageKit.spec
index 6d0e9a2..dc58f1c 100644
--- a/PackageKit.spec
+++ b/PackageKit.spec
@@ -1,15 +1,15 @@
 # TODO:
-# - send poldek patch upstream
 # - BASH command-not-found functionality disabled for now as it needs patched bash
 #   (details in bash from Fedora Rawhide)
 #
 # Conditional build:
-%bcond_without	doc	# build without docs
-%bcond_without	gir	# gobject introspection, time to time broken
-%bcond_without	poldek	# build Poldek backend
-%bcond_without	smart	# build SMART backend
-%bcond_without	yum	# build YUM backend
-%bcond_with	browser	# build browser plugin (patrys says: it's flawed by concept)
+%bcond_without	doc		# build without docs
+%bcond_without	introspection	# gobject introspection, time to time broken
+%bcond_without	poldek		# Poldek backend
+%bcond_without	smart		# SMART backend
+%bcond_without	yum		# YUM backend
+%bcond_with	zif		# Zif backend
+%bcond_with	browser		# browser plugin (patrys says: it's flawed by concept)
 
 # default backend, configurable at runtime
 %define		backend	poldek
@@ -17,13 +17,12 @@
 Summary:	System daemon that is a D-Bus abstraction layer for package management
 Summary(pl.UTF-8):	Demon systemowy będący warstwą abstrakcji D-Bus do zarządzania pakietami
 Name:		PackageKit
-Version:	0.8.11
-Release:	3
+Version:	0.8.13
+Release:	1
 License:	GPL v2+
 Group:		Applications/System
 Source0:	http://www.packagekit.org/releases/%{name}-%{version}.tar.xz
-# Source0-md5:	676ebf95830373b84d5599f4e5039b72
-Patch0:		%{name}-poldek.patch
+# Source0-md5:	c8f7207cca4fcdb3d62d012b67c2f319
 Patch1:		%{name}-PLD.patch
 Patch2:		bashism.patch
 Patch3:		smart-at-fix.patch
@@ -41,8 +40,8 @@ BuildRequires:	docbook-dtd412-xml
 BuildRequires:	docbook-dtd42-xml
 BuildRequires:	fontconfig-devel
 BuildRequires:	gettext-devel
-BuildRequires:	glib2-devel >= 1:2.30.0
-%{?with_gir:BuildRequires:	gobject-introspection-devel >= 0.9.9}
+BuildRequires:	glib2-devel >= 1:2.32.0
+%{?with_introspection:BuildRequires:	gobject-introspection-devel >= 0.9.9}
 BuildRequires:	gstreamer-devel >= 1.0.0
 BuildRequires:	gstreamer-plugins-base-devel >= 1.0.0
 BuildRequires:	gtk+2-devel >= 2:2.14.0
@@ -66,6 +65,7 @@ BuildRequires:	systemd-devel
 BuildRequires:	tar >= 1:1.22
 BuildRequires:	udev-glib-devel
 BuildRequires:	xz
+%{?with_zif:BuildRequires:	zif >= 0.2.8}
 %if %{with browser}
 BuildRequires:	cairo-devel
 BuildRequires:	nspr-devel >= 4.8
@@ -76,7 +76,7 @@ Requires:	%{name}-backend
 Requires:	%{name}-libs = %{version}-%{release}
 Requires:	ConsoleKit-x11
 Requires:	crondaemon
-Requires:	polkit >= 0.92
+Requires:	polkit >= 0.98
 Obsoletes:	PackageKit-docs < 0.8.4
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -94,7 +94,7 @@ zgodnego z wieloma dystrybucjami i architekturami.
 Summary:	packagekit-glib library
 Summary(pl.UTF-8):	Biblioteka packagekit-glib
 Group:		Libraries
-Requires:	glib2 >= 1:2.30.0
+Requires:	glib2 >= 1:2.32.0
 
 %description libs
 packagekit-glib library.
@@ -108,7 +108,7 @@ Summary(pl.UTF-8):	Pliki nagłówkowe biblioteki packagekit-glib
 Group:		Development/Libraries
 Requires:	%{name}-libs = %{version}-%{release}
 Requires:	dbus-devel >= 1.2.0
-Requires:	glib2-devel >= 1:2.30.0
+Requires:	glib2-devel >= 1:2.32.0
 Requires:	sqlite3-devel
 
 %description devel
@@ -184,6 +184,20 @@ A backend for PackageKit to enable yum functionality.
 %description backend-yum -l pl.UTF-8
 Backend PackageKit dodający obsługę Yuma.
 
+%package backend-zif
+Summary:	PackageKit Zif backend
+Summary(pl.UTF-8):	Backend PackageKit oparty na Zifie
+Group:		Libraries
+Requires:	%{name} = %{version}-%{release}
+Requires:	zif >= 0.2.8
+Provides:	%{name}-backend = %{version}-%{release}
+
+%description backend-zif
+A backend for PackageKit to enable Zif functionality.
+
+%description backend-zif -l pl.UTF-8
+Backend PackageKit dodający obsługę Zifa.
+
 %package gstreamer-plugin
 Summary:	GStreamer codecs installer
 Summary(pl.UTF-8):	Instalator kodeków GStreamera
@@ -280,7 +294,6 @@ Wtyczka PackageKit do przeglądarek WWW.
 
 %prep
 %setup -q
-%patch0 -p1
 %patch1 -p1
 %patch2 -p1
 %patch3 -p0
@@ -302,13 +315,14 @@ Wtyczka PackageKit do przeglądarek WWW.
 	--disable-command-not-found \
 	--disable-dummy \
 	%{!?with_doc:--disable-gtk-doc} \
-	%{!?with_gir:--disable-introspection} \
+	%{!?with_introspection:--disable-introspection} \
 	--disable-silent-rules \
 	--enable-bash-completion=%{bash_compdir} \
 	%{__enable_disable browser browser-plugin} \
 	%{__enable_disable poldek} \
 	%{__enable_disable smart} \
 	%{__enable_disable yum} \
+	%{__enable_disable zif} \
 	--with-default-backend=%{backend} \
 	--with-html-dir=%{_gtkdocdir} \
 	--with-mozilla-plugin-dir=%{_browserpluginsdir} \
@@ -346,8 +360,10 @@ install -p contrib/pm-utils/95packagekit $RPM_BUILD_ROOT%{_libdir}/pm-utils/slee
 %{__rm} $RPM_BUILD_ROOT%{_datadir}/PackageKit/helpers/yum/yumBackend.py[co]
 %endif
 
-# outdated copy of it
-%{__rm} -r $RPM_BUILD_ROOT%{_localedir}/it_IT
+# outdated copies of bg,it
+%{__rm} -r $RPM_BUILD_ROOT%{_localedir}/{bg_BG,it_IT}
+# fa_IR uses short dir name
+%{__mv} $RPM_BUILD_ROOT%{_localedir}/{fa_IR,fa}
 
 %py_postclean
 
@@ -420,6 +436,7 @@ fi
 %{_mandir}/man1/pk-device-rebind.1*
 %{_mandir}/man1/pkgenpack.1*
 %{_mandir}/man1/pkmon.1*
+%{systemdunitdir}/packagekit.service
 %{systemdunitdir}/packagekit-offline-update.service
 %dir /var/cache/PackageKit
 %dir /var/cache/PackageKit/downloads
@@ -488,6 +505,15 @@ fi
 %{_prefix}/lib/yum-plugins/refresh-packagekit.py
 %endif
 
+%if %{with zif}
+%files backend-zif
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/packagekit-backend/libpk_backend_zif.so
+%dir %{_datadir}/PackageKit/helpers/zif
+%{_datadir}/PackageKit/helpers/zif/licenses.txt
+%{_datadir}/PackageKit/helpers/zif/zif-comps-groups.conf
+%endif
+
 %files gstreamer-plugin
 %defattr(644,root,root,755)
 %doc contrib/gstreamer-plugin/README
diff --git a/PackageKit-poldek.patch b/PackageKit-poldek.patch
deleted file mode 100644
index 47f08c1..0000000
--- a/PackageKit-poldek.patch
+++ /dev/null
@@ -1,128 +0,0 @@
---- PackageKit-0.8.11/backends/poldek/pk-backend-poldek.c.orig	2013-08-28 17:13:58.000000000 +0200
-+++ PackageKit-0.8.11/backends/poldek/pk-backend-poldek.c	2013-09-29 20:38:57.392493190 +0200
-@@ -148,6 +148,9 @@
-  * Returns TRUE on success, FALSE when some error occurs.
-  **/
- static gboolean
-+execute_command (const gchar *format, ...) G_GNUC_PRINTF(1, 2);
-+
-+static gboolean
- execute_command (const gchar *format, ...)
- {
- 	struct poclidek_rcmd *rcmd;
-@@ -186,6 +189,9 @@
-  * result of specified command. On failure returns NULL.
-  **/
- static tn_array*
-+execute_packages_command (const gchar *format, ...) G_GNUC_PRINTF(1, 2);
-+
-+static tn_array*
- execute_packages_command (const gchar *format, ...)
- {
- 	struct poclidek_rcmd *rcmd;
-@@ -1851,7 +1857,7 @@
- 	command = g_string_free (cmd, FALSE);
- 
- 	if (toupdate > 0) {
--		if (execute_command (command) == FALSE) {
-+		if (execute_command ("%s", command) == FALSE) {
- 			pb_error_show (job, PK_ERROR_ENUM_TRANSACTION_ERROR);
- 		}
- 	}
-@@ -2021,7 +2027,7 @@
- 		errorcode = PK_ERROR_ENUM_PACKAGE_ALREADY_INSTALLED;
- 
- 	if (errorcode != PK_ERROR_ENUM_UNKNOWN) {
--		pk_backend_job_error_code (job, errorcode, pberror->tslog->str);
-+		pk_backend_job_error_code (job, errorcode, "%s", pberror->tslog->str);
- 		return TRUE;
- 	}
- 
-@@ -2506,12 +2512,14 @@
- 			struct pkg *pkg = n_array_nth (pkgs, i);
- 			gchar *package_id;
- 			gchar *path;
-+			gchar *to_strv[] = { NULL, NULL };
- 			gchar buf[256];
- 
- 			package_id = package_id_from_pkg (pkg, NULL, PK_FILTER_ENUM_NONE);
- 			path = g_build_filename (destdir, pkg_filename (pkg, buf, sizeof (buf)), NULL);
-+			to_strv[0] = path;
- 
--			pk_backend_job_files (job, package_id, path);
-+			pk_backend_job_files (job, package_id, to_strv);
- 
- 			g_free (package_id);
- 			g_free (path);
-@@ -2670,19 +2678,15 @@
- 
- 		if (pkg != NULL) {
- 			struct pkgflist *flist = pkg_get_flist (pkg);
--			GString *filelist;
--			gchar *result;
--			const gchar *sep;
-+			GPtrArray *files;
- 			gint i, j;
- 
--			sep = "";
--
- 			if (flist == NULL) {
- 				pkg_free (pkg);
- 				continue;
- 			}
- 
--			filelist = g_string_new ("");
-+			files = g_ptr_array_new_with_free_func(g_free);
- 
- 			for (i = 0; i < n_tuple_size (flist->fl); i++) {
- 				struct pkgfl_ent *flent = n_tuple_nth (flist->fl, i);
-@@ -2692,22 +2696,20 @@
- 
- 				for (j = 0; j < flent->items; j++) {
- 					struct flfile *f = flent->files[j];
-+					gchar *fname;
- 
- 					if (strcmp (dirname, "/") == 0)
--						g_string_append_printf (filelist, "%s/%s", sep, f->basename);
-+						fname = g_strdup_printf("/%s", f->basename);
- 					else
--						g_string_append_printf (filelist, "%s%s/%s", sep, dirname, f->basename);
--
--					sep = ";";
-+						fname = g_strdup_printf("%s/%s", dirname, f->basename);
-+					g_ptr_array_add (files, fname);
- 				}
- 				g_free (dirname);
- 			}
- 
--			result = g_string_free (filelist, FALSE);
--
--			pk_backend_job_files (job, package_ids[n], result);
--
--			g_free (result);
-+			g_ptr_array_add(files, NULL);
-+			pk_backend_job_files (job, package_ids[n], (gchar**)files->pdata);
-+			g_ptr_array_unref (files);
- 
- 			pkg_free (pkg);
- 		}
-@@ -3081,7 +3083,7 @@
- 
- 	pk_backend_job_set_status (job, PK_STATUS_ENUM_DEP_RESOLVE);
- 
--	if (execute_command (command)) {
-+	if (execute_command ("%s", command)) {
- 		pb_error_check (job);
- 	} else {
- 		pb_error_show (job, PK_ERROR_ENUM_TRANSACTION_ERROR);
-@@ -3221,8 +3223,8 @@
- 
- 	pk_backend_job_set_status (job, PK_STATUS_ENUM_DEP_RESOLVE);
- 
--	if (execute_command (command) == FALSE) {
--		pk_backend_job_error_code (job, PK_ERROR_ENUM_CANNOT_REMOVE_SYSTEM_PACKAGE, pberror->tslog->str);
-+	if (execute_command ("%s", command) == FALSE) {
-+		pk_backend_job_error_code (job, PK_ERROR_ENUM_CANNOT_REMOVE_SYSTEM_PACKAGE, "%s", pberror->tslog->str);
- 	}
- 
- 	g_free (command);
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/PackageKit.git/commitdiff/53810c7cca39386314a804e6491810c2661cbd8e



More information about the pld-cvs-commit mailing list