Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
64ebbc3
pmsearch: reimplement with SQLite FTS5 replacing RediSearch/Valkey
sfeifer Jul 24, 2026
e61fe57
pmsearch: fix SQLite3 build - add CFLAGS and BuildRequires
sfeifer Jul 24, 2026
c2d4b74
pmsearch: fix dual-index queries and DIST_ROOT packaging
sfeifer Jul 24, 2026
0f193b3
pmsearch: update qa tests and fix deduplication when combining the bu…
sfeifer Jul 27, 2026
f6875c6
pmsearch: fix qa tests and change nightly index strategy
sfeifer Jul 28, 2026
fed5f7f
pmsearch: man pages for nightly search index creation
sfeifer Jul 28, 2026
38d91b6
pmsearch: improve qa tests and add archive support for pmsearch_index
sfeifer Jul 28, 2026
0436e7a
pmsearch: fix issues and update tests
sfeifer Jul 29, 2026
00f9e3a
pmsearch: add metrics without help files and add upsert logic for the…
sfeifer Jul 30, 2026
8c02c1d
pmsearch: improve code quality of recent changes
sfeifer Jul 31, 2026
5fcb452
pmsearch: changes after code review of recent rework of pmsearch
sfeifer Jul 31, 2026
1eda635
add sqlite to list of packages installed in QA containers
sfeifer Jul 31, 2026
9e7a74b
pmsearch: fix man3 build error on fedora
sfeifer Jul 31, 2026
9e32bb8
pmsearch: incorporate code review feedback
sfeifer Jul 31, 2026
eaa3768
pmsearch: incorporate more feedback from code review
sfeifer Aug 3, 2026
3aeedff
pmsearch: fix more feedback
sfeifer Aug 10, 2026
e2ee82c
pmsearch: more changes based on feedback
sfeifer Aug 10, 2026
deceaa5
pmsearch: changes based on review
sfeifer Aug 11, 2026
244d2d7
pmsearch: make SQLite an optional build dependency
sfeifer Aug 14, 2026
b61025d
qa: notrun 1861 when missing sqlite support
sfeifer Aug 14, 2026
a64a3fe
pmsearch: weight indom help text higher
sfeifer Aug 14, 2026
22a19be
libpcp_web: parenthesize the complete query in search.c
sfeifer Aug 19, 2026
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
1 change: 1 addition & 0 deletions build/rpm/pcp.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ BuildRequires: libpfm-devel >= 4.4

BuildRequires: ncurses-devel
BuildRequires: readline-devel
BuildRequires: sqlite-devel >= 3.9.0

# Utilities used indirectly e.g. by scripts we install
Requires: bash xz zstd gawk sed grep coreutils diffutils findutils
Expand Down
294 changes: 250 additions & 44 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -761,6 +761,10 @@ ncurses_CFLAGS
HAVE_DELAYACCT
libnl3_LIBS
libnl3_CFLAGS
lib_for_sqlite3
HAVE_SQLITE3
sqlite3_LIBS
sqlite3_CFLAGS
lib_for_inih
HAVE_LIBINIH
HAVE_LIBUV
Expand Down Expand Up @@ -1096,6 +1100,8 @@ libdrm_amdgpu_CFLAGS
libdrm_amdgpu_LIBS
libuv_CFLAGS
libuv_LIBS
sqlite3_CFLAGS
sqlite3_LIBS
libnl3_CFLAGS
libnl3_LIBS
ncurses_CFLAGS
Expand Down Expand Up @@ -1865,6 +1871,10 @@ Some influential environment variables:
libuv_CFLAGS
C compiler flags for libuv, overriding pkg-config
libuv_LIBS linker flags for libuv, overriding pkg-config
sqlite3_CFLAGS
C compiler flags for sqlite3, overriding pkg-config
sqlite3_LIBS
linker flags for sqlite3, overriding pkg-config
libnl3_CFLAGS
C compiler flags for libnl3, overriding pkg-config
libnl3_LIBS linker flags for libnl3, overriding pkg-config
Expand Down Expand Up @@ -2176,6 +2186,50 @@ fi

} # ac_fn_c_try_cpp

# ac_fn_c_try_run LINENO
# ----------------------
# Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that
# executables *can* be run.
ac_fn_c_try_run ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
if { { ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
printf "%s\n" "$ac_try_echo"; } >&5
(eval "$ac_link") 2>&5
ac_status=$?
printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
{ { case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
printf "%s\n" "$ac_try_echo"; } >&5
(eval "$ac_try") 2>&5
ac_status=$?
printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; }
then :
ac_retval=0
else case e in #(
e) printf "%s\n" "$as_me: program exited with status $ac_status" >&5
printf "%s\n" "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_retval=$ac_status ;;
esac
fi
rm -rf conftest.dSYM conftest_ipa8_conftest.oo
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
as_fn_set_status $ac_retval

} # ac_fn_c_try_run

# ac_fn_c_check_func LINENO FUNC VAR
# ----------------------------------
# Tests whether FUNC exists, setting the cache variable VAR accordingly
Expand Down Expand Up @@ -2298,50 +2352,6 @@ printf "%s\n" "$ac_res" >&6; }
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno

} # ac_fn_c_check_type

