GNU bug report logs -
#76698
Activations interfere with each other modules
Previous Next
Reported by: Tomas Volf <~@wolfsden.cz>
Date: Mon, 3 Mar 2025 01:03:02 UTC
Severity: normal
Merged with 77365
Done: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Full log
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Hello,
when using `activation-service-type' combined with `with-extension', the
various modules seem to interfere with each other.
In my case the samba-service-type interferes with my custom service:
--8<---------------cut here---------------start------------->8---
(define (watcher-activation* config)
(match-record config <watcher-configuration>
(user group cache-dir state-dir)
(with-extension/guile-wolfsden
#~(begin
(use-modules (wolfsden fs)
(wolfsden sh))
(for-each (lambda (dir)
(mkdir-p dir)
(invoke* #$(file-append coreutils "/bin/chown")
"-Rv" (string-append #$user ":" #$group) dir)
(chmod dir #o700))
'(#$cache-dir
#$state-dir))))))
--8<---------------cut here---------------end--------------->8---
samba-service-type's activation starts with:
--8<---------------cut here---------------start------------->8---
(define (samba-activation config)
(let ((package (samba-configuration-package config))
(config-file (samba-configuration-config-file config)))
(with-imported-modules '((guix build utils))
--8<---------------cut here---------------end--------------->8---
Both (guix build utils) and (wolfsden sh) provide (invoke) procedure,
however with incompatible parameters, leading to somewhat annoying to
debug issues. In my case the error was:
--8<---------------cut here---------------start------------->8---
guix deploy: error: failed to deploy x: failed to switch systems while deploying '127.0.0.1':
keyword-argument-error #f "Invalid keyword" () ("/etc/samba/smb.conf")
--8<---------------cut here---------------end--------------->8---
Which makes sense now when I understand what the problem is, but it took
while to get to it.
I do not think this should be the case. Either each activation service
should be isolated into a fresh user module, or the services provided by
Guix should not introduce any additional modules into the scope.
Alternatively, each activation service could be wrapped into
program-file, that would ensure isolation as well.
Tomas
--
There are only two hard things in Computer Science:
cache invalidation, naming things and off-by-one errors.
This bug report was last modified 18 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.