rpms/sphinx/F-12 sphinx-0.9.9-fix_static.patch, NONE, 1.1 .cvsignore, 1.2, 1.3 import.log, 1.1, 1.2 sources, 1.2, 1.3 sphinx.init, 1.1, 1.2 sphinx.spec, 1.2, 1.3

Allisson Azevedo allisson at fedoraproject.org
Thu Feb 11 13:32:45 UTC 2010


Author: allisson

Update of /cvs/pkgs/rpms/sphinx/F-12
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv11936/F-12

Modified Files:
	.cvsignore import.log sources sphinx.init sphinx.spec 
Added Files:
	sphinx-0.9.9-fix_static.patch 
Log Message:

- 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).


sphinx-0.9.9-fix_static.patch:
 sphinxclient.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- NEW FILE sphinx-0.9.9-fix_static.patch ---
diff -up sphinx-0.9.9/api/libsphinxclient/sphinxclient.c.fix_static sphinx-0.9.9/api/libsphinxclient/sphinxclient.c
--- sphinx-0.9.9/api/libsphinxclient/sphinxclient.c.fix_static	2010-02-11 08:32:43.473905916 -0300
+++ sphinx-0.9.9/api/libsphinxclient/sphinxclient.c	2010-02-11 08:33:23.264905947 -0300
@@ -277,7 +277,7 @@ static void sphinx_free_results ( sphinx
 }
 
 
-void sock_close ( int sock );
+static void sock_close ( int sock );
 
 void sphinx_destroy ( sphinx_client * client )
 {


Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/sphinx/F-12/.cvsignore,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -p -r1.2 -r1.3
--- .cvsignore	14 Aug 2009 16:35:26 -0000	1.2
+++ .cvsignore	11 Feb 2010 13:32:44 -0000	1.3
@@ -1 +1 @@
-sphinx-0.9.8.1.tar.gz
+sphinx-0.9.9.tar.gz


Index: import.log
===================================================================
RCS file: /cvs/pkgs/rpms/sphinx/F-12/import.log,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- import.log	14 Aug 2009 16:35:26 -0000	1.1
+++ import.log	11 Feb 2010 13:32:44 -0000	1.2
@@ -1 +1,2 @@
 sphinx-0_9_8_1-3_fc11:HEAD:sphinx-0.9.8.1-3.fc11.src.rpm:1250267674
+sphinx-0_9_9-1_fc12:F-12:sphinx-0.9.9-1.fc12.src.rpm:1265895131


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/sphinx/F-12/sources,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -p -r1.2 -r1.3
--- sources	14 Aug 2009 16:35:26 -0000	1.2
+++ sources	11 Feb 2010 13:32:44 -0000	1.3
@@ -1 +1 @@
-428a14df41fb425e664d9e2d6178c037  sphinx-0.9.8.1.tar.gz
+7b9b618cb9b378f949bb1b91ddcc4f54  sphinx-0.9.9.tar.gz


Index: sphinx.init
===================================================================
RCS file: /cvs/pkgs/rpms/sphinx/F-12/sphinx.init,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- sphinx.init	14 Aug 2009 16:35:26 -0000	1.1
+++ sphinx.init	11 Feb 2010 13:32:45 -0000	1.2
@@ -24,6 +24,7 @@
 exec="/usr/bin/searchd"
 prog="searchd"
 config="/etc/sphinx/sphinx.conf"
+username="sphinx"
 
 lockfile=/var/lock/subsys/searchd
 
@@ -32,7 +33,7 @@ start() {
     [ -f $config ] || exit 6
     echo -n $"Starting $prog: "
     # if not running, start it up here, usually something like "daemon $exec"
-    daemon $exec --config $config
+    daemon --user=$username $exec --config $config
     retval=$?
     echo
     [ $retval -eq 0 ] && touch $lockfile


Index: sphinx.spec
===================================================================
RCS file: /cvs/pkgs/rpms/sphinx/F-12/sphinx.spec,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -p -r1.2 -r1.3
--- sphinx.spec	26 Aug 2009 10:19:59 -0000	1.2
+++ sphinx.spec	11 Feb 2010 13:32:45 -0000	1.3
@@ -1,6 +1,10 @@
+%global sphinx_user sphinx
+%global sphinx_group sphinx
+%global sphinx_home %{_localstatedir}/lib/sphinx
+
 Name:           sphinx
-Version:        0.9.8.1
-Release:        4%{?dist}
+Version:        0.9.9
+Release:        1%{?dist}
 Summary:        Free open-source SQL full-text search engine
 
 Group:          Applications/Text
@@ -8,6 +12,7 @@ License:        GPLv2+
 URL:            http://sphinxsearch.com
 Source0:        http://sphinxsearch.com/downloads/%{name}-%{version}.tar.gz
 Source1:        %{name}.init
+Patch0:         %{name}-%{version}-fix_static.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildRequires:  mysql-devel
@@ -15,10 +20,12 @@ BuildRequires:  postgresql-devel
 BuildRequires:  expat-devel
 #Requires:
 
+#Initscripts
 Requires(post): chkconfig
-Requires(preun): chkconfig
-# This is for /sbin/service
-Requires(preun): initscripts
+Requires(preun): chkconfig initscripts
+
+# Users and groups
+Requires(pre): shadow-utils
        
 
 %description
@@ -66,6 +73,7 @@ Sphinx search engine, http://sphinxsearc
 
 %prep
 %setup -q
+%patch0 -p1 -b .fix_static
 
 # Fix wrong-file-end-of-line-encoding
 sed -i 's/\r//' api/ruby/spec/sphinx/sphinx_test.sql
@@ -145,6 +153,13 @@ find $RPM_BUILD_ROOT -name '*.a' -exec r
 %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
 /sbin/chkconfig --add searchd
 
@@ -154,12 +169,14 @@ if [ $1 = 0 ] ; then
     /sbin/chkconfig --del searchd
 fi
 
-
 %post -p /sbin/ldconfig -n libsphinxclient
 
-
 %postun -p /sbin/ldconfig -n libsphinxclient
- 
+
+%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/
 
 
 %files
@@ -172,9 +189,9 @@ fi
 %{_initrddir}/searchd
 %config(noreplace) %{_sysconfdir}/logrotate.d/sphinx
 %{_bindir}/*
-%dir %{_localstatedir}/log/sphinx
-%dir %{_localstatedir}/run/sphinx
-%dir %{_localstatedir}/lib/sphinx
+%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
 
 %files -n libsphinxclient
 %defattr(-,root,root,-)
@@ -187,7 +204,13 @@ fi
 %{_libdir}/libsphinxclient.so
 %{_includedir}/*
 
+
 %changelog
+* Thu Feb 11 2010 Allisson Azevedo <allisson at 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 at redhat.com> 0.9.8.1-4
 - Rebuild with new openssl
 



More information about the scm-commits mailing list