From: "Ludovic Courtès" <ludo@gnu.org>
To: Brice Waegeneire <brice@waegenei.re>
Cc: 52454@debbugs.gnu.org
Subject: [bug#52454] [PATCH 0/4] Ensure correct ownership of directory trees in services.Hello Guix,
Date: Sat, 18 Dec 2021 22:34:45 +0100 [thread overview]
Message-ID: <87zgoxmway.fsf_-_@gnu.org> (raw)
In-Reply-To: <20211212183614.19730-1-brice@waegenei.re> (Brice Waegeneire's message of "Sun, 12 Dec 2021 19:36:11 +0100")
Hi!
Great patch series!
This has been discussed a few times: I wonder if we should simply chown
service home directories systematically?
Brice Waegeneire <brice@waegenei.re> skribis:
> * guix/build/syscalls.scm (lchown): New procedure.
Would be nice to add even trivial tests to tests/syscalls.scm.
Unfortunately, this doesn’t work for service activation because when
booting, activation snippets are run from the initrd’s Guile, which is
statically linked and lacks dlopen.
This leads to failures like:
--8<---------------cut here---------------start------------->8---
$ make check-system TESTS="postgresql" -j4
[...]
populating /etc from /gnu/store/bchxln4wkfmdbsxww9jaxafsyvlpdbmg-etc...
Please wait while gathering entropy to generate the key pair;
this may take time...
warning: failed to chown "/var/lib/postgresql/data": Function not implemented
warning: failed to chown "/var/run/postgresql": Function not implemented
warning: failed to chown "/var/log/postgresql": Function not implemented
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.
[...]
fixing permissions on existing directory /var/lib/postgresql/data ... initdb: could not change permissions of directory "/var/lib/postgresql/data": Operation not permitted
--8<---------------cut here---------------end--------------->8---
(The ENOSYS error above comes from the ‘lchown’ wrapper.)
For this strategy to work, you need to add ‘lchown’ in
‘guile-3.0-linux-syscalls.patch’ and to use ‘define-as-needed’ in (guix
build syscalls).
(I’m surprised we didn’t already have recursive chown.)
With this in place, we should be all set!
Thanks,
Ludo’.
next prev parent reply other threads:[~2021-12-18 21:35 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-12 18:28 [bug#52454] [PATCH 0/4] Ensure correct ownership of directory trees in services.Hello Guix, Brice Waegeneire
2021-12-12 18:36 ` [bug#52454] [PATCH 1/4] syscalls: Add 'lchown' Brice Waegeneire
2021-12-18 21:34 ` Ludovic Courtès [this message]
2021-12-21 19:30 ` [bug#52454] [PATCH v2 0/4] Ensure correct ownership of directory trees in services Brice Waegeneire
2021-12-21 19:36 ` [bug#52715] [PATCH v2 1/4] syscalls: Add 'lchown' Brice Waegeneire
2021-12-21 19:36 ` [bug#52713] [PATCH v2 2/4] activation: Add 'lchown-recursive' Brice Waegeneire
2021-12-21 19:36 ` [bug#52714] [PATCH v2 3/4] services: postgresql: Ensure correct ownership of directory trees Brice Waegeneire
2021-12-21 19:36 ` [bug#52712] [PATCH v2 4/4] services: cuirass: " Brice Waegeneire
2021-12-12 18:36 ` [bug#52454] [PATCH 2/4] activation: Add 'lchown-recursive' Brice Waegeneire
2021-12-12 18:36 ` [bug#52454] [PATCH 3/4] services: postgresql: Ensure correct ownership of directory trees Brice Waegeneire
2021-12-12 18:36 ` [bug#52454] [PATCH 4/4] services: cuirass: " Brice Waegeneire
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87zgoxmway.fsf_-_@gnu.org \
--to=ludo@gnu.org \
--cc=52454@debbugs.gnu.org \
--cc=brice@waegenei.re \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.