Skip to content

Instantly share code, notes, and snippets.

@andypost
Created June 15, 2020 11:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andypost/30992c35f1a80146de7294851954777e to your computer and use it in GitHub Desktop.
Save andypost/30992c35f1a80146de7294851954777e to your computer and use it in GitHub Desktop.
Build php7 based on Alpinelinux https://gitlab.alpinelinux.org/alpine/aports
aports$ cat Makefile
.PHONY: run
all: run
IMAGE := skilldlabs/aports-build:edge
IMAGE_ALPINE=alpinelinux/docker-abuild
builder=docker run --rm -it --cap-add=SYS_PTRACE -v $(shell pwd):/mnt --network host --entrypoint='' -e APORTSDIR=/mnt -w /mnt $(IMAGE_ALPINE)
run:
docker run --rm -it --cap-add=SYS_PTRACE -v $(shell pwd):/mnt --network host -e APORTSDIR=/mnt $(IMAGE) ash
runp:
docker run --rm -it --cap-add=SYS_PTRACE --privileged -v $(shell pwd):/mnt --network host -e APORTSDIR=/mnt $(IMAGE) ash
x86:
docker pull $(IMAGE_ALPINE):edge-x86
$(builder):edge-x86 ash
x64:
docker pull $(IMAGE_ALPINE):edge-x86_64
$(builder):edge-x86_64 ash
s390:
docker pull $(IMAGE_ALPINE):edge-s390x
$(builder):edge-s390x ash
aports$ make x64
docker pull alpinelinux/docker-abuild:edge-x86_64
edge-x86_64: Pulling from alpinelinux/docker-abuild
Digest: sha256:5142fa3569a5bce5973b92c67ce24f07431b77dcad1a492db2c9ba7761d77e3c
Status: Image is up to date for alpinelinux/docker-abuild:edge-x86_64
docker.io/alpinelinux/docker-abuild:edge-x86_64
docker run --rm -it --cap-add=SYS_PTRACE -v /home/andypost/www/skilld/aports:/mnt --network host --entrypoint='' -e APORTSDIR=/mnt -w /mnt alpinelinux/docker-abuild:edge-x86_64 ash
/mnt $ cd community/php7
/mnt/community/php7 $ sudo apk upgrade
fetch http://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz
WARNING: Ignoring /home/builder/packages/main/x86_64/APKINDEX.tar.gz: No such file or directory
WARNING: Ignoring /home/builder/packages/community/x86_64/APKINDEX.tar.gz: No such file or directory
WARNING: Ignoring /home/builder/packages/testing/x86_64/APKINDEX.tar.gz: No such file or directory
(1/2) Upgrading libmagic (5.38-r0 -> 5.39-r0)
(2/2) Upgrading file (5.38-r0 -> 5.39-r0)
Executing busybox-1.31.1-r20.trigger
OK: 231 MiB in 55 packages
/mnt/community/php7 $ abuild deps unpack prepare
>>> php7: Installing for build: autoconf pcre2-dev re2c apache2-dev argon2-dev aspell-dev bison bzip2-dev curl-dev db-dev enchant2-dev freetds-dev freetype-dev gdbm-dev gettext-dev gmp-dev icu-dev imap-dev krb5-dev libedit-dev libical-dev libjpeg-turbo-dev libpng-dev lmdb-dev oniguruma-dev openssl-dev libsodium-dev libwebp-dev libxml2-dev libxpm-dev libxslt-dev libzip-dev net-snmp-dev openldap-dev postgresql-dev sqlite-dev tidyhtml-dev unixodbc-dev zlib-dev
WARNING: Ignoring /home/builder/packages//community/x86_64/APKINDEX.tar.gz: No such file or directory
WARNING: Ignoring /home/builder/packages//main/x86_64/APKINDEX.tar.gz: No such file or directory
WARNING: Ignoring /home/builder/packages/main/x86_64/APKINDEX.tar.gz: No such file or directory
WARNING: Ignoring /home/builder/packages/community/x86_64/APKINDEX.tar.gz: No such file or directory
WARNING: Ignoring /home/builder/packages/testing/x86_64/APKINDEX.tar.gz: No such file or directory
(1/173) Installing m4 (1.4.18-r1)
(2/173) Installing libbz2 (1.0.8-r1)
(3/173) Installing perl (5.30.3-r1)
(4/173) Installing autoconf (2.69-r2)
(5/173) Installing ncurses-terminfo-base (6.2_p20200613-r0)
(6/173) Installing ncurses-libs (6.2_p20200613-r0)
(7/173) Installing ncurses-dev (6.2_p20200613-r0)
(8/173) Installing libedit (20191231.3.1-r0)
(9/173) Installing libedit-dev (20191231.3.1-r0)
(10/173) Installing zlib-dev (1.2.11-r3)
(11/173) Installing libpcre2-16 (10.35-r0)
(12/173) Installing libpcre2-32 (10.35-r0)
(13/173) Installing pcre2-dev (10.35-r0)
(14/173) Installing re2c (1.3-r1)
(15/173) Installing expat-dev (2.2.9-r1)
(16/173) Installing libuuid (2.35.2-r2)
(17/173) Installing apr (1.7.0-r0)
(18/173) Installing libblkid (2.35.2-r2)
(19/173) Installing blkid (2.35.2-r2)
(20/173) Installing libcap-ng (0.7.10-r0)
(21/173) Installing setpriv (2.35.2-r2)
(22/173) Installing libmount (2.35.2-r2)
(23/173) Installing libsmartcols (2.35.2-r2)
(24/173) Installing findmnt (2.35.2-r2)
(25/173) Installing mcookie (2.35.2-r2)
(26/173) Installing hexdump (2.35.2-r2)
(27/173) Installing lsblk (2.35.2-r2)
(28/173) Installing libfdisk (2.35.2-r2)
(29/173) Installing sfdisk (2.35.2-r2)
(30/173) Installing cfdisk (2.35.2-r2)
(31/173) Installing util-linux (2.35.2-r2)
(32/173) Installing util-linux-dev (2.35.2-r2)
(33/173) Installing readline (8.0.4-r0)
(34/173) Installing bash (5.0.17-r0)
Executing bash-5.0.17-r0.post-install
(35/173) Installing apr-dev (1.7.0-r0)
(36/173) Installing db (5.3.28-r1)
(37/173) Installing libsasl (2.1.27-r6)
(38/173) Installing cyrus-sasl-dev (2.1.27-r6)
(39/173) Installing openssl-dev (1.1.1g-r0)
(40/173) Installing libldap (2.4.50-r0)
(41/173) Installing libldapcpp (2.4.50-r0)
(42/173) Installing openldap-dev (2.4.50-r0)
(43/173) Installing sqlite-libs (3.32.2-r0)
(44/173) Installing sqlite-dev (3.32.2-r0)
(45/173) Installing libffi (3.3-r2)
(46/173) Installing xz-libs (5.2.5-r0)
(47/173) Installing libxml2 (2.9.10-r4)
(48/173) Installing llvm10-libs (10.0.0-r2)
(49/173) Installing clang-libs (10.0.0-r3)
(50/173) Installing clang (10.0.0-r3)
(51/173) Installing llvm10 (10.0.0-r2)
(52/173) Installing icu-libs (67.1-r0)
(53/173) Installing icu (67.1-r0)
(54/173) Installing icu-dev (67.1-r0)
(55/173) Installing libpq (12.3-r2)
(56/173) Installing postgresql-libs (12.3-r2)
(57/173) Installing postgresql-dev (12.3-r2)
(58/173) Installing db-c++ (5.3.28-r1)
(59/173) Installing db-dev (5.3.28-r1)
(60/173) Installing mariadb-connector-c (3.1.8-r1)
(61/173) Installing mariadb-connector-c-dev (3.1.8-r1)
(62/173) Installing mariadb-common (10.4.13-r1)
(63/173) Installing libaio (0.3.112-r1)
(64/173) Installing pcre (8.44-r0)
(65/173) Installing mariadb-embedded (10.4.13-r1)
(66/173) Installing mariadb-dev (10.4.13-r1)
(67/173) Installing apr-util (1.6.1-r6)
(68/173) Installing apr-util-dev (1.6.1-r6)
(69/173) Installing apache2-dev (2.4.43-r0)
(70/173) Installing argon2-libs (20190702-r1)
(71/173) Installing argon2-dev (20190702-r1)
(72/173) Installing libintl (0.20.2-r0)
(73/173) Installing aspell-libs (0.60.8-r0)
(74/173) Installing aspell (0.60.8-r0)
(75/173) Installing aspell-utils (0.60.8-r0)
(76/173) Installing aspell-dev (0.60.8-r0)
(77/173) Installing bison (3.6.3-r0)
(78/173) Installing bzip2-dev (1.0.8-r1)
(79/173) Installing nghttp2-dev (1.41.0-r0)
(80/173) Installing curl-dev (7.70.0-r0)
(81/173) Installing glib (2.64.3-r0)
(82/173) Installing boost-locale (1.72.0-r6)
(83/173) Installing nuspell (3.1.1-r0)
(84/173) Installing enchant2 (2.2.8-r2)
(85/173) Installing gdbm (1.13-r1)
(86/173) Installing python3 (3.8.3-r0)
(87/173) Installing gettext-asprintf (0.20.2-r0)
(88/173) Installing libunistring (0.9.10-r0)
(89/173) Installing gettext-libs (0.20.2-r0)
(90/173) Installing gettext (0.20.2-r0)
(91/173) Installing gettext-dev (0.20.2-r0)
(92/173) Installing libxml2-utils (2.9.10-r4)
(93/173) Installing libgpg-error (1.38-r0)
(94/173) Installing libgcrypt (1.8.5-r0)
(95/173) Installing libxslt (1.1.34-r0)
(96/173) Installing docbook-xml (4.5-r6)
Executing docbook-xml-4.5-r6.post-install
(97/173) Installing docbook-xsl (1.79.2-r2)
Executing docbook-xsl-1.79.2-r2.post-install
(98/173) Installing linux-headers (5.4.5-r1)
(99/173) Installing libffi-dev (3.3-r2)
(100/173) Installing libpcre16 (8.44-r0)
(101/173) Installing libpcre32 (8.44-r0)
(102/173) Installing libpcrecpp (8.44-r0)
(103/173) Installing pcre-dev (8.44-r0)
(104/173) Installing glib-dev (2.64.3-r0)
(105/173) Installing enchant2-dev (2.2.8-r2)
(106/173) Installing unixodbc (2.3.7-r2)
(107/173) Installing freetds (1.1.42-r0)
(108/173) Installing freetds-dev (1.1.42-r0)
(109/173) Installing brotli-libs (1.0.7-r5)
(110/173) Installing libpng (1.6.37-r1)
(111/173) Installing freetype (2.10.2-r0)
(112/173) Installing brotli-dev (1.0.7-r5)
(113/173) Installing libpng-dev (1.6.37-r1)
(114/173) Installing freetype-dev (2.10.2-r0)
(115/173) Installing gdbm-dev (1.13-r1)
(116/173) Installing libgmpxx (6.2.0-r0)
(117/173) Installing gmp-dev (6.2.0-r0)
(118/173) Installing c-client (2007f-r11)
(119/173) Installing imap-dev (2007f-r11)
(120/173) Installing libcom_err (1.45.6-r0)
(121/173) Installing e2fsprogs-libs (1.45.6-r0)
(122/173) Installing e2fsprogs-dev (1.45.6-r0)
(123/173) Installing krb5-conf (1.0-r2)
(124/173) Installing keyutils-libs (1.6.1-r1)
(125/173) Installing libverto (0.3.1-r1)
(126/173) Installing krb5-libs (1.18.2-r0)
(127/173) Installing krb5-server-ldap (1.18.2-r0)
(128/173) Installing krb5-dev (1.18.2-r0)
(129/173) Installing libical (3.0.8-r2)
(130/173) Installing libical-dev (3.0.8-r2)
(131/173) Installing libjpeg-turbo (2.0.4-r1)
(132/173) Installing libjpeg-turbo-dev (2.0.4-r1)
(133/173) Installing lmdb (0.9.25-r0)
(134/173) Installing lmdb-dev (0.9.25-r0)
(135/173) Installing oniguruma (6.9.5-r1)
(136/173) Installing oniguruma-dev (6.9.5-r1)
(137/173) Installing libsodium (1.0.18-r0)
(138/173) Installing libsodium-dev (1.0.18-r0)
(139/173) Installing libwebp (1.1.0-r0)
(140/173) Installing libwebp-dev (1.1.0-r0)
(141/173) Installing xz-dev (5.2.5-r0)
(142/173) Installing libxml2-dev (2.9.10-r4)
(143/173) Installing libxau (1.0.9-r0)
(144/173) Installing libbsd (0.10.0-r0)
(145/173) Installing libxdmcp (1.1.3-r0)
(146/173) Installing libxcb (1.14-r1)
(147/173) Installing libx11 (1.6.9-r0)
(148/173) Installing libxext (1.3.4-r0)
(149/173) Installing libice (1.0.10-r0)
(150/173) Installing libsm (1.2.3-r0)
(151/173) Installing libxt (1.2.0-r0)
(152/173) Installing libxpm (3.5.13-r0)
(153/173) Installing xorgproto (2020.1-r0)
(154/173) Installing libxau-dev (1.0.9-r0)
(155/173) Installing xcb-proto (1.14-r0)
(156/173) Installing libxdmcp-dev (1.1.3-r0)
(157/173) Installing libxcb-dev (1.14-r1)
(158/173) Installing xtrans (1.4.0-r1)
(159/173) Installing libx11-dev (1.6.9-r0)
(160/173) Installing libxpm-dev (3.5.13-r0)
(161/173) Installing libxslt-dev (1.1.34-r0)
(162/173) Installing libzip (1.7.1-r0)
(163/173) Installing libzip-dev (1.7.1-r0)
(164/173) Installing net-snmp-libs (5.8-r3)
(165/173) Installing net-snmp-agent-libs (5.8-r3)
(166/173) Installing net-snmp-dev (5.8-r3)
(167/173) Installing tidyhtml-libs (5.6.0-r0)
(168/173) Installing tidyhtml-dev (5.6.0-r0)
(169/173) Installing unixodbc-dev (2.3.7-r2)
(170/173) Installing .makedepends-php7 (20200615.111533)
(171/173) Installing perl-error (0.17029-r0)
(172/173) Installing perl-git (2.27.0-r0)
(173/173) Installing git-perl (2.27.0-r0)
Executing busybox-1.31.1-r20.trigger
Executing glib-2.64.3-r0.trigger
No schema files found: doing nothing.
OK: 675 MiB in 228 packages
>>> php7: Fetching https://php.net/distributions/php-7.4.7.tar.xz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 177 100 177 0 0 590 0 --:--:-- --:--:-- --:--:-- 590
100 9.8M 100 9.8M 0 0 3454k 0 0:00:02 0:00:02 --:--:-- 4328k
>>> php7: Checking sha512sums...
php-7.4.7.tar.xz: OK
php7-fpm.initd: OK
php7-fpm.logrotate: OK
php7-module.conf: OK
disabled-tests.list: OK
install-pear.patch: OK
includedir.patch: OK
sharedir.patch: OK
php7-fpm-version-suffix.patch: OK
fix-tests-devserver.patch: OK
fix-tests-icu.patch: OK
enchant-2.patch: OK
>>> php7: Unpacking /var/cache/distfiles/php-7.4.7.tar.xz...
>>> php7: install-pear.patch
patching file pear/Makefile.frag
>>> php7: includedir.patch
patching file scripts/Makefile.frag
patching file ext/pdo/Makefile.frag
patching file scripts/php-config.in
patching file scripts/phpize.in
>>> php7: sharedir.patch
patching file php.ini-production
>>> php7: php7-fpm-version-suffix.patch
patching file sapi/fpm/fpm/fpm_conf.c
patching file sapi/fpm/php-fpm.conf.in
patching file sapi/fpm/www.conf.in
>>> php7: fix-tests-devserver.patch
patching file run-tests.php
Hunk #1 succeeded at 2500 (offset -3 lines).
>>> php7: fix-tests-icu.patch
patching file ext/intl/tests/locale_filter_matches3.phpt
patching file ext/intl/tests/locale_lookup_variant2.phpt
>>> php7: enchant-2.patch
patching file ext/enchant/config.m4
patching file ext/enchant/enchant.c
patching file build/php.m4
/mnt/community/php7 $ abuild build
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
checking build system type... x86_64-alpine-linux-musl
checking host system type... x86_64-alpine-linux-musl
checking target system type... x86_64-alpine-linux-musl
checking for x86_64-alpine-linux-musl-pkg-config... no
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment