Compare commits
1 commit
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3cf74dd5a7 |
8 changed files with 136 additions and 539 deletions
5
.gitignore
vendored
5
.gitignore
vendored
|
|
@ -1 +1,4 @@
|
|||
/sphinx-2.*-release.tar.gz
|
||||
/sphinx-2.0.6-release.tar.gz
|
||||
/sphinx-2.0.7-release.tar.gz
|
||||
/sphinx-2.0.8-release.tar.gz
|
||||
/sphinx-2.1.2-release.tar.gz
|
||||
|
|
|
|||
|
|
@ -1,26 +0,0 @@
|
|||
--- sphinx-2.2.11-release-orig/sphinx.conf.in 2019-09-05 08:57:23.608395395 -0400
|
||||
+++ sphinx-2.2.11-release/sphinx.conf.in 2019-09-05 08:56:43.568117907 -0400
|
||||
@@ -810,8 +810,8 @@
|
||||
# listen = 192.168.0.1:9312
|
||||
# listen = 9312
|
||||
# listen = /var/run/searchd.sock
|
||||
- listen = 9312
|
||||
- listen = 9306:mysql41
|
||||
+ listen = 127.0.0.1:9312
|
||||
+ listen = 127.0.0.1:9306:mysql41
|
||||
|
||||
# log file, searchd run info is logged here
|
||||
# optional, default is 'searchd.log'
|
||||
--- sphinx-2.2.11-release-orig/sphinx-min.conf.in 2019-09-05 08:59:14.851388059 -0400
|
||||
+++ sphinx-2.2.11-release/sphinx-min.conf.in 2019-09-05 08:59:44.248857589 -0400
|
||||
@@ -49,8 +49,8 @@
|
||||
|
||||
searchd
|
||||
{
|
||||
- listen = 9312
|
||||
- listen = 9306:mysql41
|
||||
+ listen = 127.0.0.1:9312
|
||||
+ listen = 127.0.0.1:9306:mysql41
|
||||
log = @CONFDIR@/log/searchd.log
|
||||
query_log = @CONFDIR@/log/query.log
|
||||
read_timeout = 5
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
[Unit]
|
||||
Description=Sphinx - SQL Full Text Search Engine
|
||||
After=local-fs.target network.target
|
||||
After=local-fs.target network.target mysqld.service
|
||||
|
||||
[Service]
|
||||
User=sphinx
|
||||
|
|
|
|||
2
sources
2
sources
|
|
@ -1 +1 @@
|
|||
5cac34f3d78a9d612ca4301abfcbd666 sphinx-2.2.11-release.tar.gz
|
||||
3e828fa58e2e6049f02aa6aef3009d48 sphinx-2.1.2-release.tar.gz
|
||||
|
|
|
|||
24
sphinx-2.0.3-default_listen.patch
Normal file
24
sphinx-2.0.3-default_listen.patch
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
diff -r -U3 sphinx-2.0.3-release.orig/sphinx.conf.in sphinx-2.0.3-release/sphinx.conf.in
|
||||
--- sphinx-2.0.3-release.orig/sphinx.conf.in 2011-04-18 09:39:40.000000000 -0500
|
||||
+++ sphinx-2.0.3-release/sphinx.conf.in 2012-02-14 13:49:19.660872549 -0600
|
||||
@@ -716,7 +716,7 @@
|
||||
# listen = 192.168.0.1:9312
|
||||
# listen = 9312
|
||||
# listen = /var/run/searchd.sock
|
||||
- listen = 9312
|
||||
+ listen = 127.0.0.1:9312
|
||||
listen = 9306:mysql41
|
||||
|
||||
# log file, searchd run info is logged here
|
||||
diff -r -U3 sphinx-2.0.3-release.orig/sphinx-min.conf.in sphinx-2.0.3-release/sphinx-min.conf.in
|
||||
--- sphinx-2.0.3-release.orig/sphinx-min.conf.in 2011-04-18 09:39:40.000000000 -0500
|
||||
+++ sphinx-2.0.3-release/sphinx-min.conf.in 2012-02-14 13:49:55.682449012 -0600
|
||||
@@ -54,7 +54,7 @@
|
||||
|
||||
searchd
|
||||
{
|
||||
- listen = 9312
|
||||
+ listen = 127.0.0.1:9312
|
||||
listen = 9306:mysql41
|
||||
log = @CONFDIR@/log/searchd.log
|
||||
query_log = @CONFDIR@/log/query.log
|
||||
|
|
@ -1,99 +0,0 @@
|
|||
Add missing return types to avoid build failures with C99 compilers.
|
||||
Include <string.h> to avoid implicit function declarations.
|
||||
Avoid incompatible pointer types and a format string warning.
|
||||
|
||||
Partially fixed via:
|
||||
|
||||
commit da41e452c5acc99ffe40f48be32d9ca7e55c407c
|
||||
Author: tomat <tomat@406a0c4d-033a-0410-8de8-e80135713968>
|
||||
Date: Wed Jun 2 05:16:06 2010 +0000
|
||||
|
||||
fixed query buffer overrun and SIGPIPE in C API, mantis bug 489 \ 504
|
||||
|
||||
git-svn-id: svn://svn.sphinxsearch.com/sphinx/trunk@2316 406a0c4d-033a-0410-
|
||||
8de8-e80135713968
|
||||
|
||||
Rest submitted upstream: <https://github.com/sphinxsearch/sphinx/pull/47>
|
||||
|
||||
diff --git a/api/libsphinxclient/sphinxclient.c b/api/libsphinxclient/sphinxclient.c
|
||||
index 16f7913fa37b3bf3..0530fc2c65f1082c 100644
|
||||
--- a/api/libsphinxclient/sphinxclient.c
|
||||
+++ b/api/libsphinxclient/sphinxclient.c
|
||||
@@ -311,7 +311,7 @@ static void sphinx_free_results ( sphinx_client * client )
|
||||
}
|
||||
|
||||
|
||||
-static sock_close ( int sock );
|
||||
+static void sock_close ( int sock );
|
||||
|
||||
|
||||
#define safe_free(_ptr) \
|
||||
@@ -1436,7 +1436,7 @@ static int sock_set_blocking ( int sock )
|
||||
}
|
||||
|
||||
|
||||
-static sock_close ( int sock )
|
||||
+static void sock_close ( int sock )
|
||||
{
|
||||
if ( sock<0 )
|
||||
return;
|
||||
diff --git a/api/libsphinxclient/test.c b/api/libsphinxclient/test.c
|
||||
index f779bb1ff638a179..670e379b4ad3c36f 100644
|
||||
--- a/api/libsphinxclient/test.c
|
||||
+++ b/api/libsphinxclient/test.c
|
||||
@@ -16,6 +16,7 @@
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
+#include <string.h>
|
||||
|
||||
#if _WIN32
|
||||
#include <winsock2.h>
|
||||
@@ -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) )<docs[0]+i )
|
||||
+ memcpy ( docs0, words, sizeof(words)-1 );
|
||||
+ doc = docs0 + sizeof(words)-1;
|
||||
+ while ( ( doc + sizeof(filler) )<docs0+i )
|
||||
{
|
||||
memcpy ( doc, filler, sizeof(filler)-1 );
|
||||
doc += sizeof(filler)-1;
|
||||
@@ -264,7 +267,7 @@ void test_persist_work ( sphinx_client * client )
|
||||
opts.html_strip_mode = "none";
|
||||
opts.query_mode = SPH_TRUE;
|
||||
|
||||
- *( docs[0]+sizeof(words)+100 ) = '\0';
|
||||
+ *( docs0+sizeof(words)+100 ) = '\0';
|
||||
}
|
||||
|
||||
printf ( "n=%d,\t", i );
|
||||
@@ -405,7 +408,7 @@ void title ( const char * name )
|
||||
if ( g_smoke || !name )
|
||||
return;
|
||||
|
||||
- printf ( "-> % s <-\n\n", name );
|
||||
+ printf ( "-> %s <-\n\n", name );
|
||||
}
|
||||
|
||||
int main ( int argc, char ** argv )
|
||||
|
|
@ -1,148 +0,0 @@
|
|||
Generic C99 compatibility fixes for the configure script. These
|
||||
changes are already part of autoconf upstream, so re-running
|
||||
autoconf would fix these issues, too.
|
||||
|
||||
diff --git a/api/libsphinxclient/configure b/api/libsphinxclient/configure
|
||||
index ff655ed23b938e71..c502ef318fd28313 100755
|
||||
--- a/api/libsphinxclient/configure
|
||||
+++ b/api/libsphinxclient/configure
|
||||
@@ -2761,7 +2761,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; }; then
|
||||
for ac_declaration in \
|
||||
- '' \
|
||||
+ '#include <stdlib.h>' \
|
||||
'extern "C" void std::exit (int) throw (); using std::exit;' \
|
||||
'extern "C" void std::exit (int); using std::exit;' \
|
||||
'extern "C" void exit (int) throw ();' \
|
||||
@@ -4190,8 +4190,8 @@ main ()
|
||||
for (i = 0; i < 256; i++)
|
||||
if (XOR (islower (i), ISLOWER (i))
|
||||
|| toupper (i) != TOUPPER (i))
|
||||
- exit(2);
|
||||
- exit (0);
|
||||
+ return 2;
|
||||
+ return 0;
|
||||
}
|
||||
_ACEOF
|
||||
rm -f conftest$ac_exeext
|
||||
@@ -8112,10 +8112,6 @@ else
|
||||
# endif
|
||||
#endif
|
||||
|
||||
-#ifdef __cplusplus
|
||||
-extern "C" void exit (int);
|
||||
-#endif
|
||||
-
|
||||
void fnord() { int i=42;}
|
||||
int main ()
|
||||
{
|
||||
@@ -8129,7 +8125,7 @@ int main ()
|
||||
/* dlclose (self); */
|
||||
}
|
||||
|
||||
- exit (status);
|
||||
+ return status;
|
||||
}
|
||||
EOF
|
||||
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
|
||||
@@ -8210,10 +8206,6 @@ else
|
||||
# endif
|
||||
#endif
|
||||
|
||||
-#ifdef __cplusplus
|
||||
-extern "C" void exit (int);
|
||||
-#endif
|
||||
-
|
||||
void fnord() { int i=42;}
|
||||
int main ()
|
||||
{
|
||||
@@ -8227,7 +8219,7 @@ int main ()
|
||||
/* dlclose (self); */
|
||||
}
|
||||
|
||||
- exit (status);
|
||||
+ return status;
|
||||
}
|
||||
EOF
|
||||
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
|
||||
@@ -11831,10 +11823,6 @@ else
|
||||
# endif
|
||||
#endif
|
||||
|
||||
-#ifdef __cplusplus
|
||||
-extern "C" void exit (int);
|
||||
-#endif
|
||||
-
|
||||
void fnord() { int i=42;}
|
||||
int main ()
|
||||
{
|
||||
@@ -11848,7 +11836,7 @@ int main ()
|
||||
/* dlclose (self); */
|
||||
}
|
||||
|
||||
- exit (status);
|
||||
+ return status;
|
||||
}
|
||||
EOF
|
||||
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
|
||||
@@ -11929,10 +11917,6 @@ else
|
||||
# endif
|
||||
#endif
|
||||
|
||||
-#ifdef __cplusplus
|
||||
-extern "C" void exit (int);
|
||||
-#endif
|
||||
-
|
||||
void fnord() { int i=42;}
|
||||
int main ()
|
||||
{
|
||||
@@ -11946,7 +11930,7 @@ int main ()
|
||||
/* dlclose (self); */
|
||||
}
|
||||
|
||||
- exit (status);
|
||||
+ return status;
|
||||
}
|
||||
EOF
|
||||
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
|
||||
@@ -17369,10 +17353,6 @@ else
|
||||
# endif
|
||||
#endif
|
||||
|
||||
-#ifdef __cplusplus
|
||||
-extern "C" void exit (int);
|
||||
-#endif
|
||||
-
|
||||
void fnord() { int i=42;}
|
||||
int main ()
|
||||
{
|
||||
@@ -17386,7 +17366,7 @@ int main ()
|
||||
/* dlclose (self); */
|
||||
}
|
||||
|
||||
- exit (status);
|
||||
+ return status;
|
||||
}
|
||||
EOF
|
||||
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
|
||||
@@ -17467,10 +17447,6 @@ else
|
||||
# endif
|
||||
#endif
|
||||
|
||||
-#ifdef __cplusplus
|
||||
-extern "C" void exit (int);
|
||||
-#endif
|
||||
-
|
||||
void fnord() { int i=42;}
|
||||
int main ()
|
||||
{
|
||||
@@ -17484,7 +17460,7 @@ int main ()
|
||||
/* dlclose (self); */
|
||||
}
|
||||
|
||||
- exit (status);
|
||||
+ return status;
|
||||
}
|
||||
EOF
|
||||
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
|
||||
369
sphinx.spec
369
sphinx.spec
|
|
@ -2,49 +2,36 @@
|
|||
%global sphinx_group sphinx
|
||||
%global sphinx_home %{_localstatedir}/lib/sphinx
|
||||
|
||||
# rpmbuild < 4.6 support
|
||||
%if ! 0%{?__isa_bits}
|
||||
%ifarch x86_64 ia64 ppc64 sparc64 s390x alpha ppc64le aarch64
|
||||
%global __isa_bits 64
|
||||
%else
|
||||
%global __isa_bits 32
|
||||
%endif
|
||||
%endif
|
||||
Name: sphinx
|
||||
Version: 2.1.2
|
||||
Release: 1%{?dist}
|
||||
Summary: Free open-source SQL full-text search engine
|
||||
|
||||
%if 0%{?fedora} >= 37 || 0%{?rhel} >= 10
|
||||
%bcond_with java
|
||||
%else
|
||||
%bcond_without java
|
||||
%endif
|
||||
Group: Applications/Text
|
||||
License: GPLv2+
|
||||
URL: http://sphinxsearch.com
|
||||
Source0: http://sphinxsearch.com/files/%{name}-%{version}-release.tar.gz
|
||||
Source1: searchd.service
|
||||
Patch0: %{name}-2.0.3-fix_static.patch
|
||||
Patch1: %{name}-2.0.3-default_listen.patch
|
||||
Patch2: %{name}-aarch64.patch
|
||||
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
|
||||
Name: sphinx
|
||||
Version: 2.2.11
|
||||
Release: 34%{?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
|
||||
URL: http://sphinxsearch.com
|
||||
BuildRequires: mysql-devel
|
||||
BuildRequires: postgresql-devel
|
||||
BuildRequires: expat-devel
|
||||
|
||||
Source0: http://sphinxsearch.com/files/%{name}-%{version}-release.tar.gz
|
||||
Source1: searchd.service
|
||||
Patch0: %{name}-2.0.3-fix_static.patch
|
||||
Patch1: listen_local.patch
|
||||
Patch2: sphinx-configure-c99.patch
|
||||
Patch3: sphinx-c99.patch
|
||||
# for fix-ups
|
||||
BuildRequires: dos2unix
|
||||
#Requires:
|
||||
|
||||
BuildRequires: make
|
||||
BuildRequires: gcc gcc-c++
|
||||
BuildRequires: expat-devel
|
||||
BuildRequires: mariadb-connector-c-devel openssl-devel
|
||||
BuildRequires: libpq-devel
|
||||
BuildRequires: systemd
|
||||
|
||||
Requires(post): systemd
|
||||
Requires(preun): systemd
|
||||
Requires(postun): systemd
|
||||
Requires(post): systemd
|
||||
Requires(preun): systemd
|
||||
Requires(postun): systemd
|
||||
|
||||
# Users and groups
|
||||
Requires(pre): shadow-utils
|
||||
|
||||
|
||||
%description
|
||||
|
|
@ -58,54 +45,56 @@ databases and scripting languages.
|
|||
|
||||
Currently built-in data source drivers support fetching data either via
|
||||
direct connection to MySQL, or PostgreSQL, or from a pipe in a custom XML
|
||||
format. Adding new drivers (e.g. native support other DBMSes) is
|
||||
format. Adding new drivers (e.g. to natively support some other DBMSes) is
|
||||
designed to be as easy as possible.
|
||||
|
||||
Search API native ported to PHP, Python, Perl, Ruby, Java, and also
|
||||
available as a plug-gable MySQL storage engine. API is very lightweight so
|
||||
Search API is natively ported to PHP, Python, Perl, Ruby, Java, and also
|
||||
available as a pluggable MySQL storage engine. API is very lightweight so
|
||||
porting it to new language is known to take a few hours.
|
||||
|
||||
As for the name, Sphinx is an acronym which is officially decoded as SQL
|
||||
Phrase Index.
|
||||
For the Sphinx documentation generator, see python-sphinx instead.
|
||||
Phrase Index. Yes, I know about CMU's Sphinx project.
|
||||
|
||||
|
||||
%package -n libsphinxclient
|
||||
Summary: Pure C search-d client API library
|
||||
Summary: Pure C searchd client API library
|
||||
Group: Development/Libraries
|
||||
|
||||
|
||||
%description -n libsphinxclient
|
||||
Pure C search-d client API library
|
||||
Pure C searchd client API library
|
||||
Sphinx search engine, http://sphinxsearch.com/
|
||||
|
||||
|
||||
%package -n libsphinxclient-devel
|
||||
Summary: Development libraries and header files for libsphinxclient
|
||||
Requires: libsphinxclient = %{version}-%{release}
|
||||
Summary: Development libraries and header files for libsphinxclient
|
||||
Group: Development/Libraries
|
||||
Requires: libsphinxclient = %{version}-%{release}
|
||||
|
||||
|
||||
%description -n libsphinxclient-devel
|
||||
Pure C search-d client API library
|
||||
Pure C searchd client API library
|
||||
Sphinx search engine, http://sphinxsearch.com/
|
||||
|
||||
|
||||
%if %{with java}
|
||||
%package java
|
||||
Summary: Java API for Sphinx
|
||||
BuildRequires: java-devel
|
||||
Requires: java-headless
|
||||
Requires: jpackage-utils
|
||||
Summary: Java API for Sphinx
|
||||
Group: Development/Libraries
|
||||
BuildRequires: java-devel
|
||||
Requires: java
|
||||
Requires: jpackage-utils
|
||||
|
||||
|
||||
%description java
|
||||
This package provides the Java API for Sphinx,
|
||||
the free, open-source full-text search engine,
|
||||
designed with indexing database content in mind.
|
||||
%endif
|
||||
|
||||
|
||||
%package php
|
||||
Summary: PHP API for Sphinx
|
||||
Requires: php-common >= 5.1.6
|
||||
Summary: PHP API for Sphinx
|
||||
Group: Development/Libraries
|
||||
Requires: php-common >= 5.1.6
|
||||
|
||||
|
||||
%description php
|
||||
|
|
@ -116,35 +105,26 @@ 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 -b .aarch64
|
||||
|
||||
# Fix wrong-file-end-of-line-encoding
|
||||
for f in \
|
||||
api/java/mk.cmd \
|
||||
api/ruby/test.rb \
|
||||
api/ruby/spec/%{name}/%{name}_test.sql \
|
||||
api/ruby/spec/%{name}/%{name}_test.sql \
|
||||
api/java/mk.cmd \
|
||||
api/ruby/test.rb \
|
||||
api/ruby/spec/sphinx/sphinx_test.sql \
|
||||
; do
|
||||
sed -i 's/\r$//' ${f};
|
||||
dos2unix ${f}
|
||||
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 <<EOF
|
||||
g sphinx -
|
||||
u sphinx - 'Sphinx Search' %{sphinx_home} /bin/bash
|
||||
EOF
|
||||
|
||||
%build
|
||||
%if %{__isa_bits} == 64
|
||||
%configure --sysconfdir=%{_sysconfdir}/%{name} --with-mysql --with-pgsql --enable-id64
|
||||
%configure --sysconfdir=%{_sysconfdir}/sphinx --with-mysql --with-pgsql --enable-id64
|
||||
%else
|
||||
%configure --sysconfdir=%{_sysconfdir}/%{name} --with-mysql --with-pgsql
|
||||
%configure --sysconfdir=%{_sysconfdir}/sphinx --with-mysql --with-pgsql
|
||||
%endif
|
||||
|
||||
make %{?_smp_mflags}
|
||||
|
|
@ -156,47 +136,46 @@ pushd api/libsphinxclient
|
|||
popd
|
||||
|
||||
|
||||
%if %{with java}
|
||||
# make the java api
|
||||
make -C api/java
|
||||
%endif
|
||||
|
||||
|
||||
%install
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
make install DESTDIR=$RPM_BUILD_ROOT INSTALL="%{__install} -p -c"
|
||||
|
||||
install -p -D -m 0644 %{SOURCE1} $RPM_BUILD_ROOT%{_unitdir}/searchd.service
|
||||
install -p -D -m 0755 %{SOURCE1} $RPM_BUILD_ROOT%{_unitdir}/searchd.service
|
||||
|
||||
# Create /var/log/sphinx
|
||||
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/log/%{name}
|
||||
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/log/sphinx
|
||||
|
||||
# Create /var/run/sphinx
|
||||
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/run/%{name}
|
||||
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/run/sphinx
|
||||
|
||||
# Create /var/lib/sphinx
|
||||
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/lib/%{name}
|
||||
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/lib/sphinx
|
||||
|
||||
# Create sphinx.conf
|
||||
cp $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/%{name}-min.conf.dist \
|
||||
$RPM_BUILD_ROOT%{_sysconfdir}/%{name}/%{name}.conf
|
||||
cp $RPM_BUILD_ROOT%{_sysconfdir}/sphinx/sphinx-min.conf.dist \
|
||||
$RPM_BUILD_ROOT%{_sysconfdir}/sphinx/sphinx.conf
|
||||
|
||||
# Modify sphinx.conf
|
||||
sed -i 's|/var/log/searchd.log|%{_localstatedir}/log/%{name}/searchd.log|g' \
|
||||
$RPM_BUILD_ROOT%{_sysconfdir}/%{name}/%{name}.conf
|
||||
sed -i 's|/var/log/searchd.log|%{_localstatedir}/log/sphinx/searchd.log|g' \
|
||||
$RPM_BUILD_ROOT%{_sysconfdir}/sphinx/sphinx.conf
|
||||
|
||||
sed -i 's|/var/log/query.log|%{_localstatedir}/log/%{name}/query.log|g' \
|
||||
$RPM_BUILD_ROOT%{_sysconfdir}/%{name}/%{name}.conf
|
||||
sed -i 's|/var/log/query.log|%{_localstatedir}/log/sphinx/query.log|g' \
|
||||
$RPM_BUILD_ROOT%{_sysconfdir}/sphinx/sphinx.conf
|
||||
|
||||
sed -i 's|/var/log/searchd.pid|%{_localstatedir}/run/%{name}/searchd.pid|g' \
|
||||
$RPM_BUILD_ROOT%{_sysconfdir}/%{name}/%{name}.conf
|
||||
sed -i 's|/var/log/searchd.pid|%{_localstatedir}/run/sphinx/searchd.pid|g' \
|
||||
$RPM_BUILD_ROOT%{_sysconfdir}/sphinx/sphinx.conf
|
||||
|
||||
sed -i 's|/var/data|%{_localstatedir}/lib/sphinx|g' \
|
||||
$RPM_BUILD_ROOT%{_sysconfdir}/%{name}/%{name}.conf
|
||||
$RPM_BUILD_ROOT%{_sysconfdir}/sphinx/sphinx.conf
|
||||
|
||||
# Create /etc/logrotate.d/sphinx
|
||||
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d
|
||||
cat > $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/%{name} << EOF
|
||||
%{_localstatedir}/log/%{name}/*.log {
|
||||
cat > $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/sphinx << EOF
|
||||
%{_localstatedir}/log/sphinx/*.log {
|
||||
weekly
|
||||
rotate 10
|
||||
copytruncate
|
||||
|
|
@ -207,10 +186,10 @@ cat > $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/%{name} << EOF
|
|||
}
|
||||
EOF
|
||||
|
||||
# Create tmpfile run configuration
|
||||
# Create /etc/logrotate.d/sphinx
|
||||
mkdir -p $RPM_BUILD_ROOT%{_tmpfilesdir}
|
||||
cat > $RPM_BUILD_ROOT%{_tmpfilesdir}/%{name}.conf << EOF
|
||||
d /run/%{name} 755 %{name} root -
|
||||
d %{_localstatedir}/run/sphinx 755 sphinx root -
|
||||
EOF
|
||||
|
||||
# Install libsphinxclient
|
||||
|
|
@ -218,13 +197,16 @@ pushd api/libsphinxclient/
|
|||
make install DESTDIR=$RPM_BUILD_ROOT INSTALL="%{__install} -p -c"
|
||||
popd
|
||||
|
||||
%if %{with java}
|
||||
# install the java api
|
||||
mkdir -p $RPM_BUILD_ROOT%{_javadir}
|
||||
install -m 0644 api/java/%{name}api.jar \
|
||||
$RPM_BUILD_ROOT%{_javadir}/%{name}.jar
|
||||
ln -s %{_javadir}/%{name}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}api.jar
|
||||
%endif
|
||||
$RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
|
||||
|
||||
# convenience symlinks
|
||||
pushd $RPM_BUILD_ROOT%{_javadir}
|
||||
ln -s %{name}-%{version}.jar %{name}.jar
|
||||
ln -s %{name}-%{version}.jar %{name}api.jar
|
||||
popd
|
||||
|
||||
# install the php api
|
||||
# "Non-PEAR PHP extensions should put their Class files in /usr/share/php."
|
||||
|
|
@ -238,9 +220,16 @@ find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
|
|||
# clean-up .a archives
|
||||
find $RPM_BUILD_ROOT -name '*.a' -exec rm -f {} ';'
|
||||
|
||||
install -m0644 -D sphinx.sysusers.conf %{buildroot}%{_sysusersdir}/sphinx.conf
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%pre
|
||||
getent group %{sphinx_group} >/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
|
||||
|
|
@ -248,15 +237,16 @@ install -m0644 -D sphinx.sysusers.conf %{buildroot}%{_sysusersdir}/sphinx.conf
|
|||
%preun
|
||||
%systemd_preun searchd.service
|
||||
|
||||
%ldconfig_scriptlets -n libsphinxclient
|
||||
%post -p /sbin/ldconfig -n libsphinxclient
|
||||
|
||||
%postun
|
||||
%postun
|
||||
%systemd_postun_with_restart searchd.service
|
||||
|
||||
|
||||
%posttrans
|
||||
chown -R %{sphinx_user}:root %{_localstatedir}/log/%{name}/
|
||||
chown -R %{sphinx_user}:root %{_localstatedir}/run/%{name}/
|
||||
chown -R %{sphinx_user}:root %{_localstatedir}/lib/%{name}/
|
||||
chown -R %{sphinx_user}:root %{_localstatedir}/log/sphinx/
|
||||
chown -R %{sphinx_user}:root %{_localstatedir}/run/sphinx/
|
||||
chown -R %{sphinx_user}:root %{_localstatedir}/lib/sphinx/
|
||||
|
||||
%triggerun -- sphinx < 2.0.3-1
|
||||
# Save the current service runlevel info
|
||||
|
|
@ -270,191 +260,44 @@ chown -R %{sphinx_user}:root %{_localstatedir}/lib/%{name}/
|
|||
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
%doc COPYING doc/sphinx.txt sphinx-min.conf.dist sphinx.conf.dist example.sql
|
||||
%dir %{_sysconfdir}/sphinx
|
||||
%config(noreplace) %{_sysconfdir}/%{name}/%{name}.conf
|
||||
%exclude %{_sysconfdir}/%{name}/*.conf.dist
|
||||
%exclude %{_sysconfdir}/%{name}/example.sql
|
||||
%config(noreplace) %{_sysconfdir}/sphinx/sphinx.conf
|
||||
%exclude %{_sysconfdir}/sphinx/*.conf.dist
|
||||
%exclude %{_sysconfdir}/sphinx/example.sql
|
||||
%{_unitdir}/searchd.service
|
||||
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
|
||||
%config(noreplace) %{_sysconfdir}/logrotate.d/sphinx
|
||||
%{_tmpfilesdir}/%{name}.conf
|
||||
%{_bindir}/*
|
||||
%dir %attr(0755, %{sphinx_user}, root) %{_localstatedir}/log/%{name}
|
||||
%dir %attr(0755, %{sphinx_user}, root) %{_localstatedir}/run/%{name}
|
||||
%dir %attr(0755, %{sphinx_user}, root) %{_localstatedir}/lib/%{name}
|
||||
%dir %attr(0755, %{sphinx_user}, root) %{_localstatedir}/log/sphinx
|
||||
%dir %attr(0755, %{sphinx_user}, root) %{_localstatedir}/run/sphinx
|
||||
%dir %attr(0755, %{sphinx_user}, root) %{_localstatedir}/lib/sphinx
|
||||
%{_mandir}/man1/*
|
||||
%{_sysusersdir}/sphinx.conf
|
||||
|
||||
%files -n libsphinxclient
|
||||
%doc COPYING %{?with_java: api/java} api/ruby api/*.php api/*.py api/libsphinxclient/README
|
||||
%defattr(-,root,root,-)
|
||||
%doc COPYING api/java api/ruby api/*.php api/*.py api/libsphinxclient/README
|
||||
%{_libdir}/libsphinxclient-0*.so
|
||||
|
||||
|
||||
%files -n libsphinxclient-devel
|
||||
%defattr(-,root,root,-)
|
||||
%{_libdir}/libsphinxclient.so
|
||||
%{_includedir}/*
|
||||
|
||||
%if %{with java}
|
||||
%files java
|
||||
%defattr(0644,root,root,0755)
|
||||
%doc api/java/README COPYING
|
||||
%{_javadir}/*
|
||||
%endif
|
||||
|
||||
|
||||
%files php
|
||||
%defattr(0644,root,root,0755)
|
||||
%doc COPYING
|
||||
%{_datadir}/php/*
|
||||
|
||||
%changelog
|
||||
* Fri Jul 25 2025 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.11-34
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
|
||||
|
||||
* Tue Feb 11 2025 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 2.2.11-33
|
||||
- Add sysusers.d config file to allow rpm to create users/groups automatically
|
||||
|
||||
* Sun Jan 19 2025 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.11-32
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
|
||||
|
||||
* Fri Jul 26 2024 Miroslav Suchý <msuchy@redhat.com> - 2.2.11-31
|
||||
- convert license to SPDX
|
||||
|
||||
* Sat Jul 20 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.11-30
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
|
||||
|
||||
* Sat Jan 27 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.11-29
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||
|
||||
* Tue Dec 19 2023 Florian Weimer <fweimer@redhat.com> - 2.2.11-28
|
||||
- Additional C compatibility fixes
|
||||
|
||||
* Sat Jul 22 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.11-27
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
||||
|
||||
* Sat Jan 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.11-26
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
||||
|
||||
* Tue Jan 10 2023 Florian Weimer <fweimer@redhat.com> - 2.2.11-25
|
||||
- C99 compatibility fixes
|
||||
|
||||
* Tue Aug 16 2022 Michal Schorm <mschorm@redhat.com> - 2.2.11-24
|
||||
- Remove the Java binding
|
||||
Resolves: #2104104, #2113735
|
||||
|
||||
* Sat Jul 23 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.11-23
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
||||
|
||||
* Sat Feb 05 2022 Jiri Vanek <jvanek@redhat.com> - 2.2.11-22
|
||||
- Rebuilt for java-17-openjdk as system jdk
|
||||
|
||||
* Sat Jan 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.11-21
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
||||
|
||||
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.11-20
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
||||
|
||||
* Tue Mar 02 2021 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 2.2.11-19
|
||||
- Rebuilt for updated systemd-rpm-macros
|
||||
See https://pagure.io/fesco/issue/2583.
|
||||
|
||||
* Mon Feb 08 2021 Pavel Raiskup <praiskup@redhat.com> - 2.2.11-18
|
||||
- rebuild for libpq ABI fix rhbz#1908268
|
||||
|
||||
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.11-17
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||
|
||||
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.11-16
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||
|
||||
* Sat Jul 11 2020 Jiri Vanek <jvanek@redhat.com> - 2.2.11-15
|
||||
- Rebuilt for JDK-11, see https://fedoraproject.org/wiki/Changes/Java11
|
||||
|
||||
* Fri Jan 31 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.11-14
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||
|
||||
* Thu Sep 05 2019 Ben Cotton <bcotton@fedoraproject.org> - 2.2.11-13
|
||||
- Listen only on localhost (CVE-2019-14511, rhbz#1749190)
|
||||
|
||||
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.11-12
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||
|
||||
* Thu Feb 14 2019 Orion Poplawski <orion@nwra.com> - 2.2.11-11
|
||||
- Revert incorrect use of _tmpfiledir rhbx#1551735
|
||||
|
||||
* Sun Feb 03 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.11-10
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||
|
||||
* Fri Jul 20 2018 Ben Cotton <bcotton@fedoraproject.org> - 2.2.11-9
|
||||
- Fix FTBFS rhbz#1606397
|
||||
|
||||
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.11-8
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
||||
|
||||
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.11-7
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
||||
|
||||
* Wed Sep 20 2017 Ben Cotton <bcotton@fedoraproject.org> - 2.2.11-6
|
||||
- Change MariaDB interface package dependency rhbz#1493696
|
||||
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.11-5
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
|
||||
|
||||
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.11-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
||||
|
||||
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.11-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
||||
|
||||
* Thu Aug 11 2016 Gerald Cox <gbcox@fedoraproject.org> 2.2.11-2
|
||||
- Correct tmpfile.d sphinx.conf rhbz#1366414
|
||||
|
||||
* Tue Jul 26 2016 Gerald Cox <gbcox@fedoraproject.org> 2.2.11-1
|
||||
- Upstream 2.2.11; remove mysqld.service rhbz#1288815
|
||||
|
||||
* Fri Feb 05 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.10-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
||||
|
||||
* Sun Sep 6 2015 Gerald Cox <gbcox@fedoraproject.org> - 2.2.10-1
|
||||
- Upstream 2.2.10 rhbz#1260452
|
||||
|
||||
* Fri Jun 19 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.9-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
|
||||
|
||||
* Mon Apr 20 2015 Gerald Cox <gbcox@fedoraproject.org> - 2.2.9-1
|
||||
- Upstream 2.2.9 rhbz#1201311
|
||||
|
||||
* Sun Mar 29 2015 Gerald Cox <gbcox@fedoraproject.org> - 2.2.8-1
|
||||
- Upstream 2.2.8 rhbz#1201311
|
||||
|
||||
* Wed Jan 21 2015 Gerald Cox <gbcox@fedoraproject.org> - 2.2.7-1
|
||||
- Upstream 2.2.7
|
||||
|
||||
* Sat Nov 15 2014 Gerald Cox <gbcox@fedoraproject.org> - 2.2.6-1
|
||||
- Upstream 2.2.6
|
||||
|
||||
* Mon Nov 10 2014 Peter Robinson <pbrobinson@fedoraproject.org> 2.2.5-2
|
||||
- Drop ExclusiveArch as armv7hl issue is fixed and aarch64/ppc64/s390 never had issues
|
||||
|
||||
* Tue Oct 28 2014 Gerald Cox <gbcox@fedoraproject.org> - 2.2.5-1
|
||||
- Upstream 2.2.5
|
||||
- ExclusiveArch: %%{ix86} x86_64 rhbz#1107361
|
||||
|
||||
* Mon Aug 18 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1.5-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
|
||||
|
||||
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1.5-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
|
||||
|
||||
* Tue Mar 25 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.1.5-2
|
||||
- Move to java-headless
|
||||
- Resolves: rhbz#1068545
|
||||
|
||||
* Tue Mar 25 2014 Michael Simacek <msimacek@redhat.com> - 2.1.5-2
|
||||
- Remove version from JAR name
|
||||
|
||||
* Sun Jan 26 2014 Peter Robinson <pbrobinson@fedoraproject.org> 2.1.5-1
|
||||
- upstream 2.1.5
|
||||
|
||||
* Sun Jan 26 2014 Peter Robinson <pbrobinson@fedoraproject.org> 2.1.2-2
|
||||
- Fix build with systemd
|
||||
- Cleanup and modernise spec
|
||||
|
||||
* Sat Nov 2 2013 Christof Damian <christof@damian.net> - 2.1.2-1
|
||||
- upstream 2.1.2
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue