From aa8a11c1b3197cd4d7bae56d7c62f790bc8a86a7 Mon Sep 17 00:00:00 2001 From: Izorkin Date: Thu, 30 May 2019 22:57:45 +0300 Subject: [PATCH] unit: 1.8.0 -> 1.9.0 --- pkgs/servers/http/unit/default.nix | 7 ++----- pkgs/servers/http/unit/unit-rootless.patch | 24 ---------------------- 2 files changed, 2 insertions(+), 29 deletions(-) delete mode 100644 pkgs/servers/http/unit/unit-rootless.patch diff --git a/pkgs/servers/http/unit/default.nix b/pkgs/servers/http/unit/default.nix index d798d5d231ec..3f0567695fb8 100644 --- a/pkgs/servers/http/unit/default.nix +++ b/pkgs/servers/http/unit/default.nix @@ -16,14 +16,14 @@ with stdenv.lib; stdenv.mkDerivation rec { - version = "1.8.0"; + version = "1.9.0"; name = "unit-${version}"; src = fetchFromGitHub { owner = "nginx"; repo = "unit"; rev = "${version}"; - sha256 = "1s5pfyhabnf9p5z2h1fh0wb4hqzkrha5bxahjnikmlkhw59s8zip"; + sha256 = "0f7smgshfzksks2jfhi53g87wiyy38vwgj6aa70ql61m135dx7b1"; }; nativeBuildInputs = [ which ]; @@ -40,9 +40,6 @@ stdenv.mkDerivation rec { ++ optional withRuby ruby ++ optional withSSL openssl; - # Used patch to enable work with unprivileged user - https://github.com/nginx/unit/issues/228 - patches = [ ./unit-rootless.patch ]; - configureFlags = [ "--control=unix:/run/unit/control.unit.sock" "--pid=/run/unit/unit.pid" diff --git a/pkgs/servers/http/unit/unit-rootless.patch b/pkgs/servers/http/unit/unit-rootless.patch deleted file mode 100644 index 36506847f915..000000000000 --- a/pkgs/servers/http/unit/unit-rootless.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff --git a/src/nxt_process.c b/src/nxt_process.c -index 5952029..7b29369 100644 ---- a/src/nxt_process.c -+++ b/src/nxt_process.c -@@ -136,7 +136,7 @@ nxt_process_start(nxt_task_t *task, nxt_process_t *process) - - nxt_random_init(&thread->random); - -- if (init->user_cred != NULL && getuid() == 0) { -+ if (init->user_cred != NULL) { - /* Super-user. */ - - ret = nxt_user_cred_set(task, init->user_cred); -@@ -434,9 +434,7 @@ nxt_user_cred_get(nxt_task_t *task, nxt_user_cred_t *uc, const char *group) - uc->base_gid = grp->gr_gid; - } - -- if (getuid() == 0) { - return nxt_user_groups_get(task, uc); -- } - - return NXT_OK; - } -