Package Details: sphinx 2.2.11-2

Git Clone URL: https://aur.archlinux.org/sphinx.git (read-only)
Package Base: sphinx
Description: Free open-source SQL full-text search engine.
Upstream URL: http://www.sphinxsearch.com/
Keywords: devel engine fulltext
Licenses: GPL
Submitter: None
Maintainer: cinatic
Last Packager: cinatic
Votes: 69
Popularity: 0.000010
First Submitted: 2008-05-26 00:46
Last Updated: 2017-06-05 10:09

Latest Comments

« First ‹ Previous 1 2 3 4 5 6 7 8 Next › Last »

Slash commented on 2014-01-17 17:06

@SirPenguins: Nice job on the updates. I think you need to add the actual creation of the user/group in the post-install process. There is no "sphinx" user by default (and the package doesn't create one), so systemd is unable to start the service. Additionally, the tmpfiles.d things won't be applied until you reboot, so the directories won't be created in /run/ after installation.

Check out a package like elasticsearch for an example on how to do these things:

https://projects.archlinux.org/svntogit/community.git/tree/trunk?h=packages/elasticsearch

The elasticsearch.install creates the user, group, and tells systemd to reload the tmpfiles.d configuration after install/update (just make sure you change the user/group id numbers to something else).

SirPenguins commented on 2014-01-02 19:36

Updated and included skunark's changes. Thank you for the help!

skunark commented on 2013-11-10 05:19

Few more recommendations

1) Enable systemd to restart sphinx in the sphinx.service file by adding:
Restart=always

2) Sphinx is running as root and probably should run as created user sphinx, just add in the sphinx.server
User=sphinx
Group=sphinx

3) Sphinx PID file should exist under /run/sphinx, which you can add by create the sphinx.tmpfiles.conf file with the following contents:
d /run/sphinx 0755 sphinx sphinx -

and also update the PKGBUILD with
install -Dm644 "${srcdir}/sphinx.tmpfiles.conf" "${pkgdir}/usr/lib/tmpfiles.d/sphinx.conf"

skunark commented on 2013-09-15 08:21

You might consider adding the following to the PKGBUILD

install -d "${pkgdir}/usr/share/sphinx/lib"
install -Dm644 api/sphinxapi.php "${pkgdir}/usr/share/sphinx/lib/sphinxapi.php"
install -Dm644 api/sphinxapi.py "${pkgdir}/usr/share/sphinx/lib/sphinxapi.py"

benoit commented on 2013-01-04 18:14

Thanks a lot for the fast update!

Systemd does not seem to care if the unit files listed on the After line exist or not (I just tested this).

You could put both dependencies on the After line and it should start both databases, either one of them or none of them depending of whatever is installed. The only drawback I can see with this method is that it will start a useless database if both are installed.

SirPenguins commented on 2013-01-04 14:51

2013-01-04 14:48
Thank you! I updated the package with the new .service file, but I added a new ExecStop directive to use searchd --stopwait to bring down the searchd instance upon a 'systemctl stop sphinx'.

Those using postgresql need to copy the service file to /etc/systemd/system and change the "After" directive to want postgresql instead of mysql. I don't know how to specify an either/or wants for those two.

I've also modified the rc script to use the pid file that upstream recommends and ships their config with.

SirPenguins commented on 2013-01-04 14:48

Thank you! I updated the package with the new .service file, but I added a new ExecStop directive to use searchd --stopwait to bring down the searchd instance upon a 'systemctl stop sphinx'.

Those using postgresql need to copy the service file to /etc/systemd/system and change the "Wants" directive to want postgresql instead of mysql. I don't know how to specify an either/or wants for those two.

I've also modified the rc script to use the pid file that upstream recommends and ships their config with.

SirPenguins commented on 2013-01-04 14:48

Thank you! I updated the package with the new .service file, but I added a new ExecStop directive to use search --stopwait to bring down the searchd instance upon a 'systemctl stop sphinx'.

Those using postgresql need to copy the service file to /etc/systemd/system and change the "Wants" directive to want postgresql instead of mysql. I don't know how to specify an either/or wants for those two.

I've also modified the rc script to use the pid file that upstream recommends and ships their config with.

benoit commented on 2013-01-04 08:36

Below is a systemd service file. This is my first time writing one, but I adapted it from the fedora rpm package, so it should be mostly good.

http://dl.dropbox.com/u/980984/sphinx.service

SirPenguins commented on 2012-12-28 15:18

Sure, if you write one and link it here I will certainly add it.
Otherwise, you'll have to wait until I can get to it (which may be a few days).