Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions .cirrus.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
task:
name: "Build (freebsd)"
name: "Build & Test (freebsd)"
freebsd_instance:
matrix:
- image_family: freebsd-13-2-snap
- image_family: freebsd-14-2
deps_script:
- env ASSUME_ALWAYS_YES=yes pkg update -f
- env ASSUME_ALWAYS_YES=yes pkg install -y docbook-xsl vala libxslt fontconfig polkit consolekit2
desktop-file-utils gettext meson ninja python3 glib gtk3 pkgconf sqlite3 gobject-introspection
dbus
dbus bash
build_script:
- meson --auto-features=enabled -Db_colorout=never --buildtype debug -Dlocal_checkout=true -Dlocalstatedir=/var
-Dsystemd=false -Doffline_update=false -Dbash_completion=false -Dbash_command_not_found=false
-Dgstreamer_plugin=false _build
-Dgstreamer_plugin=false -Dpackaging_backend=freebsd _build
- cd _build
- ninja -v all
#test_script:
# - cd _build
# - service dbus onestart
# - ninja test
- ninja all
test_script:
- cd _build
- service dbus onestart
- ninja test
110 changes: 110 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
@@ -1,3 +1,113 @@
Version 1.3.1
~~~~~~~~~~~~~
Released: 2025-06-16

Features:
* Add GetResults method to the Offline interface (Gleb Popov)

Backends:
* apt: Fix matching gstreamer pkgs where the only modifier is ()(64bit) (Alessandro Astone)
* apt: Add tests for gst-matcher (Alessandro Astone)
* apt: Define an apt backend static library (Corentin Noël)
* apt: Adjust for libapt-pkg7.0 API (Julian Andres Klode)
* apt: Fix floating point value comparison (Matthias Klumpp)
* apt: Drop remnants of RPM sources support (Matthias Klumpp)
* apt: Add tests for repo-source reading (Matthias Klumpp)
* apt: Add non-destructive Deb822 file parser & streamline sources parsing (Matthias Klumpp)
* apt: Implement enable/disable support for deb822-style repo sources (Matthias Klumpp)
* apt: Harmonize repo-ids between deb822 and legacy sources (Matthias Klumpp)
* apt: Use 'pk_backend_job_details_full()' so download size is reported properly (sid)
* apt: not call dbus on ostree-managed systems (ssk-wh)
* alpm: fix mixed declarations and code (Christian Hesse)
* alpm: fix function declaration prototype (Christian Hesse)
* alpm: Use 'alpm_errno()' rather than incorrect 'errno' for libalpm errors (sid)
* alpm: Fix 'pk_alpm_logcb' printf format warning (sid)
* dnf5: Compile against both libdnf5 version 5.1.x and 5.2.x (Alessandro Astone)
* dnf: Make a bunch of implicit enum conversions explicit (Matthias Klumpp)
* dnf: OpenMandriva: small repo changes (Virtuti Militari)
* entropy/portage: Fix missing 'comma' in meson.install_data () (sidt4)
* freebsd: Use correct types for PackageView::{compressed,flat}size() (Gleb Popov)
* zypp: Mark the correct packages to-be-installed (Jonathan Kang)
* zypp: Raise exception on empty search string (Miika Alikirri)
* zypp: Fix -Werror=missing-declarations by making functions static (sid)
* zypp: Add G_GNUC_UNUSED to unused function 'zypp_get_packages_by_file' (sid)
* zypp: Fix '-Wignored-qualifiers' by removing 'const' (sid)
* zypp: Use 'G_GNUC_PRINTF' attribute to 'zypp_backend_finished_error' and fixup warnings (sid)
* zypp: Disable deprecation errors in zypp backend temporarily (sid)

