Deploy PHP7 Deb/RPM packages
cyanide-burnout opened this issue · 4 comments
cyanide-burnout commented
Please build the package and place it into tarantool package repository
Totktonada commented
Plan:
- add actual distros with php >= 7.1 (debian, ubuntu, centos, fedora);
- add builds for different php versions under different package names (-php71 suffix or like so—need to see another php extensions).
Totktonada commented
NB: For ones who needs custom builds for php-7.3 or php-7.4 from ppa:ondrej/php
repository for Ubuntu Bionic.
Apply ones of the following patches on top of php7-v2
branch:
php-7.3:
diff --git a/debian/prebuild.sh b/debian/prebuild.sh
index c17d14c..b33595f 100755
--- a/debian/prebuild.sh
+++ b/debian/prebuild.sh
@@ -11,6 +11,12 @@ SUDO="sudo -E"
${SUDO} apt-get update > /dev/null
${SUDO} apt-get -y install php-all-dev
+# Build against php7.3 on Ubuntu Bionic.
+${SUDO} apt-get install software-properties-common
+${SUDO} add-apt-repository -y ppa:ondrej/php
+${SUDO} apt-get update > /dev/null
+${SUDO} apt-get install -y php7.3-dev
+
phpversion=$(php-config --version | sed 's/^\([0-9]\+\.[0-9]\).*/\1/')
cd /build/php-tarantool-*
diff --git a/test.pkg.all.sh b/test.pkg.all.sh
index fd74685..388cc62 100755
--- a/test.pkg.all.sh
+++ b/test.pkg.all.sh
@@ -3,27 +3,9 @@
set -exu # Strict shell (w/o -o pipefail)
distros="
- el:8
- fedora:25
- fedora:26
- fedora:27
- fedora:28
- fedora:29
- fedora:30
- fedora:31
- debian:stretch
- debian:buster
- ubuntu:xenial
ubuntu:bionic
- ubuntu:disco
- ubuntu:eoan
"
-if ! type packpack; then
- echo "Unable to find packpack"
- exit 1
-fi
-
for distro in $distros; do
export OS="${distro%%:*}"
export DIST="${distro#*:}"
@@ -31,9 +13,6 @@ for distro in $distros; do
export OS=centos
fi
- rm -rf build
- packpack
-
docker run \
--volume "$(realpath .):/tarantool-php" \
--workdir /tarantool-php \
diff --git a/test.pkg.sh b/test.pkg.sh
index 3c1c271..e80d587 100755
--- a/test.pkg.sh
+++ b/test.pkg.sh
@@ -29,8 +29,14 @@ fi
# Update available packages list.
${PM_SYNC}
+# Verify against php7.3 on Ubuntu Bionic.
+apt-get -y install software-properties-common
+add-apt-repository -y ppa:ondrej/php
+apt-get update > /dev/null
+
# Install php interpreter.
-${PM_INSTALL_NAME} php
+apt-get install -y php7.3
+php --version
# Install php-tarantool package.
${PM_INSTALL_FILE} build/${PKG_GLOB}
php-7.4:
diff --git a/debian/prebuild.sh b/debian/prebuild.sh
index c17d14c..b33595f 100755
--- a/debian/prebuild.sh
+++ b/debian/prebuild.sh
@@ -11,6 +11,12 @@ SUDO="sudo -E"
${SUDO} apt-get update > /dev/null
${SUDO} apt-get -y install php-all-dev
+# Build against php7.4 on Ubuntu Bionic.
+${SUDO} apt-get install software-properties-common
+${SUDO} add-apt-repository -y ppa:ondrej/php
+${SUDO} apt-get update > /dev/null
+${SUDO} apt-get install -y php7.4-dev
+
phpversion=$(php-config --version | sed 's/^\([0-9]\+\.[0-9]\).*/\1/')
cd /build/php-tarantool-*
diff --git a/test.pkg.all.sh b/test.pkg.all.sh
index fd74685..388cc62 100755
--- a/test.pkg.all.sh
+++ b/test.pkg.all.sh
@@ -3,27 +3,9 @@
set -exu # Strict shell (w/o -o pipefail)
distros="
- el:8
- fedora:25
- fedora:26
- fedora:27
- fedora:28
- fedora:29
- fedora:30
- fedora:31
- debian:stretch
- debian:buster
- ubuntu:xenial
ubuntu:bionic
- ubuntu:disco
- ubuntu:eoan
"
-if ! type packpack; then
- echo "Unable to find packpack"
- exit 1
-fi
-
for distro in $distros; do
export OS="${distro%%:*}"
export DIST="${distro#*:}"
@@ -31,9 +13,6 @@ for distro in $distros; do
export OS=centos
fi
- rm -rf build
- packpack
-
docker run \
--volume "$(realpath .):/tarantool-php" \
--workdir /tarantool-php \
diff --git a/test.pkg.sh b/test.pkg.sh
index 3c1c271..e80d587 100755
--- a/test.pkg.sh
+++ b/test.pkg.sh
@@ -29,8 +29,14 @@ fi
# Update available packages list.
${PM_SYNC}
+# Verify against php7.4 on Ubuntu Bionic.
+apt-get -y install software-properties-common
+add-apt-repository -y ppa:ondrej/php
+apt-get update > /dev/null
+
# Install php interpreter.
-${PM_INSTALL_NAME} php
+apt-get install -y php7.4
+php --version
# Install php-tarantool package.
${PM_INSTALL_FILE} build/${PKG_GLOB}
Steps:
$ OS=ubuntu DIST=bionic /path/to/packpack/packpack # build
$ ./test.pkg.all.sh # verify
A package is in build/
directory, named like php7.4-tarantool_0.3.0.40-1_amd64.deb
.
Totktonada commented
Totktonada commented
Build php-tarantool for CentOS 7 against remi-php71 repository:
diff --git a/rpm/prebuild.sh b/rpm/prebuild.sh
new file mode 100755
index 0000000..c4420af
--- /dev/null
+++ b/rpm/prebuild.sh
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+set -exu # Strict shell (w/o -o pipefail)
+
+# Preserve environment variables (just in case).
+SUDO="sudo -E"
+
+${SUDO} yum install -y yum-utils
+${SUDO} yum install -y https://rpms.remirepo.net/enterprise/remi-release-7.rpm
+${SUDO} yum-config-manager --enable remi-php71
+${SUDO} yum update -y
diff --git a/test.pkg.all.sh b/test.pkg.all.sh
index 138a1b0..2e89b3b 100755
--- a/test.pkg.all.sh
+++ b/test.pkg.all.sh
@@ -3,27 +3,9 @@
set -exu # Strict shell (w/o -o pipefail)
distros="
- el:8
- fedora:25
- fedora:26
- fedora:27
- fedora:28
- fedora:29
- fedora:30
- fedora:31
- debian:stretch
- debian:buster
- ubuntu:xenial
- ubuntu:bionic
- ubuntu:eoan
- ubuntu:focal
+ el:7
"
-if ! type packpack; then
- echo "Unable to find packpack"
- exit 1
-fi
-
for distro in $distros; do
export OS="${distro%%:*}"
export DIST="${distro#*:}"
@@ -31,9 +13,6 @@ for distro in $distros; do
export OS=centos
fi
- rm -rf build
- packpack
-
docker run \
--volume "$(realpath .):/tarantool-php" \
--workdir /tarantool-php \
diff --git a/test.pkg.sh b/test.pkg.sh
index 3c1c271..5231ab5 100755
--- a/test.pkg.sh
+++ b/test.pkg.sh
@@ -29,8 +29,15 @@ fi
# Update available packages list.
${PM_SYNC}
+# Verify against php7.1 on CentOS 7.
+yum install -y yum-utils
+yum install -y https://rpms.remirepo.net/enterprise/remi-release-7.rpm
+yum-config-manager --enable remi-php71
+yum update -y
+
# Install php interpreter.
${PM_INSTALL_NAME} php
+php --version
# Install php-tarantool package.
${PM_INSTALL_FILE} build/${PKG_GLOB}
The same for remi-php73:
diff --git a/rpm/prebuild.sh b/rpm/prebuild.sh
new file mode 100755
index 0000000..54359fc
--- /dev/null
+++ b/rpm/prebuild.sh
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+set -exu # Strict shell (w/o -o pipefail)
+
+# Preserve environment variables (just in case).
+SUDO="sudo -E"
+
+${SUDO} yum install -y yum-utils
+${SUDO} yum install -y https://rpms.remirepo.net/enterprise/remi-release-7.rpm
+${SUDO} yum-config-manager --enable remi-php73
+${SUDO} yum update -y
diff --git a/test.pkg.all.sh b/test.pkg.all.sh
index 138a1b0..2e89b3b 100755
--- a/test.pkg.all.sh
+++ b/test.pkg.all.sh
@@ -3,27 +3,9 @@
set -exu # Strict shell (w/o -o pipefail)
distros="
- el:8
- fedora:25
- fedora:26
- fedora:27
- fedora:28
- fedora:29
- fedora:30
- fedora:31
- debian:stretch
- debian:buster
- ubuntu:xenial
- ubuntu:bionic
- ubuntu:eoan
- ubuntu:focal
+ el:7
"
-if ! type packpack; then
- echo "Unable to find packpack"
- exit 1
-fi
-
for distro in $distros; do
export OS="${distro%%:*}"
export DIST="${distro#*:}"
@@ -31,9 +13,6 @@ for distro in $distros; do
export OS=centos
fi
- rm -rf build
- packpack
-
docker run \
--volume "$(realpath .):/tarantool-php" \
--workdir /tarantool-php \
diff --git a/test.pkg.sh b/test.pkg.sh
index 3c1c271..1df9354 100755
--- a/test.pkg.sh
+++ b/test.pkg.sh
@@ -29,8 +29,15 @@ fi
# Update available packages list.
${PM_SYNC}
+# Verify against php7.3 on CentOS 7.
+yum install -y yum-utils
+yum install -y https://rpms.remirepo.net/enterprise/remi-release-7.rpm
+yum-config-manager --enable remi-php73
+yum update -y
+
# Install php interpreter.
${PM_INSTALL_NAME} php
+php --version
# Install php-tarantool package.
${PM_INSTALL_FILE} build/${PKG_GLOB}