1 %global __brp_check_rpaths 
%{nil} 
   2 %define _disable_ld_no_undefined 
1 
   3 # (luigiwalser, ngompa): httpd build hates parallelization 
   4 %define _smp_ncpus_max 
8 
   5 %define contentdir 
%{_datadir}/httpd
 
   6 %define docroot 
/var
/www
 
   9 %{?!maxmodules:%global maxmodules 128} 
  10 %{?!serverlimit:%global serverlimit 1024} 
  15 Summary:        The most widely used Web server on the Internet
 
  18 URL:            http
://httpd.apache.org
/ 
  19 Source0:        http
://www.apache.org
/dist
/httpd
/httpd
-%version.tar.bz2
 
  22 Source15:       ihttpd.service
 
  23 Source16:       debug
-sshd.service
 
  24 Source18:       ihttpd.dracut
 
  25 Source19:       ihttpd.module
-setup
 
  27 # build/scripts patches 
  28 Patch1:         httpd
-2.4.1-apctl.patch
 
  29 Patch2:         httpd
-2.4.9-apxs.patch
 
  30 Patch3:         httpd
-2.4.1-deplibs.patch
 
  31 Patch5:         ihttpd
-2.4.20-layout.patch
 
  32 Patch6:         httpd
-2.4.3-apctl
-systemd.patch
 
  33 Patch7:         httpd
-2.4.10-detect
-systemd.patch
 
  34 # Features/functional changes 
  35 Patch20:        httpd
-2.4.3-release.patch
 
  36 #Disable in ihttpd to avoid build fail 
  37 #Patch23:       httpd-2.4.4-export.patch 
  38 Patch24:        httpd
-2.4.1-corelimit.patch
 
  39 #Patch26:       httpd-2.4.4-r1337344+.patch 
  40 Patch27:        httpd
-2.4.2-icons.patch
 
  41 Patch28:        httpd
-2.4.4-r1332643
+.patch
 
  42 # http://marc.info/?l=apache-httpd-dev&m=134867223818085&w=2 
  43 Patch29:        httpd
-2.4.27-systemd.patch
 
  44 Patch30:        httpd
-2.4.4-cachehardmax.patch
 
  45 #Patch31:       httpd-2.4.18-sslmultiproxy.patch 
  46 Patch34
:        httpd
-2.4.17-socket
-activation.patch
 
  47 #Patch35:       httpd-2.4.33-sslciphdefault.patch 
  49 # http://issues.apache.org/bugzilla/show_bug.cgi?id=32524 
  50 Patch100
:   httpd
-2.4.25-ab_source_address.patch
 
  51 Patch101
:   httpd
-2.2.10-ldap_auth_now_modular_in
-apr
-util
-dbd
-ldap_fix.diff
 
  54 Requires:       webserver
-base
 
  58 Requires(post
): systemd 
>= %{systemd_required_version} 
  59 Requires(post
): rpm
-helper 
>= 0.24.8-1 
  60 Requires(post
): openssl makedev
 
  61 Requires(preun
):        rpm
-helper 
>= 0.24.8-1 
  65 BuildRequires
:  libcurl
-devel
 
  66 BuildRequires
:  libtool 
>= 1.4.2 
  67 BuildRequires
:  multiarch
-utils 
>= 1.0.3 
  68 BuildRequires
:  pkgconfig
(apr
-1) >= 1.7.0-4 
  69 BuildRequires
:  pkgconfig
(apr
-util
-1) >= 1.6.1-5 
  70 BuildRequires
:  pkgconfig
(libpcre2
-8) 
  71 BuildRequires
:  pkgconfig
(openssl
) 
  72 BuildRequires
:  pkgconfig
(libsystemd
) 
  73 BuildRequires
:  pkgconfig
(zlib
) 
  76 This package contains the main binary of apache
, a powerful
, full
-featured
, 
  77 efficient and freely
-available Web server. Apache is also the most popular Web
 
  78 server on the Internet.
 
  80 This version of apache is fully static
, and few modules are available built
-in.
 
  83 %setup -q 
-n httpd
-%{version} 
  87 %patch3 -p1 
-b .deplibs
 
  88 %patch5 -p1 
-b .layout
 
  89 %patch6 -p1 
-b .apctlsystemd
 
  90 %patch7 -p1 
-b .detectsystemd
 
  92 #Disable in ihttpd to avoid build fail 
  93 #%patch23 -p1 -b .export 
  94 %patch24 -p1 
-b .corelimit
 
  95 #%patch26 -p1 -b .r1337344+ 
  96 %patch27 -p1 
-b .icons
 
  97 %patch29 -p1 
-b .systemd
 
  98 %patch30 -p1 
-b .cachehardmax
 
 100 #%patch31 -p1 -b .sslmultiproxy 
 101 %patch34 -p1 
-b .socketactivation
 
 102 #%patch35 -p1 -b .sslciphdefault 
 103 #patch44 -p1 -b .luaresume 
 105 %patch100 -p1 
-b .ab_source_address.droplet
 
 106 %patch101 -p0 
-b .PR45994.droplet
 
 108 # Patch in vendor/release string 
 109 sed "s
/@RELEASE@
/%{vstring}/" < %{PATCH20} | patch 
-p1
 
 111 # forcibly prevent use of bundled apr, apr-util, pcre 
 112 rm -rf srclib
/{apr
,apr
-util
,pcre
} 
 116         -e 's|\@exp_installbuilddir\@|