Bugfixes:
* pk-client-helper: Do not crash on edge-case GIO error (Alessandro Astone)
* pk-client: Allow debconf helper to display Wayland windows (Alessandro Astone)
* pk-task: pk_task_user_accepted/declined_idle_cb actually take an unowned gtask (Corentin Noël)
* PkClient: Use g_atomic_int for the copy count (Corentin Noël)
* PkClient: Remove the proxy_props field (Corentin Noël)
* PkClient: Fix mismatch between remaining and elapsed time (Corentin Noël)
* pk_dbus_get_session: Move ConsoleKit check under the appropriate ifdef case (Gleb Popov)
* Fix check in pk_engine_proxy_logind_cb (Gleb Popov)
* meson: Explicitly specify native argument when adding C++ compiler (Matthias Klumpp)
* pk-client: Fix runtime warning when backend does not support role (Milan Crha)

Miscellaneous:
* Allow changing offline update action without polkit authentication (Alessandro Astone)
* pk-task: Modernize the codebase (Corentin Noël)
* PkPackage: Modernize the codebase (Corentin Noël)
* PkControl: Modernize the codebase (Corentin Noël)
* PkProgress: Move the progress_callback from PkClientState to PkProgress (Corentin Noël)
* Decouple offline_update and systemd Meson features (Gleb Popov)
* Decouple pk-backend from HAVE_SYSTEMD_SD_LOGIN_H (Gleb Popov)
* ci: Build on Debian trixie & latest Fedora (Matthias Klumpp)
* ci: Speed up build tests on Debian (Matthias Klumpp)
* ci: Add ALPM & ZYPP backends to Fedora CI (sid)
* meson: Remove deprecated functions & bump to 1.0 (Matthias Klumpp)
* Compile with C11 + GNU extensions (Matthias Klumpp)
* meson: Bring back maintainer mode for stricter checks (Matthias Klumpp)
* doap: Update the maintainer list to current maintainers (Neal Gompa)
* pkcon: Sort commands in 'pkcon' help output (sid)

Version 1.3.0
~~~~~~~~~~~~~
Released: 2024-06-16

New Features:
* Expand PkInfoEnum to contain package target states for updates (Matthias Klumpp)
* lib: Notify when installed database changed (Milan Crha)

Backends:
* freebsd: Initialize libpkg plugins when doing work (Gleb Popov)
* freebsd: Advertise PK_GROUP_ENUM_VIRTUALIZATION package group (Gleb Popov)
* dnf: Free DNF sacks when they are unused for 10 minutes (Gordon Messmer)
* dnf5: Add dnf5 posttrans notify plugin (Alessandro Astone)
* dnf/zypp: Add support for language(ll_CC) to what-provides queries (Philip Withnall)
* alpm: add compatibility with libalpm 14 (Jelle van der Waa)
* apt: Don't accidentally identify Ubuntu as Debian (Matthias Klumpp)
* apt: Don't limit by-repo-name update classification to Debian and Ubuntu (Matthias Klumpp)
* apt: debconf-helper: Cleanup properly when exiting (Matthias Klumpp)
* apt: Use the correct version number when parsing changelogs (Matthias Klumpp)
* apt: Prefer deb version comparison to strcmp (sid)

Bugfixes:
* Apply i18n for percentage values (Emir SARI)
* metainfo: Mark PK as compulsory for most desktops (Matthias Klumpp)
* pk-progress: Fix a leak of package ID (Philip Withnall)
* Check string length correctly to prevent memory over-consumption [RHEL-19527] (Thibault Guittet)
* pk-offline-update: Fix crash due to invalid g_auto declaration in switch / case (sid)
* PkPackage: Handle all cases for 'update-severity' property (sid)
* pkcon: Use appropriate callbacks for client / task async calls (sid)
* Fix 'g-ir-scanner' matching async / finish warning (sid)
* pk-offline-update: Fix crash during error cases (sid)
* PkControl: Fix crash with 'get-time' transaction (sid)
* PkTask: Fix invalid cast from 'GsPackagekitTask' to 'GTask' (sidt4)

Miscellaneous:
* PkPackageSack: Replace the GSimpleAsyncResult with the GTask API (Corentin Noël)
* PkControl: Replace the GSimpleAsyncResult with the GTask API (Corentin Noël)
* PkTask: Replace the GSimpleAsyncResult with the GTask API (Corentin Noël)
* PkClient, PkProgress, PkCategory: Use a more modern GObject style (Corentin Noël)
* Enable building FreeBSD backend on FreeBSD CI (Gleb Popov)
* Convert README to Markdown (Matthias Klumpp)
* pk-matrix.html: Document which backends support InstalledChanged signal (Milan Crha)
* docs: Update real-time chat room to point to the new Matrix room (Neal Gompa)

