public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Remi Collet <remi@fedoraproject.org>
To: git-commits@fedoraproject.org
Subject: [rpms/php] private-php86: build using system libxcrypt
Date: Fri, 27 Nov 2026 07:31:39 GMT [thread overview]
Message-ID: <179576469980.1.15329795134676403113.rpms-php-7113f618aa54@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/php
Branch : private-php86
Commit : 7113f618aa547b803bdac37989bbaf780c08d2c3
Author : Remi Collet <remi@fedoraproject.org>
Date : 2021-10-18T09:50:31+02:00
Stats : +75/-1 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/php/c/7113f618aa547b803bdac37989bbaf780c08d2c3?branch=private-php86
Log:
build using system libxcrypt
---
diff --git a/php-8.0.12-crypt.patch b/php-8.0.12-crypt.patch
new file mode 100644
index 0000000..3469a93
--- /dev/null
+++ b/php-8.0.12-crypt.patch
@@ -0,0 +1,66 @@
+From 9f98bc58c7bb7fdbb25614ca645bbd7a465fdfed Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Fri, 15 Oct 2021 15:45:50 +0200
+Subject: [PATCH] remove closing bracket in bad place
+
+---
+ build/php.m4 | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/build/php.m4 b/build/php.m4
+index 9746ba28f325..7fb9e3125d13 100644
+--- a/build/php.m4
++++ b/build/php.m4
+@@ -2219,7 +2219,6 @@ struct crypt_data buffer;
+ crypt_r("passwd", "hash", &buffer);
+ ]])],[php_cv_crypt_r_style=struct_crypt_data_gnu_source],[])
+ fi
+- ])
+
+ if test "$php_cv_crypt_r_style" = "none"; then
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+From fc4e31467c352032ee709ac55d3c67bc22abcd8d Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Fri, 15 Oct 2021 17:11:12 +0200
+Subject: [PATCH] add --with-external-libcrypt build option display an error
+ message if some algo not available in external libcrypt
+
+---
+ ext/standard/config.m4 | 21 ++++++++++++++++-----
+ 1 file changed, 16 insertions(+), 5 deletions(-)
+
+diff --git a/ext/standard/config.m4 b/ext/standard/config.m4
+index 58b9c5e658a4..3ec18be4d7df 100644
+--- a/ext/standard/config.m4
++++ b/ext/standard/config.m4
+@@ -267,14 +267,25 @@ int main() {
+ ])])
+
+
++PHP_ARG_WITH([external-libcrypt],
++ [for external libcrypt or libxcrypt],
++ [AS_HELP_STRING([--with-external-libcrypt],
++ [Use external libcrypt or libxcrypt])],
++ [no],
++ [no])
++
+ dnl
+ dnl If one of them is missing, use our own implementation, portable code is then possible
+ dnl
+-dnl TODO This is currently always enabled
+-if test "$ac_cv_crypt_blowfish" = "no" || test "$ac_cv_crypt_des" = "no" || test "$ac_cv_crypt_ext_des" = "no" || test "$ac_cv_crypt_md5" = "no" || test "$ac_cv_crypt_sha512" = "no" || test "$ac_cv_crypt_sha256" = "no" || test "$ac_cv_func_crypt_r" != "yes" || true; then
+- AC_DEFINE_UNQUOTED(PHP_USE_PHP_CRYPT_R, 1, [Whether PHP has to use its own crypt_r for blowfish, des, ext des and md5])
+-
+- PHP_ADD_SOURCES(PHP_EXT_DIR(standard), crypt_freesec.c crypt_blowfish.c crypt_sha512.c crypt_sha256.c php_crypt_r.c)
++dnl This is currently enabled by default
++if test "$ac_cv_crypt_blowfish" = "no" || test "$ac_cv_crypt_des" = "no" || test "$ac_cv_crypt_ext_des" = "no" || test "$ac_cv_crypt_md5" = "no" || test "$ac_cv_crypt_sha512" = "no" || test "$ac_cv_crypt_sha256" = "no" || test "$ac_cv_func_crypt_r" != "yes" || test "$PHP_EXTERNAL_LIBCRYPT" = "no"; then
++ if test "$PHP_EXTERNAL_LIBCRYPT" = "no"; then
++ AC_DEFINE_UNQUOTED(PHP_USE_PHP_CRYPT_R, 1, [Whether PHP has to use its own crypt_r for blowfish, des, ext des and md5])
++
++ PHP_ADD_SOURCES(PHP_EXT_DIR(standard), crypt_freesec.c crypt_blowfish.c crypt_sha512.c crypt_sha256.c php_crypt_r.c)
++ else
++ AC_MSG_ERROR([Cannot use external libcrypt as some algo are missing])
++ fi
+ else
+ AC_DEFINE_UNQUOTED(PHP_USE_PHP_CRYPT_R, 0, [Whether PHP has to use its own crypt_r for blowfish, des and ext des])
+ fi
diff --git a/php.spec b/php.spec
index 80ae758..a54adae 100644
--- a/php.spec
+++ b/php.spec
@@ -68,7 +68,7 @@
Summary: PHP scripting language for creating dynamic web sites
Name: php
Version: %{upver}%{?rcver:~%{rcver}}
-Release: 1%{?dist}
+Release: 2%{?dist}
# All files licensed under PHP version 3.01, except
# Zend is licensed under Zend
# TSRM is licensed under BSD
@@ -125,6 +125,8 @@ Patch48: php-8.0.10-snmp-sha.patch
Patch49: php-8.0.10-phar-sha.patch
# compatibility with OpenSSL 3.0, from 8.1
Patch50: php-8.0.10-openssl3.patch
+# use system libxcrypt
+Patch51: php-8.0.12-crypt.patch
# Upstream fixes (100+)
@@ -152,6 +154,7 @@ BuildRequires: pkgconfig(zlib) >= 1.2.0.4
BuildRequires: smtpdaemon
BuildRequires: pkgconfig(libedit)
BuildRequires: pkgconfig(libpcre2-8) >= 10.30
+BuildRequires: pkgconfig(libxcrypt)
BuildRequires: bzip2
BuildRequires: perl-interpreter
BuildRequires: autoconf
@@ -725,6 +728,7 @@ in pure PHP.
%patch49 -p1 -b .pharsha
%patch50 -p1 -b .openssl3
rm ext/openssl/tests/p12_with_extra_certs.p12
+%patch51 -p1 -b .libxcrypt
# upstream patches
@@ -882,6 +886,7 @@ ln -sf ../configure
--with-openssl \
--with-system-ciphers \
--with-external-pcre \
+ --with-external-libcrypt \
%ifarch s390 s390x sparc64 sparcv9 riscv64
--without-pcre-jit \
%endif
@@ -1538,6 +1543,9 @@ systemctl try-restart php-fpm.service >/dev/null 2>&1 || :
%changelog
+* Mon Oct 18 2021 Remi Collet <remi@remirepo.net> - 8.0.12~RC1-2
+- build using system libxcrypt
+
* Wed Oct 6 2021 Remi Collet <remi@remirepo.net> - 8.0.12~RC1-1
- update to 8.0.12RC1
reply other threads:[~2026-11-27 7:31 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=179576469980.1.15329795134676403113.rpms-php-7113f618aa54@fedoraproject.org \
--to=remi@fedoraproject.org \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox