1 %define contentdir
%{_datadir}/httpd
2 %define docroot
/var
/www
4 %{?!maxmodules:%global maxmodules 128}
5 %{?!serverlimit:%global serverlimit 1024}
10 Summary: The most widely used Web server on the Internet
11 License: Apache
License
13 URL: http
://httpd.apache.org
/
14 Source0: http
://www.apache.org
/dist
/httpd
/httpd
-%version.tar.bz2
17 Source14: ihttpd.tmpfiles
18 Source15: ihttpd.service
19 Source16: debug
-sshd.service
20 Source18: ihttpd.dracut
21 Source19: ihttpd.module
-setup
23 # build/scripts patches
24 Patch1: httpd
-2.4.1-apctl.patch
25 Patch2: httpd
-2.4.9-apxs.patch
26 Patch3: httpd
-2.4.1-deplibs.patch
27 Patch5: ihttpd
-2.4.20-layout.patch
28 Patch6: httpd
-2.4.3-apctl
-systemd.patch
29 Patch7: httpd
-2.4.10-detect
-systemd.patch
30 # Features/functional changes
31 Patch20: httpd
-2.4.3-release.patch
32 Patch23: httpd
-2.4.4-export.patch
33 Patch24: httpd
-2.4.1-corelimit.patch
34 Patch26: httpd
-2.4.4-r1337344
+.patch
35 Patch27: httpd
-2.4.2-icons.patch
36 Patch28: httpd
-2.4.4-r1332643
+.patch
37 Patch30: httpd
-2.4.4-cachehardmax.patch
38 Patch31
: httpd
-2.4.18-sslmultiproxy.patch
39 Patch34
: httpd
-2.4.17-socket
-activation.patch
40 Patch35
: httpd
-2.4.17-sslciphdefault.patch
42 Patch55
: httpd
-2.4.4-malformed
-host.patch
43 Patch56
: httpd
-2.4.4-mod_unique_id.patch
44 Patch57
: httpd
-2.4.10-sigint.patch
47 Requires: webserver
-base
51 Requires(post
): systemd
>= %{systemd_required_version}
52 Requires(post
): rpm
-helper
>= 0.24.8-1
53 Requires(post
): openssl makedev
54 Requires(preun
): rpm
-helper
>= 0.24.8-1
57 This package contains the main binary of apache
, a powerful
, full
-featured
,
58 efficient and freely
-available Web server. Apache is also the most popular Web
59 server on the Internet.
61 This version of apache is fully static
, and few modules are available built
-in.
64 %setup -q
-n httpd
-%{version}
68 %patch3 -p1
-b .deplibs
69 %patch5 -p1
-b .layout
70 %patch6 -p1
-b .apctlsystemd
71 %patch7 -p1
-b .detectsystemd
73 %patch23 -p1
-b .
export
74 %patch24 -p1
-b .corelimit
75 %patch26 -p1
-b .r1337344
+
76 %patch27 -p1
-b .icons
77 %patch30 -p1
-b .cachehardmax
78 %patch31 -p1
-b .sslmultiproxy
79 %patch34 -p1
-b .socketactivation
80 %patch35 -p1
-b .sslciphdefault
82 %patch55 -p1
-b .malformedhost
83 %patch56 -p1
-b .uniqueid
84 %patch57 -p1
-b .sigint
86 # Patch in vendor/release string
87 sed "s
/@RELEASE@
/%{product_distribution}/" < %{PATCH20} | patch
-p1
89 # forcibly prevent use of bundled apr, apr-util, pcre
90 rm -rf srclib
/{apr
,apr
-util
,pcre
}
94 -e 's|\@exp_installbuilddir\@|
%{_libdir}/httpd
/build|
;' \
95 -e 's|get_vars\
("prefix"\
)|"
%{_libdir}/httpd
/build"|
;' \
96 -e 's|get_vars\
("sbindir"\
) . "
/envvars"|"\$installbuilddir
/envvars"|
;' \
100 find
-type f
-print0 | xargs
-0 perl
-pi \
101 -e 's|
/usr
/local/bin
/perl|perl|g
;' \
102 -e 's|
/usr
/local/bin
/perl5|perl|g
;' \
103 -e 's|
/path
/to
/bin
/perl|perl|g
;'
107 -e 's
/DYNAMIC_MODULE_LIMIT \d
+/DYNAMIC_MODULE_LIMIT
%{maxmodules}/;' \
112 -e 's
/DEFAULT_SERVER_LIMIT \d
+/DEFAULT_SERVER_LIMIT
%{serverlimit}/' \
113 server
/mpm
/prefork
/prefork.c \
114 server
/mpm
/worker
/worker.c \
115 server
/mpm
/event
/event.c
117 # don't try to touch srclib
118 perl
-pi
-e "s|^SUBDIRS
= .
*|SUBDIRS
= os server modules support|g" Makefile.
in
120 # this will only work if configured correctly in the config (FullOs)...
121 cp server
/core.c server
/core.c.untagged
123 # Install index.bin source
124 install -m
644 %{SOURCE1} index.bin.c
128 # regenerate configure scripts
129 autoheader
&& autoconf ||
exit 1
131 # Required to be able to run as root
132 export CFLAGS
="$RPM_OPT_FLAGS
-DBIG_SECURITY_HOLE"
133 export LDFLAGS
="
-Wl
,-z
,relro
,-z
,now"
135 # Hard-code path to links to avoid unnecessary builddep
136 export LYNX_PATH
=/usr
/bin
/links
139 --enable-layout
=IHttpd \
140 --sysconfdir
='
/etc' \
141 --includedir
='
/usr
/include
/ihttpd' \
142 --libexecdir
='
/usr
/lib64
/ihttpd
/modules' \
143 --datadir
='
/usr
/share
/ihttpd' \
147 --with
-program
-name
='
%name' \
150 --disable
-distcache \
152 --enable-auth
-basic \
153 --enable-authn
-core \
154 --enable-authn
-file \
155 --enable-authz
-core \
156 --enable-authz
-host \
157 --enable-authz
-user \
159 --enable-socache
-shmcb \
163 --enable-log
-config \
166 --enable-modules
=none \
167 --enable-mods
-static
='unixd auth_basic authn_core authn_file authz_core authz_host authz_user rewrite socache_shmcb dir mime log_config cgi ssl'
171 export CFLAGS
="$RPM_OPT_FLAGS"
172 gcc index.bin.c
-o index.bin
177 install -D
-p
-m
755 ihttpd
%{buildroot}%{_sbindir}/ihttpd
180 install -D
-p
-m
644 %{SOURCE14} %{buildroot}%{_tmpfilesdir}/ihttpd.conf
182 #IHttpd dracut config
183 install -D
-p
-m
644 %{SOURCE18} %{buildroot}%{_sysconfdir}/dracut.conf.d/99-%{name}.conf
185 #IHttpd dracut module
186 install -d
-m
755 %{buildroot}%{_prefix}/lib
/dracut
/modules.d
/99ihttpd
187 install -D
-p
-m
755 %{SOURCE19} %{buildroot}%{_prefix}/lib
/dracut
/modules.d
/99ihttpd
/module
-setup.sh
190 install -d
-m
755 %{buildroot}%{_prefix}/lib/%{name}
191 install -D
-p
-m
755 index.bin
%{buildroot}%{_prefix}/lib/%{name}/
192 install -D
-p
-m
755 %{SOURCE2} %{buildroot}%{_prefix}/lib/%{name}/reboot.bin
193 install -D
-p
-m
644 %{SOURCE20} %{buildroot}%{_prefix}/lib/%{name}/
194 install -D
-p
-m
644 %{SOURCE15} %{buildroot}%{_prefix}/lib/%{name}/
195 install -D
-p
-m
644 %{SOURCE16} %{buildroot}%{_prefix}/lib/%{name}/
201 %_tmpfilescreate %{name}
202 %_create_ssl_certificate %{name}
205 %config(noreplace
) %{_prefix}/lib/%{name}/%{name}.conf
206 %config(noreplace
) %{_sysconfdir}/dracut.conf.d/99-%{name}.conf
208 %{_tmpfilesdir}/%{name}.conf
209 %dir %{_prefix}/lib
/dracut
/modules.d
/99ihttpd
210 %{_prefix}/lib
/dracut
/modules.d
/99ihttpd
/module
-setup.sh
211 %dir %{_prefix}/lib/%{name}
212 %{_prefix}/lib/%{name}/%{name}.service
213 %{_prefix}/lib/%{name}/debug
-sshd.service
214 %{_prefix}/lib/%{name}/index.bin
215 %{_prefix}/lib/%{name}/reboot.bin