From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id wIROJkkpdGZDpAAA62LTzQ:P1 (envelope-from ) for ; Thu, 20 Jun 2024 13:06:17 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id wIROJkkpdGZDpAAA62LTzQ (envelope-from ) for ; Thu, 20 Jun 2024 15:06:17 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=wolfsden.cz header.s=mail header.b=mqewlAYv; dkim=fail ("headers rsa verify failed") header.d=wolfsden.cz header.s=mail header.b=HgztDrb7; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=wolfsden.cz (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1718888777; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=HXEfsu2nlNAadiI34T0nGLd8Lt0nQ0aLpoxTJ4M5Fs4=; b=CUN9syfzGA9k2uFl38V+xUa85DWz5aiWMnrn1K+hjWTU0wO4k+bQLl5ennzIKXQLx/Y8kt Rf1Sp0EgxNilZ3VTXtmr+neQKLqWDxy4ROCEfPdsooNQ8llupVdpl29Yetzteg+EXcI8Ok 7onyaIMwppxRhjp6iMujPKGTaxruSdJloP/w0uLVXX28NJudrcdO6GlyWeBypLCJW6YlT2 TWTRugc0dqWj5LjrIPUQ+6pVU6/D2zW4V657Ol6J/9Lk5PIRexPTuiFTaomlc1PLkUq/cX YVBeznGG3Bj7Oh2xfWUvCbDJwjiiy9GpoGDm40hGm7DhbYKeCWz0VTkoDMkyCg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=wolfsden.cz header.s=mail header.b=mqewlAYv; dkim=fail ("headers rsa verify failed") header.d=wolfsden.cz header.s=mail header.b=HgztDrb7; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=wolfsden.cz (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1718888777; a=rsa-sha256; cv=none; b=XTjHklCRvRS51io9PeaPPnFU9NnkKaHDdyK1Fdvs2YPCe94t8eJQ9uGuPFDY6MtBOJExfK 4VVVsQgAkRQUkWE6RS4fRgKvMH+d8n/XPbFDv1JGjH6eDqXWuXyyYaEnNnJAXceC2qlcE9 vzyMP23kgrRrI0Wq58Gu6EfSyz6ZTPD00MfGRQ7zBN3mR6+UtBax5ILuF5PohwlBwrPjLD 6ZI5VUWXtA97CA9qSziZXA5aST1sdUR16OF2zHfsvJTb/u5bm+edQE0ts8eeN7XRrGS8t6 14L9K94O5mTBZqu+FYHZaIaBG+La3rxakpXdkVOnP1/uEWkCFVkgHNTHDfbUpg== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 25DEC65F73 for ; Thu, 20 Jun 2024 15:06:16 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sKHUJ-0006Bo-Uo; Thu, 20 Jun 2024 09:06:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sKHUI-0006BM-00 for guix-patches@gnu.org; Thu, 20 Jun 2024 09:06:02 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sKHUG-00075J-NK; Thu, 20 Jun 2024 09:06:00 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sKHUI-0007sN-8R; Thu, 20 Jun 2024 09:06:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#71676] [PATCH] services: nginx-upstream-configuration: Allow file-like objects Resent-From: Tomas Volf <~@wolfsden.cz> Original-Sender: "Debbugs-submit" Resent-CC: pelzflorian@pelzflorian.de, ludo@gnu.org, matt@excalamus.com, maxim.cournoyer@gmail.com, guix-patches@gnu.org Resent-Date: Thu, 20 Jun 2024 13:06:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 71676 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 71676@debbugs.gnu.org Cc: Tomas Volf <~@wolfsden.cz>, Florian Pelz , Ludovic =?UTF-8?Q?Court=C3=A8s?= , Matthew Trzcinski , Maxim Cournoyer X-Debbugs-Original-To: guix-patches@gnu.org X-Debbugs-Original-Xcc: Florian Pelz , Ludovic =?UTF-8?Q?Court=C3=A8s?= , Matthew Trzcinski , Maxim Cournoyer Received: via spool by submit@debbugs.gnu.org id=B.171888873130221 (code B ref -1); Thu, 20 Jun 2024 13:06:02 +0000 Received: (at submit) by debbugs.gnu.org; 20 Jun 2024 13:05:31 +0000 Received: from localhost ([127.0.0.1]:55987 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sKHTn-0007rM-4A for submit@debbugs.gnu.org; Thu, 20 Jun 2024 09:05:31 -0400 Received: from lists.gnu.org ([209.51.188.17]:40622) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <~@wolfsden.cz>) id 1sKHTk-0007rC-EN for submit@debbugs.gnu.org; Thu, 20 Jun 2024 09:05:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <~@wolfsden.cz>) id 1sKHTg-00060X-9y for guix-patches@gnu.org; Thu, 20 Jun 2024 09:05:24 -0400 Received: from wolfsden.cz ([37.205.8.62]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <~@wolfsden.cz>) id 1sKHTe-0006s1-2h for guix-patches@gnu.org; Thu, 20 Jun 2024 09:05:24 -0400 Received: by wolfsden.cz (Postfix, from userid 104) id 028B729B966; Thu, 20 Jun 2024 13:05:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1718888719; bh=nJInI/0neE4P6Kx/+BnpD8oWc60oXhY76UFFmBQhJEo=; h=From:To:Cc:Subject:Date; b=mqewlAYvwrDs/IqZh3nr+4BsS6BRPAoRxCs5sOicXAxkgEhRfimIP8FZIcHf4tZO6 WOumyM5Yq4PP/2YuTrQROFi84zbF+jCSDBsVxVU11T8iqdAKEzhy96uCbkTz5Zu5wG hRwhmbUXzbmfB2ncbsFt0MIq415cP4vL9zoM7s210tWcCs0VqPPFtl/cwM9BwdMg/I qRGuZ1VkcYxo5/q02QgZm2jVIndgyjYeJ6SiuL+aXfuN1NRlCXX5CS6N7MyQRtnNXs i2Seg6e3l/39TW8xPrpPIwb7vUx+mnGa35+vCfVhiP6qBGzXqI+dafpB9MyGtCyidi 4qWjkVEPiI/UBDBEpeZgPkkB+9w6mCwA6FYLnz9/JuvAs40UqKY4WS2TnhXWLdFRge NII4E7pZSZnl1SGvTBmDPFNidzbY0lsNrocuwL6c7Y0df+0m4ApWrBAzHfMLDA6vsO FQwt879CdtHkwVUjCCw8ZqgjiUnVqHlJh+dlAWe61D1KgYAivTKbMCgblTqsMUIrYc PaBOzheGe9cMn2n/G+TT+7Fy8EgbxowQzYVpzT+XUa/nCgO2sp/Vi69I54o5oQ53NO iNm1IPNLyMH/xrKa68+ockxDsexkV5XLeJtJPX51sXsS7VLcj7JdMTAOeSJnEgWzdC quE4ZFiG1152k0O02muAkAJI= Received: from localhost (unknown [146.70.134.164]) by wolfsden.cz (Postfix) with ESMTPSA id 16F7529B025; Thu, 20 Jun 2024 13:05:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1718888718; bh=nJInI/0neE4P6Kx/+BnpD8oWc60oXhY76UFFmBQhJEo=; h=From:To:Cc:Subject:Date; b=HgztDrb7a5Z3XeoDulodULGSpfKvSUWZa91DpDNOrFy5qP9SeZH0HGqDCNVhfxqMD Hba0fD3/D+VAJ5vqgyAj4Kkf9dq2x6VLSXzdBFwx9crndNgOcq6y+L3BvdrM2Xq0bT Rv8nvYB3QUiXAR3jp1A+h7dKI1IW+vaNBXqAvdHsBBYLYjn0IDcaG3GdpMc1fXZrIA HnC8aFpv0VEWklX9Q0Ns3ZDvSy7EYVt5YfwspRtDD4USvvbmeSbGzWyzujTtRb61no v/R3eMDoc4R+enXzIESDOF3GalkT8MatYZK9TCWfkfwA1RuKep97Ya2nn6NE3m5Aoq /1h2K5SF00NhIp95jvHCd7mkUeBGsVMp4YSGSntCWYbb55wc5O3USxGzlIo0/koCh8 hXDGN8mXZkvN4B5hUcRtG4TSpmqIjlWSpsoolPn4kOXvfhF4yOwd4Z5Vk/O7b/NpB3 rXHEGNNEitfq6kuClBseUq5KXXy8wGotBsU56VKvkvSuFZnMVuAuEITHnyShpmaQ+H Yqnyj9RxumcDSXdvf2VKikQcryGzucJgLPncV1oHz5rMm92bQREf0AVtKC2WSjOs0R DrgvhCnzat8SKJnsT/ZIyCs3OMI0ylu4e+O9Pn5pMgahfcHhQUAQbgqZVTM8L6LQOY AL2uyzv/JGcI02cmO7i7DG6g= From: Tomas Volf <~@wolfsden.cz> Date: Thu, 20 Jun 2024 15:04:03 +0200 Message-ID: X-Mailer: git-send-email 2.45.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=37.205.8.62; envelope-from=~@wolfsden.cz; helo=wolfsden.cz X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Queue-Id: 25DEC65F73 X-Migadu-Scanner: mx13.migadu.com X-Migadu-Spam-Score: -2.46 X-Spam-Score: -2.46 X-TUID: zws/yW3oBx26 * gnu/services/web.scm (emit-nginx-upstream-config): Support file-like objects. * doc/guix.texi (Web Services)[nginx-upstream-configuration]: Document it. Change-Id: I49996e358174dc77b31e3c91b908a6a72f3eb705 --- This unifies the behavior with extra-content field in nginx-configuration. doc/guix.texi | 11 ++++++++++- gnu/services/web.scm | 4 ++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 55710dc968..f6f2788ed2 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -32095,7 +32095,16 @@ Web Services explicitly. @item @code{extra-content} -A string or list of strings to add to the upstream block. +Additional content to be appended to the upstream block. Can be a +string or file-like object or list of thereof. In case of list, each +item is prefixed with indentation and suffixed with a new line. Nested +lists are flattened. + +@lisp +(extra-content "include /etc/nginx/custom-config.conf;") +(extra-content `("include /etc/nginx/custom-config.conf;" + ("include " ,%custom-config.conf ";"))) +@end lisp @end table @end deftp diff --git a/gnu/services/web.scm b/gnu/services/web.scm index 340988fdd8..7424f7302f 100644 --- a/gnu/services/web.scm +++ b/gnu/services/web.scm @@ -701,8 +701,8 @@ (define (emit-nginx-upstream-config upstream) (cons "\n" (map (lambda (line) - (simple-format #f " ~A\n" line)) - (flatten extra-content))) + `(" " ,line "\n")) + extra-content)) '())) " }\n")) -- 2.45.1