You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
openlitespeed/SOURCES/add-build-admin-php.patch

149 lines
5.5 KiB

diff --git a/dist/admin/misc/build_admin_php.sh b/dist/admin/misc/build_admin_php.sh
index 0edb3d4..623e55b 100755
--- a/dist/admin/misc/build_admin_php.sh
+++ b/dist/admin/misc/build_admin_php.sh
@@ -13,7 +13,6 @@ LSWS_HOME=`dirname $BASE_DIR`
PATH=$PATH
PHP_VERSION=7.4.33
PHP_BUILD_DIR=$LSWS_HOME/phpbuild
-mkdir ${PHP_BUILD_DIR}
LOG_FILE=${PHP_BUILD_DIR}/adminphp.log
# detect download method
@@ -35,7 +34,7 @@ else
fi
LSAPI_VERSION=8.1
-PHP_CONF_OPTIONS="--prefix=/tmp --disable-all --with-litespeed --enable-session --enable-posix --enable-xml --with-libexpat-dir=/usr --with-zlib --enable-sockets --enable-bcmath --enable-json"
+PHP_CONF_OPTIONS="--prefix=/tmp --disable-all --enable-litespeed --enable-session --enable-posix --enable-xml --libdir=/usr/lib64 --with-zlib --enable-sockets --enable-bcmath --enable-json --with-expat"
PLF=`uname -p`
if [ "x$PLF" = "xx86_64" ] ; then
diff --git a/dist/install.sh b/dist/install.sh
index acd4a94..b4a422f 100755
--- a/dist/install.sh
+++ b/dist/install.sh
@@ -33,11 +33,11 @@ inst_admin_php()
if [ "x$OS" = "xLinux" ] ; then
if [ "x$ARCH" = "xx86_64" ] ; then
- mv $TEMPDIR/admin/fcgi-bin/admin_php $LSWS_HOME/admin/fcgi-bin/
+ mv $TEMPDIR/admin/fcgi-bin/admin_php-7.4.33 $LSWS_HOME/admin/fcgi-bin/admin_php
elif [ "x$ARCH" = "xaarch64" ] ; then
- $DLCMD $LSWS_HOME/admin/fcgi-bin/admin_php http://www.litespeedtech.com/packages/lsphp7_bin/aarch64/lsphp
+ mv $TEMPDIR/admin/fcgi-bin/admin_php-7.4.33 $LSWS_HOME/admin/fcgi-bin/admin_php
else
- $DLCMD $LSWS_HOME/admin/fcgi-bin/admin_php http://www.litespeedtech.com/packages/lsphp5_bin/i386/lsphp5
+ mv $TEMPDIR/admin/fcgi-bin/admin_php-7.4.33 $LSWS_HOME/admin/fcgi-bin/admin_php
fi
if [ $? = 0 ] ; then
diff --git a/dist/admin/misc/build_admin_php.sh b/dist/admin/misc/build_admin_php.sh
index 623e55b..72b5f95 100755
--- a/dist/admin/misc/build_admin_php.sh
+++ b/dist/admin/misc/build_admin_php.sh
@@ -17,21 +17,6 @@ LOG_FILE=${PHP_BUILD_DIR}/adminphp.log
# detect download method
OS=`uname -s`
-DL_METHOD="wget -nv -O"
-if [ "x$OS" = "xFreeBSD" ] ; then
- DL=`which fetch`
- DL_METHOD="$DL -o"
-else
- # test wget exist or not
- DL=`which wget`
- if [ "$?" -ne "0" ] ; then
- DL=`which curl`
- DL_METHOD="$DL -L -o"
- if [ "$?" -ne "0" ] ; then
- echo "Error: Cannot find proper download method curl/wget."
- fi
- fi
-fi
LSAPI_VERSION=8.1
PHP_CONF_OPTIONS="--prefix=/tmp --disable-all --enable-litespeed --enable-session --enable-posix --enable-xml --libdir=/usr/lib64 --with-zlib --enable-sockets --enable-bcmath --enable-json --with-expat"
diff --git a/dist/admin/misc/build_admin_php.sh b/dist/admin/misc/build_admin_php.sh
index be10aef..56b2caa 100755
--- a/dist/admin/misc/build_admin_php.sh
+++ b/dist/admin/misc/build_admin_php.sh
@@ -56,11 +56,6 @@ echo "Changing to build directory ${PHP_BUILD_DIR}"
cd ${PHP_BUILD_DIR}
check_errs $? "Could not get into build directory"
-if [ -e "php-${PHP_VERSION}" ] ; then
- rm -rf php-${PHP_VERSION}
- check_errs $? "Could not delete old php directory ${PHP_BUILD_DIR}/php-${PHP_VERSION}"
-fi
-
test_phpsrc_ok()
{
main_msg "Extracting PHP source archive: tar -zxf ${1}"
@@ -76,7 +71,8 @@ test_phpsrc_ok()
PHP_SRC=php-${PHP_VERSION}.tar.gz
-PHP_SRC_READY=N
+test_phpsrc_ok ${PHP_SRC}
+PHP_SRC_READY=Y
if [ -e "${PHP_SRC}" ] ; then
main_msg "${PHP_SRC} already downloaded, use the saved copy."
@@ -125,10 +121,6 @@ echo ""
# get LSAPI
-if [ -e php-litespeed-${LSAPI_VERSION}.tgz ] ; then
- rm -f php-litespeed-${LSAPI_VERSION}.tgz
- check_errs $? "Could not delete old lsapi copy php-litespeed-${LSAPI_VERSION}.tgz"
-fi
DOWNLOAD_URL="http://www.litespeedtech.com/packages/lsapi/php-litespeed-${LSAPI_VERSION}.tgz"
main_msg "Retrieving LSAPI from ${DOWNLOAD_URL}"
diff --git a/dist/admin/misc/build_admin_php.sh b/dist/admin/misc/build_admin_php.sh
index 72b5f95..0c95718 100755
--- a/dist/admin/misc/build_admin_php.sh
+++ b/dist/admin/misc/build_admin_php.sh
@@ -89,7 +89,6 @@ fi
if [ ${PHP_SRC_READY} = "N" ] ; then
DOWNLOAD_URL="http://us1.php.net/distributions/${PHP_SRC}"
main_msg "Retrieving PHP source archive from ${DOWNLOAD_URL}"
- ${DL_METHOD} ${PHP_SRC} ${DOWNLOAD_URL}
test_phpsrc_ok ${PHP_SRC}
if [ "$?" -eq "0" ] ; then
@@ -100,7 +99,6 @@ fi
if [ ${PHP_SRC_READY} = "N" ] ; then
DOWNLOAD_URL="http://us2.php.net/distributions/${PHP_SRC}"
main_msg "Try again, retrieving PHP source archive from ${DOWNLOAD_URL}"
- ${DL_METHOD} ${PHP_SRC} ${DOWNLOAD_URL}
test_phpsrc_ok ${PHP_SRC}
if [ "$?" -eq "0" ] ; then
@@ -112,7 +110,6 @@ if [ ${PHP_SRC_READY} = "N" ] ; then
MAIN_VER=`expr '${PHP_VERSION}' : "\(.\)"`
DOWNLOAD_URL="http://museum.php.net/php${MAIN_VER}/${PHP_SRC}"
main_msg "Try again, retrieving PHP source archive from ${DOWNLOAD_URL}"
- ${DL_METHOD} ${PHP_SRC} ${DOWNLOAD_URL}
test_phpsrc_ok ${PHP_SRC}
if [ "$?" -eq "0" ] ; then
diff --git a/dist/admin/misc/build_admin_php.sh b/dist/admin/misc/build_admin_php.sh
index 0c95718..be10aef 100755
--- a/dist/admin/misc/build_admin_php.sh
+++ b/dist/admin/misc/build_admin_php.sh
@@ -132,8 +132,7 @@ fi
DOWNLOAD_URL="http://www.litespeedtech.com/packages/lsapi/php-litespeed-${LSAPI_VERSION}.tgz"
main_msg "Retrieving LSAPI from ${DOWNLOAD_URL}"
-${DL_METHOD} "php-litespeed-${LSAPI_VERSION}.tgz" ${DOWNLOAD_URL}
-check_errs $? "Could not retrieve LSAPI archive"
+
cd php-${PHP_VERSION}/sapi
check_errs $? "Could not get into php/sapi directory"