| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
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().
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
Gentoo-Bug: 491866
|
| |
|
|
|
|
|
|
|
|
| |
The update_sapi() function was not working due to a call to set_$sapi
that was never caught. Some of the logic in both do_update() and
update_sapi() was clarified, and the update_sapi() function was
documented. The "update" action and "cleanup" (which uses it) now work
as expected.
|
| |
|
| |
|
|
|
|
|
|
|
| |
The cleanup_sapis() function was only called in one place, so it was a
pointless layer of indirection. Move it into do_cleanup(). Also, make
sure we don't remove libphp[57].so symlinks unless they're actually
symlinks and in fact dead.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
The last few commits introduced a problem: by passing
php.eselect.in.in through autoconf, we unwittingly replace things like
@bindir@ with ${exec_prefix}. This is because lowercase @bindir@
gets defined for automake and is intended to be based on the other
directory variables like @exec_prefix@. Since we're replacing them
after the fact in the Makefile, this commit avoids the autoconf
mangling by making them all uppercase.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
The get_libdirs() function is a heuristic to determine which libdirs
are available on the system. The get_active_libdir() function then
chose the first one as the "active" libdir. In a few places we either
chose the "active" libdir, or looped through all of them to find some
other thing of interest (like the valid targets).
Now that we compute @libdir@ at build time, we can replace all of that
with the one correct value of @libdir@. The functions get_libdirs()
and get_active_libdir() are removed entirely.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We are currently shipping 70_mod_php.conf as part of the Gentoo ebuild
for eselect-php. This introduces a potential disconnect between the
path in php.eselect and the path in 70_mod_php.conf. By adding the
conf file to the project, we are able to ensure that they are both
set to the same value. Moreover, the new autotools directory magic
lets us set them both based on @localstatedir@. So, for example, in
the conf file we have "@localstatedir@/lib/eselect-php/mod_php.conf"
and in php.eselect we have "@localstatedir@/lib/eselect-php".
We have followed the PHP project's lead in assuming that
$localstatedir will be set to (for example) /var and not /var/lib.
See Gentoo bug 572002. For testing, you should now use something like,
./configure --bindir=/usr/bin --sysconfdir=/etc --localstatedir=/var
Of course, the ebuild for eselect-php will automatically pass the
correct values to ./configure.
|
|
|
|
|
|
|
|
|
| |
As a first test of the new directory substitution, replace one
instance of custom bindir handling. Use @bindir@ instead of
"${EROOT}/usr/bin" sapi_active_link_dir(). The results should
coincide when configured with,
./configure --bindir="${EROOT}"/usr/bin
|
|
When we create php.eselect from php.eselect.in using autoconf, we
don't have a way to get the full, expanded value of @bindir@,
@libdir@, and the other paths that we need. The autoconf documentation
suggests a workaround for this: add another layer of indirection, and
use the Makefile to substitute those values into the output files.
This commit sets the stage by renaming php.eselect.in to
php.eselect.in.in. The first round of processing by autoconf takes
php.eselect.in.in to php.eselect.in. The Makefile will then generate
php.eselect from php.eselect.in after substituting @bindir@, @libdir@,
and @localstatedir@.
|