From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id CKKqGZu882YZ5wAA62LTzQ:P1 (envelope-from ) for ; Wed, 25 Sep 2024 07:32:43 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id CKKqGZu882YZ5wAA62LTzQ (envelope-from ) for ; Wed, 25 Sep 2024 09:32:43 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=kM4MgDvZ; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=cAsjABAH; 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), DKIM not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1727249563; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:list-id:list-help:list-unsubscribe:list-subscribe: list-post:dkim-signature; bh=7MuADeabopPi73kiQflAtpMIj5+sChshPoX+nlM5UBw=; b=FdFT0wxeDa/HWGRi8LG2Miu49HCEz1UyhJbSmuIvmOdmmOzHW0q8INQVkpzO9hI6+xGALI Jp4DLJh0AyblcfimpSVLSoS1mJFoZCHB/gsR+haxXm5WGXIINrfkxv575yHyl9r3sufiV+ 0D4eTLEJoZr2KiATO4mpQfc6F1neudkg3tC1fn4PEkvq8RSWGKoQxz1emEgz6Q6kYiRxwf dOxJRkFBuWSKY9xp5A1NWI+WhYHQIGZiXwoH1nhsb7Y03dV7myfaAguTbwWYtmEtJ4i7Pr gwFbA4RD5LW5hZQHuLSKrGr1aTlDs/YSoAUpr3/npAiGhbsbfauMCoIsIvusQw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=kM4MgDvZ; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=cAsjABAH; 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), DKIM not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1727249563; a=rsa-sha256; cv=none; b=qZHXjkB6wujwlITd6NZiH4ARzsijPTIR3uKmt2xoE1l/Gx3sop5Vm6H2Uy8eqSHfZcWCk/ jQHeV7Jx0H1czS7avk/enMGnfPuPHQQ+TqgrOesJeqaY/GToXiPTf0qu8EaoQMgvdR7QCY BLAtTd7zv+klt7OItzicwDmkZdZrNnnQS11922bY+pzXLL5ZGmZB5sz5jOdE47m1tBemsy FeFfHmdbbILNHiV0xILtj3ASkemye+BdfnoHcCyjRExq+Ge/UtEG5I63i5A4AAPf2va1ib MDO19focm6HTzYBN6t3ThEJsdVPAC5BUYo8maaoEO3rxkh+fDnlSeIge1on7TA== 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 E38B279220 for ; Wed, 25 Sep 2024 09:32:42 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1stMVf-0000PU-NR; Wed, 25 Sep 2024 03:32:27 -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 1stKrG-0000X7-7V for guix-patches@gnu.org; Wed, 25 Sep 2024 01:46:38 -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 1stKrF-0003F8-K6 for guix-patches@gnu.org; Wed, 25 Sep 2024 01:46:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:From:To:Subject; bh=7MuADeabopPi73kiQflAtpMIj5+sChshPoX+nlM5UBw=; b=kM4MgDvZDKajsM7vaoIwUqtntbEhwvWgGzQV1nw+N/HwJb/RX+f/Zv5tm0axDK5isDg0ycivfoilY9BK2HbS3k0DikgUlFMsEstvKmA62BbsHgZrycAMydTTKzABDCT4Mp56qWZN21st6voe4ke8BhogFNkWa2ILivbmgJ4f6r+22CdialQG021w3DResrqN0A71gGyu6CFlY8YSgSzmnfvIT5kL9AhKtHgSSwVr97RlGc1WB1ZgBIYbu1gMyVC4gIuNLwxBVZNQ+gWjJowxnU1bQABn2QSKM5AF4lCYm8JdjKUilbCUn9o7S+oBiL0PNFW/x7H9gz30hD8whJMT7A==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1stKre-00046x-IR for guix-patches@gnu.org; Wed, 25 Sep 2024 01:47:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#73465] [PATCH] Wireguard: Rename field private-key to private-key-file Resent-From: Apoorv Singh Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 25 Sep 2024 05:47:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 73465 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 73465@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.172724320315751 (code B ref -1); Wed, 25 Sep 2024 05:47:02 +0000 Received: (at submit) by debbugs.gnu.org; 25 Sep 2024 05:46:43 +0000 Received: from localhost ([127.0.0.1]:42774 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1stKrJ-00045w-Gy for submit@debbugs.gnu.org; Wed, 25 Sep 2024 01:46:43 -0400 Received: from lists.gnu.org ([209.51.188.17]:45292) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1stJDV-0005Iv-KQ for submit@debbugs.gnu.org; Wed, 25 Sep 2024 00:01:33 -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 1stJAz-0004Di-Iz for guix-patches@gnu.org; Tue, 24 Sep 2024 23:58:53 -0400 Received: from mail-pl1-x630.google.com ([2607:f8b0:4864:20::630]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1stJAx-0001H1-Qo for guix-patches@gnu.org; Tue, 24 Sep 2024 23:58:53 -0400 Received: by mail-pl1-x630.google.com with SMTP id d9443c01a7336-20536dcc6e9so40442355ad.2 for ; Tue, 24 Sep 2024 20:58:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1727236729; x=1727841529; darn=gnu.org; h=mime-version:message-id:date:subject:to:from:from:to:cc:subject :date:message-id:reply-to; bh=7MuADeabopPi73kiQflAtpMIj5+sChshPoX+nlM5UBw=; b=cAsjABAHcp6T3dcagvsjVMDQD57Zouxq2iH0zUdCCdRqZ2qcLqzoUXYuYy726ur0v5 y9vG9+K443SieVraSd59cgBf7oNhpCLil8T0UsmwK7h7bY8XF5K7Of1TrbJiYGcOyvP7 bwl+fkWGOTTZRgUb9yr8ULbcfFqa5D365ysg99O/Q8kWAClRYWdn5U+cb7l/APVARgXl 0DBH2CPJUWHJwSlPyLDUs92r4F//5IFezZXa4l9G1So+v250O8x7Ip5OJyMY6T2OwjqD 9WtCQeFYct/HLZB6Xfw2zeTBl0iC2OePpJLM2OMFaOfd7B2QD/lMbMKgPCVQbCmaLzAY HhqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727236729; x=1727841529; h=mime-version:message-id:date:subject:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=7MuADeabopPi73kiQflAtpMIj5+sChshPoX+nlM5UBw=; b=i2GATt7Za4mywdanGbFj8qFEwszAA8/Q32zyanpKXMq2Rpslpdj4/Isiv39Mmpbub3 iUbkF8UR6ScPgp9g0F1kGZHmfWdX9Q0MDR2c+H1RXwVcCDgNBa9G9u+JRENwVf9yJVW5 eKv6QB+rpYZCd4VvCMyre+H+ytnKnd22LfWppwPfyYEgRdcCWt5G1NejlAbD91bsos8F yNFLIlJkktaD5NAqmYgMXdLCYv+FHVrh1fzzfYrBGh+dKSfXeqZQSaTnMuikiUHhQ/Hk mrmW8Z7rOQX0lcaHxGXMTb1qjkzGOB547He8S4h5YXsh/w8N6vX+3it5NcWzgPupH4ir oIdw== X-Gm-Message-State: AOJu0YyLQWJCJuoUU4ArOd9jQdF21hjZtXyVXP/6TWqEyfpLzFkbq8nQ eGZWBkg4oau+rK+k/nlup+AQH07Y6se3Gmy78W32DzwHdnKwUWuVRX3w X-Google-Smtp-Source: AGHT+IFidM/1EKp1jH+3vG9Ojl9xvtRXXu3S5C2CM3Sjak0KnWUsVla4iKLsYgd7/3GhLEVzzMtZeA== X-Received: by 2002:a17:902:e80d:b0:207:1825:c65e with SMTP id d9443c01a7336-20afc43d03emr21474355ad.18.1727236729222; Tue, 24 Sep 2024 20:58:49 -0700 (PDT) Received: from MachineY ([139.5.251.229]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-20af16e024fsm16518925ad.58.2024.09.24.20.58.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Sep 2024 20:58:48 -0700 (PDT) From: Apoorv Singh Date: Wed, 25 Sep 2024 09:28:44 +0530 Message-ID: <87h6a4jsej.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=2607:f8b0:4864:20::630; envelope-from=apoorvs569@gmail.com; helo=mail-pl1-x630.google.com X-Spam_score_int: 15 X-Spam_score: 1.5 X-Spam_bar: + X-Spam_report: (1.5 / 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, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_SBL_CSS=3.335, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Wed, 25 Sep 2024 01:46:40 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Mailman-Approved-At: Wed, 25 Sep 2024 03:32:27 -0400 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-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Queue-Id: E38B279220 X-Migadu-Scanner: mx11.migadu.com X-Spam-Score: -8.37 X-Migadu-Spam-Score: -8.37 X-TUID: Cz7gl5OG42Ei --=-=-= Content-Type: text/plain The following patches renames the field private-key to private-key-file as it makes it more clear that it needs path to a file rather than the key it self --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Wireguard-rename-field-private-key-to-private-key-fi.patch Content-Description: Wireguard rename field private-key to private-key-file >From 92e6d353a72e9ed0ee7097f2e5e5ff76521455a7 Mon Sep 17 00:00:00 2001 From: apoorv569 Date: Wed, 25 Sep 2024 09:06:05 +0530 Subject: [PATCH 1/2] Wireguard rename field private-key to private-key-file --- gnu/services/vpn.scm | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/gnu/services/vpn.scm b/gnu/services/vpn.scm index 7fb4775757..449909e34d 100644 --- a/gnu/services/vpn.scm +++ b/gnu/services/vpn.scm @@ -741,7 +741,7 @@ (define-record-type* (default '("10.0.0.1/32"))) (port wireguard-configuration-port ;integer (default 51820)) - (private-key wireguard-configuration-private-key ;string + (private-key-file wireguard-configuration-private-key-file ;string (default "/etc/wireguard/private.key")) (peers wireguard-configuration-peers ;list of (default '())) @@ -782,7 +782,7 @@ (define (peers->preshared-keys peer keys) keys))) (match-record config - (wireguard interface addresses port private-key peers dns + (wireguard interface addresses port private-key-file peers dns pre-up post-up pre-down post-down table) (let* ((config-file (string-append interface ".conf")) (peer-keys (fold peers->preshared-keys (list) peers)) @@ -807,7 +807,7 @@ (define lines (list (format #f "~{PreUp = ~a~%~}" pre-up))) (format #f "PostUp = ~a set %i private-key ~a\ ~{ peer ~a preshared-key ~a~}" #$(file-append wireguard "/bin/wg") -#$private-key '#$peer-keys) +#$private-key-file '#$peer-keys) #$@(if (null? post-up) '() (list (format #f "~{PostUp = ~a~%~}" post-up))) @@ -833,22 +833,22 @@ (define lines (define (wireguard-activation config) (match-record config - (private-key wireguard) + (private-key-file wireguard) #~(begin (use-modules (guix build utils) (ice-9 popen) (ice-9 rdelim)) - (mkdir-p (dirname #$private-key)) - (unless (file-exists? #$private-key) + (mkdir-p (dirname #$private-key-file)) + (unless (file-exists? #$private-key-file) (let* ((pipe (open-input-pipe (string-append #$(file-append wireguard "/bin/wg") " genkey"))) (key (read-line pipe))) - (call-with-output-file #$private-key + (call-with-output-file #$private-key-file (lambda (port) (display key port))) - (chmod #$private-key #o400) + (chmod #$private-key-file #o400) (close-pipe pipe)))))) ;;; XXX: Copied from (guix scripts pack), changing define to define*. -- 2.46.0 --=-=-= Content-Type: text/plain; format=flowed . -- - Apoorv Singh - Sent from Emacs. --=-=-=--