Skip to content

Commit

Permalink
Merge pull request #578 from mu1f407/php-84
Browse files Browse the repository at this point in the history
Build for PHP 8.4 and update libraries
  • Loading branch information
mnapoli authored Dec 26, 2024
2 parents 22ad750 + 1656f0c commit cea23ab
Show file tree
Hide file tree
Showing 47 changed files with 102 additions and 64 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/blackfire.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: 7.4
php-version: 8.4
coverage: none

- name: Checkout code
Expand All @@ -26,7 +26,7 @@ jobs:
id: fetch_version
run: |
cd layers/blackfire;
for VERSION in 80 81 82; do
for VERSION in 80 81 82 83 84; do
BF_AGENT_VERSION=$(curl -s -o probe -D - https://blackfire.io/api/v1/releases/probe/php/linux/amd64/$VERSION | grep -i 'X-Blackfire-Release-Version: ' | sed "s%X-Blackfire-Release-Version: %%I" | sed s%.$%%);
php ./store.php $VERSION $BF_AGENT_VERSION;
done
Expand Down
4 changes: 3 additions & 1 deletion layers/amqp/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ RUN mkdir -p ${AMQP_BUILD_DIR}

# Compile rabbitmq
WORKDIR ${AMQP_BUILD_DIR}
# Currently it is not possible to use newer rabbitmq-c version than 0.13.0 because this is
# last version which supports CMake 3.17 which is latest available version in Amazon Linux 2.
RUN curl -Ls -o rabbitmq-c.tar.gz https://github.com/alanxz/rabbitmq-c/archive/refs/tags/v0.13.0.tar.gz
RUN tar xzf rabbitmq-c.tar.gz
WORKDIR ${AMQP_BUILD_DIR}/rabbitmq-c-0.13.0
Expand All @@ -19,7 +21,7 @@ RUN cmake --build . --target install
WORKDIR ${AMQP_BUILD_DIR}
RUN git clone https://github.com/php-amqp/php-amqp
WORKDIR ${AMQP_BUILD_DIR}/php-amqp
RUN git reset --hard 618e06ad2ef867598831cdd3faadba0dd65be917
RUN git checkout v2.1.2
RUN phpize
RUN ./configure
RUN make -j $(nproc)
Expand Down
3 changes: 2 additions & 1 deletion layers/amqp/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"80",
"81",
"82",
"83"
"83",
"84"
]
}
3 changes: 2 additions & 1 deletion layers/blackfire/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"80",
"81",
"82",
"83"
"83",
"84"
]
}
3 changes: 2 additions & 1 deletion layers/bsdiff/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"80",
"81",
"82",
"83"
"83",
"84"
]
}
3 changes: 2 additions & 1 deletion layers/calendar/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"80",
"81",
"82",
"83"
"83",
"84"
]
}
4 changes: 2 additions & 2 deletions layers/datadog/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ ENV DDTRACE_BUILD_DIR=${BUILD_DIR}/ddtrace
RUN set -xe; \
mkdir -p ${DDTRACE_BUILD_DIR}; \
curl -Ls -o ${DDTRACE_BUILD_DIR}/datadog-setup.php \
https://github.com/DataDog/dd-trace-php/releases/download/0.96.0/datadog-setup.php
https://github.com/DataDog/dd-trace-php/releases/download/1.5.1/datadog-setup.php

WORKDIR ${DDTRACE_BUILD_DIR}

RUN php datadog-setup.php --php-bin=all --enable-profiling

RUN cp "$(php-config --extension-dir)/ddtrace.so" /tmp/ddtrace.so && \
cp "$(php-config --extension-dir)/datadog-profiling.so" /tmp/datadog-profiling.so && \
cp "$(php-config --ini-dir)/98-ddtrace.ini" /tmp/ext.ini
cp "$(php-config --ini-dir | cut -d: -f1)/98-ddtrace.ini" /tmp/ext.ini

