From 7293d6f56d6b790a41ec9b4abf29e7f1a67d355f Mon Sep 17 00:00:00 2001 From: Greg Beard Date: Wed, 29 Mar 2023 23:49:07 +0100 Subject: [PATCH] apache: Update to 2.4.56 --- srcpkgs/apache/template | 41 +++++++++++++++++++++++++++-------------- 1 file changed, 27 insertions(+), 14 deletions(-) diff --git a/srcpkgs/apache/template b/srcpkgs/apache/template index 629ad18b34a5..19bb126d6ab4 100644 --- a/srcpkgs/apache/template +++ b/srcpkgs/apache/template @@ -1,7 +1,7 @@ # Template file for 'apache' pkgname=apache -version=2.4.54 -revision=2 +version=2.4.56 +revision=1 build_style=gnu-configure configure_args="--prefix= --sbindir=/usr/bin --enable-pie --enable-modules=all --enable-mods-shared=all --enable-authn-dbm --enable-authn-anon @@ -34,7 +34,7 @@ license="Apache-2.0" homepage="https://httpd.apache.org/" changelog="https://www.apache.org/dist/httpd/CHANGES_2.4" distfiles="https://dlcdn.apache.org/httpd/httpd-${version}.tar.bz2" -checksum=eb397feeefccaf254f8d45de3768d9d68e8e73851c49afd5b7176d1ecf80c340 +checksum=d8d45f1398ba84edd05bb33ca7593ac2989b17cb9c7a0cafe5442d41afdb2d7c system_accounts="_apache" _apache_homedir="/srv/www/$pkgname" @@ -55,12 +55,20 @@ fi pre_configure() { # set default user - sed -e 's#User daemon#User _apache#' \ + vsed -e 's#User daemon#User _apache#' \ -e 's#Group daemon#Group _apache#' \ -i docs/conf/httpd.conf.in cat ${FILESDIR}/xbps.layout >> config.layout if [ "$CROSS_BUILD" ]; then + # NOTE: Later on, in post_configure(), We sed libtool into + # $XBPS_WRAPPERDIR so the build will pick up the cross + # linker instead of the host linker. Here, we're setting + # up the configure script to use this modified libtool... + vsed -i configure \ + -e "s;\(my_libtool=\).*$;\1\""${XBPS_WRAPPERDIR}"/libtool\";g" \ + -e "s;\(SH_LIBTOOL=\)'\$(SHELL).*'$;\1'\$(LIBTOOL)';g" + # pcre{,2}-config detection doesn't work on cross # since httpd-2.4.53, manually export PCRE_CONFIG # to let configure know where it is @@ -75,15 +83,24 @@ pre_configure() { post_configure() { if [ "$CROSS_BUILD" ]; then + # NOTE: Here's where we prepare the modified + # libtool into the $XBPS_WRAPPERDIR... + sed ${XBPS_CROSS_BASE}/usr/bin/libtool \ + -e 's;^\(LD\)="\(.\+\)"$;\1="${\1:=\2}";g' \ + -e 's;^\(CC\)="\(.\+\)"$;\1="${\1:=\2}";g' \ + > ${XBPS_WRAPPERDIR}/libtool + chmod +x ${XBPS_WRAPPERDIR}/libtool + # Build gen_test_char using $BUILD_CC - sed -i server/Makefile \ + vsed -i server/Makefile \ -e "s;\$(LINK) \$(EXTRA_LDFLAGS) \$(\(gen_test_char\).*;${BUILD_CC} -o \1 \1.c -I${XBPS_CROSS_BASE}/usr/include/apr-1;" # More hacks to make cross compiling work - sed -i build/*.mk Makefile */Makefile \ + vsed -i build/rules.mk support/Makefile \ -e "s;--mode=compile;& --tag=CC;" \ - -e "s;--mode=link;& --tag=CC;" \ - -e "s;-\(L|R\)/usr/lib;-\1${XBPS_CROSS_BASE}/usr/lib;" \ - -e "s;^\(LIBTOOL =\) /usr/share/apr-1/build/libtool;\1 ${XBPS_CROSS_BASE}/usr/bin/libtool;" + -e "s;--mode=link;& --tag=CC;" + + vsed -i build/config_vars.mk \ + -e "s;--mode=install;& --tag=CC;" fi } @@ -108,7 +125,7 @@ post_install() { # * httpd-userdir.conf # * httpd-default.conf # - sed \ + vsed \ -e 's|ServerRoot ""|ServerRoot "/srv/www/apache"|' \ -e 's|#\(LoadModule include_module /usr/libexec/httpd/mod_include.so\)|\1|' \ -e 's|\(LoadModule unique_id_module /usr/libexec/httpd/mod_unique_id.so\)|#\1|' \ @@ -123,10 +140,6 @@ post_install() { -e 's|#\(Include /etc/apache/extra/httpd-default.conf\)|\1|' \ -i "${DESTDIR}/etc/apache/httpd.conf" - # Remove references to hardening -specs. - sed -e "s|\(-specs=.*hardened-ld\)||g" -e "s|\(-specs=.*hardened-cc1\)||g" -i \ - ${DESTDIR}/usr/share/apache/webroot/build/config{.nice,_vars.mk} - # Remove unused stuff. vmkdir usr/share/apache/webroot mv ${DESTDIR}/srv/www/$pkgname/cgi-bin ${DESTDIR}/usr/share/apache/webroot