Re: New and unified 9.5 spec file is in git

From: Craig Ringer <craig(at)2ndquadrant(dot)com>
To: Devrim GÜNDÜZ <devrim(at)gunduz(dot)org>
Cc: pgsql-pkg-yum <pgsql-pkg-yum(at)postgresql(dot)org>
Subject: Re: New and unified 9.5 spec file is in git
Date: 2016-01-21 01:21:14
Message-ID: CAMsr+YFS-fm_BbdqHj69tfZbnAYozoX4j+BNFkCM3hSqeBPp7A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-pkg-yum

On 21 January 2016 at 04:17, Devrim GÜNDÜZ <devrim(at)gunduz(dot)org> wrote:

> > I'm really happy about this, since it means the build depends are now
> > correct and it can be built without needing a dedicated build machine
> > using nothing but mock. No need to manually set up dependencies
> > anymore, set up a build box, etc. No need to juggle x86_64 and i386
> > either, you can run builds for *everything* from a single F23 box or
> > VM or docker or whatever.
>
> Well, we are building 100+ packages in 9.5 set. Setting up a new mock
> environment everytime would slow us down, IMHO. What do you think?
>

mock caches the build env so in practice it's very fast. mockchain helps
even more.

mock is what Koji uses and what's used to build all of Fedora and EPEL, so
it gets a fair bit of performance attention. There _is_ a performance cost
vs building bare on a preconfigured build box but it's (IMO) greatly offset
by the increased reliability and consistency of package builds. You don't
risk having undeclared dependencies, building against a version other than
the one declared in the spec file, etc.

> > If the same process is followed for other packages
>
> *All* of the *recently added* spec files are unified nowadays :)

Great!

> > it's less of an issue than when the build boxes are hand-maintained,
> > but the great thing about mock is that it gets all the build depends
> > info straight from the spec file.
>
> All deps are already installed on our build servers. If not, we install
> them before building a new package.
>

That can cause issues though. For example I think that's how the Java 8
problems a while ago happened. The spec file declared a dependency on
openjdk 7 but the rpms were built against what was locally installed, which
is openjdk 8.

The nice thing with mock is that the buildroot can contain only exactly the
required packages for a build. No extras. It provides a lot more confidence
that the spec matches the actual build and that anyone can reproduce the
package build consistently without a special hand-created build env.

I've been using it for the BDR and pglogical builds and it does a pretty
good job. It's helped me find a number of bugs and oversights too.

--
Craig Ringer http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Browse pgsql-pkg-yum by date

  From Date Subject
Next Message Regina Obe 2016-01-22 07:08:49 pgRouting 2.1 why not available on PostgreSQL 9.5?
Previous Message Craig Ringer 2016-01-21 01:15:33 Re: New and unified 9.5 spec file is in git