RUN sed -i 's/extension = ddtrace\.so/extension = \/opt\/bref-extra\/ddtrace.so/' /tmp/ext.ini && \
sed -i 's/extension = datadog-profiling\.so/extension = \/opt\/bref-extra\/datadog-profiling.so/' /tmp/ext.ini && \
Expand Down
3 changes: 2 additions & 1 deletion layers/datadog/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"80",
"81",
"82",
"83"
"83",
"84"
]
}
3 changes: 2 additions & 1 deletion layers/decimal/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"80",
"81",
"82",
"83"
"83",
"84"
]
}
3 changes: 2 additions & 1 deletion layers/ds/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"80",
"81",
"82",
"83"
"83",
"84"
]
}
3 changes: 2 additions & 1 deletion layers/excimer/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"80",
"81",
"82",
"83"
"83",
"84"
]
}
3 changes: 2 additions & 1 deletion layers/gmp/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"80",
"81",
"82",
"83"
"83",
"84"
]
}
3 changes: 2 additions & 1 deletion layers/gnupg/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"php": [
"81",
"82",
"83"
"83",
"84"
]
}
2 changes: 1 addition & 1 deletion layers/grpc/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ ARG PHP_VERSION
ARG BREF_VERSION
FROM bref/build-php-$PHP_VERSION:$BREF_VERSION AS ext

RUN MAKEFLAGS="-j $(nproc)" && pecl install grpc-1.57.0 > /dev/null
RUN MAKEFLAGS="-j $(nproc)" && pecl install grpc-1.68.0 > /dev/null
RUN cp `php-config --extension-dir`/grpc.so /tmp/grpc.so
RUN strip --strip-debug /tmp/grpc.so
RUN echo 'extension=grpc.so' > /tmp/ext.ini
Expand Down
3 changes: 2 additions & 1 deletion layers/grpc/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"80",
"81",
"82",
"83"
"83",
"84"
]
}
3 changes: 2 additions & 1 deletion layers/h3/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"80",
"81",
"82",
"83"
"83",
"84"
]
}
3 changes: 2 additions & 1 deletion layers/igbinary/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"80",
"81",
"82",
"83"
"83",
"84"
]
}
3 changes: 2 additions & 1 deletion layers/ldap/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"80",
"81",
"82",
"83"
"83",
"84"
]
}
3 changes: 2 additions & 1 deletion layers/mailparse/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"80",
"81",
"82",
"83"
"83",
"84"
]
}
4 changes: 2 additions & 2 deletions layers/maxminddb/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ ARG PHP_VERSION
ENV LIBMAXMINDDB_BUILD_DIR=${BUILD_DIR}/libmaxminddb
RUN mkdir -p ${LIBMAXMINDDB_BUILD_DIR}

RUN curl -Ls https://github.com/maxmind/libmaxminddb/releases/download/1.6.0/libmaxminddb-1.6.0.tar.gz \
RUN curl -Ls https://github.com/maxmind/libmaxminddb/releases/download/1.11.0/libmaxminddb-1.11.0.tar.gz \
| tar xzC ${LIBMAXMINDDB_BUILD_DIR}

WORKDIR ${LIBMAXMINDDB_BUILD_DIR}/libmaxminddb-1.6.0
WORKDIR ${LIBMAXMINDDB_BUILD_DIR}/libmaxminddb-1.11.0

RUN ./configure --prefix ${INSTALL_DIR} --exec-prefix ${INSTALL_DIR}
RUN make -j `nproc`
Expand Down
3 changes: 2 additions & 1 deletion layers/maxminddb/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"80",
"81",
"82",
"83"
"83",
"84"
]
}
3 changes: 2 additions & 1 deletion layers/msgpack/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"80",
"81",
"82",
"83"
"83",
"84"
]
}
2 changes: 1 addition & 1 deletion layers/newrelic/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ ARG BREF_VERSION
FROM bref/build-php-$PHP_VERSION:$BREF_VERSION AS ext

# Build the New Relic Agent - install silently
ARG NEWRELIC_VERSION=11.3.0.16
ARG NEWRELIC_VERSION=11.4.0.17
RUN \
curl -L https://download.newrelic.com/php_agent/archive/${NEWRELIC_VERSION}/newrelic-php5-${NEWRELIC_VERSION}-linux.tar.gz | tar -C /tmp -zx && \
export NR_INSTALL_USE_CP_NOT_LN=1 && \
Expand Down
25 changes: 13 additions & 12 deletions layers/oci8/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,27 +10,28 @@ ENV ORACLE_BUILD_DIR=${BUILD_DIR}/oracle
# Install libaio
RUN yum install -y libaio

