Skip to content

Commit

Permalink
Add missing php-8.3 packages
Browse files Browse the repository at this point in the history
  • Loading branch information
xnox committed Oct 8, 2024
1 parent f439b5d commit 444b14b
Show file tree
Hide file tree
Showing 7 changed files with 401 additions and 0 deletions.
73 changes: 73 additions & 0 deletions php-8.3-pdo_snowflake.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
package:
name: php-8.3-pdo_snowflake
version: 3.0.2
epoch: 1
description: "Snowflake driver that uses the PHP Data Objects (PDO) extension"
copyright:
- license: Apache-2.0
# Only appears to work for x86_64.
# https://github.com/snowflakedb/pdo_snowflake/issues/338
target-architecture:
- x86_64
dependencies:
runtime:
- php-8.3

environment:
contents:
packages:
- autoconf
- automake
- bash
- binutils
- bison
- build-base
- busybox
- ca-certificates-bundle
- cmake
- gcc
- libtool
- openssf-compiler-options
- php-8.3
- php-8.3-dev
- php-8.3-pdo
- unixodbc-dev
- zlib-dev

pipeline:
- uses: git-checkout
with:
repository: https://github.com/snowflakedb/pdo_snowflake
expected-commit: 76b7a1bf24d3519c5e85c15741732904765ee240
tag: v${{package.version}}

- name: Run and build
runs: |
# The build files because there's a Werror and there are unused functions.
# Best guess is that their release was created with an older version
# of gcc, which didn't consider that a failure. Because we build this from
# a script, we can't just set CFLAGS, so we have to edit the script.
# Note. This also modifies the make clean target, but since we do not use
# it, it is not a problem.
# https://github.com/snowflakedb/pdo_snowflake/issues/339
sed -i -e 's@make@make CFLAGS="-Wno-unused-function $CFLAGS"@' ./scripts/build_pdo_snowflake.sh
PHP_HOME=/usr ./scripts/build_pdo_snowflake.sh
- name: Install
runs: |
# https://github.com/snowflakedb/pdo_snowflake#installing-the-driver-on-linux-and-macos
mkdir -p ${{targets.destdir}}
mkdir -p ${{targets.destdir}}/usr/lib/php/modules
install -d ${{targets.destdir}}/etc/php/conf.d
echo "extension=pdo_snowflake.so" > ${{targets.destdir}}/etc/php/conf.d/20-pdo_snowflake.ini
echo "pdo_snowflake.cacert=/etc/php/conf.d/cacert.pem" >> ${{targets.destdir}}/etc/php/conf.d/20-pdo_snowflake.ini
cp ./modules/pdo_snowflake.so ${{targets.destdir}}/usr/lib/php/modules/
cp ./libsnowflakeclient/cacert.pem ${{targets.destdir}}/etc/php/conf.d
- uses: strip

update:
enabled: true
github:
identifier: snowflakedb/pdo_snowflake
strip-prefix: v
54 changes: 54 additions & 0 deletions php-8.3-pecl-http.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
package:
name: php-8.3-pecl-http
version: 4.2.3
epoch: 6
description: "Provides PHP 8.3 HTTP module for PHP Extended HTTP Support- PECL"
copyright:
- license: BSD-2-Clause
dependencies:
runtime:
- php-8.3

environment:
contents:
packages:
- autoconf
- automake
- binutils
- build-base
- busybox
- ca-certificates-bundle
- cmake
- curl-dev
- gcc
- icu-dev
- libtool
- openssf-compiler-options
- openssl-dev
- php-8.3-dev
- php-8.3-pecl-raphf
- zlib-dev

pipeline:
- uses: fetch
with:
uri: https://pecl.php.net/get/pecl_http-${{package.version}}.tgz
expected-sha512: be8bac0947e9fb63da5afa3eaf7b75a70775ca59a8a8.34b5f4b1875909dd8b6b2f4b25bf462acef78f18d5dd739c02352786853d9963cb71f3c1b114f113558

- uses: pecl/phpize

- uses: autoconf/make

# TODO: This is a temporary workaround until the pecl/install pipelines
# propagates through.
# https://github.com/chainguard-dev/melange/pull/1068
- name: Install
runs: |
make INSTALL_ROOT="${{targets.destdir}}" install
install -d ${{targets.destdir}}/etc/php/conf.d
echo "extension=http.so" > ${{targets.destdir}}/etc/php/conf.d/http.ini
- uses: strip

update:
enabled: false
54 changes: 54 additions & 0 deletions php-8.3-pecl-mcrypt.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
package:
name: php-8.3-pecl-mcrypt
version: 1.0.7
epoch: 2
description: "Provides PHP 8.3 bindings for the unmaintained libmcrypt - PECL"
copyright:
- license: PHP-3.01
dependencies:
runtime:
- php-8.3

environment:
contents:
packages:
- autoconf
- automake
- binutils
- build-base
- busybox
- ca-certificates-bundle
- cmake
- gcc
- libmcrypt-dev
- libtool
- php-8.3-dev

pipeline:
- uses: fetch
with:
uri: https://pecl.php.net/get/mcrypt-${{package.version}}.tgz
expected-sha512: 1b579af868.3db073520437ad6a93513c2591bc865d982dc7926591e712614995148d13bacc1b4b207ddecda4bad219b67010a39ea17e1ec6e180d4fd69182ff

- name: phpize and configure
runs: |
phpize
./configure --prefix=/usr --with-php-config=php-config
- uses: autoconf/make

- name: Install
runs: |
make INSTALL_ROOT="${{targets.destdir}}" install
install -d ${{targets.destdir}}/etc/php/conf.d
echo "extension=mcrypt.so" > ${{targets.destdir}}/etc/php/conf.d/mcrypt.ini
- uses: strip

update:
enabled: true
github:
identifier: php/pecl-encryption-mcrypt
use-tag: true
# ignore version 2.x.y tags, 1.x.y is the only mentioned version on https://pecl.php.net/package/mcrypt
tag-filter: "1."
55 changes: 55 additions & 0 deletions php-8.3-pecl-mongodb.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
package:
name: php-8.3-pecl-mongodb
version: 1.20.0
epoch: 0
description: "PHP 8.3 MongoDB driver - PECL"
copyright:
- license: PHP-3.01
dependencies:
runtime:
- php-8.3

environment:
contents:
packages:
- autoconf
- automake
- binutils
- build-base
- busybox
- ca-certificates-bundle
- cmake
- cyrus-sasl-dev
- gcc
- icu-dev
- libtool
- openssl-dev>3
- php-8.3-dev
- snappy-dev
- zstd-dev

pipeline:
- uses: fetch
with:
uri: https://pecl.php.net/get/mongodb-${{package.version}}.tgz
expected-sha512: 715b40616c9c61294dc2947ddbc1b2bf2ecac02654fcbcdec5394acf1e44365f1a96f15d3459b57e50fa2f125f44d406d7bdb6306c13b9ffa8.3686c4cdc3cee

- name: phpize and configure
runs: |
phpize
./configure --prefix=/usr --with-php-config=php-config
- uses: autoconf/make

- name: Install
runs: |
make INSTALL_ROOT="${{targets.destdir}}" install
install -d ${{targets.destdir}}/etc/php/conf.d
echo "extension=mongodb.so" > ${{targets.destdir}}/etc/php/conf.d/mongodb.ini
- uses: strip

update:
enabled: true
release-monitor:
identifier: 11158
53 changes: 53 additions & 0 deletions php-8.3-pecl-pdosqlsrv.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
package:
name: php-8.3-pecl-pdosqlsrv
version: 5.11.1
epoch: 3
description: "Provides PHP 8.3 Microsoft Drivers for SQL Server (PDO_SQLSRV) - PECL"
copyright:
- license: MIT
dependencies:
runtime:
- php-8.3

environment:
contents:
packages:
- autoconf
- automake
- binutils
- build-base
- busybox
- ca-certificates-bundle
- cmake
- gcc
- libtool
- openssf-compiler-options
- php-8.3-dev
- unixodbc-dev

pipeline:
- uses: fetch
with:
uri: https://pecl.php.net/get/pdo_sqlsrv-${{package.version}}.tgz
expected-sha512: 6bcf39b9948fdc06261f4e901de988c33b27422d5677c6ec8234625f49ad702186e5e02bcb5264945e0bc5fd4de3389ec014e125856625837dbd884776747faa

- uses: pecl/phpize

- uses: autoconf/make

# TODO: This is a temporary workaround until the pecl/install pipelines
# propagates through.
# https://github.com/chainguard-dev/melange/pull/1068
- name: Install
runs: |
make INSTALL_ROOT="${{targets.destdir}}" install
install -d ${{targets.destdir}}/etc/php/conf.d
echo "extension=pdo_sqlsrv.so" > ${{targets.destdir}}/etc/php/conf.d/pdo_sqlsrv.ini
- uses: strip

update:
enabled: false
exclude-reason: >
TODO(vaikas): I can find the releases in github but building it does not work with fetching from there like it does when you use fetch. Also seems like I can't watch the github repo for new releases, yet use the fetch above together?
59 changes: 59 additions & 0 deletions php-8.3-pecl-raphf.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
package:
name: php-8.3-pecl-raphf
version: 2.0.1
epoch: 3
description: "Provides PHP 8.3 resource and persistent handles factory - PECL"
copyright:
- license: PHP-3.01
dependencies:
runtime:
- php-8.3

environment:
contents:
packages:
- autoconf
- automake
- binutils
- build-base
- busybox
- ca-certificates-bundle
- cmake
- gcc
- libtool
- openssf-compiler-options
- php-8.3-dev

pipeline:
- uses: fetch
with:
uri: https://pecl.php.net/get/raphf-${{package.version}}.tgz
expected-sha512: 0a609fc21a62880963e7afb75297eb75a2598aab2c816cb61e84d665b0453e4952aa9bf25fe2c818cc94492a4b94aed965053c67899fdb984d88661364fffb1e

- uses: pecl/phpize

- uses: autoconf/make

# TODO: This is a temporary workaround until the pecl/install pipelines
# propagates through.
# https://github.com/chainguard-dev/melange/pull/1068
- name: Install
runs: |
make INSTALL_ROOT="${{targets.destdir}}" install
install -d ${{targets.destdir}}/etc/php/conf.d
echo "extension=raphf.so" > ${{targets.destdir}}/etc/php/conf.d/raphf.ini
# PHP initialization is order dependent. So we will explicitly
# load this by prefixing the file with 10- so it runs before
# other modules which start with letters
# starts.
- runs: |
mv ${{targets.destdir}}/etc/php/conf.d/raphf.ini ${{targets.destdir}}/etc/php/conf.d/10-raphf.ini
- uses: strip

update:
enabled: false
exclude-reason: >
TODO(vaikas): I can't find in release-monitoring, or github.
Loading

0 comments on commit 444b14b

Please sign in to comment.