From 6286e41c1116b470187174fc32caf527fe5a274b Mon Sep 17 00:00:00 2001 From: Masco Skray Date: Fri, 1 May 2020 23:40:11 +0800 Subject: [PATCH 1/2] feat(install): experimental Ubuntu 20.04 support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Since the phpv8-v8js plugin did not fully support PHP 7.4 and there is no new package on pecl... Every time we need to make some 魔改 on this because official provided versions are always too old... --- install/bundle/install.sh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/install/bundle/install.sh b/install/bundle/install.sh index 86bbd37..26fa573 100644 --- a/install/bundle/install.sh +++ b/install/bundle/install.sh @@ -18,7 +18,9 @@ getAptPackage(){ echo "deb http://ppa.launchpad.net/stesie/libv8/ubuntu bionic main" | tee /etc/apt/sources.list.d/stesie-libv8.list && apt-key adv --keyserver keyserver.ubuntu.com --recv-keys D858A0DF apt-get update && apt-get install -y vim ntp zip unzip curl wget apache2 libapache2-mod-xsendfile libapache2-mod-php php php-dev php-pear php-zip php-mysql php-mbstring mysql-server cmake fp-compiler re2c libv8-7.5-dev libyaml-dev python python3 python3-requests openjdk-8-jdk openjdk-11-jdk #Install PHP extensions - printf "/opt/libv8-7.5\n\n" | pecl install v8js yaml + yes | pecl install yaml + git clone https://github.com/phpv8/v8js.git --depth=1 /tmp/pear/download/v8js-master && cd /tmp/pear/download/v8js-master + phpize && ./configure --with-php-config=/usr/bin/php-config --with-v8js=/opt/libv8-7.5 && make install && cd - } setLAMPConf(){ @@ -47,7 +49,7 @@ UOJEOF a2enmod rewrite headers && sed -i -e '172s/AllowOverride None/AllowOverride All/' /etc/apache2/apache2.conf #Create UOJ session save dir and make PHP extensions available mkdir --mode=733 /var/lib/php/uoj_sessions && chmod +t /var/lib/php/uoj_sessions - sed -i -e '865a\extension=v8js.so\nextension=yaml.so' /etc/php/7.2/apache2/php.ini + sed -i -e '912a\extension=v8js.so\nextension=yaml.so' /etc/php/7.4/apache2/php.ini #Set MySQL user directory and connection config usermod -d /var/lib/mysql/ mysql cat >/etc/mysql/mysql.conf.d/uoj_mysqld.cnf <uoj_judger/include/uoj_work_path.h < Date: Fri, 1 May 2020 23:40:16 +0800 Subject: [PATCH 2/2] chore(install): switch to fetch Ubuntu 20.04 image in Dockerfile Only a simple number modify just as the title said. --- install/bundle/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/bundle/Dockerfile b/install/bundle/Dockerfile index bd3e975..bc26ca9 100644 --- a/install/bundle/Dockerfile +++ b/install/bundle/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:18.04 +FROM ubuntu:20.04 MAINTAINER MascoSkray ARG CLONE_ADDFLAG