Re: New and unified 9.5 spec file is in git - Mailing list pgsql-pkg-yum

From Jeff Frost
Subject Re: New and unified 9.5 spec file is in git
Date
Msg-id BBAB8086-75AB-4BBD-BB24-46A835D2C589@pgexperts.com
Whole thread Raw
In response to Re: New and unified 9.5 spec file is in git  (Craig Ringer <craig@2ndquadrant.com>)
Responses Re: New and unified 9.5 spec file is in git  (Devrim GÜNDÜZ <devrim@gunduz.org>)
List pgsql-pkg-yum

On Jan 19, 2016, at 19:52, Craig Ringer <craig@2ndquadrant.com> wrote:

On 20 January 2016 at 10:15, Craig Ringer <craig@2ndquadrant.com> wrote:
 
If anyone could take a look at it, it would be awesome.

I'll look right now.

It built perfectly with mock on Fedora 21 for a F23 target. Brilliant!

To make it clear that they're the same is it worth having a common/ directory at the same level as EL-5, F-23, etc and symlinking the specfile to the various subdirs from there, along with any identical patches etc?

Here's the full build process I used:

sudo yum -y install rpmdevtools mock
cd pgrpms/rpm/redhat/9.5/postgresql/F-23
spectool --get-files postgresql-9.5.spec
mock -r fedora-23-x86_64 --buildsrpm --sources . --spec postgresql-9.5.spec
cp /var/lib/mock/fedora-23-x86_64/result/postgresql95-9.5.0-2PGDG.fc23.src.rpm .
mock -r fedora-23-x86_64  --rebuild postgresql95-9.5.0-2PGDG.fc23.src.rpm

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.

If the same process is followed for other packages then it'll become possible to build the whole PGDG system with mockchain with no custom build machines, building anywhere that mock is available. No accidental undeclared build or runtime dependencies.  Since you seem to be using Docker to prep build envs now 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.

I also rebuilt the F23 package for F21 just by changing the -r argument to mock. Same for building it for i386 on an x86_64 host.

The EL-5 package built happily under mock for -r epel-5-i386 too. I didn't test install it.

Thanks so much. This is great and I really hope you got some use out of my prior work on it.


This makes me so excited! I can't wait to try it and work on getting the other packages set up this way as well!

Great job you guys!


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

pgsql-pkg-yum by date:

Previous
From: Craig Ringer
Date:
Subject: Re: New and unified 9.5 spec file is in git
Next
From: Jehan-Guillaume de Rorthais
Date:
Subject: Re: packaging of check_pgactivity ?