Skip to content

Commit

Permalink
Merge pull request #16 from sugarcrm/BR-12229
Browse files Browse the repository at this point in the history
BR-12229: Make basedir compatible with PHP84
  • Loading branch information
kadunuthula-sugarcrm authored Feb 5, 2025
2 parents e8e9ebc + 56ea394 commit 8816b93
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 21 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Basedir Extension Build & Test

on:
push:
branches: [ main, master ]
pull_request:
branches: [ main, master ]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Build and test PHP extension
run: |
docker build -t php-basedir-extension . --progress=plain
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ env:
- PHPVER="7.3.14"
- PHPVER="7.4.2"
- PHPVER="8.0.0"
- PHPVER="8.4.1"

# This replaces the travis supplied phpbuild which defaults to ZTS enabled
# builds. Since we are replacing using the same config, we don't have to add
Expand Down
41 changes: 20 additions & 21 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,34 +1,33 @@
FROM amazonlinux:2
FROM rockylinux:9

ARG PHP_BUILD_DIR=/var/task
ARG PHP_CONF_DIR=/etc/php.d
ARG PHP_EXT_DIR=/usr/lib64/php/modules

RUN yum clean all && \
yum -y upgrade && \
yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm \
https://rpms.remirepo.net/enterprise/remi-release-7.rpm \
re2c \
yum-utils && \
yum-config-manager --disable remi-safe && \
yum-config-manager --enable remi-php80 && \
yum-config-manager --setopt=remi-php80.priority=10 --save && \
yum -y install php-cli php-common php-devel && \
yum clean all
RUN dnf -y update && \
dnf -y install dnf-plugins-core && \
dnf config-manager --set-enabled crb && \
dnf -y install curl wget tar gcc make libxml2-devel \
bzip2 bzip2-devel libpng-devel libjpeg-devel \
freetype-devel oniguruma-devel libzip-devel zlib-devel \
--allowerasing

#Extension install
RUN mkdir -p ${PHP_EXT_DIR} && mkdir -p ${PHP_CONF_DIR}
RUN dnf -y install https://rpms.remirepo.net/enterprise/remi-release-9.rpm && \
dnf module reset php -y && \
dnf module enable php:remi-8.4 -y && \
dnf -y install php php-cli php-devel php-pear

RUN mkdir -p ${PHP_EXT_DIR} ${PHP_CONF_DIR}

#basedir
RUN mkdir -p ${PHP_BUILD_DIR}
RUN cd ${PHP_BUILD_DIR} && \
mkdir basedir
COPY basedir.c basedir/
COPY cache.php basedir/
COPY config.m4 basedir/
COPY php_basedir.h basedir/
COPY tests basedir/
RUN cd basedir && \
COPY basedir.c ${PHP_BUILD_DIR}/basedir/
COPY cache.php ${PHP_BUILD_DIR}/basedir/
COPY config.m4 ${PHP_BUILD_DIR}/basedir/
COPY php_basedir.h ${PHP_BUILD_DIR}/basedir/
COPY tests ${PHP_BUILD_DIR}/basedir/
RUN cd ${PHP_BUILD_DIR}/basedir && \
phpize && \
./configure && \
make && \
Expand Down

0 comments on commit 8816b93

Please sign in to comment.