Accepting request 1090367 from GNOME:Factory
- Update to version 3.5.3: + Build fixes around strftime() bug workarounds on some architectures/platforms. + Improved compatibility of JSON cursor readers. + Leaks plugged. - Drop 63ea8f1a.patch: Fixed upstream. - Drop %systemd_user_postun_with_restart macro from the %postun directive. It's been deprecated and emptied (expands to nil) on both Tumbleweed and Leap already. - Comment unneded "/usr/bin/env python3" shebang line on utils/ trackertestutils/__main__.py Python script. - Change tracker-data-files package's architecture to noarch, as it doesn't contain any binaries. (forwarded request 1090301 from iznogood) OBS-URL: https://build.opensuse.org/request/show/1090367 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/tracker?expand=0&rev=158
This commit is contained in:
commit
75c8727a23
115
63ea8f1a.patch
115
63ea8f1a.patch
@ -1,115 +0,0 @@
|
|||||||
From 63ea8f1a2a603c356ad770ae7567246e7520f298 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Carlos Garnacho <carlosg@gnome.org>
|
|
||||||
Date: Tue, 2 May 2023 10:27:31 +0200
|
|
||||||
Subject: [PATCH] build: Detect appropriate strftime() year modifier at build
|
|
||||||
time
|
|
||||||
|
|
||||||
Different libc implementations (or different platforms) have different
|
|
||||||
bugs. Even though %Y is documented as a 4-digit number, and %C as
|
|
||||||
year/100 in a [00-99] range, they both crap out with years under 1000,
|
|
||||||
using respectively 3 and 1 digits.
|
|
||||||
|
|
||||||
This would be typically task for a width modifier (e.g. %4Y, or %2C),
|
|
||||||
but that was conversely found to break NixOS on Darwin.
|
|
||||||
|
|
||||||
Since the existing libc bugs paint us to a corner, detect an
|
|
||||||
appropriate modifier at build time to get a 4-digit year to get true
|
|
||||||
ISO 8601 in our supported [0001-9999] year range.
|
|
||||||
|
|
||||||
Closes: https://gitlab.gnome.org/GNOME/tracker/-/issues/402
|
|
||||||
---
|
|
||||||
config.h.meson.in | 3 ++
|
|
||||||
meson.build | 35 +++++++++++++++++++
|
|
||||||
.../core/tracker-db-interface-sqlite.c | 4 +--
|
|
||||||
3 files changed, 40 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/config.h.meson.in b/config.h.meson.in
|
|
||||||
index df4b880b08..2faa1a5860 100644
|
|
||||||
--- a/config.h.meson.in
|
|
||||||
+++ b/config.h.meson.in
|
|
||||||
@@ -51,3 +51,6 @@
|
|
||||||
|
|
||||||
/* Whether RTLD_NOLOAD is defined */
|
|
||||||
#mesondefine HAVE_RTLD_NOLOAD
|
|
||||||
+
|
|
||||||
+/* Appropriate 4-digit year modifier for strftime() */
|
|
||||||
+#mesondefine STRFTIME_YEAR_MODIFIER
|
|
||||||
diff --git a/meson.build b/meson.build
|
|
||||||
index 3c147c8f36..6a7f8e1336 100644
|
|
||||||
--- a/meson.build
|
|
||||||
+++ b/meson.build
|
|
||||||
@@ -198,6 +198,39 @@ else
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
+##################################################################
|
|
||||||
+# Get an appropriate 4-digit year modifier for strftime
|
|
||||||
+##################################################################
|
|
||||||
+result = cc.run('''
|
|
||||||
+ #include <stdio.h>
|
|
||||||
+ #include <string.h>
|
|
||||||
+ #include <time.h>
|
|
||||||
+
|
|
||||||
+ int main (int argc, char *argv[]) {
|
|
||||||
+ char *modifiers[] = { "%Y", "%C%y", "%4Y", "%2C%y", NULL };
|
|
||||||
+ time_t timestamp = -58979923200; /* 0101-01-01T01:01:01Z */
|
|
||||||
+ char *buf[100];
|
|
||||||
+ struct tm tm;
|
|
||||||
+ int i;
|
|
||||||
+ gmtime_r (×tamp, &tm);
|
|
||||||
+ for (i = 0; modifiers[i]; i++) {
|
|
||||||
+ strftime (&buf, sizeof buf, modifiers[i], &tm);
|
|
||||||
+ if (strcmp (&buf, "0101") == 0) {
|
|
||||||
+ printf ("%s", modifiers[i]);
|
|
||||||
+ return 0;
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+ return -1;
|
|
||||||
+ }
|
|
||||||
+ ''',
|
|
||||||
+ name: 'strftime 4-digit year modifier')
|
|
||||||
+
|
|
||||||
+if not result.compiled() or result.returncode() != 0
|
|
||||||
+ error('Libc implementation has broken 4-digit years implementation.')
|
|
||||||
+else
|
|
||||||
+ year_modifier = result.stdout()
|
|
||||||
+endif
|
|
||||||
+
|
|
||||||
##################################################################
|
|
||||||
# Check for libtracker-data and libtracker-fts: Unicode support
|
|
||||||
#
|
|
||||||
@@ -306,6 +339,7 @@ conf.set('TRACKER_MINOR_VERSION', tracker_minor_version)
|
|
||||||
conf.set('TRACKER_MICRO_VERSION', tracker_micro_version)
|
|
||||||
conf.set('TRACKER_INTERFACE_AGE', 0)
|
|
||||||
conf.set('TRACKER_BINARY_AGE', 100 * tracker_minor_version + tracker_micro_version)
|
|
||||||
+conf.set('STRFTIME_YEAR_MODIFIER', '"@0@"'.format(year_modifier))
|
|
||||||
|
|
||||||
# Check for RTLD_NOLOAD
|
|
||||||
have_rtld_noload = cc.has_header_symbol('dlfcn.h', 'RTLD_NOLOAD')
|
|
||||||
@@ -399,6 +433,7 @@ summary = [
|
|
||||||
' Debug: ' + get_option('debug').to_string(),
|
|
||||||
' Optimization: ' + get_option('optimization'),
|
|
||||||
' Compiler: ' + cc.get_id(),
|
|
||||||
+ ' 4-digit strftime() year modifier: ' + year_modifier,
|
|
||||||
'\nFeature Support:',
|
|
||||||
' Unicode support library: ' + unicode_library_name,
|
|
||||||
' Build with Stemming support: ' + have_libstemmer.to_string(),
|
|
||||||
diff --git a/src/libtracker-sparql/core/tracker-db-interface-sqlite.c b/src/libtracker-sparql/core/tracker-db-interface-sqlite.c
|
|
||||||
index 2aa493ca9c..25e2c519fd 100644
|
|
||||||
--- a/src/libtracker-sparql/core/tracker-db-interface-sqlite.c
|
|
||||||
+++ b/src/libtracker-sparql/core/tracker-db-interface-sqlite.c
|
|
||||||
@@ -1624,9 +1624,9 @@ function_sparql_print_value (sqlite3_context *context,
|
|
||||||
result_context_function_error (context, fn, "Invalid unix timestamp");
|
|
||||||
|
|
||||||
if (prop_type == TRACKER_PROPERTY_TYPE_DATETIME)
|
|
||||||
- retval = strftime ((gchar *) &buf, sizeof (buf), "%2C%y-%m-%dT%TZ", &tm);
|
|
||||||
+ retval = strftime ((gchar *) &buf, sizeof (buf), STRFTIME_YEAR_MODIFIER "-%m-%dT%TZ", &tm);
|
|
||||||
else if (prop_type == TRACKER_PROPERTY_TYPE_DATE)
|
|
||||||
- retval = strftime ((gchar *) &buf, sizeof (buf), "%2C%y-%m-%d", &tm);
|
|
||||||
+ retval = strftime ((gchar *) &buf, sizeof (buf), STRFTIME_YEAR_MODIFIER "-%m-%d", &tm);
|
|
||||||
else
|
|
||||||
g_assert_not_reached ();
|
|
||||||
|
|
||||||
--
|
|
||||||
GitLab
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:e93d40bc76103a0a24693818cdab2b34e76c64e260b3e762784faeec4ba4a8b3
|
|
||||||
size 2566540
|
|
3
tracker-3.5.3.tar.xz
Normal file
3
tracker-3.5.3.tar.xz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:1466c8b0897be5d9e056d87e10ad58927b588033f01af2f1a656a8921c3a28ee
|
||||||
|
size 2569412
|
@ -1,3 +1,24 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Jun 1 14:24:22 UTC 2023 - Bjørn Lie <bjorn.lie@gmail.com>
|
||||||
|
|
||||||
|
- Update to version 3.5.3:
|
||||||
|
+ Build fixes around strftime() bug workarounds on some
|
||||||
|
architectures/platforms.
|
||||||
|
+ Improved compatibility of JSON cursor readers.
|
||||||
|
+ Leaks plugged.
|
||||||
|
- Drop 63ea8f1a.patch: Fixed upstream.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu May 18 05:18:39 UTC 2023 - Luciano Santos <luc14n0@opensuse.org>
|
||||||
|
|
||||||
|
- Drop %systemd_user_postun_with_restart macro from the %postun
|
||||||
|
directive. It's been deprecated and emptied (expands to nil) on
|
||||||
|
both Tumbleweed and Leap already.
|
||||||
|
- Comment unneded "/usr/bin/env python3" shebang line on utils/
|
||||||
|
trackertestutils/__main__.py Python script.
|
||||||
|
- Change tracker-data-files package's architecture to noarch, as it
|
||||||
|
doesn't contain any binaries.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sat May 13 11:23:38 UTC 2023 - Bjørn Lie <bjorn.lie@gmail.com>
|
Sat May 13 11:23:38 UTC 2023 - Bjørn Lie <bjorn.lie@gmail.com>
|
||||||
|
|
||||||
|
15
tracker.spec
15
tracker.spec
@ -21,15 +21,13 @@
|
|||||||
%define RPMTrackerAPI 3_0
|
%define RPMTrackerAPI 3_0
|
||||||
|
|
||||||
Name: tracker
|
Name: tracker
|
||||||
Version: 3.5.2
|
Version: 3.5.3
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Object database, tag/metadata database, search tool and indexer
|
Summary: Object database, tag/metadata database, search tool and indexer
|
||||||
License: GPL-2.0-or-later
|
License: GPL-2.0-or-later
|
||||||
Group: Productivity/Other
|
Group: Productivity/Other
|
||||||
URL: https://wiki.gnome.org/Projects/Tracker
|
URL: https://wiki.gnome.org/Projects/Tracker
|
||||||
Source0: https://download.gnome.org/sources/tracker/3.5/%{name}-%{version}.tar.xz
|
Source0: https://download.gnome.org/sources/tracker/3.5/%{name}-%{version}.tar.xz
|
||||||
# PATCH-FIX-OPENSUSE 63ea8f1a.patch -- Revert build: Detect appropriate strftime() year modifier at build time
|
|
||||||
Patch0: https://gitlab.gnome.org/GNOME/tracker/-/commit/63ea8f1a.patch
|
|
||||||
|
|
||||||
BuildRequires: asciidoc
|
BuildRequires: asciidoc
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
@ -126,6 +124,7 @@ This subpackage contains the headers to make use of its libraries.
|
|||||||
%package -n tracker-data-files
|
%package -n tracker-data-files
|
||||||
Summary: Data files for the Tracker Miners
|
Summary: Data files for the Tracker Miners
|
||||||
Group: Productivity/Other
|
Group: Productivity/Other
|
||||||
|
BuildArch: noarch
|
||||||
|
|
||||||
%description -n tracker-data-files
|
%description -n tracker-data-files
|
||||||
Tracker is a desktop-neutral object database, tag/metadata database,
|
Tracker is a desktop-neutral object database, tag/metadata database,
|
||||||
@ -136,8 +135,11 @@ This subpackage contains the data files for the Tracker miners.
|
|||||||
%lang_package
|
%lang_package
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -N
|
%autosetup -p1
|
||||||
%patch0 -R -p1
|
#
|
||||||
|
# Drop unneeded Python 3 shebang
|
||||||
|
#
|
||||||
|
sed -i '1s,#!/usr/bin/env python3,# &,' utils/trackertestutils/__main__.py
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%meson \
|
%meson \
|
||||||
@ -171,9 +173,6 @@ mkdir %{buildroot}%{_datadir}/tracker3/domain-ontologies
|
|||||||
%preun
|
%preun
|
||||||
%systemd_user_preun tracker-xdg-portal-3.service
|
%systemd_user_preun tracker-xdg-portal-3.service
|
||||||
|
|
||||||
%postun
|
|
||||||
%systemd_user_postun_with_restart tracker-xdg-portal-3.service
|
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%license COPYING
|
%license COPYING
|
||||||
%{_bindir}/tracker3
|
%{_bindir}/tracker3
|
||||||
|
Loading…
Reference in New Issue
Block a user