diff mbox series

[meta-gnome,PATCHv2] tracker: upgrade 3.5.1 -> 3.6.0

Message ID 20230918011813.12059-1-f_l_k@t-online.de
State Under Review
Headers show
Series [meta-gnome,PATCHv2] tracker: upgrade 3.5.1 -> 3.6.0 | expand

Commit Message

Markus Volk Sept. 18, 2023, 1:18 a.m. UTC
- fix various reproducibility issues
- fix gobject-introspection build
- build vapi dependent on GI_DATA_ENABLED

Signed-off-by: Markus Volk <f_l_k@t-online.de>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 .../tracker/0001-fix-reproducibility.patch    | 78 +++++++++++++++++++
 .../{tracker_3.5.1.bb => tracker_3.6.0.bb}    | 19 +++--
 2 files changed, 90 insertions(+), 7 deletions(-)
 create mode 100644 meta-gnome/recipes-gnome/tracker/tracker/0001-fix-reproducibility.patch
 rename meta-gnome/recipes-gnome/tracker/{tracker_3.5.1.bb => tracker_3.6.0.bb} (63%)

Comments

Khem Raj Sept. 19, 2023, 12:14 a.m. UTC | #1
On Sun, Sep 17, 2023 at 6:18 PM Markus Volk <f_l_k@t-online.de> wrote:
>
> - fix various reproducibility issues
> - fix gobject-introspection build
> - build vapi dependent on GI_DATA_ENABLED
>
> Signed-off-by: Markus Volk <f_l_k@t-online.de>
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> ---
>  .../tracker/0001-fix-reproducibility.patch    | 78 +++++++++++++++++++
>  .../{tracker_3.5.1.bb => tracker_3.6.0.bb}    | 19 +++--
>  2 files changed, 90 insertions(+), 7 deletions(-)
>  create mode 100644 meta-gnome/recipes-gnome/tracker/tracker/0001-fix-reproducibility.patch
>  rename meta-gnome/recipes-gnome/tracker/{tracker_3.5.1.bb => tracker_3.6.0.bb} (63%)
>
> diff --git a/meta-gnome/recipes-gnome/tracker/tracker/0001-fix-reproducibility.patch b/meta-gnome/recipes-gnome/tracker/tracker/0001-fix-reproducibility.patch
> new file mode 100644
> index 000000000..30a58923c
> --- /dev/null
> +++ b/meta-gnome/recipes-gnome/tracker/tracker/0001-fix-reproducibility.patch
> @@ -0,0 +1,78 @@
> +From e5acd475f796420b4887969f2b0057dbf67979b3 Mon Sep 17 00:00:00 2001
> +From: Markus Volk <f_l_k@t-online.de>
> +Date: Mon, 18 Sep 2023 02:47:55 +0200
> +Subject: [PATCH] tracker: fix reproducibility issue
> +
> +Tracker's design seems to be strictly for non-cross builds and leaks buildpaths into the
> +binaries at various places. Avoid this to improve binary reproducibility.
> +
> +todo: Some of these paths may need to be adjusted to make the test environment work


This patch is missing upstream-status, since I have accepted this
already please send an incremental fix to update it.

AssertionError: 1 != 0 : Found following patches with malformed or
missing upstream status:
/home/pokybuild/yocto-worker/meta-oe/build/meta-openembedded/meta-gnome/recipes-gnome/tracker/tracker/0001-fix-reproducibility.patch


