summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* Cosmetic changes to help text.Michael Orlitzky2016-01-221-12/+12
|
* Add a "modules" action to list all valid modules (requested in bug 491866).Michael Orlitzky2016-01-221-0/+10
| | | | Gentoo-Bug: 491866
* Remove useless describe_cleanup_parameters() and describe_cleanup_options().Michael Orlitzky2016-01-221-8/+0
|
* Document and fix the update functionality.Michael Orlitzky2016-01-221-11/+35
| | | | | | | | 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.
* Remove the word "automatically" from the cleanup description.Michael Orlitzky2016-01-221-1/+1
|
* Clean up and document the cleanup_sapi() function.Michael Orlitzky2016-01-221-14/+33
|
* Remove cleanup_sapis() and ensmarten the libphp[57].so symlink removal.Michael Orlitzky2016-01-221-14/+14
| | | | | | | 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.
* Add a TODO to find_targets() about an error condition.Michael Orlitzky2016-01-211-0/+3
|
* Use uppercase @BINDIR@, @LIBDIR@, etc. for autotools substitution.Michael Orlitzky2016-01-213-13/+13
| | | | | | | | | | 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.
* Clean up and document find_targets().Michael Orlitzky2016-01-211-8/+10
|
* Replace get_libdirs() and get_active_libdir() with autotools magic.Michael Orlitzky2016-01-211-34/+13
| | | | | | | | | | | | 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.
* Add 70_mod_php.conf.in to the project source.Michael Orlitzky2016-01-213-2/+30
| | | | | | | | | | | | | | | | | | | | 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.
* Replace custom bindir handling with the new autotools magic.Michael Orlitzky2016-01-211-5/+4
| | | | | | | | | 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
* Add another layer of indirection to get @bindir@ and friends in the output.Michael Orlitzky2016-01-213-2/+19
| | | | | | | | | | | | | | 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@.
* Fix cleanup up libphp[57].so symlinks.Michael Orlitzky2016-01-201-1/+1
| | | | | | | | | The cleanup() action is supposed to remove the old links to libphp5.so and libphp7.so, but the pattern was accidentally quoted and thus nothing was removed. Unquote it so that those symlinks will actually be removed. Gentoo-Bug: 572436
* Bump to v0.8.5 in configure.ac.0.8.5Michael Orlitzky2016-01-091-1/+1
|
* Consolidate all of the set_foo() functions.Michael Orlitzky2016-01-091-27/+16
|
* Undo the change from phpdbg -> dbg, using "phpdbg" everywhere makes more sense.Michael Orlitzky2016-01-091-6/+6
|
* Bump to v0.8.4 in configure.ac.0.8.4Michael Orlitzky2016-01-081-1/+1
|
* Fix cleanup and update actions.Michael Orlitzky2016-01-081-10/+13
|
* Clean up check_module() a bit and give it some documentation.Michael Orlitzky2016-01-081-1/+15
|
* Remove superfluous list_foo() functions.Michael Orlitzky2016-01-081-22/+3
|
* Rename "phpdbg" to "dbg" for consistency and to fix its show action.Michael Orlitzky2016-01-081-3/+3
|
* Fix the "show" action for SAPIs other than phpdbg.Michael Orlitzky2016-01-081-2/+3
|
* Bump to v0.8.3 in configure.ac.0.8.3Michael Orlitzky2016-01-081-1/+1
|
* Add config warning when setting the apache2 target.Michael Orlitzky2016-01-081-0/+20
|
* Add sapi_link_name_target() to clean up set_sapi().Michael Orlitzky2016-01-081-9/+29
| | | | | | There was a special case in set_sapi() for apache2's mod_php.so. Now that has been factored out into a new function sapi_link_name_target() which acts more or less like a hash table (dictionary lookup).
* Refactor set_apache2() to use set_sapi().Michael Orlitzky2016-01-081-20/+49
| | | | | | | With a little bit of mangling and a new (trivial) function, the set_sapi() function now does the work of set_apache2(). There is probably a better "big picture" to handle the symlinking, but this works for now and is an improvement.
* Remove unnecessary quoting.Michael Orlitzky2016-01-081-4/+4
|
* Update copyright year.Michael Orlitzky2016-01-081-1/+1
|
* Refactor most set_foo() functions to use set_sapi().Michael Orlitzky2016-01-081-26/+26
| | | | | | | The set_sapi() function was accidentally introduced in commit 91160d1 but was not used until now. This commit finishes its implementation, and refactors the "easy" SAPI set_* functions to use set_sapi(). The set_apache2() function still requires more work.
* Whitespace cleanup.Michael Orlitzky2016-01-081-5/+5
|
* Split sapi_active_link_path() into sapi_active_link_{names,dir}().Michael Orlitzky2016-01-081-12/+77
| | | | | | | In preparation for refactoting the set_foo() functions, refactor the function that gets the (one) active link path into two functions that get the (one) active link directory and (more than one, potentially) active link names.
* Document and clean up the resolv_target function.Michael Orlitzky2016-01-081-6/+33
|
* Fix call to resolv_target() in set_phpdbg().Michael Orlitzky2016-01-081-1/+1
| | | | | The first parameter to resolv_target should be the name of a SAPI. The current call passes "phpdbg" which is incorrect. Change it to "dbg".
* Fix bug in resolv_target() introduced while refactoring.Michael Orlitzky2015-12-191-1/+1
| | | | | | The resolv_target() function was making a call to find_targets_$1. This was incorrectly refacored to "find_targets $1" instead of "find_sapi_targets $1" and has been fixed.
* Consolidate all list_foo actions into one new list_sapi() function.Michael Orlitzky2015-12-191-46/+24
| | | | | | This follows in the same vein as the other recent refactorings. With the machinery in place, list_cli, list_cgi, etc. are all replaced by one function list_sapi() taking a SAPI name as an argument.
* Add the find_sapi_targets() function and refactor.Michael Orlitzky2015-12-191-53/+29
| | | | | | | | | | | | The new function find_sapi_targets() takes a SAPI name as an argument and outputs the valid targets for that SAPI. With it we replace the following five functions that all did more or less the same thing: 1. find_targets_apache2() 2. find_targets_cli() 3. find_targets_fpm() 4. find_targets_cgi() 5. find_targets_phpdbg()
* Add some missing semicolons at the end of a case statement.Michael Orlitzky2015-12-191-1/+1
|
* Fix documentation for the get_sapi_active_target() function.Michael Orlitzky2015-12-191-5/+5
| | | | | The documentation for the get_sapi_active_target() was copy/pasted and never updated. Whoops. It's been fixed.
* Factor our the active SAPI target getter functions.Michael Orlitzky2015-12-191-45/+17
| | | | | | | | | | | | | | | We had five functions doing essentially the same thing: 1. get_active_cli() 2. get_active_cgi() 3. get_active_fpm() 4. get_active_phpdbg() 5. get_active_apache2() Now that we have the sapi_active_link_path() function taking a SAPI name as an argument, these have been refactored. One new function get_sapi_active_target() takes a SAPI name as an argument and returns the name of the active target (using sapi_active_link_path).
* Generalize sapi_active_bin_link_path() to sapi_active_link_path().Michael Orlitzky2015-12-191-42/+22
| | | | | | | | | | Generalize the sapi_active_bin_link_path() to work with the "apache2" SAPI, too. Basically we just return the path of the mod_php symlink for that SAPI even though it's not an executable. After doing so, it makes sense to remove "bin" from the function name. The sapi_active_link_path() function, called with "apache2" as its argument, now replaces the get_apache2_active_symlink_path() function.
* Factor out the target major version number parsing into a function.Michael Orlitzky2015-12-191-5/+27
|
* Replace hard-coded SAPI executable link paths with a function call.Michael Orlitzky2015-12-191-11/+38
|
* Add support for the phpdbg SAPI target0.8.2Brian Evans2015-12-171-1/+39
| | | | Signed-off-by: Brian Evans <grknight@gentoo.org>
* Use AC_PROG_MKDIR_P macro/variable instead of "mkdir -p".Michael Orlitzky2015-12-102-1/+2
|
* Bump version to 0.8.1 in configure.ac.0.8.1Michael Orlitzky2015-12-101-1/+1
|
* Write an apache configuration file to /var/lib/eselect-php/mod_php.conf.Michael Orlitzky2015-12-101-3/+36
| | | | | | | | | | | | | | | | With the mod_php.so symlinking done, we realize a new problem: each apache module has its "module name" hardcoded into the binary. For example, in mod_php7.c, we find, AP_MODULE_DECLARE_DATA module php7_module and likewise with php5_module in the 5.x series of PHP. This means that we can't load both of these modules with one LoadModule statement regardless of its filename -- we need to know the module name too. This commit adds a function to write out an apache config file for the current active module. The main apache config file should Include this file, which will be updated whenever an apache2 target is set.
* Use {cli,cgi,fpm}_link variables where appropriate.Michael Orlitzky2015-12-101-5/+5
| | | | | These variables were all defined but not used. There were a few places where they could be profitably inserted.
* Switch get_active_apache2() and set_apache2() to the new mod_php.so symlink.Michael Orlitzky2015-12-101-18/+20
|