/[packages]/updates/8/apache/current/SPECS/apache.spec
ViewVC logotype

Contents of /updates/8/apache/current/SPECS/apache.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1790986 - (show annotations) (download)
Mon Mar 14 14:14:57 2022 UTC (2 years, 1 month ago) by kekepower
File size: 36024 byte(s)
- Update to version 2.4.53 to fix several security issues (mga#30170)

1 %define _disable_ld_no_undefined 1
2 # (luigiwalser, ngompa): httpd build hates parallelization
3 %define _smp_ncpus_max 8
4
5 %define contentdir %{_datadir}/httpd
6 %define confdir %{_sysconfdir}/httpd/conf
7 %define docroot /var/www
8 %define suexec_caller apache
9 %define vstring Mageia
10
11 %{?!maxmodules:%global maxmodules 128}
12 %{?!serverlimit:%global serverlimit 1024}
13
14 Summary: The most widely used Web server on the Internet
15 Name: apache
16 Version: 2.4.53
17 Release: %mkrel 1
18 Group: System/Servers
19 License: ASL 2.0
20 URL: http://httpd.apache.org
21 Source0: http://www.apache.org/dist/httpd/httpd-%{version}.tar.bz2
22 Source1: http://www.apache.org/dist/httpd/httpd-%{version}.tar.bz2.asc
23 Source9: htcacheclean.service
24 Source10: htcacheclean.sysconfig
25 Source14: httpd.tmpfiles
26 Source15: httpd.service
27 Source16: httpd.sysconfig
28
29 Source20: httpd.conf
30
31 Source30: base.conf
32 Source31: mpm.conf
33 Source32: mod_lua.conf
34 Source33: mod_cgi.conf
35 Source34: mod_dav.conf
36 Source35: mod_proxy.conf
37 Source36: mod_proxy_html.conf
38 Source37: mod_ssl.conf
39 Source38: mod_ldap.conf
40 Source39: mod_cache.conf
41 Source40: mod_dbd.conf
42 Source41: mod_suexec.conf
43 Source42: mod_userdir.conf
44 Source43: mod_systemd.conf
45 Source44: mod_session.conf
46 Source45: mod_http2.conf
47 Source46: mod_brotli.conf
48
49 Source50: httpd-security.conf
50 Source51: httpd-ssl.conf
51
52 Source60: default_vhosts.conf
53 Source61: default_ssl_vhost.conf
54
55 # build/scripts patches
56 Patch1: httpd-2.4.1-apctl.patch
57 Patch2: httpd-2.4.9-apxs.patch
58 Patch3: httpd-2.4.1-deplibs.patch
59 Patch5: httpd-2.4.3-layout.patch
60 Patch6: httpd-2.4.3-apctl-systemd.patch
61 Patch7: httpd-2.4.10-detect-systemd.patch
62 # Features/functional changes
63 Patch20: httpd-2.4.3-release.patch
64 Patch23: httpd-2.4.4-export.patch
65 Patch24: httpd-2.4.1-corelimit.patch
66 #Patch26: httpd-2.4.4-r1337344+.patch
67 Patch27: httpd-2.4.2-icons.patch
68 Patch28: httpd-2.4.4-r1332643+.patch
69 # http://marc.info/?l=apache-httpd-dev&m=134867223818085&w=2
70 Patch29: httpd-2.4.27-systemd.patch
71 Patch30: httpd-2.4.4-cachehardmax.patch
72 Patch31: httpd-2.4.18-sslmultiproxy.patch
73 Patch34: httpd-2.4.17-socket-activation.patch
74 #Patch35: httpd-2.4.17-sslciphdefault.patch
75 # Bug fixes
76 # http://issues.apache.org/bugzilla/show_bug.cgi?id=32524
77 Patch100: httpd-2.4.25-ab_source_address.patch
78 Patch101: httpd-2.2.10-ldap_auth_now_modular_in-apr-util-dbd-ldap_fix.diff
79
80 Provides: webserver
81 Provides: apache-mod_actions = %{version}
82 Provides: apache-mod_alias = %{version}
83 Provides: apache-mod_asis = %{version}
84 Provides: apache-mod_auth_basic = %{version}
85 Provides: apache-mod_auth_digest = %{version}
86 Provides: apache-mod_authn_anon = %{version}
87 Provides: apache-mod_authn_dbm = %{version}
88 Provides: apache-mod_authn_default = %{version}
89 Provides: apache-mod_authn_file = %{version}
90 Provides: apache-mod_authz_dbm = %{version}
91 Provides: apache-mod_authz_default = %{version}
92 Provides: apache-mod_authz_groupfile = %{version}
93 Provides: apache-mod_authz_host = %{version}
94 Provides: apache-mod_authz_owner = %{version}
95 Provides: apache-mod_authz_user = %{version}
96 Provides: apache-mod_autoindex = %{version}
97 Provides: apache-mod_bucketeer = %{version}
98 Provides: apache-mod_case_filter = %{version}
99 Provides: apache-mod_case_filter_in = %{version}
100 Provides: apache-mod_cern_meta = %{version}
101 Provides: apache-mod_cgi = %{version}
102 Provides: apache-mod_cgid = %{version}
103 Provides: apache-mod_charset_lite = %{version}
104 Provides: apache-mod_deflate = %{version}
105 Provides: apache-mod_dir = %{version}
106 Provides: apache-mod_dumpio = %{version}
107 Provides: apache-mod_echo = %{version}
108 Provides: apache-mod_env = %{version}
109 Provides: apache-mod_example = %{version}
110 Provides: apache-mod_expires = %{version}
111 Provides: apache-mod_ext_filter = %{version}
112 Provides: apache-mod_filter = %{version}
113 Provides: apache-mod_headers = %{version}
114 Provides: apache-mod_ident = %{version}
115 Provides: apache-mod_imagemap = %{version}
116 Provides: apache-mod_include = %{version}
117 Provides: apache-mod_info = %{version}
118 Provides: apache-mod_log_config = %{version}
119 Provides: apache-mod_log_forensic = %{version}
120 Provides: apache-mod_logio = %{version}
121 Provides: apache-mod_mime_magic = %{version}
122 Provides: apache-mod_mime = %{version}
123 Provides: apache-mod_negotiation = %{version}
124 Provides: apache-mod_optional_fn_export = %{version}
125 Provides: apache-mod_optional_fn_import = %{version}
126 Provides: apache-mod_optional_hook_export = %{version}
127 Provides: apache-mod_optional_hook_import = %{version}
128 Provides: apache-mod_rewrite = %{version}
129 Provides: apache-mod_setenvif = %{version}
130 Provides: apache-mod_speling = %{version}
131 Provides: apache-mod_status = %{version}
132 Provides: apache-mod_unique_id = %{version}
133 Provides: apache-mod_usertrack = %{version}
134 Provides: apache-mod_version = %{version}
135 Provides: apache-mod_vhost_alias = %{version}
136 Provides: apache-mod_systemd = %{version}
137
138 Obsoletes: apache-base < 2.4.44
139 Obsoletes: apache-modules < 2.4.44
140 Obsoletes: apache-conf < 2.4.44
141 Obsoletes: apache-mpm-event < 2.4.44
142 Obsoletes: apache-mpm-prefork < 2.4.44
143 Obsoletes: apache-mpm-peruser < 2.4.44
144 Obsoletes: apache-mpm-worker < 2.4.44
145 Obsoletes: apache-mpm-itk < 2.4.44
146
147 Requires(pre): webserver-base
148 Requires: webserver-base
149 # needed for /etc/mime.types file
150 Requires: mailcap
151
152 Requires(post): systemd >= %{systemd_required_version}
153 Requires(post): rpm-helper >= 0.24.8-1
154 Requires(preun): rpm-helper >= 0.24.8-1
155
156 BuildRequires: pkgconfig(apr-1) >= 1.5.0
157 BuildRequires: pkgconfig(apr-util-1) >= 1.4.1
158 BuildRequires: bison
159 BuildRequires: flex
160 BuildRequires: db5-devel
161 BuildRequires: pkgconfig(expat)
162 BuildRequires: gdbm-devel
163 BuildRequires: pkgconfig(libsasl2)
164 BuildRequires: libtool >= 1.4.2
165 BuildRequires: openldap-devel
166 BuildRequires: pkgconfig(jansson)
167 BuildRequires: pkgconfig(openssl)
168 BuildRequires: pkgconfig(libpcre)
169 BuildRequires: pkgconfig(zlib)
170 BuildRequires: pkgconfig(libcap)
171 BuildRequires: pkgconfig(lua)
172 BuildRequires: pkgconfig(systemd)
173 BuildRequires: libcurl-devel
174 BuildRequires: multiarch-utils >= 1.0.3
175 BuildRequires: pkgconfig(libnghttp2) >= 1.8.0
176 BuildRequires: pkgconfig(libbrotlienc)
177
178 %description
179 This package contains the main binary of apache, a powerful, full-featured,
180 efficient and freely-available Web server. Apache is also the most popular Web
181 server on the Internet.
182
183 This version of apache is fully modular, and many modules are available in
184 pre-compiled formats, like PHP and mod_auth_external.
185
186 The package was built to support a maximum of %{maxmodules} dynamically
187 loadable modules, and a ServerLimit of %{serverlimit}. You can change these
188 values at RPM build time by using for example:
189 --define 'maxmodules 512' --define 'serverlimit 2048'
190
191 %package mod_dav
192 Summary: Distributed Authoring and Versioning (WebDAV)
193 Group: System/Servers
194 # ensure initscript presence
195 Requires(post): apache
196 Requires(postun): apache
197 Requires: apache >= %{version}-%{release}
198 Provides: apache-mod_dav_fs = %{version}
199 Provides: apache-mod_dav_lock = %{version}
200
201 %description mod_dav
202 This module provides class 1 and class 2 WebDAV ('Web-based Distributed
203 Authoring and Versioning') functionality for Apache.
204
205 This extension to the HTTP protocol allows creating, moving, copying, and
206 deleting resources and collections on a remote web server.
207
208 %package mod_ldap
209 Summary: LDAP connection pooling and result caching DSO:s
210 Group: System/Servers
211 # ensure initscript presence
212 Requires(post): apache
213 Requires(postun): apache
214 Requires: apache >= %{version}-%{release}
215 Requires: apr-util-dbd-ldap
216 Provides: apache-mod_authnz_ldap = %{version}
217 Obsoletes: apache-mod_auth_ldap < 2.4.44
218
219 %description mod_ldap
220 This module was created to improve the performance of websites relying on
221 backend connections to LDAP servers. In addition to the functions provided by
222 the standard LDAP libraries, this module adds an LDAP connection pool and an
223 LDAP shared memory cache.
224
225 %package mod_session
226 Group: System/Servers
227 Summary: Session interface for the Apache HTTP Server
228 # ensure initscript presence
229 Requires(post): apache
230 Requires(postun): apache
231 Requires: apache >= %{version}-%{release}
232 Requires: apr-util-openssl
233
234 %description mod_session
235 The mod_session module and associated backends provide an abstract
236 interface for storing and accessing per-user session data.
237
238 %package mod_cache
239 Summary: Content cache keyed to URIs
240 Group: System/Servers
241 # ensure initscript presence
242 Requires(post): apache
243 Requires(postun): apache
244 Requires: apache >= %{version}-%{release}
245 Recommends: apache-htcacheclean = %{version}-%{release}
246
247 %description mod_cache
248 mod_cache implements an RFC 2616 compliant HTTP content caching filter, with
249 support for the caching of content negotiated responses containing the Vary
250 header.
251
252 mod_cache requires the services of one or more storage management modules. One
253 storage management module is included in the base Apache distribution:
254 * mod_cache_disk: implements a disk based storage manager
255
256 %package mod_proxy
257 Summary: HTTP/1.1 proxy/gateway server
258 Group: System/Servers
259 # ensure initscript presence
260 Requires(post): apache
261 Requires(postun): apache
262 Requires: apache >= %{version}-%{release}
263 Provides: apache-mod_proxy_balancer = %{version}
264 Provides: apache-mod_proxy_connect = %{version}
265 Provides: apache-mod_proxy_ftp = %{version}
266 Provides: apache-mod_proxy_http = %{version}
267 BuildRequires: pkgconfig(libxml-2.0)
268
269 %description mod_proxy
270 This module implements a proxy/gateway for Apache. It implements proxying
271 capability for FTP, CONNECT (for SSL), HTTP/0.9, HTTP/1.0, and HTTP/1.1. The
272 module can be configured to connect to other proxy modules for these and other
273 protocols.
274
275 %package mod_proxy_html
276 Summary: HTML and XML content filters for the Apache HTTP Server
277 Group: System/Servers
278 # ensure initscript presence
279 Requires(post): apache
280 Requires(postun): apache
281 Requires: apache >= %{version}-%{release}
282
283 %description mod_proxy_html
284 The mod_proxy_html and mod_xml2enc modules provide filters which can
285 transform and modify HTML and XML content.
286
287 %package mod_suexec
288 Summary: Allows CGI scripts to run as a specified user and Group
289 Group: System/Servers
290 # ensure initscript presence
291 Requires(post): apache
292 Requires(postun): apache
293 Requires: apache >= %{version}-%{release}
294
295 %description mod_suexec
296 This module, in combination with the suexec support program
297 allows CGI scripts to run as a specified user and Group.
298
299 Normally, when a CGI or SSI program executes, it runs as the
300 same user who is running the web server.
301
302 %package mod_userdir
303 Summary: User-specific directories
304 Group: System/Servers
305 # ensure initscript presence
306 Requires(post): apache
307 Requires(postun): apache
308 Requires: apache >= %{version}-%{release}
309
310 %description mod_userdir
311 This module allows user-specific directories to be accessed using the
312 http://example.com/~username/ syntax.
313
314 %package mod_ssl
315 Summary: Strong cryptography using the SSL and TLS protocols
316 Group: System/Servers
317 # ensure initscript presence
318 Requires(post): apache
319 Requires(postun): apache
320 Requires: apache >= %{version}-%{release}
321 Requires(post): openssl
322
323 %description mod_ssl
324 This module provides SSL v2/v3 and TLS v1 support for the Apache HTTP Server.
325 It was contributed by Ralf S. Engeschall based on his mod_ssl project and
326 originally derived from work by Ben Laurie.
327
328 This module relies on OpenSSL to provide the cryptography engine.
329
330 This module also have native SNI support, please look here for more
331 information:
332
333 * http://daniel-lange.com/plugin/tag/sni
334 * https://sni.velox.ch/
335
336 %package mod_dbd
337 Summary: Manages SQL database connections
338 Group: System/Servers
339 # ensure initscript presence
340 Requires(post): apache
341 Requires(postun): apache
342 Requires: apache >= %{version}-%{release}
343 Requires: apr-util-dbd-ldap
344 Recommends: apr-util-dbd-freetds
345 Recommends: apr-util-dbd-mysql
346 Recommends: apr-util-dbd-odbc
347 Recommends: apr-util-dbd-pgsql
348 Recommends: apr-util-dbd-sqlite3
349
350 %description mod_dbd
351 mod_dbd manages SQL database connections using apr_dbd. It provides database
352 connections on request to modules requiring SQL database functions, and takes
353 care of managing databases with optimal efficiency and scalability for both
354 threaded and non-threaded MPMs.
355
356 %package mod_http2
357 Summary: This module provides HTTP/2 (RFC 7540) support
358 Group: System/Servers
359 # ensure initscript presence
360 Requires(post): apache
361 Requires(postun): apache
362 Requires: apache >= %{version}-%{release}
363 Recommends: nghttp2 >= 1.8.0
364
365 %description mod_http2
366 This module provides HTTP/2 (RFC 7540) support for the Apache HTTP Server.
367
368 This module relies on libnghttp2 to provide the core http/2 engine.
369
370 %package mod_brotli
371 Summary: Google Brotli compression for apache
372 Group: System/Servers
373 # ensure initscript presence
374 Requires(post): apache
375 Requires(postun): apache
376 Requires: apache >= %{version}-%{release}
377 Provides: apache-mod_brotli = %{version}
378
379 %description mod_brotli
380 The mod_brotli module provides the BROTLI_COMPRESS output filter that allows output from your server to be compressed using the brotli compression format before being sent to the client over the network. This module uses the Brotli library found at https://github.com/google/brotli.
381
382
383 %package htcacheclean
384 Summary: Clean up the disk cache (for apache-mod_disk_cache)
385 Group: System/Servers
386 Requires(post): rpm-helper >= 0.24.8-1
387 Requires(preun): rpm-helper >= 0.24.8-1
388
389 %description htcacheclean
390 htcacheclean is used to keep the size of mod_cache_disk's storage within a
391 certain limit. This tool can run either manually or in daemon mode. When
392 running in daemon mode, it sleeps in the background and checks the cache
393 directories at regular intervals for cached content to be removed.
394
395 %package devel
396 Summary: Module development tools for the apache web server
397 Group: Development/C
398 Requires: apache = %{version}-%{release}
399 Requires: apr-devel >= 1:1.4.5
400 Requires: apr-util-devel >= 1.4.1
401 Requires: db-devel
402 Requires: expat-devel
403 Requires: gdbm-devel
404 Requires: libsasl-devel
405 Requires: openssl-devel
406 Requires: pcre-devel >= 5.0
407 Requires: zlib-devel
408 # (tv) because config_vars.mk contains "LDFLAGS = -lsystemd...":
409 Requires: pkgconfig(systemd)
410
411 %description devel
412 The apache-devel package contains the source code for the apache Web server and
413 the APXS binary you'll need to build Dynamic Shared Objects (DSOs) for apache.
414
415 If you are installing the apache Web server and you want to be able to compile
416 or develop additional modules for apache, you'll need to install this package.
417
418 %package doc
419 Summary: The apache Manual
420 Group: System/Servers
421 BuildArch: noarch
422
423 %description doc
424 This package contains the apache server documentation in HTML format.
425
426 Please view the documentation by starting the apache server and your
427 favorite web browser and point to this URL: http://localhost/manual
428
429 %prep
430 %setup -q -n httpd-%{version}
431 %patch1 -p1 -b .apctl
432 %patch2 -p1 -b .apxs
433 %patch3 -p1 -b .deplibs
434 %patch5 -p1 -b .patchlayout
435 %patch6 -p1 -b .apctlsystemd
436 %patch7 -p1 -b .detectsystemd
437
438 %patch23 -p1 -b .export
439 %patch24 -p1 -b .corelimit
440 #patch26 -p1 -b .r1337344+
441 %patch27 -p1 -b .icons
442 %patch29 -p1 -b .systemd
443 %patch30 -p1 -b .cachehardmax
444 # No longer applies
445 #patch31 -p1 -b .sslmultiproxy
446 %patch34 -p1 -b .socketactivation
447 #patch35 -p1 -b .sslciphdefault
448
449 %patch100 -p1 -b .ab_source_address.droplet
450 %patch101 -p0 -b .PR45994.droplet
451
452 # Patch in vendor/release string
453 sed "s/@RELEASE@/%{vstring}/" < %{PATCH20} | patch -p1
454
455 # forcibly prevent use of bundled apr, apr-util, pcre
456 rm -rf srclib/{apr,apr-util,pcre}
457
458 # fix apxs
459 perl -pi \
460 -e 's|\@exp_installbuilddir\@|%{_libdir}/httpd/build|;' \
461 -e 's|get_vars\("prefix"\)|"%{_libdir}/httpd/build"|;' \
462 -e 's|get_vars\("sbindir"\) . "/envvars"|"\$installbuilddir/envvars"|;' \
463 support/apxs.in
464
465 # correct perl paths
466 find -type f -print0 | xargs -0 perl -pi \
467 -e 's|/usr/local/bin/perl|perl|g;' \
468 -e 's|/usr/local/bin/perl5|perl|g;' \
469 -e 's|/path/to/bin/perl|perl|g;'
470
471 # bump max modules
472 perl -pi \
473 -e 's/DYNAMIC_MODULE_LIMIT \d+/DYNAMIC_MODULE_LIMIT %{maxmodules}/;' \
474 include/httpd.h
475
476 # bump server limit
477 perl -pi \
478 -e 's/DEFAULT_SERVER_LIMIT \d+/DEFAULT_SERVER_LIMIT %{serverlimit}/' \
479 server/mpm/prefork/prefork.c \
480 server/mpm/worker/worker.c \
481 server/mpm/event/event.c
482
483 # don't try to touch srclib
484 perl -pi -e "s|^SUBDIRS = .*|SUBDIRS = os server modules support|g" Makefile.in
485
486 # this will only work if configured correctly in the config (FullOs)...
487 cp server/core.c server/core.c.untagged
488
489 %build
490 %serverbuild
491
492 # regenerate configure scripts
493 autoheader && autoconf || exit 1
494
495 export CFLAGS=$RPM_OPT_FLAGS
496 ldflags_hacky_workaround_for_systemd_lib_not_added="-lsystemd "
497 export LDFLAGS="${ldflags_hacky_workaround_for_systemd_lib_not_added}-Wl,-z,relro,-z,now"
498
499 # Hard-code path to links to avoid unnecessary builddep
500 export LYNX_PATH=/usr/bin/links
501
502 %configure \
503 --prefix=%{_sysconfdir}/httpd \
504 --exec-prefix=%{_prefix} \
505 --bindir=%{_bindir} \
506 --sbindir=%{_sbindir} \
507 --mandir=%{_mandir} \
508 --libdir=%{_libdir} \
509 --sysconfdir=%{_sysconfdir}/httpd/conf \
510 --includedir=%{_includedir}/httpd \
511 --libexecdir=%{_libdir}/httpd/modules \
512 --datadir=%{contentdir} \
513 --enable-layout=Fedora \
514 --with-installbuilddir=%{_libdir}/httpd/build \
515 --enable-mpms-shared=all \
516 --with-apr=%{_bindir}/apr-1-config \
517 --with-apr-util=%{_bindir}/apu-1-config \
518 --enable-suexec \
519 --with-suexec \
520 --with-suexec-caller=%{suexec_caller} \
521 --with-suexec-userdir=public_html \
522 --with-suexec-docroot=%{docroot} \
523 --without-suexec-logfile \
524 --with-suexec-syslog \
525 --with-suexec-bin=%{_sbindir}/suexec \
526 --with-suexec-uidmin=500 \
527 --with-suexec-gidmin=500 \
528 --with-systemd \
529 --enable-systemd \
530 --enable-pie \
531 --with-pcre \
532 --enable-mods-shared=all \
533 --enable-ssl \
534 --with-ssl \
535 --disable-distcache \
536 --enable-proxy \
537 --enable-proxy-fdpass \
538 --enable-cache \
539 --enable-disk-cache \
540 --enable-ldap \
541 --enable-authnz-ldap \
542 --enable-cgid \
543 --enable-cgi \
544 --enable-authn-anon \
545 --enable-bucketeer \
546 --enable-case-filter \
547 --enable-case-filter-in \
548 --enable-cern_meta \
549 --enable-ident \
550 --enable-imagemap \
551 --enable-optional-fn-export \
552 --enable-optional-fn-import \
553 --enable-optional-hook-export \
554 --enable-optional-hook-import
555
556 # parallel build fails on the build host
557 %__make
558
559 %install
560 %make_install INSTALL_SUEXEC=setuid
561
562 #Fix config_vars.mk, and add some MDK flags so all other modules
563 #can simply do "apxs -q VARIABLE" and know, for example, the exact
564 #release of apache-devel or the exact directory where the source is
565 #located.
566 CVMK="%{buildroot}%{_libdir}/httpd/build/config_vars.mk"
567 perl -pi \
568 -e "s|%{_builddir}/httpd-%{version}|%{_usrsrc}/apache-%{version}|g;" \
569 -e "s|%{buildroot}||g;" \
570 -e "s|^EXTRA_INCLUDES.*|EXTRA_INCLUDES = `apr-1-config --includes` -I%{_includedir}/apache -I%{_includedir}/openssl|g;" \
571 $CVMK
572
573 # fix libtool invocation
574 perl -pi \
575 -e "s|^LIBTOOL.*|LIBTOOL = libtool|g;" \
576 -e "s|^SH_LIBTOOL.*|SH_LIBTOOL = libtool|g;" \
577 $CVMK
578
579 echo "ap_version = %{version}" >> $CVMK
580 echo "ap_release = %{release}" >> $CVMK
581
582 # fix some bugs and other stuff
583 perl -pi -e "s|%{_builddir}/httpd-%{version}|%{_usrsrc}/apache-%{version}|g" \
584 %{buildroot}%{_libdir}/httpd/build/apr_rules.mk
585
586 # named config.nice files are in the devel package
587 rm -f %{buildroot}%{_libdir}/httpd/build/config.nice
588
589 # main configuration files
590 install -m 644 %{SOURCE20} %{buildroot}%{_sysconfdir}/httpd/conf/httpd.conf
591
592 # modules configuration files
593 install -d -m 755 %{buildroot}%{confdir}/modules.d
594 install -m 644 %{SOURCE30} %{buildroot}%{confdir}/modules.d/00_base.conf
595 install -m 644 %{SOURCE31} %{buildroot}%{confdir}/modules.d/00_mpm.conf
596 install -m 644 %{SOURCE32} %{buildroot}%{confdir}/modules.d/00_mod_lua.conf
597 install -m 644 %{SOURCE33} %{buildroot}%{confdir}/modules.d/01_mod_cgi.conf
598 install -m 644 %{SOURCE34} %{buildroot}%{confdir}/modules.d/00_mod_dav.conf
599 install -m 644 %{SOURCE35} %{buildroot}%{confdir}/modules.d/00_mod_proxy.conf
600 install -m 644 %{SOURCE36} %{buildroot}%{confdir}/modules.d/00_mod_proxy_html.conf
601 install -m 644 %{SOURCE37} %{buildroot}%{confdir}/modules.d/00_mod_ssl.conf
602 install -m 644 %{SOURCE38} %{buildroot}%{confdir}/modules.d/01_mod_ldap.conf
603 install -m 644 %{SOURCE39} %{buildroot}%{confdir}/modules.d/00_mod_cache.conf
604 install -m 644 %{SOURCE40} %{buildroot}%{confdir}/modules.d/02_mod_dbd.conf
605 install -m 644 %{SOURCE41} %{buildroot}%{confdir}/modules.d/00_mod_suexec.conf
606 install -m 644 %{SOURCE42} %{buildroot}%{confdir}/modules.d/00_mod_userdir.conf
607 install -m 644 %{SOURCE43} %{buildroot}%{confdir}/modules.d/00_mod_systemd.conf
608 install -m 644 %{SOURCE44} %{buildroot}%{confdir}/modules.d/01_mod_session.conf
609 install -m 644 %{SOURCE45} %{buildroot}%{confdir}/modules.d/01_mod_http2.conf
610 install -m 644 %{SOURCE46} %{buildroot}%{confdir}/modules.d/10_mod_brotli.conf
611
612 # generic server configuration files
613 install -d -m 755 %{buildroot}%{confdir}/conf.d
614 install -m 644 %{SOURCE50} %{buildroot}%{confdir}/conf.d/security.conf
615 install -m 644 %{SOURCE51} %{buildroot}%{confdir}/conf.d/ssl.conf
616 for file in mpm multilang-errordoc autoindex languages info userdir; do
617 install -m 644 docs/conf/extra/httpd-$file.conf \
618 %{buildroot}%{confdir}/conf.d/$file.conf
619 done
620
621 cat >> %{buildroot}%{confdir}/conf.d/userdir.conf <<EOF
622 <Directory "/home/*/public_html/cgi-bin">
623 Options ExecCGI
624 SetHandler cgi-script
625 </Directory>
626 EOF
627
628 # sites configuration files
629 install -d -m 755 %{buildroot}%{confdir}/sites.d
630 install -m 644 %{SOURCE60} %{buildroot}%{confdir}/sites.d/00_default_vhosts.conf
631 install -m 644 %{SOURCE61} %{buildroot}%{confdir}/sites.d/00_default_ssl_vhost.conf
632 install -m 644 docs/conf/extra/httpd-manual.conf \
633 %{buildroot}%{confdir}/sites.d/manual.conf
634
635 # compatibility symlinks
636 pushd %{buildroot}%{confdir}
637 ln -s sites.d webapps.d
638 ln -s sites.d vhosts.d
639 popd
640
641 # fix a msec safe cache for the ssl stuff
642 install -d %{buildroot}/var/cache/httpd/mod_ssl
643 touch %{buildroot}/var/cache/httpd/mod_ssl/scache.dir
644 touch %{buildroot}/var/cache/httpd/mod_ssl/scache.pag
645 touch %{buildroot}/var/cache/httpd/mod_ssl/scache.sem
646
647 # fix a msec safe cache for the mod_ldap LDAPSharedCacheFile
648 touch %{buildroot}/var/cache/httpd/mod_ldap_cache
649
650 install -d -m 755 %{buildroot}/var/cache/httpd/mod_proxy
651 install -d -m 755 %{buildroot}/var/lib/dav
652
653 # htcacheclean files
654 install -D -m 644 %{SOURCE9} %{buildroot}%{_unitdir}/htcacheclean.service
655 install -D -m 644 %{SOURCE10} %{buildroot}%{_sysconfdir}/sysconfig/htcacheclean
656
657 # httpd files
658 install -D -p -m 644 %{SOURCE14} %{buildroot}%{_tmpfilesdir}/httpd.conf
659 install -D -p -m 644 %{SOURCE15} %{buildroot}%{_unitdir}/httpd.service
660 install -D -p -m 644 %{SOURCE16} %{buildroot}%{_sysconfdir}/sysconfig/httpd
661
662 # fix man page paths
663 sed -e "s|/usr/local/apache2|/etc/httpd|" \
664 < docs/man/httpd.8 > $RPM_BUILD_ROOT%{_mandir}/man8/httpd.8
665
666 # rpm macros
667 install -d -m 755 %{buildroot}%{_sysconfdir}/rpm/macros.d
668 cat > %{buildroot}%{_sysconfdir}/rpm/macros.d/httpd.macros <<EOF
669 %%_httpd_apxs %%{_bindir}/apxs
670 %%_httpd_confdir %{confdir}
671 %%_httpd_modconfdir %{confdir}/modules.d
672 %%_httpd_siteconfdir %{confdir}/sites.d
673 %%_httpd_extconfdir %{confdir}/conf.d
674 %%_httpd_contentdir %{contentdir}
675 %%_httpd_moddir %%{_libdir}/httpd/modules
676 EOF
677
678 %multiarch_includes %{buildroot}%{_includedir}/httpd/ap_config_layout.h
679
680 # cleanup
681 rm -f %{buildroot}/var/www/html/*
682 rm -f %{buildroot}/var/www/cgi-bin/*
683 rm -f %{buildroot}%{_sysconfdir}/httpd/conf/mime.types
684 rm -rf %{buildroot}%{_sysconfdir}/httpd/conf/{extra,original}
685
686 # make some dangling soft links
687 pushd %{buildroot}%{_sysconfdir}/httpd
688 ln -s ../..%{_localstatedir}/log/httpd logs
689 ln -s ../..%{_libdir}/httpd/modules modules
690 ln -s ../..%{_libdir}/httpd/build build
691 ln -s /run/httpd run
692 popd
693
694 # install log rotation stuff
695 install -d -m 755 %{buildroot}%{_sysconfdir}/logrotate.d
696 cat > %{buildroot}%{_sysconfdir}/logrotate.d/httpd << EOF
697 /var/log/httpd/*_log /var/log/httpd/apache_runtime_status /var/log/httpd/ssl_mutex {
698 rotate 5
699 monthly
700 missingok
701 notifempty
702 nocompress
703 postrotate
704 /bin/systemctl reload httpd.service > /dev/null 2>/dev/null || true
705 endscript
706 }
707 EOF
708
709 # (dw) mpm packages don't automatically cause a restart, because on upgrade
710 # there will already be 2 restarts due to the main package and the modules, and
711 # if you want to run an mpm other than prefork, that has to be configured
712 # manually (via systemctl for systemd or sysconfig for sysvinit), so automatic
713 # restart is not appropriate. Apache modules cause a restart via filetriggers,
714 # so that a restart can be done for modules, but only once, even if some of the
715 # modules are coming from other SRPMS. Also, filetriggers are run right before
716 # posttrans, and this is important because on Apache version upgrades, the mpm
717 # needs to be upgraded before a restart because the modules may be dependent on
718 # new symbols in httpd.
719
720 %post
721 %_tmpfilescreate httpd
722 %_post_service httpd
723
724 %preun
725 %_preun_service httpd
726
727 %post mod_ldap
728 %create_ghostfile /var/cache/httpd/mod_ldap_cache apache root 0600
729
730 %post mod_ssl
731 %_create_ssl_certificate httpd
732
733 # create some ghost files
734 %create_ghostfile /var/cache/httpd/mod_ssl/scache.dir apache root 0600
735 %create_ghostfile /var/cache/httpd/mod_ssl/scache.pag apache root 0600
736 %create_ghostfile /var/cache/httpd/mod_ssl/scache.sem apache root 0600
737
738 %post htcacheclean
739 %_post_service htcacheclean
740
741 %preun htcacheclean
742 %_preun_service htcacheclean
743
744 %transfiletriggerin -p /usr/bin/perl -- /etc/httpd/conf/modules.d/ /etc/httpd/conf/modules/sites.d/ /etc/httpd/conf/modules/conf.d/ /etc/httpd/conf/modules/webapps.d/
745 use strict;
746
747 my (%installed, %removed);
748 while (my $line = <STDIN>) {
749 my ($operation, $file) = $line =~ /^(.)(\S+)$/;
750 if ($operation eq '+') {
751 $installed{$file} = 1;
752 } else {
753 $removed{$file} = 1;
754 }
755 }
756
757 my @new_files = grep { !$removed{$_} } keys %installed;
758 my @old_files = grep { !$installed{$_} } keys %removed;
759
760 # if there configuration files added or removed, a restart is needed
761 if (@new_files || @old_files) {
762 system('systemctl try-restart httpd.service');
763 } else {
764 system('systemctl reload-or-try-restart httpd.service');
765 }
766
767
768 %files
769 %doc ABOUT_APACHE README CHANGES LICENSE VERSIONING NOTICE
770 %doc docs/conf/extra/*.conf
771
772 %config(noreplace) %{_sysconfdir}/sysconfig/httpd
773 %config(noreplace) %{_sysconfdir}/logrotate.d/httpd
774 %dir %{_sysconfdir}/httpd
775 %exclude %{_sysconfdir}/httpd/conf/conf.d/ssl.conf
776 %dir %{_sysconfdir}/httpd/conf/conf.d
777 %dir %{_sysconfdir}/httpd/conf/sites.d
778 %dir %{_sysconfdir}/httpd/conf/modules.d
779 %{_sysconfdir}/httpd/conf/vhosts.d
780 %{_sysconfdir}/httpd/conf/webapps.d
781 %{_sysconfdir}/httpd/logs
782 %{_sysconfdir}/httpd/modules
783 %{_sysconfdir}/httpd/run
784 %config(noreplace) %{_sysconfdir}/httpd/conf/httpd.conf
785 %config(noreplace) %{_sysconfdir}/httpd/conf/magic
786 %config(noreplace) %{_sysconfdir}/httpd/conf/modules.d/00_base.conf
787 %config(noreplace) %{_sysconfdir}/httpd/conf/modules.d/00_mpm.conf
788 %config(noreplace) %{_sysconfdir}/httpd/conf/modules.d/01_mod_cgi.conf
789 %config(noreplace) %{_sysconfdir}/httpd/conf/modules.d/00_mod_lua.conf
790 %config(noreplace) %{_sysconfdir}/httpd/conf/modules.d/00_mod_systemd.conf
791 %config(noreplace) %{_sysconfdir}/httpd/conf/sites.d/00_default_vhosts.conf
792 %config(noreplace) %{_sysconfdir}/httpd/conf/conf.d/*.conf
793 %exclude %{_sysconfdir}/httpd/conf/conf.d/userdir.conf
794
795 %{_tmpfilesdir}/httpd.conf
796 %{_unitdir}/httpd.service
797
798 %{_datadir}/httpd
799 %exclude %{_datadir}/httpd/manual
800
801 /var/www/cgi-bin
802
803 %{_bindir}/ab
804 %{_bindir}/dbmmanage
805 %{_bindir}/htdbm
806 %{_bindir}/htdigest
807 %{_bindir}/htpasswd
808 %{_bindir}/httxt2dbm
809 %{_bindir}/logresolve
810
811 %{_sbindir}/apachectl
812 %{_sbindir}/checkgid
813 %{_sbindir}/rotatelogs
814 %{_sbindir}/fcgistarter
815 %{_sbindir}/httpd
816
817 %{_libdir}/httpd/modules/mod_mpm_event.so
818 %{_libdir}/httpd/modules/mod_mpm_prefork.so
819 %{_libdir}/httpd/modules/mod_mpm_worker.so
820
821 %{_libdir}/httpd/modules/mod_actions.so
822 %{_libdir}/httpd/modules/mod_alias.so
823 %{_libdir}/httpd/modules/mod_asis.so
824 %{_libdir}/httpd/modules/mod_auth_basic.so
825 %{_libdir}/httpd/modules/mod_auth_digest.so
826 %{_libdir}/httpd/modules/mod_authn_anon.so
827 %{_libdir}/httpd/modules/mod_authn_dbm.so
828 %{_libdir}/httpd/modules/mod_authn_file.so
829 %{_libdir}/httpd/modules/mod_authz_dbm.so
830 %{_libdir}/httpd/modules/mod_authz_groupfile.so
831 %{_libdir}/httpd/modules/mod_authz_host.so
832 %{_libdir}/httpd/modules/mod_authz_owner.so
833 %{_libdir}/httpd/modules/mod_authz_user.so
834 %{_libdir}/httpd/modules/mod_autoindex.so
835 %{_libdir}/httpd/modules/mod_bucketeer.so
836 %{_libdir}/httpd/modules/mod_case_filter_in.so
837 %{_libdir}/httpd/modules/mod_case_filter.so
838 %{_libdir}/httpd/modules/mod_cern_meta.so
839 %{_libdir}/httpd/modules/mod_cgid.so
840 %{_libdir}/httpd/modules/mod_cgi.so
841 %{_libdir}/httpd/modules/mod_charset_lite.so
842 %{_libdir}/httpd/modules/mod_dir.so
843 %{_libdir}/httpd/modules/mod_dumpio.so
844 %{_libdir}/httpd/modules/mod_echo.so
845 %{_libdir}/httpd/modules/mod_env.so
846 %{_libdir}/httpd/modules/mod_expires.so
847 %{_libdir}/httpd/modules/mod_ext_filter.so
848 %{_libdir}/httpd/modules/mod_filter.so
849 %{_libdir}/httpd/modules/mod_headers.so
850 %{_libdir}/httpd/modules/mod_ident.so
851 %{_libdir}/httpd/modules/mod_imagemap.so
852 %{_libdir}/httpd/modules/mod_include.so
853 %{_libdir}/httpd/modules/mod_info.so
854 %{_libdir}/httpd/modules/mod_log_config.so
855 %{_libdir}/httpd/modules/mod_log_forensic.so
856 %{_libdir}/httpd/modules/mod_logio.so
857 %{_libdir}/httpd/modules/mod_macro.so
858 %{_libdir}/httpd/modules/mod_md.so
859 %{_libdir}/httpd/modules/mod_mime_magic.so
860 %{_libdir}/httpd/modules/mod_mime.so
861 %{_libdir}/httpd/modules/mod_negotiation.so
862 %{_libdir}/httpd/modules/mod_optional_fn_export.so
863 %{_libdir}/httpd/modules/mod_optional_fn_import.so
864 %{_libdir}/httpd/modules/mod_optional_hook_export.so
865 %{_libdir}/httpd/modules/mod_optional_hook_import.so
866 %{_libdir}/httpd/modules/mod_rewrite.so
867 %{_libdir}/httpd/modules/mod_setenvif.so
868 %{_libdir}/httpd/modules/mod_speling.so
869 %{_libdir}/httpd/modules/mod_status.so
870 %{_libdir}/httpd/modules/mod_substitute.so
871 %{_libdir}/httpd/modules/mod_unique_id.so
872 %{_libdir}/httpd/modules/mod_usertrack.so
873 %{_libdir}/httpd/modules/mod_version.so
874 %{_libdir}/httpd/modules/mod_vhost_alias.so
875 %{_libdir}/httpd/modules/mod_access_compat.so
876 %{_libdir}/httpd/modules/mod_allowmethods.so
877 %{_libdir}/httpd/modules/mod_authn_core.so
878 %{_libdir}/httpd/modules/mod_authn_socache.so
879 %{_libdir}/httpd/modules/mod_authz_core.so
880 %{_libdir}/httpd/modules/mod_authz_dbd.so
881 %{_libdir}/httpd/modules/mod_buffer.so
882 %{_libdir}/httpd/modules/mod_data.so
883 %{_libdir}/httpd/modules/mod_deflate.so
884 %{_libdir}/httpd/modules/mod_dialup.so
885 %{_libdir}/httpd/modules/mod_file_cache.so
886 %{_libdir}/httpd/modules/mod_heartbeat.so
887 %{_libdir}/httpd/modules/mod_heartmonitor.so
888 %{_libdir}/httpd/modules/mod_log_debug.so
889 %{_libdir}/httpd/modules/mod_lua.so
890 %{_libdir}/httpd/modules/mod_ratelimit.so
891 %{_libdir}/httpd/modules/mod_reflector.so
892 %{_libdir}/httpd/modules/mod_remoteip.so
893 %{_libdir}/httpd/modules/mod_request.so
894 %{_libdir}/httpd/modules/mod_reqtimeout.so
895 %{_libdir}/httpd/modules/mod_sed.so
896 %{_libdir}/httpd/modules/mod_slotmem_plain.so
897 %{_libdir}/httpd/modules/mod_slotmem_shm.so
898 %{_libdir}/httpd/modules/mod_socache_dbm.so
899 %{_libdir}/httpd/modules/mod_socache_memcache.so
900 %{_libdir}/httpd/modules/mod_socache_redis.so
901 %{_libdir}/httpd/modules/mod_socache_shmcb.so
902 %{_libdir}/httpd/modules/mod_unixd.so
903 %{_libdir}/httpd/modules/mod_watchdog.so
904 %{_libdir}/httpd/modules/mod_systemd.so
905 %{_libdir}/httpd/modules/httpd.exp
906
907 %dir /var/log/httpd
908
909 %dir %{_libdir}/httpd
910 %attr(0700,apache,root) %dir /var/cache/httpd
911 %exclude %{_mandir}/man8/htcacheclean.8*
912 %exclude %{_mandir}/man8/suexec.8*
913 %exclude %{_mandir}/man1/apxs.1*
914 %{_mandir}/*/*
915
916 %files mod_proxy
917 %doc modules/proxy/CHANGES
918 %config(noreplace) %{confdir}/modules.d/00_mod_proxy.conf
919 %{_libdir}/httpd/modules/mod_proxy.so
920 %{_libdir}/httpd/modules/mod_lbmethod_bybusyness.so
921 %{_libdir}/httpd/modules/mod_lbmethod_byrequests.so
922 %{_libdir}/httpd/modules/mod_lbmethod_bytraffic.so
923 %{_libdir}/httpd/modules/mod_lbmethod_heartbeat.so
924 %{_libdir}/httpd/modules/mod_proxy_ajp.so
925 %{_libdir}/httpd/modules/mod_proxy_balancer.so
926 %{_libdir}/httpd/modules/mod_proxy_connect.so
927 %{_libdir}/httpd/modules/mod_proxy_express.so
928 %{_libdir}/httpd/modules/mod_proxy_fcgi.so
929 %{_libdir}/httpd/modules/mod_proxy_fdpass.so
930 %{_libdir}/httpd/modules/mod_proxy_ftp.so
931 %{_libdir}/httpd/modules/mod_proxy_hcheck.so
932 %{_libdir}/httpd/modules/mod_proxy_http.so
933 %{_libdir}/httpd/modules/mod_proxy_scgi.so
934 %{_libdir}/httpd/modules/mod_proxy_uwsgi.so
935 %{_libdir}/httpd/modules/mod_proxy_wstunnel.so
936 %attr(0770,apache,root) %dir /var/cache/httpd/mod_proxy
937
938 %files mod_proxy_html
939 %config(noreplace) %{confdir}/modules.d/00_mod_proxy_html.conf
940 %{_libdir}/httpd/modules/mod_proxy_html.so
941 %{_libdir}/httpd/modules/mod_xml2enc.so
942
943 %files mod_dav
944 %config(noreplace) %{confdir}/modules.d/00_mod_dav.conf
945 %{_libdir}/httpd/modules/mod_dav_fs.so
946 %{_libdir}/httpd/modules/mod_dav_lock.so
947 %{_libdir}/httpd/modules/mod_dav.so
948 %attr(-,apache,apache) %dir /var/lib/dav
949
950 %files mod_ldap
951 %config(noreplace) %{confdir}/modules.d/01_mod_ldap.conf
952 %{_libdir}/httpd/modules/mod_ldap.so
953 %{_libdir}/httpd/modules/mod_authnz_ldap.so
954 %attr(0600,apache,root) %ghost /var/cache/httpd/mod_ldap_cache
955
956 %files mod_session
957 %config(noreplace) %{confdir}/modules.d/01_mod_session.conf
958 %{_libdir}/httpd/modules/mod_session.so
959 %{_libdir}/httpd/modules/mod_session_cookie.so
960 %{_libdir}/httpd/modules/mod_session_crypto.so
961 %{_libdir}/httpd/modules/mod_auth_form.so
962
963 %files mod_cache
964 %config(noreplace) %{confdir}/modules.d/00_mod_cache.conf
965 %{_libdir}/httpd/modules/mod_cache.so
966 %{_libdir}/httpd/modules/mod_cache_disk.so
967 %{_libdir}/httpd/modules/mod_cache_socache.so
968
969 %files mod_suexec
970 %config(noreplace) %{confdir}/modules.d/00_mod_suexec.conf
971 %{_libdir}/httpd/modules/mod_suexec.so
972 %attr(4710,root,apache) %{_sbindir}/suexec
973 %{_mandir}/man8/suexec.8*
974
975 %files mod_userdir
976 %config(noreplace) %{confdir}/modules.d/00_mod_userdir.conf
977 %config(noreplace) %{confdir}/conf.d/userdir.conf
978 %{_libdir}/httpd/modules/mod_userdir.so
979
980 %files mod_ssl
981 %config(noreplace) %{confdir}/modules.d/00_mod_ssl.conf
982 %config(noreplace) %{confdir}/conf.d/ssl.conf
983 %config(noreplace) %{confdir}/sites.d/00_default_ssl_vhost.conf
984 %{_libdir}/httpd/modules/mod_ssl.so
985 %attr(0700,apache,root) %dir /var/cache/httpd/mod_ssl
986 %attr(0600,apache,root) %ghost /var/cache/httpd/mod_ssl/scache.dir
987 %attr(0600,apache,root) %ghost /var/cache/httpd/mod_ssl/scache.pag
988 %attr(0600,apache,root) %ghost /var/cache/httpd/mod_ssl/scache.sem
989
990 %files mod_dbd
991 %config(noreplace) %{confdir}/modules.d/02_mod_dbd.conf
992 %{_libdir}/httpd/modules/mod_dbd.so
993 %{_libdir}/httpd/modules/mod_authn_dbd.so
994 %{_libdir}/httpd/modules/mod_authz_dbd.so
995 %{_libdir}/httpd/modules/mod_session_dbd.so
996
997 %files mod_http2
998 %config(noreplace) %{confdir}/modules.d/01_mod_http2.conf
999 %{_libdir}/httpd/modules/mod_http2.so
1000
1001 %files mod_brotli
1002 %config(noreplace) %{confdir}/modules.d/10_mod_brotli.conf
1003 %{_libdir}/httpd/modules/mod_brotli.so
1004
1005 %files htcacheclean
1006 %{_unitdir}/htcacheclean.service
1007 %config(noreplace) %{_sysconfdir}/sysconfig/htcacheclean
1008 %{_sbindir}/htcacheclean
1009 %{_mandir}/man8/htcacheclean.8*
1010
1011 %files devel
1012 %multiarch %{multiarch_includedir}/httpd/ap_config_layout.h
1013 %{_includedir}/httpd
1014 %{_libdir}/httpd/build
1015 %{_sysconfdir}/httpd/build
1016 %{_sysconfdir}/rpm/macros.d/httpd.macros
1017 %{_sbindir}/envvars
1018 %{_sbindir}/envvars-std
1019 %{_bindir}/apxs
1020 %{_mandir}/man1/apxs.1*
1021
1022 %files doc
1023 %config(noreplace) %{confdir}/sites.d/manual.conf
1024 %{_datadir}/httpd/manual

  ViewVC Help
Powered by ViewVC 1.1.30