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 Source18: ihttpd.dracut
20 Source19: ihttpd.module
-setup
22 # build/scripts patches
23 Patch1: httpd
-2.4.1-apctl.patch
24 Patch2: httpd
-2.4.9-apxs.patch
25 Patch3: httpd
-2.4.1-deplibs.patch
26 Patch5: ihttpd
-2.4.20-layout.patch
27 Patch6: httpd
-2.4.3-apctl
-systemd.patch
28 Patch7: httpd
-2.4.10-detect
-systemd.patch
29 # Features/functional changes
30 Patch20: httpd
-2.4.3-release.patch
31 Patch23: httpd
-2.4.4-export.patch
32 Patch24: httpd
-2.4.1-corelimit.patch
33 Patch26: httpd
-2.4.4-r1337344
+.patch
34 Patch27: httpd
-2.4.2-icons.patch
35 Patch28: httpd
-2.4.4-r1332643
+.patch
36 Patch30: httpd
-2.4.4-cachehardmax.patch
37 Patch31
: httpd
-2.4.18-sslmultiproxy.patch
38 Patch34
: httpd
-2.4.17-socket
-activation.patch
39 Patch35
: httpd
-2.4.17-sslciphdefault.patch
41 Patch55
: httpd
-2.4.4-malformed
-host.patch
42 Patch56
: httpd
-2.4.4-mod_unique_id.patch
43 Patch57
: httpd
-2.4.10-sigint.patch
46 Requires: webserver
-base
50 Requires(post
): systemd
>= %{systemd_required_version}
51 Requires(post
): rpm
-helper
>= 0.24.8-1
52 Requires(post
): openssl makedev
53 Requires(preun
): rpm
-helper
>= 0.24.8-1
56 This package contains the main binary of apache
, a powerful
, full
-featured
,
57 efficient and freely
-available Web server. Apache is also the most popular Web
58 server on the Internet.
60 This version of apache is fully static
, and few modules are available built
-in.
63 %setup -q
-n httpd
-%{version}
67 %patch3 -p1
-b .deplibs
68 %patch5 -p1
-b .layout
69 %patch6 -p1
-b .apctlsystemd
70 %patch7 -p1
-b .detectsystemd
72 %patch23 -p1
-b .
export
73 %patch24 -p1
-b .corelimit
74 %patch26 -p1
-b .r1337344
+
75 %patch27 -p1
-b .icons
76 %patch30 -p1
-b .cachehardmax
77 %patch31 -p1
-b .sslmultiproxy
78 %patch34 -p1
-b .socketactivation
79 %patch35 -p1
-b .sslciphdefault
81 %patch55 -p1
-b .malformedhost
82 %patch56 -p1
-b .uniqueid
83 %patch57 -p1
-b .sigint
85 # Patch in vendor/release string
86 sed "s
/@RELEASE@
/%{product_distribution}/" < %{PATCH20} | patch
-p1
88 # forcibly prevent use of bundled apr, apr-util, pcre
89 rm -rf srclib
/{apr
,apr
-util
,pcre
}
93 -e 's|\@exp_installbuilddir\@|
%{_libdir}/httpd
/build|
;' \
94 -e 's|get_vars\
("prefix"\
)|"
%{_libdir}/httpd
/build"|
;' \
95 -e 's|get_vars\
("sbindir"\
) . "
/envvars"|"\$installbuilddir
/envvars"|
;' \
99 find
-type f
-print0 | xargs
-0 perl
-pi \
100 -e 's|
/usr
/local/bin
/perl|perl|g
;' \
101 -e 's|
/usr
/local/bin
/perl5|perl|g
;' \
102 -e 's|
/path
/to
/bin
/perl|perl|g
;'
106 -e 's
/DYNAMIC_MODULE_LIMIT \d
+/DYNAMIC_MODULE_LIMIT
%{maxmodules}/;' \
111 -e 's
/DEFAULT_SERVER_LIMIT \d
+/DEFAULT_SERVER_LIMIT
%{serverlimit}/' \
112 server
/mpm
/prefork
/prefork.c \
113 server
/mpm
/worker
/worker.c \
114 server
/mpm
/event
/event.c
116 # don't try to touch srclib
117 perl
-pi
-e "s|^SUBDIRS
= .
*|SUBDIRS
= os server modules support|g" Makefile.
in
119 # this will only work if configured correctly in the config (FullOs)...
120 cp server
/core.c server
/core.c.untagged
122 # Install index.bin source
123 install -m
644 %{SOURCE1} index.bin.c
127 # regenerate configure scripts
128 autoheader
&& autoconf ||
exit 1
130 export CFLAGS
="$RPM_OPT_FLAGS
-DBIG_SECURITY_HOLE"
131 export LDFLAGS
="
-Wl
,-z
,relro
,-z
,now"
133 # Hard-code path to links to avoid unnecessary builddep
134 export LYNX_PATH
=/usr
/bin
/links
137 --enable-layout
=IHttpd \
138 --sysconfdir
='
/etc' \
139 --includedir
='
/usr
/include
/ihttpd' \
140 --libexecdir
='
/usr
/lib64
/ihttpd
/modules' \
141 --datadir
='
/usr
/share
/ihttpd' \
145 --with
-program
-name
='
%name' \
148 --disable
-distcache \
150 --enable-auth
-basic \
151 --enable-authn
-core \
152 --enable-authn
-file \
153 --enable-authz
-core \
154 --enable-authz
-host \
155 --enable-authz
-user \
157 --enable-socache
-shmcb \
161 --enable-log
-config \
164 --enable-modules
=none \
165 --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'
169 export CFLAGS
="$RPM_OPT_FLAGS"
170 # -m64 -std=c99 -pedantic -Wall -Wshadow -Wpointer-arith -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes
171 gcc index.bin.c
-o index.bin
176 install -D
-p
-m
755 ihttpd
%{buildroot}%{_sbindir}/ihttpd
179 install -D
-p
-m
644 %{SOURCE14} %{buildroot}%{_tmpfilesdir}/ihttpd.conf
181 #IHttpd dracut config
182 install -D
-p
-m
644 %{SOURCE18} %{buildroot}%{_sysconfdir}/dracut.conf.d/99-%{name}.conf
184 #IHttpd dracut module
185 install -d
-m
755 %{buildroot}%{_prefix}/lib
/dracut
/modules.d
/99ihttpd
186 install -D
-p
-m
755 %{SOURCE19} %{buildroot}%{_prefix}/lib
/dracut
/modules.d
/99ihttpd
/module
-setup.sh
189 install -d
-m
755 %{buildroot}%{_prefix}/lib/%{name}
190 install -D
-p
-m
755 index.bin
%{buildroot}%{_prefix}/lib/%{name}/index.bin
191 install -D
-p
-m
755 %{SOURCE2} %{buildroot}%{_prefix}/lib/%{name}/reboot.bin
192 install -D
-p
-m
644 %{SOURCE20} %{buildroot}%{_prefix}/lib/%{name}/ihttpd.conf
193 install -D
-p
-m
644 %{SOURCE15} %{buildroot}%{_prefix}/lib/%{name}/ihttpd.service
199 %_tmpfilescreate %{name}
200 %_post_service %{name}
201 %_create_ssl_certificate %{name}
204 %_preun_service %{name}
207 %config(noreplace
) %{_prefix}/lib/%{name}/%{name}.conf
208 %config(noreplace
) %{_sysconfdir}/dracut.conf.d/99-%{name}.conf
210 %{_tmpfilesdir}/%{name}.conf
211 %dir %{_prefix}/lib
/dracut
/modules.d
/99ihttpd
212 %{_prefix}/lib
/dracut
/modules.d
/99ihttpd
/module
-setup.sh
213 %dir %{_prefix}/lib/%{name}
214 %{_prefix}/lib/%{name}/%{name}.service
215 %{_prefix}/lib/%{name}/index.bin
216 %{_prefix}/lib/%{name}/reboot.bin