<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">On 26/09/18 16:23, Paul Sherwood wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:c22384d70f2e23ef125f27509bdcc413@codethink.co.uk">On
      2018-09-26 13:53, Ben Brewer wrote:
      <br>
      <blockquote type="cite">Nobody has an opinion on this?
        <br>
      </blockquote>
      <br>
      I think there are opinions, but no easy answers.
      <br>
    </blockquote>
    I agree, but there'd be no point discussing it if the answers were
    easy :)<br>
    <br>
    <blockquote type="cite"
      cite="mid:c22384d70f2e23ef125f27509bdcc413@codethink.co.uk">
      <blockquote type="cite">
        <blockquote type="cite">Recently we've been moving to have
          minimal-distro source elements
          <br>
          from freedesktop-sdk using BuildStream junctions.
          <br>
          <br>
          As far as was practically possible we attempted to build
          <br>
          minimal-distro from git, while freedesktop-sdk uses tarballs
          for
          <br>
          most packages.
          <br>
          <br>
          We're currently working on the assumption that provenance is
          <br>
          provided by building from git source, and that this is a
          worthy goal
          <br>
          to work towards, however the practicality of this approach has
          <br>
          become more questionable as we've tried to implement it.
          <br>
          <br>
          Here are the issues we've run into:
          <br>
          <br>
          * Many projects don't have any repository, or don't have a git
          <br>
          repository:
          <br>
          <br>
          * bzip2 has no repository at all
          <br>
          * mpfr (a gcc dependency) only has an SVN repository
          <br>
          <br>
          * gmp (a gcc dependency) only has a Mercurial repository
          <br>
        </blockquote>
      </blockquote>
      <br>
      I still advocate the git.baserock.org/trove approach. The history
      matters IMO, so I'd suggest we use g.b.o for these cases by
      default.
      <br>
    </blockquote>
    <br>
    The trove approach describes two things:<br>
    <ol>
      <li>Mirroring all sources so we don't depend on external
        infrastructure to build</li>
      <li>Putting all sources in git</li>
    </ol>
    <p>I agree that we need to mirror all sources so we can build any
      previous systems.</p>
    <p>I don't agree that putting tarballs in git, or having git mirrors
      for svn/cvs/mercurial/etc. makes sense.<br>
    </p>
    <p>We've had issues with mirroring SVN repositories when they are
      too large, and it just adds a layer of complexity that I don't <br>
      believe is needed.</p>
    <p>Most of our packages come from freedesktop-sdk junctions, would
      the freedesktop-sdk project accept using git.baserock.org as a
      mirror?<br>
      I think we'd also need to include Pedro (CC'd) in this discussion
      as he's currently maintaining the baserock infrastructure.</p>
    <p>Also worth mentioning that the trove tool is currently not
      maintained.<br>
    </p>
    <br>
    <blockquote type="cite"
      cite="mid:c22384d70f2e23ef125f27509bdcc413@codethink.co.uk">
      <blockquote type="cite">
        <blockquote type="cite">* In many cases, the process of building
          from git source to
          <br>
          produce a release is undocumented. In these cases a fair
          amount of
          <br>
          reverse engineering effort is required to gain parity with a
          tarball
          <br>
          release.
          <br>
          * Many projects require patches applied on-top of git in-order
          to
          <br>
          build.
          <br>
          <br>
          * These patches require maintenance
          <br>
          * These patches may be incorrect especially when changing
          versions
          <br>
          <br>
          * Many projects required different versions of autotools in
          order
          <br>
          to build the configure file
          <br>
          <br>
          * GCC requires a specific version of autoconf (2.64) to build
          from
          <br>
          git
          <br>
        </blockquote>
      </blockquote>
      <br>
      Could we fix that?
      <br>
    </blockquote>
    GCC deliberately uses a specific version of autoconf (2.64) because
    the commit their configure script to the repository; they do this
    partially to ensure there aren't large diffs between the configure
    scripts. The only safe fix would be to use an old copy of autoconf
    as a build dependency.<br>
    <br>
    <blockquote type="cite"
      cite="mid:c22384d70f2e23ef125f27509bdcc413@codethink.co.uk">
      <blockquote type="cite">
        <blockquote type="cite">* ucl (a dependency of SYSLINUX)
          requires a version of autoconf so
          <br>
          old, I've not been able to build it.
          <br>
          * Many git repositories contain a configure file that can't
          easily
          <br>
          be generated from the source for these reasons, and in those
          cases
          <br>
          pose the same issues for provenance that a tar file does.
          <br>
        </blockquote>
      </blockquote>
      <br>
      Not quite... if the configure file is hosted/provided by upstream
      it means something, doesn't it?
      <br>
    </blockquote>
    I don't think it does: If you commit a binary to a git repository,
    does that mean the binary can be trusted?<br>
    <br>
    Configure scripts are large,complicated and very hard to audit; I
    don't see any difference between executing a configure script and a
    random binary.<br>
    <br>
    <blockquote type="cite"
      cite="mid:c22384d70f2e23ef125f27509bdcc413@codethink.co.uk">
      <blockquote type="cite">
        <blockquote type="cite">* Some projects require closed source
          binaries to build a tar
          <br>
          release from git.
          <br>
        </blockquote>
      </blockquote>
      <br>
      Eek... which ones?
      <br>
    </blockquote>
    UPX which is a dependency of modern SYSLINUX requires binaries for
    the compression algorithms which pack the boot image. As described
    below.<br>
    <br>
    <blockquote type="cite"
      cite="mid:c22384d70f2e23ef125f27509bdcc413@codethink.co.uk">
      <blockquote type="cite">
        <blockquote type="cite">* SYSLINUX requires upx to build, and
          upx requires closed source
          <br>
          binaries to build properly. When building upx from git using
          ucl, it
          <br>
          prints a warning stating that it's a beta and not to be used
          in
          <br>
          production. I don't believe it's easy to trust such a build.
          <br>
        </blockquote>
      </blockquote>
      <br>
      Weren't we going to move away from SYSLINUX?
      <br>
    </blockquote>
    We were going to move away from it, but our research indicated that
    it wasn't really all that easy, likely this would take quite a bit
    of effort to achieve unless we can find someone with specific
    experience.<br>
    <br>
    We looked into systemd-boot (previously gummiboot) but there wasn't
    a great deal of documentation and it seems that it requires systemd
    to be in the booted image.<br>
    <br>
    We looked into grub which is documented in Linux From Scratch, and
    while it's possible to configure this, it doesn't gain us very much.
    The original Baserock team indicated that SYSLINUX was used because
    it was the simplest and I trust their judgement.<br>
    <br>
    The third option I guess would be uboot for x86, but I've not looked
    into this as I've never seen anyone using it.<br>
    <br>
    I don't currently see any significant gains to be had by updating
    the bootloaders, we'd have to have built everything else from source
    before we're ready to use that as an excuse to drop SYSLINUX.<br>
    <br>
    <blockquote type="cite"
      cite="mid:c22384d70f2e23ef125f27509bdcc413@codethink.co.uk">
      <blockquote type="cite">
        <blockquote type="cite">* The dependency list for the git build
          is much larger (and
          <br>
          usually undocumented) than the dependency list for the tarball
          <br>
        </blockquote>
      </blockquote>
      <br>
      I suppose if we document, it becomes documented?
      <br>
    </blockquote>
    <br>
    It's technically possible to move a mountain with a spoon.<br>
    I guess it's partially my fault for not indicating the scope of the
    work, but I think we're talking man years to get this done. It's
    worth bearing in mind that building from git was a goal for Baserock
    and was never achieved for a very basic system.<br>
    Being able to build from git sources is the first stage in
    documenting how to build the sources from git.<br>
    <br>
    <blockquote type="cite"
      cite="mid:c22384d70f2e23ef125f27509bdcc413@codethink.co.uk">
      <blockquote type="cite">
        <blockquote type="cite">* When updating "file" to git, I
          discovered that it has
          <br>
          undocumented dependencies
          <br>
          <br>
          * In many cases the increased dependencies would also be
          required
          <br>
          as part of the bootstrap, which would inflate the bootstrap
          size by
          <br>
          an impractically large amount.
          <br>
          <br>
          The Mercurial and SVN issues can be resolved either by
          developing
          <br>
          these plugins for BuildStream or using a trove style approach
          where
          <br>
          we create a git mirror for Mercurial/SVN repositories.
          <br>
          <br>
          The remaining issues I believe are a little more tricky to
          resolve.
          <br>
          <br>
          Any thoughts or ideas are welcome.
          <br>
        </blockquote>
      </blockquote>
      <br>
      Can/should we start raising issues on the applicable upstreams, to
      see if there is any interest in addressing them, or in us helping
      them to address them?
      <br>
    </blockquote>
    It's possible we can do this, however most of the projects that are
    difficult to build are GNU or similar projects which have little
    project infrastructure and in many cases have been ignored for
    years.<br>
    We should aim to do this in the future where possible though.<br>
    <br>
    Regards,<br>
    Ben<br>
    <br>
  </body>
</html>