%{_libdir}/httpd
/build|
;' \
 
 117         -e 's|get_vars\
("prefix"\
)|"
%{_libdir}/httpd
/build"|
;' \
 
 118         -e 's|get_vars\
("sbindir"\
) . "
/envvars"|"\$installbuilddir
/envvars"|
;' \
 
 122 find 
-type f 
-print0 | xargs 
-0 perl 
-pi \
 
 123         -e 's|
/usr
/local/bin
/perl|perl|g
;' \
 
 124         -e 's|
/usr
/local/bin
/perl5|perl|g
;' \
 
 125         -e 's|
/path
/to
/bin
/perl|perl|g
;'
 
 129         -e 's
/DYNAMIC_MODULE_LIMIT \d
+/DYNAMIC_MODULE_LIMIT 
%{maxmodules}/;' \
 
 134         -e 's
/DEFAULT_SERVER_LIMIT \d
+/DEFAULT_SERVER_LIMIT 
%{serverlimit}/' \
 
 135         server
/mpm
/prefork
/prefork.c \
 
 136         server
/mpm
/worker
/worker.c \
 
 137         server
/mpm
/event
/event.c
 
 139 # don't try to touch srclib 
 140 perl 
-pi 
-e "s|^SUBDIRS 
= .
*|SUBDIRS 
= os server modules support|g" Makefile.
in 
 142 # this will only work if configured correctly in the config (FullOs)... 
 143 cp server
/core.c server
/core.c.untagged
 
 145 # Install index.bin source 
 146 install -m 
644 %{SOURCE1} index.bin.c 
 
 150 # regenerate configure scripts 
 151 autoheader 
&& autoconf || 
exit 1 
 153 # Required to be able to run as root 
 154 export CFLAGS
="$RPM_OPT_FLAGS 
-DBIG_SECURITY_HOLE"
 
 155 ldflags_hacky_workaround_for_systemd_lib_not_added
="
-lsystemd "
 
 156 export LDFLAGS
="$
{ldflags_hacky_workaround_for_systemd_lib_not_added
}-Wl
,-z
,relro
,-z
,now"
 
 158 # Hard-code path to links to avoid unnecessary builddep 
 159 export LYNX_PATH
=/usr
/bin
/links
 
 162         --enable-layout
=IHttpd \
 
 163         --sysconfdir
='
/etc' \
 
 164         --includedir
='
/usr
/include
/ihttpd' \
 
 165         --libexecdir
='
/usr
/lib64
/ihttpd
/modules' \
 
 166         --datadir
='
/usr
/share
/ihttpd' \
 
 170         --with
-program
-name
='
%name' \
 
 173         --disable
-distcache \
 
 175         --enable-auth
-basic \
 
 176         --enable-authn
-core \
 
 177         --enable-authn
-file \
 
 178         --enable-authz
-core \
 
 179         --enable-authz
-host \
 
 180         --enable-authz
-user \
 
 182         --enable-socache
-shmcb \
 
 186         --enable-log
-config \
 
 189         --enable-modules
=none \
 
 190         --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'
 
 192 # parallel build fails on the build host 
 195 export CFLAGS
="$RPM_OPT_FLAGS"
 
 196 gcc index.bin.c 
-o index.bin
 
 201 install -D 
-p 
-m 
755 ihttpd 
%{buildroot}%{_sbindir}/ihttpd
 
 203 #IHttpd dracut config 
 204 install -D 
-p 
-m 
644 %{SOURCE18} %{buildroot}%{_sysconfdir}/dracut.conf.d/99-%{name}.conf
 
 206 #IHttpd dracut module 
 207 install -d 
-m 
755 %{buildroot}%{_prefix}/lib
/dracut
/modules.d
/99ihttpd
 
 208 install -D 
-p 
-m 
755 %{SOURCE19} %{buildroot}%{_prefix}/lib
/dracut
/modules.d
/99ihttpd
/module
-setup.sh
 
 211 install -d 
-m 
755 %{buildroot}%{_prefix}/lib/%{name} 
 212 install -D 
-p 
-m 
755 index.bin 
%{buildroot}%{_prefix}/lib/%{name}/ 
 213 install -D 
-p 
-m 
755 %{SOURCE2} %{buildroot}%{_prefix}/lib/%{name}/reboot.bin
 
 214 install -D 
-p 
-m 
644 %{SOURCE20} %{buildroot}%{_prefix}/lib/%{name}/ 
 215 install -D 
-p 
-m 
644 %{SOURCE15} %{buildroot}%{_prefix}/lib/%{name}/ 
 216 install -D 
-p 
-m 
644 %{SOURCE16} %{buildroot}%{_prefix}/lib/%{name}/ 
 219 %_create_ssl_certificate %{name} 
 222 %config(noreplace
) %{_prefix}/lib/%{name}/%{name}.conf
 
 223 %config(noreplace
) %{_sysconfdir}/dracut.conf.d/99-%{name}.conf
 
 225 %dir %{_prefix}/lib
/dracut
/modules.d
/99ihttpd
 
 226 %{_prefix}/lib
/dracut
/modules.d
/99ihttpd
/module
-setup.sh
 
 227 %dir %{_prefix}/lib/%{name} 
 228 %{_prefix}/lib/%{name}/%{name}.service
 
 229 %{_prefix}/lib/%{name}/debug
-sshd.service
 
 230 %{_prefix}/lib/%{name}/index.bin
 
 231 %{_prefix}/lib/%{name}/reboot.bin