summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* autogen.sh: remove fileHEADmasterMichael Orlitzky2023-12-051-2/+0
| | | | | | I think we can assume familiarity with "autoreconf -fi" these days. Signed-off-by: Michael Orlitzky <mjo@gentoo.org>
* configure.ac: update to version 0.9.90.9.9Michael Orlitzky2023-07-261-1/+1
| | | | Signed-off-by: Michael Orlitzky <mjo@gentoo.org>
* openrc/init.d/php-fpm.in.in: don't run eselect during sysinit.Michael Orlitzky2023-07-251-3/+15
| | | | | | | | | | | | | | | | | | | | | | OpenRC caches its dependency tree at boot time, before any non-boot services have started. It does this by sourcing service scripts, which means that running commands in global scope is dangerous because they may not be available yet. In bug 910589 we witness this with a call to eselect in the php-fpm service script, which in turn runs realpath, and can fail: /usr/bin/eselect line 65 /dev/fd/63 No such file or directory /usr/share/eselect/libs/path-manipulations.bash: line 66 realpath : No such file or directory Since there are no dependencies for the php-fpm service, and since no other parts of the service script are cached at that time (source: prayer), the error is harmless. This commit essentially hides it: we now check if the RC_RUNLEVEL is "sysinit" and skip the PHP_SLOT computation if it is. Signed-off-by: Michael Orlitzky <mjo@gentoo.org> Bug: https://bugs.gentoo.org/910589
* Bump version to 0.9.80.9.8Brian Evans2021-10-251-1/+1
| | | | Signed-off-by: Brian Evans <grknight@gentoo.org>
* Save PHP_SLOT for reuse on stopBrian Evans2021-10-221-1/+8
| | | | | | | | | | | | | Update the php-fpm script to allow the starting slot to be saved. This can then be used by the stop process to track the correct pidfile of what was started. Avoids errors when upgrading the unslotted script from one slot to another. eselect value will change and OpenRC is confused on what to stop as we give it the wrong PID location Signed-off-by: Brian Evans <grknight@gentoo.org>
* configure.ac: rename AC_HELP_STRING -> AS_HELP_STRING.Michael Orlitzky2021-08-171-2/+2
| | | | | | This change is suggested by "autoupdate" with autoconf-2.71. Signed-off-by: Michael Orlitzky <mjo@gentoo.org>
* Version bump to 0.9.70.9.7Brian Evans2020-12-071-1/+1
| | | | Signed-off-by: Brian Evans <grknight@gentoo.org>
* Add support for PHP 8Brian Evans2020-12-071-2/+5
| | | | Signed-off-by: Brian Evans <grknight@gentoo.org>
* src/php.eselect.in.in: only create links to targets that exist.0.9.6Michael Orlitzky2020-03-011-7/+16
| | | | | | | | | | To avoid replacing a working /usr/bin/phar with a broken symlink, let's check to make sure that the targets of our symlinks exist before creating them. This can leave "phar" pointing to an unexpected version of that executable, but that's better than nothing if some working version is installed. Signed-off-by: Michael Orlitzky <mjo@gentoo.org>
* src/php.eselect.in.in: add support for the "phar" executable.Michael Orlitzky2020-02-291-1/+1
| | | | | | | | | | | PHP supports installing a "phar" executable that can archive/extract the phar file format without the user having to learn the API and write a little script. This commit allows "eselect php ... cli" to manage a symlink to the "phar" command, so that when dev-lang/php starts installing them, we can switch between the various versions. Bug: https://bugs.gentoo.org/707876 Signed-off-by: Michael Orlitzky <mjo@gentoo.org>
* src/php.eselect.in.in: create symlinks relatively.Michael Orlitzky2020-02-291-13/+10
| | | | | | | | | | | | | | | | | | As part of our $ROOT support, we need symlinks within $ROOT to point to stuff within $ROOT. The problem with that is that, if we create those symlinks with absolute paths, then you can't later chroot() into $ROOT and use them, because they'll point to the wrong place -- an absolute path that was only correct before you chrooted. Using relative symlinks seems to fix the problem, and shouldn't hurt anything in the common case where ROOT is unset or contains only a trailing slash. Thanks are due to Stefan Langenmaier for reporting the problem and helping us test the solution. Bug: https://bugs.gentoo.org/709422 Signed-off-by: Michael Orlitzky <mjo@gentoo.org>
* src/php.eselect.in.in: enable nullglob during find_targets().Michael Orlitzky2020-02-291-3/+5
| | | | | | | | While it didn't appear to hurt anything, the find_targets() function could output a literal "php*.*" when there were no valid PHP targets. Now the "nullglob" shell option is enabled during that function. Signed-off-by: Michael Orlitzky <mjo@gentoo.org>
* respect ROOT env variableStefan Langenmaier2020-02-281-8/+18
| | | | Signed-off-by: Michael Orlitzky <mjo@gentoo.org>
* src/php.eselect.in.in: remove old pre-php-7.x compatibility code.Michael Orlitzky2020-02-121-34/+0
| | | | | | The comments told me to remove this code after a while. I trust myself. Signed-off-by: Michael Orlitzky <mjo@gentoo.org>
* autotools: use recursive automake to support out-of-source builds.Michael Orlitzky2020-01-235-48/+73
| | | | | | | | | | | | | | | | When performing an out-of-source build (in particular, with "make distcheck"), the rules that we were using to replace @LIBDIR@ and friends were failing. Automake does a lot of path magic in its rules, but not within the shell commands themselves, so ultimately we wound up with some confusion between the source and build directories. Rather than hack around this problem in the top-level Makefile.am, I've converted the project to a recursive build, where the top-level Makefile.am delegates to Makefile.am in the subdirectories. This over-complicates things, but does fix the out-of-source build. Why? A guess: because the path magic works better in "." than elsewhere. Signed-off-by: Michael Orlitzky <mjo@gentoo.org>
* Makefile.am: remove redundant $(srcdir)s.Michael Orlitzky2020-01-231-16/+16
| | | | | | The $(srcdir) in Makefile.am is implicit. Let's keep it that way. Signed-off-by: Michael Orlitzky <mjo@gentoo.org>
* configure.ac: update to version 0.9.6.Michael Orlitzky2020-01-231-1/+1
| | | | Signed-off-by: Michael Orlitzky <mjo@gentoo.org>
* src/php-fpm.logrotate.in: add a logrotate script for php-fpm.Michael Orlitzky2020-01-223-2/+15
| | | | | | | | | | | Since all of the log files for php-fpm wind up in the same place regardless of slot, we install a single logrotate file as part of eselect-php. The contents of the file may not be perfect -- they were taken from the example submitted on bug 692194 untested -- but will be easy to update in the future. Bug: https://bugs.gentoo.org/692194 Signed-off-by: Michael Orlitzky <mjo@gentoo.org>
* src/php-fpm.conf: move the php-fpm tmpfiles.d entry "upstream."Michael Orlitzky2020-01-222-0/+8
| | | | | | | | | The tmpfiles.d entry for php-fpm creates one "runstate" directory for all slots of php-fpm. Since none of that depends on the currently selected slot, we ship it as part of eselect-php rather than dev-lang/php which would either install one copy for each slot. Signed-off-by: Michael Orlitzky <mjo@gentoo.org>
* src/php-fpm-launcher.in: add php-fpm-launcher wrapper script.Michael Orlitzky2020-01-223-2/+20
| | | | | | | | | | | | | | While OpenRC services are powerful enough to compute the selected version of php-fpm, the corresponding systemd services are not and must use a fixed path. The executable at that fixed path must therefore decide which version of php-fpm to run before running it. This commit adds a script to do just that. This script is already present in the app-eselect/eselect-php package, tacked on from $FILESDIR. It's a better fit as part of the repository. Signed-off-by: Michael Orlitzky <mjo@gentoo.org>
* configure.ac: use "ustar" format for the release tarballs.Michael Orlitzky2020-01-221-1/+1
| | | | | | | | | The default tar format used by autotools is the historical v7 format, which sucks. Let's use the improved "ustar" format instead. The automake documentation has more information if this is the sort of thing that interests you. Signed-off-by: Michael Orlitzky <mjo@gentoo.org>
* configure.ac: place build artifacts in the "build-aux" directory.Michael Orlitzky2020-01-222-2/+2
| | | | | | | | | | | | | During the build, autotools generates a bunch of files that need a place to live. By default, most of them (the "missing" script, for example) wind up in the project root. This commit sets AC_CONFIG_AUX_DIR([build-aux]) in configure.ac so that the aforementioned files are placed in the build-aux directory instead. Signed-off-by: Michael Orlitzky <mjo@gentoo.org>
* Makefile.am: substitute @LIBEXECDIR@ in "*.in" files.Michael Orlitzky2020-01-221-0/+1
| | | | | | | We're already substituting a few other GNU directories, and we'll need the libexecdir in the future. Signed-off-by: Michael Orlitzky <mjo@gentoo.org>
* configure.ac: update to version 0.9.5.0.9.5Michael Orlitzky2018-04-131-1/+1
|
* src/php.eselect.in.in: use "-f" option to "ln" for POSIX compatibility.Michael Orlitzky2018-04-111-1/+2
| | | | | | | | | | | | | | | | | On FreeBSD, we're getting an error: ln: illegal option -- - usage: ln [-s [-F] | -L | -P] [-f | -i] [-hnv] source_file [target_file] ... !!! Error: failed to create active php symlink This is due to our use of the "--force" flag, which is not POSIX. In the latest standard (IEEE Std 1003.1-2017), only the short "-f" flag is guaranteed to exist, and FreeBSD's "ln" seems to mostly support the flag as specified there. So, I've changed "--force" to "-f", and left a warning to future generations in a nearby comment. Bug: https://bugs.gentoo.org/649270
* configure.ac: update to version 0.9.4.0.9.4Michael Orlitzky2017-07-261-1/+1
|
* Use "init.d" and "conf.d" subdirectories of "openrc".Michael Orlitzky2017-07-265-7/+7
| | | | | | | OpenRC's init and conf files need to be named the same, and so we hit problems trying to store them both in the "openrc" directory. This commit puts the conf file in a "conf.d" subdirectory and the init script in an "init.d" subdirectory.
* Install the php-fpm init scripts conditional on --enable-fpm.0.9.3Michael Orlitzky2017-07-252-4/+21
|
* Makefile.am: mark openrc/php-fpm as a script and not as data.Michael Orlitzky2017-07-251-2/+2
|
* Makefile.am: install the php-fpm.conf file with "make install".Michael Orlitzky2017-07-251-0/+2
|
* Rename OpenRC init script and config file.Michael Orlitzky2017-07-255-6/+6
| | | | | | | | | The OpenRC init script is now installed by the Makefile, so to be useful it needs to be called "php-fpm". To that end, I've renamed both the init script and the config file to lack the word "example". Moreover, now that these files are code-like and not documentation-like, I've renamed the directory containing them from "doc" to "openrc".
* configure.ac: update the version to 0.9.3.Michael Orlitzky2017-07-251-1/+1
|
* Add comments to the php-fpm init script's start/stop_pre functions.Michael Orlitzky2017-07-241-0/+9
| | | | | | Had a mid-air collision with Brian there where we both tried to implement exactly the same thing. I had some extra comments explaining the RC_CMD tests that happily apply right on top of the last commit.
* Don't allow restart with a bad configBrian Evans2017-07-241-1/+9
|
* Add a --with-piddir configure flag.Michael Orlitzky2017-07-242-1/+8
| | | | | | | Our php-fpm init script defaulted to using /run for its pid file, but now that is configurable via the --with-piddir flag. Its value defaults to @LOCALSTATEDIR@ and the variable substitution should work whether or not --with-piddir is set explicitly.
* Rewrite the php-fpm init script to be more declarative.Michael Orlitzky2017-07-241-54/+43
| | | | | | | | Modern OpenRC can start/stop a well-behaved daemon on its own, provided the right command and parameters. This commit updates the init script to use those OpenRC variables like "command", "command_args", and "pidfile", and the resulting init script is much more concise.
* Add intermediate file doc/php-fpm.example.init.in to gitignore.Michael Orlitzky2017-07-191-0/+1
|
* Rename the init script input file to facilitate the two-phase replacement.Michael Orlitzky2017-07-192-1/+1
| | | | | | | | We perform variable substitution twice in the main eselect script -- once through autotools, and the other manually in the resulting Makefile. As a result, the script has a double "in.in" suffix. To make substitution work the same way in the init script, this commit renames it with an "in.in" suffix, and mentions it in configure.ac.
* php-fpm.example.init.in: use @SYSCONFDIR@ from autotools.Michael Orlitzky2017-07-192-5/+6
|
* Add .gitignoreBrian Evans2017-07-111-0/+13
|
* Make the init script directory depend on LIBDIRBrian Evans2017-07-112-2/+5
| | | | | | | | We cannot rely on the assumption that /usr/lib will always point to the right location, Bug 624528 demonstrates this. There is talk in Bug 506276 of making /usr/lib a generic target for all arches and stop supporting the symlink.
* Bump version to 0.9.2 in configure.ac.0.9.2Michael Orlitzky2016-07-261-1/+1
|
* Add OpenRC init and conf files.Michael Orlitzky2016-07-263-2/+81
|
* Bump to v0.9.1 in configure.ac.0.9.1Michael Orlitzky2016-01-221-1/+1
|
* Move the apache conf file writing into set_sapi().Michael Orlitzky2016-01-221-8/+11
| | | | | | | When the apache conf file was being written in do_set(), it was avoidable by e.g. update_sapi(). That could prevent apache2 from restarting. Since do_set() calls set_sapi() anyway, we just move the conf file writing to the end of set_sapi().
* Add 70_mod_php.conf.in to EXTRA_DIST in Makefile.am.0.9.0Michael Orlitzky2016-01-221-0/+3
| | | | | Without the extra hint, automake was omitting 70_mod_php.conf.in from the tarball.
* Bump to v0.9.0 in configure.ac.Michael Orlitzky2016-01-221-1/+1
|
* Add --enable-apache2 flag to the configure script.Michael Orlitzky2016-01-222-2/+19
| | | | | | | | The latest eselect-php ebuild allows users to avoid 70_mod_php.conf by setting USE="-apache2". Now that the conf file is part of eselect-php, we replicate that ability with --enable-apache2=no, or in fact by default. To install the apache conf file, one passes --enable-apache2 to the configure script.
* Don't inherit config or multilib.Michael Orlitzky2016-01-221-3/+0
| | | | | | These two inherit commands are no longer needed. We don't use list_libdirs() anymore thanks to autotools, and I don't think the config functions were ever needed recently.
* Rename the "modules" action to "list-modules".Michael Orlitzky2016-01-221-3/+3
| | | | | The name "list-modules" was always more appropriate; it just took a moment to realize that "-" is valid in bash function names.