On Wed, 2020-07-01 at 17:23 +0200, Helmut Grohne wrote: > Hi Luca, > > On Wed, Jul 01, 2020 at 04:16:22PM +0100, Luca Boccassi wrote: > > Forgive the naive question, but aren't build profiles and stages > > supposed to be used in these cases, to help with bootstrapping? Eg: do > > a stage1 build with reduced features/dependencies, then rebuild > > everything again. Is my understanding wrong? > > Yes, that's the idea. However profiles are not a silver bullet and they > don't magically solve all of your problems. A stage1 build of util-linux > still produces a libmount-dev that Depends on libcryptsetup-dev. How do > you envision to solve this? > > Helmut
The dependency is hard-coded right now, but as far as I can see it
doesn't have to be - it could be generated at build time, depending on
the stage. This could be done immediately as far as I can see - what
about something like the following in d/rules:
ifneq ($(filter stage1,$(DEB_BUILD_PROFILES)),)
...
else
LIBMOUNT_DEPENDS=libcrypsetup-dev
...
endif
...
override_dh_gencontrol:
dh_gencontrol -- -V"libmount-dev:Depends=$(LIBMOUNT_DEPENDS)"
and ${libmount-dev:Depends} in d/control instead of the hard-coded dep.
The dependency is only needed if the pkg-config file Requires.private
mentions libcrypsetup, which won't be the case in a stage1-built
package.
Then in the near future, I've proposed the following changes, which
look like will be accepted for 2.36:
https://github.com/karelzak/util-linux/pull/1084
That means the dependency can be removed entirely, as pkg-config will
no longer list libcrypsetup in its Requires.private when using --with-
cryptsetup=dlopen.
Thanks!
--
Kind regards,
Luca Boccassi
signature.asc
Description: This is a digitally signed message part