Version 1.2.8
~~~~~~~~~~~~~
Released: 2023-11-08
Expand Down
11 changes: 9 additions & 2 deletions PackageKit.doap
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,15 @@

<maintainer>
<foaf:Person>
<foaf:name>Richard Hughes</foaf:name>
<foaf:homepage rdf:resource="http://www.hughsie.com/" />
<foaf:name>Neal Gompa</foaf:name>
<foaf:homepage rdf:resource="https://neal.gompa.dev/" />
</foaf:Person>
</maintainer>

<maintainer>
<foaf:Person>
<foaf:name>Matthias Klumpp</foaf:name>
<foaf:homepage rdf:resource="https://tenstral.net/" />
</foaf:Person>
</maintainer>

Expand Down
10 changes: 7 additions & 3 deletions README → README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
PackageKit
A DBUS packaging abstraction layer
PackageKit
==========
<img align="right" src="docs/html/img/packagekit.png">

PackageKit is a DBUS abstraction layer that allows the session user to manage
A DBus packaging abstraction layer

PackageKit is a DBus abstraction layer that allows the session user to manage
packages in a secure way using a cross-distro, cross-architecture API.

For more information, please see https://www.freedesktop.org/software/PackageKit/

Download releases at: https://www.freedesktop.org/software/PackageKit/releases/
22 changes: 9 additions & 13 deletions RELEASE
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,16 @@ PackageKit Release Notes

1. Write NEWS entries for PackageKit in the same format as usual.

git shortlog v1.2.7.. | grep -i -v trivial | grep -v Merge > NEWS.new
git shortlog v1.3.0.. | grep -i -v trivial | grep -v Merge > NEWS.new

--------------------------------------------------------------------------------
Version 1.2.8
Version 1.3.1
~~~~~~~~~~~~~
Released: 2023-xx-xx
Released: 2024-xx-xx

Notes:

New Features:

Libraries:
Features:

Backends:

Expand All @@ -35,8 +33,8 @@ git add ../po/*.po
4. Commit changes in PackageKit git:

# MAKE SURE THESE ARE CORRECT
export release_version="1.2.8"
export release_tag="v1.2.8"
export release_version="1.3.1"
export release_tag="v1.3.1"

git commit -a -m "Release ${release_version}"
git tag -s -f -m "Release ${release_version}" "${release_tag}"
Expand All @@ -45,12 +43,10 @@ git push
git push git+ssh://hughsient@git.freedesktop.org/git/packagekit
git push --tags git+ssh://hughsient@git.freedesktop.org/git/packagekit

5. run 'ninja dist'
5. run 'meson dist'

5a. Generate the additon verification metadata
5a. Sign the release

sha1sum meson-dist/PackageKit-${release_version}.tar.xz > meson-dist/PackageKit-${release_version}.tar.xz.sha1
sha256sum meson-dist/PackageKit-${release_version}.tar.xz > meson-dist/PackageKit-${release_version}.tar.xz.sha256
gpg -b -a meson-dist/PackageKit-${release_version}.tar.xz

6. Upload tarball to:
Expand All @@ -67,7 +63,7 @@ git push
9. Send an email to packagekit@lists.freedesktop.org

=================================================
PackageKit 1.2.8 released!
PackageKit 1.3.1 released!

Tarballs available here: https://www.freedesktop.org/software/PackageKit/releases/

Expand Down
2 changes: 1 addition & 1 deletion backends/alpm/meson.build
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
alpm_dep = dependency('libalpm', version: '>=13.0.0')
alpm_dep = dependency('libalpm', version: '>=15.0.0')

shared_module(
'pk_backend_alpm',
Expand Down
17 changes: 14 additions & 3 deletions backends/alpm/pk-alpm-config.c
Original file line number Diff line number Diff line change
Expand Up @@ -605,13 +605,24 @@ pk_alpm_config_parse (PkAlpmConfig *config, const gchar *filename,
continue;
}

if (g_strcmp0 (key, "Usage") == 0 && str != NULL) {
/* Ignore "Usage" key instead of crashing */
/* ignore these instead of crashing */
if (g_strcmp0 (key, "CacheServer") == 0 && str != NULL) {
continue;
}

