1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
|
%global apiver 20190902
%global zendver 20190902
%global pdover 20170320
%global fileinfover 1.0.5
%global oci8ver 2.2.0
%global zipver 1.13.0
%global _hardened_build 1
%global embed_version 7.4
%global mysql_sock %(mysql_config --socket 2>/dev/null || echo /var/lib/mysql/mysql.sock)
%global oraclever 21.14
%global oraclelib 21.1
%ifarch aarch64
%global oraclever 19.22
%global oraclelib 19.1
%endif
%undefine _strict_symbol_defs_build
%{!?runselftest: %global runselftest 1}
%{!?_httpd_apxs: %{expand: %%global _httpd_apxs %%{_sbindir}/apxs}}
%{!?_httpd_mmn: %{expand: %%global _httpd_mmn %%(cat %{_includedir}/httpd/.mmn 2>/dev/null || echo 0-0)}}
%{!?_httpd_confdir: %{expand: %%global _httpd_confdir %%{_sysconfdir}/httpd/conf.d}}
# /etc/httpd/conf.d with httpd < 2.4 and defined as /etc/httpd/conf.modules.d with httpd >= 2.4
%{!?_httpd_modconfdir: %{expand: %%global _httpd_modconfdir %%{_sysconfdir}/httpd/conf.d}}
%{!?_httpd_moddir: %{expand: %%global _httpd_moddir %%{_libdir}/httpd/modules}}
%{!?_httpd_contentdir: %{expand: %%global _httpd_contentdir /var/www}}
%global with_argon2 1
%global with_dtrace 1
%global with_libgd 1
%global with_zip 0
%global with_libzip 1
%global with_zts 0
%global with_firebird 0
%global with_imap 0
%global with_freetds 0
%global with_sodium 1
%global with_pspell 0
%global with_lmdb 0
%global with_oci8 1
%global upver 7.4.33
Name: php
Version: %{upver}
Release: 1.4
Summary: PHP scripting language for creating dynamic web sites
License: PHP and Zend and BSD and MIT and ASL 1.0 and NCSA LGPL-2.1+ and Apache-2.0 and Artistic-1.0-Perl
URL: http://www.php.net/
Source0: http://www.php.net/distributions/php-%{upver}%{?rcver}.tar.xz
Source1: php.conf
Source2: php.ini
Source3: macros.php
Source4: php-fpm.conf
Source5: php-fpm-www.conf
Source6: php-fpm.service
Source7: php-fpm.logrotate
Source9: php.modconf
Source10: php.ztsmodconf
Source11: php.conf2
Source12: php-fpm.wants
Source13: nginx-fpm.conf
Source14: nginx-php.conf
# Configuration files for some extensions
Source50: 10-opcache.ini
Source51: opcache-default.blacklist
Source52: 20-oci8.ini
Source53: 20-ffi.ini
# Build fixes
Patch1: php-7.4.0-httpd.patch
Patch5: php-7.2.0-includedir.patch
Patch6: php-7.4.0-embed.patch
Patch8: php-7.2.0-libdb.patch
Patch9: php-7.0.7-curl.patch
# Functional changes
Patch42: php-7.3.3-systzdata-v19.patch
# See http://bugs.php.net/53436
Patch43: php-7.4.0-phpize.patch
# Use -lldap_r for OpenLDAP
Patch45: php-7.4.0-ldap_r.patch
# Ignore unsupported "threads" option on password_hash
Patch46: php-7.4.20-argon2.patch
# drop "Configure command" from phpinfo output
# and add build system and provider (from 8.0)
Patch47: php-7.4.8-phpinfo.patch
# fix snmp build without DES (from 8.0)
Patch48: php-7.4.26-snmp.patch
# compatibility with OpenSSL 3.0, from 8.1
Patch50: php-7.4.26-openssl3.patch
# RC Patch
Patch91: php-7.2.0-oci8conf.patch
# Upstream fixes (100+)
# Security fixes (200+)
Patch200: php-bug81740.patch
Patch201: php-bug81744.patch
Patch202: php-bug81746.patch
Patch203: php-cve-2023-0662.patch
Patch204: php-cve-2023-3247.patch
Patch205: php-cve-2023-3823.patch
Patch206: php-cve-2023-3824.patch
Patch207: php-cve-2024-2756.patch
Patch208: php-cve-2024-3096.patch
Patch209: php-cve-2024-5458.patch
# Fixes for tests (300+)
# Factory is droped from system tzdata
Patch300: php-7.0.10-datetests.patch
BuildRequires: bzip2
BuildRequires: perl
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: make
BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: libtool
BuildRequires: libtool-ltdl-devel
BuildRequires: procps
BuildRequires: openssl-devel >= 1.0.2
BuildRequires: pkgconfig(sqlite3) >= 3.7.4
BuildRequires: pkgconfig(zlib) >= 1.2.0.4
BuildRequires: smtpdaemon
BuildRequires: pkgconfig(libedit)
BuildRequires: pkgconfig(libpcre2-8) >= 10.30
BuildRequires: pkgconfig(libxcrypt)
BuildRequires: bzip2-devel
BuildRequires: pkgconfig(libcurl) >= 7.15.5
BuildRequires: httpd-devel >= 2.0.46-1
BuildRequires: pam-devel
BuildRequires: httpd-filesystem
BuildRequires: nginx-filesystem
%if %{with_libzip}
BuildRequires: libzip-devel >= 0.11
%endif
%if %{with_dtrace}
BuildRequires: systemtap-sdt-devel
%endif
%if %{with_argon2}
BuildRequires: libargon2-devel
%endif
%if %{with_zts}
Provides: php-zts = %{version}-%{release}, php-zts%{?_isa} = %{version}-%{release}
%endif
Requires: httpd-mmn = %{_httpd_mmn}, php-common%{?_isa} = %{version}-%{release}, php-cli%{?_isa} = %{version}-%{release}
Provides: mod_php = %{version}-%{release}, php(httpd)
Recommends: %{name}-help = %{version}-%{release}
%description
PHP is an HTML-embedded scripting language. PHP attempts to make it
easy for developers to write dynamically generated web pages. PHP also
offers built-in database integration for several commercial and
non-commercial database management systems, so writing a
database-enabled webpage with PHP is fairly simple. The most common
use of PHP coding is probably as a replacement for CGI scripts.
The php package contains the module (often referred to as mod_php)
which adds support for the PHP language to Apache HTTP Server.
%package cli
Summary: Command-line interface for PHP
License: PHP and Zend and BSD and MIT and ASL 1.0 and NCSA and PostgreSQL
Requires: php-common%{?_isa} = %{version}-%{release}
Provides: php-cgi = %{version}-%{release}, php-cgi%{?_isa} = %{version}-%{release}, php-pcntl, php-pcntl%{?_isa}
Provides: php-readline, php-readline%{?_isa}
%description cli
The php-cli package contains the command-line interface
executing PHP scripts, /usr/bin/php, and the CGI interface.
%package dbg
Summary: The interactive PHP debugger
Requires: php-common%{?_isa} = %{version}-%{release}
%description dbg
The php-dbg package contains the interactive PHP debugger.
%package fpm
Summary: PHP FastCGI Process Manager
BuildRequires: libacl-devel
Requires: php-common%{?_isa} = %{version}-%{release}
BuildRequires: systemd-devel
%{?systemd_requires}
Requires(pre): httpd-filesystem
Requires: httpd-filesystem >= 2.4.10, nginx-filesystem
Provides: php(httpd)
%description fpm
PHP-FPM (FastCGI Process Manager) is an alternative PHP FastCGI
implementation with some additional features useful for sites of
any size, especially busier sites.
%package common
Summary: Common files for PHP
License: PHP and BSD
Provides: php(api) = %{apiver}-%{__isa_bits}, php(zend-abi) = %{zendver}-%{__isa_bits}
Provides: php(language) = %{version}, php(language)%{?_isa} = %{version}, php-bz2, php-bz2%{?_isa}
Provides: php-calendar, php-calendar%{?_isa}, php-core = %{version}, php-core%{?_isa} = %{version}
Provides: php-ctype, php-ctype%{?_isa}, php-curl, php-curl%{?_isa}, php-date, php-date%{?_isa}
Provides: bundled(timelib), php-exif, php-exif%{?_isa}, php-fileinfo, php-fileinfo%{?_isa}, bundled(libmagic) = 5.29
Provides: php-filter, php-filter%{?_isa}, php-ftp, php-ftp%{?_isa}, php-gettext, php-gettext%{?_isa}
Provides: php-hash, php-hash%{?_isa}, php-mhash = %{version}, php-mhash%{?_isa} = %{version}, php-zlib, php-zlib%{?_isa}
Provides: php-iconv, php-iconv%{?_isa}, php-libxml, php-libxml%{?_isa}, php-openssl, php-openssl%{?_isa}
Provides: php-phar, php-phar%{?_isa}, php-pcre, php-pcre%{?_isa}, php-reflection, php-reflection%{?_isa}
Provides: php-session, php-session%{?_isa}, php-sockets, php-sockets%{?_isa}, php-spl, php-spl%{?_isa}
Provides: php-standard = %{version}, php-standard%{?_isa} = %{version}, php-tokenizer, php-tokenizer%{?_isa}
%if %{with_zip}
Provides: php-zip, php-zip%{?_isa}
Obsoletes: php-pecl-zip < 1.11
%endif
%description common
The php-common package contains files used by both the php
package and the php-cli package.
%package devel
Summary: Files needed for building PHP extensions
Requires: php-cli%{?_isa} = %{version}-%{release}, autoconf, automake, gcc, gcc-c++, libtool, pcre-devel%{?_isa}
Obsoletes: php-pecl-json-devel < %{version}, php-pecl-jsonc-devel < %{version}
%if %{with_zts}
Provides: php-zts-devel = %{version}-%{release}, php-zts-devel%{?_isa} = %{version}-%{release}
%endif
%description devel
The php-devel package contains the files needed for building PHP
extensions. If you need to compile your own PHP extensions, you will
need to install this package.
%package opcache
Summary: The Zend OPcache
License: PHP
Requires: php-common%{?_isa} = %{version}-%{release}
Provides: php-pecl-zendopcache = %{version}, php-pecl-zendopcache%{?_isa} = %{version}, php-pecl(opcache) = %{version}
Provides: php-pecl(opcache)%{?_isa} = %{version}
%description opcache
The Zend OPcache provides faster PHP execution through opcode caching and
optimization. It improves PHP performance by storing precompiled script
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
bytecode optimization patterns that make code execution faster.
%if %{with_imap}
%package imap
Summary: A module for PHP applications that use IMAP
License: PHP
Requires: php-common%{?_isa} = %{version}-%{release}
BuildRequires: krb5-devel, openssl-devel, libc-client-devel
%description imap
The php-imap module will add IMAP (Internet Message Access Protocol)
support to PHP. IMAP is a protocol for retrieving and uploading e-mail
messages on mail servers. PHP is an HTML-embedded scripting language.
%endif
%package ldap
Summary: A module for PHP applications that use LDAP
License: PHP
Requires: php-common%{?_isa} = %{version}-%{release}
BuildRequires: cyrus-sasl-devel, openldap-devel, openssl-devel
%description ldap
The php-ldap adds Lightweight Directory Access Protocol (LDAP)
support to PHP. LDAP is a set of protocols for accessing directory
services over the Internet. PHP is an HTML-embedded scripting
language.
%package pdo
Summary: A database access abstraction module for PHP applications
License: PHP
Requires: php-common%{?_isa} = %{version}-%{release}
Provides: php-pdo-abi = %{pdover}-%{__isa_bits}, php(pdo-abi) = %{pdover}-%{__isa_bits}, php-sqlite3, php-sqlite3%{?_isa}
Provides: php-pdo_sqlite, php-pdo_sqlite%{?_isa}
%description pdo
The php-pdo package contains a dynamic shared object that will add
a database access abstraction layer to PHP. This module provides
a common interface for accessing MySQL, PostgreSQL or other
databases.
%package mysqlnd
Summary: A module for PHP applications that use MySQL databases
License: PHP
Requires: php-pdo%{?_isa} = %{version}-%{release}
Provides: php_database, php-mysqli = %{version}-%{release}, php-mysqli%{?_isa} = %{version}-%{release},php-pdo_mysql
Provides: php-pdo_mysql%{?_isa}
%description mysqlnd
The php-mysqlnd package contains a dynamic shared object that will add
MySQL database support to PHP. MySQL is an object-relational database
management system. PHP is an HTML-embeddable scripting language. If
you need MySQL support for PHP applications, you will need to install
this package and the php package.
This package use the MySQL Native Driver
%package pgsql
Summary: A PostgreSQL database module for PHP
License: PHP
Requires: php-pdo%{?_isa} = %{version}-%{release}
Provides: php_database, php-pdo_pgsql, php-pdo_pgsql%{?_isa}
BuildRequires: krb5-devel, openssl-devel, postgresql-devel
%description pgsql
The php-pgsql package add PostgreSQL database support to PHP.
PostgreSQL is an object-relational database management
system that supports almost all SQL constructs. PHP is an
HTML-embedded scripting language. If you need back-end support for
PostgreSQL, you should install this package in addition to the main
php package.
%package process
Summary: Modules for PHP script using system process interfaces
License: PHP
Requires: php-common%{?_isa} = %{version}-%{release}
Provides: php-posix, php-posix%{?_isa}, php-shmop, php-shmop%{?_isa}, php-sysvsem, php-sysvsem%{?_isa}
Provides: php-sysvshm, php-sysvshm%{?_isa}, php-sysvmsg, php-sysvmsg%{?_isa}
%description process
The php-process package contains dynamic shared objects which add
support to PHP using system interfaces for inter-process
communication.
%package odbc
Summary: A module for PHP applications that use ODBC databases
License: PHP
Requires: php-pdo%{?_isa} = %{version}-%{release}
Provides: php_database, php-pdo_odbc, php-pdo_odbc%{?_isa}
BuildRequires: unixODBC-devel
%description odbc
The php-odbc package contains a dynamic shared object that will add
database support through ODBC to PHP. ODBC is an open specification
which provides a consistent API for developers to use for accessing
data sources (which are often, but not always, databases). PHP is an
HTML-embeddable scripting language. If you need ODBC support for PHP
applications, you will need to install this package and the php
package.
%package soap
Summary: A module for PHP applications that use the SOAP protocol
License: PHP
Requires: php-common%{?_isa} = %{version}-%{release}
BuildRequires: libxml2-devel
%description soap
The php-soap package contains a dynamic shared object that will add
support to PHP for using the SOAP web services protocol.
%if %{with_firebird}
%package interbase
Summary: A module for PHP applications that use Interbase/Firebird databases
License: PHP
BuildRequires: firebird-devel
Requires: php-pdo%{?_isa} = %{version}-%{release}
Provides: php_database, php-firebird, php-firebird%{?_isa}, php-pdo_firebird, php-pdo_firebird%{?_isa}
%description interbase
The php-interbase package contains a dynamic shared object that will add
database support through Interbase/Firebird to PHP.
InterBase is the name of the closed-source variant of this RDBMS that was
developed by Borland/Inprise.
Firebird is a commercially independent project of C and C++ programmers,
technical advisors and supporters developing and enhancing a multi-platform
relational database management system based on the source code released by
Inprise Corp (now known as Borland Software Corp) under the InterBase Public
License.
%endif
%if %{with_oci8}
%package oci8
Summary: A module for PHP applications that use OCI8 databases
Group: Development/Languages
# All files licensed under PHP version 3.01
License: PHP
BuildRequires: oracle-instantclient-devel >= %{oraclever}
Requires: php-pdo%{?_isa} = %{version}-%{release}
Provides: php_database
Provides: php-pdo_oci
Provides: php-pdo_oci%{?_isa}
Obsoletes: php-pecl-oci8 <= %{oci8ver}
Conflicts: php-pecl-oci8 > %{oci8ver}
Provides: php-pecl(oci8) = %{oci8ver}
Provides: php-pecl(oci8)%{?_isa} = %{oci8ver}
# Should requires libclntsh.so.18.3, but it's not provided by Oracle RPM.
AutoReq: 0
%description oci8
The php-oci8 packages provides the OCI8 extension version %{oci8ver}
and the PDO driver to access Oracle Database.
The extension is linked with Oracle client libraries %{oraclever}
(Oracle Instant Client). For details, see Oracle's note
"Oracle Client / Server Interoperability Support" (ID 207303.1).
You must install libclntsh.so.%{oraclelib} to use this package, provided
in the database installation, or in the free Oracle Instant Client
available from Oracle.
Notice:
- php-oci8 provides oci8 and pdo_oci extensions from php sources.
- php-pecl-oci8 only provides oci8 extension.
Documentation is at http://php.net/oci8 and http://php.net/pdo_oci
%endif
%package snmp
Summary: A module for PHP applications that query SNMP-managed devices
License: PHP
Requires: php-common%{?_isa} = %{version}-%{release}, net-snmp
BuildRequires: net-snmp-devel
%description snmp
The php-snmp package contains a dynamic shared object that will add
support for querying SNMP devices to PHP. PHP is an HTML-embeddable
scripting language. If you need SNMP support for PHP applications, you
will need to install this package and the php package.
%package xml
Summary: A module for PHP applications which use XML
License: PHP
Requires: php-common%{?_isa} = %{version}-%{release}
Provides: php-dom, php-dom%{?_isa}, php-domxml, php-domxml%{?_isa}, php-simplexml, php-simplexml%{?_isa}
Provides: php-xmlreader, php-xmlreader%{?_isa}, php-xmlwriter, php-xmlwriter%{?_isa}
Provides: php-xsl, php-xsl%{?_isa}
BuildRequires: libxslt-devel >= 1.0.18-1, libxml2-devel >= 2.4.14-1
%description xml
The php-xml package contains dynamic shared objects which add support
to PHP for manipulating XML documents using the DOM tree,
and performing XSL transformations on XML documents.
%package xmlrpc
Summary: A module for PHP applications which use the XML-RPC protocol
License: PHP and BSD
Requires: php-xml%{?_isa} = %{version}-%{release}
%description xmlrpc
The php-xmlrpc package contains a dynamic shared object that will add
support for the XML-RPC protocol to PHP.
%package mbstring
Summary: A module for PHP applications which need multi-byte string handling
License: PHP and LGPLv2 and OpenLDAP
BuildRequires: oniguruma-devel
Provides: bundled(libmbfl) = 1.3.2
Requires: php-common%{?_isa} = %{version}-%{release}
%description mbstring
The php-mbstring package contains a dynamic shared object that will add
support for multi-byte string handling to PHP.
%package gd
Summary: A module for PHP applications for using the gd graphics library
%if %{with_libgd}
License: PHP
%else
License: PHP and BSD
%endif
Requires: php-common%{?_isa} = %{version}-%{release}
%if %{with_libgd}
BuildRequires: gd-devel >= 2.1.0
%else
BuildRequires: libjpeg-devel, libpng-devel, freetype-devel, libXpm-devel, libwebp-devel
Provides: bundled(gd) = 2.0.35
%endif
%description gd
The php-gd package contains a dynamic shared object that will add
support for using the gd graphics library to PHP.
%package bcmath
Summary: A module for PHP applications for using the bcmath library
License: PHP and LGPLv2+
Requires: php-common%{?_isa} = %{version}-%{release}
%description bcmath
The php-bcmath package contains a dynamic shared object that will add
support for using the bcmath library to PHP.
%package gmp
Summary: A module for PHP applications for using the GNU MP library
License: PHP
BuildRequires: gmp-devel
Requires: php-common%{?_isa} = %{version}-%{release}
%description gmp
These functions allow you to work with arbitrary-length integers
using the GNU MP library.
%package dba
Summary: A database abstraction layer module for PHP applications
License: PHP
BuildRequires: libdb-devel, tokyocabinet-devel
%if %{with_lmdb}
BuildRequires: lmdb-devel
%endif
Requires: php-common%{?_isa} = %{version}-%{release}
%description dba
The php-dba package contains a dynamic shared object that will add
support for using the DBA database abstraction layer to PHP.
%package tidy
Summary: Standard PHP module provides tidy library support
License: PHP
Requires: php-common%{?_isa} = %{version}-%{release}
BuildRequires: libtidy-devel
%description tidy
The php-tidy package contains a dynamic shared object that will add
support for using the tidy library to PHP.
%if %{with_freetds}
%package pdo-dblib
Summary: PDO driver Microsoft SQL Server and Sybase databases
License: PHP
Requires: php-pdo%{?_isa} = %{version}-%{release}
BuildRequires: freetds-devel
Provides: php-pdo_dblib, php-pdo_dblib%{?_isa}
%description pdo-dblib
The php-pdo-dblib package contains a dynamic shared object
that implements the PHP Data Objects (PDO) interface to enable access from
PHP to Microsoft SQL Server and Sybase databases through the FreeTDS libary.
%endif
%package embedded
Summary: PHP library for embedding in applications
Requires: php-common%{?_isa} = %{version}-%{release}
Provides: php-embedded-devel = %{version}-%{release}, php-embedded-devel%{?_isa} = %{version}-%{release}
%description embedded
The php-embedded package contains a library which can be embedded
into applications to provide PHP scripting language support.
%if %{with_pspell}
%package pspell
Summary: A module for PHP applications for using pspell interfaces
License: PHP
Requires: php-common%{?_isa} = %{version}-%{release}
BuildRequires: aspell-devel >= 0.50.0
%description pspell
The php-pspell package contains a dynamic shared object that will add
support for using the pspell library to PHP.
%endif
%package intl
Summary: Internationalization extension for PHP applications
License: PHP
Requires: php-common%{?_isa} = %{version}-%{release}
BuildRequires: libicu-devel >= 4.0
%description intl
The php-intl package contains a dynamic shared object that will add
support for using the ICU library to PHP.
%package enchant
Summary: Enchant spelling extension for PHP applications
License: PHP
Requires: php-common%{?_isa} = %{version}-%{release}
BuildRequires: enchant-devel >= 1.2.4
%description enchant
The php-enchant package contains a dynamic shared object that will add
support for using the enchant library to PHP.
%package json
Summary: JavaScript Object Notation extension for PHP
License: PHP
Requires: php-common%{?_isa} = %{version}-%{release}
Obsoletes: php-pecl-json < %{version}
Obsoletes: php-pecl-jsonc < %{version}
Provides: php-pecl(json) = %{version}, php-pecl(json)%{?_isa} = %{version}, php-pecl-json = %{version}
Provides: php-pecl-json%{?_isa} = %{version}
%description json
The php-json package provides an extension that will add
support for JavaScript Object Notation (JSON) to PHP.
%if %{with_sodium}
%package sodium
Summary: Wrapper for the Sodium cryptographic library
License: PHP
BuildRequires: pkgconfig(libsodium) >= 1.0.9
Requires: php-common%{?_isa} = %{version}-%{release}
Obsoletes: php-pecl-libsodium2 < 3
Provides: php-pecl(libsodium) = %{version}, php-pecl(libsodium)%{?_isa} = %{version}
%description sodium
The php-sodium package provides a simple,
low-level PHP extension for the libsodium cryptographic library.
%endif
%package help
Summary: help
%description help
help
%prep
%autosetup -n php-%{upver}%{?rcver} -p1
cp Zend/LICENSE ZEND_LICENSE
cp TSRM/LICENSE TSRM_LICENSE
cp sapi/fpm/LICENSE fpm_LICENSE
cp ext/mbstring/libmbfl/LICENSE libmbfl_LICENSE
cp ext/fileinfo/libmagic/LICENSE libmagic_LICENSE
cp ext/bcmath/libbcmath/LICENSE libbcmath_LICENSE
cp ext/date/lib/LICENSE.rst timelib_LICENSE
mkdir build-cgi build-apache build-embedded \
%if %{with_zts}
build-zts build-ztscli \
%endif
build-fpm
rm ext/date/tests/timezone_location_get.phpt
rm ext/date/tests/timezone_version_get.phpt
rm ext/date/tests/timezone_version_get_basic1.phpt
rm ext/sockets/tests/mcast_ipv?_recv.phpt
rm Zend/tests/bug54268.phpt
rm Zend/tests/bug68412.phpt
pver=$(sed -n '/#define PHP_VERSION /{s/.* "//;s/".*$//;p}' main/php_version.h)
if test "x${pver}" != "x%{upver}%{?rcver}"; then
: Error: Upstream PHP version is now ${pver}, expecting %{upver}%{?rcver}.
: Update the version/rcver macros and rebuild.
exit 1
fi
vapi=`sed -n '/#define PHP_API_VERSION/{s/.* //;p}' main/php.h`
if test "x${vapi}" != "x%{apiver}"; then
: Error: Upstream API version is now ${vapi}, expecting %{apiver}.
: Update the apiver macro and rebuild.
exit 1
fi
vzend=`sed -n '/#define ZEND_MODULE_API_NO/{s/^[^0-9]*//;p;}' Zend/zend_modules.h`
if test "x${vzend}" != "x%{zendver}"; then
: Error: Upstream Zend ABI version is now ${vzend}, expecting %{zendver}.
: Update the zendver macro and rebuild.
exit 1
fi
vpdo=`sed -n '/#define PDO_DRIVER_API/{s/.*[ ]//;p}' ext/pdo/php_pdo_driver.h`
if test "x${vpdo}" != "x%{pdover}"; then
: Error: Upstream PDO ABI version is now ${vpdo}, expecting %{pdover}.
: Update the pdover macro and rebuild.
exit 1
fi
# Check for some extension version
ver=$(sed -n '/#define PHP_OCI8_VERSION /{s/.* "//;s/".*$//;p}' ext/oci8/php_oci8.h)
if test "$ver" != "%{oci8ver}"; then
: Error: Upstream OCI8 version is now ${ver}, expecting %{oci8ver}.
: Update the oci8ver macro and rebuild.
exit 1
fi
%if %{with_zip}
ver=$(sed -n '/#define PHP_ZIP_VERSION /{s/.* "//;s/".*$//;p}' ext/zip/php_zip.h)
if test "$ver" != "%{zipver}"; then
: Error: Upstream ZIP version is now ${ver}, expecting %{zipver}.
: Update the %{zipver} macro and rebuild.
exit 1
fi
%endif
rm -f TSRM/tsrm_win32.h TSRM/tsrm_config.w32.h Zend/zend_config.w32.h ext/mysqlnd/config-win.h \
ext/standard/winver.h main/win32_internal_function_disabled.h main/win95nt.h
find . -name \*.[ch] -exec chmod 644 {} \;
chmod 644 README.*
cp %{SOURCE50} 10-opcache.ini
%ifarch x86_64
sed -e '/opcache.huge_code_pages/s/0/1/' -i 10-opcache.ini
%endif
%build
export SOURCE_DATE_EPOCH=$(date +%s -r NEWS)
cat `aclocal --print-ac-dir`/{libtool,ltoptions,ltsugar,ltversion,lt~obsolete}.m4 >>aclocal.m4
libtoolize --force --copy
cat `aclocal --print-ac-dir`/{libtool,ltoptions,ltsugar,ltversion,lt~obsolete}.m4 >build/libtool.m4
touch configure.ac
./buildconf --force
CFLAGS=$(echo $RPM_OPT_FLAGS -fno-strict-aliasing -Wno-pointer-sign | sed 's/-mstackrealign//')
export CFLAGS
EXTENSION_DIR=%{_libdir}/php/modules; export EXTENSION_DIR
PEAR_INSTALLDIR=%{_datadir}/pear; export PEAR_INSTALLDIR
build() {
mkdir Zend && cp ../Zend/zend_{language,ini}_{parser,scanner}.[ch] Zend
ln -sf ../configure
%configure \
--cache-file=../config.cache --with-libdir=%{_lib} --with-config-file-path=%{_sysconfdir} \
--with-config-file-scan-dir=%{_sysconfdir}/php.d --disable-debug --with-pic --disable-rpath \
--without-pear --with-freetype-dir=%{_prefix} --with-png-dir=%{_prefix} \
--with-xpm-dir=%{_prefix} --without-gdbm --with-jpeg-dir=%{_prefix} --with-openssl --with-system-ciphers \
--with-pcre-regex=%{_prefix} --with-zlib --with-layout=GNU --with-kerberos --with-libxml-dir=%{_prefix} \
--with-system-tzdata --with-mhash \
%if %{with_argon2}
--with-password-argon2 \
%endif
%if %{with_dtrace}
--enable-dtrace \
%endif
$*
if test $? != 0; then
tail -500 config.log
: configure failed
exit 1
fi
make %{?_smp_mflags}
}
pushd build-cgi
build --libdir=%{_libdir}/php --enable-pcntl --enable-opcache --enable-opcache-file --enable-phpdbg \
%if %{with_imap}
--with-imap=shared --with-imap-ssl \
%endif
--enable-mbstring=shared --with-onig=%{_prefix} --enable-mbregex \
%if %{with_libgd}
--enable-gd=shared --with-external-gd \
%else
--enable-gd=shared --with-webp --with-jpeg --with-xpm --with-freetype \
%endif
--with-gmp=shared --enable-calendar=shared --enable-bcmath=shared --with-bz2=shared --enable-ctype=shared \
--enable-dba=shared --with-db4=%{_prefix} --with-tcadb=%{_prefix} \
%if %{with_lmdb}
--with-lmdb=%{_prefix} \
%endif
--enable-exif=shared --enable-ftp=shared --with-gettext=shared --with-iconv=shared --enable-sockets=shared \
--enable-tokenizer=shared --with-xmlrpc=shared --with-ldap=shared --with-ldap-sasl --enable-mysqlnd=shared \
--with-mysqli=shared,mysqlnd --with-mysql-sock=%{mysql_sock} \
%if %{with_oci8}
%ifarch x86_64 aarch64
--with-oci8=shared,instantclient,%{_libdir}/oracle/%{oraclever}/client64/lib,%{oraclever} \
--with-pdo-oci=shared,instantclient,%{_libdir}/oracle/%{oraclever}/client64/lib,%{oraclever} \
%endif
%endif
%if %{with_firebird}
--with-interbase=shared --with-pdo-firebird=shared \
%endif
--enable-dom=shared --with-pgsql=shared --enable-simplexml=shared --enable-xml=shared \
--with-snmp=shared,%{_prefix} --enable-soap=shared --with-xsl=shared,%{_prefix} --enable-xmlreader=shared \
--enable-xmlwriter=shared --with-curl=shared,%{_prefix} --enable-pdo=shared \
--with-pdo-odbc=shared,unixODBC,%{_prefix} --with-pdo-mysql=shared,mysqlnd --with-pdo-pgsql=shared,%{_prefix} \
--with-pdo-sqlite=shared,%{_prefix} \
%if %{with_freetds}
--with-pdo-dblib=shared,%{_prefix} \
%endif
--with-sqlite3=shared,%{_prefix} --enable-json=shared \
%if %{with_zip}
--enable-zip=shared \
%if %{with_libzip}
--with-libzip \
%endif
%endif
--without-readline --with-libedit \
%if %{with_pspell}
--with-pspell=shared \
%endif
--enable-phar=shared --with-tidy=shared,%{_prefix} --enable-sysvmsg=shared --enable-sysvshm=shared \
--enable-sysvsem=shared --enable-shmop=shared --enable-posix=shared --with-unixODBC=shared,%{_prefix} \
--enable-fileinfo=shared \
%if %{with_sodium}
--with-sodium=shared \
%else
--without-sodium \
%endif
--enable-intl=shared --with-icu-dir=%{_prefix} --with-enchant=shared,%{_prefix}
popd
without_shared="--without-gd --disable-dom --disable-dba --without-unixODBC --disable-opcache --disable-json \
--disable-xmlreader --disable-xmlwriter --without-sodium --without-sqlite3 --disable-phar --disable-fileinfo \
--without-pspell --without-curl --disable-posix --disable-xml --disable-simplexml --disable-exif \
--without-gettext --without-iconv --disable-ftp --without-bz2 --disable-ctype --disable-shmop --disable-sockets \
--disable-tokenizer --disable-sysvmsg --disable-sysvshm --disable-sysvsem"
pushd build-apache
build --with-apxs2=%{_httpd_apxs} --libdir=%{_libdir}/php --without-mysqli --disable-pdo \
${without_shared}
popd
pushd build-fpm
build --enable-fpm --with-fpm-acl --with-fpm-systemd --libdir=%{_libdir}/php --without-mysqli --disable-pdo \
${without_shared}
popd
pushd build-embedded
build --enable-embed --without-mysqli --disable-pdo \
${without_shared}
popd
%if %{with_zts}
pushd build-ztscli
EXTENSION_DIR=%{_libdir}/php-zts/modules
build --includedir=%{_includedir}/php-zts --libdir=%{_libdir}/php-zts --enable-maintainer-zts --program-prefix=zts- \
--disable-cgi --with-config-file-scan-dir=%{_sysconfdir}/php-zts.d --enable-pcntl --enable-opcache \
--enable-opcache-file \
%if %{with_imap}
--with-imap=shared --with-imap-ssl \
%endif
--enable-mbstring=shared --with-onig=%{_prefix} --enable-mbregex \
%if %{with_libgd}
--enable-gd=shared --with-external-gd \
%else
--enable-gd=shared --with-webp --with-jpeg --with-xpm --with-freetype \
%endif
--with-gmp=shared --enable-calendar=shared --enable-bcmath=shared --with-bz2=shared --enable-ctype=shared \
--enable-dba=shared --with-db4=%{_prefix} --with-tcadb=%{_prefix} \
%if %{with_lmdb}
--with-lmdb=%{_prefix} \
%endif
--with-gettext=shared --with-iconv=shared --enable-sockets=shared --enable-tokenizer=shared --enable-exif=shared \
--enable-ftp=shared --with-xmlrpc=shared --with-ldap=shared --with-ldap-sasl --enable-mysqlnd=shared \
--with-mysqli=shared,mysqlnd --with-mysql-sock=%{mysql_sock} --enable-mysqlnd-threading \
%if %{with_oci8}
%ifarch x86_64 aarch64
--with-oci8=shared,instantclient,%{_libdir}/oracle/%{oraclever}/client64/lib,%{oraclever} \
--with-pdo-oci=shared,instantclient,%{_libdir}/oracle/%{oraclever}/client64/lib,%{oraclever} \
%endif
%endif
%if %{with_firebird}
--with-interbase=shared --with-pdo-firebird=shared \
%endif
--enable-dom=shared --with-pgsql=shared --enable-simplexml=shared --enable-xml=shared \
--with-snmp=shared,%{_prefix} --enable-soap=shared --with-xsl=shared,%{_prefix} --enable-xmlreader=shared \
--enable-xmlwriter=shared --with-curl=shared,%{_prefix} --enable-pdo=shared \
--with-pdo-odbc=shared,unixODBC,%{_prefix} --with-pdo-mysql=shared,mysqlnd --with-pdo-pgsql=shared,%{_prefix} \
--with-pdo-sqlite=shared,%{_prefix} \
%if %{with_freetds}
--with-pdo-dblib=shared,%{_prefix} \
%endif
--with-sqlite3=shared,%{_prefix} --enable-json=shared \
%if %{with_zip}
--enable-zip=shared \
%if %{with_libzip}
--with-libzip \
%endif
%endif
--without-readline --with-libedit \
%if %{with_pspell}
--with-pspell=shared \
%endif
--enable-phar=shared --with-tidy=shared,%{_prefix} --enable-sysvmsg=shared --enable-sysvshm=shared \
--enable-sysvsem=shared --enable-shmop=shared --enable-posix=shared --with-unixODBC=shared,%{_prefix} \
--enable-fileinfo=shared \
%if %{with_sodium}
--with-sodium=shared \
%else
--without-sodium \
%endif
--enable-intl=shared --with-icu-dir=%{_prefix} --with-enchant=shared,%{_prefix}
popd
pushd build-zts
build --with-apxs2=%{_httpd_apxs} --includedir=%{_includedir}/php-zts --libdir=%{_libdir}/php-zts \
--enable-maintainer-zts --with-config-file-scan-dir=%{_sysconfdir}/php-zts.d --without-mysqli --disable-pdo \
${without_shared}
popd
%endif
%check
%if %runselftest
cd build-apache
export NO_INTERACTION=1 REPORT_EXIT_STATUS=1 MALLOC_CHECK_=2
export SKIP_ONLINE_TESTS=1
export SKIP_IO_CAPTURE_TESTS=1
unset TZ LANG LC_ALL
if ! make test; then
set +x
for f in $(find .. -name \*.diff -type f -print); do
if ! grep -q XFAIL "${f/.diff/.phpt}"
then
echo "TEST FAILURE: $f --"
cat "$f"
echo -e "\n-- $f result ends."
fi
done
set -x
#exit 1
fi
unset NO_INTERACTION REPORT_EXIT_STATUS MALLOC_CHECK_
%endif
%install
%if %{with_zts}
make -C build-ztscli install \
INSTALL_ROOT=$RPM_BUILD_ROOT
%endif
make -C build-embedded install-sapi install-headers \
INSTALL_ROOT=$RPM_BUILD_ROOT
make -C build-fpm install-fpm \
INSTALL_ROOT=$RPM_BUILD_ROOT
make -C build-cgi install \
INSTALL_ROOT=$RPM_BUILD_ROOT
install -m 755 -d $RPM_BUILD_ROOT%{_sysconfdir}/
install -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/php.ini
install -m 755 -d $RPM_BUILD_ROOT%{_datadir}/php/prload
install -m 755 -d $RPM_BUILD_ROOT%{_httpd_moddir}
install -m 755 build-apache/libs/libphp7.so $RPM_BUILD_ROOT%{_httpd_moddir}
%if %{with_zts}
install -m 755 build-zts/libs/libphp7.so $RPM_BUILD_ROOT%{_httpd_moddir}/libphp7-zts.so
%endif
install -D -m 644 %{SOURCE9} $RPM_BUILD_ROOT%{_httpd_modconfdir}/15-php.conf
%if %{with_zts}
cat %{SOURCE10} >>$RPM_BUILD_ROOT%{_httpd_modconfdir}/15-php.conf
%endif
install -D -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_httpd_confdir}/php.conf
install -m 755 -d $RPM_BUILD_ROOT%{_sysconfdir}/php.d
%if %{with_zts}
install -m 755 -d $RPM_BUILD_ROOT%{_sysconfdir}/php-zts.d
%endif
install -m 755 -d $RPM_BUILD_ROOT%{_sharedstatedir}/php
install -m 755 -d $RPM_BUILD_ROOT%{_sharedstatedir}/php/peclxml
install -m 700 -d $RPM_BUILD_ROOT%{_sharedstatedir}/php/session
install -m 700 -d $RPM_BUILD_ROOT%{_sharedstatedir}/php/wsdlcache
install -m 700 -d $RPM_BUILD_ROOT%{_sharedstatedir}/php/opcache
install -m 755 -d $RPM_BUILD_ROOT%{_docdir}/pecl
install -m 755 -d $RPM_BUILD_ROOT%{_datadir}/tests/pecl
install -m 755 -d $RPM_BUILD_ROOT%{_localstatedir}/log/php-fpm
install -m 755 -d $RPM_BUILD_ROOT/run/php-fpm
install -m 755 -d $RPM_BUILD_ROOT%{_sysconfdir}/php-fpm.d
install -m 644 %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/php-fpm.conf
install -m 644 %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/php-fpm.d/www.conf
mv $RPM_BUILD_ROOT%{_sysconfdir}/php-fpm.conf.default .
mv $RPM_BUILD_ROOT%{_sysconfdir}/php-fpm.d/www.conf.default .
install -m 755 -d $RPM_BUILD_ROOT%{_sysconfdir}/systemd/system/php-fpm.service.d
install -Dm 644 %{SOURCE6} $RPM_BUILD_ROOT%{_unitdir}/php-fpm.service
install -Dm 644 %{SOURCE12} $RPM_BUILD_ROOT%{_unitdir}/httpd.service.d/php-fpm.conf
install -Dm 644 %{SOURCE12} $RPM_BUILD_ROOT%{_unitdir}/nginx.service.d/php-fpm.conf
install -m 755 -d $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d
install -m 644 %{SOURCE7} $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/php-fpm
install -D -m 644 %{SOURCE13} $RPM_BUILD_ROOT%{_sysconfdir}/nginx/conf.d/php-fpm.conf
install -D -m 644 %{SOURCE14} $RPM_BUILD_ROOT%{_sysconfdir}/nginx/default.d/php.conf
for mod in pgsql odbc ldap snmp xmlrpc \
%if %{with_imap}
imap \
%endif
json \
mysqlnd mysqli pdo_mysql \
mbstring gd dom xsl soap bcmath dba xmlreader xmlwriter \
simplexml bz2 calendar ctype exif ftp gettext gmp iconv \
sockets tokenizer opcache \
pdo pdo_pgsql pdo_odbc pdo_sqlite \
%if %{with_oci8}
oci8 pdo_oci \
%endif
%if %{with_zip}
zip \
%endif
%if %{with_firebird}
interbase pdo_firebird \
%endif
sqlite3 \
enchant phar fileinfo intl \
tidy \
%if %{with_freetds}
pdo_dblib \
%endif
%if %{with_pspell}
pspell \
%endif
curl \
%if %{with_sodium}
sodium \
%endif
posix shmop sysvshm sysvsem sysvmsg xml \
; do
case $mod in
opcache)
ini=10-${mod}.ini;;
pdo_*|mysqli|xmlreader|xmlrpc)
ini=30-${mod}.ini;;
*)
ini=20-${mod}.ini;;
esac
if [ -f ${ini} ]; then
cp -p ${ini} $RPM_BUILD_ROOT%{_sysconfdir}/php.d/${ini}
%if %{with_zts}
cp -p ${ini} $RPM_BUILD_ROOT%{_sysconfdir}/php-zts.d/${ini}
%endif
else
cat > $RPM_BUILD_ROOT%{_sysconfdir}/php.d/${ini} <<EOF
; Enable ${mod} extension module
extension=${mod}
EOF
%if %{with_zts}
cat > $RPM_BUILD_ROOT%{_sysconfdir}/php-zts.d/${ini} <<EOF
; Enable ${mod} extension module
extension=${mod}
EOF
%endif
fi
cat > files.${mod} <<EOF
%{_libdir}/php/modules/${mod}.so
%config(noreplace) %{_sysconfdir}/php.d/${ini}
%if %{with_zts}
%{_libdir}/php-zts/modules/${mod}.so
%config(noreplace) %{_sysconfdir}/php-zts.d/${ini}
%endif
EOF
done
cat files.dom files.xsl files.xml{reader,writer} \
files.simplexml >> files.xml
cat files.mysqli \
files.pdo_mysql \
>> files.mysqlnd
cat files.pdo_pgsql >> files.pgsql
cat files.pdo_odbc >> files.odbc
%if %{with_oci8}
cat files.pdo_oci >> files.oci8
%endif
%if %{with_firebird}
cat files.pdo_firebird >> files.interbase
%endif
cat files.shmop files.sysv* files.posix > files.process
cat files.pdo_sqlite >> files.pdo
cat files.sqlite3 >> files.pdo
cat files.curl files.phar files.fileinfo \
files.exif files.gettext files.iconv files.calendar \
files.ftp files.bz2 files.ctype files.sockets \
files.tokenizer > files.common
%if %{with_zip}
cat files.zip >> files.common
%endif
install -m 644 %{SOURCE51} $RPM_BUILD_ROOT%{_sysconfdir}/php.d/opcache-default.blacklist
%if %{with_zts}
install -m 644 %{SOURCE51} $RPM_BUILD_ROOT%{_sysconfdir}/php-zts.d/opcache-default.blacklist
sed -e '/blacklist_filename/s/php.d/php-zts.d/' \
-i $RPM_BUILD_ROOT%{_sysconfdir}/php-zts.d/10-opcache.ini
%endif
sed -e "s/@PHP_APIVER@/%{apiver}-%{__isa_bits}/" \
-e "s/@PHP_ZENDVER@/%{zendver}-%{__isa_bits}/" \
-e "s/@PHP_PDOVER@/%{pdover}-%{__isa_bits}/" \
-e "s/@PHP_VERSION@/%{upver}/" \
%if ! %{with_zts}
-e "/zts/d" \
%endif
< %{SOURCE3} > macros.php
install -m 644 -D macros.php \
$RPM_BUILD_ROOT%{_rpmconfigdir}/macros.d/macros.php
rm -rf $RPM_BUILD_ROOT%{_libdir}/php/modules/*.a \
$RPM_BUILD_ROOT%{_libdir}/php-zts/modules/*.a \
$RPM_BUILD_ROOT%{_bindir}/{phptar} \
$RPM_BUILD_ROOT%{_datadir}/pear \
$RPM_BUILD_ROOT%{_libdir}/libphp7.la
rm -f README.{Zeus,QNX,CVS-RULES}
%post fpm
%systemd_post php-fpm.service
%preun fpm
%systemd_preun php-fpm.service
%transfiletriggerin fpm -- %{_sysconfdir}/php-fpm.d %{_sysconfdir}/php.d
systemctl try-restart php-fpm.service >/dev/null 2>&1 || :
%files
%{_httpd_moddir}/libphp7.so
%if %{with_zts}
%{_httpd_moddir}/libphp7-zts.so
%endif
%attr(0770,root,apache) %dir %{_sharedstatedir}/php/session
%attr(0770,root,apache) %dir %{_sharedstatedir}/php/wsdlcache
%attr(0770,root,apache) %dir %{_sharedstatedir}/php/opcache
%config(noreplace) %{_httpd_confdir}/php.conf
%config(noreplace) %{_httpd_modconfdir}/15-php.conf
%files common -f files.common
%license LICENSE TSRM_LICENSE ZEND_LICENSE
%license libmagic_LICENSE
%license timelib_LICENSE
%config(noreplace) %{_sysconfdir}/php.ini
%dir %{_sysconfdir}/php.d
%dir %{_libdir}/php
%dir %{_libdir}/php/modules
%if %{with_zts}
%dir %{_sysconfdir}/php-zts.d
%dir %{_libdir}/php-zts
%dir %{_libdir}/php-zts/modules
%endif
%dir %{_sharedstatedir}/php
%dir %{_sharedstatedir}/php/peclxml
%dir %{_datadir}/php
%dir %{_docdir}/pecl
%dir %{_datadir}/tests
%dir %{_datadir}/tests/pecl
%files cli
%{_bindir}/php
%if %{with_zts}
%{_bindir}/zts-php
%endif
%{_bindir}/php-cgi
%{_bindir}/phar.phar
%{_bindir}/phar
%{_bindir}/phpize
%files dbg
%{_bindir}/phpdbg
%if %{with_zts}
%{_bindir}/zts-phpdbg
%endif
%files fpm
%license fpm_LICENSE
%attr(0770,root,apache) %dir %{_sharedstatedir}/php/session
%attr(0770,root,apache) %dir %{_sharedstatedir}/php/wsdlcache
%attr(0770,root,apache) %dir %{_sharedstatedir}/php/opcache
%config(noreplace) %{_httpd_confdir}/php.conf
%config(noreplace) %{_sysconfdir}/php-fpm.conf
%config(noreplace) %{_sysconfdir}/php-fpm.d/www.conf
%config(noreplace) %{_sysconfdir}/logrotate.d/php-fpm
%config(noreplace) %{_sysconfdir}/nginx/conf.d/php-fpm.conf
%config(noreplace) %{_sysconfdir}/nginx/default.d/php.conf
%{_unitdir}/php-fpm.service
%{_unitdir}/httpd.service.d/php-fpm.conf
%{_unitdir}/nginx.service.d/php-fpm.conf
%{_sbindir}/php-fpm
%dir %{_sysconfdir}/systemd/system/php-fpm.service.d
%dir %{_sysconfdir}/php-fpm.d
%attr(770,apache,root) %dir %{_localstatedir}/log/php-fpm
%dir %ghost /run/php-fpm
%dir %{_datadir}/fpm
%{_datadir}/fpm/status.html
%files devel
%{_bindir}/php-config
%{_includedir}/php
%{_libdir}/php/build
%if %{with_zts}
%{_bindir}/zts-php-config
%{_bindir}/zts-phpize
%{_includedir}/php-zts
%{_libdir}/php-zts/build
%endif
%{_rpmconfigdir}/macros.d/macros.php
%files embedded
%{_libdir}/libphp7.so
%{_libdir}/libphp7-%{embed_version}.so
%files pgsql -f files.pgsql
%files odbc -f files.odbc
%if %{with_imap}
%files imap -f files.imap
%endif
%files ldap -f files.ldap
%files snmp -f files.snmp
%files xml -f files.xml
%files xmlrpc -f files.xmlrpc
%files mbstring -f files.mbstring
%license libmbfl_LICENSE
%files gd -f files.gd
%if ! %{with_libgd}
%license libgd_README
%license libgd_COPYING
%endif
%files soap -f files.soap
%files bcmath -f files.bcmath
%files gmp -f files.gmp
%files dba -f files.dba
%files pdo -f files.pdo
%files tidy -f files.tidy
%if %{with_freetds}
%files pdo-dblib -f files.pdo_dblib
%endif
%if %{with_pspell}
%files pspell -f files.pspell
%endif
%files intl -f files.intl
%files process -f files.process
%if %{with_firebird}
%files interbase -f files.interbase
%endif
%files enchant -f files.enchant
%files mysqlnd -f files.mysqlnd
%files opcache -f files.opcache
%config(noreplace) %{_sysconfdir}/php.d/opcache-default.blacklist
%if %{with_zts}
%config(noreplace) %{_sysconfdir}/php-zts.d/opcache-default.blacklist
%endif
%if %{with_oci8}
%files oci8 -f files.oci8
%endif
%files json -f files.json
%if %{with_sodium}
%files sodium -f files.sodium
%endif
%files help
%doc EXTENSIONS NEWS README* sapi/phpdbg/{README.md,CREDITS}
%doc php-fpm.conf.default www.conf.default php.ini-*
%{_mandir}/*
%changelog
* Fri Jun 07 2024 Funda Wang <fundawang@yeah.net> - 7.4.33-1.4
- Fix filter bypass in filter_var FILTER_VALIDATE_URL
CVE-2024-5458
* Thu Apr 11 2024 Funda Wang <fundawang@yeah.net> - 7.4.33-1.2
- Fix __Host-/__Secure- cookie bypass due to partial CVE-2022-31629 fix
CVE-2024-2756
- Fix password_verify can erroneously return true opening ATO risk
CVE-2024-3096
* Fri Aug 18 2023 Funda Wang <fundawang@yeah.net> - 7.4.33-1
- New version 7.4.33
* Sun Dec 11 2022 Funda Wang <fundawang@yeah.net> - 7.2.34-2
- Fix php BUG#81738 / CVE-2022-37454
* Thu Oct 6 2022 Funda Wang <fundawang@yeah.net> - 7.2.34-1
- New version 7.2.34
- Sync with remi's patches
* Sat Jun 18 2022 Hugel <gengqihu1@h-partners.com> - 7.2.10-20
- Fix CVE-2022-31625 CVE-2022-31626
* Mon Feb 28 2022 wangchen <wangchen137@h-partners.com> - 7.2.10-19
- Fix CVE-2019-11038 CVE-2019-11039 CVE-2019-11040
* Wed Feb 23 2022 panxiaohe <panxh.life@foxmail.com> - 7.2.10-18
- Fix CVE-2020-7067
* Thu Dec 2 2021 fuanan <fuanan3@huawei.com> - 7.2.10-17
- Fix CVE-2021-21707
* Thu Nov 4 2021 panxiaohe <panxiaohe@huawei.com> - 7.2.10-16
- Fix CVE-2021-21703
* Tue Oct 12 2021 wangchen <wangchen137@huawei.com> - 7.2.10-15
- Fix CVE-2021-21704
* Wed Sep 29 2021 fuanan <fuanan3@huawei.com> - 7.2.10-14
- refix CVE-2020-7071 and fix CVE-2021-21705
* Wed Feb 3 2021 yangzhuangzhuang <yangzhuangzhuang1@huawei.com> - 7.2.10-13
- Fix CVE-2020-7069 CVE-2020-7070
* Tue Feb 2 2021 yangzhuangzhuang <yangzhuangzhuang1@huawei.com> - 7.2.10-12
- Fix CVE-2020-7060
* Wed Jan 20 2021 Hugel <gengqihu1@huawei.com> - 7.2.10-11
- Fix CVE-2020-7062 CVE-2020-7071
* Fri Jan 15 2021 panxiaohe <panxiaohe@huawei.com> - 7.2.10-10
- Fix CVE-2020-7059
* Wed Dec 16 2020 zhanghua <zhanghua40@huawei.com> - 7.2.10-9
- fix CVE-2020-7063
* Sat Nov 07 2020 liuweibo <liuweibo10@huawei.com> - 7.2.10-8
- Append help recommends to main package
* Mon Sep 21 2020 shaoqiang kang <kangshqoaing1@huawei.com> - 7.2.10-7
- Fix CVE-2020-7068
* Tue Jul 21 2020 wangyue <wangyue92@huawei.com> - 7.2.10-6
- Type:cves
- ID:CVE-2019-11048
- SUG:restart
- DESC:fix CVE-2019-11048
* Mon May 18 2020 wangchen <wangchen137@huawei.com> - 7.2.10-5
- rebuild for php
* Fri Apr 24 2020 openEuler Buildteam <buildteam@openeuler.org> - 7.2.10-4
- Type:cves
- ID:CVE-2020-7064 CVE-2020-7066
- SUG:restart
- DESC:fix CVE-2020-7064 CVE-2020-7066
* Mon Mar 16 2020 shijian <shijian16@huawei.com> - 7.2.10-3
- Type:cves
- ID:CVE-2018-19518 CVE-2019-6977
- SUG:restart
- DESC:fix CVE-2018-19518 CVE-2019-6977
* Thu Mar 12 2020 openEuler Buildteam <buildteam@openeuler.org> - 7.2.10-2
- Add CVE patches
* Fri Feb 14 2020 openEuler Buildteam <buildteam@openeuler.org> - 7.2.10-1
- Package init
|