|
@@ -1,3 +1,5 @@
|
|
|
|
+%bcond_with systemd
|
|
|
|
+
|
|
%define contentdir %{_datadir}/apache2
|
|
%define contentdir %{_datadir}/apache2
|
|
%define docroot /var/www/apache2
|
|
%define docroot /var/www/apache2
|
|
%define suexec_caller www-data
|
|
%define suexec_caller www-data
|
|
@@ -6,17 +8,18 @@
|
|
%define pkgname apache2
|
|
%define pkgname apache2
|
|
%define vstring Vine
|
|
%define vstring Vine
|
|
|
|
|
|
-Summary: Apache HTTP Server
|
|
|
|
Name: %{pkgname}
|
|
Name: %{pkgname}
|
|
-Version: 2.4.41
|
|
+Summary: Apache HTTP Server
|
|
-Release: 1%{_dist_release}
|
|
+Version: 2.4.46
|
|
-URL: http://httpd.apache.org/
|
|
+Release: 1%{_dist_release}%{?with_systemd:.systemd}
|
|
-
|
|
+Group: servers
|
|
Vendor: Project Vine
|
|
Vendor: Project Vine
|
|
Distribution: Vine Linux
|
|
Distribution: Vine Linux
|
|
Packager: daisuke
|
|
Packager: daisuke
|
|
|
|
|
|
-Source0: http://www.apache.org/dist/httpd/httpd-%{version}.tar.bz2
|
|
+License: Apache Software License
|
|
|
|
+URL: https://httpd.apache.org/
|
|
|
|
+Source0: https://www.apache.org/dist/httpd/httpd-%{version}.tar.bz2
|
|
Source2: index.html
|
|
Source2: index.html
|
|
Source3: apache2.logrotate
|
|
Source3: apache2.logrotate
|
|
Source4: apache2.init
|
|
Source4: apache2.init
|
|
@@ -44,40 +47,49 @@ Source31: README.confmod
|
|
# add vine entry to config.layout
|
|
# add vine entry to config.layout
|
|
Source100: vine-config.layout
|
|
Source100: vine-config.layout
|
|
|
|
|
|
|
|
+Source105: httpd-ssl-pass-dialog
|
|
|
|
+Source106: httpd.tmpfiles
|
|
|
|
+Source107: httpd.service
|
|
|
|
+Source125: 00-systemd.conf
|
|
|
|
+Source128: httpd.socket
|
|
|
|
+Source127: 10-listen443.conf
|
|
|
|
+Source140: htcacheclean.service
|
|
|
|
+Source141: htcacheclean.sysconf
|
|
|
|
+Source142: httpd-init.service
|
|
|
|
+Source143: httpd-ssl-gencerts
|
|
|
|
+Source144: httpd@.service
|
|
|
|
+
|
|
# build/scripts patches
|
|
# build/scripts patches
|
|
-Patch2: httpd-2.4.9-apxs.patch
|
|
+Patch2: httpd-2.4.43-apxs.patch
|
|
-Patch3: httpd-2.4.1-deplibs.patch
|
|
+Patch3: httpd-2.4.43-deplibs.patch
|
|
# Needed for socket activation and mod_systemd patch
|
|
# Needed for socket activation and mod_systemd patch
|
|
-#Patch19: httpd-2.4.25-detect-systemd.patch
|
|
+Patch19: httpd-2.4.43-detect-systemd.patch
|
|
# Features/functional changes
|
|
# Features/functional changes
|
|
-Patch21: httpd-2.4.39-r1842929+.patch
|
|
+Patch21: httpd-2.4.43-r1842929+.patch
|
|
-Patch23: httpd-2.4.41-export.patch
|
|
+Patch22: httpd-2.4.43-mod_systemd.patch
|
|
-Patch24: httpd-2.4.1-corelimit.patch
|
|
+Patch23: httpd-2.4.43-export.patch
|
|
-#Patch25: httpd-2.4.25-selinux.patch
|
|
+Patch24: httpd-2.4.43-corelimit.patch
|
|
-#Patch26: httpd-2.4.4-r1337344+.patch
|
|
+Patch25: httpd-2.4.43-selinux.patch
|
|
-Patch27: httpd-2.4.2-icons.patch
|
|
+Patch26: httpd-2.4.43-gettid.patch
|
|
-#Patch29: httpd-2.4.27-systemd.patch
|
|
+Patch27: httpd-2.4.43-icons.patch
|
|
-Patch30: httpd-2.4.4-cachehardmax.patch
|
|
+Patch30: httpd-2.4.43-cachehardmax.patch
|
|
-Patch31: httpd-2.4.33-sslmultiproxy.patch
|
|
+Patch31: httpd-2.4.43-sslmultiproxy.patch
|
|
-Patch34: httpd-2.4.17-socket-activation.patch
|
|
+Patch34: httpd-2.4.43-socket-activation.patch
|
|
-Patch36: httpd-2.4.38-r1830819+.patch
|
|
+Patch38: httpd-2.4.43-sslciphdefault.patch
|
|
-#Patch37: httpd-2.4.34-r1827912+.patch
|
|
+Patch39: httpd-2.4.43-sslprotdefault.patch
|
|
-Patch38: httpd-2.4.34-sslciphdefault.patch
|
|
+Patch40: httpd-2.4.43-r1861269.patch
|
|
-Patch39: httpd-2.4.37-sslprotdefault.patch
|
|
+Patch41: httpd-2.4.43-r1861793+.patch
|
|
-Patch40: httpd-2.4.39-r1861269.patch
|
|
+Patch42: httpd-2.4.43-r1828172+.patch
|
|
-Patch41: httpd-2.4.37-r1861793+.patch
|
|
+Patch43: httpd-2.4.43-sslcoalesce.patch
|
|
-Patch42: httpd-2.4.37-r1828172+.patch
|
|
+Patch44: httpd-2.4.43-lua-resume.patch
|
|
|
|
|
|
# Bug fixes
|
|
# Bug fixes
|
|
# https://bugzilla.redhat.com/show_bug.cgi?id=1397243
|
|
# https://bugzilla.redhat.com/show_bug.cgi?id=1397243
|
|
-Patch58: httpd-2.4.34-r1738878.patch
|
|
+Patch60: httpd-2.4.43-enable-sslv3.patch
|
|
-Patch60: httpd-2.4.34-enable-sslv3.patch
|
|
+Patch62: httpd-2.4.43-r1870095+.patch
|
|
|
|
|
|
# Security fixes
|
|
# Security fixes
|
|
|
|
|
|
-
|
|
|
|
-License: Apache Software License
|
|
|
|
-Group: System Environment/Daemons
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
|
BuildRequires: db4-devel, expat-devel, xmlto
|
|
BuildRequires: db4-devel, expat-devel, xmlto
|
|
BuildRequires: findutils, perl, openldap-devel, zlib-devel
|
|
BuildRequires: findutils, perl, openldap-devel, zlib-devel
|
|
@@ -85,12 +97,19 @@ BuildRequires: apr-devel, apr-util-devel
|
|
BuildRequires: pcre-devel, sqlite3-devel
|
|
BuildRequires: pcre-devel, sqlite3-devel
|
|
BuildRequires: lua-devel, libxml2-devel
|
|
BuildRequires: lua-devel, libxml2-devel
|
|
BuildRequires: libnghttp2-devel
|
|
BuildRequires: libnghttp2-devel
|
|
|
|
+BuildRequires: brotli-devel
|
|
BuildRequires: www-common
|
|
BuildRequires: www-common
|
|
Requires: mailcap, gawk, file, findutils, apr, apr-util
|
|
Requires: mailcap, gawk, file, findutils, apr, apr-util
|
|
Requires(pre): www-common
|
|
Requires(pre): www-common
|
|
-Requires(pre): chkconfig, mktemp, fileutils
|
|
+Requires(pre): mktemp, fileutils
|
|
|
|
+%if %{with systemd}
|
|
|
|
+BuildRequires: systemd-devel
|
|
|
|
+%{?systemd_requires}
|
|
|
|
+%else
|
|
|
|
+Requires(pre): chkconfig
|
|
Requires(pre): sh-utils, textutils, shadow-utils
|
|
Requires(pre): sh-utils, textutils, shadow-utils
|
|
Requires(post): alternatives
|
|
Requires(post): alternatives
|
|
|
|
+%endif
|
|
Provides: webserver
|
|
Provides: webserver
|
|
Provides: httpd = %{version}
|
|
Provides: httpd = %{version}
|
|
Provides: httpd-mmn = %{mmn}
|
|
Provides: httpd-mmn = %{mmn}
|
|
@@ -103,8 +122,9 @@ Apache is a powerful, full-featured, efficient, and freely-available
|
|
Web server. Apache is also the most popular Web server on the
|
|
Web server. Apache is also the most popular Web server on the
|
|
Internet.
|
|
Internet.
|
|
|
|
|
|
|
|
+
|
|
%package devel
|
|
%package devel
|
|
-Group: Development/Libraries
|
|
+Group: programming
|
|
Summary: Development tools for the Apache HTTP server.
|
|
Summary: Development tools for the Apache HTTP server.
|
|
Requires: libtool, apache2 = %{version}
|
|
Requires: libtool, apache2 = %{version}
|
|
Requires: apr-devel, apr-util-devel
|
|
Requires: apr-devel, apr-util-devel
|
|
@@ -117,8 +137,9 @@ If you are installing the Apache HTTP server and you want to be
|
|
able to compile or develop additional modules for Apache, you need
|
|
able to compile or develop additional modules for Apache, you need
|
|
to install this package.
|
|
to install this package.
|
|
|
|
|
|
|
|
+
|
|
%package manual
|
|
%package manual
|
|
-Group: Applications/Documentation
|
|
+Group: documentation
|
|
Summary: Documentation for the Apache HTTP server.
|
|
Summary: Documentation for the Apache HTTP server.
|
|
|
|
|
|
%description manual
|
|
%description manual
|
|
@@ -126,8 +147,9 @@ The httpd-manual package contains the complete manual and
|
|
reference guide for the Apache HTTP server. The information can
|
|
reference guide for the Apache HTTP server. The information can
|
|
also be found at http://httpd.apache.org/docs/.
|
|
also be found at http://httpd.apache.org/docs/.
|
|
|
|
|
|
|
|
+
|
|
%package -n mod_ssl-apache2
|
|
%package -n mod_ssl-apache2
|
|
-Group: System Environment/Daemons
|
|
+Group: servers
|
|
Summary: SSL/TLS module for the Apache HTTP server
|
|
Summary: SSL/TLS module for the Apache HTTP server
|
|
Epoch: 1
|
|
Epoch: 1
|
|
BuildRequires: openssl-devel
|
|
BuildRequires: openssl-devel
|
|
@@ -139,35 +161,39 @@ The mod_ssl module provides strong cryptography for the Apache Web
|
|
server via the Secure Sockets Layer (SSL) and Transport Layer
|
|
server via the Secure Sockets Layer (SSL) and Transport Layer
|
|
Security (TLS) protocols.
|
|
Security (TLS) protocols.
|
|
|
|
|
|
|
|
+
|
|
%prep
|
|
%prep
|
|
%setup -q -n httpd-%{version}
|
|
%setup -q -n httpd-%{version}
|
|
|
|
|
|
%patch2 -p1 -b .apxs
|
|
%patch2 -p1 -b .apxs
|
|
%patch3 -p1 -b .deplibs
|
|
%patch3 -p1 -b .deplibs
|
|
-#%patch6 -p1 -b .apctlsystemd
|
|
+%if %{with systemd}
|
|
-
|
|
+%patch19 -p1 -b .detectsystemd
|
|
-#%patch19 -p1 -b .detectsystemd
|
|
+%endif
|
|
-
|
|
|
|
%patch21 -p1 -b .r1842929+
|
|
%patch21 -p1 -b .r1842929+
|
|
|
|
+%if %{with systemd}
|
|
|
|
+%patch22 -p1 -b .mod_systemd
|
|
%patch23 -p1 -b .export
|
|
%patch23 -p1 -b .export
|
|
|
|
+%endif
|
|
%patch24 -p1 -b .corelimit
|
|
%patch24 -p1 -b .corelimit
|
|
-#%patch25 -p1 -b .selinux
|
|
+%patch25 -p1 -b .selinux
|
|
-#patch26 -p1 -b .r1337344+
|
|
+%patch26 -p1 -b .gettid
|
|
%patch27 -p1 -b .icons
|
|
%patch27 -p1 -b .icons
|
|
-#patch29 -p1 -b .systemd
|
|
|
|
%patch30 -p1 -b .cachehardmax
|
|
%patch30 -p1 -b .cachehardmax
|
|
-#%patch31 -p1 -b .sslmultiproxy
|
|
+#patch31 -p1 -b .sslmultiproxy
|
|
|
|
+%if %{with systemd}
|
|
%patch34 -p1 -b .socketactivation
|
|
%patch34 -p1 -b .socketactivation
|
|
-%patch36 -p1 -b .r1830819+
|
|
+%endif
|
|
-#%patch37 -p1 -b .r1827912+
|
|
|
|
%patch38 -p1 -b .sslciphdefault
|
|
%patch38 -p1 -b .sslciphdefault
|
|
%patch39 -p1 -b .sslprotdefault
|
|
%patch39 -p1 -b .sslprotdefault
|
|
%patch40 -p1 -b .r1861269
|
|
%patch40 -p1 -b .r1861269
|
|
%patch41 -p1 -b .r1861793+
|
|
%patch41 -p1 -b .r1861793+
|
|
%patch42 -p1 -b .r1828172+
|
|
%patch42 -p1 -b .r1828172+
|
|
|
|
+%patch43 -p1 -b .sslcoalesce
|
|
|
|
+#patch44 -p1 -b .luaresume
|
|
|
|
|
|
-%patch58 -p1 -b .r1738878
|
|
|
|
%patch60 -p1 -b .enable-sslv3
|
|
%patch60 -p1 -b .enable-sslv3
|
|
|
|
+%patch62 -p1 -b .r1870095
|
|
|
|
|
|
perl -pi -e 's|/httpd/build|/apache2/build|' support/apxs.in
|
|
perl -pi -e 's|/httpd/build|/apache2/build|' support/apxs.in
|
|
|
|
|
|
@@ -181,6 +207,7 @@ sed -i '/suexec/s,setcap ,echo Skipping setcap for ,' Makefile.in
|
|
sed -e "s|${prefix}/lib|${prefix}/%{_lib}|" \
|
|
sed -e "s|${prefix}/lib|${prefix}/%{_lib}|" \
|
|
< $RPM_SOURCE_DIR/vine-config.layout >> config.layout
|
|
< $RPM_SOURCE_DIR/vine-config.layout >> config.layout
|
|
|
|
|
|
|
|
+
|
|
%build
|
|
%build
|
|
# remove bundled apr, apr-util, pcre
|
|
# remove bundled apr, apr-util, pcre
|
|
rm -rf srclib/{apr,apr-util,pcre}
|
|
rm -rf srclib/{apr,apr-util,pcre}
|
|
@@ -188,11 +215,13 @@ rm -rf srclib/{apr,apr-util,pcre}
|
|
# regenerate configure scripts
|
|
# regenerate configure scripts
|
|
autoheader && autoconf || exit 1
|
|
autoheader && autoconf || exit 1
|
|
|
|
|
|
-CFLAGS="$RPM_OPT_FLAGS"
|
|
+export CFLAGS="$RPM_OPT_FLAGS"
|
|
-SH_LDFLAGS="-Wl,-z,relro"
|
|
+export LDFLAGS="-Wl,-z,relro,-z,now"
|
|
-export CFLAGS SH_LDFLAGS
|
|
+%if %{with systemd}
|
|
|
|
+export HTTPD_LIBS="-lsystemd"
|
|
|
|
+%endif
|
|
|
|
|
|
-AP_CONFOPTS="\
|
|
+./configure \
|
|
--prefix=%{_sysconfdir}/apache2 \
|
|
--prefix=%{_sysconfdir}/apache2 \
|
|
--exec-prefix=%{_prefix} \
|
|
--exec-prefix=%{_prefix} \
|
|
--bindir=%{_bindir} \
|
|
--bindir=%{_bindir} \
|
|
@@ -200,7 +229,7 @@ AP_CONFOPTS="\
|
|
--mandir=%{_mandir} \
|
|
--mandir=%{_mandir} \
|
|
--libdir=%{_libdir} \
|
|
--libdir=%{_libdir} \
|
|
--sysconfdir=%{_sysconfdir}/apache2/conf \
|
|
--sysconfdir=%{_sysconfdir}/apache2/conf \
|
|
- --includedir=%{_includedir}/apache2 \
|
|
+ --includedir=%{_includedir}/apache2 \
|
|
--libexecdir=%{_libdir}/apache2/modules \
|
|
--libexecdir=%{_libdir}/apache2/modules \
|
|
--datadir=%{contentdir} \
|
|
--datadir=%{contentdir} \
|
|
--with-installbuilddir=%{_libdir}/apache2/build \
|
|
--with-installbuilddir=%{_libdir}/apache2/build \
|
|
@@ -209,39 +238,84 @@ AP_CONFOPTS="\
|
|
--with-ldap \
|
|
--with-ldap \
|
|
--enable-ldap --enable-authnz-ldap \
|
|
--enable-ldap --enable-authnz-ldap \
|
|
--enable-mods-shared=all \
|
|
--enable-mods-shared=all \
|
|
- --enable-cache=shared \
|
|
+ --enable-cache=shared \
|
|
- --enable-cgi=shared \
|
|
+ --enable-cgi=shared \
|
|
- --enable-cgid=shared \
|
|
+ --enable-cgid=shared \
|
|
- --enable-rewrite=shared \
|
|
+ --enable-rewrite=shared \
|
|
- --enable-disk-cache=shared \
|
|
+ --enable-disk-cache=shared \
|
|
- --enable-file-cache=shared \
|
|
+ --enable-file-cache=shared \
|
|
- --enable-mem-cache=shared \
|
|
+ --enable-mem-cache=shared \
|
|
--enable-authn-anon --enable-authn-alias \
|
|
--enable-authn-anon --enable-authn-alias \
|
|
--with-apr=%{_prefix} --with-apr-util=%{_prefix} \
|
|
--with-apr=%{_prefix} --with-apr-util=%{_prefix} \
|
|
--enable-suexec --with-suexec \
|
|
--enable-suexec --with-suexec \
|
|
- --enable-suexec-capabilities \
|
|
+ --enable-suexec-capabilities \
|
|
--with-suexec-caller=%{suexec_caller} \
|
|
--with-suexec-caller=%{suexec_caller} \
|
|
--with-suexec-docroot=%{docroot} \
|
|
--with-suexec-docroot=%{docroot} \
|
|
--with-suexec-logfile=%{_localstatedir}/log/apache2/suexec.log \
|
|
--with-suexec-logfile=%{_localstatedir}/log/apache2/suexec.log \
|
|
--with-suexec-bin=%{_sbindir}/suexec \
|
|
--with-suexec-bin=%{_sbindir}/suexec \
|
|
--with-suexec-uidmin=500 --with-suexec-gidmin=500 \
|
|
--with-suexec-uidmin=500 --with-suexec-gidmin=500 \
|
|
- --with-pcre \
|
|
+ --with-brotli \
|
|
--enable-pie \
|
|
--enable-pie \
|
|
|
|
+ --with-pcre \
|
|
--enable-ssl --with-ssl \
|
|
--enable-ssl --with-ssl \
|
|
--enable-deflate \
|
|
--enable-deflate \
|
|
--enable-proxy --enable-proxy-connect \
|
|
--enable-proxy --enable-proxy-connect \
|
|
--enable-proxy-http --enable-proxy-ftp \
|
|
--enable-proxy-http --enable-proxy-ftp \
|
|
--enable-case-filter --enable-case-filter-in \
|
|
--enable-case-filter --enable-case-filter-in \
|
|
--enable-http2 \
|
|
--enable-http2 \
|
|
- --enable-mpms-shared=all"
|
|
+%if %{with systemd}
|
|
-./configure ${AP_CONFOPTS}
|
|
+ --enable-systemd \
|
|
|
|
+%endif
|
|
|
|
+ --enable-mpms-shared=all
|
|
|
|
+
|
|
make %{?_smp_mflags}
|
|
make %{?_smp_mflags}
|
|
|
|
|
|
|
|
+
|
|
%install
|
|
%install
|
|
rm -rf $RPM_BUILD_ROOT
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
|
make DESTDIR=$RPM_BUILD_ROOT install
|
|
make DESTDIR=$RPM_BUILD_ROOT install
|
|
|
|
|
|
|
|
+%if %{with systemd}
|
|
|
|
+# Install systemd service files
|
|
|
|
+mkdir -p $RPM_BUILD_ROOT%{_unitdir}
|
|
|
|
+for s in httpd.service htcacheclean.service httpd.socket \
|
|
|
|
+ httpd@.service httpd-init.service; do
|
|
|
|
+ install -p -m 644 $RPM_SOURCE_DIR/${s} \
|
|
|
|
+ $RPM_BUILD_ROOT%{_unitdir}/${s}
|
|
|
|
+done
|
|
|
|
+# install systemd override drop directory
|
|
|
|
+# Web application packages can drop snippets into this location if
|
|
|
|
+# they need ExecStart[pre|post].
|
|
|
|
+mkdir $RPM_BUILD_ROOT%{_unitdir}/httpd.service.d
|
|
|
|
+mkdir $RPM_BUILD_ROOT%{_unitdir}/httpd.socket.d
|
|
|
|
+
|
|
|
|
+install -m 644 -p $RPM_SOURCE_DIR/10-listen443.conf \
|
|
|
|
+ $RPM_BUILD_ROOT%{_unitdir}/httpd.socket.d/10-listen443.conf
|
|
|
|
+mkdir $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig
|
|
|
|
+install -m 644 -p $RPM_SOURCE_DIR/htcacheclean.sysconf \
|
|
|
|
+ $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/htcacheclean
|
|
|
|
+# tmpfiles.d configuration
|
|
|
|
+mkdir -p $RPM_BUILD_ROOT%{_tmpfilesdir}
|
|
|
|
+install -m 644 -p $RPM_SOURCE_DIR/httpd.tmpfiles \
|
|
|
|
+ $RPM_BUILD_ROOT%{_tmpfilesdir}/httpd.conf
|
|
|
|
+
|
|
|
|
+# install http-ssl-pass-dialog
|
|
|
|
+mkdir -p $RPM_BUILD_ROOT%{_libexecdir}
|
|
|
|
+install -m755 $RPM_SOURCE_DIR/httpd-ssl-pass-dialog \
|
|
|
|
+ $RPM_BUILD_ROOT%{_libexecdir}/httpd-ssl-pass-dialog
|
|
|
|
+# install http-ssl-gencerts
|
|
|
|
+install -m755 $RPM_SOURCE_DIR/httpd-ssl-gencerts \
|
|
|
|
+ $RPM_BUILD_ROOT%{_libexecdir}/httpd-ssl-gencerts
|
|
|
|
+%else
|
|
|
|
+# install SYSV init stuff
|
|
|
|
+mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d
|
|
|
|
+install -m755 $RPM_SOURCE_DIR/apache2.init \
|
|
|
|
+ $RPM_BUILD_ROOT/etc/rc.d/init.d/apache2
|
|
|
|
+%{__perl} -pi -e "s:\@docdir\@:%{_docdir}/%{name}-%{version}:g" \
|
|
|
|
+ $RPM_BUILD_ROOT/etc/rc.d/init.d/apache2
|
|
|
|
+%endif
|
|
|
|
+
|
|
# create apache2ctl symlink
|
|
# create apache2ctl symlink
|
|
ln -sf apachectl $RPM_BUILD_ROOT%{_sbindir}/apache2ctl
|
|
ln -sf apachectl $RPM_BUILD_ROOT%{_sbindir}/apache2ctl
|
|
|
|
|
|
@@ -260,6 +334,10 @@ for f in 00-base.conf 00-mpm.conf 00-lua.conf 01-cgi.conf 00-dav.conf \
|
|
install -m 644 -p $RPM_SOURCE_DIR/$f \
|
|
install -m 644 -p $RPM_SOURCE_DIR/$f \
|
|
$RPM_BUILD_ROOT%{_sysconfdir}/apache2/conf.modules.d/$f
|
|
$RPM_BUILD_ROOT%{_sysconfdir}/apache2/conf.modules.d/$f
|
|
done
|
|
done
|
|
|
|
+%if %{with systemd}
|
|
|
|
+ install -m 644 -p %{SOURCE125} \
|
|
|
|
+ $RPM_BUILD_ROOT%{_sysconfdir}/apache2/conf.modules.d/
|
|
|
|
+%endif
|
|
|
|
|
|
for f in welcome.conf ssl.conf manual.conf userdir.conf; do
|
|
for f in welcome.conf ssl.conf manual.conf userdir.conf; do
|
|
install -m 644 -p $RPM_SOURCE_DIR/$f \
|
|
install -m 644 -p $RPM_SOURCE_DIR/$f \
|
|
@@ -268,10 +346,10 @@ done
|
|
|
|
|
|
# Split-out extra config shipped as default in conf.d:
|
|
# Split-out extra config shipped as default in conf.d:
|
|
for f in autoindex; do
|
|
for f in autoindex; do
|
|
- mv docs/conf/extra/httpd-${f}.conf \
|
|
+ install -m 644 docs/conf/extra/httpd-${f}.conf \
|
|
$RPM_BUILD_ROOT%{_sysconfdir}/apache2/conf.d/${f}.conf
|
|
$RPM_BUILD_ROOT%{_sysconfdir}/apache2/conf.d/${f}.conf
|
|
done
|
|
done
|
|
-
|
|
+
|
|
# Extra config trimmed:
|
|
# Extra config trimmed:
|
|
rm -v docs/conf/extra/httpd-{ssl,userdir}.conf
|
|
rm -v docs/conf/extra/httpd-{ssl,userdir}.conf
|
|
|
|
|
|
@@ -280,11 +358,6 @@ install -m 644 -p $RPM_SOURCE_DIR/httpd.conf \
|
|
$RPM_BUILD_ROOT%{_sysconfdir}/apache2/conf/httpd.conf
|
|
$RPM_BUILD_ROOT%{_sysconfdir}/apache2/conf/httpd.conf
|
|
ln -sf httpd.conf $RPM_BUILD_ROOT%{_sysconfdir}/apache2/conf/apache2.conf
|
|
ln -sf httpd.conf $RPM_BUILD_ROOT%{_sysconfdir}/apache2/conf/apache2.conf
|
|
|
|
|
|
-# tmpfiles.d configuration
|
|
|
|
-mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/tmpfiles.d
|
|
|
|
-install -m 644 -p $RPM_SOURCE_DIR/apache2.tmpfiles \
|
|
|
|
- $RPM_BUILD_ROOT%{_prefix}/lib/tmpfiles.d/apache2.conf
|
|
|
|
-
|
|
|
|
# Other directories
|
|
# Other directories
|
|
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/lib/dav \
|
|
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/lib/dav \
|
|
$RPM_BUILD_ROOT/run/apache2/htcacheclean
|
|
$RPM_BUILD_ROOT/run/apache2/htcacheclean
|
|
@@ -344,13 +417,6 @@ ln -s ../..%{_localstatedir}/log/apache2 $RPM_BUILD_ROOT/etc/apache2/logs
|
|
ln -s /run/apache2 $RPM_BUILD_ROOT/etc/apache2/run
|
|
ln -s /run/apache2 $RPM_BUILD_ROOT/etc/apache2/run
|
|
ln -s ../..%{_libdir}/apache2/modules $RPM_BUILD_ROOT/etc/apache2/modules
|
|
ln -s ../..%{_libdir}/apache2/modules $RPM_BUILD_ROOT/etc/apache2/modules
|
|
|
|
|
|
-# install SYSV init stuff
|
|
|
|
-mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d
|
|
|
|
-install -m755 $RPM_SOURCE_DIR/apache2.init \
|
|
|
|
- $RPM_BUILD_ROOT/etc/rc.d/init.d/apache2
|
|
|
|
-%{__perl} -pi -e "s:\@docdir\@:%{_docdir}/%{name}-%{version}:g" \
|
|
|
|
- $RPM_BUILD_ROOT/etc/rc.d/init.d/apache2
|
|
|
|
-
|
|
|
|
# Install logrotate config
|
|
# Install logrotate config
|
|
mkdir -p $RPM_BUILD_ROOT/etc/logrotate.d
|
|
mkdir -p $RPM_BUILD_ROOT/etc/logrotate.d
|
|
install -m 644 -p $RPM_SOURCE_DIR/apache2.logrotate \
|
|
install -m 644 -p $RPM_SOURCE_DIR/apache2.logrotate \
|
|
@@ -389,24 +455,38 @@ rm -vf \
|
|
rm -rf $RPM_BUILD_ROOT/etc/apache2/conf/{original,extra}
|
|
rm -rf $RPM_BUILD_ROOT/etc/apache2/conf/{original,extra}
|
|
|
|
|
|
|
|
|
|
|
|
+%clean
|
|
|
|
+rm -rf $RPM_BUILD_ROOT
|
|
|
|
+
|
|
|
|
|
|
%triggerpostun -- apache < 2.0
|
|
%triggerpostun -- apache < 2.0
|
|
/sbin/chkconfig --add apache2
|
|
/sbin/chkconfig --add apache2
|
|
|
|
|
|
-
|
|
|
|
%post
|
|
%post
|
|
|
|
+%if %{with systemd}
|
|
|
|
+%systemd_post httpd.service htcacheclean.service httpd.socket
|
|
|
|
+%else
|
|
/sbin/chkconfig --add apache2
|
|
/sbin/chkconfig --add apache2
|
|
|
|
+%endif
|
|
|
|
|
|
%preun
|
|
%preun
|
|
-if [ $1 = 0 ]; then
|
|
+%if %{with systemd}
|
|
|
|
+%systemd_preun httpd.service htcacheclean.service httpd.socket
|
|
|
|
+%else
|
|
|
|
+if [ $1 = 0 -o -x /bin/systemctl ]; then
|
|
/sbin/service apache2 stop > /dev/null 2>&1
|
|
/sbin/service apache2 stop > /dev/null 2>&1
|
|
/sbin/chkconfig --del apache2
|
|
/sbin/chkconfig --del apache2
|
|
fi
|
|
fi
|
|
|
|
+%endif
|
|
|
|
|
|
%postun
|
|
%postun
|
|
|
|
+%if %{with systemd}
|
|
|
|
+%systemd_postun httpd.service htcacheclean.service httpd.socket
|
|
|
|
+%else
|
|
if [ "$1" -ge 1 ]; then
|
|
if [ "$1" -ge 1 ]; then
|
|
/sbin/service apache2 condrestart
|
|
/sbin/service apache2 condrestart
|
|
fi
|
|
fi
|
|
|
|
+%endif
|
|
/sbin/ldconfig
|
|
/sbin/ldconfig
|
|
|
|
|
|
%define sslcert %{_sysconfdir}/pki/tls/certs/localhost.crt
|
|
%define sslcert %{_sysconfdir}/pki/tls/certs/localhost.crt
|
|
@@ -440,8 +520,6 @@ ${FQDN}
|
|
root@${FQDN}
|
|
root@${FQDN}
|
|
EOF
|
|
EOF
|
|
|
|
|
|
-%clean
|
|
|
|
-rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
|
|
|
%files
|
|
%files
|
|
%defattr(-,root,root)
|
|
%defattr(-,root,root)
|
|
@@ -460,7 +538,18 @@ rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
|
%config(noreplace) %{_sysconfdir}/logrotate.d/apache2
|
|
%config(noreplace) %{_sysconfdir}/logrotate.d/apache2
|
|
|
|
|
|
|
|
+%if %{with systemd}
|
|
|
|
+%{_unitdir}/httpd.service
|
|
|
|
+%{_unitdir}/httpd@.service
|
|
|
|
+%{_unitdir}/htcacheclean.service
|
|
|
|
+%{_unitdir}/*.socket
|
|
|
|
+%attr(755,root,root) %dir %{_unitdir}/httpd.service.d
|
|
|
|
+%attr(755,root,root) %dir %{_unitdir}/httpd.socket.d
|
|
|
|
+%config(noreplace) %{_sysconfdir}/sysconfig/htcacheclean
|
|
|
|
+%{_tmpfilesdir}/httpd.conf
|
|
|
|
+%else
|
|
%config %{_sysconfdir}/rc.d/init.d/apache2
|
|
%config %{_sysconfdir}/rc.d/init.d/apache2
|
|
|
|
+%endif
|
|
|
|
|
|
%dir %{_sysconfdir}/apache2/conf.d
|
|
%dir %{_sysconfdir}/apache2/conf.d
|
|
%{_sysconfdir}/apache2/conf.d/README
|
|
%{_sysconfdir}/apache2/conf.d/README
|
|
@@ -475,8 +564,6 @@ rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
|
%dir %{_sysconfdir}/apache2/sites.d
|
|
%dir %{_sysconfdir}/apache2/sites.d
|
|
|
|
|
|
-%{_prefix}/lib/tmpfiles.d/apache2.conf
|
|
|
|
-
|
|
|
|
%{_bindir}/ab
|
|
%{_bindir}/ab
|
|
%{_bindir}/ht*
|
|
%{_bindir}/ht*
|
|
%{_bindir}/logresolve
|
|
%{_bindir}/logresolve
|
|
@@ -517,23 +604,25 @@ rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
|
%{_mandir}/man1/*
|
|
%{_mandir}/man1/*
|
|
%exclude %{_mandir}/man1/apxs*
|
|
%exclude %{_mandir}/man1/apxs*
|
|
-
|
|
|
|
%{_mandir}/man8/*
|
|
%{_mandir}/man8/*
|
|
|
|
|
|
-
|
|
|
|
%files manual
|
|
%files manual
|
|
%defattr(-,root,root)
|
|
%defattr(-,root,root)
|
|
%{contentdir}/manual
|
|
%{contentdir}/manual
|
|
%config(noreplace) %{_sysconfdir}/apache2/conf.d/manual.conf
|
|
%config(noreplace) %{_sysconfdir}/apache2/conf.d/manual.conf
|
|
|
|
|
|
-
|
|
|
|
%files -n mod_ssl-apache2
|
|
%files -n mod_ssl-apache2
|
|
%defattr(-,root,root)
|
|
%defattr(-,root,root)
|
|
%{_libdir}/apache2/modules/mod_ssl.so
|
|
%{_libdir}/apache2/modules/mod_ssl.so
|
|
%config(noreplace) %{_sysconfdir}/apache2/conf.modules.d/00-ssl.conf
|
|
%config(noreplace) %{_sysconfdir}/apache2/conf.modules.d/00-ssl.conf
|
|
%config(noreplace) %{_sysconfdir}/apache2/conf.d/ssl.conf
|
|
%config(noreplace) %{_sysconfdir}/apache2/conf.d/ssl.conf
|
|
%attr(0700,www-data,www-data) %dir %{_localstatedir}/cache/apache2/ssl
|
|
%attr(0700,www-data,www-data) %dir %{_localstatedir}/cache/apache2/ssl
|
|
-
|
|
+%if %{with systemd}
|
|
|
|
+%{_libexecdir}/httpd-ssl-pass-dialog
|
|
|
|
+%{_libexecdir}/httpd-ssl-gencerts
|
|
|
|
+%{_unitdir}/httpd-init.service
|
|
|
|
+%{_unitdir}/httpd.socket.d/10-listen443.conf
|
|
|
|
+%endif
|
|
|
|
|
|
%files devel
|
|
%files devel
|
|
%defattr(-,root,root)
|
|
%defattr(-,root,root)
|
|
@@ -547,6 +636,10 @@ rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
%changelog
|
|
|
|
+* Wed Aug 19 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.4.46-1
|
|
|
|
+- new upstream release.
|
|
|
|
+- added systemd support (disabled as default).
|
|
|
|
+
|
|
* Thu Aug 29 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.4.41-1
|
|
* Thu Aug 29 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.4.41-1
|
|
- new upstream release.
|
|
- new upstream release.
|
|
- dropped Patch1 and 5.
|
|
- dropped Patch1 and 5.
|