From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id E4C8F159C96 for ; Tue, 30 Jul 2024 08:02:03 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 7B9A72BC034; Tue, 30 Jul 2024 08:02:00 +0000 (UTC) Received: from mail-ed1-x530.google.com (mail-ed1-x530.google.com [IPv6:2a00:1450:4864:20::530]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 4C4912BC029 for ; Tue, 30 Jul 2024 08:02:00 +0000 (UTC) Received: by mail-ed1-x530.google.com with SMTP id 4fb4d7f45d1cf-5af6a1afa63so4031642a12.0 for ; Tue, 30 Jul 2024 01:02:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1722326519; x=1722931319; darn=lists.gentoo.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:to:from:date:from:to:cc :subject:date:message-id:reply-to; bh=9PAzTdqu0M25S6t63o2VGB3ARw07zN7NxtQtXqkzZTA=; b=XjB9ge7juHVDDU+O6efQQDSlUN7LvPmphr+6vuw7zZH+1/WwhZojqOG9S6e3e65EGl CFzuzmEJq/AZvz71g1fPV9yF2Itb5Ln8VEi3pHV/egmM7dh/mzdEEQHQzvQEeGrNbxLv 5k+I6SzIkq56yyWZk37a1s1CgtO6+j9v6aOvqlUhUIlJfbk4/1Xo8Pk/EaGFb93DSMe/ 93ZJQKRleDHFDL2rrnAmR+9mqV75GQIlVuhUA7JsfYpdUx8XTmL3T5OmKaH3wtJTlz0m bIYpc1Uat3sqriCYpnTSceeO9hUCVt0/HD4TIZUB3Rs2f+Eql5/se0gjd9juPpvv+SRb Dqng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722326519; x=1722931319; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=9PAzTdqu0M25S6t63o2VGB3ARw07zN7NxtQtXqkzZTA=; b=s2joxsxd/DxAhktK07xI+9kuOBCTZsoNw1kMZlORVj2wZmUEoYE86zS4pc4m71cQX5 uO2u1wg3HlrIC2oS+vzMRy5jpB3mMbEY76OT5+vJyHhwQ34QgkENtws64mlcTSA1Wizk DsnVUXbaM1sd0nPw6RMSICwHeJ3AtjHb4OzI41C8BeQja+VWCdpuBMCrRbnBkNQUWpxO vwWWSzLYo9SyBpGIksAnifcPEAqP64P04Xu7WaNOcZaQ+yE71uKE8Kt0t+c2gL0/YFTy 2NFNBFJU7oN1B5nsT+YmeWMeTCzdP4vFM1YkpMo7t35mcS2I/sXIUKSduBftyASh3ciN f1/Q== X-Gm-Message-State: AOJu0YyYUXGIs1vQ4BfhNtWex8kUO3xc4JkFzj3UOmzqfbkOHeT7mWvJ Dw6udU3XSkKxKxvr86u0aMfg0rgDH/AwKXRDxLdqhqiggCkAVlFsZnsFzw== X-Google-Smtp-Source: AGHT+IHLs9hSGt2cYvgpdzanV50ivCtUKmeN7qAnOC4wJvguUA95vvGK8keWxSilWAdcH3oZry2/Ng== X-Received: by 2002:a05:6402:4303:b0:578:60a6:7c69 with SMTP id 4fb4d7f45d1cf-5b02328115bmr7142028a12.30.1722326518648; Tue, 30 Jul 2024 01:01:58 -0700 (PDT) Received: from gentoo-desktop ([62.244.50.57]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5ac63590d76sm6950975a12.24.2024.07.30.01.01.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jul 2024 01:01:58 -0700 (PDT) Date: Tue, 30 Jul 2024 08:01:52 +0000 From: Zurab Kvachadze To: gentoo-dev@lists.gentoo.org Subject: Re: [gentoo-dev] [RFC PATCH v2 04/20] www-servers/nginx: add nginx.tmpfiles for managing /var/tmp/nginx Message-ID: <6xv3cz7rj4losgfwrnqwme2k7fosutrzgq7mfm6ehlibheannm@h2ryuhz4yljz> References: <20240729215241.13243-1-zurabid2016@gmail.com> <20240729215241.13243-5-zurabid2016@gmail.com> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Archives-Salt: 6e08b0d6-8afc-41f4-83b8-49ce6d1d7db3 X-Archives-Hash: 4737e08d401d96abca8c756b14c24eca On Tue, 2024-07-30 at 09:12 +0000, Christian Bricart wrote: > just my 2¢ here and sorry if I might have overlookt a rationale earlier > > why moving nginx's temp dir to "generic purpose" /var/tmp/… and not keeping > it at /var/lib/nginx/tmp/* ? TLDR: Because /var/tmp is designated for temporary files, unlike /var/lib. The Filesystem Hierarchy Standard (FHS)[1] describes /var/tmp as a directory storing "temporary files preserved between reboots"[2], which is much closer to our purpose of storing temporary NGINX files. Conversely, /var/lib stores persistent information (databases, etc.), not temporary files. Note: While FHS is not an authoritative standard for Gentoo, it is a good set of sensible guidelines for a software packager. [1]: https://refspecs.linuxfoundation.org/FHS_3.0/fhs/index.html [2]: https://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch05s15.html > Especially, when there even is/would be a tmpfiles entry taking care of it's > existence and ownership. > > Christian > > Am 29.07.24 um 23:52 schrieb Zurab Kvachadze: > > This places the burden on creating and cleaning /var/tmp/nginx in > > world-writable /var/tmp on systemd-tmpfiles(8). > > > > Signed-off-by: Zurab Kvachadze > > --- > > www-servers/nginx/files/nginx.tmpfiles | 2 ++ > > 1 file changed, 2 insertions(+) > > create mode 100644 www-servers/nginx/files/nginx.tmpfiles > > > > diff --git a/www-servers/nginx/files/nginx.tmpfiles b/www-servers/nginx/files/nginx.tmpfiles > > new file mode 100644 > > index 000000000000..af9cdd26973f > > --- /dev/null > > +++ b/www-servers/nginx/files/nginx.tmpfiles > > @@ -0,0 +1,2 @@ > > +D /var/tmp/nginx 0755 root root > > +x /var/tmp/nginx