From d77352ea35d96c5eed8dc3efb530f08eb118f47f Mon Sep 17 00:00:00 2001 From: maxice8 Date: Wed, 20 Feb 2019 13:35:31 -0300 Subject: [PATCH] apache: use make_dirs instead of creating directories at runtime. --- srcpkgs/apache/files/apache/run | 18 +----------------- srcpkgs/apache/template | 8 ++++++-- 2 files changed, 7 insertions(+), 19 deletions(-) diff --git a/srcpkgs/apache/files/apache/run b/srcpkgs/apache/files/apache/run index fc946ed113..d1995dd04d 100644 --- a/srcpkgs/apache/files/apache/run +++ b/srcpkgs/apache/files/apache/run @@ -2,22 +2,6 @@ set -e -[ -s conf ] && . ./conf - -mkdir -p /run/httpd -chmod 0710 /run/httpd -chown root:_apache /run/httpd - -: ${ROOTDIR:=/srv/www/apache} -: ${LOGDIR:=/var/log/httpd} - -if [ ! -d $ROOTDIR ]; then - mkdir -p $ROOTDIR - chown _apache:_apache $ROOTDIR -fi -if [ ! -d $LOGDIR ]; then - mkdir -p $LOGDIR - chown _apache:_apache $LOGDIR -fi +install -d -m0710 -o root -g _apache /run/httpd exec httpd -DNO_DETACH diff --git a/srcpkgs/apache/template b/srcpkgs/apache/template index 08a759c8fc..467925323f 100644 --- a/srcpkgs/apache/template +++ b/srcpkgs/apache/template @@ -1,7 +1,7 @@ # Template file for 'apache' pkgname=apache version=2.4.38 -revision=1 +revision=2 wrksrc="httpd-${version}" build_style=gnu-configure configure_args="--prefix= --sbindir=/usr/bin --enable-pie --enable-modules=all @@ -28,7 +28,7 @@ conf_files=" /etc/${pkgname}/httpd.conf /etc/${pkgname}/magic /etc/${pkgname}/mime.types" -hostmakedepends="pkg-config perl apr-util-devel" +hostmakedepends="pkgconf perl apr-util-devel" makedepends="zlib-devel libuuid-devel pcre-devel nghttp2-devel libressl-devel db-devel gdbm-devel expat-devel libldap-devel apr-util-devel" short_desc="Apache http server" @@ -42,6 +42,10 @@ checksum=7dc65857a994c98370dc4334b260101a7a04be60e6e74a5c57a6dee1bc8f394a system_accounts="_${pkgname}" _apache_homedir="/srv/www/$pkgname" +make_dirs=" + /srv/www/apache 0755 _apache _apache + /var/log/httpd 0755 _apache _apache" + # Do not redefine struct iovec in include/apr_want.h CFLAGS="-DAPR_IOVEC_DEFINED=1 -I${XBPS_CROSS_BASE}/usr/include/apr-1"