summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>2025-06-05 16:24:15 +0900
committerMaxim Cournoyer <maxim@guixotic.coop>2026-07-29 15:59:08 +0900
commit598966a9e07a39f5e368a084e4f82c9ea2cc36a9 (patch)
tree805e3a30ef40419f95dc5b777c1155a940d9c84b
parent6572e884cb7d969335bb386f62fe3db59304f7c1 (diff)
services: rsync: Remove deprecated configuration options.
These have been deprecated since 2021. * gnu/services/rsync.scm (warn-share-field-deprecation): Delete syntax. (<rsync-configuration>) [use-chroot?, share-path, share-comment] [read-only?, timeout]: Delete deprecated fields. (rsync-configuration-modules): Delete compatibility procedure. * doc/guix.texi (Networking Services) <rsync-configuration>: Update doc. Change-Id: Ia7742deaf61dc87824e70172647f2974c5ddb758
-rw-r--r--doc/guix.texi2
-rw-r--r--gnu/services/rsync.scm41
2 files changed, 2 insertions, 41 deletions
diff --git a/doc/guix.texi b/doc/guix.texi
index d2e8f2335a5..dccc1fc9f76 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -24448,7 +24448,7 @@ place as when the daemon was run as @code{root}.
24448@item @code{gid} (default: @code{"rsyncd"}) 24448@item @code{gid} (default: @code{"rsyncd"})
24449Group name or group ID that will be used when accessing the module. 24449Group name or group ID that will be used when accessing the module.
24450 24450
24451@item @code{modules} (default: @code{%default-modules}) 24451@item @code{modules} (default: @code{'())})
24452List of ``modules''---i.e., directories exported over rsync. Each 24452List of ``modules''---i.e., directories exported over rsync. Each
24453element must be a @code{rsync-module} record, as described below. 24453element must be a @code{rsync-module} record, as described below.
24454@end table 24454@end table
diff --git a/gnu/services/rsync.scm b/gnu/services/rsync.scm
index c72cf9aa74b..c9de8e710c0 100644
--- a/gnu/services/rsync.scm
+++ b/gnu/services/rsync.scm
@@ -57,13 +57,6 @@
57;;; 57;;;
58;;;; Code: 58;;;; Code:
59 59
60(define-with-syntax-properties (warn-share-field-deprecation (value properties))
61 (unless (unspecified? value)
62 (warning (source-properties->location properties)
63 (G_ "the 'share-path' and 'share-comment' fields is deprecated, \
64please use 'modules' instead~%")))
65 value)
66
67(define-record-type* <rsync-configuration> 60(define-record-type* <rsync-configuration>
68 rsync-configuration 61 rsync-configuration
69 make-rsync-configuration 62 make-rsync-configuration
@@ -80,23 +73,8 @@ please use 'modules' instead~%")))
80 (default "/var/run/rsyncd/rsyncd.lock")) 73 (default "/var/run/rsyncd/rsyncd.lock"))
81 (log-file rsync-configuration-log-file ; string 74 (log-file rsync-configuration-log-file ; string
82 (default "/var/log/rsyncd.log")) 75 (default "/var/log/rsyncd.log"))
83 (use-chroot? rsync-configuration-use-chroot? ; boolean 76 (modules rsync-configuration-modules ;list of <rsync-module>
84 (sanitize warn-share-field-deprecation)
85 (default *unspecified*))
86 (modules rsync-configuration-actual-modules ;list of <rsync-module>
87 (default '())) 77 (default '()))
88 (share-path rsync-configuration-share-path ; string
89 (sanitize warn-share-field-deprecation)
90 (default *unspecified*))
91 (share-comment rsync-configuration-share-comment ; string
92 (sanitize warn-share-field-deprecation)
93 (default *unspecified*))
94 (read-only? rsync-configuration-read-only? ; boolean
95 (sanitize warn-share-field-deprecation)
96 (default *unspecified*))
97 (timeout rsync-configuration-timeout ; integer
98 (sanitize warn-share-field-deprecation)
99 (default *unspecified*))
100 (user rsync-configuration-user ; string 78 (user rsync-configuration-user ; string
101 (default "root")) 79 (default "root"))
102 (group rsync-configuration-group ; string 80 (group rsync-configuration-group ; string
@@ -121,23 +99,6 @@ please use 'modules' instead~%")))
121 (timeout rsync-module-timeout ;integer 99 (timeout rsync-module-timeout ;integer
122 (default 300))) 100 (default 300)))
123 101
124(define (rsync-configuration-modules config)
125 (match-record config <rsync-configuration>
126 (modules
127 share-path share-comment use-chroot? read-only? timeout) ;deprecated
128 (if (unspecified? share-path)
129 (rsync-configuration-actual-modules config)
130 (list (rsync-module ;backward compatibility
131 (name "files")
132 (file-name share-path)
133 (comment "Rsync share")
134 (chroot?
135 (if (unspecified? use-chroot?) #t use-chroot?))
136 (read-only?
137 (if (unspecified? read-only?) #f read-only?))
138 (timeout
139 (if (unspecified? timeout) 300 timeout)))))))
140
141(define (rsync-account config) 102(define (rsync-account config)
142 "Return the user accounts and user groups for CONFIG." 103 "Return the user accounts and user groups for CONFIG."
143 (let ((rsync-user (if (rsync-configuration-uid config) 104 (let ((rsync-user (if (rsync-configuration-uid config)