Package Details: sphinx 2.2.11-1

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: 65
Popularity: 1.233451
First Submitted: 2008-05-26 00:46
Last Updated: 2016-08-06 08:43

Latest Comments

cinatic commented on 2016-08-22 12:40

hi user00265,

a split-build is not possible, a seperate package has to be created, if you are interested i can create a pkg?

user00265 commented on 2016-08-16 22:05

Is there any way this package could either get support for, or have a split-build for, libsphinxclient? I currently modified the PKGBUILD to just install it as part of the package, but I feel this might be either a different package or split-build.

cinatic commented on 2015-10-08 10:37

@peterhoeg
thx for the hint, i compared the install hook with those from mariadb and apache and decided now to change it in a slightly different way



peterhoeg commented on 2015-10-08 09:28

Both groupadd and useradd in sphinx.install should use the --system parameter so the sphinx user is created correctly.

Maybe add --shell /usr/bin/nologin as well?

cinatic commented on 2015-05-13 09:42

@scooter
uhm good question, i am not able to find the source for the search executable. I remember that i tried it once 1 year ago and got some troubles with the command line tools. Maybe they removed it now

IMO it is better to test it by mysql client:
-> mysql -P 9306 -h 127.0.0.1

For SphinxSE you should try workbench or another mysql client of your choice.

scooter commented on 2015-05-12 19:15

Hi there. I installed this, but it seems to be missing the "search" command. All the articles I read mention this command for console searching. Is there a reason it's missing? How do I get it?

cinatic commented on 2015-04-28 18:00

@Enverex
i updated the source and commented the user and group "sphinx" params, i think systemd user is sufficient for the daemon

Enverex commented on 2015-04-28 13:54

Is the service file correct? It claims it failed to start but it's running just fine. Should it be set to simple or some other service type?

Enverex commented on 2015-04-28 13:53

Is the service file correct? It claims it failed to start but it's running just fine. Should it be set to forking or some other service type?

cinatic commented on 2015-01-28 21:44

@dcelasun updated

i will check the services at the weekend

dcelasun commented on 2015-01-28 08:09

@alculquicondor 2.2.7 is out.

dcelasun commented on 2015-01-28 08:03

@Slash: You are right, without to pid file "indexer --rotate --all" doesn't work, but "indexer --all" does. But without switching to Type=simple in the service file, "systemctl start sphinx" immediately fails for me.

Does it work for you? How?

maximalist commented on 2015-01-08 10:30

Please add regexp support
http://sphinxsearch.com/docs/current.html#conf-regexp-filter

maximalist commented on 2015-01-08 10:03

Please add regexp support
http://sphinxsearch.com/docs/current.html#conf-regexp-filter
depends=(... 're2')
build() {
...
--with-re2
...
}

Slash commented on 2014-12-25 21:31

