[PATCH] services: network-manager: Handle existing configuration directory.

  • Open
  • quality assurance status badge
Details
2 participants
  • 45mg
  • Arnaud Daby-Seesaram
Owner
unassigned
Submitted by
45mg
Severity
normal

Debbugs page

45mg wrote 3 weeks ago
(address . guix-patches@gnu.org)(name . 45mg)(address . 45mg.writes@gmail.com)
99ca7989b63452647788cc77325b7654ae24c244.1740940189.git.45mg.writes@gmail.com
* gnu/services/networking.scm (network-manager-activation):
Handle the case where /etc/NetworkManager/conf.d already exists.

Change-Id: I7af4f4ad226eef28bd8667f0708525e77a6a50c8
---
Follow-up to 0caba8f5db48c15a2c3edae37e816654246fa986.

This issue only became apparent after pulling the above commit, changing my
system config to use the new extra-files field, and reconfiguring /twice/. This
sort of thing is why I now pull from a local fork and apply patches to it before
submitting them ;)

gnu/services/networking.scm | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)

Toggle diff (28 lines)
diff --git a/gnu/services/networking.scm b/gnu/services/networking.scm
index 53840c2764..45efea330b 100644
--- a/gnu/services/networking.scm
+++ b/gnu/services/networking.scm
@@ -1271,7 +1271,18 @@ (define (network-manager-activation config)
'((mkdir-p "/var/lib/misc"))
'())
#$@(if (pair? extra-configuration-files) ;if non-empty
- `((symlink
+ ;; If /etc/NetworkManager/conf.d is a symlink to a store file,
+ ;; delete it.
+ `((if (and (file-exists? "/etc/NetworkManager/conf.d")
+ (store-file-name?
+ (canonicalize-path "/etc/NetworkManager/conf.d")))
+ (delete-file-recursively
+ "/etc/NetworkManager/conf.d"))
+ ;; If it exists but is not a symlink to a store file, then
+ ;; this will fail with EEXIST; we leave this for the user to
+ ;; handle, since they probably created the directory
+ ;; themselves.
+ (symlink
,(file-union "network-manager-configuration-directory"
extra-configuration-files)
"/etc/NetworkManager/conf.d"))

base-commit: f9dcb84550b85aa816899b2106b1a5ae546167a3
--
2.48.1
Arnaud Daby-Seesaram wrote 2 weeks ago
(name . 45mg)(address . 45mg.writes@gmail.com)(address . 76688@debbugs.gnu.org)
87ldthp92k.fsf@nanein.fr
Hi,

45mg <45mg.writes@gmail.com> writes:

Toggle quote (7 lines)
> * gnu/services/networking.scm (network-manager-activation):
> Handle the case where /etc/NetworkManager/conf.d already exists.
>
> Change-Id: I7af4f4ad226eef28bd8667f0708525e77a6a50c8
> ---
> Follow-up to 0caba8f5db48c15a2c3edae37e816654246fa986.

This patch looks good to me.


Best regards,

--
Arnaud
-----BEGIN PGP SIGNATURE-----

iQJEBAEBCgAuFiEEMgqfJ4U0fby1t860ojLKXoMTiAwFAmfKptQQHGRzLWFjQG5h
bmVpbi5mcgAKCRCiMspegxOIDFiVD/40UdsT2YNMYmVCvM0FKx6YZUjDSymAJqeP
jb2QoJYQdlfNg61obvoXSboLTfh6zO9H/dgilzWp/q4dNmk1+pnYu++scg0r3Klg
GRLA4m58d6VwWsoA6gCM+Gm3yVcLfzOYi14lsEkpA+91pUJShFHzlBR1FY/KI6hi
07c3iB2U5DVRQtbk3ohUJkEVwUb+eIIzuLaqOypkja/yRWv1b8gOPhGYf2t+N3gM
CHwFNw2oSAQrTtQFOkK04spD6BUhiuvsLVf9RmsUBuLd/JnFcgBibPgVpYJ3QKAQ
IhPsocSGHwrLwIn6UVjanXYPMOTykEbZ5cwCEVyXUlue+H/Q56+nrx8PhhNDn9O2
gehhnLANnc+QApD76sEboMXlGkTz2v8bry2B1J81HjHVsLbWNMnAUGigor6iCr9r
Cteu8AsWVEigH/jgvMEa3/3sRAaWE6f+ledwn7DvfM7wHzNPEIk+hQjOalgmzqs2
roeMOKHXjKHeIoa+O+HiVdLeR3pJsqegvnQbQPanCfwNpE8p98utlfOE/QFJhOWw
eVNDjopYJtJSjl9rKeUFcuBTYb0zcFxQaLAX5wXPO39yixSKkTc+6QOF7zQcgEjN
i7RjvJqsZkz79QdWsIq8gckCdQALfRqUKZR4wXY9gBDXx2bWFEG4OuaZbkirdSQu
7XZP0cicdA==
=b7WA
-----END PGP SIGNATURE-----

45mg wrote 2 weeks ago
(name . Arnaud Daby-Seesaram)(address . ds-ac@nanein.fr)(name . 45mg)(address . 45mg.writes@gmail.com)(address . 76688@debbugs.gnu.org)
87ecz95jv2.fsf@gmail.com
Hello again Arnaud!

Arnaud Daby-Seesaram <ds-ac@nanein.fr> writes:

Toggle quote (2 lines)
> This patch looks good to me.

If it's not too much trouble, could you formally mark this patch as
reviewed? I think you can use the 'Prepare review' button on this page,
just check off the items and it'll automatically write the email for
you:


That way, it'll show up as 'reviewed looks good' in QA (dark green tick
icon). My understanding is that committers use that status to find
patches to apply.

