Warning: file_exists(): open_basedir restriction in effect. File(/srv/http/vhosts/aur.archlinux.org/public/web/locale//en/LC_MESSAGES/aurweb.mo) is not within the allowed path(s): (/srv/http/vhosts/aur-dev.archlinux.org/:/etc/aurweb/) in /srv/http/vhosts/aur-dev.archlinux.org/public/web/lib/streams.php on line 90
AUR (en) - sphinx

Notice: Undefined variable: name in /srv/http/vhosts/aur-dev.archlinux.org/public/web/lib/pkgfuncs.inc.php on line 248

Package Details: sphinx 2.2.11-1

Git Clone URL: https://aur-dev.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: 65
Popularity: 0.148307
First Submitted: 2008-05-26 00:46
Last Updated: 2016-08-06 08:43

Latest Comments

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

Emmaseven commented on 2014-01-21 08:06

[/usr/lib/tmpfiles.d/sphinx.conf:1] Unknown user 'sphinx'.

Slash commented on 2014-01-17 17:20

Sorry, groupadd and useradd don't require an id (and this PKGBUILD wouldn't need to reference it), so you can just exclude the number in the groupadd and useradd commands and not have to worry about it; ie:

groupadd sphinx
useradd -g sphinx -d /usr/share/sphinx/ -s /bin/false sphinx

The process will also need to write to logs and rotate data files, so you'll need to chown the appropriate directories in the install script as well (like the elasticsearch package):

chown -R sphinx:sphinx /var/lib/sphinx/

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.