Date: Thursday, February 17, 2022 @ 20:15:58 Author: eworm Revision: 1133812
upgpkg: packagekit 1.2.5-1: new upstream release Added: packagekit/trunk/0001-build-fix-overall-sysconfdir-handling-so-it-can-work.patch Modified: packagekit/trunk/PKGBUILD Deleted: packagekit/trunk/0001-alpm-remove-unused-error-PK_ERROR_ENUM_REPO_NOT_FOUN.patch packagekit/trunk/0002-alpm-fix-change-in-alpm_option_set_logcb-to-add-ctx-.patch packagekit/trunk/0003-alpm-adapt-to-changes-in-setting-arch-config-now-a-l.patch packagekit/trunk/0004-alpm-fix-changes-in-alpm_option_set_fetchcb-to-add-c.patch packagekit/trunk/0005-alpm-adapt-to-changes-in-db-updates-and-total-cb-cal.patch packagekit/trunk/0006-alpm-fix-apparent-lack-of-braces-in-if-clause.patch packagekit/trunk/0007-alpm-update-to-breaking-changes-in-transactions.patch packagekit/trunk/0008-alpm-fix-warning-of-casing-ptr-to-gboolean-this-is-p.patch packagekit/trunk/0009-alpm-fix-warning-to-keep-local-var-declarations-c99-.patch packagekit/trunk/0010-alpm-fix-bug-waiting-to-happen-with-cast-from-ptr-to.patch packagekit/trunk/0011-alpm-silence-warning-for-gool-to-ptr-conversion-with.patch packagekit/trunk/0012-alpm-fix-warning-about-fallthrough-be-explicit-about.patch packagekit/trunk/0013-build-fix-overall-sysconfdir-handling-so-it-can-work.patch packagekit/trunk/0014-Fix-get-updates.patch packagekit/trunk/0015-support-new-pacman-options.patch packagekit/trunk/0016-alpm-fix-uninitialized-stack-vars-used-later-in-conf.patch packagekit/trunk/0017-alpm-fix-missing-handling-of-hookdir-in-pacman.conf.patch packagekit/trunk/0018-alpm-fix-get-update-detail-which-uses-totally-wrong-.patch -----------------------------------------------------------------+ 0001-alpm-remove-unused-error-PK_ERROR_ENUM_REPO_NOT_FOUN.patch | 24 0001-build-fix-overall-sysconfdir-handling-so-it-can-work.patch | 249 ++++++++++ 0002-alpm-fix-change-in-alpm_option_set_logcb-to-add-ctx-.patch | 35 - 0003-alpm-adapt-to-changes-in-setting-arch-config-now-a-l.patch | 43 - 0004-alpm-fix-changes-in-alpm_option_set_fetchcb-to-add-c.patch | 38 - 0005-alpm-adapt-to-changes-in-db-updates-and-total-cb-cal.patch | 211 -------- 0006-alpm-fix-apparent-lack-of-braces-in-if-clause.patch | 40 - 0007-alpm-update-to-breaking-changes-in-transactions.patch | 239 --------- 0008-alpm-fix-warning-of-casing-ptr-to-gboolean-this-is-p.patch | 29 - 0009-alpm-fix-warning-to-keep-local-var-declarations-c99-.patch | 29 - 0010-alpm-fix-bug-waiting-to-happen-with-cast-from-ptr-to.patch | 28 - 0011-alpm-silence-warning-for-gool-to-ptr-conversion-with.patch | 28 - 0012-alpm-fix-warning-about-fallthrough-be-explicit-about.patch | 28 - 0013-build-fix-overall-sysconfdir-handling-so-it-can-work.patch | 249 ---------- 0014-Fix-get-updates.patch | 36 - 0015-support-new-pacman-options.patch | 51 -- 0016-alpm-fix-uninitialized-stack-vars-used-later-in-conf.patch | 29 - 0017-alpm-fix-missing-handling-of-hookdir-in-pacman.conf.patch | 54 -- 0018-alpm-fix-get-update-detail-which-uses-totally-wrong-.patch | 109 ---- PKGBUILD | 51 -- 20 files changed, 254 insertions(+), 1346 deletions(-) Deleted: 0001-alpm-remove-unused-error-PK_ERROR_ENUM_REPO_NOT_FOUN.patch =================================================================== --- 0001-alpm-remove-unused-error-PK_ERROR_ENUM_REPO_NOT_FOUN.patch 2022-02-17 19:37:26 UTC (rev 1133811) +++ 0001-alpm-remove-unused-error-PK_ERROR_ENUM_REPO_NOT_FOUN.patch 2022-02-17 20:15:58 UTC (rev 1133812) @@ -1,24 +0,0 @@ -From 55d4f1ed968aac62914065b331ddeeeb7da3a860 Mon Sep 17 00:00:00 2001 -From: "Carsten Haitzler (Rasterman)" <[email protected]> -Date: Sat, 22 May 2021 11:54:17 +0100 -Subject: [PATCH 01/13] alpm - remove unused error PK_ERROR_ENUM_REPO_NOT_FOUND - ---- - backends/alpm/pk-alpm-error.c | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/backends/alpm/pk-alpm-error.c b/backends/alpm/pk-alpm-error.c -index 31f1fab17..300110f36 100644 ---- a/backends/alpm/pk-alpm-error.c -+++ b/backends/alpm/pk-alpm-error.c -@@ -72,7 +72,6 @@ pk_alpm_error_emit (PkBackendJob *job, GError *error) - break; - case ALPM_ERR_DB_OPEN: - case ALPM_ERR_DB_NOT_FOUND: -- case ALPM_ERR_PKG_REPO_NOT_FOUND: - code = PK_ERROR_ENUM_REPO_NOT_FOUND; - break; - case ALPM_ERR_DB_CREATE: --- -2.31.1 - Added: 0001-build-fix-overall-sysconfdir-handling-so-it-can-work.patch =================================================================== --- 0001-build-fix-overall-sysconfdir-handling-so-it-can-work.patch (rev 0) +++ 0001-build-fix-overall-sysconfdir-handling-so-it-can-work.patch 2022-02-17 20:15:58 UTC (rev 1133812) @@ -0,0 +1,249 @@ +From 86379195b835eae2dee93bcbcad47028ba440560 Mon Sep 17 00:00:00 2001 +From: "Carsten Haitzler (Rasterman)" <[email protected]> +Date: Sat, 22 May 2021 16:30:33 +0100 +Subject: [PATCH 1/1] build - fix overall sysconfdir handling so it can work + out of the box + +sysconfdir is "etc" by default in meson, this means paths are like +"etc/PackageKit/xxxx" ... which is not a path. missing a / to begin +with. not to mention packagekit installs its own etc files in prefix/etc +(eg /usr/local/etc) by default. so differentiate files installed by +pkgkit (pk_sysconfdir)) and other system files (sysconfdir) and use +approplriately in the build. if the default etc is used then fix it to be +/etc for system and prefix/etc for pk installed files. at least things can +work out of the box then when you ninja install and dont provide a +custom sysconfidr on the cmdline. +--- + backends/alpm/meson.build | 8 ++++---- + backends/aptcc/meson.build | 2 +- + backends/slack/meson.build | 5 +++-- + backends/slack/pk-backend-slack.cc | 2 +- + backends/slack/tests/meson.build | 3 ++- + contrib/command-not-found/meson.build | 7 ++++--- + contrib/command-not-found/pk-command-not-found.c | 2 +- + contrib/cron/meson.build | 4 ++-- + data/meson.build | 2 +- + etc/meson.build | 2 +- + meson.build | 10 +++++++++- + src/meson.build | 3 ++- + src/pk-shared.c | 2 +- + 13 files changed, 32 insertions(+), 20 deletions(-) + +diff --git a/backends/alpm/meson.build b/backends/alpm/meson.build +index eb4d5b373..fc7972128 100644 +--- a/backends/alpm/meson.build ++++ b/backends/alpm/meson.build +@@ -34,9 +34,9 @@ shared_module( + c_args: [ + '-DPK_LOG_PREFIX="PACKAGEKIT"', + '-DG_LOG_DOMAIN="PackageKit-alpm"', +- '-DPK_BACKEND_CONFIG_FILE="@0@"'.format(join_paths(get_option('sysconfdir'), 'PackageKit', 'alpm.d', 'pacman.conf')), +- '-DPK_BACKEND_GROUP_FILE="@0@"'.format(join_paths(get_option('sysconfdir'), 'PackageKit', 'alpm.d', 'groups.list')), +- '-DPK_BACKEND_REPO_FILE="@0@"'.format(join_paths(get_option('sysconfdir'), 'PackageKit', 'alpm.d', 'repos.list')), ++ '-DPK_BACKEND_CONFIG_FILE="@0@"'.format(join_paths(pk_sysconfdir, 'PackageKit', 'alpm.d', 'pacman.conf')), ++ '-DPK_BACKEND_GROUP_FILE="@0@"'.format(join_paths(pk_sysconfdir, 'PackageKit', 'alpm.d', 'groups.list')), ++ '-DPK_BACKEND_REPO_FILE="@0@"'.format(join_paths(pk_sysconfdir, 'PackageKit', 'alpm.d', 'repos.list')), + '-DPK_BACKEND_DEFAULT_PATH="/bin:/usr/bin:/sbin:/usr/sbin"', + ], + install: true, +@@ -52,5 +52,5 @@ install_data( + 'groups.list', + 'pacman.conf', + 'repos.list', +- install_dir: join_paths(get_option('sysconfdir'), 'PackageKit', 'alpm.d') ++ install_dir: join_paths(pk_sysconfdir, 'PackageKit', 'alpm.d') + ) +diff --git a/backends/aptcc/meson.build b/backends/aptcc/meson.build +index 5df8f29e2..b29af882b 100644 +--- a/backends/aptcc/meson.build ++++ b/backends/aptcc/meson.build +@@ -75,7 +75,7 @@ shared_module( + + install_data( + '20packagekit', +- install_dir: join_paths(get_option('sysconfdir'), 'apt', 'apt.conf.d'), ++ install_dir: join_paths(sysconfdir, 'apt', 'apt.conf.d'), + ) + + install_data( +diff --git a/backends/slack/meson.build b/backends/slack/meson.build +index f44eea193..c6fdee49f 100644 +--- a/backends/slack/meson.build ++++ b/backends/slack/meson.build +@@ -24,7 +24,8 @@ packagekit_backend_slack_module = shared_module( + '-DPK_COMPILATION=1', + '-DLOCALSTATEDIR="@0@"'.format(join_paths(get_option('prefix'), get_option('localstatedir'))), + '-DLIBDIR="@0@"'.format(join_paths(get_option('prefix'), get_option('libdir'))), +- '-DSYSCONFDIR="@0@"'.format(get_option('sysconfdir')), ++ '-DSYSCONFDIR="@0@"'.format(sysconfdir), ++ '-DPK_SYSCONFDIR="@0@"'.format(pk_sysconfdir), + ], + override_options: ['c_std=c14', 'cpp_std=c++14'], + install: true, +@@ -45,7 +46,7 @@ configure_file( + output: 'Slackware.conf', + configuration: slackware_config_data, + install: true, +- install_dir: join_paths(get_option('sysconfdir'), 'PackageKit'), ++ install_dir: join_paths(sysconfdir, 'PackageKit'), + ) + + install_data( +diff --git a/backends/slack/pk-backend-slack.cc b/backends/slack/pk-backend-slack.cc +index 46e233d9a..4dbce8a50 100644 +--- a/backends/slack/pk-backend-slack.cc ++++ b/backends/slack/pk-backend-slack.cc +@@ -44,7 +44,7 @@ void pk_backend_initialize(GKeyFile *conf, PkBackend *backend) + + /* Read the configuration file */ + key_conf = g_key_file_new(); +- path = g_build_filename(SYSCONFDIR, "PackageKit", "Slackware.conf", NULL); ++ path = g_build_filename(PK_SYSCONFDIR, "PackageKit", "Slackware.conf", NULL); + g_key_file_load_from_file(key_conf, path, G_KEY_FILE_NONE, &err); + if (err) + { +diff --git a/backends/slack/tests/meson.build b/backends/slack/tests/meson.build +index c5235227c..49e6161e1 100644 +--- a/backends/slack/tests/meson.build ++++ b/backends/slack/tests/meson.build +@@ -13,7 +13,8 @@ pk_slack_test_cpp_args = [ + '-DPK_COMPILATION=1', + '-DLOCALSTATEDIR="@0@"'.format(join_paths(get_option('prefix'), get_option('localstatedir'))), + '-DLIBDIR="@0@"'.format(join_paths(get_option('prefix'), get_option('libdir'))), +- '-DSYSCONFDIR="@0@"'.format(get_option('sysconfdir')), ++ '-DSYSCONFDIR="@0@"'.format(sysconfdir), ++ '-DPK_SYSCONFDIR="@0@"'.format(pk_sysconfdir), + '-DGETTEXT_PACKAGE="@0@"'.format(meson.project_name()), + '-DLIBEXECDIR="@0@"'.format(join_paths(get_option('prefix'), get_option('libexecdir'))), + '-DPK_DB_DIR="."', +diff --git a/contrib/command-not-found/meson.build b/contrib/command-not-found/meson.build +index c1fba7a95..b1f0e88d8 100644 +--- a/contrib/command-not-found/meson.build ++++ b/contrib/command-not-found/meson.build +@@ -8,7 +8,8 @@ executable( + '-DGETTEXT_PACKAGE="@0@"'.format(meson.project_name()), + '-DG_LOG_DOMAIN="PackageKit"', + '-DPACKAGE_LOCALE_DIR="@0@"'.format(join_paths(get_option('prefix'), get_option('localedir'))), +- '-DSYSCONFDIR="@0@"'.format(get_option('sysconfdir')), ++ '-DSYSCONFDIR="@0@"'.format(sysconfdir), ++ '-DPK_SYSCONFDIR="@0@"'.format(pk_sysconfdir), + ] + ) + +@@ -19,10 +20,10 @@ configure_file( + output: 'PackageKit.sh', + configuration: bashprofile_config_data, + install: true, +- install_dir: join_paths(get_option('sysconfdir'), 'profile.d'), ++ install_dir: join_paths(sysconfdir, 'profile.d'), + ) + + install_data( + 'CommandNotFound.conf', +- install_dir: join_paths(get_option('sysconfdir'), 'PackageKit'), ++ install_dir: join_paths(pk_sysconfdir, 'PackageKit'), + ) +diff --git a/contrib/command-not-found/pk-command-not-found.c b/contrib/command-not-found/pk-command-not-found.c +index 8bedb081c..f7c5005b7 100644 +--- a/contrib/command-not-found/pk-command-not-found.c ++++ b/contrib/command-not-found/pk-command-not-found.c +@@ -591,7 +591,7 @@ pk_cnf_get_config (void) + + /* load file */ + file = g_key_file_new (); +- path = g_build_filename (SYSCONFDIR, "PackageKit", "CommandNotFound.conf", NULL); ++ path = g_build_filename (PK_SYSCONFDIR, "PackageKit", "CommandNotFound.conf", NULL); + ret = g_key_file_load_from_file (file, path, G_KEY_FILE_NONE, &error); + if (!ret) { + g_printerr ("failed to load config file: %s\n", error->message); +diff --git a/contrib/cron/meson.build b/contrib/cron/meson.build +index bff5eec27..5c1926e4b 100644 +--- a/contrib/cron/meson.build ++++ b/contrib/cron/meson.build +@@ -1,9 +1,9 @@ + install_data( + 'packagekit-background.cron', +- install_dir: join_paths(get_option('sysconfdir'), 'cron.daily') ++ install_dir: join_paths(sysconfdir, 'cron.daily') + ) + + install_data( + 'packagekit-background', +- install_dir: join_paths(get_option('sysconfdir'), 'sysconfig') ++ install_dir: join_paths(sysconfdir, 'sysconfig') + ) +diff --git a/data/meson.build b/data/meson.build +index a953f6280..11d115204 100644 +--- a/data/meson.build ++++ b/data/meson.build +@@ -9,7 +9,7 @@ dbus_config_data.set('libexecdir', join_paths(get_option('prefix'), get_option(' + + dbus_sys_dir = get_option('dbus_sys') + if dbus_sys_dir == '' +- dbus_sys_dir = join_paths(get_option('sysconfdir'), 'dbus-1', 'system.d') ++ dbus_sys_dir = join_paths(sysconfdir, 'dbus-1', 'system.d') + endif + + configure_file( +diff --git a/etc/meson.build b/etc/meson.build +index d3687f820..5094d93b3 100644 +--- a/etc/meson.build ++++ b/etc/meson.build +@@ -1,5 +1,5 @@ + install_data( + 'PackageKit.conf', + 'Vendor.conf', +- install_dir: join_paths(get_option('sysconfdir'), 'PackageKit') ++ install_dir: join_paths(pk_sysconfdir, 'PackageKit') + ) +diff --git a/meson.build b/meson.build +index 98587c6ec..8eba1544f 100644 +--- a/meson.build ++++ b/meson.build +@@ -73,7 +73,15 @@ add_project_arguments ('-DPK_COMPILATION', language: 'c') + conf = configuration_data() + conf.set_quoted('DATADIR', join_paths(get_option('prefix'), get_option('datadir'))) + conf.set_quoted('LIBDIR', join_paths(get_option('prefix'), get_option('libdir'))) +-conf.set_quoted('SYSCONFDIR', get_option('sysconfdir')) ++if get_option('sysconfdir') == 'etc' ++ pk_sysconfdir = join_paths(get_option('prefix'), get_option('sysconfdir')) ++ sysconfdir = '/etc' ++else ++ pk_sysconfdir = get_option('sysconfdir') ++ sysconfdir = get_option('sysconfdir') ++endif ++conf.set_quoted('SYSCONFDIR', sysconfdir) ++conf.set_quoted('PK_SYSCONFDIR', pk_sysconfdir) + + conf.set_quoted('PROJECT_NAME', meson.project_name()) + conf.set_quoted('PROJECT_VERSION', meson.project_version()) +diff --git a/src/meson.build b/src/meson.build +index cae73380e..505e9491d 100644 +--- a/src/meson.build ++++ b/src/meson.build +@@ -54,7 +54,8 @@ packagekit_direct_exec = executable( + c_args: [ + '-DG_LOG_DOMAIN="PackageKit"', + '-DLIBDIR="@0@"'.format(join_paths(get_option('prefix'), get_option('libdir'))), +- '-DSYSCONFDIR="@0@"'.format(get_option('sysconfdir')), ++ '-DSYSCONFDIR="@0@"'.format(sysconfdir), ++ '-DPK_SYSCONFDIR="@0@"'.format(pk_sysconfdir), + '-DVERSION="@0@"'.format(meson.project_version()), + '-DGETTEXT_PACKAGE="@0@"'.format(meson.project_name()), + '-DPACKAGE_LOCALE_DIR="@0@"'.format(package_locale_dir), +diff --git a/src/pk-shared.c b/src/pk-shared.c +index ca825dee9..a9fc623f4 100644 +--- a/src/pk-shared.c ++++ b/src/pk-shared.c +@@ -326,7 +326,7 @@ pk_util_get_config_filename (void) + g_free (path); + #endif + /* check the prefix path */ +- path = g_build_filename (SYSCONFDIR, "PackageKit", "PackageKit.conf", NULL); ++ path = g_build_filename (PK_SYSCONFDIR, "PackageKit", "PackageKit.conf", NULL); + if (g_file_test (path, G_FILE_TEST_EXISTS)) + goto out; + +-- +2.35.1 + Deleted: 0002-alpm-fix-change-in-alpm_option_set_logcb-to-add-ctx-.patch =================================================================== --- 0002-alpm-fix-change-in-alpm_option_set_logcb-to-add-ctx-.patch 2022-02-17 19:37:26 UTC (rev 1133811) +++ 0002-alpm-fix-change-in-alpm_option_set_logcb-to-add-ctx-.patch 2022-02-17 20:15:58 UTC (rev 1133812) @@ -1,35 +0,0 @@ -From 66d70b134b8e043eaa59fc7e7befa6fd42627c41 Mon Sep 17 00:00:00 2001 -From: "Carsten Haitzler (Rasterman)" <[email protected]> -Date: Sat, 22 May 2021 11:59:28 +0100 -Subject: [PATCH 02/13] alpm - fix change in alpm_option_set_logcb to add ctx - pointer - ---- - backends/alpm/pk-backend-alpm.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/backends/alpm/pk-backend-alpm.c b/backends/alpm/pk-backend-alpm.c -index 7592f8744..5571aaafb 100644 ---- a/backends/alpm/pk-backend-alpm.c -+++ b/backends/alpm/pk-backend-alpm.c -@@ -51,7 +51,7 @@ pk_backend_get_author (PkBackend *backend) - } - - static void --pk_alpm_logcb (alpm_loglevel_t level, const gchar *format, va_list args) -+pk_alpm_logcb (void *ctx, alpm_loglevel_t level, const gchar *format, va_list args) - { - g_autofree gchar *output = NULL; - -@@ -86,7 +86,7 @@ pk_alpm_initialize (PkBackend *backend, GError **error) - return FALSE; - } - -- alpm_option_set_logcb (priv->alpm, pk_alpm_logcb); -+ alpm_option_set_logcb (priv->alpm, pk_alpm_logcb, NULL); - - priv->localdb = alpm_get_localdb (priv->alpm); - if (priv->localdb == NULL) { --- -2.31.1 - Deleted: 0003-alpm-adapt-to-changes-in-setting-arch-config-now-a-l.patch =================================================================== --- 0003-alpm-adapt-to-changes-in-setting-arch-config-now-a-l.patch 2022-02-17 19:37:26 UTC (rev 1133811) +++ 0003-alpm-adapt-to-changes-in-setting-arch-config-now-a-l.patch 2022-02-17 20:15:58 UTC (rev 1133812) @@ -1,43 +0,0 @@ -From 9d1800463f700c03bf2b48241e20db7759102a3b Mon Sep 17 00:00:00 2001 -From: "Carsten Haitzler (Rasterman)" <[email protected]> -Date: Sat, 22 May 2021 12:14:48 +0100 -Subject: [PATCH 03/13] alpm - adapt to changes in setting arch config - now a - list - ---- - backends/alpm/pk-alpm-config.c | 12 +++++++++++- - 1 file changed, 11 insertions(+), 1 deletion(-) - -diff --git a/backends/alpm/pk-alpm-config.c b/backends/alpm/pk-alpm-config.c -index 39d2b0883..ecafcba72 100644 ---- a/backends/alpm/pk-alpm-config.c -+++ b/backends/alpm/pk-alpm-config.c -@@ -942,6 +942,9 @@ pk_alpm_config_configure_alpm (PkBackend *backend, PkAlpmConfig *config, GError - { - PkBackendAlpmPrivate *priv = pk_backend_get_user_data (config->backend); - alpm_handle_t *handle; -+ gchar **arches; -+ gint i; -+ alpm_list_t *arches_list = NULL; - - g_return_val_if_fail (config != NULL, FALSE); - -@@ -951,7 +954,14 @@ pk_alpm_config_configure_alpm (PkBackend *backend, PkAlpmConfig *config, GError - - alpm_option_set_checkspace (handle, config->checkspace); - alpm_option_set_usesyslog (handle, config->usesyslog); -- alpm_option_set_arch (handle, config->arch); -+ -+ arches = g_strsplit (config->arch, ",", -1); -+ for (i = 0; arches[i]; i++) { -+ arches_list = alpm_list_add (arches_list, arches[i]); -+ } -+ alpm_option_set_architectures (handle, arches_list); -+ g_strfreev (arches); -+ alpm_list_free (arches_list); - - /* backend takes ownership */ - g_free (xfercmd); --- -2.31.1 - Deleted: 0004-alpm-fix-changes-in-alpm_option_set_fetchcb-to-add-c.patch =================================================================== --- 0004-alpm-fix-changes-in-alpm_option_set_fetchcb-to-add-c.patch 2022-02-17 19:37:26 UTC (rev 1133811) +++ 0004-alpm-fix-changes-in-alpm_option_set_fetchcb-to-add-c.patch 2022-02-17 20:15:58 UTC (rev 1133812) @@ -1,38 +0,0 @@ -From 37e24e3367740d402cd96f5eed4a625ca39c27b2 Mon Sep 17 00:00:00 2001 -From: "Carsten Haitzler (Rasterman)" <[email protected]> -Date: Sat, 22 May 2021 12:18:05 +0100 -Subject: [PATCH 04/13] alpm - fix changes in alpm_option_set_fetchcb to add - ctx - ---- - backends/alpm/pk-alpm-config.c | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/backends/alpm/pk-alpm-config.c b/backends/alpm/pk-alpm-config.c -index ecafcba72..3849fee54 100644 ---- a/backends/alpm/pk-alpm-config.c -+++ b/backends/alpm/pk-alpm-config.c -@@ -870,7 +870,7 @@ pk_alpm_spawn (const gchar *command) - } - - static gint --pk_alpm_fetchcb (const gchar *url, const gchar *path, gint force) -+pk_alpm_fetchcb (void *ctx, const gchar *url, const gchar *path, gint force) - { - GRegex *xo, *xi; - gint result = 0; -@@ -969,9 +969,9 @@ pk_alpm_config_configure_alpm (PkBackend *backend, PkAlpmConfig *config, GError - config->xfercmd = NULL; - - if (xfercmd != NULL) { -- alpm_option_set_fetchcb (handle, pk_alpm_fetchcb); -+ alpm_option_set_fetchcb (handle, pk_alpm_fetchcb, NULL); - } else { -- alpm_option_set_fetchcb (handle, NULL); -+ alpm_option_set_fetchcb (handle, NULL, NULL); - } - - /* backend takes ownership */ --- -2.31.1 - Deleted: 0005-alpm-adapt-to-changes-in-db-updates-and-total-cb-cal.patch =================================================================== --- 0005-alpm-adapt-to-changes-in-db-updates-and-total-cb-cal.patch 2022-02-17 19:37:26 UTC (rev 1133811) +++ 0005-alpm-adapt-to-changes-in-db-updates-and-total-cb-cal.patch 2022-02-17 20:15:58 UTC (rev 1133812) @@ -1,211 +0,0 @@ -From 67df52f85f550d6d75a4d6e50605e0457b0b505c Mon Sep 17 00:00:00 2001 -From: "Carsten Haitzler (Rasterman)" <[email protected]> -Date: Sat, 22 May 2021 13:23:44 +0100 -Subject: [PATCH 05/13] alpm - adapt to changes in db updates and total cb - calling - ---- - backends/alpm/meson.build | 2 +- - backends/alpm/pk-alpm-sync.c | 6 +-- - backends/alpm/pk-alpm-update.c | 82 +++++++--------------------------- - backends/alpm/pk-alpm-update.h | 3 +- - 4 files changed, 21 insertions(+), 72 deletions(-) - -diff --git a/backends/alpm/meson.build b/backends/alpm/meson.build -index d486017ab..eb4d5b373 100644 ---- a/backends/alpm/meson.build -+++ b/backends/alpm/meson.build -@@ -1,4 +1,4 @@ --alpm_dep = dependency('libalpm', version: '>=12.0.0') -+alpm_dep = dependency('libalpm', version: '>=13.0.0') - - shared_module( - 'pk_backend_alpm', -diff --git a/backends/alpm/pk-alpm-sync.c b/backends/alpm/pk-alpm-sync.c -index 670c6b369..005ba4ac2 100644 ---- a/backends/alpm/pk-alpm-sync.c -+++ b/backends/alpm/pk-alpm-sync.c -@@ -176,7 +176,7 @@ pk_backend_sync_thread (PkBackendJob* job, GVariant* params, gpointer p) - PkBackendAlpmPrivate *priv = pk_backend_get_user_data (backend); - PkBitfield flags; - gboolean only_trusted; -- const alpm_list_t *i; -+ alpm_list_t *i; - alpm_list_t *asdeps = NULL, *asexplicit = NULL; - alpm_transflag_t alpm_flags = 0; - const gchar** package_ids; -@@ -190,9 +190,7 @@ pk_backend_sync_thread (PkBackendJob* job, GVariant* params, gpointer p) - - if ((gboolean)p) { - i = alpm_get_syncdbs(priv->alpm); -- for (; i != NULL; i = i->next) { -- pk_alpm_update_database(job, TRUE, i->data, &error); -- } -+ pk_alpm_refresh_databases (job, TRUE, i, &error); - } - - /* download only */ -diff --git a/backends/alpm/pk-alpm-update.c b/backends/alpm/pk-alpm-update.c -index a03b821ad..aa641c02b 100644 ---- a/backends/alpm/pk-alpm-update.c -+++ b/backends/alpm/pk-alpm-update.c -@@ -214,26 +214,6 @@ pk_alpm_update_get_db_timestamp_filename (alpm_db_t *db) - NULL); - } - --static gboolean --pk_alpm_update_is_db_fresh (PkBackendJob *job, alpm_db_t *db) --{ -- guint cache_age; -- GStatBuf stat_buffer; -- g_autofree gchar *timestamp_filename = NULL; -- -- cache_age = pk_backend_job_get_cache_age (job); -- -- timestamp_filename = pk_alpm_update_get_db_timestamp_filename (db); -- -- if (cache_age < 0 || cache_age >= G_MAXUINT) -- return FALSE; -- -- if (g_stat (timestamp_filename, &stat_buffer) < 0) -- return FALSE; -- -- return stat_buffer.st_mtime >= (time (NULL) - cache_age); --} -- - static gboolean - pk_alpm_update_set_db_timestamp (alpm_db_t *db, GError **error) - { -@@ -263,32 +243,34 @@ pk_alpm_update_set_db_timestamp (alpm_db_t *db, GError **error) - } - - gboolean --pk_alpm_update_database (PkBackendJob *job, gint force, alpm_db_t *db, GError **error) -+pk_alpm_refresh_databases (PkBackendJob *job, gint force, alpm_list_t *dbs, GError **error) - { - PkBackend *backend = pk_backend_job_get_backend (job); - PkBackendAlpmPrivate *priv = pk_backend_get_user_data (backend); - alpm_cb_download dlcb; - gint result; -+ alpm_list_t *i; - - dlcb = alpm_option_get_dlcb (priv->alpm); - -- if (pk_alpm_update_is_db_fresh (job, db)) -- return TRUE; -- - if (!force) - return TRUE; - -- result = alpm_db_update (force, db); -+ result = alpm_db_update (priv->alpm, dbs, force); - if (result > 0) { -- dlcb ("", 1, 1); -+ dlcb (NULL, "", ALPM_DOWNLOAD_COMPLETED, (void *)1); - } else if (result < 0) { -- g_set_error (error, PK_ALPM_ERROR, alpm_errno (priv->alpm), "[%s]: %s", -- alpm_db_get_name (db), -+ g_set_error (error, PK_ALPM_ERROR, alpm_errno (priv->alpm), "failed to uptate database: %s", - alpm_strerror (errno)); - return FALSE; - } - -- return pk_alpm_update_set_db_timestamp (db, error); -+ for (i = dbs; i; i = alpm_list_next (i)) { -+ if (!pk_alpm_update_set_db_timestamp (i->data, error)) { -+ return FALSE; -+ } -+ } -+ return TRUE; - } - - static gboolean -@@ -296,9 +278,7 @@ pk_alpm_update_databases (PkBackendJob *job, gint force, GError **error) - { - PkBackend *backend = pk_backend_job_get_backend (job); - PkBackendAlpmPrivate *priv = pk_backend_get_user_data (backend); -- alpm_cb_totaldl totaldlcb; -- gboolean ret; -- const alpm_list_t *i; -+ alpm_list_t *i; - - if (!pk_alpm_transaction_initialize (job, 0, NULL, error)) - return FALSE; -@@ -306,26 +286,8 @@ pk_alpm_update_databases (PkBackendJob *job, gint force, GError **error) - alpm_logaction (priv->alpm, PK_LOG_PREFIX, "synchronizing package lists\n"); - pk_backend_job_set_status (job, PK_STATUS_ENUM_DOWNLOAD_PACKAGELIST); - -- totaldlcb = alpm_option_get_totaldlcb (priv->alpm); -- -- /* set total size to minus the number of databases */ - i = alpm_get_syncdbs (priv->alpm); -- totaldlcb (-alpm_list_count (i)); -- -- for (; i != NULL; i = i->next) { -- if (pk_backend_job_is_cancelled (job)) { -- /* pretend to be finished */ -- i = NULL; -- break; -- } -- -- ret = pk_alpm_update_database (job, force, i->data, error); -- if (!ret) { -- break; -- } -- } -- -- totaldlcb (0); -+ pk_alpm_refresh_databases (job, force, i, error); - - if (i == NULL) - return pk_alpm_transaction_end (job, error); -@@ -425,14 +387,12 @@ pk_backend_get_updates_thread (PkBackendJob *job, GVariant* params, gpointer p) - PkBackend *backend = pk_backend_job_get_backend (job); - PkBackendAlpmPrivate *priv = pk_backend_get_user_data (backend); - int update_count = 0; -- const alpm_list_t *i, *syncdbs; -+ alpm_list_t *i, *syncdbs; - g_autoptr(GError) error = NULL; - PkBitfield filters = 0; - FILE *file; - int stored_count; -- alpm_cb_totaldl totaldlcb; -- gboolean ret; -- alpm_handle_t* handle = pk_alpm_configure (backend, PK_BACKEND_CONFIG_FILE, TRUE, error); -+ alpm_handle_t* handle = pk_alpm_configure (backend, PK_BACKEND_CONFIG_FILE, TRUE, &error); - - alpm_logaction (handle, PK_LOG_PREFIX, "synchronizing package lists\n"); - pk_backend_job_set_status (job, PK_STATUS_ENUM_DOWNLOAD_PACKAGELIST); -@@ -440,17 +400,7 @@ pk_backend_get_updates_thread (PkBackendJob *job, GVariant* params, gpointer p) - /* set total size to minus the number of databases */ - i = alpm_get_syncdbs (handle); - -- for (; i != NULL; i = i->next) { -- if (pk_backend_job_is_cancelled (job)) { -- /* pretend to be finished */ -- i = NULL; -- break; -- } -- -- ret = pk_alpm_update_database (job, TRUE, i->data, error); -- if (!ret) -- break; -- } -+ pk_alpm_refresh_databases (job, TRUE, i, &error); - - if (pk_backend_job_get_role (job) == PK_ROLE_ENUM_GET_UPDATES) { - g_variant_get (params, "(t)", &filters); -diff --git a/backends/alpm/pk-alpm-update.h b/backends/alpm/pk-alpm-update.h -index ed3a84d15..a1c4419f6 100644 ---- a/backends/alpm/pk-alpm-update.h -+++ b/backends/alpm/pk-alpm-update.h -@@ -23,4 +23,5 @@ - #include <alpm.h> - #include <pk-backend.h> - --gboolean pk_alpm_update_database(PkBackendJob *job, gint force, alpm_db_t *db, GError **error); -+gboolean pk_alpm_refresh_databases (PkBackendJob *job, gint force, -+ alpm_list_t *dbs, GError **error); --- -2.31.1 - Deleted: 0006-alpm-fix-apparent-lack-of-braces-in-if-clause.patch =================================================================== --- 0006-alpm-fix-apparent-lack-of-braces-in-if-clause.patch 2022-02-17 19:37:26 UTC (rev 1133811) +++ 0006-alpm-fix-apparent-lack-of-braces-in-if-clause.patch 2022-02-17 20:15:58 UTC (rev 1133812) @@ -1,40 +0,0 @@ -From 226a0f466c69a96d7b466a0bcefee697751a9a87 Mon Sep 17 00:00:00 2001 -From: "Carsten Haitzler (Rasterman)" <[email protected]> -Date: Sat, 22 May 2021 13:59:44 +0100 -Subject: [PATCH 06/13] alpm - fix apparent lack of braces in if clause - -this clause on the same line does an emit then goto cont. this, by -the pattern about with if (alpm_list_find_str() != NULL) says thatwe -should continue if this is the case, so it seems we need some braces. ---- - backends/alpm/pk-alpm-sync.c | 7 +++++-- - 1 file changed, 5 insertions(+), 2 deletions(-) - -diff --git a/backends/alpm/pk-alpm-sync.c b/backends/alpm/pk-alpm-sync.c -index 005ba4ac2..c6f188075 100644 ---- a/backends/alpm/pk-alpm-sync.c -+++ b/backends/alpm/pk-alpm-sync.c -@@ -30,6 +30,7 @@ - #include "pk-alpm-error.h" - #include "pk-alpm-transaction.h" - #include "pk-alpm-update.h" -+#include "pk-alpm-packages.h" - - static gboolean - pk_alpm_transaction_sync_targets (PkBackendJob *job, const gchar **packages, gboolean update, GError **error) -@@ -70,8 +71,10 @@ pk_alpm_transaction_sync_targets (PkBackendJob *job, const gchar **packages, gbo - - ignoregroups = alpm_option_get_ignoregroups (priv->alpm); - for (group_iter = alpm_pkg_get_groups (pkg); group_iter != NULL; group_iter = group_iter->next) { -- if (alpm_list_find_str (ignoregroups, i->data) != NULL) -- pk_alpm_pkg_emit (job, pkg, PK_INFO_ENUM_BLOCKED); goto cont; -+ if (alpm_list_find_str (ignoregroups, i->data) != NULL) { -+ pk_alpm_pkg_emit (job, pkg, PK_INFO_ENUM_BLOCKED); -+ goto cont; -+ } - } - } - --- -2.31.1 - Deleted: 0007-alpm-update-to-breaking-changes-in-transactions.patch =================================================================== --- 0007-alpm-update-to-breaking-changes-in-transactions.patch 2022-02-17 19:37:26 UTC (rev 1133811) +++ 0007-alpm-update-to-breaking-changes-in-transactions.patch 2022-02-17 20:15:58 UTC (rev 1133812) @@ -1,239 +0,0 @@ -From 753b20078b779591731408ea901d2a57e9f313b7 Mon Sep 17 00:00:00 2001 -From: "Carsten Haitzler (Rasterman)" <[email protected]> -Date: Sat, 22 May 2021 14:01:06 +0100 -Subject: [PATCH 07/13] alpm - update to breaking changes in transactions - ---- - backends/alpm/pk-alpm-sync.c | 2 +- - backends/alpm/pk-alpm-transaction.c | 108 +++++++++++----------------- - 2 files changed, 41 insertions(+), 69 deletions(-) - -diff --git a/backends/alpm/pk-alpm-sync.c b/backends/alpm/pk-alpm-sync.c -index c6f188075..5ad94245c 100644 ---- a/backends/alpm/pk-alpm-sync.c -+++ b/backends/alpm/pk-alpm-sync.c -@@ -191,7 +191,7 @@ pk_backend_sync_thread (PkBackendJob* job, GVariant* params, gpointer p) - if (!only_trusted && !pk_alpm_disable_signatures (backend, &error)) - goto out; - -- if ((gboolean)p) { -+ if ((gblooean)p) { - i = alpm_get_syncdbs(priv->alpm); - pk_alpm_refresh_databases (job, TRUE, i, &error); - } -diff --git a/backends/alpm/pk-alpm-transaction.c b/backends/alpm/pk-alpm-transaction.c -index 49bb83e5e..9e89d8ea5 100644 ---- a/backends/alpm/pk-alpm-transaction.c -+++ b/backends/alpm/pk-alpm-transaction.c -@@ -53,9 +53,6 @@ pk_alpm_resolve_path (PkBackendJob *job, const gchar *basename) - static gboolean - pk_alpm_pkg_has_basename (PkBackend *backend, alpm_pkg_t *pkg, const gchar *basename) - { -- PkBackendAlpmPrivate *priv = pk_backend_get_user_data (backend); -- const alpm_list_t *i; -- - g_return_val_if_fail (pkg != NULL, FALSE); - g_return_val_if_fail (basename != NULL, FALSE); - -@@ -130,74 +127,56 @@ pk_alpm_transaction_download_start (PkBackendJob *job, const gchar *basename) - } - - static void --pk_alpm_transaction_totaldlcb (off_t total) --{ -- PkBackendJob* job; -- g_assert (pkalpm_current_job); -- job = pkalpm_current_job; -- -- if (transaction_dtotal > 0 && dpkg != NULL) -- pk_alpm_transaction_download_end (job); -- -- transaction_dcomplete = 0; -- transaction_dtotal = total; --} -- --static void --pk_alpm_transaction_dlcb (const gchar *basename, off_t complete, off_t total) -+pk_alpm_transaction_dlcb (void *ctx, const gchar *filename, alpm_download_event_type_t type, void *data) - { - guint percentage = 100, sub_percentage = 100; -+ alpm_download_event_completed_t *completed = data; -+ alpm_download_event_progress_t *progress = data; - - PkBackendJob* job; - g_assert (pkalpm_current_job); - job = pkalpm_current_job; - -- g_return_if_fail(basename != NULL); -- -- // these conditions are documented in libalpm/dload.c -- if (complete == 0 && total == -1) { // initialized download -- g_debug ("downloading file %s", basename); -+ g_return_if_fail (filename != NULL); -+ switch (type) { -+ case ALPM_DOWNLOAD_INIT: - pk_backend_job_set_status (job, PK_STATUS_ENUM_DOWNLOAD); -- pk_alpm_transaction_download_start (job, basename); -- -- } else if (complete == 0 && total == 0) { // doing non-download event -- return; -+ pk_alpm_transaction_download_start (job, filename); -+ break; - -- } else if (complete > 0 && complete == total) { // download is complete -- pk_backend_job_set_percentage(job, 100); -- transaction_dcomplete += complete; -+ case ALPM_DOWNLOAD_COMPLETED: -+ pk_backend_job_set_percentage (job, 100); -+ transaction_dcomplete += completed->total; -+ break; - -- } else if (complete > 0 && complete < total && total > 0) { // download in progress -- sub_percentage = (complete * 100) / (total); -+ case ALPM_DOWNLOAD_PROGRESS: - if (transaction_dtotal > 0) { -- // positive totals indicate packages -- percentage = ((transaction_dcomplete + complete) * 100) / transaction_dtotal; -- -+ transaction_dcomplete += progress->downloaded; -+ percentage = ((transaction_dcomplete + progress->downloaded) * 100) / transaction_dtotal; - pk_backend_job_set_percentage (job, percentage); - } else if (transaction_dtotal < 0) { -- // negative totals indicate databases -- guint total_databases = -transaction_dtotal; - static off_t previous_total = 0; - static guint current_database = 0; -+ guint total_databases = -transaction_dtotal; - -- if (total != previous_total) { -+ if (progress->total != previous_total) { - current_database++; -- previous_total = total; -+ previous_total = progress->total; - } - -- percentage = ((current_database-1)*100) / total_databases; -+ percentage = ((current_database - 1) * 100) / total_databases; - percentage += sub_percentage / total_databases; - - pk_backend_job_set_percentage (job, percentage); - } -- -- } else { -+ break; -+ default: - syslog (LOG_DAEMON | LOG_WARNING, "unhandled download callback case, most likely libalpm change or error"); - } - } - - static void --pk_alpm_transaction_progress_cb (alpm_progress_t type, const gchar *target, -+pk_alpm_transaction_progress_cb (void *ctx, alpm_progress_t type, const gchar *target, - gint percent, gsize targets, gsize current) - { - static gint recent = 101; -@@ -264,7 +243,7 @@ pk_alpm_transaction_progress_cb (alpm_progress_t type, const gchar *target, - if (percent == recent) - break; - -- pk_backend_job_set_item_progress (job, target, PK_ROLE_ENUM_UNKNOWN, percent); -+ pk_backend_job_set_item_progress (job, target, PK_STATUS_ENUM_UNKNOWN, percent); - pk_backend_job_set_percentage (job, overall / targets); - recent = percent; - -@@ -319,7 +298,7 @@ pk_alpm_select_provider (const alpm_list_t *providers, - } - - static void --pk_alpm_transaction_conv_cb (alpm_question_t *question) -+pk_alpm_transaction_conv_cb (void *ctx, alpm_question_t *question) - { - PkBackendJob* job; - g_assert (pkalpm_current_job); -@@ -633,12 +612,6 @@ pk_alpm_transaction_setup (PkBackendJob *job) - pk_backend_job_set_status (job, PK_STATUS_ENUM_SETUP); - } - --static void --pk_alpm_transaction_repackaging (PkBackendJob *job) --{ -- pk_backend_job_set_status (job, PK_STATUS_ENUM_REPACKAGING); --} -- - static void - pk_alpm_transaction_download (PkBackendJob *job) - { -@@ -665,7 +638,7 @@ pk_alpm_transaction_optdepend_removal (PkBackendJob *job, alpm_pkg_t *pkg, - } - - static void --pk_alpm_transaction_event_cb (alpm_event_t *event) -+pk_alpm_transaction_event_cb (void *ctx, alpm_event_t *event) - { - PkBackendJob* job; - job = pkalpm_current_job; -@@ -733,7 +706,7 @@ pk_alpm_transaction_event_cb (alpm_event_t *event) - pk_alpm_transaction_output (((alpm_event_scriptlet_info_t *) event)->line); - break; - case ALPM_EVENT_KEY_DOWNLOAD_START: -- case ALPM_EVENT_RETRIEVE_START: -+ case ALPM_EVENT_DB_RETRIEVE_START: - pk_alpm_transaction_download (job); - break; - case ALPM_EVENT_OPTDEP_REMOVAL: -@@ -762,12 +735,12 @@ pk_alpm_transaction_event_cb (alpm_event_t *event) - case ALPM_EVENT_LOAD_DONE: - case ALPM_EVENT_PACNEW_CREATED: - case ALPM_EVENT_PACSAVE_CREATED: -- case ALPM_EVENT_PKGDOWNLOAD_DONE: -- case ALPM_EVENT_PKGDOWNLOAD_FAILED: -- case ALPM_EVENT_PKGDOWNLOAD_START: -+ case ALPM_EVENT_PKG_RETRIEVE_DONE: -+ case ALPM_EVENT_PKG_RETRIEVE_FAILED: -+ case ALPM_EVENT_PKG_RETRIEVE_START: - case ALPM_EVENT_RESOLVEDEPS_DONE: -- case ALPM_EVENT_RETRIEVE_DONE: -- case ALPM_EVENT_RETRIEVE_FAILED: -+ case ALPM_EVENT_DB_RETRIEVE_DONE: -+ case ALPM_EVENT_DB_RETRIEVE_FAILED: - case ALPM_EVENT_TRANSACTION_DONE: - case ALPM_EVENT_TRANSACTION_START: - /* ignored */ -@@ -804,12 +777,11 @@ pk_alpm_transaction_initialize (PkBackendJob* job, alpm_transflag_t flags, const - pkalpm_current_job = job; - pkalpm_dirname = dirname; - -- alpm_option_set_eventcb (priv->alpm, pk_alpm_transaction_event_cb); -- alpm_option_set_questioncb (priv->alpm, pk_alpm_transaction_conv_cb); -- alpm_option_set_progresscb (priv->alpm, pk_alpm_transaction_progress_cb); -+ alpm_option_set_eventcb (priv->alpm, pk_alpm_transaction_event_cb, NULL); -+ alpm_option_set_questioncb (priv->alpm, pk_alpm_transaction_conv_cb, NULL); -+ alpm_option_set_progresscb (priv->alpm, pk_alpm_transaction_progress_cb, NULL); - -- alpm_option_set_dlcb (priv->alpm, pk_alpm_transaction_dlcb); -- alpm_option_set_totaldlcb (priv->alpm, pk_alpm_transaction_totaldlcb); -+ alpm_option_set_dlcb (priv->alpm, pk_alpm_transaction_dlcb, NULL); - - g_cancellable_connect (pk_backend_job_get_cancellable (job), - G_CALLBACK (pk_alpm_transaction_cancelled_cb), -@@ -1123,12 +1095,12 @@ pk_alpm_transaction_end (PkBackendJob *job, GError **error) - PkBackend *backend = pk_backend_job_get_backend (job); - PkBackendAlpmPrivate *priv = pk_backend_get_user_data (backend); - -- alpm_option_set_eventcb (priv->alpm, NULL); -- alpm_option_set_questioncb (priv->alpm, NULL); -- alpm_option_set_progresscb (priv->alpm, NULL); -+ alpm_option_set_eventcb (priv->alpm, NULL, NULL); -+ alpm_option_set_questioncb (priv->alpm, NULL, NULL); -+ alpm_option_set_progresscb (priv->alpm, NULL, NULL); - -- alpm_option_set_dlcb (priv->alpm, NULL); -- alpm_option_set_totaldlcb (priv->alpm, NULL); -+ alpm_option_set_dlcb (priv->alpm, NULL, NULL); -+// alpm_option_set_totaldlcb (priv->alpm, NULLa; - - if (dpkg != NULL) - pk_alpm_transaction_download_end (job); --- -2.31.1 - Deleted: 0008-alpm-fix-warning-of-casing-ptr-to-gboolean-this-is-p.patch =================================================================== --- 0008-alpm-fix-warning-of-casing-ptr-to-gboolean-this-is-p.patch 2022-02-17 19:37:26 UTC (rev 1133811) +++ 0008-alpm-fix-warning-of-casing-ptr-to-gboolean-this-is-p.patch 2022-02-17 20:15:58 UTC (rev 1133812) @@ -1,29 +0,0 @@ -From 285bde170ffeaaa0ec7da11cbe51ef7c675b2c57 Mon Sep 17 00:00:00 2001 -From: "Carsten Haitzler (Rasterman)" <[email protected]> -Date: Sat, 22 May 2021 14:19:19 +0100 -Subject: [PATCH 08/13] alpm - fix warning of casing ptr to gboolean - this is - problematic - -a ptr canbe 64bits. casting to a gboolean is lossy and if the ptr just -happens to be the right value - we can accidentally make this if -false. just use pointer as-is thus only 0/null will be false as intended ---- - backends/alpm/pk-alpm-sync.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/backends/alpm/pk-alpm-sync.c b/backends/alpm/pk-alpm-sync.c -index 5ad94245c..747b263f5 100644 ---- a/backends/alpm/pk-alpm-sync.c -+++ b/backends/alpm/pk-alpm-sync.c -@@ -191,7 +191,7 @@ pk_backend_sync_thread (PkBackendJob* job, GVariant* params, gpointer p) - if (!only_trusted && !pk_alpm_disable_signatures (backend, &error)) - goto out; - -- if ((gblooean)p) { -+ if (p) { - i = alpm_get_syncdbs(priv->alpm); - pk_alpm_refresh_databases (job, TRUE, i, &error); - } --- -2.31.1 - Deleted: 0009-alpm-fix-warning-to-keep-local-var-declarations-c99-.patch =================================================================== --- 0009-alpm-fix-warning-to-keep-local-var-declarations-c99-.patch 2022-02-17 19:37:26 UTC (rev 1133811) +++ 0009-alpm-fix-warning-to-keep-local-var-declarations-c99-.patch 2022-02-17 20:15:58 UTC (rev 1133812) @@ -1,29 +0,0 @@ -From 072cbb1b01988502ab047e95c8e0b28abe8260f8 Mon Sep 17 00:00:00 2001 -From: "Carsten Haitzler (Rasterman)" <[email protected]> -Date: Sat, 22 May 2021 14:21:54 +0100 -Subject: [PATCH 09/13] alpm - fix warning to keep local var declarations c99 - consistent - ---- - backends/alpm/pk-alpm-config.c | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/backends/alpm/pk-alpm-config.c b/backends/alpm/pk-alpm-config.c -index 3849fee54..01081106c 100644 ---- a/backends/alpm/pk-alpm-config.c -+++ b/backends/alpm/pk-alpm-config.c -@@ -635,8 +635,10 @@ pk_alpm_config_initialize_alpm (PkAlpmConfig *config, GError **error) - } - - if (config->is_check) { -+ gchar* path; -+ - g_free(config->dbpath); -- gchar* path = g_strconcat (config->root, -+ path = g_strconcat (config->root, - "/var/lib/PackageKit/alpm" + dir, - NULL); - g_mkdir_with_parents(path, 0755); --- -2.31.1 - Deleted: 0010-alpm-fix-bug-waiting-to-happen-with-cast-from-ptr-to.patch =================================================================== --- 0010-alpm-fix-bug-waiting-to-happen-with-cast-from-ptr-to.patch 2022-02-17 19:37:26 UTC (rev 1133811) +++ 0010-alpm-fix-bug-waiting-to-happen-with-cast-from-ptr-to.patch 2022-02-17 20:15:58 UTC (rev 1133812) @@ -1,28 +0,0 @@ -From 7073235cef85b6e3078b6fb2bbbe48e0ea5d371c Mon Sep 17 00:00:00 2001 -From: "Carsten Haitzler (Rasterman)" <[email protected]> -Date: Sat, 22 May 2021 14:23:47 +0100 -Subject: [PATCH 10/13] alpm - fix bug waiting to happen with cast from ptr to - boolean - -if pointer values are just right this could be false when it shouldnt -be. convert to x ? a : b style to handle this. ---- - backends/alpm/pk-alpm-sync.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/backends/alpm/pk-alpm-sync.c b/backends/alpm/pk-alpm-sync.c -index 747b263f5..abc6fb1d5 100644 ---- a/backends/alpm/pk-alpm-sync.c -+++ b/backends/alpm/pk-alpm-sync.c -@@ -201,7 +201,7 @@ pk_backend_sync_thread (PkBackendJob* job, GVariant* params, gpointer p) - alpm_flags |= ALPM_TRANS_FLAG_DOWNLOADONLY; - - if (pk_alpm_transaction_initialize (job, alpm_flags, NULL, &error) && -- pk_alpm_transaction_sync_targets (job, package_ids, (gboolean)p, &error) && -+ pk_alpm_transaction_sync_targets (job, package_ids, p ? TRUE : FALSE, &error) && - pk_alpm_transaction_simulate (job, &error)) { - - if (pk_bitfield_contain (flags, PK_TRANSACTION_FLAG_ENUM_SIMULATE)) { /* simulation */ --- -2.31.1 - Deleted: 0011-alpm-silence-warning-for-gool-to-ptr-conversion-with.patch =================================================================== --- 0011-alpm-silence-warning-for-gool-to-ptr-conversion-with.patch 2022-02-17 19:37:26 UTC (rev 1133811) +++ 0011-alpm-silence-warning-for-gool-to-ptr-conversion-with.patch 2022-02-17 20:15:58 UTC (rev 1133812) @@ -1,28 +0,0 @@ -From 3dbe4e551c7fc1fa1bf76d6efa70a0ad61c630ac Mon Sep 17 00:00:00 2001 -From: "Carsten Haitzler (Rasterman)" <[email protected]> -Date: Sat, 22 May 2021 14:24:42 +0100 -Subject: [PATCH 11/13] alpm - silence warning for gool to ptr conversion with - a cast - -too many warnings makse us miss the real problems... and i have found -a fair few already. let's ne more silent ---- - backends/alpm/pk-alpm-sync.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/backends/alpm/pk-alpm-sync.c b/backends/alpm/pk-alpm-sync.c -index abc6fb1d5..8c7ded998 100644 ---- a/backends/alpm/pk-alpm-sync.c -+++ b/backends/alpm/pk-alpm-sync.c -@@ -264,7 +264,7 @@ pk_backend_update_packages (PkBackend *self, - PkBitfield transaction_flags, - gchar **package_ids) - { -- pk_alpm_run (job, PK_STATUS_ENUM_SETUP, pk_backend_sync_thread, TRUE); -+ pk_alpm_run (job, PK_STATUS_ENUM_SETUP, pk_backend_sync_thread, (void *)TRUE); - } - - void --- -2.31.1 - Deleted: 0012-alpm-fix-warning-about-fallthrough-be-explicit-about.patch =================================================================== --- 0012-alpm-fix-warning-about-fallthrough-be-explicit-about.patch 2022-02-17 19:37:26 UTC (rev 1133811) +++ 0012-alpm-fix-warning-about-fallthrough-be-explicit-about.patch 2022-02-17 20:15:58 UTC (rev 1133812) @@ -1,28 +0,0 @@ -From d048ee854474ee7b9f85aa4b1d58aaa6a1ad6b22 Mon Sep 17 00:00:00 2001 -From: "Carsten Haitzler (Rasterman)" <[email protected]> -Date: Sat, 22 May 2021 14:30:15 +0100 -Subject: [PATCH 12/13] alpm - fix warning about fallthrough - be explicit - about it - ---- - backends/alpm/pk-alpm-transaction.c | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/backends/alpm/pk-alpm-transaction.c b/backends/alpm/pk-alpm-transaction.c -index 9e89d8ea5..58f996067 100644 ---- a/backends/alpm/pk-alpm-transaction.c -+++ b/backends/alpm/pk-alpm-transaction.c -@@ -270,7 +270,9 @@ pk_alpm_install_ignorepkg (PkBackendJob *job, alpm_question_install_ignorepkg_t - output = g_strdup_printf ("%s: was not ignored\n", - alpm_pkg_get_name (q->pkg)); - pk_alpm_transaction_output (output); -- -+#if (!defined(__clang__)) && (__GNUC__ >= 7) -+ __attribute__ ((fallthrough)); /* let's be explicit about falltrhough */ -+#endif - case PK_ROLE_ENUM_DOWNLOAD_PACKAGES: - q->install = 1; - break; --- -2.31.1 - Deleted: 0013-build-fix-overall-sysconfdir-handling-so-it-can-work.patch =================================================================== --- 0013-build-fix-overall-sysconfdir-handling-so-it-can-work.patch 2022-02-17 19:37:26 UTC (rev 1133811) +++ 0013-build-fix-overall-sysconfdir-handling-so-it-can-work.patch 2022-02-17 20:15:58 UTC (rev 1133812) @@ -1,249 +0,0 @@ -From 8d27c8954a35598376e3cb1cb967b43a3cb18a28 Mon Sep 17 00:00:00 2001 -From: "Carsten Haitzler (Rasterman)" <[email protected]> -Date: Sat, 22 May 2021 16:30:33 +0100 -Subject: [PATCH 13/13] build - fix overall sysconfdir handling so it can work - out of the box - -sysconfdir is "etc" by default in meson, this means paths are like -"etc/PackageKit/xxxx" ... which is not a path. missing a / to begin -with. not to mention packagekit installs its own etc files in prefix/etc -(eg /usr/local/etc) by default. so differentiate files installed by -pkgkit (pk_sysconfdir)) and other system files (sysconfdir) and use -approplriately in the build. if the default etc is used then fix it to be -/etc for system and prefix/etc for pk installed files. at least things can -work out of the box then when you ninja install and dont provide a -custom sysconfidr on the cmdline. ---- - backends/alpm/meson.build | 8 ++++---- - backends/aptcc/meson.build | 2 +- - backends/slack/meson.build | 5 +++-- - backends/slack/pk-backend-slack.cc | 2 +- - backends/slack/tests/meson.build | 3 ++- - contrib/command-not-found/meson.build | 7 ++++--- - contrib/command-not-found/pk-command-not-found.c | 2 +- - contrib/cron/meson.build | 4 ++-- - data/meson.build | 2 +- - etc/meson.build | 2 +- - meson.build | 10 +++++++++- - src/meson.build | 3 ++- - src/pk-shared.c | 2 +- - 13 files changed, 32 insertions(+), 20 deletions(-) - -diff --git a/backends/alpm/meson.build b/backends/alpm/meson.build -index eb4d5b373..fc7972128 100644 ---- a/backends/alpm/meson.build -+++ b/backends/alpm/meson.build -@@ -34,9 +34,9 @@ shared_module( - c_args: [ - '-DPK_LOG_PREFIX="PACKAGEKIT"', - '-DG_LOG_DOMAIN="PackageKit-alpm"', -- '-DPK_BACKEND_CONFIG_FILE="@0@"'.format(join_paths(get_option('sysconfdir'), 'PackageKit', 'alpm.d', 'pacman.conf')), -- '-DPK_BACKEND_GROUP_FILE="@0@"'.format(join_paths(get_option('sysconfdir'), 'PackageKit', 'alpm.d', 'groups.list')), -- '-DPK_BACKEND_REPO_FILE="@0@"'.format(join_paths(get_option('sysconfdir'), 'PackageKit', 'alpm.d', 'repos.list')), -+ '-DPK_BACKEND_CONFIG_FILE="@0@"'.format(join_paths(pk_sysconfdir, 'PackageKit', 'alpm.d', 'pacman.conf')), -+ '-DPK_BACKEND_GROUP_FILE="@0@"'.format(join_paths(pk_sysconfdir, 'PackageKit', 'alpm.d', 'groups.list')), -+ '-DPK_BACKEND_REPO_FILE="@0@"'.format(join_paths(pk_sysconfdir, 'PackageKit', 'alpm.d', 'repos.list')), - '-DPK_BACKEND_DEFAULT_PATH="/bin:/usr/bin:/sbin:/usr/sbin"', - ], - install: true, -@@ -52,5 +52,5 @@ install_data( - 'groups.list', - 'pacman.conf', - 'repos.list', -- install_dir: join_paths(get_option('sysconfdir'), 'PackageKit', 'alpm.d') -+ install_dir: join_paths(pk_sysconfdir, 'PackageKit', 'alpm.d') - ) -diff --git a/backends/aptcc/meson.build b/backends/aptcc/meson.build -index 3b8354d4b..d1a8a24a5 100644 ---- a/backends/aptcc/meson.build -+++ b/backends/aptcc/meson.build -@@ -72,7 +72,7 @@ shared_module( - - install_data( - '20packagekit', -- install_dir: join_paths(get_option('sysconfdir'), 'apt', 'apt.conf.d'), -+ install_dir: join_paths(sysconfdir, 'apt', 'apt.conf.d'), - ) - - install_data( -diff --git a/backends/slack/meson.build b/backends/slack/meson.build -index c3a95fb05..299a5d434 100644 ---- a/backends/slack/meson.build -+++ b/backends/slack/meson.build -@@ -21,7 +21,8 @@ packagekit_backend_slack_module = shared_module( - '-DPK_COMPILATION=1', - '-DLOCALSTATEDIR="@0@"'.format(join_paths(get_option('prefix'), get_option('localstatedir'))), - '-DLIBDIR="@0@"'.format(join_paths(get_option('prefix'), get_option('libdir'))), -- '-DSYSCONFDIR="@0@"'.format(get_option('sysconfdir')), -+ '-DSYSCONFDIR="@0@"'.format(sysconfdir), -+ '-DPK_SYSCONFDIR="@0@"'.format(pk_sysconfdir), - ], - override_options: ['c_std=c14', 'cpp_std=c++14'], - install: true, -@@ -42,7 +43,7 @@ configure_file( - output: 'Slackware.conf', - configuration: slackware_config_data, - install: true, -- install_dir: join_paths(get_option('sysconfdir'), 'PackageKit'), -+ install_dir: join_paths(sysconfdir, 'PackageKit'), - ) - - install_data( -diff --git a/backends/slack/pk-backend-slack.cc b/backends/slack/pk-backend-slack.cc -index 46e233d9a..4dbce8a50 100644 ---- a/backends/slack/pk-backend-slack.cc -+++ b/backends/slack/pk-backend-slack.cc -@@ -44,7 +44,7 @@ void pk_backend_initialize(GKeyFile *conf, PkBackend *backend) - - /* Read the configuration file */ - key_conf = g_key_file_new(); -- path = g_build_filename(SYSCONFDIR, "PackageKit", "Slackware.conf", NULL); -+ path = g_build_filename(PK_SYSCONFDIR, "PackageKit", "Slackware.conf", NULL); - g_key_file_load_from_file(key_conf, path, G_KEY_FILE_NONE, &err); - if (err) - { -diff --git a/backends/slack/tests/meson.build b/backends/slack/tests/meson.build -index c5235227c..49e6161e1 100644 ---- a/backends/slack/tests/meson.build -+++ b/backends/slack/tests/meson.build -@@ -13,7 +13,8 @@ pk_slack_test_cpp_args = [ - '-DPK_COMPILATION=1', - '-DLOCALSTATEDIR="@0@"'.format(join_paths(get_option('prefix'), get_option('localstatedir'))), - '-DLIBDIR="@0@"'.format(join_paths(get_option('prefix'), get_option('libdir'))), -- '-DSYSCONFDIR="@0@"'.format(get_option('sysconfdir')), -+ '-DSYSCONFDIR="@0@"'.format(sysconfdir), -+ '-DPK_SYSCONFDIR="@0@"'.format(pk_sysconfdir), - '-DGETTEXT_PACKAGE="@0@"'.format(meson.project_name()), - '-DLIBEXECDIR="@0@"'.format(join_paths(get_option('prefix'), get_option('libexecdir'))), - '-DPK_DB_DIR="."', -diff --git a/contrib/command-not-found/meson.build b/contrib/command-not-found/meson.build -index a2155ca32..a7284b827 100644 ---- a/contrib/command-not-found/meson.build -+++ b/contrib/command-not-found/meson.build -@@ -8,7 +8,8 @@ executable( - '-DGETTEXT_PACKAGE="@0@"'.format(meson.project_name()), - '-DG_LOG_DOMAIN="PackageKit"', - '-DPACKAGE_LOCALE_DIR="@0@"'.format(get_option('localedir')), -- '-DSYSCONFDIR="@0@"'.format(get_option('sysconfdir')), -+ '-DSYSCONFDIR="@0@"'.format(sysconfdir), -+ '-DPK_SYSCONFDIR="@0@"'.format(pk_sysconfdir), - ] - ) - -@@ -19,10 +20,10 @@ configure_file( - output: 'PackageKit.sh', - configuration: bashprofile_config_data, - install: true, -- install_dir: join_paths(get_option('sysconfdir'), 'profile.d'), -+ install_dir: join_paths(sysconfdir, 'profile.d'), - ) - - install_data( - 'CommandNotFound.conf', -- install_dir: join_paths(get_option('sysconfdir'), 'PackageKit'), -+ install_dir: join_paths(pk_sysconfdir, 'PackageKit'), - ) -diff --git a/contrib/command-not-found/pk-command-not-found.c b/contrib/command-not-found/pk-command-not-found.c -index 8bedb081c..f7c5005b7 100644 ---- a/contrib/command-not-found/pk-command-not-found.c -+++ b/contrib/command-not-found/pk-command-not-found.c -@@ -591,7 +591,7 @@ pk_cnf_get_config (void) - - /* load file */ - file = g_key_file_new (); -- path = g_build_filename (SYSCONFDIR, "PackageKit", "CommandNotFound.conf", NULL); -+ path = g_build_filename (PK_SYSCONFDIR, "PackageKit", "CommandNotFound.conf", NULL); - ret = g_key_file_load_from_file (file, path, G_KEY_FILE_NONE, &error); - if (!ret) { - g_printerr ("failed to load config file: %s\n", error->message); -diff --git a/contrib/cron/meson.build b/contrib/cron/meson.build -index bff5eec27..5c1926e4b 100644 ---- a/contrib/cron/meson.build -+++ b/contrib/cron/meson.build -@@ -1,9 +1,9 @@ - install_data( - 'packagekit-background.cron', -- install_dir: join_paths(get_option('sysconfdir'), 'cron.daily') -+ install_dir: join_paths(sysconfdir, 'cron.daily') - ) - - install_data( - 'packagekit-background', -- install_dir: join_paths(get_option('sysconfdir'), 'sysconfig') -+ install_dir: join_paths(sysconfdir, 'sysconfig') - ) -diff --git a/data/meson.build b/data/meson.build -index 7fc41144c..446d28be5 100644 ---- a/data/meson.build -+++ b/data/meson.build -@@ -9,7 +9,7 @@ dbus_config_data.set('libexecdir', join_paths(get_option('prefix'), get_option(' - - dbus_sys_dir = get_option('dbus_sys') - if dbus_sys_dir == '' -- dbus_sys_dir = join_paths(get_option('sysconfdir'), 'dbus-1', 'system.d') -+ dbus_sys_dir = join_paths(sysconfdir, 'dbus-1', 'system.d') - endif - - configure_file( -diff --git a/etc/meson.build b/etc/meson.build -index d3687f820..5094d93b3 100644 ---- a/etc/meson.build -+++ b/etc/meson.build -@@ -1,5 +1,5 @@ - install_data( - 'PackageKit.conf', - 'Vendor.conf', -- install_dir: join_paths(get_option('sysconfdir'), 'PackageKit') -+ install_dir: join_paths(pk_sysconfdir, 'PackageKit') - ) -diff --git a/meson.build b/meson.build -index 111f3746a..619a90cc0 100644 ---- a/meson.build -+++ b/meson.build -@@ -73,7 +73,15 @@ add_project_arguments ('-DPK_COMPILATION', language: 'c') - conf = configuration_data() - conf.set_quoted('DATADIR', join_paths(get_option('prefix'), get_option('datadir'))) - conf.set_quoted('LIBDIR', join_paths(get_option('prefix'), get_option('libdir'))) --conf.set_quoted('SYSCONFDIR', get_option('sysconfdir')) -+if get_option('sysconfdir') == 'etc' -+ pk_sysconfdir = join_paths(get_option('prefix'), get_option('sysconfdir')) -+ sysconfdir = '/etc' -+else -+ pk_sysconfdir = get_option('sysconfdir') -+ sysconfdir = get_option('sysconfdir') -+endif -+conf.set_quoted('SYSCONFDIR', sysconfdir) -+conf.set_quoted('PK_SYSCONFDIR', pk_sysconfdir) - - conf.set_quoted('PROJECT_NAME', meson.project_name()) - conf.set_quoted('PROJECT_VERSION', meson.project_version()) -diff --git a/src/meson.build b/src/meson.build -index cae73380e..505e9491d 100644 ---- a/src/meson.build -+++ b/src/meson.build -@@ -54,7 +54,8 @@ packagekit_direct_exec = executable( - c_args: [ - '-DG_LOG_DOMAIN="PackageKit"', - '-DLIBDIR="@0@"'.format(join_paths(get_option('prefix'), get_option('libdir'))), -- '-DSYSCONFDIR="@0@"'.format(get_option('sysconfdir')), -+ '-DSYSCONFDIR="@0@"'.format(sysconfdir), -+ '-DPK_SYSCONFDIR="@0@"'.format(pk_sysconfdir), - '-DVERSION="@0@"'.format(meson.project_version()), - '-DGETTEXT_PACKAGE="@0@"'.format(meson.project_name()), - '-DPACKAGE_LOCALE_DIR="@0@"'.format(package_locale_dir), -diff --git a/src/pk-shared.c b/src/pk-shared.c -index ca825dee9..a9fc623f4 100644 ---- a/src/pk-shared.c -+++ b/src/pk-shared.c -@@ -326,7 +326,7 @@ pk_util_get_config_filename (void) - g_free (path); - #endif - /* check the prefix path */ -- path = g_build_filename (SYSCONFDIR, "PackageKit", "PackageKit.conf", NULL); -+ path = g_build_filename (PK_SYSCONFDIR, "PackageKit", "PackageKit.conf", NULL); - if (g_file_test (path, G_FILE_TEST_EXISTS)) - goto out; - --- -2.31.1 - Deleted: 0014-Fix-get-updates.patch =================================================================== --- 0014-Fix-get-updates.patch 2022-02-17 19:37:26 UTC (rev 1133811) +++ 0014-Fix-get-updates.patch 2022-02-17 20:15:58 UTC (rev 1133812) @@ -1,36 +0,0 @@ -From 0f6d9cc6f50db5fc014f71069dfa2e7fde00766a Mon Sep 17 00:00:00 2001 -From: Jan Blackquill <[email protected]> -Date: Tue, 1 Jun 2021 20:45:58 -0400 -Subject: [PATCH] Fix get-updates - ---- - backends/alpm/pk-alpm-update.c | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/backends/alpm/pk-alpm-update.c b/backends/alpm/pk-alpm-update.c -index 0c802c5af..5ae169b32 100644 ---- a/backends/alpm/pk-alpm-update.c -+++ b/backends/alpm/pk-alpm-update.c -@@ -392,6 +392,7 @@ pk_backend_get_updates_thread (PkBackendJob *job, GVariant* params, gpointer p) - PkBitfield filters = 0; - FILE *file; - int stored_count; -+ alpm_handle_t* old_handle = priv->alpm; - alpm_handle_t* handle = pk_alpm_configure (backend, PK_BACKEND_CONFIG_FILE, TRUE, &error); - - alpm_logaction (handle, PK_LOG_PREFIX, "synchronizing package lists\n"); -@@ -400,7 +401,11 @@ pk_backend_get_updates_thread (PkBackendJob *job, GVariant* params, gpointer p) - /* set total size to minus the number of databases */ - i = alpm_get_syncdbs (handle); - -+ // swap around the handles since the refresh database will grab -+ // the main system handle and not the check update handle otherwise -+ priv->alpm = handle; - pk_alpm_refresh_databases (job, TRUE, i, &error); -+ priv->alpm = old_handle; - - if (pk_backend_job_get_role (job) == PK_ROLE_ENUM_GET_UPDATES) { - g_variant_get (params, "(t)", &filters); --- -2.31.1 - Deleted: 0015-support-new-pacman-options.patch =================================================================== --- 0015-support-new-pacman-options.patch 2022-02-17 19:37:26 UTC (rev 1133811) +++ 0015-support-new-pacman-options.patch 2022-02-17 20:15:58 UTC (rev 1133812) @@ -1,51 +0,0 @@ -From: Antonio Rojas <[email protected]> -Subject: handle configuration 'NoProgressBar' - -diff --git a/backends/alpm/pk-alpm-config.c b/backends/alpm/pk-alpm-config.c -index 20da84e45..cfe916aa0 100644 ---- a/backends/alpm/pk-alpm-config.c -+++ b/backends/alpm/pk-alpm-config.c -@@ -40,7 +40,7 @@ static gchar *xfercmd = NULL; - typedef struct - { - gboolean checkspace, color, disabledownloadtimeout, ilovecandy, -- totaldl, usesyslog, verbosepkglists, is_check; -+ noprogressbar, totaldl, usesyslog, verbosepkglists, is_check; - - gchar *arch, *cleanmethod, *dbpath, *gpgdir, *logfile, - *root, *xfercmd; -@@ -146,6 +146,14 @@ pk_alpm_config_set_ilovecandy (PkAlpmConfig *config) - config->ilovecandy = TRUE; - } - -+static void -+pk_alpm_config_set_noprogressbar (PkAlpmConfig *config) -+{ -+ g_return_if_fail (config != NULL); -+ -+ config->noprogressbar = TRUE; -+} -+ - static void - pk_alpm_config_set_totaldl (PkAlpmConfig *config) - { -@@ -182,6 +190,7 @@ static const PkAlpmConfigBoolean pk_alpm_config_boolean_options[] = { - { "Color", pk_alpm_config_set_color }, - { "DisableDownloadTimeout", pk_alpm_config_set_disabledownloadtimeout }, - { "ILoveCandy", pk_alpm_config_set_ilovecandy }, -+ { "NoProgressBar", pk_alpm_config_set_noprogressbar }, - { "TotalDownload", pk_alpm_config_set_totaldl }, - { "UseSyslog", pk_alpm_config_set_usesyslog }, - { "VerbosePkgLists", pk_alpm_config_set_verbosepkglists }, -@@ -599,6 +608,11 @@ pk_alpm_config_parse (PkAlpmConfig *config, const gchar *filename, - continue; - } - -+ if (g_strcmp0 (key, "ParallelDownloads") == 0 && str != NULL) { -+ /* Ignore "ParallelDownloads" key instead of crashing */ -+ continue; -+ } -+ - /* report errors from above */ - g_set_error (&e, PK_ALPM_ERROR, PK_ALPM_ERR_CONFIG_INVALID, - "unrecognised directive '%s'", key); Deleted: 0016-alpm-fix-uninitialized-stack-vars-used-later-in-conf.patch =================================================================== --- 0016-alpm-fix-uninitialized-stack-vars-used-later-in-conf.patch 2022-02-17 19:37:26 UTC (rev 1133811) +++ 0016-alpm-fix-uninitialized-stack-vars-used-later-in-conf.patch 2022-02-17 20:15:58 UTC (rev 1133812) @@ -1,29 +0,0 @@ -From 763a046849ded07e3785d76b8af24381b44aadc1 Mon Sep 17 00:00:00 2001 -From: "Carsten Haitzler (Rasterman)" <[email protected]> -Date: Sun, 13 Jun 2021 12:13:30 +0100 -Subject: [PATCH 1/2] alpm - fix uninitialized stack vars used later in config - -In the parsing of siglevel, depending on content this can leave -level and mask sometimes unset as the code likes to take current value -and val | newbitval to set bits, assuming it starts at 0. This fixes -that. ---- - backends/alpm/pk-alpm-config.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/backends/alpm/pk-alpm-config.c b/backends/alpm/pk-alpm-config.c -index 01081106c..3fbb60c18 100644 ---- a/backends/alpm/pk-alpm-config.c -+++ b/backends/alpm/pk-alpm-config.c -@@ -793,7 +793,7 @@ static gboolean - pk_alpm_config_configure_repos (PkBackend *backend, PkAlpmConfig *config, - alpm_handle_t *handle, GError **error) - { -- alpm_siglevel_t base, level, mask, local, remote; -+ alpm_siglevel_t base, level = 0, mask = 0, local, remote; - const alpm_list_t *i; - PkAlpmConfigSection *options; - --- -2.31.1 - Deleted: 0017-alpm-fix-missing-handling-of-hookdir-in-pacman.conf.patch =================================================================== --- 0017-alpm-fix-missing-handling-of-hookdir-in-pacman.conf.patch 2022-02-17 19:37:26 UTC (rev 1133811) +++ 0017-alpm-fix-missing-handling-of-hookdir-in-pacman.conf.patch 2022-02-17 20:15:58 UTC (rev 1133812) @@ -1,54 +0,0 @@ -From f2d1163b3c965b8b61f98460ff68d6cd94aae1a0 Mon Sep 17 00:00:00 2001 -From: "Carsten Haitzler (Rasterman)" <[email protected]> -Date: Sun, 13 Jun 2021 12:15:18 +0100 -Subject: [PATCH 2/2] alpm - fix missing handling of hookdir in pacman.conf - -The pacman.conf parser didnt handle HookDir at all. This fixes that -and handles it. ---- - backends/alpm/pk-alpm-config.c | 8 +++++++- - 1 file changed, 7 insertions(+), 1 deletion(-) - -diff --git a/backends/alpm/pk-alpm-config.c b/backends/alpm/pk-alpm-config.c -index 3fbb60c18..3bce61a52 100644 ---- a/backends/alpm/pk-alpm-config.c -+++ b/backends/alpm/pk-alpm-config.c -@@ -47,7 +47,7 @@ typedef struct - - alpm_list_t *cachedirs, *holdpkgs, *ignoregroups, - *ignorepkgs, *localfilesiglevels, *noextracts, -- *noupgrades, *remotefilesiglevels; -+ *noupgrades, *remotefilesiglevels, *hookdirs; - - alpm_list_t *sections; - GRegex *xrepo, *xarch; -@@ -106,6 +106,7 @@ pk_alpm_config_free (PkAlpmConfig *config) - FREELIST (config->noextracts); - FREELIST (config->noupgrades); - FREELIST (config->remotefilesiglevels); -+ FREELIST (config->hookdirs); - - alpm_list_free_inner (config->sections, pk_alpm_config_section_free); - alpm_list_free (config->sections); -@@ -360,6 +361,7 @@ static const PkAlpmConfigList pk_alpm_config_list_options[] = { - { "NoUpgrade", G_STRUCT_OFFSET (PkAlpmConfig, noupgrades) }, - { "RemoteFileSigLevel", G_STRUCT_OFFSET (PkAlpmConfig, - remotefilesiglevels) }, -+ { "HookDir", G_STRUCT_OFFSET (PkAlpmConfig, hookdirs) }, - { NULL, 0 } - }; - -@@ -997,6 +999,10 @@ pk_alpm_config_configure_alpm (PkBackend *backend, PkAlpmConfig *config, GError - alpm_option_set_noupgrades (handle, config->noupgrades); - config->noupgrades = NULL; - -+ /* alpm takes ownership */ -+ alpm_option_set_noupgrades (handle, config->hookdirs); -+ config->hookdirs = NULL; -+ - pk_alpm_config_configure_repos (backend, config, handle, error); - - return handle; --- -2.31.1 - Deleted: 0018-alpm-fix-get-update-detail-which-uses-totally-wrong-.patch =================================================================== --- 0018-alpm-fix-get-update-detail-which-uses-totally-wrong-.patch 2022-02-17 19:37:26 UTC (rev 1133811) +++ 0018-alpm-fix-get-update-detail-which-uses-totally-wrong-.patch 2022-02-17 20:15:58 UTC (rev 1133812) @@ -1,109 +0,0 @@ -From d08e03282ccdd058a6b3dc209942d5fb9d261703 Mon Sep 17 00:00:00 2001 -From: "Carsten Haitzler (Rasterman)" <[email protected]> -Date: Sun, 13 Jun 2021 12:59:26 +0100 -Subject: [PATCH] alpm - fix get-update-detail which uses totally wrong list of - strings - -pk_backend_get_update_detail_thread() passed in single stirngs instead -of null pointer terminated lists (arrays) of strings thus the null -terminator was junk on the stack... this fixes that/ updates is a -single string anyway so thus fake an array of 2 eleemtns and replaces -was all wrong trying to munge multiple replaces into a single string -insted of producing a proper array of them. ---- - backends/alpm/pk-alpm-update.c | 42 +++++++++++++++++++--------------- - 1 file changed, 24 insertions(+), 18 deletions(-) - -diff --git a/backends/alpm/pk-alpm-update.c b/backends/alpm/pk-alpm-update.c -index aa641c02b..f0d7bff2e 100644 ---- a/backends/alpm/pk-alpm-update.c -+++ b/backends/alpm/pk-alpm-update.c -@@ -39,33 +39,32 @@ - #include "pk-alpm-transaction.h" - #include "pk-alpm-update.h" - --static gchar * -+static gchar ** - pk_alpm_pkg_build_replaces (PkBackendJob *job, alpm_pkg_t *pkg) - { - PkBackend *backend = pk_backend_job_get_backend (job); - PkBackendAlpmPrivate *priv = pk_backend_get_user_data (backend); - const alpm_list_t *i; -- GString *string = NULL; -+ gchar **replaces = NULL; -+ gint count = 0; - - g_return_val_if_fail (pkg != NULL, NULL); - - /* make a list of the packages that package replaces */ - for (i = alpm_pkg_get_replaces (pkg); i != NULL; i = i->next) { -- alpm_pkg_t *replaces = alpm_db_get_pkg (priv->localdb, i->data); -- -- if (replaces != NULL) { -- g_autofree gchar *package = pk_alpm_pkg_build_id (replaces); -- if (string == NULL) { -- string = g_string_new (package); -- } else { -- g_string_append_printf (string, "&%s", package); -+ alpm_pkg_t *package = alpm_db_get_pkg (priv->localdb, i->data); -+ -+ if (package != NULL) { -+ gchar *id = pk_alpm_pkg_build_id (package); -+ if (id) { -+ replaces = g_realloc (replaces, ((++count) + 1) * sizeof(gchar *)); -+ replaces[count - 1] = id; -+ replaces[count] = NULL; - } - } - } - -- if (string == NULL) -- return NULL; -- return g_string_free (string, FALSE); -+ return replaces; - } - - static gchar ** -@@ -143,8 +142,9 @@ pk_backend_get_update_detail_thread (PkBackendJob *job, GVariant* params, gpoint - PkRestartEnum restart = PK_RESTART_ENUM_NONE; - PkUpdateStateEnum state = PK_UPDATE_STATE_ENUM_STABLE; - alpm_time_t built, installed; -- g_autofree gchar *upgrades = NULL; -- g_autofree gchar *replaces = NULL; -+ gchar *upgrades[2] = { NULL, NULL }; -+ gchar **replaces; -+ gchar **charptr; - g_auto(GStrv) urls = NULL; - g_autofree gchar *issued = NULL; - g_autofree gchar *updated = NULL; -@@ -158,7 +158,7 @@ pk_backend_get_update_detail_thread (PkBackendJob *job, GVariant* params, gpoint - - old = alpm_db_get_pkg (priv->localdb, alpm_pkg_get_name (pkg)); - if (old != NULL) { -- upgrades = pk_alpm_pkg_build_id (old); -+ upgrades[0] = pk_alpm_pkg_build_id (old); - if (pk_alpm_pkg_same_pkgver (pkg, old)) { - reason = "Update to a newer release"; - } else { -@@ -188,10 +188,16 @@ pk_backend_get_update_detail_thread (PkBackendJob *job, GVariant* params, gpoint - updated = pk_alpm_time_to_iso8601 (installed); - } - -- pk_backend_job_update_detail (job, *packages, &upgrades, -- &replaces, urls, NULL, NULL, -+ pk_backend_job_update_detail (job, *packages, upgrades, -+ replaces, urls, NULL, NULL, - restart, reason, NULL, state, - issued, updated); -+ if (upgrades[0]) g_free (upgrades[0]); -+ if (replaces) { -+ for (charptr = replaces; charptr[0]; charptr++) -+ g_free (charptr[0]); -+ g_free(replaces); -+ } - } - - pk_alpm_finish (job, error); --- -2.31.1 - Modified: PKGBUILD =================================================================== --- PKGBUILD 2022-02-17 19:37:26 UTC (rev 1133811) +++ PKGBUILD 2022-02-17 20:15:58 UTC (rev 1133812) @@ -3,8 +3,8 @@ pkgbase='packagekit' pkgname=('packagekit' 'libpackagekit-glib') -pkgver=1.2.4 -pkgrel=3 +pkgver=1.2.5 +pkgrel=1 pkgdesc='A system designed to make installation and updates of packages easier' arch=('x86_64') url='https://www.freedesktop.org/software/PackageKit/' @@ -15,50 +15,9 @@ validpgpkeys=('163EB50119225DB3DF8F49EA17ACBA8DFA970E17' # Richard Hughes <[email protected]> 'EC60AABDF42AAE8FB062640480858FA38F62AF74') # Kalev Lember <[email protected]> source=("https://www.freedesktop.org/software/PackageKit/releases/PackageKit-${pkgver}.tar.xz" - 0001-alpm-remove-unused-error-PK_ERROR_ENUM_REPO_NOT_FOUN.patch - 0002-alpm-fix-change-in-alpm_option_set_logcb-to-add-ctx-.patch - 0003-alpm-adapt-to-changes-in-setting-arch-config-now-a-l.patch - 0004-alpm-fix-changes-in-alpm_option_set_fetchcb-to-add-c.patch - 0005-alpm-adapt-to-changes-in-db-updates-and-total-cb-cal.patch - 0006-alpm-fix-apparent-lack-of-braces-in-if-clause.patch - 0007-alpm-update-to-breaking-changes-in-transactions.patch - 0008-alpm-fix-warning-of-casing-ptr-to-gboolean-this-is-p.patch - 0009-alpm-fix-warning-to-keep-local-var-declarations-c99-.patch - 0010-alpm-fix-bug-waiting-to-happen-with-cast-from-ptr-to.patch - 0011-alpm-silence-warning-for-gool-to-ptr-conversion-with.patch - 0012-alpm-fix-warning-about-fallthrough-be-explicit-about.patch - 0013-build-fix-overall-sysconfdir-handling-so-it-can-work.patch - 0014-Fix-get-updates.patch - 0015-support-new-pacman-options.patch - 0016-alpm-fix-uninitialized-stack-vars-used-later-in-conf.patch - 0017-alpm-fix-missing-handling-of-hookdir-in-pacman.conf.patch - 0018-alpm-fix-get-update-detail-which-uses-totally-wrong-.patch - packagekit-PR523.patch::https://github.com/PackageKit/PackageKit/pull/523.patch - packagekit-PR524.patch::https://github.com/PackageKit/PackageKit/pull/524.patch - packagekit-PR525.patch::https://github.com/PackageKit/PackageKit/pull/525.patch - ) -sha256sums=('f262a1ed7ac19eb1a40bf8509d61de7be578f8543459b5ec0b2414463cce45b8' - '3c4d5a2658c9ed28ff949f7a2aa0c99e1a85e63f7fd0b068d3b9278ace503c16' - '258ff42a2c0f9dd5d609785d5535af35294c5940b63936fa32fdc4cff4b3151d' - '397fe1afd619e9fbb60c49183edcf787afdca65ddc850ba493998c0d8021aad9' - '701993eccaa4fd4d2f79dc9c6d8e03397c0ebaa8d8aaf51fe94c40880cfb5832' - 'b5d1c3c2371e23d23b63ddf20763478576013330dd3225abfc1ccff4e6045a2a' - '1ac4373489fd5a9c762aa133119a55b1a81cc97a0357e84a052949362840890a' - '455c702c7d95c30baa1b3fc04f7c8a34517541c2f2308711bcb1451f2e2a0a2e' - '9eea356888c2d64e8d9fb75609fc1d411ecf7bcac177bad6d70028de57b74883' - '559aa04b1fc875e01d51db5a384142fd24fab86f7f458cb60effdf7b46f80922' - '58bab6f4d9d3ba3b99fe8409cd3602453507219a62714b493453e81c3d6eb50a' - '217d918bc69318523b686ed47c78922633d5a4b736b126abf0d99fad4a584a3e' - 'a2ff81d619e0e9be87188c046367581b61d5756d294012cb886431454afbe249' - '0188f015890681acdded08a2372cf6963a5b9436e98734dcab07b9d0147310c9' - '2e7e542a6115f3ed993c71c63bf41206552f6028282778c7f90fdfb2fd9eebe8' - '12bcda14867620c536d27f52bd9298e5831f693e8b19ee711733a3e92bd2d4f2' - 'a7ae42bbf5a1d4995d2b4f483a78791da57a41d1bcc2ddd52370c8fa19430282' - '589102648833adbda34f46b7b2c1e1849892fda36d5721eed3e36ea6e349156c' - 'fc92f46aabedf25148f94c86c30243d889f7ac4edecaa022cbf5d1f95a8243f9' - '19b65fd5abc7130e4576152b8e9889f606e37b68e3539d2fe063cf5d3e7f90db' - '1c175f61869175e64e8aefb48ea48bb7ef7edb459e959e60664581694b74e6e1' - '89804af70b062f8151e92ba6cdc03e845f110a157abbea3bc3c4b1ef90177722') + '0001-build-fix-overall-sysconfdir-handling-so-it-can-work.patch') +sha256sums=('e08cb9164700ac684386e4257f783493ebac637141d34a8ce8077147ea10ad26' + '1f648e1ad7309e769449783a0ecadc78bac18460518e8b8394f6532d66874d51') prepare() { for _patch in *.patch; do
