[arch-commits] Commit in apache/repos (16 files)
Anatol Pomozov
anatolik at archlinux.org
Wed Nov 11 16:39:00 UTC 2015
Date: Wednesday, November 11, 2015 @ 17:39:00
Author: anatolik
Revision: 250753
archrelease: copy trunk to testing-i686, testing-x86_64
Added:
apache/repos/testing-i686/
apache/repos/testing-i686/PKGBUILD
(from rev 250752, apache/trunk/PKGBUILD)
apache/repos/testing-i686/apache.install
(from rev 250752, apache/trunk/apache.install)
apache/repos/testing-i686/apache.tmpfiles.conf
(from rev 250752, apache/trunk/apache.tmpfiles.conf)
apache/repos/testing-i686/arch.layout
(from rev 250752, apache/trunk/arch.layout)
apache/repos/testing-i686/httpd.logrotate
(from rev 250752, apache/trunk/httpd.logrotate)
apache/repos/testing-i686/httpd.service
(from rev 250752, apache/trunk/httpd.service)
apache/repos/testing-i686/revert_redirect_url.patch
(from rev 250752, apache/trunk/revert_redirect_url.patch)
apache/repos/testing-x86_64/
apache/repos/testing-x86_64/PKGBUILD
(from rev 250752, apache/trunk/PKGBUILD)
apache/repos/testing-x86_64/apache.install
(from rev 250752, apache/trunk/apache.install)
apache/repos/testing-x86_64/apache.tmpfiles.conf
(from rev 250752, apache/trunk/apache.tmpfiles.conf)
apache/repos/testing-x86_64/arch.layout
(from rev 250752, apache/trunk/arch.layout)
apache/repos/testing-x86_64/httpd.logrotate
(from rev 250752, apache/trunk/httpd.logrotate)
apache/repos/testing-x86_64/httpd.service
(from rev 250752, apache/trunk/httpd.service)
apache/repos/testing-x86_64/revert_redirect_url.patch
(from rev 250752, apache/trunk/revert_redirect_url.patch)
------------------------------------------+
testing-i686/PKGBUILD | 129 ++++++++++++++++++++++++
testing-i686/apache.install | 16 +++
testing-i686/apache.tmpfiles.conf | 1
testing-i686/arch.layout | 22 ++++
testing-i686/httpd.logrotate | 6 +
testing-i686/httpd.service | 15 ++
testing-i686/revert_redirect_url.patch | 150 +++++++++++++++++++++++++++++
testing-x86_64/PKGBUILD | 129 ++++++++++++++++++++++++
testing-x86_64/apache.install | 16 +++
testing-x86_64/apache.tmpfiles.conf | 1
testing-x86_64/arch.layout | 22 ++++
testing-x86_64/httpd.logrotate | 6 +
testing-x86_64/httpd.service | 15 ++
testing-x86_64/revert_redirect_url.patch | 150 +++++++++++++++++++++++++++++
14 files changed, 678 insertions(+)
Copied: apache/repos/testing-i686/PKGBUILD (from rev 250752, apache/trunk/PKGBUILD)
===================================================================
--- testing-i686/PKGBUILD (rev 0)
+++ testing-i686/PKGBUILD 2015-11-11 16:39:00 UTC (rev 250753)
@@ -0,0 +1,129 @@
+# $Id$
+# Maintainer: Jan de Groot <jgc at archlinux.org>
+# Contributor: Andrea Scarpino <andrea at archlinux.org>
+# Contributor: Pierre Schmitz <pierre at archlinux.de>
+
+pkgname=apache
+pkgver=2.4.17
+pkgrel=3
+pkgdesc='A high performance Unix-based HTTP server'
+arch=('i686' 'x86_64')
+url='http://www.apache.org/dist/httpd'
+license=('APACHE')
+backup=(
+ etc/httpd/conf/httpd.conf
+ etc/httpd/conf/extra/httpd-{autoindex,dav,default,info,languages}.conf
+ etc/httpd/conf/extra/httpd-{manual,mpm,multilang-errordoc}.conf
+ etc/httpd/conf/extra/httpd-{ssl,userdir,vhosts}.conf
+ etc/httpd/conf/extra/proxy-html.conf
+ etc/httpd/conf/{mime.types,magic}
+ etc/logrotate.d/httpd
+)
+depends=('zlib' 'apr-util' 'pcre')
+makedepends=('libxml2' 'lua' 'openssl' 'nghttp2')
+optdepends=(
+ 'lua: for mod_lua module'
+ 'openssl: for mod_ssl module'
+ 'libxml2: for mod_proxy_html, mod_xml2enc modules'
+ 'nghttp2: for mod_http2 module'
+ 'lynx: apachectl status'
+)
+install=apache.install
+source=(
+ http://www.apache.org/dist/httpd/httpd-${pkgver}.tar.bz2{,.asc}
+ apache.tmpfiles.conf
+ httpd.logrotate
+ httpd.service
+ arch.layout
+ # bugfix for https://bz.apache.org/bugzilla/show_bug.cgi?id=57785
+ # taken from https://github.com/apache/httpd/commit/7feb3c0999927f9d0d16f37c7bed13b58c09162f
+ revert_redirect_url.patch
+)
+sha256sums=('331e035dec81d3db95b048f036f4d7b1a97ec8daa5b377bde42d4ccf1f2eb798'
+ 'SKIP'
+ '63da1a420f4714a3e7af2672d28384419cc7eedbe7bf35baebd02938fabc15bf'
+ '875903831634edf35d8d57e9a51bacb818255ecb3bfff29627f03e43d1ab65c3'
+ '2c6fc6fabc7fb113650690ce4e9347e54c4d2124b2975c7d671720169c990398'
+ 'dda05c6e76f12624e418ca18a36f2e90ec1c5b1cc52fed7142fce6076ec413f3'
+ 'eb9033e039e24cd443c861af0853dd8a8f7369170a393ef25fd31a627f6d40db')
+validpgpkeys=('A93D62ECC3C8EA12DB220EC934EA76E6791485A8') # Jim Jagielski
+
+prepare() {
+ cd httpd-${pkgver}
+
+ # set default user
+ sed -e 's#User daemon#User http#' \
+ -e 's#Group daemon#Group http#' \
+ -i docs/conf/httpd.conf.in
+
+ cat "${srcdir}/arch.layout" >> config.layout
+
+ patch -p1 < ../revert_redirect_url.patch
+}
+
+build() {
+ cd httpd-${pkgver}
+
+ ./configure --sbindir=/usr/bin \
+ --enable-layout=Arch \
+ --enable-mpms-shared=all \
+ --enable-modules=all \
+ --enable-mods-shared=all \
+ --enable-so \
+ --enable-suexec \
+ --with-suexec-caller=http \
+ --with-suexec-docroot=/srv/http \
+ --with-suexec-logfile=/var/log/httpd/suexec.log \
+ --with-suexec-bin=/usr/bin/suexec \
+ --with-suexec-uidmin=99 --with-suexec-gidmin=99 \
+ --enable-ldap --enable-authnz-ldap --enable-authnz-fcgi \
+ --enable-cache --enable-disk-cache --enable-mem-cache --enable-file-cache \
+ --enable-ssl --with-ssl \
+ --enable-deflate --enable-cgi --enable-cgid \
+ --enable-proxy --enable-proxy-connect \
+ --enable-proxy-http --enable-proxy-ftp \
+ --enable-dbd --enable-imagemap --enable-ident --enable-cern-meta \
+ --enable-lua --enable-xml2enc --enable-http2 \
+ --with-apr=/usr/bin/apr-1-config \
+ --with-apr-util=/usr/bin/apu-1-config \
+ --with-pcre=/usr
+
+ make
+}
+
+package() {
+ cd httpd-${pkgver}
+
+ make DESTDIR="${pkgdir}" install
+
+ install -D -m644 "${srcdir}/httpd.logrotate" "${pkgdir}/etc/logrotate.d/httpd"
+ install -D -m644 "${srcdir}/apache.tmpfiles.conf" "${pkgdir}/usr/lib/tmpfiles.d/apache.conf"
+ install -D -m644 "${srcdir}/httpd.service" "${pkgdir}/usr/lib/systemd/system/httpd.service"
+ install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+
+ # symlinks for /etc/httpd
+ # do we really need these symlinks?
+ #ln -fs /var/log/httpd "${pkgdir}/etc/httpd/logs"
+ ln -fs /usr/lib/httpd/modules "${pkgdir}/etc/httpd/modules"
+ #ln -fs /usr/lib/httpd/build "${pkgdir}/etc/httpd/build"
+
+ # set sane defaults
+ sed -e 's#/usr/lib/httpd/modules/#modules/#' \
+ -e 's|#\(LoadModule negotiation_module \)|\1|' \
+ -e 's|#\(LoadModule include_module \)|\1|' \
+ -e 's|#\(LoadModule userdir_module \)|\1|' \
+ -e 's|#\(LoadModule slotmem_shm_module \)|\1|' \
+ -e 's|#\(Include conf/extra/httpd-multilang-errordoc.conf\)|\1|' \
+ -e 's|#\(Include conf/extra/httpd-autoindex.conf\)|\1|' \
+ -e 's|#\(Include conf/extra/httpd-languages.conf\)|\1|' \
+ -e 's|#\(Include conf/extra/httpd-userdir.conf\)|\1|' \
+ -e 's|#\(Include conf/extra/httpd-default.conf\)|\1|' \
+ -e 's|#\(Include conf/extra/httpd-mpm.conf\)|\1|' \
+ -i "${pkgdir}/etc/httpd/conf/httpd.conf"
+
+ # cleanup
+ rm -r "${pkgdir}/usr/share/httpd/manual"
+ rm -r "${pkgdir}/etc/httpd/conf/original"
+ rm -r "${pkgdir}/srv/"
+ rm -r "${pkgdir}/run"
+}
Copied: apache/repos/testing-i686/apache.install (from rev 250752, apache/trunk/apache.install)
===================================================================
--- testing-i686/apache.install (rev 0)
+++ testing-i686/apache.install 2015-11-11 16:39:00 UTC (rev 250753)
@@ -0,0 +1,16 @@
+post_install() {
+ if type -P systemd-tmpfiles &> /dev/null; then
+ systemd-tmpfiles --create apache.conf
+ fi
+}
+
+post_upgrade() {
+ if type -P systemd-tmpfiles &> /dev/null; then
+ systemd-tmpfiles --create apache.conf
+ fi
+
+ if [[ $2 == 2\.2\.* ]]; then
+ # it is a major upgrade, show a useful link to upgrade instructions
+ echo ' Check Apache upgrade instructions: https://httpd.apache.org/docs/2.4/upgrading.html'
+ fi
+}
Copied: apache/repos/testing-i686/apache.tmpfiles.conf (from rev 250752, apache/trunk/apache.tmpfiles.conf)
===================================================================
--- testing-i686/apache.tmpfiles.conf (rev 0)
+++ testing-i686/apache.tmpfiles.conf 2015-11-11 16:39:00 UTC (rev 250753)
@@ -0,0 +1 @@
+d /run/httpd 0755 root root -
Copied: apache/repos/testing-i686/arch.layout (from rev 250752, apache/trunk/arch.layout)
===================================================================
--- testing-i686/arch.layout (rev 0)
+++ testing-i686/arch.layout 2015-11-11 16:39:00 UTC (rev 250753)
@@ -0,0 +1,22 @@
+<Layout Arch>
+ prefix: /etc/httpd
+ exec_prefix: /usr
+ bindir: /usr/bin
+ sbindir: /usr/bin
+ libdir: /usr/lib/httpd
+ libexecdir: /usr/lib/httpd/modules
+ mandir: /usr/share/man
+ sysconfdir: /etc/httpd/conf
+ datadir: /usr/share/httpd
+ installbuilddir: /usr/lib/httpd/build
+ errordir: /usr/share/httpd/error
+ iconsdir: /usr/share/httpd/icons
+ htdocsdir: /srv/http
+ manualdir: /usr/share/httpd/manual
+ cgidir: /srv/http/cgi-bin
+ includedir: /usr/include/httpd
+ localstatedir: /var
+ runtimedir: /run/httpd
+ logfiledir: /var/log/httpd
+ proxycachedir: /var/cache/httpd
+</Layout>
\ No newline at end of file
Copied: apache/repos/testing-i686/httpd.logrotate (from rev 250752, apache/trunk/httpd.logrotate)
===================================================================
--- testing-i686/httpd.logrotate (rev 0)
+++ testing-i686/httpd.logrotate 2015-11-11 16:39:00 UTC (rev 250753)
@@ -0,0 +1,6 @@
+/var/log/httpd/*log {
+ missingok
+ postrotate
+ /bin/kill -HUP `cat /run/httpd/httpd.pid 2>/dev/null` 2> /dev/null || true
+ endscript
+}
Copied: apache/repos/testing-i686/httpd.service (from rev 250752, apache/trunk/httpd.service)
===================================================================
--- testing-i686/httpd.service (rev 0)
+++ testing-i686/httpd.service 2015-11-11 16:39:00 UTC (rev 250753)
@@ -0,0 +1,15 @@
+[Unit]
+Description=Apache Web Server
+After=network.target remote-fs.target nss-lookup.target
+
+[Service]
+Type=simple
+ExecStart=/usr/bin/apachectl start -DFOREGROUND
+ExecStop=/usr/bin/apachectl graceful-stop
+ExecReload=/usr/bin/apachectl graceful
+PrivateTmp=true
+LimitNOFILE=infinity
+KillMode=mixed
+
+[Install]
+WantedBy=multi-user.target
Copied: apache/repos/testing-i686/revert_redirect_url.patch (from rev 250752, apache/trunk/revert_redirect_url.patch)
===================================================================
--- testing-i686/revert_redirect_url.patch (rev 0)
+++ testing-i686/revert_redirect_url.patch 2015-11-11 16:39:00 UTC (rev 250753)
@@ -0,0 +1,150 @@
+From 7feb3c0999927f9d0d16f37c7bed13b58c09162f Mon Sep 17 00:00:00 2001
+From: Jim Jagielski <jim at apache.org>
+Date: Tue, 3 Nov 2015 12:02:43 +0000
+Subject: [PATCH] Merge r1710380, r1710391 from trunk:
+
+Make the fix for fully qualifying REDIRECT_URL from PR#57785 opt-in.
+
+
+
+
+followup to r1710380 -- refactored name and didn't have 'make depend'
+
+
+Submitted by: covener
+Reviewed/backported by: jim
+
+
+git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1712268 13f79535-47bb-0310-9956-ffa450edef68
+---
+ CHANGES | 3 +++
+ STATUS | 7 -------
+ docs/manual/mod/core.xml | 27 +++++++++++++++++++++++++++
+ include/http_core.h | 13 +++++++++++++
+ server/core.c | 16 ++++++++++++++++
+ server/util_script.c | 31 ++++++++++++++++++-------------
+ 6 files changed, 77 insertions(+), 20 deletions(-)
+
+diff --git a/include/http_core.h b/include/http_core.h
+index 6ca53f7..8535455 100644
+--- a/include/http_core.h
++++ b/include/http_core.h
+@@ -465,6 +465,17 @@ typedef unsigned long etag_components_t;
+ /* This is the default value used */
+ #define ETAG_BACKWARD (ETAG_MTIME | ETAG_SIZE)
+
++/* Generic ON/OFF/UNSET for unsigned int foo :2 */
++#define AP_CORE_CONFIG_OFF (0)
++#define AP_CORE_CONFIG_ON (1)
++#define AP_CORE_CONFIG_UNSET (2)
++
++/* Generic merge of flag */
++#define AP_CORE_MERGE_FLAG(field, to, base, over) to->field = \
++ over->field != AP_CORE_CONFIG_UNSET \
++ ? over->field \
++ : base->field
++
+ /**
+ * @brief Server Signature Enumeration
+ */
+@@ -630,6 +641,8 @@ typedef struct {
+ * advice
+ */
+ unsigned int cgi_pass_auth : 2;
++ unsigned int qualify_redirect_url :2;
++
+ } core_dir_config;
+
+ /* macro to implement off by default behaviour */
+diff --git a/server/core.c b/server/core.c
+index 37484b6..803d4d4 100644
+--- a/server/core.c
++++ b/server/core.c
+@@ -191,6 +191,7 @@ static void *create_core_dir_config(apr_pool_t *a, char *dir)
+ conf->max_reversals = AP_MAXRANGES_UNSET;
+
+ conf->cgi_pass_auth = AP_CGI_PASS_AUTH_UNSET;
++ conf->qualify_redirect_url = AP_CORE_CONFIG_UNSET;
+
+ return (void *)conf;
+ }
+@@ -405,6 +406,8 @@ static void *merge_core_dir_configs(apr_pool_t *a, void *basev, void *newv)
+
+ conf->cgi_pass_auth = new->cgi_pass_auth != AP_CGI_PASS_AUTH_UNSET ? new->cgi_pass_auth : base->cgi_pass_auth;
+
++ AP_CORE_MERGE_FLAG(qualify_redirect_url, conf, base, new);
++
+ return (void*)conf;
+ }
+
+@@ -1707,6 +1710,15 @@ static const char *set_cgi_pass_auth(cmd_parms *cmd, void *d_, int flag)
+ return NULL;
+ }
+
++static const char *set_qualify_redirect_url(cmd_parms *cmd, void *d_, int flag)
++{
++ core_dir_config *d = d_;
++
++ d->qualify_redirect_url = flag ? AP_CORE_CONFIG_ON : AP_CORE_CONFIG_OFF;
++
++ return NULL;
++}
++
+ static const char *set_override_list(cmd_parms *cmd, void *d_, int argc, char *const argv[])
+ {
+ core_dir_config *d = d_;
+@@ -4206,6 +4218,10 @@ AP_INIT_TAKE12("LimitInternalRecursion", set_recursion_limit, NULL, RSRC_CONF,
+ AP_INIT_FLAG("CGIPassAuth", set_cgi_pass_auth, NULL, OR_AUTHCFG,
+ "Controls whether HTTP authorization headers, normally hidden, will "
+ "be passed to scripts"),
++AP_INIT_FLAG("QualifyRedirectURL", set_qualify_redirect_url, NULL, OR_FILEINFO,
++ "Controls whether HTTP authorization headers, normally hidden, will "
++ "be passed to scripts"),
++
+ AP_INIT_TAKE1("ForceType", ap_set_string_slot_lower,
+ (void *)APR_OFFSETOF(core_dir_config, mime_type), OR_FILEINFO,
+ "a mime type that overrides other configured type"),
+diff --git a/server/util_script.c b/server/util_script.c
+index 14991cd..7ac7930 100644
+--- a/server/util_script.c
++++ b/server/util_script.c
+@@ -282,21 +282,26 @@ AP_DECLARE(void) ap_add_common_vars(request_rec *r)
+ /* Apache custom error responses. If we have redirected set two new vars */
+
+ if (r->prev) {
+- /* PR#57785: reconstruct full URL here */
+- apr_uri_t *uri = &r->prev->parsed_uri;
+- if (!uri->scheme) {
+- uri->scheme = (char*)ap_http_scheme(r->prev);
+- }
+- if (!uri->port) {
+- uri->port = ap_get_server_port(r->prev);
+- uri->port_str = apr_psprintf(r->pool, "%u", uri->port);
+- }
+- if (!uri->hostname) {
+- uri->hostname = (char*)ap_get_server_name_for_url(r->prev);
++ if (conf->qualify_redirect_url != AP_CORE_CONFIG_ON) {
++ add_unless_null(e, "REDIRECT_URL", r->prev->uri);
++ }
++ else {
++ /* PR#57785: reconstruct full URL here */
++ apr_uri_t *uri = &r->prev->parsed_uri;
++ if (!uri->scheme) {
++ uri->scheme = (char*)ap_http_scheme(r->prev);
++ }
++ if (!uri->port) {
++ uri->port = ap_get_server_port(r->prev);
++ uri->port_str = apr_psprintf(r->pool, "%u", uri->port);
++ }
++ if (!uri->hostname) {
++ uri->hostname = (char*)ap_get_server_name_for_url(r->prev);
++ }
++ add_unless_null(e, "REDIRECT_URL",
++ apr_uri_unparse(r->pool, uri, 0));
+ }
+ add_unless_null(e, "REDIRECT_QUERY_STRING", r->prev->args);
+- add_unless_null(e, "REDIRECT_URL",
+- apr_uri_unparse(r->pool, uri, 0));
+ }
+
+ if (e != r->subprocess_env) {
Copied: apache/repos/testing-x86_64/PKGBUILD (from rev 250752, apache/trunk/PKGBUILD)
===================================================================
--- testing-x86_64/PKGBUILD (rev 0)
+++ testing-x86_64/PKGBUILD 2015-11-11 16:39:00 UTC (rev 250753)
@@ -0,0 +1,129 @@
+# $Id$
+# Maintainer: Jan de Groot <jgc at archlinux.org>
+# Contributor: Andrea Scarpino <andrea at archlinux.org>
+# Contributor: Pierre Schmitz <pierre at archlinux.de>
+
+pkgname=apache
+pkgver=2.4.17
+pkgrel=3
+pkgdesc='A high performance Unix-based HTTP server'
+arch=('i686' 'x86_64')
+url='http://www.apache.org/dist/httpd'
+license=('APACHE')
+backup=(
+ etc/httpd/conf/httpd.conf
+ etc/httpd/conf/extra/httpd-{autoindex,dav,default,info,languages}.conf
+ etc/httpd/conf/extra/httpd-{manual,mpm,multilang-errordoc}.conf
+ etc/httpd/conf/extra/httpd-{ssl,userdir,vhosts}.conf
+ etc/httpd/conf/extra/proxy-html.conf
+ etc/httpd/conf/{mime.types,magic}
+ etc/logrotate.d/httpd
+)
+depends=('zlib' 'apr-util' 'pcre')
+makedepends=('libxml2' 'lua' 'openssl' 'nghttp2')
+optdepends=(
+ 'lua: for mod_lua module'
+ 'openssl: for mod_ssl module'
+ 'libxml2: for mod_proxy_html, mod_xml2enc modules'
+ 'nghttp2: for mod_http2 module'
+ 'lynx: apachectl status'
+)
+install=apache.install
+source=(
+ http://www.apache.org/dist/httpd/httpd-${pkgver}.tar.bz2{,.asc}
+ apache.tmpfiles.conf
+ httpd.logrotate
+ httpd.service
+ arch.layout
+ # bugfix for https://bz.apache.org/bugzilla/show_bug.cgi?id=57785
+ # taken from https://github.com/apache/httpd/commit/7feb3c0999927f9d0d16f37c7bed13b58c09162f
+ revert_redirect_url.patch
+)
+sha256sums=('331e035dec81d3db95b048f036f4d7b1a97ec8daa5b377bde42d4ccf1f2eb798'
+ 'SKIP'
+ '63da1a420f4714a3e7af2672d28384419cc7eedbe7bf35baebd02938fabc15bf'
+ '875903831634edf35d8d57e9a51bacb818255ecb3bfff29627f03e43d1ab65c3'
+ '2c6fc6fabc7fb113650690ce4e9347e54c4d2124b2975c7d671720169c990398'
+ 'dda05c6e76f12624e418ca18a36f2e90ec1c5b1cc52fed7142fce6076ec413f3'
+ 'eb9033e039e24cd443c861af0853dd8a8f7369170a393ef25fd31a627f6d40db')
+validpgpkeys=('A93D62ECC3C8EA12DB220EC934EA76E6791485A8') # Jim Jagielski
+
+prepare() {
+ cd httpd-${pkgver}
+
+ # set default user
+ sed -e 's#User daemon#User http#' \
+ -e 's#Group daemon#Group http#' \
+ -i docs/conf/httpd.conf.in
+
+ cat "${srcdir}/arch.layout" >> config.layout
+
+ patch -p1 < ../revert_redirect_url.patch
+}
+
+build() {
+ cd httpd-${pkgver}
+
+ ./configure --sbindir=/usr/bin \
+ --enable-layout=Arch \
+ --enable-mpms-shared=all \
+ --enable-modules=all \
+ --enable-mods-shared=all \
+ --enable-so \
+ --enable-suexec \
+ --with-suexec-caller=http \
+ --with-suexec-docroot=/srv/http \
+ --with-suexec-logfile=/var/log/httpd/suexec.log \
+ --with-suexec-bin=/usr/bin/suexec \
+ --with-suexec-uidmin=99 --with-suexec-gidmin=99 \
+ --enable-ldap --enable-authnz-ldap --enable-authnz-fcgi \
+ --enable-cache --enable-disk-cache --enable-mem-cache --enable-file-cache \
+ --enable-ssl --with-ssl \
+ --enable-deflate --enable-cgi --enable-cgid \
+ --enable-proxy --enable-proxy-connect \
+ --enable-proxy-http --enable-proxy-ftp \
+ --enable-dbd --enable-imagemap --enable-ident --enable-cern-meta \
+ --enable-lua --enable-xml2enc --enable-http2 \
+ --with-apr=/usr/bin/apr-1-config \
+ --with-apr-util=/usr/bin/apu-1-config \
+ --with-pcre=/usr
+
+ make
+}
+
+package() {
+ cd httpd-${pkgver}
+
+ make DESTDIR="${pkgdir}" install
+
+ install -D -m644 "${srcdir}/httpd.logrotate" "${pkgdir}/etc/logrotate.d/httpd"
+ install -D -m644 "${srcdir}/apache.tmpfiles.conf" "${pkgdir}/usr/lib/tmpfiles.d/apache.conf"
+ install -D -m644 "${srcdir}/httpd.service" "${pkgdir}/usr/lib/systemd/system/httpd.service"
+ install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+
+ # symlinks for /etc/httpd
+ # do we really need these symlinks?
+ #ln -fs /var/log/httpd "${pkgdir}/etc/httpd/logs"
+ ln -fs /usr/lib/httpd/modules "${pkgdir}/etc/httpd/modules"
+ #ln -fs /usr/lib/httpd/build "${pkgdir}/etc/httpd/build"
+
+ # set sane defaults
+ sed -e 's#/usr/lib/httpd/modules/#modules/#' \
+ -e 's|#\(LoadModule negotiation_module \)|\1|' \
+ -e 's|#\(LoadModule include_module \)|\1|' \
+ -e 's|#\(LoadModule userdir_module \)|\1|' \
+ -e 's|#\(LoadModule slotmem_shm_module \)|\1|' \
+ -e 's|#\(Include conf/extra/httpd-multilang-errordoc.conf\)|\1|' \
+ -e 's|#\(Include conf/extra/httpd-autoindex.conf\)|\1|' \
+ -e 's|#\(Include conf/extra/httpd-languages.conf\)|\1|' \
+ -e 's|#\(Include conf/extra/httpd-userdir.conf\)|\1|' \
+ -e 's|#\(Include conf/extra/httpd-default.conf\)|\1|' \
+ -e 's|#\(Include conf/extra/httpd-mpm.conf\)|\1|' \
+ -i "${pkgdir}/etc/httpd/conf/httpd.conf"
+
+ # cleanup
+ rm -r "${pkgdir}/usr/share/httpd/manual"
+ rm -r "${pkgdir}/etc/httpd/conf/original"
+ rm -r "${pkgdir}/srv/"
+ rm -r "${pkgdir}/run"
+}
Copied: apache/repos/testing-x86_64/apache.install (from rev 250752, apache/trunk/apache.install)
===================================================================
--- testing-x86_64/apache.install (rev 0)
+++ testing-x86_64/apache.install 2015-11-11 16:39:00 UTC (rev 250753)
@@ -0,0 +1,16 @@
+post_install() {
+ if type -P systemd-tmpfiles &> /dev/null; then
+ systemd-tmpfiles --create apache.conf
+ fi
+}
+
+post_upgrade() {
+ if type -P systemd-tmpfiles &> /dev/null; then
+ systemd-tmpfiles --create apache.conf
+ fi
+
+ if [[ $2 == 2\.2\.* ]]; then
+ # it is a major upgrade, show a useful link to upgrade instructions
+ echo ' Check Apache upgrade instructions: https://httpd.apache.org/docs/2.4/upgrading.html'
+ fi
+}
Copied: apache/repos/testing-x86_64/apache.tmpfiles.conf (from rev 250752, apache/trunk/apache.tmpfiles.conf)
===================================================================
--- testing-x86_64/apache.tmpfiles.conf (rev 0)
+++ testing-x86_64/apache.tmpfiles.conf 2015-11-11 16:39:00 UTC (rev 250753)
@@ -0,0 +1 @@
+d /run/httpd 0755 root root -
Copied: apache/repos/testing-x86_64/arch.layout (from rev 250752, apache/trunk/arch.layout)
===================================================================
--- testing-x86_64/arch.layout (rev 0)
+++ testing-x86_64/arch.layout 2015-11-11 16:39:00 UTC (rev 250753)
@@ -0,0 +1,22 @@
+<Layout Arch>
+ prefix: /etc/httpd
+ exec_prefix: /usr
+ bindir: /usr/bin
+ sbindir: /usr/bin
+ libdir: /usr/lib/httpd
+ libexecdir: /usr/lib/httpd/modules
+ mandir: /usr/share/man
+ sysconfdir: /etc/httpd/conf
+ datadir: /usr/share/httpd
+ installbuilddir: /usr/lib/httpd/build
+ errordir: /usr/share/httpd/error
+ iconsdir: /usr/share/httpd/icons
+ htdocsdir: /srv/http
+ manualdir: /usr/share/httpd/manual
+ cgidir: /srv/http/cgi-bin
+ includedir: /usr/include/httpd
+ localstatedir: /var
+ runtimedir: /run/httpd
+ logfiledir: /var/log/httpd
+ proxycachedir: /var/cache/httpd
+</Layout>
\ No newline at end of file
Copied: apache/repos/testing-x86_64/httpd.logrotate (from rev 250752, apache/trunk/httpd.logrotate)
===================================================================
--- testing-x86_64/httpd.logrotate (rev 0)
+++ testing-x86_64/httpd.logrotate 2015-11-11 16:39:00 UTC (rev 250753)
@@ -0,0 +1,6 @@
+/var/log/httpd/*log {
+ missingok
+ postrotate
+ /bin/kill -HUP `cat /run/httpd/httpd.pid 2>/dev/null` 2> /dev/null || true
+ endscript
+}
Copied: apache/repos/testing-x86_64/httpd.service (from rev 250752, apache/trunk/httpd.service)
===================================================================
--- testing-x86_64/httpd.service (rev 0)
+++ testing-x86_64/httpd.service 2015-11-11 16:39:00 UTC (rev 250753)
@@ -0,0 +1,15 @@
+[Unit]
+Description=Apache Web Server
+After=network.target remote-fs.target nss-lookup.target
+
+[Service]
+Type=simple
+ExecStart=/usr/bin/apachectl start -DFOREGROUND
+ExecStop=/usr/bin/apachectl graceful-stop
+ExecReload=/usr/bin/apachectl graceful
+PrivateTmp=true
+LimitNOFILE=infinity
+KillMode=mixed
+
+[Install]
+WantedBy=multi-user.target
Copied: apache/repos/testing-x86_64/revert_redirect_url.patch (from rev 250752, apache/trunk/revert_redirect_url.patch)
===================================================================
--- testing-x86_64/revert_redirect_url.patch (rev 0)
+++ testing-x86_64/revert_redirect_url.patch 2015-11-11 16:39:00 UTC (rev 250753)
@@ -0,0 +1,150 @@
+From 7feb3c0999927f9d0d16f37c7bed13b58c09162f Mon Sep 17 00:00:00 2001
+From: Jim Jagielski <jim at apache.org>
+Date: Tue, 3 Nov 2015 12:02:43 +0000
+Subject: [PATCH] Merge r1710380, r1710391 from trunk:
+
+Make the fix for fully qualifying REDIRECT_URL from PR#57785 opt-in.
+
+
+
+
+followup to r1710380 -- refactored name and didn't have 'make depend'
+
+
+Submitted by: covener
+Reviewed/backported by: jim
+
+
+git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1712268 13f79535-47bb-0310-9956-ffa450edef68
+---
+ CHANGES | 3 +++
+ STATUS | 7 -------
+ docs/manual/mod/core.xml | 27 +++++++++++++++++++++++++++
+ include/http_core.h | 13 +++++++++++++
+ server/core.c | 16 ++++++++++++++++
+ server/util_script.c | 31 ++++++++++++++++++-------------
+ 6 files changed, 77 insertions(+), 20 deletions(-)
+
+diff --git a/include/http_core.h b/include/http_core.h
+index 6ca53f7..8535455 100644
+--- a/include/http_core.h
++++ b/include/http_core.h
+@@ -465,6 +465,17 @@ typedef unsigned long etag_components_t;
+ /* This is the default value used */
+ #define ETAG_BACKWARD (ETAG_MTIME | ETAG_SIZE)
+
++/* Generic ON/OFF/UNSET for unsigned int foo :2 */
++#define AP_CORE_CONFIG_OFF (0)
++#define AP_CORE_CONFIG_ON (1)
++#define AP_CORE_CONFIG_UNSET (2)
++
++/* Generic merge of flag */
++#define AP_CORE_MERGE_FLAG(field, to, base, over) to->field = \
++ over->field != AP_CORE_CONFIG_UNSET \
++ ? over->field \
++ : base->field
++
+ /**
+ * @brief Server Signature Enumeration
+ */
+@@ -630,6 +641,8 @@ typedef struct {
+ * advice
+ */
+ unsigned int cgi_pass_auth : 2;
++ unsigned int qualify_redirect_url :2;
++
+ } core_dir_config;
+
+ /* macro to implement off by default behaviour */
+diff --git a/server/core.c b/server/core.c
+index 37484b6..803d4d4 100644
+--- a/server/core.c
++++ b/server/core.c
+@@ -191,6 +191,7 @@ static void *create_core_dir_config(apr_pool_t *a, char *dir)
+ conf->max_reversals = AP_MAXRANGES_UNSET;
+
+ conf->cgi_pass_auth = AP_CGI_PASS_AUTH_UNSET;
++ conf->qualify_redirect_url = AP_CORE_CONFIG_UNSET;
+
+ return (void *)conf;
+ }
+@@ -405,6 +406,8 @@ static void *merge_core_dir_configs(apr_pool_t *a, void *basev, void *newv)
+
+ conf->cgi_pass_auth = new->cgi_pass_auth != AP_CGI_PASS_AUTH_UNSET ? new->cgi_pass_auth : base->cgi_pass_auth;
+
++ AP_CORE_MERGE_FLAG(qualify_redirect_url, conf, base, new);
++
+ return (void*)conf;
+ }
+
+@@ -1707,6 +1710,15 @@ static const char *set_cgi_pass_auth(cmd_parms *cmd, void *d_, int flag)
+ return NULL;
+ }
+
++static const char *set_qualify_redirect_url(cmd_parms *cmd, void *d_, int flag)
++{
++ core_dir_config *d = d_;
++
++ d->qualify_redirect_url = flag ? AP_CORE_CONFIG_ON : AP_CORE_CONFIG_OFF;
++
++ return NULL;
++}
++
+ static const char *set_override_list(cmd_parms *cmd, void *d_, int argc, char *const argv[])
+ {
+ core_dir_config *d = d_;
+@@ -4206,6 +4218,10 @@ AP_INIT_TAKE12("LimitInternalRecursion", set_recursion_limit, NULL, RSRC_CONF,
+ AP_INIT_FLAG("CGIPassAuth", set_cgi_pass_auth, NULL, OR_AUTHCFG,
+ "Controls whether HTTP authorization headers, normally hidden, will "
+ "be passed to scripts"),
++AP_INIT_FLAG("QualifyRedirectURL", set_qualify_redirect_url, NULL, OR_FILEINFO,
++ "Controls whether HTTP authorization headers, normally hidden, will "
++ "be passed to scripts"),
++
+ AP_INIT_TAKE1("ForceType", ap_set_string_slot_lower,
+ (void *)APR_OFFSETOF(core_dir_config, mime_type), OR_FILEINFO,
+ "a mime type that overrides other configured type"),
+diff --git a/server/util_script.c b/server/util_script.c
+index 14991cd..7ac7930 100644
+--- a/server/util_script.c
++++ b/server/util_script.c
+@@ -282,21 +282,26 @@ AP_DECLARE(void) ap_add_common_vars(request_rec *r)
+ /* Apache custom error responses. If we have redirected set two new vars */
+
+ if (r->prev) {
+- /* PR#57785: reconstruct full URL here */
+- apr_uri_t *uri = &r->prev->parsed_uri;
+- if (!uri->scheme) {
+- uri->scheme = (char*)ap_http_scheme(r->prev);
+- }
+- if (!uri->port) {
+- uri->port = ap_get_server_port(r->prev);
+- uri->port_str = apr_psprintf(r->pool, "%u", uri->port);
+- }
+- if (!uri->hostname) {
+- uri->hostname = (char*)ap_get_server_name_for_url(r->prev);
++ if (conf->qualify_redirect_url != AP_CORE_CONFIG_ON) {
++ add_unless_null(e, "REDIRECT_URL", r->prev->uri);
++ }
++ else {
++ /* PR#57785: reconstruct full URL here */
++ apr_uri_t *uri = &r->prev->parsed_uri;
++ if (!uri->scheme) {
++ uri->scheme = (char*)ap_http_scheme(r->prev);
++ }
++ if (!uri->port) {
++ uri->port = ap_get_server_port(r->prev);
++ uri->port_str = apr_psprintf(r->pool, "%u", uri->port);
++ }
++ if (!uri->hostname) {
++ uri->hostname = (char*)ap_get_server_name_for_url(r->prev);
++ }
++ add_unless_null(e, "REDIRECT_URL",
++ apr_uri_unparse(r->pool, uri, 0));
+ }
+ add_unless_null(e, "REDIRECT_QUERY_STRING", r->prev->args);
+- add_unless_null(e, "REDIRECT_URL",
+- apr_uri_unparse(r->pool, uri, 0));
+ }
+
+ if (e != r->subprocess_env) {
More information about the arch-commits
mailing list