From 0401f37dbf55ba7e4369511fc3de6b8b834a1b61 Mon Sep 17 00:00:00 2001 From: Henrik Grimler Date: Wed, 20 May 2020 16:29:26 +0200 Subject: [PATCH] nginx: ignore group Otherwise it fails when trying to run as root. This works in my simple tests --- packages/nginx/build.sh | 2 +- packages/nginx/nginx.c.patch | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 packages/nginx/nginx.c.patch diff --git a/packages/nginx/build.sh b/packages/nginx/build.sh index ea693bfa1..5eacdb9c0 100644 --- a/packages/nginx/build.sh +++ b/packages/nginx/build.sh @@ -2,7 +2,7 @@ TERMUX_PKG_HOMEPAGE=https://www.nginx.org TERMUX_PKG_DESCRIPTION="Lightweight HTTP server" TERMUX_PKG_LICENSE="BSD 2-Clause" TERMUX_PKG_VERSION=1.18.0 -TERMUX_PKG_REVISION=1 +TERMUX_PKG_REVISION=2 TERMUX_PKG_SRCURL=http://nginx.org/download/nginx-$TERMUX_PKG_VERSION.tar.gz TERMUX_PKG_SHA256=4c373e7ab5bf91d34a4f11a0c9496561061ba5eee6020db272a17a7228d35f99 TERMUX_PKG_DEPENDS="libandroid-glob, libcrypt, pcre, openssl, zlib" diff --git a/packages/nginx/nginx.c.patch b/packages/nginx/nginx.c.patch new file mode 100644 index 000000000..30952c6e5 --- /dev/null +++ b/packages/nginx/nginx.c.patch @@ -0,0 +1,18 @@ +--- ../nginx.c.orig 2020-05-20 16:18:15.028740536 +0200 ++++ ./src/core/nginx.c 2020-05-20 16:17:58.883365526 +0200 +@@ -1115,14 +1115,8 @@ + ccf->user = pwd->pw_uid; + + ngx_set_errno(0); +- grp = getgrnam(NGX_GROUP); +- if (grp == NULL) { +- ngx_log_error(NGX_LOG_EMERG, cycle->log, ngx_errno, +- "getgrnam(\"" NGX_GROUP "\") failed"); +- return NGX_CONF_ERROR; +- } + +- ccf->group = grp->gr_gid; ++ ccf->group = NULL; + } + +