# Instant Client newer than 21.x requires glibc 2.28+ which is not available on Amazon Linux 2
RUN mkdir -p ${ORACLE_BUILD_DIR}; \
cd ${ORACLE_BUILD_DIR}; \
curl -o oci-basic.zip https://download.oracle.com/otn_software/linux/instantclient/2110000/instantclient-basiclite-linux.x64-21.10.0.0.0dbru.zip && \
unzip oci-basic.zip -d src && \
curl -o oci-sdk.zip https://download.oracle.com/otn_software/linux/instantclient/2110000/instantclient-sdk-linux.x64-21.10.0.0.0dbru.zip && \
unzip oci-sdk.zip -d src
curl -o oci-basic.zip https://download.oracle.com/otn_software/linux/instantclient/2116000/instantclient-basiclite-linux.x64-21.16.0.0.0dbru.zip && \
unzip oci-basic.zip -d src -x META-INF/* && \
curl -o oci-sdk.zip https://download.oracle.com/otn_software/linux/instantclient/2116000/instantclient-sdk-linux.x64-21.16.0.0.0dbru.zip && \
unzip oci-sdk.zip -d src -x META-INF/*

RUN if [ "$PHP_VERSION" = "80" ] ; then \
echo "instantclient,${ORACLE_BUILD_DIR}/src/instantclient_21_10" | pecl install oci8-3.0.1; \
echo "instantclient,${ORACLE_BUILD_DIR}/src/instantclient_21_16" | pecl install oci8-3.0.1; \
elif [ "$PHP_VERSION" = "81" ] ; then \
echo "instantclient,${ORACLE_BUILD_DIR}/src/instantclient_21_10" | pecl install oci8-3.2.1; \
echo "instantclient,${ORACLE_BUILD_DIR}/src/instantclient_21_16" | pecl install oci8-3.2.1; \
else \
echo "instantclient,${ORACLE_BUILD_DIR}/src/instantclient_21_10" | pecl install oci8; \
echo "instantclient,${ORACLE_BUILD_DIR}/src/instantclient_21_16" | pecl install oci8; \
fi

RUN cp /usr/lib64/libaio.so.1 /tmp/libaio.so.1
RUN cp ${ORACLE_BUILD_DIR}/src/instantclient_21_10/libclntshcore.so.21.1 /tmp/libclntshcore.so.21.1
RUN cp ${ORACLE_BUILD_DIR}/src/instantclient_21_10/libclntsh.so.21.1 /tmp/libclntsh.so.21.1
RUN cp ${ORACLE_BUILD_DIR}/src/instantclient_21_10/libocci.so.21.1 /tmp/libocci.so.21.1
RUN cp ${ORACLE_BUILD_DIR}/src/instantclient_21_10/libnnz21.so /tmp/libnnz21.so
RUN cp ${ORACLE_BUILD_DIR}/src/instantclient_21_10/libociicus.so /tmp/libociicus.so
RUN cp ${ORACLE_BUILD_DIR}/src/instantclient_21_16/libclntshcore.so.21.1 /tmp/libclntshcore.so.21.1
RUN cp ${ORACLE_BUILD_DIR}/src/instantclient_21_16/libclntsh.so.21.1 /tmp/libclntsh.so.21.1
RUN cp ${ORACLE_BUILD_DIR}/src/instantclient_21_16/libocci.so.21.1 /tmp/libocci.so.21.1
RUN cp ${ORACLE_BUILD_DIR}/src/instantclient_21_16/libnnz21.so /tmp/libnnz21.so
RUN cp ${ORACLE_BUILD_DIR}/src/instantclient_21_16/libociicus.so /tmp/libociicus.so
RUN cp `php-config --extension-dir`/oci8.so /tmp/oci8.so
RUN echo 'extension=oci8.so' > /tmp/ext.ini

Expand Down
3 changes: 2 additions & 1 deletion layers/oci8/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"80",
"81",
"82",
"83"
"83",
"84"
]
}
4 changes: 2 additions & 2 deletions layers/odbc-snowflake/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ RUN cp `php-config --extension-dir`/odbc.so /tmp/odbc.so
RUN echo 'extension=odbc.so' > /tmp/ext.ini

# https://docs.snowflake.com/en/user-guide/odbc-download.html
# https://sfc-repo.snowflakecomputing.com/odbc/linux/2.25.0/index.html
# https://sfc-repo.snowflakecomputing.com/odbc/linux/3.5.0/index.html
# also: strip more than 100 mb of debug symbols
RUN curl https://sfc-repo.snowflakecomputing.com/odbc/linux/2.25.0/snowflake_linux_x8664_odbc-2.25.0.tgz |tar xzv --directory /tmp \
RUN curl https://sfc-repo.snowflakecomputing.com/odbc/linux/3.5.0/snowflake_linux_x8664_odbc-3.5.0.tgz | tar xzv --directory /tmp \
&& strip -g /tmp/snowflake_odbc/lib/libSnowflake.so
# modify the config files for the new final location in /opt/snowflake_odbc
RUN sed -i 's#/path/to/your/#/opt/snowflake_odbc/lib/#g' /tmp/snowflake_odbc/conf/*
Expand Down
3 changes: 2 additions & 1 deletion layers/odbc-snowflake/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"80",
"81",
"82",
"83"
"83",
"84"
]
}
2 changes: 1 addition & 1 deletion layers/opentelemetry/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ ARG PHP_VERSION
ARG BREF_VERSION
FROM bref/build-php-$PHP_VERSION:$BREF_VERSION AS ext

RUN MAKEFLAGS="-j $(nproc)" pecl install opentelemetry-1.0.0 > /dev/null
RUN MAKEFLAGS="-j $(nproc)" pecl install opentelemetry-1.1.0 > /dev/null
RUN cp `php-config --extension-dir`/opentelemetry.so /tmp/opentelemetry.so
RUN strip --strip-debug /tmp/opentelemetry.so
RUN echo 'extension=opentelemetry.so' > /tmp/ext.ini
Expand Down
3 changes: 2 additions & 1 deletion layers/opentelemetry/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"80",
"81",
"82",
"83"
"83",
"84"
]
}
3 changes: 2 additions & 1 deletion layers/pcov/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"80",
"81",
"82",
"83"
"83",
"84"
]
}
3 changes: 2 additions & 1 deletion layers/redis-igbinary/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"80",
"81",
"82",
"83"
"83",
"84"
]
}
2 changes: 1 addition & 1 deletion layers/redis/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ ARG PHP_VERSION
ARG BREF_VERSION
FROM bref/build-php-$PHP_VERSION:$BREF_VERSION AS ext

RUN pecl install --force redis-6.0.2
RUN pecl install --force redis-6.1.0
RUN cp `php-config --extension-dir`/redis.so /tmp/redis.so
RUN echo 'extension=redis.so' > /tmp/ext.ini

Expand Down
3 changes: 2 additions & 1 deletion layers/redis/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"80",
"81",
"82",
"83"
"83",
"84"
]
}
4 changes: 2 additions & 2 deletions layers/relay/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ ARG PHP_VERSION
ARG BREF_VERSION
FROM bref/build-php-$PHP_VERSION:2 AS ext

ARG RELAY_VERSION=0.6.8
ARG RELAY_VERSION=0.9.1

# Docs: https://relay.so/docs/1.x/installation#manual-installation

Expand All @@ -15,7 +15,7 @@ RUN pecl install igbinary msgpack && \
echo 'extension=msgpack.so' > /tmp/ext-msgpack.ini

# Install system dependencies needed by Relay
ARG ZSTD_VERSION=1.5.2
ARG ZSTD_VERSION=1.5.6
RUN <<'END' bash -e
mkdir -p /tmp/zstd
cd /tmp/zstd
Expand Down
3 changes: 2 additions & 1 deletion layers/relay/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"80",
"81",
"82",
"83"
"83",
"84"
]
}
3 changes: 2 additions & 1 deletion layers/scoutapm/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"80",
"81",
"82",
"83"
"83",
"84"
]
}
Loading

0 comments on commit cea23ab

Please sign in to comment.