[macports-ports] branch master updated: apache2: back up configuration files before activating

Ryan Schmidt ryandesign at macports.org
Wed Oct 18 20:50:12 UTC 2017


On Oct 18, 2017, at 15:40, Marius Schamschula wrote:

> Marius Schamschula (Schamschula) pushed a commit to branch master
> in repository macports-ports.
> 
> 
> https://github.com/macports/macports-ports/commit/b7e97e72c9811817fe802ae19891675a65dbc5cc
> 
> The following commit(s) were added to refs/heads/master by this push:
> 
>      new b7e97e7  apache2: back up configuration files before activating
> 
> b7e97e7 is described below
> 
> 
> commit b7e97e72c9811817fe802ae19891675a65dbc5cc
> 
> Author: Marius Schamschula <mps at macports.org>
> AuthorDate: Wed Oct 18 15:40:12 2017 -0500
> 
> 
>     apache2: back up configuration files before activating
> 
> ---
>  www/apache2/Portfile | 14 +++++++++++++-
>  1 file changed, 13 insertions(+), 1 deletion(-)
> 
> 
> diff --git a/www/apache2/Portfile b/www/apache2/Portfile
> 
> index ecdd6b4..4f21ecd 100644
> 
> --- a/www/apache2/Portfile
> 
> +++ b/www/apache2/Portfile
> 
> @@ -1,11 +1,11 @@
> 
>  # -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
>  
>  PortSystem          1.0
> 
> -# Untested
> 
>  PortGroup           apache2 1.0
>  
>  name                apache2
>  version             2.4.28
> 
> +revision            1
> 
>  categories          www
>  maintainers         {ryandesign @ryandesign} mathiesen.info:macintosh pixilla openmaintainer
>  license             Apache-2
> 
> @@ -125,6 +125,18 @@ pre-activate {
> 
>              }
>          }
>      }
> 
> +
> 
> +    # back up configuration files
> 
> +    set systemTime [clock seconds]
> 
> +    set date_str [clock format ${systemTime} -format {%Y%m%d}]
> 
> +    copy ${apache2.sysconfdir}/httpd.conf ${apache2.sysconfdir}/httpd.conf.${date_str}
> 
> +    foreach f "httpd-autoindex.conf httpd-dav.conf httpd-default.conf \
> 
> +               httpd-fcgid.conf httpd-info.conf httpd-languages.conf \
> 
> +               httpd-manual.conf httpd-mpm.conf httpd-multilang-errordoc.conf \
> 
> +               httpd-ssl.conf httpd-userdir.conf httpd-vhosts.conf \
> 
> +               proxy-html.conf" {
> 
> +        copy ${apache2.sysconfdir}/extra/${f} ${apache2.sysconfdir}/extra/${f}.${date_str}
> 
> +    }

Fails on the buildbot workers:


Error: Failed to activate apache2: error copying "/opt/local/etc/apache2/extra/httpd-autoindex.conf": no such file or directory





More information about the macports-dev mailing list