Thanks again for reviewing this patch, as well as the last one!
Arnaud Daby-Seesaram wrote 2 weeks ago
(name . 45mg)(address . 45mg.writes@gmail.com)(address . 76688@debbugs.gnu.org)
87cyetp4h0.fsf@nanein.fr
user guix
usertag 76688 + reviewed-looks-good
thanks

Guix QA review form submission:
I am not sure about the commit message, otherwise, the patch looks good.
-----BEGIN PGP SIGNATURE-----

iQJEBAEBCgAuFiEEMgqfJ4U0fby1t860ojLKXoMTiAwFAmfKvhsQHGRzLWFjQG5h
bmVpbi5mcgAKCRCiMspegxOIDJ/aD/9f6Wqe3GCvu97NCaE2kLn//Dd1X+IGGwP0
gqdXbetAEXxksUudfQlaHUsunCsZya05OxDFKTNRkS9VZK7u9dfTehiyv3v600JJ
c/r2daZYI4D7j9/iHNgj6OWUWRyyX8dYogUOm6G4mGtBZGkXZplMyTpAYltERtPt
a3uMv0doK1aCIciiHwbdVu0mbZVJekxd+kK2ZCaWhKFHZG0es9wSYT3Vf0hxxfqG
q0KNG2E8WuucPicSTCZt3vuk72DGNhBzhe02kS5aUDzVG0GlPsuyZaDDdybSCmYf
NPyaoI//smaqTtt7ee63jhM98o3dGa54pHtcwRYUjV7n4r9P7yY97Yb67Bfyi9gz
kkw5O4zUkDwLo2wXspu8w0SjD3biCBpSoH0AJIh9oAQ0hxZeRbcmK4Bnor3KhEZO
emhtwGGZN48gtt693d8Ndgy7yPYbo5SvHsLEuZD1E4GqgYhnPAaF+NOjr2ZZdePm
jAFUPVYJY+7XWyrZBMZo8Wg0lMhDlGld62JNgPJWnUDe/GQI24Px67dHja+xlmPR
XDiUl5qddhFnSFaBNOK5risLVg0oo0Me+0I46D4IA8dfvbjN2NTz8yK+eU6e7pUZ
NbRYdg3jKElSPJDRTxHMuOwLlOI0xTETAoLFlrncdSmMzqrkH5xWUnHAXgKl3+06
LGbPKp7/Gw==
=s9a0
-----END PGP SIGNATURE-----

?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 76688@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 76688
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help