I believe a PID file is required for the sphinx indexer to rotate indexes (if you're using --rotate). If type=simple is used, PIDFile cannot be used and indexer will always fail to rotate indexes because it can't find the pid file.

Emmaseven commented on 2014-11-13 10:32

ab0007c9b128b6fde17d936c131f7a17
2.2.5

dcelasun commented on 2014-10-27 08:26

With the current service file, Sphinx doesn't start for me. Following @Artefact2's advice seems to fix it.

salviati commented on 2014-10-02 04:36

2.2.4 is out

Artefact2 commented on 2014-07-25 12:09

It would probably better to pass --console to searchd, so that it doesn't fork. This way you can use Type=simple and let systemd handle the forking. This makes it easier to track the status of the service (no need for a pid file, so no need to fiddle with /run and tmpfiles.d) and also lets journalctl handle the logging.

Emmaseven commented on 2014-04-30 10:53

MariaDB replaces MySQL in repositories

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.

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

brando56894 commented on 2012-12-28 14:41

can this be updated to include a systemd sphinx.service file instead of an rc.d daemon?

SirPenguins commented on 2012-08-09 19:11

I'll adopt this package, as I use it extensively. Let me know if and when you're able to take it back over, dreyes, and I'll gladly hand it back to you.

SirPenguins commented on 2012-08-09 19:11

I'll adopt this package, as I use it extensively. Let me know if and when you're about to take it back over, dreyes, and I'll gladly hand it back to you.

dryes commented on 2012-08-02 19:59

Done.

(disowning package due to upcoming time sink.)

Anonymous comment on 2012-08-02 07:48

same proble like previous version
please add line below in the build:

sed -i '15199,15199 s/x00/x21/' "${srcdir}/${pkgname}-${pkgver}-release/src/searchd.cpp"

thanks.

dryes commented on 2012-08-02 00:10

Updated to 2.0.5.

Note: removed 'sphinx-' prefix, but added symlinks so as not to break things.

dryes commented on 2012-07-25 15:32

Updated with patch below. Thanks.

Anonymous comment on 2012-07-25 06:38

for: //sphinxsearch.com/forum/view.html?id=9856

edit PKGBUILD :

before edit :
build() {
sed -i 's/T val = ExprEval/T val = this->ExprEval/g' "${srcdir}/${pkgname}-${pkgver}-release/src/sphinxexpr.cpp"

after edit :
build() {
sed -i 's/T val = ExprEval/T val = this->ExprEval/g' "${srcdir}/${pkgname}-${pkgver}-release/src/sphinxexpr.cpp"
sed -i '15083,15083 s/x00/x21/' "${srcdir}/${pkgname}-${pkgver}-release/src/searchd.cpp"

...

martinpoljak commented on 2012-07-24 16:30

For using the RT indexes feature, please see:
http://sphinxsearch.com/forum/view.html?id=9856

RT feature of the current Sphinx version (2.0.4) isn't compatible with the latest PHP 5.4.5 mysqlnd available in the repository. Patch is described in the same place and it's maybe a good idea to include it into the package because it's in fact an by PHP inducted regression.

dryes commented on 2012-05-25 06:03

Regarding the prefix, I assume it's to avoid conflicts with other packages, although I couldn't say which.

If anyone has any input, please share.


Also yes.

cameel commented on 2012-05-24 13:09

One more thing: could PostgreSQL support be enabled by default (--with-pgsql option for configure)?

cameel commented on 2012-05-24 13:05

Why are the executables prefixed with 'sphinx-'? I'm trying to use this package with thinking_sphinx ruby gem, but it assumes that the name is 'searchd' and only allows you to specify the path, not the executable name through the 'bin_path' configuration option. I know that I can edit the PKGBUILD to change it and that's what I'm going to do but I just wanted to know what is the rationale behind having this prefix by default.

cameel commented on 2012-05-24 12:36

Why are the executables prefixed with 'sphinx-'? I'm trying to use this package with thinking_sphinx ruby gem, but it assumes that the name is 'searchd' and only allows you to specify the path, not the executable name through the 'bin_path' configuration option. I know that I can edit the PKGBUILD to change it and that's what I'm going to do but I just wanted to know what is the rationale behind having this prefix by default.

dryes commented on 2012-04-18 02:30

mamciek: thanks. updated.

mamciek commented on 2012-04-10 14:20

In the meantime this patch helps http://pastebin.com/20wfb1vn (at least compilation doesn't fail)

mamciek commented on 2012-04-10 13:04

I filed issue report http://sphinxsearch.com/bugs/view.php?id=1157

mamciek commented on 2012-04-10 12:15

Cannot build sphinx

make[2]: *** [sphinxexpr.o] Error 1
make[2]: Leaving directory `/tmp/yaourt-tmp-maciej/aur-sphinx/src/sphinx-2.0.4-release/src'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/tmp/yaourt-tmp-maciej/aur-sphinx/src/sphinx-2.0.4-release/src'
make: *** [all-recursive] Error 1

dryes commented on 2012-01-16 20:18

Thanks mtorromeo; updated with below and a few changes of my own.

mtorromeo commented on 2012-01-16 09:34

Here is my version of the PKGBUILD http://pastie.org/3193982.

Things I fixed/changed:
- odd version
- duplicated md5sums
- splitted build/package functions
- add unixodbc, expat and libmysqlclient as dependencies
- backup etc/conf.d/sphinx

Thanks

mtorromeo commented on 2012-01-16 09:17

@dryes: Would you mind fixing the dependencies as for my previous message?

dryes commented on 2012-01-13 15:32

Adopted and updated to 2.0.3.

Anonymous comment on 2011-12-27 13:08

2.0.3 is out
http://pastie.org/private/m1ywbow8xolyj2uukmsjba

dryes commented on 2011-12-14 00:29

2.0.2-beta is out,

tar.gz MD5: fafe0f1a71d0ded32404c067eba7d0b3


PKGBUILD: http://pastebin.com/cUM2NnTT


thanks!

Anonymous comment on 2011-05-18 22:46

2.0.1-beta is out

dbrgn commented on 2011-02-24 15:18

You should change ${startdir}/pkg/ to ${pkgdir} in your PKGBUILD. Also, the mysql dependency should be removed, as Sphinx works with different backends, for example PostgreSQL. Put them in optdepends instead.

mtorromeo commented on 2011-02-07 10:19

namcap complains about missing dependencies:

namcap sphinx-1.10-3-x86_64.pkg.tar.xz
sphinx E: Dependency detected and not included (unixodbc) from files ['usr/bin/sphinx-indextool', 'usr/bin/sphinx-indexer', 'usr/bin/sphinx-spelldump', 'usr/bin/sphinx-search', 'usr/bin/sphinx-searchd']
sphinx E: Dependency detected and not included (expat) from files ['usr/bin/sphinx-indextool', 'usr/bin/sphinx-indexer', 'usr/bin/sphinx-spelldump', 'usr/bin/sphinx-search', 'usr/bin/sphinx-searchd']
sphinx E: Dependency detected and not included (gcc-libs-multilib) from files ['usr/bin/sphinx-indextool', 'usr/bin/sphinx-indexer', 'usr/bin/sphinx-spelldump', 'usr/bin/sphinx-search', 'usr/bin/sphinx-searchd']

And in fact sphinx cannot start on a clean install:
sphinx-indexer: error while loading shared libraries: libodbc.so.1: cannot open shared object file: No such file or directory
sphinx-searchd: error while loading shared libraries: libodbc.so.1: cannot open shared object file: No such file or directory

CjK commented on 2010-12-04 09:57

@keithw Thanks for your no-mysql version

@x0x01 Well Sphinx supports ODBC and thus a whole lot of databases apart from mysql. I use it with Oracle for example.

x0x01 commented on 2010-11-20 06:09

no sense in sphinx without mysql :) thnx

keithw commented on 2010-11-19 21:50

Trivial fix for the mysql dependency problem (assuming you don't need mysql -- I don't):

http://aur.pastebin.com/0NibuhzE

keithw commented on 2010-11-19 19:00

Seems to have a missing dependency on mysql:

checking whether to compile with MySQL support... yes
checking for mysql_config... not found
checking MySQL include files... configure: error: missing include files.

Aborting...
==> ERROR: Makepkg was unable to build sphinx.

x0x01 commented on 2010-11-13 10:29

latest version 1.10-beta, added rc.d and conf.d scripts

csgeek commented on 2010-09-17 14:53

is there a 1.10 beta aur package out? I couldn't find if there is, or I may have overlooked it.

for the bug bellow.. to save you from reading the long forum post just disable #MAKEFLAGS="-j5" from your /etc/makepkg.conf to fix it.


Anonymous comment on 2010-07-21 08:25

1.10 beta is out and is recommended one

Anonymous comment on 2010-04-26 16:55

Solved http://bbs.archlinux.org/viewtopic.php?id=77214

Anonymous comment on 2010-04-26 16:48

Same error as @jqxl0205 here

jqww2002 commented on 2010-04-06 16:31

There is something wrong here.

/bin/sh ./libtool --mode=compile --tag=CC gcc -DHAVE_CONFIG_H -I. -I. -I. -march=i686 -mtune=generic -O2 -pipe -c -o sphinxclient.lo sphinxclient.c
gcc -DHAVE_CONFIG_H -I. -I. -I. -march=i686 -mtune=generic -O2 -pipe -c test.c
make[1]: *** No rule to make target `.libs/libsphinxclient.a', needed by `test'. Stop.
make[1]: *** Waiting for unfinished jobs....
mkdir .libs
gcc -DHAVE_CONFIG_H -I. -I. -I. -march=i686 -mtune=generic -O2 -pipe -c sphinxclient.c -fPIC -DPIC -o .libs/sphinxclient.o
gcc -DHAVE_CONFIG_H -I. -I. -I. -march=i686 -mtune=generic -O2 -pipe -c sphinxclient.c -o sphinxclient.o >/dev/null 2>&1


Any ideas?