> +
> +Signed-off-by: Markus Volk <f_l_k@t-online.de>
> +---
> + meson.build                       | 6 +++---
> + src/libtracker-common/meson.build | 4 ++--
> + src/libtracker-sparql/meson.build | 4 ++--
> + 3 files changed, 7 insertions(+), 7 deletions(-)
> +
> +diff --git a/meson.build b/meson.build
> +index 8442a216f..82844d7fd 100644
> +--- a/meson.build
> ++++ b/meson.build
> +@@ -348,7 +348,7 @@ have_rtld_noload = cc.has_header_symbol('dlfcn.h', 'RTLD_NOLOAD')
> + conf.set('HAVE_RTLD_NOLOAD', have_rtld_noload)
> +
> + # Config that goes in some other generated files (.desktop, .service, etc)
> +-conf.set('abs_top_builddir', meson.current_build_dir())
> ++conf.set('abs_top_builddir', '/usr/src/debug/tracker')
> + conf.set('libexecdir', join_paths(get_option('prefix'), get_option('libexecdir')))
> +
> + configure_file(input: 'config.h.meson.in',
> +@@ -388,8 +388,8 @@ subdir('docs')
> + subdir('utils')
> +
> + test_c_args = tracker_c_args + [
> +-    '-DTOP_BUILDDIR="@0@"'.format(build_root),
> +-    '-DTOP_SRCDIR="@0@"'.format(source_root),
> ++    '-DTOP_BUILDDIR="@0@/"'.format('/usr/src/debug/tracker'),
> ++    '-DTOP_SRCDIR="@0@/"'.format('/usr/src/debug/tracker'),
> + ]
> +
> + tracker_uninstalled_cli_dir = join_paths(meson.current_build_dir(), 'src', 'tracker')
> +diff --git a/src/libtracker-common/meson.build b/src/libtracker-common/meson.build
> +index 9355d1c0d..cdbc05f28 100644
> +--- a/src/libtracker-common/meson.build
> ++++ b/src/libtracker-common/meson.build
> +@@ -51,10 +51,10 @@ libtracker_common = static_library('tracker-common',
> +   dependencies: [tracker_common_dependencies, gmodule],
> +   c_args: [
> +     '-DPRIVATE_LIBDIR="@0@"'.format(tracker_internal_libs_dir),
> +-    '-DBUILD_LIBDIR="@0@"'.format(meson.current_build_dir()),
> ++    '-DBUILD_LIBDIR="@0@"'.format('/usr/src/debug/tracker'),
> +     # Global build root is required to detect noinst situations (tests/introspection),
> +     # event when built as a subproject
> +-    '-DBUILDROOT="@0@"'.format(meson.global_build_root()),
> ++    '-DBUILDROOT="@0@"'.format('/usr/src/debug/tracker'),
> +   ] + tracker_c_args,
> +   include_directories: [configinc, srcinc],
> +   gnu_symbol_visibility: 'hidden',
> +diff --git a/src/libtracker-sparql/meson.build b/src/libtracker-sparql/meson.build
> +index 36288f5c3..61086a697 100644
> +--- a/src/libtracker-sparql/meson.build
> ++++ b/src/libtracker-sparql/meson.build
> +@@ -96,10 +96,10 @@ libtracker_sparql_private = static_library('tracker-sparql-private',
> +     c_args: [
> +       '-include', 'libtracker-sparql/tracker-private.h',
> +         '-DPRIVATE_LIBDIR="@0@"'.format(tracker_internal_libs_dir),
> +-        '-DBUILD_LIBDIR="@0@"'.format(meson.current_build_dir()),
> ++        '-DBUILD_LIBDIR="@0@"'.format('/usr/src/debug/tracker'),
> +         # Global build root is required to detect noinst situations (tests/introspection),
> +         # event when built as a subproject
> +-        '-DBUILDROOT="@0@"'.format(meson.global_build_root()),
> ++        '-DBUILDROOT="@0@"'.format('/usr/src/debug/tracker'),
> +     ] + tracker_c_args,
> +
> +     dependencies: [libtracker_sparql_dependencies, gvdb_dep],
> +--
> +2.41.0
> +
> diff --git a/meta-gnome/recipes-gnome/tracker/tracker_3.5.1.bb b/meta-gnome/recipes-gnome/tracker/tracker_3.6.0.bb
> similarity index 63%
> rename from meta-gnome/recipes-gnome/tracker/tracker_3.5.1.bb
> rename to meta-gnome/recipes-gnome/tracker/tracker_3.6.0.bb
> index 6dd8af239..d2eb392a0 100644
> --- a/meta-gnome/recipes-gnome/tracker/tracker_3.5.1.bb
> +++ b/meta-gnome/recipes-gnome/tracker/tracker_3.6.0.bb
> @@ -20,14 +20,10 @@ DEPENDS = " \
>
>  GNOMEBASEBUILDCLASS = "meson"
>
> -inherit gnomebase gsettings gobject-introspection vala gtk-doc manpages bash-completion features_check python3native
> +inherit gettext gnomebase gsettings gobject-introspection vala gtk-doc  bash-completion python3native
>
> -SRC_URI += "file://0001-meson-Do-not-define-TOP_SRCDIR.patch"
> -SRC_URI[archive.sha256sum] = "f972d50ac7bafdccf113b1eb99dcae35404685a99e55bfef16f3ac83b4de974d"
> -
> -# gobject-introspection is mandatory and cannot be configured
> -REQUIRED_DISTRO_FEATURES = "gobject-introspection-data"
> -GIR_MESON_OPTION = ""
> +SRC_URI += "file://0001-fix-reproducibility.patch"
> +SRC_URI[archive.sha256sum] = "52592cfe19baffd16dbe47475be7da750dbd0b6333fd7acb60faa9da5bc40df2"
>
>  # text search is not an option anymore and requires sqlite3 build with
>  # PACKAGECONFIG[fts5] set (default)
> @@ -45,8 +41,17 @@ EXTRA_OEMESON = " \
>      -Dsystemd_user_services=${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)} \
>      -Dsystemd_user_services_dir=${systemd_user_unitdir} \
>      -Dsoup=soup3 \
> +    ${@bb.utils.contains('GI_DATA_ENABLED', 'True', '-Dvapi=enabled', '-Dvapi=disabled', d)} \
>  "
>
> +do_install:prepend() {
> +    sed -i -e 's|${B}/../${PN}-${PV}|/usr/src/debug/${PN}/${PV}-${PR}|g' ${B}/src/libtracker-sparql/tracker-sparql-enum-types.c
> +    sed -i -e 's|${B}/../${PN}-${PV}|/usr/src/debug/${PN}/${PV}-${PR}|g' ${B}/src/libtracker-sparql/core/tracker-data-enum-types.c
> +}
> +
> +GIR_MESON_ENABLE_FLAG = 'enabled'
> +GIR_MESON_DISABLE_FLAG = 'disabled'
> +
>  FILES:${PN} += " \
>      ${datadir}/dbus-1 \
>      ${datadir}/tracker3 \
> --
> 2.41.0
>
diff mbox series

Patch

diff --git a/meta-gnome/recipes-gnome/tracker/tracker/0001-fix-reproducibility.patch b/meta-gnome/recipes-gnome/tracker/tracker/0001-fix-reproducibility.patch
new file mode 100644
index 000000000..30a58923c
--- /dev/null
+++ b/meta-gnome/recipes-gnome/tracker/tracker/0001-fix-reproducibility.patch
@@ -0,0 +1,78 @@ 
+From e5acd475f796420b4887969f2b0057dbf67979b3 Mon Sep 17 00:00:00 2001
+From: Markus Volk <f_l_k@t-online.de>
+Date: Mon, 18 Sep 2023 02:47:55 +0200
+Subject: [PATCH] tracker: fix reproducibility issue
+
+Tracker's design seems to be strictly for non-cross builds and leaks buildpaths into the
+binaries at various places. Avoid this to improve binary reproducibility.
+
+todo: Some of these paths may need to be adjusted to make the test environment work
+
+Signed-off-by: Markus Volk <f_l_k@t-online.de>
+---
+ meson.build                       | 6 +++---
+ src/libtracker-common/meson.build | 4 ++--
+ src/libtracker-sparql/meson.build | 4 ++--
+ 3 files changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/meson.build b/meson.build
+index 8442a216f..82844d7fd 100644
+--- a/meson.build
++++ b/meson.build
+@@ -348,7 +348,7 @@ have_rtld_noload = cc.has_header_symbol('dlfcn.h', 'RTLD_NOLOAD')
+ conf.set('HAVE_RTLD_NOLOAD', have_rtld_noload)
+ 
+ # Config that goes in some other generated files (.desktop, .service, etc)
+-conf.set('abs_top_builddir', meson.current_build_dir())
++conf.set('abs_top_builddir', '/usr/src/debug/tracker')
+ conf.set('libexecdir', join_paths(get_option('prefix'), get_option('libexecdir')))
+ 
+ configure_file(input: 'config.h.meson.in',
+@@ -388,8 +388,8 @@ subdir('docs')
+ subdir('utils')
+ 
+ test_c_args = tracker_c_args + [
+-    '-DTOP_BUILDDIR="@0@"'.format(build_root),
+-    '-DTOP_SRCDIR="@0@"'.format(source_root),
++    '-DTOP_BUILDDIR="@0@/"'.format('/usr/src/debug/tracker'),
++    '-DTOP_SRCDIR="@0@/"'.format('/usr/src/debug/tracker'),
+ ]
+ 
+ tracker_uninstalled_cli_dir = join_paths(meson.current_build_dir(), 'src', 'tracker')
+diff --git a/src/libtracker-common/meson.build b/src/libtracker-common/meson.build
+index 9355d1c0d..cdbc05f28 100644
+--- a/src/libtracker-common/meson.build
++++ b/src/libtracker-common/meson.build
+@@ -51,10 +51,10 @@ libtracker_common = static_library('tracker-common',
+   dependencies: [tracker_common_dependencies, gmodule],
+   c_args: [
+     '-DPRIVATE_LIBDIR="@0@"'.format(tracker_internal_libs_dir),
+-    '-DBUILD_LIBDIR="@0@"'.format(meson.current_build_dir()),
++    '-DBUILD_LIBDIR="@0@"'.format('/usr/src/debug/tracker'),
+     # Global build root is required to detect noinst situations (tests/introspection),
+     # event when built as a subproject
+-    '-DBUILDROOT="@0@"'.format(meson.global_build_root()),
++    '-DBUILDROOT="@0@"'.format('/usr/src/debug/tracker'),
+   ] + tracker_c_args,
+   include_directories: [configinc, srcinc],
+   gnu_symbol_visibility: 'hidden',
+diff --git a/src/libtracker-sparql/meson.build b/src/libtracker-sparql/meson.build
+index 36288f5c3..61086a697 100644
+--- a/src/libtracker-sparql/meson.build
++++ b/src/libtracker-sparql/meson.build
+@@ -96,10 +96,10 @@ libtracker_sparql_private = static_library('tracker-sparql-private',
+     c_args: [
+ 	'-include', 'libtracker-sparql/tracker-private.h',
+         '-DPRIVATE_LIBDIR="@0@"'.format(tracker_internal_libs_dir),
+-        '-DBUILD_LIBDIR="@0@"'.format(meson.current_build_dir()),
++        '-DBUILD_LIBDIR="@0@"'.format('/usr/src/debug/tracker'),
+         # Global build root is required to detect noinst situations (tests/introspection),
+         # event when built as a subproject
+-        '-DBUILDROOT="@0@"'.format(meson.global_build_root()),
++        '-DBUILDROOT="@0@"'.format('/usr/src/debug/tracker'),
+     ] + tracker_c_args,
+ 
+     dependencies: [libtracker_sparql_dependencies, gvdb_dep],
+-- 
+2.41.0
+
diff --git a/meta-gnome/recipes-gnome/tracker/tracker_3.5.1.bb b/meta-gnome/recipes-gnome/tracker/tracker_3.6.0.bb
similarity index 63%
rename from meta-gnome/recipes-gnome/tracker/tracker_3.5.1.bb
rename to meta-gnome/recipes-gnome/tracker/tracker_3.6.0.bb
index 6dd8af239..d2eb392a0 100644
--- a/meta-gnome/recipes-gnome/tracker/tracker_3.5.1.bb
+++ b/meta-gnome/recipes-gnome/tracker/tracker_3.6.0.bb
@@ -20,14 +20,10 @@  DEPENDS = " \
 
 GNOMEBASEBUILDCLASS = "meson"
 
-inherit gnomebase gsettings gobject-introspection vala gtk-doc manpages bash-completion features_check python3native
+inherit gettext gnomebase gsettings gobject-introspection vala gtk-doc  bash-completion python3native
 
-SRC_URI += "file://0001-meson-Do-not-define-TOP_SRCDIR.patch"
-SRC_URI[archive.sha256sum] = "f972d50ac7bafdccf113b1eb99dcae35404685a99e55bfef16f3ac83b4de974d"
-
-# gobject-introspection is mandatory and cannot be configured
-REQUIRED_DISTRO_FEATURES = "gobject-introspection-data"
-GIR_MESON_OPTION = ""
+SRC_URI += "file://0001-fix-reproducibility.patch"
+SRC_URI[archive.sha256sum] = "52592cfe19baffd16dbe47475be7da750dbd0b6333fd7acb60faa9da5bc40df2"
 
 # text search is not an option anymore and requires sqlite3 build with
 # PACKAGECONFIG[fts5] set (default)
@@ -45,8 +41,17 @@  EXTRA_OEMESON = " \
     -Dsystemd_user_services=${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)} \
     -Dsystemd_user_services_dir=${systemd_user_unitdir} \
     -Dsoup=soup3 \
+    ${@bb.utils.contains('GI_DATA_ENABLED', 'True', '-Dvapi=enabled', '-Dvapi=disabled', d)} \
 "
 
+do_install:prepend() {
+    sed -i -e 's|${B}/../${PN}-${PV}|/usr/src/debug/${PN}/${PV}-${PR}|g' ${B}/src/libtracker-sparql/tracker-sparql-enum-types.c
+    sed -i -e 's|${B}/../${PN}-${PV}|/usr/src/debug/${PN}/${PV}-${PR}|g' ${B}/src/libtracker-sparql/core/tracker-data-enum-types.c
+}
+
+GIR_MESON_ENABLE_FLAG = 'enabled'
+GIR_MESON_DISABLE_FLAG = 'disabled'
+
 FILES:${PN} += " \
     ${datadir}/dbus-1 \
     ${datadir}/tracker3 \