summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Deutschmann <whissi@gentoo.org>2016-10-19 16:37:20 +0200
committerThomas Deutschmann <whissi@gentoo.org>2016-10-19 16:38:02 +0200
commitd85eb428d817a74efc8fd47d54ceb4e02564b6e2 (patch)
tree4d320a3775e9ba9552248b0362049e937e5d9685 /www-servers/nginx
parentdev-python/os-testr: typo... (diff)
downloadgentoo-d85eb428d817a74efc8fd47d54ceb4e02564b6e2.tar.gz
gentoo-d85eb428d817a74efc8fd47d54ceb4e02564b6e2.tar.bz2
gentoo-d85eb428d817a74efc8fd47d54ceb4e02564b6e2.zip
www-servers/nginx: Fix building of uploadprogress module; Add autotools depedencies
Ebuild changes: =============== - Since nginx-upload-progress-module was bumped to v0.9.2 (commit f03aacc3dc) the module was only build as dynamic module so it wasn't useable in Gentoo. This is now fixed. (Bug #593450) - Cherry-picked a patch for cURL detection in Mod_Security - Added autotools depedencies (only necessary when you build nginx_modules_http_security) Gentoo-Bug: https://bugs.gentoo.org/593450 Package-Manager: portage-2.3.2
Diffstat (limited to 'www-servers/nginx')
-rw-r--r--www-servers/nginx/files/http_security-pr_1158.patch103
-rw-r--r--www-servers/nginx/files/http_uploadprogress-issue_50.patch32
-rw-r--r--www-servers/nginx/nginx-1.10.2-r1.ebuild (renamed from www-servers/nginx/nginx-1.10.2.ebuild)36
-rw-r--r--www-servers/nginx/nginx-1.11.5-r1.ebuild (renamed from www-servers/nginx/nginx-1.11.5.ebuild)36
4 files changed, 191 insertions, 16 deletions
diff --git a/www-servers/nginx/files/http_security-pr_1158.patch b/www-servers/nginx/files/http_security-pr_1158.patch
new file mode 100644
index 000000000000..92f1094c2434
--- /dev/null
+++ b/www-servers/nginx/files/http_security-pr_1158.patch
@@ -0,0 +1,103 @@
+From 2fa8ffea68498e02005e85c27e61bde30718ae3b Mon Sep 17 00:00:00 2001
+From: Thomas Deutschmann <whissi@whissi.de>
+Date: Sat, 11 Jun 2016 16:18:17 +0200
+Subject: [PATCH 1/2] configure: Fix detection whether libcurl is linked
+ against gnutls
+
+The find_curl macro is also checking whether libcurl is linked against
+gnutls. However the check depends on "CURL_LIBS" which wasn't defined
+by the macro.
+
+This commit will define "CURL_LIBS" so that the check works as expected.
+---
+ build/find_curl.m4 | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/build/find_curl.m4 b/build/find_curl.m4
+index 6b23ad6..3310e40 100644
+--- a/build/find_curl.m4
++++ b/build/find_curl.m4
+@@ -2,6 +2,7 @@ dnl Check for CURL Libraries
+ dnl CHECK_CURL(ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND])
+ dnl Sets:
+ dnl CURL_CFLAGS
++dnl CURL_LDADD
+ dnl CURL_LIBS
+
+ CURL_CONFIG=""
+@@ -57,7 +58,8 @@ if test -n "${curl_path}"; then
+ if test "$verbose_output" -eq 1; then AC_MSG_NOTICE(curl VERSION: $CURL_VERSION); fi
+ CURL_CFLAGS="`${CURL_CONFIG} --cflags`"
+ if test "$verbose_output" -eq 1; then AC_MSG_NOTICE(curl CFLAGS: $CURL_CFLAGS); fi
+- CURL_LDADD="`${CURL_CONFIG} --libs`"
++ CURL_LIBS="`${CURL_CONFIG} --libs`"
++ CURL_LDADD="${CURL_LIBS}"
+ if test "$verbose_output" -eq 1; then AC_MSG_NOTICE(curl LDADD: $CURL_LIBS); fi
+
+ dnl # Check version is ok
+
+From 67f98e7da04251a40a0172e3dfac2c5a6ac6f7dd Mon Sep 17 00:00:00 2001
+From: Thomas Deutschmann <whissi@whissi.de>
+Date: Sat, 11 Jun 2016 16:48:58 +0200
+Subject: [PATCH 2/2] configure: Move verbose_output declaration up to the
+ beginning
+
+Macros like "find_curl" are using "verbose_output" variable but because some
+of them are called before we define the variable we are seeing errors like
+
+ ./configure: line 13855: test: : integer expression expected
+
+This commit will fix the problem by moving the "verbose_output" declaration
+up to the beginning so that the variable is available for every macro.
+---
+ configure.ac | 30 ++++++++++++++++--------------
+ 1 file changed, 16 insertions(+), 14 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 7517885..0f32b01 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -70,6 +70,22 @@ AC_SUBST(MSC_REGRESSION_DOCROOT_DIR)
+
+ ### Configure Options
+
++# Verbose output
++AC_ARG_ENABLE(verbose-output,
++ AS_HELP_STRING([--enable-verbose-output],
++ [Enable more verbose configure output.]),
++[
++ if test "$enableval" != "no"; then
++ verbose_output=1
++ else
++ verbose_output=0
++ fi
++],
++[
++ verbose_output=0
++])
++
++
+ #OS type
+
+ AC_CANONICAL_HOST
+@@ -410,20 +426,6 @@ AC_ARG_ENABLE(errors,
+ report_errors=1
+ ])
+
+-# Verbose output
+-AC_ARG_ENABLE(verbose-output,
+- AS_HELP_STRING([--enable-verbose-output],
+- [Enable more verbose configure output.]),
+-[
+- if test "$enableval" != "no"; then
+- verbose_output=1
+- else
+- verbose_output=0
+- fi
+-],
+-[
+- verbose_output=0
+-])
+
+ # Strict Compile
+ AC_ARG_ENABLE(strict-compile,
diff --git a/www-servers/nginx/files/http_uploadprogress-issue_50.patch b/www-servers/nginx/files/http_uploadprogress-issue_50.patch
new file mode 100644
index 000000000000..3347c5b54708
--- /dev/null
+++ b/www-servers/nginx/files/http_uploadprogress-issue_50.patch
@@ -0,0 +1,32 @@
+From edd7e026fa992f58b04ea9d00b56239f37b3e320 Mon Sep 17 00:00:00 2001
+From: Thomas Deutschmann <whissi@whissi.de>
+Date: Wed, 19 Oct 2016 15:05:27 +0200
+Subject: [PATCH] config: Only build as dynamic module when really requested
+
+Since commit 37182ce2f3b6 the module was always build as dynamic module.
+Probably because following a bad skeleton [1].
+
+With this change we will only build a dynamic module when requested. Otherwise
+we will fall back to static build.
+
+Link: https://trac.nginx.org/nginx/ticket/1115
+Gentoo-Bug: https://bugs.gentoo.org/593450
+Fixes: https://github.com/masterzen/nginx-upload-progress-module/issues/50
+---
+ config | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/config b/config
+index 364af8c..d704460 100644
+--- a/config
++++ b/config
+@@ -1,5 +1,5 @@
+ ngx_addon_name=ngx_http_uploadprogress_module
+-if test -n "$ngx_module_link"; then
++if [ $ngx_module_link = DYNAMIC ] ; then
+ ngx_module_type=FILTER
+ ngx_module_name=ngx_http_uploadprogress_module
+ ngx_module_srcs="$ngx_addon_dir/ngx_http_uploadprogress_module.c"
+--
+2.10.1
+
diff --git a/www-servers/nginx/nginx-1.10.2.ebuild b/www-servers/nginx/nginx-1.10.2-r1.ebuild
index f5a4f5e78505..c649333d465a 100644
--- a/www-servers/nginx/nginx-1.10.2.ebuild
+++ b/www-servers/nginx/nginx-1.10.2-r1.ebuild
@@ -140,8 +140,9 @@ HTTP_LDAP_MODULE_WD="${WORKDIR}/nginx-auth-ldap-${HTTP_LDAP_MODULE_PV}"
# We handle deps below ourselves
SSL_DEPS_SKIP=1
+AUTOTOOLS_AUTO_DEPEND="no"
-inherit ssl-cert toolchain-funcs perl-module flag-o-matic user systemd versionator multilib
+inherit autotools ssl-cert toolchain-funcs perl-module flag-o-matic user systemd versionator multilib
DESCRIPTION="Robust, small and high performance http and reverse proxy server"
HOMEPAGE="http://nginx.org"
@@ -276,6 +277,7 @@ RDEPEND="${CDEPEND}
selinux? ( sec-policy/selinux-nginx )
!www-servers/nginx:mainline"
DEPEND="${CDEPEND}
+ nginx_modules_http_security? ( ${AUTOTOOLS_DEPEND} )
arm? ( dev-libs/libatomic_ops )
libatomic? ( dev-libs/libatomic_ops )"
PDEPEND="vim-syntax? ( app-vim/nginx-syntax )"
@@ -334,6 +336,28 @@ src_prepare() {
sed -i -e 's/-llua5.1/-llua/' "${HTTP_LUA_MODULE_WD}/config" || die
fi
+ if use nginx_modules_http_security; then
+ cd "${HTTP_SECURITY_MODULE_WD}" || die
+
+ eapply "${FILESDIR}"/http_security-pr_1158.patch
+
+ eautoreconf
+
+ if use luajit ; then
+ sed -i \
+ -e 's|^\(LUA_PKGNAMES\)=.*|\1="luajit"|' \
+ configure || die
+ fi
+
+ cd "${S}" || die
+ fi
+
+ if use nginx_modules_http_upload_progress; then
+ cd "${HTTP_UPLOAD_PROGRESS_MODULE_WD}" || die
+ eapply "${FILESDIR}"/http_uploadprogress-issue_50.patch
+ cd "${S}" || die
+ fi
+
find auto/ -type f -print0 | xargs -0 sed -i 's:\&\& make:\&\& \\$(MAKE):' || die
# We have config protection, don't rename etc files
sed -i 's:.default::' auto/install || die
@@ -355,20 +379,16 @@ src_configure() {
# mod_security needs to generate nginx/modsecurity/config before including it
if use nginx_modules_http_security; then
cd "${HTTP_SECURITY_MODULE_WD}" || die
- if use luajit ; then
- sed -i \
- -e 's|^\(LUA_PKGNAMES\)=.*|\1="luajit"|' \
- configure || die
- fi
+
./configure \
--enable-standalone-module \
--disable-mlogc \
--with-ssdeep=no \
$(use_enable pcre-jit) \
$(use_with nginx_modules_http_lua lua) || die "configure failed for mod_security"
- fi
- cd "${S}" || die
+ cd "${S}" || die
+ fi
local myconf=() http_enabled= mail_enabled= stream_enabled=
diff --git a/www-servers/nginx/nginx-1.11.5.ebuild b/www-servers/nginx/nginx-1.11.5-r1.ebuild
index c5ed9be7ace6..46c24d304a73 100644
--- a/www-servers/nginx/nginx-1.11.5.ebuild
+++ b/www-servers/nginx/nginx-1.11.5-r1.ebuild
@@ -140,8 +140,9 @@ HTTP_LDAP_MODULE_WD="${WORKDIR}/nginx-auth-ldap-${HTTP_LDAP_MODULE_PV}"
# We handle deps below ourselves
SSL_DEPS_SKIP=1
+AUTOTOOLS_AUTO_DEPEND="no"
-inherit ssl-cert toolchain-funcs perl-module flag-o-matic user systemd versionator multilib
+inherit autotools ssl-cert toolchain-funcs perl-module flag-o-matic user systemd versionator multilib
DESCRIPTION="Robust, small and high performance http and reverse proxy server"
HOMEPAGE="http://nginx.org"
@@ -283,6 +284,7 @@ RDEPEND="${CDEPEND}
selinux? ( sec-policy/selinux-nginx )
!www-servers/nginx:0"
DEPEND="${CDEPEND}
+ nginx_modules_http_security? ( ${AUTOTOOLS_DEPEND} )
arm? ( dev-libs/libatomic_ops )
libatomic? ( dev-libs/libatomic_ops )"
PDEPEND="vim-syntax? ( app-vim/nginx-syntax )"
@@ -342,6 +344,28 @@ src_prepare() {
sed -i -e 's/-llua5.1/-llua/' "${HTTP_LUA_MODULE_WD}/config" || die
fi
+ if use nginx_modules_http_security; then
+ cd "${HTTP_SECURITY_MODULE_WD}" || die
+
+ eapply "${FILESDIR}"/http_security-pr_1158.patch
+
+ eautoreconf
+
+ if use luajit ; then
+ sed -i \
+ -e 's|^\(LUA_PKGNAMES\)=.*|\1="luajit"|' \
+ configure || die
+ fi
+
+ cd "${S}" || die
+ fi
+
+ if use nginx_modules_http_upload_progress; then
+ cd "${HTTP_UPLOAD_PROGRESS_MODULE_WD}" || die
+ eapply "${FILESDIR}"/http_uploadprogress-issue_50.patch
+ cd "${S}" || die
+ fi
+
find auto/ -type f -print0 | xargs -0 sed -i 's:\&\& make:\&\& \\$(MAKE):' || die
# We have config protection, don't rename etc files
sed -i 's:.default::' auto/install || die
@@ -363,20 +387,16 @@ src_configure() {
# mod_security needs to generate nginx/modsecurity/config before including it
if use nginx_modules_http_security; then
cd "${HTTP_SECURITY_MODULE_WD}" || die
- if use luajit ; then
- sed -i \
- -e 's|^\(LUA_PKGNAMES\)=.*|\1="luajit"|' \
- configure || die
- fi
+
./configure \
--enable-standalone-module \
--disable-mlogc \
--with-ssdeep=no \
$(use_enable pcre-jit) \
$(use_with nginx_modules_http_lua lua) || die "configure failed for mod_security"
- fi
- cd "${S}" || die
+ cd "${S}" || die
+ fi
local myconf=() http_enabled= mail_enabled= stream_enabled=