[systemd-bugs] [Bug 86555] New: systemd-nspawn resolves symlinks of COMMAND on host, not in container
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Fri Nov 21 23:49:14 PST 2014
https://bugs.freedesktop.org/show_bug.cgi?id=86555
Bug ID: 86555
Summary: systemd-nspawn resolves symlinks of COMMAND on host,
not in container
Product: systemd
Version: unspecified
Hardware: All
OS: Linux (All)
Status: NEW
Severity: minor
Priority: medium
Component: general
Assignee: systemd-bugs at lists.freedesktop.org
Reporter: moritz at bunkus.org
QA Contact: systemd-bugs at lists.freedesktop.org
I have several Linux distros located in directories into which I used to chroot
in order to build packages. Now I'm trying to use systemd-nspawn for that. In
order to run the shell I want to work with (zsh) I used to execute /bin/zsh
with chroot. The corresponding call to systemd-nspawn fails with a Debian tree
though because /bin/zsh is a symlink to /etc/alternatives/zsh which in turn in
a symlink to /bin/zsh4.
systemd-nspawn seems to resolve this symlink before it sets up the container
and complains if the binary is not found:
[0 mosu at sweet-chili /opt/linux] sudo systemd-nspawn
--directory=/opt/linux/64/debian/wheezy --bind=/home/mosu --bind=/proc
--bind=/sys --bind=/dev /bin/zsh
Directory /opt/linux/64/debian/wheezy lacks the binary to execute or doesn't
look like a binary tree. Refusing.
[1 mosu at sweet-chili /opt/linux]
My host system is not a Debian machine, therefore it doesn't have the
alternatives symlink system set up at all. So when the host resolves the
symlink /bin/zsh it doesn't find /etc/alternatives/zsh and errors.
This works nicely with chroot as chroot as chroot either doesn't try to resolve
the symlink before chrooting or it does relative to the chroot.
I can work around this issue with special-casing my scripts to execute
/bin/zsh4 on Debian instead of /bin/zsh, but I still consider this a bug in
systemd-nspawn because the shell is not the only thing on a Debian system that
uses the alternatives system with absolute links.
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-bugs/attachments/20141122/998f6786/attachment.html>
More information about the systemd-bugs
mailing list