From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 2AT9L8WuUGFyyAAAgWs5BA (envelope-from ) for ; Sun, 26 Sep 2021 19:32:53 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id iNd+K8WuUGGSdwAAbx9fmQ (envelope-from ) for ; Sun, 26 Sep 2021 17:32:53 +0000 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 784932E5DC for ; Sun, 26 Sep 2021 19:32:53 +0200 (CEST) Received: from localhost ([::1]:42772 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mUY1E-000235-FT for larch@yhetil.org; Sun, 26 Sep 2021 13:32:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49984) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mUY0S-00022X-93 for guix-patches@gnu.org; Sun, 26 Sep 2021 13:32:07 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:55351) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mUY0Q-0003HC-8S for guix-patches@gnu.org; Sun, 26 Sep 2021 13:32:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mUY0Q-0008Mm-2M for guix-patches@gnu.org; Sun, 26 Sep 2021 13:32:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#50808] [PATCH v2] services: rsync: support binding rsync to a specific IP address References: <20210926030511.17476-1-jacob@tookmund.com> In-Reply-To: <20210926030511.17476-1-jacob@tookmund.com> Resent-From: Jacob Adams Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 26 Sep 2021 17:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50808 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: 50808@debbugs.gnu.org Cc: Jacob Adams Received: via spool by 50808-submit@debbugs.gnu.org id=B50808.163267751532147 (code B ref 50808); Sun, 26 Sep 2021 17:32:02 +0000 Received: (at 50808) by debbugs.gnu.org; 26 Sep 2021 17:31:55 +0000 Received: from localhost ([127.0.0.1]:38664 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mUY0J-0008MP-07 for submit@debbugs.gnu.org; Sun, 26 Sep 2021 13:31:55 -0400 Received: from wout1-smtp.messagingengine.com ([64.147.123.24]:49775) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mUY0G-0008MB-2x for 50808@debbugs.gnu.org; Sun, 26 Sep 2021 13:31:53 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id D2CD83200929; Sun, 26 Sep 2021 13:31:45 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Sun, 26 Sep 2021 13:31:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tookmund.com; h= from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; s=fm1; bh=LrP97u2Pw5W9uV0tNDTntkhVEc Mc65I0riGZkAAD210=; b=yYh3HVncUTkB8BYlUai0b0GQbHCGZlsQn5Dyo/Hngq PCa7sVrHjVMoJBAuItYnHDelWpqx9YsK2QmFIEqYtdztm/Wxou6Lq/RIb4n12ako /xkcPn2vSbG0Gu+vcsi1jkiyKtjjGunsQo/bVPJMIy3ItsDDTQ4amXUHScGQhRvx 5FW9+PhDngPRGNoa1mrClqZUAMEiHE0aRYRkOpy53vLVZDRxJYnrMX0RNTrZCYrA kiNRb7kttCDMVRRXQxqW8Z2DdU+odXjyIaVFoDDzgtLFE7HJUbHfMAIBxMW+/umw 0cwGvAfzLc10ibjDegKuTu+wLfMP8MMratlC/YoU3ewg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :message-id:mime-version:subject:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=LrP97u2Pw5W9uV0tN DTntkhVEcMc65I0riGZkAAD210=; b=Za+cJSjTFMpsv2IlD2dEGFucO3eF4FE4r /46EC99ThNdq3xtKp3PVBKrtvqkr1N7JgOcsM0HYWt2lk+lyph0u6XL5SbJPntXb J3EsCSa5fAr/94T0wcO/1e0RtJN7WJFds0Bllb+fEZy19FVHDSse9j/itzImXQyf ppjQ+4cixJKi5vixT1rDnrGugxeGmKK4Y4guoGqZ6fPSg5VLAR5ldq3I3eyQKTXL FgRg+2Vh+/oRSZanYBWTzBURXHwl+oPWQ9zwLVEAqlU5uW6IEDAcks9F87V/YIRY rCB+oDOoSl1Qprq00SkqBi60rSXhiEXalkmzzG+I1G1mIHD/KxqDg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrudejiedgudduvdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkffoggfgsedtkeertd ertddtnecuhfhrohhmpeflrggtohgsucetuggrmhhsuceojhgrtghosgesthhoohhkmhhu nhgurdgtohhmqeenucggtffrrghtthgvrhhnpefhudeuudekveeviedtffeihfefkedvtd eigfefvdelleeuieefuefgjeeludegleenucevlhhushhtvghrufhiiigvpedtnecurfgr rhgrmhepmhgrihhlfhhrohhmpehjrggtohgssehtohhokhhmuhhnugdrtghomh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 26 Sep 2021 13:31:44 -0400 (EDT) From: Jacob Adams Date: Sun, 26 Sep 2021 13:31:31 -0400 Message-Id: <20210926173131.3687-1-jacob@tookmund.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1632677573; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=LrP97u2Pw5W9uV0tNDTntkhVEcMc65I0riGZkAAD210=; b=oCmvvVu57Hmzlem7Vt5pH8pU1Zm1LZk8zjdaVEF3YiRWdBgwy3xw0D4iRDE0IBG0xqpxsj +tHMeS0BNTm7Oe2RElZ8rl11vGpLP+TVRR+eTzVoX0/bIGnbTmHilmhjPY0xEOW2PeK2n4 kc4pxsIwKcrVjMJ3MI//gQhHNgXHiziydANY/ldD1xYXktIRLOwtkmNjWIwr8Fi9oy87DQ GGoXWlx6NEtm+r8qMuK9UZGiT+FJRlfldA0YumQyBrjNfsG2mzkhIQ3dTELV/zAkUH/+16 wcYAvOEoWdQNbwgXkCLxhOmNlHEvor6nhdNoeeC1/e3T6yPcal5Tt7jMEir3JA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1632677573; a=rsa-sha256; cv=none; b=M44whii67TBGf2x4ZryZlKdETrlzDEN00SuiuVEptCgH3xwKUx24otmkh+9qJfslvUDkJB 0DeZsHqeIhsEvUackt9ckacJBhiBgIZ42358kJKREWiaQvPepgw4t7bkoHZzVvq+fRc4m/ ih9SyaWFcmhKc4How4cw4GjrciDFuJTY6EvXTh1fP8Xau6k/mHFrr6jkwss8rGmWnt3Rae UIpDSdNOV7vAfDvtD2jTm1dNBFYZovSUTHQ9qL57zvX93scc8Y80691KBA1FNfdUnd9WZH XRED3AV2HQaStSpcxCkk6RV+bIh0yxLY5WQtBD0ui3Zzvs2/1mRfZmw6cjeskQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=tookmund.com header.s=fm1 header.b=yYh3HVnc; dkim=fail ("headers rsa verify failed") header.d=messagingengine.com header.s=fm3 header.b=Za+cJSjT; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: 3.11 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=tookmund.com header.s=fm1 header.b=yYh3HVnc; dkim=fail ("headers rsa verify failed") header.d=messagingengine.com header.s=fm3 header.b=Za+cJSjT; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 784932E5DC X-Spam-Score: 3.11 X-Migadu-Scanner: scn1.migadu.com X-TUID: ZJqrPSBZpxUH * gnu/services/rsync.scm: Support IP address configuration * doc/guix.texi: Document new address rsync configuration option --- That's a much cleaner approach, thanks! I'm very new to Scheme and didn't even realize I could do that. doc/guix.texi | 4 ++++ gnu/services/rsync.scm | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/doc/guix.texi b/doc/guix.texi index 4bf14014eb..a932dbcc09 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -17151,6 +17151,10 @@ Data type representing the configuration for @code{rsync-service}. @item @code{package} (default: @var{rsync}) @code{rsync} package to use. +@item @code{address} (default: @code{#f}) +IP address on which @command{rsync} listens for incoming connections. +If unspecified, it defaults to listening on all available addresses. + @item @code{port-number} (default: @code{873}) TCP port on which @command{rsync} listens for incoming connections. If port is less than @code{1024} @command{rsync} needs to be started as the diff --git a/gnu/services/rsync.scm b/gnu/services/rsync.scm index 6c117bbda4..59faed78f6 100644 --- a/gnu/services/rsync.scm +++ b/gnu/services/rsync.scm @@ -45,6 +45,8 @@ rsync-configuration? (package rsync-configuration-package ; package (default rsync)) + (address rsync-configuration-address ; string | #f + (default #f)) (port-number rsync-configuration-port-number ; integer (default 873)) (pid-file rsync-configuration-pid-file ; string @@ -110,7 +112,7 @@ (define rsync-config-file ;; Return the rsync configuration file corresponding to CONFIG. (match-lambda - (($ package port-number pid-file lock-file log-file + (($ package address port-number pid-file lock-file log-file use-chroot? share-path share-comment read-only? timeout user group uid gid) (if (not (string=? user "root")) @@ -132,6 +134,7 @@ "pid file = " pid-file "\n" "lock file = " lock-file "\n" "log file = " log-file "\n" + (if address (string-append "address = " address "\n") "") "port = " (number->string port-number) "\n" "use chroot = " (if use-chroot? "true" "false") "\n" (if uid (string-append "uid = " uid "\n") "") -- 2.30.2