Compare commits

...
Sign in to create a new pull request.

7 commits

Author SHA1 Message Date
Till Maas
6909f42444 2016-11-20: Retired orphaned package, because it was orphaned for
more than six weeks.
2016-11-20 11:28:04 +01:00
Dan Horák
a19912bc26 really fix the condition 2015-12-07 15:32:57 +01:00
Dan Horák
7342d2b811 - fix srpm noarch build with __isa_bits undefined 2015-12-07 15:27:25 +01:00
Sam Kottler
4103f9a903 Merge branch 'master' into epel7
* master:
  2.1.5
  Fix build with systemd, Cleanup and modernise spec
  upstream 2.1.2
2014-01-27 15:25:43 +01:00
Christof Damian
01325baccf Merge branch 'master' into f19 2013-07-26 16:18:27 +02:00
Christof Damian
a04b1a1675 Merge branch 'master' into f19 2013-05-11 14:05:03 +02:00
Christof Damian
291d127e02 Merge branch 'master' into f19 2013-04-20 23:25:13 +02:00
10 changed files with 3 additions and 3237 deletions

1
.gitignore vendored
View file

@ -1 +0,0 @@
/sphinx-2.*-release.tar.gz

3
dead.package Normal file
View file

@ -0,0 +1,3 @@
2016-11-20: Retired orphaned package, because it was orphaned for
more than six weeks.

View file

@ -1,12 +0,0 @@
[Unit]
Description=Sphinx - SQL Full Text Search Engine
After=local-fs.target network.target mysqld.service
[Service]
User=sphinx
Type=forking
PIDFile=/run/sphinx/searchd.pid
ExecStart=/usr/bin/searchd --config /etc/sphinx/sphinx.conf
[Install]
WantedBy=multi-user.target

View file

@ -1 +0,0 @@
2f0ca0f4656a8fb5f381a0dfc2b718f5 sphinx-2.1.5-release.tar.gz

View file

@ -1,24 +0,0 @@
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

View file

@ -1,22 +0,0 @@
--- sphinx-2.0.3-release/api/libsphinxclient/sphinxclient.c~ 2011-11-13 06:40:26.000000000 -0600
+++ sphinx-2.0.3-release/api/libsphinxclient/sphinxclient.c 2012-02-14 13:45:50.444826859 -0600
@@ -290,7 +290,7 @@
}
-void sock_close ( int sock );
+static sock_close ( int sock );
#define safe_free(_ptr) \
--- sphinx-2.0.3-release/api/libsphinxclient/sphinxclient.c~ 2012-02-14 13:50:33.000000000 -0600
+++ sphinx-2.0.3-release/api/libsphinxclient/sphinxclient.c 2012-02-14 13:54:50.527389085 -0600
@@ -1253,7 +1253,7 @@
}
-void sock_close ( int sock )
+static sock_close ( int sock )
{
if ( sock<0 )
return;

View file

@ -1,29 +0,0 @@
--- src/sphinxexpr.cpp.orig 2012-02-15 08:49:22.012513635 -0600
+++ src/sphinxexpr.cpp 2012-02-15 08:49:47.634770092 -0600
@@ -1796,7 +1796,7 @@
/// evaluate arg, return interval id
virtual int IntEval ( const CSphMatch & tMatch ) const
{
- T val = ExprEval ( this->m_pArg, tMatch ); // 'this' fixes gcc braindamage
+ T val = this->ExprEval ( this->m_pArg, tMatch ); // 'this' fixes gcc braindamage
ARRAY_FOREACH ( i, this->m_dValues ) // FIXME! OPTIMIZE! perform binary search here
if ( val<this->m_dValues[i] )
return i;
@@ -1827,7 +1827,7 @@
/// evaluate arg, return interval id
virtual int IntEval ( const CSphMatch & tMatch ) const
{
- T val = ExprEval ( this->m_pArg, tMatch ); // 'this' fixes gcc braindamage
+ T val = this->ExprEval ( this->m_pArg, tMatch ); // 'this' fixes gcc braindamage
ARRAY_FOREACH ( i, m_dTurnPoints )
if ( val < Expr_ArgVsSet_c<T>::ExprEval ( m_dTurnPoints[i], tMatch ) )
return i;
@@ -1873,7 +1873,7 @@
/// evaluate arg, check if the value is within set
virtual int IntEval ( const CSphMatch & tMatch ) const
{
- T val = ExprEval ( this->m_pArg, tMatch ); // 'this' fixes gcc braindamage
+ T val = this->ExprEval ( this->m_pArg, tMatch ); // 'this' fixes gcc braindamage
return this->m_dValues.BinarySearch ( val )!=NULL;
}

File diff suppressed because it is too large Load diff

View file

@ -1,106 +0,0 @@
#!/bin/sh
#
# sphinx searchd Free open-source SQL full-text search engine
#
# chkconfig: - 20 80
# description: Starts and stops the sphinx searchd daemon that handles \
# all search requests.
### BEGIN INIT INFO
# Provides: searchd
# Required-Start: $local_fs $network
# Required-Stop: $local_fs $network
# Should-Start: $remote_fs
# Should-Stop: $remote_fs
# Default-Start:
# Default-Stop: 0 1 2 3 4 5 6
# Short-Description: start and stop sphinx searchd daemon
# Description: Sphinx is a free open-source SQL full-text search engine
### END INIT INFO
# Source function library.
. /etc/rc.d/init.d/functions
exec="/usr/bin/searchd"
prog="searchd"
config="/etc/sphinx/sphinx.conf"
username="sphinx"
lockfile=/var/lock/subsys/searchd
start() {
[ -x $exec ] || exit 5
[ -f $config ] || exit 6
echo -n $"Starting $prog: "
# if not running, start it up here, usually something like "daemon $exec"
daemon --user=$username $exec --config $config
retval=$?
echo
[ $retval -eq 0 ] && touch $lockfile
return $retval
}
stop() {
echo -n $"Stopping $prog: "
# stop it here, often "killproc $prog"
killproc $prog
retval=$?
echo
[ $retval -eq 0 ] && rm -f $lockfile
return $retval
}
restart() {
stop
start
}
reload() {
restart
}
force_reload() {
restart
}
rh_status() {
# run checks to determine if the service is running or use generic status
status $prog
}
rh_status_q() {
rh_status >/dev/null 2>&1
}
case "$1" in
start)
rh_status_q && exit 0
$1
;;
stop)
rh_status_q || exit 0
$1
;;
restart)
$1
;;
reload)
rh_status_q || exit 7
$1
;;
force-reload)
force_reload
;;
status)
rh_status
;;
condrestart|try-restart)
rh_status_q || exit 0
restart
;;
*)
echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}"
exit 2
esac
exit $?

View file

@ -1,360 +0,0 @@
%global sphinx_user sphinx
%global sphinx_group sphinx
%global sphinx_home %{_localstatedir}/lib/sphinx
Name: sphinx
Version: 2.1.5
Release: 1%{?dist}
Summary: Free open-source SQL full-text search engine
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
BuildRequires: expat-devel
BuildRequires: mysql-devel
BuildRequires: postgresql-devel
BuildRequires: systemd
# for fix-ups
BuildRequires: dos2unix
Requires(post): systemd
Requires(preun): systemd
Requires(postun): systemd
# Users and groups
Requires(pre): shadow-utils
%description
Sphinx is a full-text search engine, distributed under GPL version 2.
Commercial licensing (e.g. for embedded use) is also available upon request.
Generally, it's a standalone search engine, meant to provide fast,
size-efficient and relevant full-text search functions to other
applications. Sphinx was specially designed to integrate well with SQL
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. to natively support some other DBMSes) is
designed to be as easy as possible.
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. Yes, I know about CMU's Sphinx project.
%package -n libsphinxclient
Summary: Pure C searchd client API library
Group: Development/Libraries
%description -n libsphinxclient
Pure C searchd client API library
Sphinx search engine, http://sphinxsearch.com/
%package -n libsphinxclient-devel
Summary: Development libraries and header files for libsphinxclient
Group: Development/Libraries
Requires: libsphinxclient = %{version}-%{release}
%description -n libsphinxclient-devel
Pure C searchd client API library
Sphinx search engine, http://sphinxsearch.com/
%package java
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.
%package php
Summary: PHP API for Sphinx
Group: Development/Libraries
Requires: php-common >= 5.1.6
%description php
This package provides the PHP API for Sphinx,
the free, open-source full-text search engine,
designed with indexing database content in mind.
%prep
%setup -qn %{name}-%{version}-release
%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/sphinx/sphinx_test.sql \
; do
dos2unix ${f}
done
%build
%if %{__isa_bits} == 64
%configure --sysconfdir=%{_sysconfdir}/sphinx --with-mysql --with-pgsql --enable-id64
%else
%configure --sysconfdir=%{_sysconfdir}/sphinx --with-mysql --with-pgsql
%endif
make %{?_smp_mflags}
# Build libsphinxclient
pushd api/libsphinxclient
%configure
make #%{?_smp_mflags}
popd
# make the java api
make -C api/java
%install
make install DESTDIR=$RPM_BUILD_ROOT INSTALL="%{__install} -p -c"
install -p -D -m 0755 %{SOURCE1} $RPM_BUILD_ROOT%{_unitdir}/searchd.service
# Create /var/log/sphinx
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/log/sphinx
# Create /var/run/sphinx
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/run/sphinx
# Create /var/lib/sphinx
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/lib/sphinx
# Create sphinx.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/sphinx/searchd.log|g' \
$RPM_BUILD_ROOT%{_sysconfdir}/sphinx/sphinx.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/sphinx/searchd.pid|g' \
$RPM_BUILD_ROOT%{_sysconfdir}/sphinx/sphinx.conf
sed -i 's|/var/data|%{_localstatedir}/lib/sphinx|g' \
$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/sphinx << EOF
%{_localstatedir}/log/sphinx/*.log {
weekly
rotate 10
copytruncate
delaycompress
compress
notifempty
missingok
}
EOF
# Create /etc/logrotate.d/sphinx
mkdir -p $RPM_BUILD_ROOT%{_tmpfilesdir}
cat > $RPM_BUILD_ROOT%{_tmpfilesdir}/%{name}.conf << EOF
d %{_localstatedir}/run/sphinx 755 sphinx root -
EOF
# Install libsphinxclient
pushd api/libsphinxclient/
make install DESTDIR=$RPM_BUILD_ROOT INSTALL="%{__install} -p -c"
popd
# install the java api
mkdir -p $RPM_BUILD_ROOT%{_javadir}
install -m 0644 api/java/%{name}api.jar \
$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."
# - http://fedoraproject.org/wiki/Packaging:PHP
install -d -m 0755 $RPM_BUILD_ROOT%{_datadir}/php
install -m 0644 api/%{name}api.php $RPM_BUILD_ROOT%{_datadir}/php
# clean-up .la archives
find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
# clean-up .a archives
find $RPM_BUILD_ROOT -name '*.a' -exec rm -f {} ';'
%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
%preun
%systemd_preun searchd.service
%post -p /sbin/ldconfig -n libsphinxclient
%postun
%systemd_postun_with_restart searchd.service
%posttrans
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
# User must manually run systemd-sysv-convert --apply httpd
# to migrate them to systemd targets
/usr/bin/systemd-sysv-convert --save searchd >/dev/null 2>&1 ||:
# Run these because the SysV package being removed won't do them
/sbin/chkconfig --del searchd >/dev/null 2>&1 || :
/bin/systemctl try-restart searchd.service >/dev/null 2>&1 || :
%files
%doc COPYING doc/sphinx.txt sphinx-min.conf.dist sphinx.conf.dist example.sql
%dir %{_sysconfdir}/sphinx
%config(noreplace) %{_sysconfdir}/sphinx/sphinx.conf
%exclude %{_sysconfdir}/sphinx/*.conf.dist
%exclude %{_sysconfdir}/sphinx/example.sql
%{_unitdir}/searchd.service
%config(noreplace) %{_sysconfdir}/logrotate.d/sphinx
%{_tmpfilesdir}/%{name}.conf
%{_bindir}/*
%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/*
%files -n libsphinxclient
%doc COPYING api/java api/ruby api/*.php api/*.py api/libsphinxclient/README
%{_libdir}/libsphinxclient-0*.so
%files -n libsphinxclient-devel
%{_libdir}/libsphinxclient.so
%{_includedir}/*
%files java
%doc api/java/README COPYING
%{_javadir}/*
%files php
%doc COPYING
%{_datadir}/php/*
%changelog
* 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
* Fri Jul 26 2013 Christof Damian <christof@damian.net> - 2.0.8-2
- --enable-id64 flag for 64-bit builds
* Sat May 11 2013 Christof Damian <christof@damian.net> - 2.0.8-1
- upstream 2.0.8
* Sat Apr 20 2013 Christof Damian <christof@damian.net> - 2.0.7-1
- upstream 2.0.7
- use tmpfiles.d to create pid directory
- move default log file location to /var/log/sphinx
- use systemd macros BZ 850323
* Wed Mar 6 2013 Michel Salim <salimma@fedoraproject.org> - 2.0.6-1
- Update to 2.0.6
- Remove obsoleted patches
* Fri Feb 15 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.3-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Tue Feb 14 2012 Jon Ciesla <limburgher@gmail.com> - 2.0.3-1
- New upstream, migrate to systemd, BZ 692157.
- Patched for gcc47.
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.9-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
* Wed Mar 23 2011 Dan Horák <dan@danny.cz> - 0.9.9-6
- rebuilt for mysql 5.5.10 (soname bump in libmysqlclient)
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.9-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Sat Dec 11 2010 Christof Damian <christof@damian.net> - 0.9.9-4
- add java and php subpackages ( bug 566787 )
* Sat Dec 11 2010 Christof Damian <christof@damian.net> - 0.9.9-3
- change default listen address to localhost ( bug 566792 )
- add ghost for files in /var/run/ ( bug 656694 )
* Wed Jul 14 2010 Christof Damian <christof@damian.net> - 0.9.9-2
- add COPYING file to lib package
* Thu Feb 11 2010 Allisson Azevedo <allisson@gmail.com> 0.9.9-1
- Update to 0.9.9 (#556997).
- Added sphinx-0.9.9-fix_static.patch to fix FTBS.
- Run sphinx searchd as non-root user (#541464).
* Wed Aug 26 2009 Tomas Mraz <tmraz@redhat.com> 0.9.8.1-4
- Rebuild with new openssl
* Wed Aug 12 2009 Allisson Azevedo <allisson@gmail.com> 0.9.8.1-3
- Fixed macros consistency.
- Modified make install to keep timestamps.
- Added libsphinxclient package.
* Fri Aug 7 2009 Allisson Azevedo <allisson@gmail.com> 0.9.8.1-2
- Added sysv init.
- Added logrotate.d entry.
* Thu Jul 30 2009 Allisson Azevedo <allisson@gmail.com> 0.9.8.1-1
- Initial rpm release.