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 Source15: ihttpd.service
18 Source16: debug
-sshd.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.33-socket
-activation.patch
39 #Patch35: httpd-2.4.33-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
55 BuildRequires
: apr
-devel apr
-util
-devel
58 This package contains the main binary of apache
, a powerful
, full
-featured
,
59 efficient and freely
-available Web server. Apache is also the most popular Web
60 server on the Internet.
62 This version of apache is fully static
, and few modules are available built
-in.
65 %setup -q
-n httpd
-%{version}
69 %patch3 -p1
-b .deplibs
70 %patch5 -p1
-b .layout
71 %patch6 -p1
-b .apctlsystemd
72 %patch7 -p1
-b .detectsystemd
74 #%patch23 -p1 -b .export
75 %patch24 -p1
-b .corelimit
76 #%patch26 -p1 -b .r1337344+
77 %patch27 -p1
-b .icons
78 %patch30 -p1
-b .cachehardmax
79 #%patch31 -p1 -b .sslmultiproxy
80 %patch34 -p1
-b .socketactivation
81 #%patch35 -p1 -b .sslciphdefault
83 #%patch55 -p1 -b .malformedhost
84 #%patch56 -p1 -b .uniqueid
85 #%patch57 -p1 -b .sigint
87 # Patch in vendor/release string
88 sed "s
/@RELEASE@
/%{product_distribution}/" < %{PATCH20} | patch
-p1
90 # forcibly prevent use of bundled apr, apr-util, pcre
91 rm -rf srclib
/{apr
,apr
-util
,pcre
}
95 -e 's|\@exp_installbuilddir\@|
%{_libdir}/httpd
/build|
;' \
96 -e 's|get_vars\
("prefix"\
)|"
%{_libdir}/httpd
/build"|
;' \
97 -e 's|get_vars\
("sbindir"\
) . "
/envvars"|"\$installbuilddir
/envvars"|
;' \
101 find
-type f
-print0 | xargs
-0 perl
-pi \
102 -e 's|
/usr
/local/bin
/perl|perl|g
;' \
103 -e 's|
/usr
/local/bin
/perl5|perl|g
;' \
104 -e 's|
/path
/to
/bin
/perl|perl|g
;'
108 -e 's
/DYNAMIC_MODULE_LIMIT \d
+/DYNAMIC_MODULE_LIMIT
%{maxmodules}/;' \
113 -e 's
/DEFAULT_SERVER_LIMIT \d
+/DEFAULT_SERVER_LIMIT
%{serverlimit}/' \
114 server
/mpm
/prefork
/prefork.c \
115 server
/mpm
/worker
/worker.c \
116 server
/mpm
/event
/event.c
118 # don't try to touch srclib
119 perl
-pi
-e "s|^SUBDIRS
= .
*|SUBDIRS
= os server modules support|g" Makefile.
in
121 # this will only work if configured correctly in the config (FullOs)...
122 cp server
/core.c server
/core.c.untagged
124 # Install index.bin source
125 install -m
644 %{SOURCE1} index.bin.c
129 # regenerate configure scripts
130 autoheader
&& autoconf ||
exit 1
132 # Required to be able to run as root
133 export CFLAGS
="$RPM_OPT_FLAGS
-DBIG_SECURITY_HOLE"
134 export LDFLAGS
="
-Wl
,-z
,relro
,-z
,now"
136 # Hard-code path to links to avoid unnecessary builddep
137 export LYNX_PATH
=/usr
/bin
/links
140 --enable-layout
=IHttpd \
141 --sysconfdir
='
/etc' \
142 --includedir
='
/usr
/include
/ihttpd' \
143 --libexecdir
='
/usr
/lib64
/ihttpd
/modules' \
144 --datadir
='
/usr
/share
/ihttpd' \
148 --with
-program
-name
='
%name' \
151 --disable
-distcache \
153 --enable-auth
-basic \
154 --enable-authn
-core \
155 --enable-authn
-file \
156 --enable-authz
-core \
157 --enable-authz
-host \
158 --enable-authz
-user \
160 --enable-socache
-shmcb \
164 --enable-log
-config \
167 --enable-modules
=none \
168 --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'
172 export CFLAGS
="$RPM_OPT_FLAGS"
173 gcc index.bin.c
-o index.bin
178 install -D
-p
-m
755 ihttpd
%{buildroot}%{_sbindir}/ihttpd
180 #IHttpd dracut config
181 install -D
-p
-m
644 %{SOURCE18} %{buildroot}%{_sysconfdir}/dracut.conf.d/99-%{name}.conf
183 #IHttpd dracut module
184 install -d
-m
755 %{buildroot}%{_prefix}/lib
/dracut
/modules.d
/99ihttpd
185 install -D
-p
-m
755 %{SOURCE19} %{buildroot}%{_prefix}/lib
/dracut
/modules.d
/99ihttpd
/module
-setup.sh
188 install -d
-m
755 %{buildroot}%{_prefix}/lib/%{name}
189 install -D
-p
-m
755 index.bin
%{buildroot}%{_prefix}/lib/%{name}/
190 install -D
-p
-m
755 %{SOURCE2} %{buildroot}%{_prefix}/lib/%{name}/reboot.bin
191 install -D
-p
-m
644 %{SOURCE20} %{buildroot}%{_prefix}/lib/%{name}/
192 install -D
-p
-m
644 %{SOURCE15} %{buildroot}%{_prefix}/lib/%{name}/
193 install -D
-p
-m
644 %{SOURCE16} %{buildroot}%{_prefix}/lib/%{name}/
199 %_create_ssl_certificate %{name}
202 %config(noreplace
) %{_prefix}/lib/%{name}/%{name}.conf
203 %config(noreplace
) %{_sysconfdir}/dracut.conf.d/99-%{name}.conf
205 %dir %{_prefix}/lib
/dracut
/modules.d
/99ihttpd
206 %{_prefix}/lib
/dracut
/modules.d
/99ihttpd
/module
-setup.sh
207 %dir %{_prefix}/lib/%{name}
208 %{_prefix}/lib/%{name}/%{name}.service
209 %{_prefix}/lib/%{name}/debug
-sshd.service
210 %{_prefix}/lib/%{name}/index.bin
211 %{_prefix}/lib/%{name}/reboot.bin