if (g_strcmp0 (key, "DisableSandbox") == 0) {
continue;
}

if (g_strcmp0 (key, "DownloadUser") == 0 && str != NULL) {
continue;
}

if (g_strcmp0 (key, "ParallelDownloads") == 0 && str != NULL) {
/* Ignore "ParallelDownloads" key instead of crashing */
continue;
}

if (g_strcmp0 (key, "Usage") == 0 && str != NULL) {
continue;
}

Expand Down
3 changes: 2 additions & 1 deletion backends/alpm/pk-alpm-sync.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ pk_alpm_transaction_sync_targets (PkBackendJob *job, const gchar **packages, gbo
g_auto(GStrv) package = pk_package_id_split (*packages);
gchar *repo = package[PK_PACKAGE_ID_DATA];
gchar *name = package[PK_PACKAGE_ID_NAME];
alpm_pkg_t *dep_to_remove;

const alpm_list_t *i = alpm_get_syncdbs (priv->alpm);
alpm_pkg_t *pkg;
Expand All @@ -61,7 +62,7 @@ pk_alpm_transaction_sync_targets (PkBackendJob *job, const gchar **packages, gbo
}

pkg = alpm_db_get_pkg (i->data, name);
alpm_pkg_t *dep_to_remove = pk_alpm_pkg_replaces(priv->localdb, pkg);
dep_to_remove = pk_alpm_pkg_replaces(priv->localdb, pkg);
if (dep_to_remove) {
g_debug("scheduling to remove %s for %s", alpm_pkg_get_name(dep_to_remove), name);
alpm_remove_pkg(priv->alpm, dep_to_remove);
Expand Down
17 changes: 10 additions & 7 deletions backends/alpm/pk-alpm-transaction.c
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ pk_alpm_transaction_conv_cb (void *ctx, alpm_question_t *question)
}

static void
pk_alpm_transaction_output_end ()
pk_alpm_transaction_output_end (void)
{
tpkg = NULL;

Expand Down Expand Up @@ -865,16 +865,19 @@ pk_alpm_conflict_build_list (const alpm_list_t *i)
alpm_conflict_t *conflict = (alpm_conflict_t *) i->data;
alpm_depend_t *depend = conflict->reason;

if (g_strcmp0 (conflict->package1, depend->name) == 0 ||
g_strcmp0 (conflict->package2, depend->name) == 0) {
const char *package_name1 = alpm_pkg_get_name (conflict->package1);
const char *package_name2 = alpm_pkg_get_name (conflict->package2);

if (g_strcmp0 (package_name1, depend->name) == 0 ||
g_strcmp0 (package_name2, depend->name) == 0) {
g_string_append_printf (list, "%s <-> %s, ",
conflict->package1,
conflict->package2);
package_name1,
package_name2);
} else {
char *reason = alpm_dep_compute_string (depend);
g_string_append_printf (list, "%s <-> %s (%s), ",
conflict->package1,
conflict->package2, reason);
package_name1,
package_name2, reason);
free (reason);
}
}
Expand Down
9 changes: 5 additions & 4 deletions backends/alpm/pk-alpm-update.c
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ pk_alpm_refresh_databases (PkBackendJob *job, gint force, alpm_list_t *dbs, GErr
result = alpm_db_update (priv->alpm, dbs, force);
if (result < 0) {
g_set_error (error, PK_ALPM_ERROR, alpm_errno (priv->alpm), "failed to update database: %s",
alpm_strerror (errno));
alpm_strerror (alpm_errno (priv->alpm)));
return FALSE;
}

Expand All @@ -285,6 +285,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_list_t *i;
int ret;

