Community Packages

Please read this before reporting a bug:
http://wiki.archlinux.org/index.php/Reporting_Bug_Guidelines

Do NOT report bugs when a package is just outdated, or it is in Unsupported. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#63814 - [lxc] broken due to missing statically linked executable

Attached to Project: Community Packages
Opened by Marcus Gelderie (redmnic) - Wednesday, 18 September 2019, 06:54 GMT
Last edited by David Runge (dvzrv) - Sunday, 03 November 2019, 11:01 GMT
Task Type Bug Report
Category Packages
Status Assigned
Assigned To Sergej Pupykin (sergej)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No

Details

Description: lxc-execute is broken due to missing statically linked executable.


Additional info:
* lxc 3.2.1-1
* Just try lxc-execute with any container (NOTE: lxc-start works just fine)


Steps to reproduce:
1. lxc-create -n foo -t download -- --dist archlinux --release current --arch amd64
2. lxc-execute -n foo bash

The error points to a missing 'lxc.init.static'. The error message is misleading in that the missing binary (that is searched for in the source) is actually called 'init.lxc.static'. Arch is not alone in this, nor is this really new (it seems):
- https://github.com/lxc/lxc/issues/2590 (Arch related)
- https://bugzilla.redhat.com/show_bug.cgi?id=1654366 (Fedora)

Analysis:
The problem is that init.lxc.static is only built if the buildhost has a static version of libcap (i.e. libcap.a) installed. The autoconf script checks for that static lib and only builds the init.lxc.static binary if that checks succeeds.

I have confirmed that building libcap with 'options=(staticlibs)', installing that, and then building lxc via its PKGBUILD (unmodified) is successful and produces the binary. lxc-execute works as expected afterwards.

Honestly, I'm not sure how to proceed from here: This is not a bug in the lxc package, nor upstream, nor in the libcap package. Unfortunately, lxc-execute is broken and thus lots of (good) documentation does not yield results for users only starting out with lxc (i.e. the Arch wiki has good documentation, but the examples simply fail because of this).
Again: Running full containers using lxc-start works fine.

Is it possible to install the static lib on the build host? A first thought is to add (staticlibs) to makepkg.conf options on the build hosts, mirror those packages and then use them for the build hosts. This way, standard arch clients are unaffected. A simpler solution is to have a second libcap-static package, but that would be feature request of sorts for libcap...
This task depends upon

Loading...