diff --git a/sphinx-c99.patch b/sphinx-c99.patch index ffc7fb7..0fa1580 100644 --- a/sphinx-c99.patch +++ b/sphinx-c99.patch @@ -1,6 +1,5 @@ Add missing return types to avoid build failures with C99 compilers. Include to avoid implicit function declarations. -Avoid incompatible pointer types and a format string warning. Partially fixed via: @@ -38,7 +37,7 @@ index 16f7913fa37b3bf3..0530fc2c65f1082c 100644 if ( sock<0 ) return; diff --git a/api/libsphinxclient/test.c b/api/libsphinxclient/test.c -index f779bb1ff638a179..670e379b4ad3c36f 100644 +index f779bb1ff638a179..a4806ea9aca9c82c 100644 --- a/api/libsphinxclient/test.c +++ b/api/libsphinxclient/test.c @@ -16,6 +16,7 @@ @@ -49,51 +48,3 @@ index f779bb1ff638a179..670e379b4ad3c36f 100644 #if _WIN32 #include -@@ -218,7 +219,8 @@ void test_excerpt_spz ( sphinx_client * client ) - - void test_persist_work ( sphinx_client * client ) - { -- char * docs[] = { NULL }; -+ const char * docs[] = { NULL }; -+ char *docs0; - const char words[] = "that is"; - const char * index = "test1"; - const char filler[] = " no need to worry about "; -@@ -229,13 +231,14 @@ void test_persist_work ( sphinx_client * client ) - - // should be in sync with sphinxclient.c MAX_PACKET_LEN - i = 8*1024*1024 + 50; -- docs[0] = malloc ( i ); -- if ( !docs[0] ) -+ docs0 = malloc ( i ); -+ if ( !docs0 ) - die ( "malloc failed at test_persist_work" ); -+ docs[0] = docs0; - -- memcpy ( docs[0], words, sizeof(words)-1 ); -- doc = docs[0] + sizeof(words)-1; -- while ( ( doc + sizeof(filler) ) % s <-\n\n", name ); -+ printf ( "-> %s <-\n\n", name ); - } - - int main ( int argc, char ** argv ) diff --git a/sphinx.spec b/sphinx.spec index c9dd0d7..3ad6e22 100644 --- a/sphinx.spec +++ b/sphinx.spec @@ -20,10 +20,9 @@ Name: sphinx Version: 2.2.11 -Release: 34%{?dist} +Release: 27%{?dist} Summary: Free open-source SQL full-text search engine -# Automatically converted from old format: GPLv2+ - review is highly recommended. -License: GPL-2.0-or-later +License: GPLv2+ URL: http://sphinxsearch.com Source0: http://sphinxsearch.com/files/%{name}-%{version}-release.tar.gz @@ -45,6 +44,7 @@ Requires(preun): systemd Requires(postun): systemd # Users and groups +Requires(pre): shadow-utils %description @@ -116,10 +116,10 @@ designed with indexing database content in mind. %prep %setup -qn %{name}-%{version}-release -%patch -P0 -p1 -b .fix_static -%patch -P1 -p1 -b .default_listen -%patch -P2 -p1 -%patch -P3 -p1 +%patch0 -p1 -b .fix_static +%patch1 -p1 -b .default_listen +%patch2 -p1 +%patch3 -p1 # Fix wrong-file-end-of-line-encoding for f in \ @@ -134,12 +134,6 @@ done # Fix file not UTF8 iconv -f iso8859-1 -t utf-8 doc/%{name}.txt > doc/%{name}.txt.conv && mv -f doc/%{name}.txt.conv doc/%{name}.txt -# Create a sysusers.d config file -cat >sphinx.sysusers.conf </dev/null || groupadd -r %{sphinx_group} +getent passwd %{sphinx_user} >/dev/null || \ +useradd -r -g %{sphinx_group} -d %{sphinx_home} -s /bin/bash \ +-c "Sphinx Search" %{sphinx_user} +exit 0 %post %systemd_post searchd.service @@ -283,7 +281,6 @@ chown -R %{sphinx_user}:root %{_localstatedir}/lib/%{name}/ %dir %attr(0755, %{sphinx_user}, root) %{_localstatedir}/run/%{name} %dir %attr(0755, %{sphinx_user}, root) %{_localstatedir}/lib/%{name} %{_mandir}/man1/* -%{_sysusersdir}/sphinx.conf %files -n libsphinxclient %doc COPYING %{?with_java: api/java} api/ruby api/*.php api/*.py api/libsphinxclient/README @@ -304,27 +301,6 @@ chown -R %{sphinx_user}:root %{_localstatedir}/lib/%{name}/ %{_datadir}/php/* %changelog -* Fri Jul 25 2025 Fedora Release Engineering - 2.2.11-34 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild - -* Tue Feb 11 2025 Zbigniew Jędrzejewski-Szmek - 2.2.11-33 -- Add sysusers.d config file to allow rpm to create users/groups automatically - -* Sun Jan 19 2025 Fedora Release Engineering - 2.2.11-32 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild - -* Fri Jul 26 2024 Miroslav Suchý - 2.2.11-31 -- convert license to SPDX - -* Sat Jul 20 2024 Fedora Release Engineering - 2.2.11-30 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild - -* Sat Jan 27 2024 Fedora Release Engineering - 2.2.11-29 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Tue Dec 19 2023 Florian Weimer - 2.2.11-28 -- Additional C compatibility fixes - * Sat Jul 22 2023 Fedora Release Engineering - 2.2.11-27 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild