[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Using dh causes configure to be run twice?



On Wed, Jul 10, 2019 at 01:16:03AM -0400, Theodore Ts'o wrote:
> I tried to see how other packages work around this misfeature, and I
> see that openssh just hacks things to make the second
> dh_auto_configure a no-op:
> 
> override_dh_auto_configure-arch:
> 	dh_auto_configure -Bdebian/build-deb -- $(confflags)
> ifeq ($(filter noudeb,$(DEB_BUILD_PROFILES)),)
> 	dh_auto_configure -Bdebian/build-udeb -- $(confflags_udeb)
> 	# Avoid libnsl linkage. Ugh.
> 	perl -pi -e 's/ +-lnsl//' debian/build-udeb/config.status
> 	cd debian/build-udeb && ./config.status
> endif
> 
> override_dh_auto_configure-indep:
> 
> RLY?

You've misread this, I'm afraid.  The point of the *-indep overrides in
openssh is to avoid doing unnecessary work in
architecture-independent-only builds, not to avoid duplicate configure
steps.  openssh has some Architecture: all binary packages, which
Debian's autobuilders build on separate builders that do the rough
equivalent of "sbuild --arch-all --no-arch-any", so a small amount of
time optimising this was worthwhile.

This is unrelated to the problem you're running into.

Proof: I introduced this change in
https://salsa.debian.org/ssh-team/openssh/commit/c1f965684b54bed51e8cb1e7a2f3d2003d64d341.
Aside from its commit message, you can also look at build logs from
before and after this change:

  https://buildd.debian.org/status/fetch.php?pkg=openssh&arch=i386&ver=1%3A6.9p1-2&stamp=1441886711&raw=0
  https://buildd.debian.org/status/fetch.php?pkg=openssh&arch=i386&ver=1%3A6.9p1-3&stamp=1448408594&raw=0

Both before and after this change, you can see that there's only one
dh_auto_configure pass (two actual configure runs, but that's because
there's one for deb and one for udeb).  I only started doing source-only
uploads with 1:6.9p1-3, so you can't easily see what it would have
looked like beforehand, but you can see that
https://buildd.debian.org/status/fetch.php?pkg=openssh&arch=all&ver=1%3A6.9p1-3&stamp=1448408071&raw=0
is nice and short once it gets past installing build-dependencies.

-- 
Colin Watson                                       [cjwatson@debian.org]


Reply to: