disable interbase, imap, pdo_dblib and mcrypt on rhel

This commit is contained in:
Remi Collet 2018-01-29 14:01:25 +01:00
parent 4468832b27
commit b4a14d59cc

View File

@ -40,25 +40,20 @@
# needed at srpm build time, when httpd-devel not yet installed # needed at srpm build time, when httpd-devel not yet installed
%{!?_httpd_mmn: %{expand: %%global _httpd_mmn %%(cat %{_includedir}/httpd/.mmn 2>/dev/null || echo 0-0)}} %{!?_httpd_mmn: %{expand: %%global _httpd_mmn %%(cat %{_includedir}/httpd/.mmn 2>/dev/null || echo 0-0)}}
%global with_dtrace 1 %global with_dtrace 1
%global with_libgd 1
# build with system libgd %global with_zip 0
%if 0%{?fedora} < 20 %global with_libzip 0
%global with_libgd 0 %if 0%{?fedora}
%else
%global with_libgd 1
%endif
%global with_zip 0
%global with_libzip 0
# Not yet compatible with firebird 3
# https://bugs.php.net/bug.php?id=73512
%global with_firebird 1 %global with_firebird 1
%global with_imap 1
%if 0%{?fedora} < 18 && 0%{?rhel} < 7 %global with_freetds 1
%global db_devel db4-devel %global with_mcrypt 1
%else %else
%global db_devel libdb-devel %global with_firebird 0
%global with_imap 0
%global with_freetds 0
%global with_mcrypt 0
%endif %endif
%global upver 7.1.14 %global upver 7.1.14
@ -67,7 +62,7 @@
Summary: PHP scripting language for creating dynamic web sites Summary: PHP scripting language for creating dynamic web sites
Name: php Name: php
Version: %{upver}%{?rcver:~%{rcver}} Version: %{upver}%{?rcver:~%{rcver}}
Release: 1%{?dist} Release: 2%{?dist}
# All files licensed under PHP version 3.01, except # All files licensed under PHP version 3.01, except
# Zend is licensed under Zend # Zend is licensed under Zend
# TSRM is licensed under BSD # TSRM is licensed under BSD
@ -197,12 +192,8 @@ Summary: PHP FastCGI Process Manager
BuildRequires: libacl-devel BuildRequires: libacl-devel
Requires: php-common%{?_isa} = %{version}-%{release} Requires: php-common%{?_isa} = %{version}-%{release}
Requires(pre): /usr/sbin/useradd Requires(pre): /usr/sbin/useradd
BuildRequires: systemd-units
BuildRequires: systemd-devel BuildRequires: systemd-devel
Requires: systemd-units %{?systemd_requires}
Requires(post): systemd-units
Requires(preun): systemd-units
Requires(postun): systemd-units
# To ensure correct /var/lib/php/session ownership: # To ensure correct /var/lib/php/session ownership:
Requires(pre): httpd-filesystem Requires(pre): httpd-filesystem
# For php.conf in /etc/httpd/conf.d # For php.conf in /etc/httpd/conf.d
@ -302,6 +293,7 @@ bytecode in the shared memory. This eliminates the stages of reading code from
the disk and compiling it on future access. In addition, it applies a few the disk and compiling it on future access. In addition, it applies a few
bytecode optimization patterns that make code execution faster. bytecode optimization patterns that make code execution faster.
%if %{with_imap}
%package imap %package imap
Summary: A module for PHP applications that use IMAP Summary: A module for PHP applications that use IMAP
Group: Development/Languages Group: Development/Languages
@ -314,6 +306,7 @@ BuildRequires: krb5-devel, openssl-devel, libc-client-devel
The php-imap module will add IMAP (Internet Message Access Protocol) The php-imap module will add IMAP (Internet Message Access Protocol)
support to PHP. IMAP is a protocol for retrieving and uploading e-mail support to PHP. IMAP is a protocol for retrieving and uploading e-mail
messages on mail servers. PHP is an HTML-embedded scripting language. messages on mail servers. PHP is an HTML-embedded scripting language.
%endif
%package ldap %package ldap
Summary: A module for PHP applications that use LDAP Summary: A module for PHP applications that use LDAP
@ -579,13 +572,14 @@ Summary: A database abstraction layer module for PHP applications
Group: Development/Languages Group: Development/Languages
# All files licensed under PHP version 3.01 # All files licensed under PHP version 3.01
License: PHP License: PHP
BuildRequires: %{db_devel}, tokyocabinet-devel BuildRequires: libdb-devel, tokyocabinet-devel
Requires: php-common%{?_isa} = %{version}-%{release} Requires: php-common%{?_isa} = %{version}-%{release}
%description dba %description dba
The php-dba package contains a dynamic shared object that will add The php-dba package contains a dynamic shared object that will add
support for using the DBA database abstraction layer to PHP. support for using the DBA database abstraction layer to PHP.
%if %{with_mcrypt}
%package mcrypt %package mcrypt
Summary: Standard PHP module provides mcrypt library support Summary: Standard PHP module provides mcrypt library support
Group: Development/Languages Group: Development/Languages
@ -597,6 +591,7 @@ BuildRequires: libmcrypt-devel
%description mcrypt %description mcrypt
The php-mcrypt package contains a dynamic shared object that will add The php-mcrypt package contains a dynamic shared object that will add
support for using the mcrypt library to PHP. support for using the mcrypt library to PHP.
%endif
%package tidy %package tidy
Summary: Standard PHP module provides tidy library support Summary: Standard PHP module provides tidy library support
@ -610,6 +605,7 @@ BuildRequires: libtidy-devel
The php-tidy package contains a dynamic shared object that will add The php-tidy package contains a dynamic shared object that will add
support for using the tidy library to PHP. support for using the tidy library to PHP.
%if %{with_freetds}
%package pdo-dblib %package pdo-dblib
Summary: PDO driver Microsoft SQL Server and Sybase databases Summary: PDO driver Microsoft SQL Server and Sybase databases
Group: Development/Languages Group: Development/Languages
@ -623,6 +619,7 @@ Provides: php-pdo_dblib, php-pdo_dblib%{?_isa}
The php-pdo-dblib package contains a dynamic shared object The php-pdo-dblib package contains a dynamic shared object
that implements the PHP Data Objects (PDO) interface to enable access from that implements the PHP Data Objects (PDO) interface to enable access from
PHP to Microsoft SQL Server and Sybase databases through the FreeTDS libary. PHP to Microsoft SQL Server and Sybase databases through the FreeTDS libary.
%endif
%package embedded %package embedded
Summary: PHP library for embedding in applications Summary: PHP library for embedding in applications
@ -914,7 +911,9 @@ build --libdir=%{_libdir}/php \
--enable-opcache \ --enable-opcache \
--enable-opcache-file \ --enable-opcache-file \
--enable-phpdbg \ --enable-phpdbg \
%if %{with_imap}
--with-imap=shared --with-imap-ssl \ --with-imap=shared --with-imap-ssl \
%endif
--enable-mbstring=shared \ --enable-mbstring=shared \
--enable-mbregex \ --enable-mbregex \
%if %{with_libgd} %if %{with_libgd}
@ -959,7 +958,9 @@ build --libdir=%{_libdir}/php \
--with-pdo-mysql=shared,mysqlnd \ --with-pdo-mysql=shared,mysqlnd \
--with-pdo-pgsql=shared,%{_prefix} \ --with-pdo-pgsql=shared,%{_prefix} \
--with-pdo-sqlite=shared,%{_prefix} \ --with-pdo-sqlite=shared,%{_prefix} \
%if %{with_freetds}
--with-pdo-dblib=shared,%{_prefix} \ --with-pdo-dblib=shared,%{_prefix} \
%endif
--with-sqlite3=shared,%{_prefix} \ --with-sqlite3=shared,%{_prefix} \
--enable-json=shared \ --enable-json=shared \
%if %{with_zip} %if %{with_zip}
@ -972,7 +973,9 @@ build --libdir=%{_libdir}/php \
--with-libedit \ --with-libedit \
--with-pspell=shared \ --with-pspell=shared \
--enable-phar=shared \ --enable-phar=shared \
%if %{with_mcrypt}
--with-mcrypt=shared,%{_prefix} \ --with-mcrypt=shared,%{_prefix} \
%endif
--with-tidy=shared,%{_prefix} \ --with-tidy=shared,%{_prefix} \
--enable-sysvmsg=shared --enable-sysvshm=shared --enable-sysvsem=shared \ --enable-sysvmsg=shared --enable-sysvshm=shared --enable-sysvsem=shared \
--enable-shmop=shared \ --enable-shmop=shared \
@ -1040,7 +1043,9 @@ build --includedir=%{_includedir}/php-zts \
--enable-pcntl \ --enable-pcntl \
--enable-opcache \ --enable-opcache \
--enable-opcache-file \ --enable-opcache-file \
%if %{with_imap}
--with-imap=shared --with-imap-ssl \ --with-imap=shared --with-imap-ssl \
%endif
--enable-mbstring=shared \ --enable-mbstring=shared \
--enable-mbregex \ --enable-mbregex \
%if %{with_libgd} %if %{with_libgd}
@ -1086,7 +1091,9 @@ build --includedir=%{_includedir}/php-zts \
--with-pdo-mysql=shared,mysqlnd \ --with-pdo-mysql=shared,mysqlnd \
--with-pdo-pgsql=shared,%{_prefix} \ --with-pdo-pgsql=shared,%{_prefix} \
--with-pdo-sqlite=shared,%{_prefix} \ --with-pdo-sqlite=shared,%{_prefix} \
%if %{with_freetds}
--with-pdo-dblib=shared,%{_prefix} \ --with-pdo-dblib=shared,%{_prefix} \
%endif
--with-sqlite3=shared,%{_prefix} \ --with-sqlite3=shared,%{_prefix} \
--enable-json=shared \ --enable-json=shared \
%if %{with_zip} %if %{with_zip}
@ -1099,7 +1106,9 @@ build --includedir=%{_includedir}/php-zts \
--with-libedit \ --with-libedit \
--with-pspell=shared \ --with-pspell=shared \
--enable-phar=shared \ --enable-phar=shared \
%if %{with_mcrypt}
--with-mcrypt=shared,%{_prefix} \ --with-mcrypt=shared,%{_prefix} \
%endif
--with-tidy=shared,%{_prefix} \ --with-tidy=shared,%{_prefix} \
--enable-sysvmsg=shared --enable-sysvshm=shared --enable-sysvsem=shared \ --enable-sysvmsg=shared --enable-sysvshm=shared --enable-sysvsem=shared \
--enable-shmop=shared \ --enable-shmop=shared \
@ -1237,7 +1246,11 @@ install -D -m 644 %{SOURCE13} $RPM_BUILD_ROOT%{_sysconfdir}/nginx/conf.d/php-fpm
install -D -m 644 %{SOURCE14} $RPM_BUILD_ROOT%{_sysconfdir}/nginx/default.d/php.conf install -D -m 644 %{SOURCE14} $RPM_BUILD_ROOT%{_sysconfdir}/nginx/default.d/php.conf
# Generate files lists and stub .ini files for each subpackage # Generate files lists and stub .ini files for each subpackage
for mod in pgsql odbc ldap snmp xmlrpc imap json \ for mod in pgsql odbc ldap snmp xmlrpc \
%if %{with_imap}
imap \
%endif
json \
mysqlnd mysqli pdo_mysql \ mysqlnd mysqli pdo_mysql \
mbstring gd dom xsl soap bcmath dba xmlreader xmlwriter \ mbstring gd dom xsl soap bcmath dba xmlreader xmlwriter \
simplexml bz2 calendar ctype exif ftp gettext gmp iconv \ simplexml bz2 calendar ctype exif ftp gettext gmp iconv \
@ -1251,7 +1264,14 @@ for mod in pgsql odbc ldap snmp xmlrpc imap json \
%endif %endif
sqlite3 \ sqlite3 \
enchant phar fileinfo intl \ enchant phar fileinfo intl \
mcrypt tidy pdo_dblib pspell curl wddx \ %if %{with_mcrypt}
mcrypt \
%endif
tidy \
%if %{with_freetds}
pdo_dblib \
%endif
pspell curl wddx \
posix shmop sysvshm sysvsem sysvmsg recode xml \ posix shmop sysvshm sysvsem sysvmsg recode xml \
; do ; do
case $mod in case $mod in
@ -1474,7 +1494,9 @@ rm -f README.{Zeus,QNX,CVS-RULES}
%files pgsql -f files.pgsql %files pgsql -f files.pgsql
%files odbc -f files.odbc %files odbc -f files.odbc
%if %{with_imap}
%files imap -f files.imap %files imap -f files.imap
%endif
%files ldap -f files.ldap %files ldap -f files.ldap
%files snmp -f files.snmp %files snmp -f files.snmp
%files xml -f files.xml %files xml -f files.xml
@ -1494,9 +1516,13 @@ rm -f README.{Zeus,QNX,CVS-RULES}
%files gmp -f files.gmp %files gmp -f files.gmp
%files dba -f files.dba %files dba -f files.dba
%files pdo -f files.pdo %files pdo -f files.pdo
%if %{with_mcrypt}
%files mcrypt -f files.mcrypt %files mcrypt -f files.mcrypt
%endif
%files tidy -f files.tidy %files tidy -f files.tidy
%if %{with_freetds}
%files pdo-dblib -f files.pdo_dblib %files pdo-dblib -f files.pdo_dblib
%endif
%files pspell -f files.pspell %files pspell -f files.pspell
%files intl -f files.intl %files intl -f files.intl
%files process -f files.process %files process -f files.process
@ -1513,6 +1539,9 @@ rm -f README.{Zeus,QNX,CVS-RULES}
%changelog %changelog
* Mon Jan 29 2018 Remi Collet <rcollet@redhat.com> - 7.1.14~RC1-2
- disable interbase, imap, pdo_dblib and mcrypt on rhel
* Wed Jan 17 2018 Remi Collet <remi@remirepo.net> - 7.1.14~RC1-1 * Wed Jan 17 2018 Remi Collet <remi@remirepo.net> - 7.1.14~RC1-1
- Update to 7.1.14RC1 - Update to 7.1.14RC1
- define SOURCE_DATE_EPOCH for reproducible build - define SOURCE_DATE_EPOCH for reproducible build