From patchwork Thu Jan 23 08:36:41 2020
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Pascal de Bruijn
X-Patchwork-Id: 1227736
Return-Path:
X-Original-To: incoming-buildroot@patchwork.ozlabs.org
Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org
Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized)
smtp.mailfrom=busybox.net (client-ip=140.211.166.137;
helo=fraxinus.osuosl.org;
envelope-from=buildroot-bounces@busybox.net;
receiver=)
Authentication-Results: ozlabs.org;
dmarc=none (p=none dis=none) header.from=unilogic.nl
Authentication-Results: ozlabs.org;
dkim=fail reason="signature verification failed" (1024-bit key;
unprotected) header.d=unilogicnl.onmicrosoft.com
header.i=@unilogicnl.onmicrosoft.com header.a=rsa-sha256
header.s=selector1-unilogicnl-onmicrosoft-com
header.b=IlEQbB2B; dkim-atps=neutral
Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256
bits)) (No client certificate requested)
by ozlabs.org (Postfix) with ESMTPS id 483Ghq4zVsz9sRl
for ;
Thu, 23 Jan 2020 20:10:51 +1100 (AEDT)
Received: from localhost (localhost [127.0.0.1])
by fraxinus.osuosl.org (Postfix) with ESMTP id 6E29E868F5;
Thu, 23 Jan 2020 09:10:49 +0000 (UTC)
X-Virus-Scanned: amavisd-new at osuosl.org
Received: from fraxinus.osuosl.org ([127.0.0.1])
by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)
with ESMTP id meE5EFVm04qQ; Thu, 23 Jan 2020 09:10:46 +0000 (UTC)
Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34])
by fraxinus.osuosl.org (Postfix) with ESMTP id A88388693C;
Thu, 23 Jan 2020 09:10:46 +0000 (UTC)
X-Original-To: buildroot@lists.busybox.net
Delivered-To: buildroot@osuosl.org
Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138])
by ash.osuosl.org (Postfix) with ESMTP id 5951E1BF834
for ;
Thu, 23 Jan 2020 09:10:45 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
by whitealder.osuosl.org (Postfix) with ESMTP id 53C4D86EB2
for ;
Thu, 23 Jan 2020 09:10:45 +0000 (UTC)
X-Virus-Scanned: amavisd-new at osuosl.org
Received: from whitealder.osuosl.org ([127.0.0.1])
by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)
with ESMTP id x6aQspd952j4 for ;
Thu, 23 Jan 2020 09:10:43 +0000 (UTC)
X-Greylist: from auto-whitelisted by SQLgrey-1.7.6
Received: from EUR01-VE1-obe.outbound.protection.outlook.com
(mail-eopbgr140072.outbound.protection.outlook.com [40.107.14.72])
by whitealder.osuosl.org (Postfix) with ESMTPS id DD4FD827A7
for ; Thu, 23 Jan 2020 09:10:42 +0000 (UTC)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;
b=V0xGs8RJuwZPJ6CG7DzGeb3zWv790fUpdHipgBZXixXu7zMhe3lirgyRPaSEfpi48y6C8ZMiLTry8HTcJssyTjV6G/b3K88M4f0iuj+c9okI60O+fxXMdw6oV1YwIGjiuwezlCu1+qwkRjlT/xNaPOs6vF0smfrsLmxC3fx8aUE+ZfT7wnCAuQrUWx8ow15gtqfwH/pmaOyYCozALXud2gKAGRJMy72Y7a6jmakJD/CMv0Zkz4ErniHHJU4w/GiQaI6d64bTalR2hwGCvOkc9IPcjsd1phiuW7CWyR6u9sXFfiL2j5R6NElXbicUIKvsANeIBQp/TAUaRh9mVii3+Q==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector9901;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=JcDd7MVa8y02p3sARZcJ7L2KbJtGwTg4sqF7oa3s+cM=;
b=X9Dvkx7UkwRnrcpaQTkpwLHLg/tegAX4NqdPwQHzmIyXgQbLXklyFWLFEdlrfrZm3n8dDntTx7dH+5y7PCPyiEC0drRgVO0WDCByGNc8fvWTDZ60OB5AK7mneQbj1tnrS/Vr6hLImYZHGWfu5vtYExd7fxDVIzmdeBx1E//5YAn9KBvxLu3NfjZ28PFHont2pTkb61s635Af4onZHbRH1TVEdyI6i50MV5HkzYMb+Br842B5DbVPJ3D7/astFgtIyZin6ezop3bPvVY623+SZYgMeZ5MLb4pscZp3G2c3PXAeh95EMFqFQp87gwxMbFQt/3KI66WgCOumJidihZR/g==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=unilogic.nl;
dmarc=pass action=none header.from=unilogic.nl;
dkim=pass header.d=unilogic.nl; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=unilogicnl.onmicrosoft.com; s=selector1-unilogicnl-onmicrosoft-com;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=JcDd7MVa8y02p3sARZcJ7L2KbJtGwTg4sqF7oa3s+cM=;
b=IlEQbB2BeChqCG8iswtb19P9gr9C4r4SDJT8NetSlOh7qUmjjPz/+icYs5L/WPwvgRpf8eaOJVMuGaaB51MND9Xyj0D6kJNM6DTefhTtvQAC2S1Yt8QEJTJlrmOjBixvZuccGrpBEwgJcHrqkFOYt9vDJSjZDUkx2TSOJIIXgiY=
Authentication-Results: spf=none (sender IP is )
smtp.mailfrom=p.debruijn@unilogic.nl;
Received: from HE1PR07MB3401.eurprd07.prod.outlook.com (10.170.247.28) by
AM0SPR01MB0033.eurprd07.prod.outlook.com (52.135.152.161) with
Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
15.20.2686.11; Thu, 23 Jan 2020 08:36:58 +0000
Received: from HE1PR07MB3401.eurprd07.prod.outlook.com
([fe80::2c24:9b3f:ce22:95a1]) by
HE1PR07MB3401.eurprd07.prod.outlook.com
([fe80::2c24:9b3f:ce22:95a1%7]) with mapi id 15.20.2686.008;
Thu, 23 Jan 2020 08:36:58 +0000
From: Pascal de Bruijn
To: buildroot@busybox.net
Date: Thu, 23 Jan 2020 09:36:41 +0100
Message-Id: <20200123083641.3808-1-p.debruijn@unilogic.nl>
X-Mailer: git-send-email 2.17.1
X-ClientProxiedBy: AM4PR0501CA0056.eurprd05.prod.outlook.com
(2603:10a6:200:68::24) To HE1PR07MB3401.eurprd07.prod.outlook.com
(2603:10a6:7:2d::28)
MIME-Version: 1.0
Received: from optiplex-pbrui.unilogic.local (62.133.193.10) by
AM4PR0501CA0056.eurprd05.prod.outlook.com (2603:10a6:200:68::24) with
Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2665.19 via
Frontend Transport; Thu, 23 Jan 2020 08:36:57 +0000
X-Mailer: git-send-email 2.17.1
X-Originating-IP: [62.133.193.10]
X-MS-PublicTrafficType: Email
X-MS-Office365-Filtering-Correlation-Id: 2c443b58-96d1-4a65-1fbc-08d79fdf68cb
X-MS-TrafficTypeDiagnostic: AM0SPR01MB0033:
X-MS-Exchange-Transport-Forked: True
X-Microsoft-Antispam-PRVS:
X-MS-Oob-TLC-OOBClassifiers: OLM:6108;
X-Forefront-PRVS: 029174C036
X-Forefront-Antispam-Report: SFV:NSPM;
SFS:(10009020)(366004)(396003)(136003)(376002)(346002)(39830400003)(199004)(189003)(6916009)(8676002)(81156014)(66556008)(66476007)(81166006)(66946007)(508600001)(1076003)(8936002)(2906002)(86362001)(36756003)(5660300002)(16526019)(316002)(6506007)(6486002)(52116002)(6666004)(186003)(26005)(6512007)(107886003)(2616005)(956004)(4326008);
DIR:OUT; SFP:1101; SCL:1; SRVR:AM0SPR01MB0033;
H:HE1PR07MB3401.eurprd07.prod.outlook.com; FPR:; SPF:None; LANG:en;
PTR:InfoNoRecords; A:1; MX:1;
Received-SPF: None (protection.outlook.com: unilogic.nl does not designate
permitted sender hosts)
X-MS-Exchange-SenderADCheck: 1
X-Microsoft-Antispam: BCL:0;
X-Microsoft-Antispam-Message-Info:
rZxIuk/No4fO9wfKfFcnvZs0nF4Pxm3hVIbQRoypBX1NSar/wobGPD9EiP4UCrKN4ZUGvpkp2qN+3xF+KXbjSI0iVtd9H5ZMvO6ewAb9sJ5BK1zghi7jrUw0ed1Pg0HTLrSQfZRhkThUUx3KrmlwDfmnvyKCOyMvJ6edKmTBKGbMeKOzE3G68CkcxQmjilPyO4YJP7/eF3kE+093N95OghOTzbhw1mnHXM3RNInyQmEv80bmuKW5Adk3X04dVHzEM7DUW5aSCBHRDQlWjjGn96afWgUwViZfZ3vPM7DKL+bqhK6zydwL21nkYHMtYgoTBOMBgxYWuo1ASEVQ3wHxP2OYLYU5K6HC7K092eteitP8R9O5b6CTDvuZmHLFtlJLcqdsQvaR6NWQdBmCnRYLtroeOGEWwtHDwSiickTPHPMxa3oIAUSZJpQLcv+KThgx
X-MS-Exchange-AntiSpam-MessageData:
8OHNBnMOmuuBKw/hy3WYaH4eppiG4MwBsecBYKsp1yiu5o1uWWiFKooU5KIYTdWObzXkWv+GuPAjAkxgXR+shoqQ3cl+jOJNLRTqXfoGmS+4TKZ5m/wAq3+hlsvakayhAzA2yrEKJ6MhkB6ayOGaTw==
X-OriginatorOrg: unilogic.nl
X-MS-Exchange-CrossTenant-Network-Message-Id:
2c443b58-96d1-4a65-1fbc-08d79fdf68cb
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Jan 2020 08:36:58.3248
(UTC)
X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted
X-MS-Exchange-CrossTenant-Id: 80e1d02e-cf3d-42a6-8024-091a212ef6af
X-MS-Exchange-CrossTenant-MailboxType: HOSTED
X-MS-Exchange-CrossTenant-UserPrincipalName:
o2h6cq5ti8lvkGvDDiCA5RUOei4YdbTABF+/kCck0AcWHh3MO5NLt4SN1Mnk6WOJK7XM3WWFsZ+3Q4cEBIOcfQ==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0SPR01MB0033
Subject: [Buildroot] [PATCH] package/nginx: use CacheDirectory
X-BeenThere: buildroot@busybox.net
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Discussion and development of buildroot
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Cc: Pascal de Bruijn
Errors-To: buildroot-bounces@busybox.net
Sender: "buildroot"
move
http-client-body-temp-path
http-proxy-temp-path
http-fastcgi-temp-path
http-scgi-temp-path
http-uwsgi-temp-path
from /var/tmp/nginx to /var/cache/nginx
this allows the use of systemd constructs
LogsDirectory=nginx
CacheDirectory=nginx
to replace
ExecStartPre=/usr/bin/mkdir -p /var/log/nginx /var/tmp/nginx
as there isn't similar construct for /var/tmp
Signed-off-by: Pascal de Bruijn
---
package/nginx/S50nginx | 2 +-
package/nginx/nginx.mk | 10 +++++-----
package/nginx/nginx.service | 3 ++-
3 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/package/nginx/S50nginx b/package/nginx/S50nginx
index 964652b..6c243f4 100644
--- a/package/nginx/S50nginx
+++ b/package/nginx/S50nginx
@@ -9,7 +9,7 @@ PIDFILE=/var/run/nginx.pid
case "$1" in
start)
echo "Starting nginx..."
- mkdir -p /var/log/nginx /var/tmp/nginx
+ mkdir -p /var/log/nginx /var/cache/nginx
start-stop-daemon -S -x "$NGINX" -p "$PIDFILE"
;;
stop)
diff --git a/package/nginx/nginx.mk b/package/nginx/nginx.mk
index 59fddbb..bb8c57a 100644
--- a/package/nginx/nginx.mk
+++ b/package/nginx/nginx.mk
@@ -56,11 +56,11 @@ NGINX_CONF_OPTS += \
--group=www-data \
--error-log-path=/var/log/nginx/error.log \
--http-log-path=/var/log/nginx/access.log \
- --http-client-body-temp-path=/var/tmp/nginx/client-body \
- --http-proxy-temp-path=/var/tmp/nginx/proxy \
- --http-fastcgi-temp-path=/var/tmp/nginx/fastcgi \
- --http-scgi-temp-path=/var/tmp/nginx/scgi \
- --http-uwsgi-temp-path=/var/tmp/nginx/uwsgi
+ --http-client-body-temp-path=/var/cache/nginx/client-body \
+ --http-proxy-temp-path=/var/cache/nginx/proxy \
+ --http-fastcgi-temp-path=/var/cache/nginx/fastcgi \
+ --http-scgi-temp-path=/var/cache/nginx/scgi \
+ --http-uwsgi-temp-path=/var/cache/nginx/uwsgi
NGINX_CONF_OPTS += \
$(if $(BR2_PACKAGE_NGINX_FILE_AIO),--with-file-aio) \
diff --git a/package/nginx/nginx.service b/package/nginx/nginx.service
index 320df9a..3f6cd12 100644
--- a/package/nginx/nginx.service
+++ b/package/nginx/nginx.service
@@ -4,8 +4,9 @@ After=syslog.target network.target
[Service]
Type=forking
+LogsDirectory=nginx
+CacheDirectory=nginx
PIDFile=/var/run/nginx.pid
-ExecStartPre=/usr/bin/mkdir -p /var/log/nginx /var/tmp/nginx
ExecStartPre=/usr/sbin/nginx -t -q -g 'pid /var/run/nginx.pid; daemon on; master_process on;'
ExecStart=/usr/sbin/nginx -g 'pid /var/run/nginx.pid; daemon on; master_process on;'
ExecReload=/usr/sbin/nginx -g 'pid /var/run/nginx.pid; daemon on; master_process on;' -s reload