Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 937011 - app-containers/lxc has RDEPEND on sys-libs/libcap[static-libs]
Summary: app-containers/lxc has RDEPEND on sys-libs/libcap[static-libs]
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Joonas Niilola
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-07-31 14:51 UTC by Ed Wildgoose
Modified: 2024-08-02 13:21 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ed Wildgoose 2024-07-31 14:51:23 UTC
Hi, I wonder if there is a typo in RDEPEND for lxc? It has an RDEPEND:

RDEPEND="acct-group/lxc
	acct-user/lxc
	apparmor? ( sys-libs/libapparmor )
	caps? ( sys-libs/libcap[static-libs] )
	io-uring? ( >=sys-libs/liburing-2:= )
	pam? ( sys-libs/pam )
	seccomp? ( sys-libs/libseccomp )
	selinux? ( sys-libs/libselinux )
	ssl? ( dev-libs/openssl:0= )
	systemd? (
		sys-apps/dbus
		sys-apps/systemd:=
	)
	tools? ( sys-libs/libcap[static-libs] )"

However, the libcap needing +static-libs seems wrong? My guess is that the build statically links to libcap (or at least I don't see a file dynamically linking to it? If so then we should move it to BDEPS? Or if it uses it at runtime then probably we just drop the +static-libs

I use gentoo to build small embedded appliances, so always trying to trim space. I happen to strip .a files from the final image, but this complicates the profiles I create for host/target builds.

Thanks for considering this
Comment 1 Joonas Niilola gentoo-dev 2024-08-01 05:38:11 UTC
You are probably right. Something like this is more correct:
--- lxc-6.0.1.ebuild    2024-06-28 05:41:55.058981773 -0000
+++ lxc-6.0.1-r1.ebuild 2024-08-01 05:32:07.088715893 -0000
@@ -18,7 +18,7 @@
 RDEPEND="acct-group/lxc
        acct-user/lxc
        apparmor? ( sys-libs/libapparmor )
-       caps? ( sys-libs/libcap[static-libs] )
+       caps? ( sys-libs/libcap )
        io-uring? ( >=sys-libs/liburing-2:= )
        pam? ( sys-libs/pam )
        seccomp? ( sys-libs/libseccomp )
@@ -28,8 +28,10 @@
                sys-apps/dbus
                sys-apps/systemd:=
        )
-       tools? ( sys-libs/libcap[static-libs] )"
+       tools? ( sys-libs/libcap )"
 DEPEND="${RDEPEND}
+       caps? ( sys-libs/libcap[static-libs] )
+       tools? ( sys-libs/libcap[static-libs] )
        sys-kernel/linux-headers"
 BDEPEND="virtual/pkgconfig
        man? ( app-text/docbook2X )
Comment 2 Ed Wildgoose 2024-08-01 08:57:05 UTC
That would work for me! Thanks

I agree that on closer inspection, the liblxc.so links to libcap, so we certainly need it in RDEPEND. 

However, moving the +static-libs out into DEPEND is a help. Thanks!
Comment 3 Larry the Git Cow gentoo-dev 2024-08-02 13:21:57 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=436a4f58c0318a77a3ad2cefd950a0942ed39874

commit 436a4f58c0318a77a3ad2cefd950a0942ed39874
Author:     Joonas Niilola <juippis@gentoo.org>
AuthorDate: 2024-08-02 13:21:01 +0000
Commit:     Joonas Niilola <juippis@gentoo.org>
CommitDate: 2024-08-02 13:21:01 +0000

    app-containers/lxc: move libcap[static-libs] dep from RDEPEND to DEPEND
    
    Closes: https://bugs.gentoo.org/937011
    Signed-off-by: Joonas Niilola <juippis@gentoo.org>

 app-containers/lxc/lxc-6.0.1.ebuild | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)