Jan_E
Verified User
I am in the process of changing the php_mode of all my 4 PHP releases from mod_php (1) and fastcgi (3) to php-fpm. Because I want the downtime to be as short as possible, I was looking for a possibility to do it in 2 steps: first step is building the 4 PHP versions and second step is to install them.
The idea is like this:
With a small patch of the build script this is possible:
Can this be implemented?
The idea is like this:
Code:
./build set php4_mode php-fpm
./build set php3_mode php-fpm
./build set php2_mode php-fpm
./build set php1_mode php-fpm
./build set mod_ruid2 yes
./build set clean no
./build php_expert 7.2 php-fpm make
./build php_expert 5.3 php-fpm make
./build php_expert 7.1 php-fpm make
./build php_expert 5.6 php-fpm make
./build php_expert 7.2 php-fpm install
./build php_expert 5.3 php-fpm install
./build php_expert 7.1 php-fpm install
./build php_expert 5.6 php-fpm install
./build set clean yes
./build rewrite_confs
With a small patch of the build script this is possible:
Code:
diff --git a/build b/build_make
index 229b9dc..b5c71c9 100755
--- a/build
+++ b/build_make
@@ -4342,7 +4342,7 @@ if [ "${BUILD_SECTIONS_CASE}" = "1" ]; then
BUILD_EXPERIENCED_SET="php_expert php_htscanner2 todovecot set_service"
BUILD_EXPERIENCED_DESC="Recommended for experienced users only (!)"
BUILD_EXPERIENCED_REQADD="php_expert php_htscanner2 set_service"
- PHP_EXPERT_ADDIT="php_release php_mode"
+ PHP_EXPERT_ADDIT="php_release php_mode [make]"
PHP_HTSCANNER2_ADDIT="php_release"
SET_SERVICE_ADDIT="service ON|OFF|delete"
fi
@@ -4884,8 +4884,8 @@ initJSONVars() {
COMP_UPDATE_DATA_NAME="Download packages"
COMP_UPDATE_DATA_DESC="Downloads packages needed for the CustomBuild script (does not include versions.txt file or the 'build' file)."
- COMP_PHP_EXPERT_NAME="Install specified PHP version"
- COMP_PHP_EXPERT_DESC="Installs specified PHP version, but does not apply any automatic configuration to it."
+ COMP_PHP_EXPERT_NAME="Make or install specified PHP version"
+ COMP_PHP_EXPERT_DESC="Builds specified PHP version, but does not apply any automatic configuration to it."
COMP_PHP_HTSCANNER2_NAME="Build php_htscanner2"
COMP_PHP_HTSCANNER2_DESC="Install/update php_htscanner2 component used by Apache and PHP."
@@ -11524,6 +11524,7 @@ doPCRE() {
doPhp_build() {
#$1 is PHP release
#$2 is PHP mode
+ #$3 if 'make': do not install (yet)
INT_RELEASE=$1
INT_MODE=$2
SHORT_RELEASE=`echo ${INT_RELEASE} | tr -d '.'`
@@ -12046,6 +12047,10 @@ doPhp_build() {
done
echo "Make Complete"
+ if [ "$3" = "make" ]; then
+ do_exit 0 "Build not installed. Run './build php_expert $1 $2' to install."
+ fi
+
#change the pear settings to remove the -n option.
#the default memory limit was messing this up.
/usr/bin/perl -pi -e 's/PEAR_INSTALL_FLAGS = .*/PEAR_INSTALL_FLAGS = -dshort_open_tag=0 -dsafe_mode=0/' Makefile
@@ -26849,7 +26854,7 @@ case "$1" in
;;
php) doChecks; doPhp
;;
- php_expert) doChecks; doPhp_build $2 $3
+ php_expert) doChecks; doPhp_build $2 $3 $4
;;
php_ini) doChecks; doPhpIni
;;