# ac_fn_c_try_run LINENO
# ----------------------
# Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that
# executables *can* be run.
ac_fn_c_try_run ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
if { { ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
printf "%s\n" "$ac_try_echo"; } >&5
(eval "$ac_link") 2>&5
ac_status=$?
printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
{ { case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
printf "%s\n" "$ac_try_echo"; } >&5
(eval "$ac_try") 2>&5
ac_status=$?
printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; }
then :
ac_retval=0
else case e in #(
e) printf "%s\n" "$as_me: program exited with status $ac_status" >&5
printf "%s\n" "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_retval=$ac_status ;;
esac
fi
rm -rf conftest.dSYM conftest_ipa8_conftest.oo
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
as_fn_set_status $ac_retval

} # ac_fn_c_try_run
ac_configure_args_raw=
for ac_arg
do
Expand Down Expand Up @@ -12283,6 +12293,202 @@ HAVE_LIBINIH=$have_libinih



pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sqlite3 >= 3.9.0" >&5
printf %s "checking for sqlite3 >= 3.9.0... " >&6; }

if test -n "$sqlite3_CFLAGS"; then
pkg_cv_sqlite3_CFLAGS="$sqlite3_CFLAGS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"sqlite3 >= 3.9.0\""; } >&5
($PKG_CONFIG --exists --print-errors "sqlite3 >= 3.9.0") 2>&5
ac_status=$?
printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
pkg_cv_sqlite3_CFLAGS=`$PKG_CONFIG --cflags "sqlite3 >= 3.9.0" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
else
pkg_failed=yes
fi
else
pkg_failed=untried
fi
if test -n "$sqlite3_LIBS"; then
pkg_cv_sqlite3_LIBS="$sqlite3_LIBS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"sqlite3 >= 3.9.0\""; } >&5
($PKG_CONFIG --exists --print-errors "sqlite3 >= 3.9.0") 2>&5
ac_status=$?
printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
pkg_cv_sqlite3_LIBS=`$PKG_CONFIG --libs "sqlite3 >= 3.9.0" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
else
pkg_failed=yes
fi
else
pkg_failed=untried
fi



if test $pkg_failed = yes; then
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }

if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
_pkg_short_errors_supported=yes
else
_pkg_short_errors_supported=no
fi
if test $_pkg_short_errors_supported = yes; then
sqlite3_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "sqlite3 >= 3.9.0" 2>&1`
else
sqlite3_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "sqlite3 >= 3.9.0" 2>&1`
fi
# Put the nasty error message in config.log where it belongs
echo "$sqlite3_PKG_ERRORS" >&5

have_sqlite3=false
elif test $pkg_failed = untried; then
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
have_sqlite3=false
else
sqlite3_CFLAGS=$pkg_cv_sqlite3_CFLAGS
sqlite3_LIBS=$pkg_cv_sqlite3_LIBS
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
have_sqlite3=true
fi
if test $have_sqlite3 = false; then
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sqlite3_open in -lsqlite3" >&5
printf %s "checking for sqlite3_open in -lsqlite3... " >&6; }
if test ${ac_cv_lib_sqlite3_sqlite3_open+y}
then :
printf %s "(cached) " >&6
else case e in #(
e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lsqlite3 $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */

/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply.
The 'extern "C"' is for builds by C++ compilers;
although this is not generally supported in C code supporting it here
has little cost and some practical benefit (sr 110532). */
#ifdef __cplusplus
extern "C"
#endif
char sqlite3_open (void);
int
main (void)
{
return sqlite3_open ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ac_cv_lib_sqlite3_sqlite3_open=yes
else case e in #(
e) ac_cv_lib_sqlite3_sqlite3_open=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sqlite3_sqlite3_open" >&5
printf "%s\n" "$ac_cv_lib_sqlite3_sqlite3_open" >&6; }
if test "x$ac_cv_lib_sqlite3_sqlite3_open" = xyes
then :
have_sqlite3=true
lib_for_sqlite3="-lsqlite3"

else case e in #(
e) have_sqlite3=false
lib_for_sqlite3=""

;;
esac
fi

else
lib_for_sqlite3="$sqlite3_LIBS"
fi
if test $have_sqlite3 = true; then
save_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$sqlite3_CFLAGS $CPPFLAGS"
save_LIBS="$LIBS"
LIBS="$lib_for_sqlite3 $LIBS"
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SQLite3 >= 3.9.0 with FTS5 support" >&5
printf %s "checking for SQLite3 >= 3.9.0 with FTS5 support... " >&6; }
Comment thread
coderabbitai[bot] marked this conversation as resolved.
if test "$cross_compiling" = yes
then :
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: assuming yes (cross-compiling)" >&5
printf "%s\n" "assuming yes (cross-compiling)" >&6; }
Comment thread
coderabbitai[bot] marked this conversation as resolved.
else case e in #(
e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */

#include <sqlite3.h>
#if SQLITE_VERSION_NUMBER < 3009000
#error "SQLite >= 3.9.0 required for FTS5"
#endif

int
main (void)
{

sqlite3 *db;
int sts = 1;

if (sqlite3_open(":memory:", &db) == SQLITE_OK)
sts = (sqlite3_exec(db, "CREATE VIRTUAL TABLE t USING fts5(c)",
0, 0, 0) == SQLITE_OK) ? 0 : 1;
sqlite3_close(db);
return sts;

;
return 0;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"
then :
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
else case e in #(
e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
have_sqlite3=false
lib_for_sqlite3=""
;;
esac
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
esac
fi

LIBS="$save_LIBS"
CPPFLAGS="$save_CPPFLAGS"
fi
if test $have_sqlite3 = false; then
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: SQLite >= 3.9.0 with FTS5 not found, pmsearch will not be built" >&5
printf "%s\n" "$as_me: WARNING: SQLite >= 3.9.0 with FTS5 not found, pmsearch will not be built" >&2;}
fi
HAVE_SQLITE3=$have_sqlite3




pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libnl-3.0" >&5
printf %s "checking for libnl-3.0... " >&6; }
Expand Down
Loading
Loading