diff --git a/.PackageKit.metadata b/.PackageKit.metadata index b233f4b..ec1dfad 100644 --- a/.PackageKit.metadata +++ b/.PackageKit.metadata @@ -1 +1 @@ -d69ee5f4429b6b315f259712adc43e0b081e4f5b SOURCES/PackageKit-0.8.9.tar.xz +89c621deb26f214158cec0d3d39036aa2137a8fa SOURCES/PackageKit-1.0.7.tar.xz diff --git a/.gitignore b/.gitignore index 3e9f25f..cef5294 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/PackageKit-0.8.9.tar.xz +SOURCES/PackageKit-1.0.7.tar.xz diff --git a/SOURCES/0001-Do-not-install-into-python_sitelib.patch b/SOURCES/0001-Do-not-install-into-python_sitelib.patch deleted file mode 100644 index ae7fa93..0000000 --- a/SOURCES/0001-Do-not-install-into-python_sitelib.patch +++ /dev/null @@ -1,33 +0,0 @@ -From fae22c2f1bf5d40b0ba5cb47f597daaf3ed4ae6b Mon Sep 17 00:00:00 2001 -From: Richard Hughes -Date: Mon, 17 Mar 2014 19:35:04 +0000 -Subject: [PATCH] Do not install into python_sitelib - -The .pyc and .pyo files are actually architecture specific and this causes -PackageKit to fail the RHEL multilib self tests. ---- - configure.ac | 11 +++++++++-- - contrib/PackageKit.spec.in | 5 +++-- - 2 files changed, 12 insertions(+), 4 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 68ce26a..8cdabd7 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -91,8 +91,14 @@ if test x$enable_python3 = xyes; then - else - AM_PATH_PYTHON([2.7]) - fi -- --PYTHON_PACKAGE_DIR=${pythondir}/packagekit -+AC_ARG_WITH([python_package_dir], -+ AS_HELP_STRING([--with-python-package-dir=], -+ [Location for python modules])) -+if test -z "$with_python_package_dir" ; then -+ PYTHON_PACKAGE_DIR=${pythondir}/packagekit -+else -+ PYTHON_PACKAGE_DIR=${with_python_package_dir}/packagekit -+fi - AC_SUBST(PYTHON_PACKAGE_DIR) - - if test "$GCC" = "yes"; then diff --git a/SOURCES/0001-yum-Add-support-for-GetDetailsLocal.patch b/SOURCES/0001-yum-Add-support-for-GetDetailsLocal.patch new file mode 100644 index 0000000..4678b59 --- /dev/null +++ b/SOURCES/0001-yum-Add-support-for-GetDetailsLocal.patch @@ -0,0 +1,146 @@ +From a15ce85d03ba9babc2cbe100204c12f08500134c Mon Sep 17 00:00:00 2001 +From: Richard Hughes +Date: Wed, 5 Aug 2015 17:24:03 +0100 +Subject: [PATCH] yum: Add support for GetDetailsLocal + +Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1249998 +--- + backends/yum/pk-backend-yum.c | 15 +++++++++++++++ + backends/yum/yumBackend.py | 29 +++++++++++++++++++++++++++-- + client/pk-console.c | 10 ++++++++++ + lib/python/packagekit/backend.py | 11 +++++++++++ + 4 files changed, 63 insertions(+), 2 deletions(-) + +diff --git a/backends/yum/pk-backend-yum.c b/backends/yum/pk-backend-yum.c +index 5e9da25..c4b714f 100644 +--- a/backends/yum/pk-backend-yum.c ++++ b/backends/yum/pk-backend-yum.c +@@ -355,6 +355,7 @@ pk_backend_get_roles (PkBackend *backend) + PK_ROLE_ENUM_CANCEL, + PK_ROLE_ENUM_DEPENDS_ON, + PK_ROLE_ENUM_GET_DETAILS, ++ PK_ROLE_ENUM_GET_DETAILS_LOCAL, + PK_ROLE_ENUM_GET_FILES, + PK_ROLE_ENUM_REQUIRED_BY, + PK_ROLE_ENUM_GET_PACKAGES, +@@ -450,6 +451,20 @@ pk_backend_get_details (PkBackend *backend, PkBackendJob *job, gchar **package_i + } + + /** ++ * pk_backend_get_details_local: ++ */ ++void ++pk_backend_get_details_local (PkBackend *backend, PkBackendJob *job, gchar **filenames) ++{ ++ _cleanup_free_ gchar *tmp = NULL; ++ tmp = pk_package_ids_to_string (filenames); ++ pk_backend_spawn_helper (priv->spawn, job, ++ "yumBackend.py", ++ "get-details-local", ++ tmp, NULL); ++} ++ ++/** + * pk_backend_get_distro_upgrades: + */ + void +diff --git a/backends/yum/yumBackend.py b/backends/yum/yumBackend.py +index f097034..a0b2132 100755 +--- a/backends/yum/yumBackend.py ++++ b/backends/yum/yumBackend.py +@@ -2476,7 +2476,32 @@ class PackageKitYumBackend(PackageKitBaseBackend, PackagekitPackage): + self.message('COULD_NOT_FIND_PACKAGE', 'Package %s was not found' % _format_package_id(package_id)) + continue + +- def _show_details_pkg(self, pkg): ++ def get_details_local(self, files): ++ ''' ++ Print a detailed details for a given file ++ ''' ++ try: ++ self._check_init(lazy_cache=True) ++ except PkError, e: ++ self.error(e.code, e.details, exit=False) ++ return ++ self.yumbase.conf.cache = 0 # Allow new files ++ self.allow_cancel(True) ++ self.percentage(None) ++ self.status(STATUS_INFO) ++ for f in files: ++ try: ++ pkg = YumLocalPackage(ts=self.yumbase.rpmdb.readOnlyTS(), filename=f) ++ except PkError, e: ++ if e.code == ERROR_PACKAGE_NOT_FOUND: ++ self.message('COULD_NOT_FIND_PACKAGE', e.details) ++ continue ++ self.error(e.code, e.details, exit=True) ++ return ++ if pkg: ++ self._show_details_pkg(pkg, False) ++ ++ def _show_details_pkg(self, pkg, verify_local=True): + + pkgver = _get_package_ver(pkg) + package_id = self.get_package_id(pkg.name, pkgver, pkg.arch, pkg.repo) +@@ -2494,7 +2519,7 @@ class PackageKitYumBackend(PackageKitBaseBackend, PackagekitPackage): + + # if we are remote and in the cache, our size is zero + size = pkg.size +- if not pkg.repo.id.startswith('installed') and pkg.verifyLocalPkg(): ++ if verify_local and not pkg.repo.id.startswith('installed') and pkg.verifyLocalPkg(): + size = 0 + + group = self.comps.get_group(pkg.name) +diff --git a/client/pk-console.c b/client/pk-console.c +index 203458e..52bbb65 100644 +--- a/client/pk-console.c ++++ b/client/pk-console.c +@@ -1282,6 +1282,16 @@ pk_console_get_details (PkConsoleCtx *ctx, gchar **packages, GError **error) + _cleanup_error_free_ GError *error_local = NULL; + _cleanup_strv_free_ gchar **package_ids = NULL; + ++ /* local file */ ++ if (g_file_test (packages[0], G_FILE_TEST_EXISTS)) { ++ pk_client_get_details_local_async (PK_CLIENT (ctx->task), ++ packages, ++ ctx->cancellable, ++ pk_console_progress_cb, ctx, ++ pk_console_finished_cb, ctx); ++ return TRUE; ++ } ++ + package_ids = pk_console_resolve_packages (ctx, packages, &error_local); + if (package_ids == NULL) { + g_set_error (error, +diff --git a/lib/python/packagekit/backend.py b/lib/python/packagekit/backend.py +index 4b9eedc..9ff693d 100644 +--- a/lib/python/packagekit/backend.py ++++ b/lib/python/packagekit/backend.py +@@ -467,6 +467,13 @@ class PackageKitBaseBackend: + ''' + self.error(ERROR_NOT_SUPPORTED, "This function is not implemented in this backend", exit=False) + ++ def get_details_local(self, files): ++ ''' ++ Implement the {backend}-get-details-local functionality ++ Needed to be implemented in a sub class ++ ''' ++ self.error(ERROR_NOT_SUPPORTED, "This function is not implemented in this backend", exit=False) ++ + def get_files(self, package_ids): + ''' + Implement the {backend}-get-files functionality +@@ -581,6 +588,10 @@ class PackageKitBaseBackend: + package_ids = args[0].split(PACKAGE_IDS_DELIM) + self.get_details(package_ids) + self.finished() ++ elif cmd == 'get-details-local': ++ files = args[0].split(PACKAGE_IDS_DELIM) ++ self.get_details_local(files) ++ self.finished() + elif cmd == 'get-files': + package_ids = args[0].split(PACKAGE_IDS_DELIM) + self.get_files(package_ids) +-- +2.4.3 + diff --git a/SOURCES/0001-yum-Record-the-UID-of-the-session-user-in-the-yumdb.patch b/SOURCES/0001-yum-Record-the-UID-of-the-session-user-in-the-yumdb.patch new file mode 100644 index 0000000..d4c3ce6 --- /dev/null +++ b/SOURCES/0001-yum-Record-the-UID-of-the-session-user-in-the-yumdb.patch @@ -0,0 +1,193 @@ +From dec0fe1bef1424edc80902234d9730f66a586a07 Mon Sep 17 00:00:00 2001 +From: Richard Hughes +Date: Tue, 28 Jul 2015 16:49:10 +0100 +Subject: [PATCH] yum: Record the UID of the session user in the yumdb + +--- + backends/yum/yumBackend.py | 9 +++++++++ + lib/python/packagekit/backend.py | 7 +++++++ + src/pk-backend-spawn.c | 6 ++++++ + 3 files changed, 22 insertions(+) + +diff --git a/backends/yum/yumBackend.py b/backends/yum/yumBackend.py +index 030f965..f097034 100755 +--- a/backends/yum/yumBackend.py ++++ b/backends/yum/yumBackend.py +@@ -2299,6 +2299,12 @@ class PackageKitYumBackend(PackageKitBaseBackend, PackagekitPackage): + self.percentage(100) + return + ++ # this is set to the calling using to avoid reading /proc/self/loginuid ++ # and always returning '0' for the pacakgekitd user. ++ # ++ # Yes, it's global. No, I don't think that's a wise design choice. ++ _cached_getloginuid = self.uid ++ + try: + rpmDisplay = PackageKitCallback(self) + callback = ProcessTransPackageKitCallback(self) +@@ -2339,6 +2345,9 @@ class PackageKitYumBackend(PackageKitBaseBackend, PackagekitPackage): + except Exception, e: + raise PkError(ERROR_INTERNAL_ERROR, _format_str(traceback.format_exc())) + ++ # do a mostly pointless verification just to write the yumdb entries ++ self.yumbase.verifyTransaction() ++ + def remove_packages(self, transaction_flags, package_ids, allowdep, autoremove): + ''' + Implement the remove functionality +diff --git a/lib/python/packagekit/backend.py b/lib/python/packagekit/backend.py +index 7df664e..4b9eedc 100644 +--- a/lib/python/packagekit/backend.py ++++ b/lib/python/packagekit/backend.py +@@ -62,6 +62,7 @@ class PackageKitBaseBackend: + self._locked = False + self.lang = "C" + self.has_network = False ++ self.uid = 0 + self.background = False + self.interactive = False + self.cache_age = 0 +@@ -80,6 +81,12 @@ class PackageKitBaseBackend: + except KeyError as e: + print("Error: No NETWORK envp") + ++ # try to get UID of running user ++ try: ++ self.uid = int(os.environ['UID']) ++ except KeyError as e: ++ print("Error: No UID envp") ++ + # try to get BACKGROUND state + try: + if os.environ['BACKGROUND'] == 'TRUE': +diff --git a/src/pk-backend-spawn.c b/src/pk-backend-spawn.c +index 9d52957..3b1a571 100644 +--- a/src/pk-backend-spawn.c ++++ b/src/pk-backend-spawn.c +@@ -782,6 +782,12 @@ pk_backend_spawn_get_envp (PkBackendSpawn *backend_spawn) + ret = pk_backend_job_get_interactive (priv->job); + g_hash_table_replace (env_table, g_strdup ("INTERACTIVE"), g_strdup (ret ? "TRUE" : "FALSE")); + ++ /* UID */ ++ ret = pk_backend_job_get_interactive (priv->job); ++ g_hash_table_replace (env_table, ++ g_strdup ("UID"), ++ g_strdup_printf ("%u", pk_backend_job_get_uid (priv->job))); ++ + /* CACHE_AGE */ + cache_age = pk_backend_job_get_cache_age (priv->job); + if (cache_age == G_MAXUINT) { +-- +2.4.3 + +commit 3afec0a55d362ee692da0731d8205cd7372efe36 +Author: Richard Hughes +Date: Tue Jul 28 16:48:43 2015 +0100 + + hif: Record the UID of the session user in the yumdb + +diff --git a/backends/hif/pk-backend-hif.c b/backends/hif/pk-backend-hif.c +index 7fcfdff..506f6b3 100644 +--- a/backends/hif/pk-backend-hif.c ++++ b/backends/hif/pk-backend-hif.c +@@ -404,6 +404,8 @@ pk_backend_start_job (PkBackend *backend, PkBackendJob *job) + job_data->transaction = hif_transaction_new (priv->context); + hif_transaction_set_sources (job_data->transaction, + hif_context_get_sources (priv->context)); ++ hif_transaction_set_uid (job_data->transaction, ++ pk_backend_job_get_uid (job)); + + #ifdef PK_BUILD_LOCAL + /* we don't want to enable this for normal runtime */ +commit c5c0db1bb5577244a7644eb513751be333705996 +Author: Richard Hughes +Date: Tue Jul 28 15:00:31 2015 +0100 + + yum: Remove the obsolete service pack support + +diff --git a/backends/yum/yumBackend.py b/backends/yum/yumBackend.py +index 5e0c978..030f965 100755 +--- a/backends/yum/yumBackend.py ++++ b/backends/yum/yumBackend.py +@@ -2008,80 +2008,14 @@ class PackageKitYumBackend(PackageKitBaseBackend, PackagekitPackage): + + # process these first + tempdir = tempfile.mkdtemp() +- inst_packs = [] + + for inst_file in inst_files: + if inst_file.endswith('.rpm'): + continue +- elif inst_file.endswith('.servicepack'): +- inst_packs.append(inst_file) + else: + self.error(ERROR_INVALID_PACKAGE_FILE, 'Only rpm files and packs are supported', exit=False) + return + +- # decompress and add the contents of any .servicepack files +- for inst_pack in inst_packs: +- inst_files.remove(inst_pack) +- pack = tarfile.TarFile(name = inst_pack, mode = "r") +- members = pack.getnames() +- for mem in members: +- pack.extract(mem, path = tempdir) +- files = os.listdir(tempdir) +- +- # find the metadata file +- packtype = 'unknown' +- for fn in files: +- if fn == "metadata.conf": +- config = ConfigParser.ConfigParser() +- config.read(os.path.join(tempdir, fn)) +- if config.has_option('PackageKit Service Pack', 'type'): +- packtype = config.get('PackageKit Service Pack', 'type') +- break +- +- # we only support update and install +- if packtype != 'install' and packtype != 'update': +- self.error(ERROR_INVALID_PACKAGE_FILE, 'no support for type %s' % packtype, exit=False) +- return +- +- # add the file if it's an install, or update if installed +- for fn in files: +- if fn.endswith('.rpm'): +- inst_file = os.path.join(tempdir, fn) +- try: +- # read the file +- pkg = YumLocalPackage(ts=self.yumbase.rpmdb.readOnlyTS(), filename=inst_file) +- pkgs_local = self.yumbase.rpmdb.searchNevra(name=pkg.name) +- except yum.Errors.MiscError: +- self.error(ERROR_INVALID_PACKAGE_FILE, "%s does not appear to be a valid package." % inst_file) +- except yum.Errors.YumBaseError, e: +- self.error(ERROR_INVALID_PACKAGE_FILE, 'Package could not be decompressed') +- except exceptions.IOError, e: +- self.error(ERROR_NO_SPACE_ON_DEVICE, "Disk error: %s" % _to_unicode(e)) +- except: +- self.error(ERROR_UNKNOWN, "Failed to open local file -- please report") +- else: +- # trying to install package that already exists +- if len(pkgs_local) == 1 and pkgs_local[0].EVR == pkg.EVR: +- self.message('PACKAGE_ALREADY_INSTALLED', '%s is already installed and the latest version' % pkg.name) +- +- # trying to install package older than already exists +- elif len(pkgs_local) == 1 and pkgs_local[0].EVR > pkg.EVR: +- self.message('PACKAGE_ALREADY_INSTALLED', 'a newer version of %s is already installed' % pkg.name) +- +- # only update if installed +- elif packtype == 'update': +- if len(pkgs_local) > 0: +- inst_files.append(inst_file) +- +- # only install if we passed the checks above +- elif packtype == 'install': +- inst_files.append(inst_file) +- +- if len(inst_files) == 0: +- # More than one pkg to be installed, all of them already installed +- self.error(ERROR_ALL_PACKAGES_ALREADY_INSTALLED, +- 'All of the specified packages have already been installed') +- + self._set_only_trusted(TRANSACTION_FLAG_ONLY_TRUSTED in transaction_flags or TRANSACTION_FLAG_SIMULATE in transaction_flags) + + # self.yumbase.installLocal fails for unsigned packages when self.yumbase.conf.gpgcheck = 1 diff --git a/SOURCES/CentOS-Vendor-Branding.patch b/SOURCES/CentOS-Vendor-Branding.patch deleted file mode 100644 index a8bc0aa..0000000 --- a/SOURCES/CentOS-Vendor-Branding.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 0e23e68169fbc5e9ec58af6cc538b902be9123d4 Mon Sep 17 00:00:00 2001 -From: Jim Perrin -Date: Thu, 19 Jun 2014 22:09:35 -0500 -Subject: [PATCH] CentOS Vendor Branding - ---- - etc/Vendor.conf | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/etc/Vendor.conf b/etc/Vendor.conf -index 69f7337..ebcce99 100644 ---- a/etc/Vendor.conf -+++ b/etc/Vendor.conf -@@ -54,9 +54,9 @@ MimeUrl=none - # The vendor name shown for the 'vendor' group - # - # default=My Vendor --VendorName=My Vendor -+VendorName=CentOS - - # The vendor icon name shown for the 'vendor' group - # - # default=emblem-favorite --VendorIcon=emblem-favorite -+VendorIcon=fedora-logo-small --- -1.8.3.1 - diff --git a/SOURCES/PackageKit-0.3.8-Fedora-Vendor.conf.patch b/SOURCES/PackageKit-0.3.8-Fedora-Vendor.conf.patch index 8f23ad8..c01865f 100644 --- a/SOURCES/PackageKit-0.3.8-Fedora-Vendor.conf.patch +++ b/SOURCES/PackageKit-0.3.8-Fedora-Vendor.conf.patch @@ -38,23 +38,9 @@ index 69f7337..6c6f772 100644 # The URL which is shown to the user when programs handing a mime tpye could not # be found. It should probably explain how to use wine if the program is a -@@ -47,16 +47,16 @@ FontUrl=none +@@ -47,4 +47,4 @@ FontUrl=none # If the value is set to 'none' then the value of DefaultUrl is used. # # default=none -MimeUrl=none +MimeUrl=https://access.redhat.com/site/solutions/537113#Missing_MIME_Support - - [Groups] - - # The vendor name shown for the 'vendor' group - # - # default=My Vendor --VendorName=My Vendor -+VendorName=Red Hat Enterprise Linux - - # The vendor icon name shown for the 'vendor' group - # - # default=emblem-favorite --VendorIcon=emblem-favorite -+VendorIcon=fedora-logo-small diff --git a/SOURCES/PackageKit-0.4.4-Fedora-turn-off-time.conf.patch b/SOURCES/PackageKit-0.4.4-Fedora-turn-off-time.conf.patch deleted file mode 100644 index 96c2bef..0000000 --- a/SOURCES/PackageKit-0.4.4-Fedora-turn-off-time.conf.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/etc/PackageKit.conf.in b/etc/PackageKit.conf.in -index bc0bea2..67e15f7 100644 ---- a/etc/PackageKit.conf.in -+++ b/etc/PackageKit.conf.in -@@ -27,7 +27,7 @@ UseNetworkHeuristic=true - # enough and will not be set at the very start or end of a transaction. - # - # default=true --UseRemainingTimeEstimation=true -+UseRemainingTimeEstimation=false - - # Shut down the daemon after this many seconds idle. 0 means don't shutdown. - # diff --git a/SOURCES/PackageKit-0.7.4-xulrunner2.patch b/SOURCES/PackageKit-0.7.4-xulrunner2.patch deleted file mode 100644 index fb86fc6..0000000 --- a/SOURCES/PackageKit-0.7.4-xulrunner2.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up PackageKit-0.7.4/configure.ac.xulrunner2 PackageKit-0.7.4/configure.ac ---- PackageKit-0.7.4/configure.ac.xulrunner2 2012-04-24 03:27:24.000000000 -0500 -+++ PackageKit-0.7.4/configure.ac 2012-05-25 09:15:04.170891611 -0500 -@@ -349,7 +349,7 @@ AC_ARG_ENABLE(browser_plugin, AS_HELP_ST - enable_browser_plugin=$enableval,enable_browser_plugin=yes) - if test x$enable_browser_plugin = xyes; then - PKG_CHECK_MODULES(PK_BROWSER_PLUGIN, \ -- mozilla-plugin >= 8.0 \ -+ mozilla-plugin >= 2 \ - gio-unix-2.0 \ - nspr >= 4.8 \ - cairo \ diff --git a/SOURCES/PackageKit-git-fixes.patch b/SOURCES/PackageKit-git-fixes.patch deleted file mode 100644 index bbb8d68..0000000 --- a/SOURCES/PackageKit-git-fixes.patch +++ /dev/null @@ -1,182 +0,0 @@ -commit f25455d2d48d20f6086effe47971ed439cee2cc5 -Author: Richard Hughes -Date: Thu Jun 6 13:10:58 2013 +0100 - - systemd-updates: Do not exit with an error for a race condition - - The daemon plugin pk-plugin-systemd-update deletes the /var/lib/PackageKit/prepared-update - file if any transaction is done that affects the prepared state. - This includes the offline-update process itself. - - If the daemon deletes the file before the pk-offline-update process tries to do - it a warning is shown and the systemd unit fails. - -diff --git a/contrib/systemd-updates/pk-offline-update.c b/contrib/systemd-updates/pk-offline-update.c -index 8678959..7b8d812 100644 ---- a/contrib/systemd-updates/pk-offline-update.c -+++ b/contrib/systemd-updates/pk-offline-update.c -@@ -500,16 +500,20 @@ main (int argc, char *argv[]) - pk_progress_bar_end (progressbar); - pk_offline_update_write_results (results); - -- /* delete prepared-update file */ -+ /* delete prepared-update file if it's not already been done by the -+ * pk-plugin-systemd-update daemon plugin */ - file = g_file_new_for_path (PK_OFFLINE_PREPARED_UPDATE_FILENAME); - ret = g_file_delete (file, NULL, &error); - if (!ret) { -- retval = EXIT_FAILURE; -- g_warning ("failed to delete %s: %s", -- PK_OFFLINE_PREPARED_UPDATE_FILENAME, -- error->message); -- g_error_free (error); -- goto out; -+ if (!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_NOT_FOUND)) { -+ retval = EXIT_FAILURE; -+ g_warning ("failed to delete %s: %s", -+ PK_OFFLINE_PREPARED_UPDATE_FILENAME, -+ error->message); -+ g_error_free (error); -+ goto out; -+ } -+ g_clear_error (&error); - } - - retval = EXIT_SUCCESS; -commit 3eb921f2ddbe94dc5b180522b8aa5a057dd6eac2 -Author: Richard Hughes -Date: Thu May 23 15:06:41 2013 +0100 - - Raise the package process threshold to 5000 - - TeXLive has officially jumped the shark, and it's quite plausible to have > 2500 - updates in one transaction now. - - Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=894731 - -diff --git a/etc/PackageKit.conf.in b/etc/PackageKit.conf.in -index 3440be5..c09c8d2 100644 ---- a/etc/PackageKit.conf.in -+++ b/etc/PackageKit.conf.in -@@ -228,8 +228,8 @@ MaximumItemsToResolve=1200 - # Setting this lower decreases the risk of a local denial of service, but may - # cause errors if the desktop client is trying to do a large transaction. - # --# default=2500 --MaximumPackagesToProcess=2500 -+# default=5000 -+MaximumPackagesToProcess=5000 - - # How long the transaction is valid before it's destroyed, in seconds - # -commit cac9936e0950831905039c25f4b8e25ee4db3ce1 -Author: Richard Hughes -Date: Thu Jun 13 13:05:07 2013 +0100 - - yum: Use yb.downloadPkgs() to download updates - - There were two bugs here: - - - Using repo.getPackage() did not check the package checksum, only the size, - so it was possible to download a corrupt package and then not be able to - apply the updates - - - By restricting to TS_UPDATE and TS_INSTALL we were ignoring any package that - was obsoleting another which could miss out packages. - - Many thanks to Zdenek Pavlas for all the help in finding these issues. - - Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=968936 - -diff --git a/backends/yum/yumBackend.py b/backends/yum/yumBackend.py -index 289f10f..49a0f7b 100755 ---- a/backends/yum/yumBackend.py -+++ b/backends/yum/yumBackend.py -@@ -2365,22 +2365,16 @@ class PackageKitYumBackend(PackageKitBaseBackend, PackagekitPackage): - self.percentage(100) - return - -+ # just download packages ready for the actual transaction - if TRANSACTION_FLAG_ONLY_DOWNLOAD in transaction_flags: -- package_list = [] - for txmbr in self.yumbase.tsInfo: -- if txmbr.output_state in (TS_UPDATE, TS_INSTALL): -- self._show_package(txmbr.po, INFO_DOWNLOADING) -- repo = self.yumbase.repos.getRepo(txmbr.po.repoid) -+ if txmbr.output_state in TS_INSTALL_STATES: - try: -- path = repo.getPackage(txmbr.po) -- except yum.Errors.RepoError, e: -- self.error(ERROR_PACKAGE_DOWNLOAD_FAILED, "Cannot download file: %s" % _to_unicode(e), exit=False) -- return -- except IOError, e: -- self.error(ERROR_PACKAGE_DOWNLOAD_FAILED, "Cannot write to file: %s" % _to_unicode(e), exit=False) -- return -+ self._show_package(txmbr.po, INFO_DOWNLOADING) -+ self.yumbase.downloadPkgs([txmbr.po]) - except Exception, e: -- raise PkError(ERROR_INTERNAL_ERROR, _format_str(traceback.format_exc())) -+ self.error(ERROR_PACKAGE_DOWNLOAD_FAILED, "Cannot download packages: %s" % _to_unicode(e), exit=False) -+ return - self.percentage(100) - return - -From b78af414daf2176aac74540039b341a3e4e49412 Mon Sep 17 00:00:00 2001 -From: Richard Hughes -Date: Tue, 28 May 2013 14:34:59 +0100 -Subject: [PATCH] Allow local active users in the wheel group to install signed - packages without a password - ---- - contrib/PackageKit.spec.in | 1 + - policy/Makefile.am | 5 +++++ - policy/org.freedesktop.packagekit.policy.in | 2 +- - policy/org.freedesktop.packagekit.rules | 7 +++++++ - 4 files changed, 14 insertions(+), 1 deletion(-) - create mode 100644 policy/org.freedesktop.packagekit.rules - -diff --git a/policy/Makefile.am b/policy/Makefile.am -index ebb7808..6babe33 100644 ---- a/policy/Makefile.am -+++ b/policy/Makefile.am -@@ -2,6 +2,11 @@ - NULL = - - if SECURITY_TYPE_POLKIT -+polkit_rulesdir = $(datadir)/polkit-1/rules.d -+dist_polkit_rules_DATA = \ -+ org.freedesktop.packagekit.rules \ -+ $(NULL) -+ - polkit_policydir = $(datadir)/polkit-1/actions - dist_polkit_policy_DATA = \ - org.freedesktop.packagekit.policy \ -diff --git a/policy/org.freedesktop.packagekit.policy.in b/policy/org.freedesktop.packagekit.policy.in -index 28ab3b1..19cdd20 100644 ---- a/policy/org.freedesktop.packagekit.policy.in -+++ b/policy/org.freedesktop.packagekit.policy.in -@@ -42,7 +42,7 @@ - - no - no -- yes -+ auth_admin_keep - - - -diff --git a/policy/org.freedesktop.packagekit.rules b/policy/org.freedesktop.packagekit.rules -new file mode 100644 -index 0000000..6a1c8a7 ---- /dev/null -+++ b/policy/org.freedesktop.packagekit.rules -@@ -0,0 +1,7 @@ -+polkit.addRule(function(action, subject) { -+ if (action.id == "org.freedesktop.packagekit.package-install" && -+ subject.active == true && subject.local == true && -+ subject.isInGroup("wheel")) { -+ return polkit.Result.YES; -+ } -+}); --- -1.8.2.1 - diff --git a/SPECS/PackageKit.spec b/SPECS/PackageKit.spec index e1e9277..53496e7 100644 --- a/SPECS/PackageKit.spec +++ b/SPECS/PackageKit.spec @@ -5,36 +5,29 @@ Summary: Package management service Name: PackageKit -Version: 0.8.9 -Release: 11%{?dist} +Version: 1.0.7 +Release: 5%{?dist} License: GPLv2+ and LGPLv2+ -URL: http://www.packagekit.org -Source0: http://www.packagekit.org/releases/%{name}-%{version}.tar.xz +URL: http://www.freedesktop.org/software/PackageKit/ +Source0: http://www.freedesktop.org/software/PackageKit/releases/%{name}-%{version}.tar.xz -# CentOS-specific: set Vendor.conf up for CentOS -Patch0: CentOS-Vendor-Branding.patch +# Fedora-specific: set Vendor.conf up for Fedora. +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 +# Backported from upstream; record the session UID in the yumdb +Patch1: 0001-yum-Record-the-UID-of-the-session-user-in-the-yumdb.patch -# Upstreamable? allow use of xulrunner2 for browser-plugin support -Patch4: PackageKit-0.7.4-xulrunner2.patch - -# Upstream already -Patch5: 0001-Do-not-install-into-python_sitelib.patch - -# Upstream already -Patch99: PackageKit-git-fixes.patch +# Backported from upstream; support getting details from local files +Patch2: 0001-yum-Add-support-for-GetDetailsLocal.patch Requires: %{name}-glib%{?_isa} = %{version}-%{release} Requires: PackageKit-backend Requires: shared-mime-info -Requires: comps-extras Requires: systemd -# required by patch4 +# required for configure.ac patching BuildRequires: automake gtk-doc libtool -BuildRequires: glib2-devel >= 2.16.1 +BuildRequires: glib2-devel >= 2.32.0 BuildRequires: dbus-devel >= 1.1.1 BuildRequires: dbus-glib-devel >= 0.74 BuildRequires: pam-devel @@ -57,15 +50,15 @@ BuildRequires: gettext BuildRequires: libgudev1-devel BuildRequires: xulrunner-devel BuildRequires: libarchive-devel -BuildRequires: gstreamer-devel -BuildRequires: gstreamer-plugins-base-devel +BuildRequires: gstreamer1-devel +BuildRequires: gstreamer1-plugins-base-devel BuildRequires: pango-devel -BuildRequires: pm-utils-devel BuildRequires: fontconfig-devel BuildRequires: systemd-devel BuildRequires: gobject-introspection-devel +BuildRequires: libhif-devel +BuildRequires: libappstream-glib-devel %if !0%{?rhel} -BuildRequires: zif-devel >= 0.2.5 BuildRequires: bash-completion %endif @@ -76,6 +69,16 @@ Obsoletes: udev-packagekit < %{version}-%{release} # No more GTK+-2 plugin Obsoletes: PackageKit-gtk-module < %{version}-%{release} +# components now built-in +Obsoletes: PackageKit-debug-install < 0.9.1 +Obsoletes: PackageKit-backend-devel < 0.9.6 +Provides: PackageKit-debug-install = %{version}-%{release} +Provides: PackageKit-device-rebind = %{version}-%{release} + +# Udev no longer provides this functionality +Provides: PackageKit-device-rebind = %{version}-%{release} +Obsoletes: PackageKit-device-rebind < 0.8.13-2 + %description PackageKit is a D-Bus abstraction layer that allows the session user to manage packages in a secure way using a cross-distro, @@ -83,7 +86,6 @@ cross-architecture API. %package yum Summary: PackageKit YUM backend -Group: System Environment/Libraries Requires: yum >= 3.4.3-45 # python(gio) Requires: pygobject2 @@ -93,41 +95,8 @@ Provides: PackageKit-backend %description yum A backend for PackageKit to enable yum functionality. -%if 0%{?rhel} == 0 -%package zif -Summary: PackageKit Zif backend -Group: System Environment/Libraries -Requires: zif >= 0.2.5 -Requires: %{name}%{?_isa} = %{version}-%{release} -Provides: PackageKit-backend - -%description zif -A backend for PackageKit to enable Zif functionality. -%endif - -%if 0%{?rhel} == 0 -%package smart -Summary: PackageKit SMART backend -Group: System Environment/Libraries -Requires: smart -Requires: %{name}%{?_isa} = %{version}-%{release} - -%description smart -A backend for PackageKit to enable SMART functionality. -%endif - -%package docs -Summary: Documentation for PackageKit -Group: Development/Libraries -Requires: %{name} = %{version}-%{release} -BuildArch: noarch - -%description docs -API docs for PackageKit. - %package yum-plugin Summary: Tell PackageKit to check for updates when yum exits -Group: System Environment/Base Requires: yum >= 3.0 Requires: %{name}%{?_isa} = %{version}-%{release} Requires: dbus-python @@ -138,9 +107,16 @@ PackageKit-yum-plugin tells PackageKit to check for updates when yum exits. This way, if you run 'yum update' and install all available updates, puplet will almost instantly update itself to reflect this. +%package hif +Summary: PackageKit Hif backend +Requires: %{name}%{?_isa} = %{version}-%{release} +Provides: PackageKit-backend + +%description hif +A backend for PackageKit to enable hawkey and libsolv functionality. + %package glib Summary: GLib libraries for accessing PackageKit -Group: Development/Libraries Requires: dbus >= 1.1.1 Requires: gobject-introspection Obsoletes: PackageKit-libs < %{version}-%{release} @@ -151,45 +127,27 @@ GLib libraries for accessing PackageKit. %package cron Summary: Cron job and related utilities for PackageKit -Group: System Environment/Base -Requires: cronie +Requires: crontabs Requires: %{name}%{?_isa} = %{version}-%{release} %description cron Crontab and utilities for running PackageKit as a cron job. -%package debug-install -Summary: Facility to install debugging packages using PackageKit -Group: System Environment/Base -Requires: %{name}%{?_isa} = %{version}-%{release} -Obsoletes: PackageKit-debuginfo-install <= 0.5.2-0.1.20090902git.fc12 - -%description debug-install -Provides facility to install debugging packages using PackageKit. - %package glib-devel Summary: GLib Libraries and headers for PackageKit -Group: Development/Libraries Requires: %{name}-glib%{?_isa} = %{version}-%{release} -Requires: dbus-devel >= 1.1.1 -Requires: sqlite-devel +Requires: dbus-devel%{?_isa} >= 1.1.1 +Requires: sqlite-devel%{?_isa} Obsoletes: PackageKit-devel < %{version}-%{release} Provides: PackageKit-devel = %{version}-%{release} +Obsoletes: PackageKit-docs < %{version}-%{release} +Provides: PackageKit-docs = %{version}-%{release} %description glib-devel GLib headers and libraries for PackageKit. -%package backend-devel -Summary: Headers to compile out of tree PackageKit backends -Group: Development/Libraries -Requires: %{name}%{?_isa} = %{version}-%{release} - -%description backend-devel -Headers to compile out of tree PackageKit backends. - %package browser-plugin Summary: Browser Plugin for PackageKit -Group: Development/Libraries Requires: gtk2 Requires: %{name}-glib%{?_isa} = %{version}-%{release} Requires: mozilla-filesystem @@ -201,8 +159,6 @@ using PackageKit. %package gstreamer-plugin Summary: Install GStreamer codecs using PackageKit -Group: Development/Libraries -Requires: gstreamer Requires: %{name}-glib%{?_isa} = %{version}-%{release} Obsoletes: codeina < 0.10.1-10 Provides: codeina = 0.10.1-10 @@ -213,7 +169,6 @@ codecs from configured repositories using PackageKit. %package gtk3-module Summary: Install fonts automatically using PackageKit -Group: Development/Libraries Requires: pango Requires: %{name}-glib%{?_isa} = %{version}-%{release} @@ -223,7 +178,6 @@ fonts from configured repositories using PackageKit. %package command-not-found Summary: Ask the user to install command line programs automatically -Group: Development/Libraries Requires: bash Requires: %{name}-glib%{?_isa} = %{version}-%{release} @@ -231,23 +185,11 @@ Requires: %{name}-glib%{?_isa} = %{version}-%{release} A simple helper that offers to install new packages on the command line using PackageKit. -%package device-rebind -Summary: Device rebind functionality for PackageKit -Group: Development/Libraries -Requires: %{name}-glib%{?_isa} = %{version}-%{release} - -%description device-rebind -The device rebind functionality offer the ability to re-initialize devices -after firmware has been installed by PackageKit. This removes the need for the -user to restart the computer or remove and re-insert the device. - %prep %setup -q -%patch0 -p1 -b .centos -%patch1 -p1 -b .no-time -%patch4 -p1 -b .xulrunner2 -%patch5 -p1 -b .python_sitelib -%patch99 -p1 -b .git +%patch0 -p1 -b .fedora +%patch1 -p1 -b .yumdb +%patch2 -p1 -b .yumdetailslocal NOCONFIGURE=1 ./autogen.sh @@ -255,19 +197,18 @@ NOCONFIGURE=1 ./autogen.sh %configure \ --disable-static \ --enable-yum \ - --disable-bash-completion \ -%if 0%{?rhel} == 0 - --enable-zif \ - --enable-smart \ + --enable-hif \ + --disable-python3 \ --enable-introspection \ + --with-python-package-dir=%{python_sitelib} \ +%if 0%{?rhel} == 0 --enable-bash-completion \ +%else + --disable-bash-completion \ %endif --with-default-backend=auto \ - --with-python-package-dir=%{python_sitearch} \ --disable-local \ - --disable-strict \ - --disable-silent-rules \ - --disable-tests + --disable-silent-rules make %{?_smp_mflags} V=1 @@ -276,7 +217,6 @@ make install DESTDIR=$RPM_BUILD_ROOT rm -f $RPM_BUILD_ROOT%{_libdir}/libpackagekit*.la rm -f $RPM_BUILD_ROOT%{_libdir}/packagekit-backend/*.la -rm -f $RPM_BUILD_ROOT%{_libdir}/packagekit-plugins/*.la rm -f $RPM_BUILD_ROOT%{_libdir}/mozilla/plugins/packagekit-plugin.la rm -f $RPM_BUILD_ROOT%{_libdir}/gtk-2.0/modules/*.la rm -f $RPM_BUILD_ROOT%{_libdir}/gtk-3.0/modules/*.la @@ -300,32 +240,26 @@ popd > /dev/null %find_lang %name %post -update-mime-database %{_datadir}/mime &> /dev/null || : -systemctl enable packagekit-offline-update.service &> /dev/null || : - -%postun -update-mime-database %{_datadir}/mime &> /dev/null || : +# Remove leftover symlinks from /etc/systemd; the offline update service is +# instead now hooked into /usr/lib/systemd/system/system-update.target.wants +systemctl disable packagekit-offline-update.service > /dev/null 2>&1 || : %post glib -p /sbin/ldconfig %postun glib -p /sbin/ldconfig %files -f %{name}.lang -%defattr(-,root,root,-) %doc README AUTHORS NEWS COPYING %dir %{_datadir}/PackageKit %dir %{_datadir}/PackageKit/helpers %dir %{_sysconfdir}/PackageKit -%dir %{_sysconfdir}/PackageKit/events -%dir %{_sysconfdir}/PackageKit/events/post-transaction.d -%dir %{_sysconfdir}/PackageKit/events/pre-transaction.d -%{_sysconfdir}/PackageKit/events/*.d/README %dir %{_localstatedir}/lib/PackageKit -%dir %{python_sitearch}/packagekit +%dir %{python_sitelib}/packagekit %dir %{_localstatedir}/cache/PackageKit %ghost %verify(not md5 size mtime) %{_localstatedir}/cache/PackageKit/groups.sqlite %dir %{_localstatedir}/cache/PackageKit/downloads -%{python_sitearch}/packagekit/*py* +%dir %{_localstatedir}/cache/PackageKit/metadata +%{python_sitelib}/packagekit/*py* %if !0%{?rhel} %{_datadir}/bash-completion/completions/pkcon %endif @@ -338,123 +272,106 @@ update-mime-database %{_datadir}/mime &> /dev/null || : %{_datadir}/PackageKit/helpers/test_spawn/* %{_datadir}/man/man1/pkcon.1.gz %{_datadir}/man/man1/pkmon.1.gz -%{_datadir}/man/man1/pkgenpack.1.gz %{_datadir}/polkit-1/actions/*.policy %{_datadir}/polkit-1/rules.d/* -%{_datadir}/mime/packages/packagekit-*.xml %{_datadir}/PackageKit/pk-upgrade-distro.sh %{_libexecdir}/packagekitd -%{_libexecdir}/pk-trigger-offline-update +%{_libexecdir}/packagekit-direct %{_bindir}/pkmon %{_bindir}/pkcon -%{_bindir}/pkgenpack -%{_bindir}/packagekit-bugreport.sh %exclude %{_libdir}/libpackagekit*.so.* %{_libdir}/packagekit-backend/libpk_backend_dummy.so %{_libdir}/packagekit-backend/libpk_backend_test_*.so %ghost %verify(not md5 size mtime) %{_localstatedir}/lib/PackageKit/transactions.db %{_datadir}/dbus-1/system-services/*.service -%{_libdir}/pm-utils/sleep.d/95packagekit -%{_libdir}/packagekit-plugins/*.so -%{_libdir}/girepository-1.0/PackageKitPlugin-1.0.typelib %{_datadir}/dbus-1/interfaces/*.xml -/usr/lib/systemd/system/packagekit-offline-update.service +%{_unitdir}/packagekit-offline-update.service +%{_unitdir}/packagekit.service +%{_unitdir}/system-update.target.wants/ %{_libexecdir}/pk-*offline-update - -%files docs -%defattr(-,root,root,-) -%{_datadir}/gtk-doc/html/PackageKit - -%if 0%{?rhel} == 0 -%files smart -%defattr(-,root,root,-) -%{_libdir}/packagekit-backend/libpk_backend_smart.so -%dir %{_datadir}/PackageKit/helpers/smart -%{_datadir}/PackageKit/helpers/smart/* -%endif +%{_libdir}/packagekit-backend/libpk_backend_yum.so %files yum -%defattr(-,root,root,-) -%config(noreplace) %{_sysconfdir}/PackageKit/Yum.conf %{_libdir}/packagekit-backend/libpk_backend_yum.so %dir %{_datadir}/PackageKit/helpers/yum %{_datadir}/PackageKit/helpers/yum/* - -%if 0%{?rhel} == 0 -%files zif -%defattr(-,root,root,-) -%{_libdir}/packagekit-backend/libpk_backend_zif.so -%dir %{_datadir}/PackageKit/helpers/zif -%{_datadir}/PackageKit/helpers/zif/* -%endif +%{_sysconfdir}/PackageKit/Yum.conf %files yum-plugin -%defattr(-, root, root) %config(noreplace) %{_sysconfdir}/yum/pluginconf.d/refresh-packagekit.conf /usr/lib/yum-plugins/refresh-packagekit.* +%files hif +%{_libdir}/packagekit-backend/libpk_backend_hif.so + %files glib -%defattr(-,root,root,-) %{_libdir}/*packagekit-glib2.so.* %{_libdir}/girepository-1.0/PackageKitGlib-1.0.typelib %files cron -%defattr(-,root,root,-) %config %{_sysconfdir}/cron.daily/packagekit-background.cron %config(noreplace) %{_sysconfdir}/sysconfig/packagekit-background -%files debug-install -%defattr(-,root,root,-) -%{_bindir}/pk-debuginfo-install -%{_datadir}/man/man1/pk-debuginfo-install.1.gz - %files browser-plugin -%defattr(-,root,root,-) %{_libdir}/mozilla/plugins/packagekit-plugin.so %files gstreamer-plugin -%defattr(-,root,root,-) %{_libexecdir}/pk-gstreamer-install %{_libexecdir}/gst-install-plugins-helper %files gtk3-module -%defattr(-,root,root,-) %{_libdir}/gtk-2.0/modules/*.so %{_libdir}/gtk-3.0/modules/*.so %{_libdir}/gnome-settings-daemon-3.0/gtk-modules/*.desktop %files command-not-found -%defattr(-,root,root,-) %{_sysconfdir}/profile.d/* %{_libexecdir}/pk-command-not-found %config(noreplace) %{_sysconfdir}/PackageKit/CommandNotFound.conf -%files device-rebind -%defattr(-,root,root,-) -%{_sbindir}/pk-device-rebind -%{_datadir}/man/man1/pk-device-rebind.1.gz - %files glib-devel -%defattr(-,root,root,-) %{_libdir}/libpackagekit-glib2.so %{_libdir}/pkgconfig/packagekit-glib2.pc %dir %{_includedir}/PackageKit %dir %{_includedir}/PackageKit/packagekit-glib2 %{_includedir}/PackageKit/packagekit-glib*/*.h %{_datadir}/gir-1.0/PackageKitGlib-1.0.gir -%{_datadir}/gir-1.0/PackageKitPlugin-1.0.gir - -%files backend-devel -%defattr(-,root,root,-) -%dir %{_includedir}/PackageKit -%{_includedir}/PackageKit/plugin -%{_libdir}/pkgconfig/packagekit-plugin.pc +%{_datadir}/gtk-doc/html/PackageKit %changelog -* Thu Jun 19 2014 Jim Perrin - 0.8.9-11.el7.centos -- Update Vendor patch to reference CentOS +* Tue Jul 28 2015 Richard Hughes - 1.0.7-5 +- Add support for GetDetailsLocal +- Resolves: #1249998 + +* Tue Jul 28 2015 Richard Hughes - 1.0.7-4 +- Record the UID of the session user in the yumdb +- Resolves: #1237156 + +* Tue Jul 28 2015 Richard Hughes - 1.0.7-3 +- Remove runtime requirement of comps-extras +- Resolves: #1072533 + +* Mon Jul 13 2015 Richard Hughes - 1.0.7-2 +- Build the optional hif backend +- Resolves: #1230778 + +* Mon Jul 13 2015 Richard Hughes - 1.0.7-1 +- New upstream release +- Resolves: #1174728, #1231162, #1234781, #1229321, #1174106 + +* Wed Jul 01 2015 Kalev Lember - 1.0.6-3 +- yum: Return installed packages first with NEWEST filter +- Resolves: #1174728 + +* Wed Jun 17 2015 Richard Hughes - 1.0.6-2 +- Fix getting details from the yum backend +- Resolves: #1174728 + +* Tue May 05 2015 Richard Hughes - 1.0.6-1 +- New upstream release +- Resolves: #1174728 -* Mon Mar 17 2014 Richard Hughes - 0.8.9-11 +* Mon Mar 23 2015 Richard Hughes - 0.8.9-11 - Do not install into python_sitelib to fix multilib conflicts - Resolves: #1076424