snapd execs /usr/lib/snapd/snap-seccomp despite libexecdir set to /usr/libexec
Bug #1947563 reported by
Mikhail Novosyolov
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
snapd |
Triaged
|
Medium
|
Unassigned |
Bug Description
Executing snapd on rosa2016.1 (snapd does not know about this distro)
cannot run daemon: state startup errors: [cannot obtain snap-seccomp version information: fork/exec /usr/lib/
Build with:
./configure --libexecdir=
All files, including snap-seccomp, are inside /usr/libexec/snapd, not /usr/lib/snapd
The build-time --libexecdir=... prefix is not relevant for snapd itself (I guess you've built snap-seccomp binary).
Snapd makes some runtime decisions when looking snap-seccomp up, they depend on where snapd executable is run from and some known distributions (Fedora and Opensuse), and a fallback to to /usr/lib/snapd. It seems that in this case the check of own executable path and the related logic may not be correct, resulting in this fallback (the relevant code is in tool_linux.go - InternalToolPath function).
If you're trying to get snapd running on this distribution then I suggest trying to build and install it in /usr/lib/snapd for the time being (until this problem is fixed).