Re: Help needed for cross-building tsocks
Hi Nilesh,
On Sun, Aug 31, 2025 at 08:47:41PM +0530, Nilesh Patra wrote:
> I've tried this which seems to do the trick but is manual work -- does this look ok to you?
Functionally, yes, but I concur that there should be a better solution.
> execute_before_dh_gencontrol:
> for pkg in libc6-dev libc6.1-dev libc0.3-dev musl-dev; do \
> if [ "$(DEB_BUILD_ARCH)" != "$(DEB_HOST_ARCH)" ]; then \
> pkg="$$pkg:$(DEB_HOST_ARCH)"; \
You may unconditionally append :$(DEB_HOST_ARCH). It'll work in the
native case.
> fi; \
> pkgname=`dpkg-query -W -f='$${source:Package}' $$pkg`; \
> version=`dpkg-query -W -f='$${source:Version}' $$pkg`; \
> if [ -n "$$version" ]; then \
> echo "$(DEB_SOURCE):Built-Using=$$pkgname (= $$version)" >> debian/$(DEB_SOURCE).substvars; \
> break; \
> fi; \
> done
>
> OTOH, I happened to notice the same libc-dev-bin B-U problem in a few other packages as well [1]. I wonder
> if there could be a better solution for all of these.
I suggest reporting a bug against dh-builtusing. This really should be
easier and dh-builtusing sounds like the place to make it easy. Maybe
the maintainer has some ideas? One way forward could be enabling
dh-builtusing to deal with virtual packages.
Moving forward with the tricky manual work for one package may still be
beneficial to provide a use case dh-builtusing.
Helmut
Reply to: