From 9fd7c4add17dde46820421941ed4926406a614d2 Mon Sep 17 00:00:00 2001 From: Randall Flagg Date: Sun, 6 Sep 2026 20:41:14 +0100 Subject: [PATCH] fsearch: update to 0.3.1 --- srcpkgs/fsearch/INSTALL.msg | 61 +++++++++++++++++++++++++ srcpkgs/fsearch/patches/query.patch | 71 ++++++++++------------------- srcpkgs/fsearch/template | 22 +++++++-- 3 files changed, 103 insertions(+), 51 deletions(-) create mode 100644 srcpkgs/fsearch/INSTALL.msg diff --git a/srcpkgs/fsearch/INSTALL.msg b/srcpkgs/fsearch/INSTALL.msg new file mode 100644 index 00000000000000..7567c97d61eb81 --- /dev/null +++ b/srcpkgs/fsearch/INSTALL.msg @@ -0,0 +1,61 @@ +NOTICE: fsearch 0.3.x configuration format changed. + +The old configuration (0.2.x) used fsearch.conf in INI format. +This format is no longer valid. fsearch does NOT +automatically migrate your settings. +You must migrate your settings to the new JSON format BEFORE +launching the new version. + +Before launching the new version: + + 1. Backup your old config (recommended) + mv ~/.config/fsearch/fsearch.conf \ + ~/.config/fsearch/fsearch.conf.bak 2>/dev/null + + 2. Remove legacy database index + rm -f ~/.local/share/fsearch/fsearch.db + + 3. Migrate your settings to the new JSON format. + See the mapping below for common settings. + +Configuration migration (0.2.x -> 0.3.x): + +Old format (fsearch.conf - INI): + + [Database] + folders=/home/void;/media/storage; + exclude_paths=/home/void/.cache;/tmp; + exclude_patterns=*.tmp;*.bak; + + [Interface] + dark_theme=true + show_hidden_files=false + +New format (fsearch.conf - JSON): + + { + "database": { + "indexed_locations": [ + "/home/void", + "/media/storage" + ], + "excluded_locations": [ + "/home/void/.cache", + "/tmp" + ], + "excluded_wildcards": [ + "*.tmp", + "*.bak" + ] + }, + "ui": { + "show_hidden_files": false + } + } + +Once the new configuration is in place: + + 1. Open FSearch. + 2. Go to Database -> Update Database (or press Ctrl+R). + 3. Ensure mounted partitions or secondary drives are listed + under Preferences -> Database -> Included Locations. diff --git a/srcpkgs/fsearch/patches/query.patch b/srcpkgs/fsearch/patches/query.patch index d8b63aacd51f60..f53399fed8a7ac 100644 --- a/srcpkgs/fsearch/patches/query.patch +++ b/srcpkgs/fsearch/patches/query.patch @@ -1,46 +1,25 @@ ---- a/src/fsearch_time_utils.c -+++ b/src/fsearch_time_utils.c -@@ -377,7 +377,7 @@ parse_implicit_date_time_constants(const - } - - static bool --parse_date_time_constants(const char *str, time_t *time_start_out, time_t *time_end_out) { -+parse_date_time_constants(const char *str, int64_t *time_start_out, int64_t *time_end_out) { - struct tm tm_start = {}; - struct tm tm_end = {}; - -@@ -469,7 +469,7 @@ round_down_tm_to_reference_with_date_tim - } - - bool --fsearch_date_time_parse_interval(const char *str, time_t *time_start_out, time_t *time_end_out) { -+fsearch_date_time_parse_interval(const char *str, int64_t *time_start_out, int64_t *time_end_out) { - if (parse_date_time_constants(str, time_start_out, time_end_out)) { - return true; - } ---- a/src/fsearch_time_utils.h -+++ b/src/fsearch_time_utils.h -@@ -1,7 +1,7 @@ - #pragma once - - #include --#include -+#include - - bool --fsearch_date_time_parse_interval(const char *str, time_t *time_start_out, time_t *time_end_out); -\ No newline at end of file -+fsearch_date_time_parse_interval(const char *str, int64_t *time_start_out, int64_t *time_end_out); ---- a/src/tests/test_time_utils.c -+++ b/src/tests/test_time_utils.c -@@ -49,8 +49,8 @@ test_parse_time_interval(void) { - - for (gint i = 0; i < G_N_ELEMENTS(strings); ++i) { - FsearchTestTimeIntervalParseContext *ctx = &strings[i]; -- time_t time_start = 0; -- time_t time_end = 0; -+ int64_t time_start = 0; -+ int64_t time_end = 0; - - gboolean res = fsearch_date_time_parse_interval(ctx->string, &time_start, &time_end); - g_assert_true(res == ctx->expected_success); +diff --git a/src/fsearch_database_scan.c b/src/fsearch_database_scan.c +index 5f1628ef..f6343847 100644 +--- a/src/fsearch_database_scan.c ++++ b/src/fsearch_database_scan.c +@@ -75,7 +75,7 @@ add_folder(DatabaseWalkContext *walk_context, const char *name, const char *path + parent, + DATABASE_ENTRY_TYPE_FOLDER, + DATABASE_INDEX_PROPERTY_MODIFICATION_TIME, +- mtime, ++ (int64_t)mtime, + DATABASE_INDEX_PROPERTY_NONE); + if (!folder_entry) { + return NULL; +@@ -101,9 +101,9 @@ add_file(DatabaseWalkContext *walk_context, const char *name, off_t size, time_t + parent, + DATABASE_ENTRY_TYPE_FILE, + DATABASE_INDEX_PROPERTY_SIZE, +- size, ++ (int64_t)size, + DATABASE_INDEX_PROPERTY_MODIFICATION_TIME, +- mtime, ++ (int64_t)mtime, + DATABASE_INDEX_PROPERTY_NONE); + if (!file_entry) { + return NULL; \ No newline at end of file diff --git a/srcpkgs/fsearch/template b/srcpkgs/fsearch/template index fc8cad5aa95202..c8881bf481c9fb 100644 --- a/srcpkgs/fsearch/template +++ b/srcpkgs/fsearch/template @@ -1,13 +1,25 @@ # Template file for 'fsearch' pkgname=fsearch -version=0.2.3 +version=0.3.1 revision=1 build_style=meson -hostmakedepends="gettext glib-devel pkg-config" -makedepends="gtk+3-devel pcre2-devel" -short_desc="Fast file search utility based on GTK+3" +build_helper="qemu" +hostmakedepends="gettext itstool glib-devel pkg-config" +makedepends="gtk+3-devel" +depends="desktop-file-utils hicolor-icon-theme" +short_desc="Fast file search utility inspired by Everything" maintainer="Orphaned " license="GPL-2.0-or-later" homepage="https://cboxdoerfer.github.io/fsearch/" +changelog="https://github.com/cboxdoerfer/fsearch/releases#release-${version}" distfiles="https://github.com/cboxdoerfer/fsearch/archive/${version}.tar.gz" -checksum=b3c576bf1230da7c374d00bb32d72686b940b4dee80d941495acfdd5437bf117 +checksum=b16ab75556d841bf858633710d71c92f35d34362614b8584b0a5b71690a72c39 + +if [ "$XBPS_TARGET_LIBC" = "musl" ]; then + CFLAGS+=" -D_LARGEFILE64_SOURCE" +fi + +post_extract() { + sed -i '/#include /d' \ + src/fsearch_folder_monitor_fanotify.c +}