Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 835994 - sys-fs/cryptsetup: sys-fs/lvm2 seems like an unneeded dependency
Summary: sys-fs/cryptsetup: sys-fs/lvm2 seems like an unneeded dependency
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal minor (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-03-25 12:14 UTC by Jonas Frei
Modified: 2022-03-25 14:24 UTC (History)
1 user (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 Jonas Frei 2022-03-25 12:14:43 UTC
I don't think lvm2 is actually needed to install and run cryptsetup. These packages seem unrelated. I also checked on Archlinux and they don't have lvm2 as a dependency.

Reproducible: Always

Steps to Reproduce:
1. Try to install sys-fs/cryptsetup
2. Notice that sys-fs/lvm2 needs to be installed
Actual Results:  
sys-fs/lvm2 is a dependency

Expected Results:  
sys-fs/lvm2 should not be a dependency
Comment 1 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2022-03-25 13:18:07 UTC
sys-fs/lvm2 provides libdevmapper.so

Now let's have a look what we have in cryptsetup's configure.ac file:

> grep -F libdevmapper cryptsetup-2.4.3/configure.ac | head -n 1
AC_CHECK_HEADER(libdevmapper.h,,[AC_MSG_ERROR([You need the device-mapper library.])])

Now let's have a look what uses libdevmapper in cryptsetup:

# for fle in $(qlist -Ce cryptsetup | grep -E 'bin/|/lib') ; do if [[ ! -L "${fle}" ]] ; then ldd ${fle} 2>/dev/null | grep -Fq devmapp && echo ${fle} ; fi ; done
/usr/lib64/libcryptsetup.so.12.7.0
/sbin/cryptsetup
/sbin/veritysetup
/sbin/integritysetup

So how do you think, cryptsetup can be used without lvm2 package?
Comment 2 Jonas Frei 2022-03-25 13:55:44 UTC
You're right, it will not work as-is. It seems at Archlinux they split the `lvm2` package and there is a separate `device-mapper` package which contains only libdevmapper-event.so and libdevmapper.so. If it is not planned / reasonable for Gentoo to provide these libraries in a separate package, then I agree that lvm2 is indeed needed. Feel free to cancel this bug if splitting the lvm2 package doesn't make sense.
Comment 3 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2022-03-25 13:58:50 UTC
(In reply to Jonas Frei from comment #2)
> You're right, it will not work as-is. It seems at Archlinux they split the
> `lvm2` package and there is a separate `device-mapper` package which
> contains only libdevmapper-event.so and libdevmapper.so.

USE="device-mapper-only" has the same effect for Gentoo's sys-fs/lvm2 package.

> If it is not
> planned / reasonable for Gentoo to provide these libraries in a separate
> package, then I agree that lvm2 is indeed needed. Feel free to cancel this
> bug if splitting the lvm2 package doesn't make sense.

That's up for the base-system team to decide.