#717843 please provide a staged build for xfonts-utils

#717843#5
Date:
2013-07-25 14:24:57 UTC
From:
To:
there is a cycle build dependency for xfonts-utils and libfontenc. Please
provide a DEB_STAGE=stage1 build to only build the bits in xfonts-utils to build
libfontenc.

#717843#10
Date:
2014-06-21 13:12:24 UTC
From:
To:
Hi,

Thanks a lot for taking care of X in Debian!

As part of this year's "Bootstrappable Debian" Google Summer of Code
project I took a look at xfonts-utils to break a circular build
dependency as noted in the "Type 2 Self-Cycles" and "Feedback Arc Set"
section of http://bootstrap.debian.net/amd64/ and, more specifically, at
http://bootstrap.debian.net/source/xfonts-utils.html and the
version-specific pages linked from it.  There are two primary goals to
my work on this GSoC project:
- The first goal is to modify some packages so that they may be built in
  some limited way ("nocheck", binary-only, or build profiles like
  "stage1") without some of their usual build dependencies.  In most
  cases this is caused by one or more dependency loops between binary
  and source packages, so that a source package requires for its
  building, directly or indirectly, one of its own binary packages to be
  already built.  The modifications make the source build in a limited
  fashion (not generating documentation, not running tests, not building
  some of the binary packages) so that this may happen with only the
  rest of the build dependencies, so Debian may be bootstrapped on a new
  architecture starting from a very few cross-built toolchain packages
  and then moving along, source package by source package.
- The second goal, which is actually closely related to the first, is
  that in the process of modifications, any changes (some files not
  regenerated, others not built at all) can be made with binary package
  level granularity.  This means that if a binary package is built at
  all during a limited build, then it must have the same contents as the
  same binary package resulting from a full build.  The point here is to
  avoid breakage if other packages in the archive depend on some
  functionality provided by the omitted files; if so, it should be
  obvious that the functionality is missing, and the clearest way to do
  that is by omitting a full binary package or, rather, delaying its
  build until the rest of the build dependencies are present.

Thanks for sitting through this somewhat lengthy introduction :)  Now,
the point is, libfontenc needs the pkg-config and aclocal files of
X.org's font-util to build, and xfont-utils's fonttosfnt needs
libfontenc1 and libfontenc-dev to build.  One of the ways to fix this
circular build dependency would be to break font-util into a source and
binary package of its own, let the xfonts-utils binary package depend on
it, and change libfontenc's build dependency to xfonts-utils | font-util
so that it would work both with the old and the new packages.

Another way is what Matthias Klose proposed in this bug report - let
xfonts-utils make sure of the build profiles framework and, in the
stage1 build profile, only build font-util, none of its other tools.
Since we are aiming for binary package level granularity, this means
that in the stage1 profile xfonts-utils would have to build a binary
package with a different name and libfontenc's build dependency would
again have to be adjusted to xfonts-utils | xfonts-utils-stage1.

So what do you think about the attached patch that introduces a new
binary package and teaches the rules file to produce it, only building
font-util, in the stage1 build profile?

In this iteration, one would also have to manually remove the offending
build dependencies from the control file; I will file another bug that
makes use of the new <profile.*> restriction and the new Build-Profiles
binary stanza header to make this completely automated.  However, that
would have to wait for the actual introduction of build profile-aware
tools in the Debian archive infrastructure.

If something should go wrong with the patch, it's also available at
https://gitorious.org/roam-debian-bootstrap/xfonts-utils-debian/commits/roam-stage1-build

Thanks again for your work on X and Debian in general!

G'luck,
Peter

#717843#23
Date:
2014-07-12 17:46:38 UTC
From:
To:
I think rather than introducing ugly staged things into xfonts-utils,
it'd be better to split font-util to a separate source package.  AFAICT
libfontenc would only need that and not the rest of the xfonts-utils
bundle.

Cheers,
Julien

#717843#28
Date:
2014-07-30 16:45:32 UTC
From:
To:
Actually, I tend to agree (as mentioned in my previous message, this is
the simplest way to resolve the situation); I'm thus closing #752235
(the second step of the stage1 conversion).  OK, so what do you think
about the patches in the following branches:

https://gitorious.org/roam-debian-bootstrap/xfonts-utils-debian/commits/roam-font-util

https://gitorious.org/roam-debian-bootstrap/xfonts-utils-debian/commits/roam-no-font-util

The first one is supposed to convert the repository so that it builds
only font-util; of course, you're free to ignore the changelog entry
commit, it's there just because I couldn't build the package with
d/changelog and d/control disagreeing about the source package name :)

The second one removes the parts that build and install font-util from
the current repository, keeping the xfonts-utils source and binary
package name.

In both cases, I've not done anything to the upstream branch or the
now-unneeded source directories, since I'm not familiar with the
procedures of the Debian X Strike Force group in such cases.

Thanks again for your time and consideration!

G'luck,
Peter

#717843#33
Date:
2023-11-03 18:21:59 UTC
From:
To:
Hello,

Any news on this? This is posing problem to bootstrap each and every new
Debian port.

Samuel