Skip to content

Commit

Permalink
php: Update phpredis, simdjson and ssdeep extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
ondj committed Jan 13, 2025
1 parent 6f164de commit 24b35f3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
14 changes: 8 additions & 6 deletions bin/misp_compile_php_extensions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ download_and_check () {
}

# Install required packages for build
dnf install -y --setopt=tsflags=nodocs --setopt=install_weak_deps=False php-devel brotli-devel diffutils file ssdeep-devel
dnf install -y --setopt=tsflags=nodocs --setopt=install_weak_deps=False php-devel brotli-devel diffutils file

# Fix PHP for GCC 14
sed -i "s/#if __has_feature(c_atomic)/#if __has_feature(c_atomic) \&\& defined(__clang__)/" /usr/include/php/Zend/zend_atomic.h
Expand All @@ -37,7 +37,7 @@ mkdir /build/php-modules/
# Compile simdjson
mkdir /tmp/simdjson
cd /tmp/simdjson
download_and_check https://github.com/JakubOnderka/simdjson_php/archive/292309a311edf94db2b5c538a4e677cb93be1c91.tar.gz 4d3e54a16ea96a2f6d04eeb6f9cdde96c144725dd033c0ed44add7b7e198c66b
download_and_check https://github.com/JakubOnderka/simdjson_php/archive/c051b335d9ad1315f0054f9f3db3aff89ebf564d.tar.gz 4ecedd3b5ea659fa4881b6491654de30ee236c7337e4086f50e7bdf3eb4f473d
phpize
CPPFLAGS="$DEFAULT_FLAGS" ./configure --silent
make -j$NPROC
Expand Down Expand Up @@ -68,19 +68,21 @@ mv modules/*.so /build/php-modules/
# Compile redis
mkdir /tmp/redis
cd /tmp/redis
download_and_check https://github.com/phpredis/phpredis/archive/refs/tags/6.1.0.tar.gz 57135db32a0ccb1659f56c75feb26c10ea94fb3d2471edd047d94a9800f959b0
download_and_check https://github.com/phpredis/phpredis/archive/f68544f70385e1d431fb0245fafe30b39ee7479a.tar.gz 1b10b3b6abbb6f6c2a39aef0c3621eb95d55e055cdb6f289e790bb7b920b2f16
phpize
CFLAGS="$DEFAULT_FLAGS" ./configure --silent --enable-redis-igbinary
#./configure --silent --enable-redis-igbinary
make -j$NPROC
mv modules/*.so /build/php-modules/

# Compile ssdeep
mkdir /tmp/ssdeep
cd /tmp/ssdeep
download_and_check https://github.com/JakubOnderka/pecl-text-ssdeep/archive/3a2e2d9e5d58fe55003aa8b1f31009c7ad7f54e0.tar.gz 275bb3d6ed93b5897c9b37dac358509c3696239f521453d175ac582c81e23cbb
download_and_check https://github.com/JakubOnderka/pecl-text-ssdeep/archive/aa7ea7045a294548aedc3ccdfbb3936e1716bebd.tar.gz 1b4bc4985bf04fdd6026c5f76f7e4d75be100409235c54eb41aa031a18561299
cd ssdeep
download_and_check https://github.com/ssdeep-project/ssdeep/releases/download/release-2.14.1/ssdeep-2.14.1.tar.gz ff2eabc78106f009b4fb2def2d76fb0ca9e12acf624cbbfad9b3eb390d931313
cd ..
phpize
CFLAGS="$DEFAULT_FLAGS" ./configure --silent --with-ssdeep=/usr --with-libdir=lib64
CFLAGS="$DEFAULT_FLAGS" ./configure --silent --enable-libfuzzy=no --with-libdir=lib64
make -j$NPROC
mv modules/*.so /build/php-modules/

Expand Down
1 change: 0 additions & 1 deletion packages
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ mod_auth_openidc
zip
brotli
supervisor
ssdeep-libs
rsyslog
vector
crypto-policies-scripts
Expand Down

0 comments on commit 24b35f3

Please sign in to comment.