| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
I think we can assume familiarity with "autoreconf -fi" these days.
Signed-off-by: Michael Orlitzky <mjo@gentoo.org>
|
|
|
|
| |
Signed-off-by: Michael Orlitzky <mjo@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Signed-off-by: Brian Evans <grknight@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
This change is suggested by "autoupdate" with autoconf-2.71.
Signed-off-by: Michael Orlitzky <mjo@gentoo.org>
|
|
|
|
| |
Signed-off-by: Brian Evans <grknight@gentoo.org>
|
|
|
|
| |
Signed-off-by: Brian Evans <grknight@gentoo.org>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: Michael Orlitzky <mjo@gentoo.org>
|
|
|
|
|
|
| |
The comments told me to remove this code after a while. I trust myself.
Signed-off-by: Michael Orlitzky <mjo@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
The $(srcdir) in Makefile.am is implicit. Let's keep it that way.
Signed-off-by: Michael Orlitzky <mjo@gentoo.org>
|
|
|
|
| |
Signed-off-by: Michael Orlitzky <mjo@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
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".
|
| |
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
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().
|
|
|
|
|
| |
Without the extra hint, automake was omitting 70_mod_php.conf.in from
the tarball.
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
The name "list-modules" was always more appropriate; it just took a
moment to realize that "-" is valid in bash function names.
|