if (!pk_alpm_transaction_initialize (job, 0, NULL, error))
return FALSE;
Expand All @@ -293,7 +294,7 @@ pk_alpm_update_databases (PkBackendJob *job, gint force, GError **error)
pk_backend_job_set_status (job, PK_STATUS_ENUM_DOWNLOAD_PACKAGELIST);

i = alpm_get_syncdbs (priv->alpm);
int ret = pk_alpm_refresh_databases(job, force, i, error);
ret = pk_alpm_refresh_databases(job, force, i, error);

if (i == NULL)
return pk_alpm_transaction_end (job, error);
Expand Down Expand Up @@ -355,9 +356,10 @@ static int dep_vercmp(const char *version1, alpm_depmod_t mod,
alpm_pkg_t *
pk_alpm_pkg_replaces (alpm_db_t *db, alpm_pkg_t *pkg)
{
gboolean ret = FALSE;

g_return_val_if_fail (db != NULL, FALSE);
g_return_val_if_fail (pkg != NULL, FALSE);
gboolean ret = FALSE;

for (alpm_list_t *list = alpm_pkg_get_replaces (pkg); list != NULL && !ret; list = list->next) {
alpm_depend_t *depend = list->data;
Expand All @@ -373,7 +375,6 @@ static alpm_pkg_t *
pk_alpm_pkg_find_update (alpm_pkg_t *pkg, const alpm_list_t *dbs)
{
const gchar *name;
const alpm_list_t *i;

g_return_val_if_fail (pkg != NULL, NULL);

Expand Down
2 changes: 2 additions & 0 deletions backends/alpm/pk-backend-alpm.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ pk_alpm_logcb (void *ctx, alpm_loglevel_t level, const gchar *format, va_list ar

if (format == NULL || format[0] == '\0')
return;
#pragma GCC diagnostic ignored "-Wsuggest-attribute=format"
output = g_strdup_vprintf (format, args);
#pragma GCC diagnostic pop

/* report important output to PackageKit */
switch (level) {
Expand Down
4 changes: 2 additions & 2 deletions backends/apt/20packagekit
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
// Whenever dpkg is called we might have different updates
// i.e. if an user removes a package that had an update
DPkg::Post-Invoke {
"/usr/bin/test -e /usr/share/dbus-1/system-services/org.freedesktop.PackageKit.service && /usr/bin/test -S /var/run/dbus/system_bus_socket && /usr/bin/gdbus call --system --dest org.freedesktop.PackageKit --object-path /org/freedesktop/PackageKit --timeout 4 --method org.freedesktop.PackageKit.StateHasChanged cache-update > /dev/null; /bin/echo > /dev/null";
"/usr/bin/test -e /usr/share/dbus-1/system-services/org.freedesktop.PackageKit.service && /usr/bin/test -S /var/run/dbus/system_bus_socket && /usr/bin/test ! -e /run/ostree-booted && /usr/bin/gdbus call --system --dest org.freedesktop.PackageKit --object-path /org/freedesktop/PackageKit --timeout 4 --method org.freedesktop.PackageKit.StateHasChanged cache-update > /dev/null; /bin/echo > /dev/null";
};

// When APT's cache is updated (i.e. apt-cache update)
APT::Update::Post-Invoke-Success {
"/usr/bin/test -e /usr/share/dbus-1/system-services/org.freedesktop.PackageKit.service && /usr/bin/test -S /var/run/dbus/system_bus_socket && /usr/bin/gdbus call --system --dest org.freedesktop.PackageKit --object-path /org/freedesktop/PackageKit --timeout 4 --method org.freedesktop.PackageKit.StateHasChanged cache-update > /dev/null; /bin/echo > /dev/null";
"/usr/bin/test -e /usr/share/dbus-1/system-services/org.freedesktop.PackageKit.service && /usr/bin/test -S /var/run/dbus/system_bus_socket && /usr/bin/test ! -e /run/ostree-booted && /usr/bin/gdbus call --system --dest org.freedesktop.PackageKit --object-path /org/freedesktop/PackageKit --timeout 4 --method org.freedesktop.PackageKit.StateHasChanged cache-update > /dev/null; /bin/echo > /dev/null";
};
Loading
Loading