diff --git a/patches/01-fix-double-free-in-libxmlb.diff b/patches/01-fix-double-free-in-libxmlb.diff new file mode 100644 index 000000000..5b5e933a6 --- /dev/null +++ b/patches/01-fix-double-free-in-libxmlb.diff @@ -0,0 +1,22 @@ +diff --git a/src/xb-builder.c b/src/xb-builder.c +index 472ade8..f76ae98 100644 +--- a/src/xb-builder.c ++++ b/src/xb-builder.c +@@ -442,7 +442,7 @@ xb_builder_xml_lang_prio_cb(XbBuilderNode *bn, gpointer user_data) + for (guint i = 0; i < nodes->len; i++) { + XbBuilderNode *bn2 = g_ptr_array_index(nodes, i); + if (xb_builder_node_get_priority(bn2) < prio_best) +- g_ptr_array_add(nodes_to_destroy, bn2); ++ g_ptr_array_add(nodes_to_destroy, g_object_ref(bn2)); + + /* never visit this node again */ + xb_builder_node_set_priority(bn2, -2); +@@ -765,7 +765,7 @@ xb_builder_compile(XbBuilder *self, + XbBuilderNodetabHelper nodetab_helper = { + .buf = NULL, + }; +- g_autoptr(GPtrArray) nodes_to_destroy = g_ptr_array_new(); ++ g_autoptr(GPtrArray) nodes_to_destroy = g_ptr_array_new_with_free_func((GDestroyNotify)g_object_unref); + g_autoptr(GTimer) timer = xb_silo_start_profile(priv->silo); + g_autoptr(XbBuilderCompileHelper) helper = NULL; + diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index e68a892ac..961f7cd39 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -116,6 +116,7 @@ parts: - -Dvala-bindings=false - -Dqt-bindings=false - -Dqml-bindings=false + - -Dsoup2=true organize: snap/snap-store/current/usr: usr build-packages: @@ -138,7 +139,23 @@ parts: prime: - -* + xmlb: + source: https://github.com/hughsie/libxmlb + source-type: git + plugin: meson + source-tag: "0.3.9" + meson-parameters: + - --prefix=/usr + - -Dgtkdoc=false + - -Dintrospection=false + override-pull: | + snapcraftctl pull + for i in $SNAPCRAFT_PROJECT_DIR/patches/*.diff; do + patch -p1 < $i + done + fwupd: + after: [ xmlb ] plugin: meson meson-parameters: - --prefix=/usr @@ -153,8 +170,6 @@ parts: - -Defi_binary=false - -Dplugin_logitech_bulkcontroller=false #workaround undefined plugin_deps - -Dplugin_msr=false - - "-Dlibxmlb:gtkdoc=false" - - "-Dlibxmlb:introspection=false" - "-Dlibjcat:man=false" - "-Dlibjcat:gtkdoc=false" - "-Dlibjcat:introspection=false" @@ -218,7 +233,7 @@ parts: - -usr/lib/*/libgnutls* snap-store: - after: [snapd-glib, autostart, launchpad-translations, fwupd] + after: [snapd-glib, autostart, launchpad-translations, fwupd, xmlb] source: . plugin: meson meson-parameters: @@ -234,8 +249,6 @@ parts: - -Dgtk_doc=false - -Dvalgrind=false - -Dmalcontent=false - - "-Dlibxmlb:gtkdoc=false" - - "-Dlibxmlb:introspection=false" - "-Dappstream:gir=false" - "-Dappstream:stemming=true" - "-Dappstream:apt-support=true"