GNU bug report logs - #71673
[PATCH] services: nginx: Print extra-content before the server-blocks.

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guix-patches; Reported by: Tomas Volf <~@wolfsden.cz>; Keywords: patch; dated Thu, 20 Jun 2024 11:17:01 UTC; Maintainer for guix-patches is guix-patches@HIDDEN.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 20 Jun 2024 11:16:18 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jun 20 07:16:18 2024
Received: from localhost ([127.0.0.1]:52853 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sKFm6-0001Jv-8q
	for submit <at> debbugs.gnu.org; Thu, 20 Jun 2024 07:16:18 -0400
Received: from lists.gnu.org ([209.51.188.17]:34024)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <~@wolfsden.cz>) id 1sKFm4-0001Jk-2q
 for submit <at> debbugs.gnu.org; Thu, 20 Jun 2024 07:16:16 -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 1sKFlz-00066Q-QR
 for guix-patches@HIDDEN; Thu, 20 Jun 2024 07:16:12 -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 1sKFlw-0003jy-2P
 for guix-patches@HIDDEN; Thu, 20 Jun 2024 07:16:11 -0400
Received: by wolfsden.cz (Postfix, from userid 104)
 id 127EB298634; Thu, 20 Jun 2024 11:16:04 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail;
 t=1718882164; bh=3otJ77y3ILz484cRA7QnlPcc4g9HZMFhnR3WYjO6iU0=;
 h=From:To:Cc:Subject:Date;
 b=rVAVAmAxqJZKQcq//nJ5xhdOonnVMSbUoKyXbbPdXKP8xNlrYhD44gYG4KjJ1IF+K
 BxpCRCuhvGEG01+AtWpZirnY8ld03stxjVoQcxaP53n2mNs3ErxZW5R7iHWOEWeVXa
 rTnB2Wfn+3UOCegJ61E0QK/1T3lPvquqIP44nm7d4e12lTUh5c4DJiYA5dNqNf3qdo
 DRXcL2r5Veyg1vqP40YU+8gIO8DCmcVPBfWJZPQSP7H1Bup5PJFVFVQHlxt1cP6k76
 7xUoa2ylMrJG61AoYscmKfR2zFj+nQa4tSwVkMly7BQZ2LDX9Ofg0xM/Id3f5r+h8v
 q/DPej6DeASopAqOtNf6BzEkPGg7mB+WSN91QXZHjYKW/VjMRa4xUpnChgzSMnSF77
 DtoJo7+LRCp+yO+765Pm6YQthsFpRqia3izK9GoNA7UwOqoMgu/ee2GTCjDCqnLy7A
 xYm1+rEnkRlmp0EcTdvptVDOIALL2X15zmarQDlvvnhbxy6ii8hwk+29XszNM5x0kh
 LMZCgak/QWjc3+dBTWl1BnK+tfJfCoeiCilIfhLtSuW5JmNGO2xu7dgVrotIvhQ5+T
 c2qUYSIpmP6Dh63KUFxl/vgDiCVKI7iZceVs104Bw8IVHWhtB1IOOxwErrZjn0UTFk
 vkoLjANwpmCQFxOtfNbZ7GBo=
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on wolfsden
X-Spam-Level: 
X-Spam-Status: No, score=-1.2 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED,
 DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,T_SCC_BODY_TEXT_LINE,
 URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6
Received: from localhost (unknown [146.70.134.164])
 by wolfsden.cz (Postfix) with ESMTPSA id EE29A29B9E4;
 Thu, 20 Jun 2024 11:16:02 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail;
 t=1718882163; bh=3otJ77y3ILz484cRA7QnlPcc4g9HZMFhnR3WYjO6iU0=;
 h=From:To:Cc:Subject:Date;
 b=UmZPAgklKCY1F47L4dna8cieGWiLYz2arpSiGwfJnXny7OcLKxKvZe4Wa3aWwlKak
 49NK7eQ2W3WtcnK8Ycdxq7djDQR0uQzFYeG/ajv4YM8RGbTQ1W5E/tRmpgIQ1viazF
 mgCLKvg3MVF6naZUUZ3BSGA8GV4zOEjnLUK0YNqUSco29FcallSJKxPi+Ltzv4DWzU
 5s2xJOnW6SBpRkA0qQJtRSt5imTYeha823parwmJEbTzP9wSNggykWU5BJtkoxhdZD
 SXLuC01am5qOHrJm3aJInMWxLV6BR8TTm+0GZu/xWaMYypVPWkqwg/jL34IeFRomLo
 hDowjjpL6vK4+tsyA+VB7PXuk5nQ9rxZyqZjW+pfiz7YZOrujO5PXPJI0PEV1Nt6gA
 5JY5Ec6AJjQx1P4juAi1VVu7MD+dxsVexJ/kD2ybbS6oh+sz551TJAHphC9plIwuWc
 v4uG/QDQzgikAW1/LSFzXOhCCvohTl2mHKMPTK85HSR6Qo91Zy52q4yWto7Chfrq+M
 aqyaQ+ljPNiP+7duYriF0c15rsD73LPmyTsfHCwUG93P3EhA8TxndobY+lRTHDpBGS
 B1NvNIpOP7Ue70s8Gi3jfoItFbxpf0sQQ6g0GZAp6jl1yEwZnC7CKihv05i6+OTK5/
 CkGTn9m2Di5ShJbwuZnVm9y8=
From: Tomas Volf <~@wolfsden.cz>
To: guix-patches@HIDDEN
Subject: [PATCH] services: nginx: Print extra-content before the server-blocks.
Date: Thu, 20 Jun 2024 13:14:48 +0200
Message-ID: <fd941dd1a6549e891f4afa3293a1f262350e0fa9.1718882088.git.~@wolfsden.cz>
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-Spam-Score: -1.3 (-)
X-Debbugs-Envelope-To: submit
Cc: Tomas Volf <~@wolfsden.cz>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

The configuration file is processed sequentially, which meant that there was
no way to set for example log format shared between the server-blocks, because
the final configuration file would have this order:

  ...
  http {
    ...
    server {
    }
    ...
    $extra-content
  }

Moving the extra-content before the serialization of server-blocks resolves
this.

* gnu/services/web.scm (default-nginx-config): Move extra-content before
server-blocks.

Change-Id: Ie8286a533dfed575abc58a0f4800706b3ad6adc2
---
While this I assume *could* be considered a backwards incompatible change, I
cannot really think of anything that it would break.

 gnu/services/web.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/services/web.scm b/gnu/services/web.scm
index 406117c457..e3887d0ed8 100644
--- a/gnu/services/web.scm
+++ b/gnu/services/web.scm
@@ -768,11 +768,11 @@ (define (default-nginx-config config)
                 (number->string server-names-hash-bucket-max-size)
                 ";\n")
                "")
+           extra-content
            "\n"
            (map emit-nginx-upstream-config upstream-blocks)
            (map emit-nginx-server-config server-blocks)
-           extra-content
-           "\n}\n"))))
+           "}\n"))))

 (define %nginx-accounts
   (list (user-group (name "nginx") (system? #t))
--
2.45.1




Acknowledgement sent to Tomas Volf <~@wolfsden.cz>:
New bug report received and forwarded. Copy sent to guix-patches@HIDDEN. Full text available.
Report forwarded to guix-patches@HIDDEN:
bug#71673; Package guix-patches. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Thu, 20 Jun 2024 11:30:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.