Re: Unifying the spec files?

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: Unifying the spec files?
Date: 2014-07-30 05:57:15
Message-ID: 53D8893B.1030903@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-pkg-yum

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

(Whoops, attached the full tar file instead of just the spec).

On 07/29/2014 01:06 PM, Devrim wrote:
>
> Hi Craig,
>
> On Tue, 2014-07-29 at 09:46 +0800, Craig Ringer wrote:
>
>> While looking over the spec files for the releases I noticed that
>> the _vast_ majority of content is the same for each spec.
>>
>> Where differences exist it isn't always clear why. For example,
>> EL-7 seems to generate an init script differently to EL-6,
>
> EL-7 does not have init script ;) It uses systemd'd unit file.
> Basically, right now EL-5 and EL-6 is one group, and EL-7,F-19 and
> F-20 are another group when it comes to features/init scripts,
> etc.

Yeah, I worked that one out after posting.

> The selinux-devel version is EL-6 does not satisfy the needs for
> sepgsql module. That is the reason why we don't build it there.
> There are slight other differences IIRC.

OK, makes sense.

>> I'm a little curious about why the spec files seem to be copied
>> and edited, rather than having a single spec for the package
>> across all supported versions and using conditionals. I'm sure
>> you've thought of that, so there'll be good reasons - did you try
>> this and run into issues?
>
> I have tried this *years* ago, but it did not work, since some
> conditionals did not work across distros.

Yes, it seems lots of things really work best with rpm5.

Take a look at the attached, which is a first cut unification attempt.
I'm going to do mock builds and test installs for each arch now, but
figured I'd send it for comment as well.

I've versioned the Provides: and made some other rpmlint fixes while I
was at it.

I'd also like to parameterise the package basename ("postgresql") to
allow variants that still have "Provides: postgresql" and "Provides:
postgresql-%{majorversion}" but live in a separate datadir. The
immediate reason is to permit me to package BDR, which is 9.4 but has
a few catalog changes that mean it can't run from a straight 9.4
datadir, without stomping on PGDG packages and without the need to
rebuild all the dependencies. Thoughts?

- --
Craig Ringer http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJT2IkzAAoJELBXNkqjr+S2iqoH/jIlEpvK+hNqQqB7wttJU1Uo
Qm0ier4Y5aJwU7e8OOBPASfodZSxtpwSzn+ttnSfY7x+6/WnIgn5mkCA4KmeVAQO
u8hv//0apNF5Op8w5PKjKw6ds7MDQmfDfVcpf+w9767zqTCk6m9xSoIDX05h0w1S
l0ctD0A7QKb2+D98RyYtFhWF5cBC7Mo08wiIA2X/Htu9sZf7t6SlxpHJksCkHC/D
0uchYXaHdx5KYbzdOQfti2zOAjDw56oqbBehVfVZxjlIBM6usutxW54oUN5t4A/o
7H+ZYSejf0Ik1FBy2hgdqtjzeVaIHCYhIynlPwIR7ZJsMN6vIpjmUEq0QoLE9O4=
=ylcF
-----END PGP SIGNATURE-----

Attachment Content-Type Size
postgresql-9.4.spec text/x-rpm-spec 39.1 KB

In response to

Browse pgsql-pkg-yum by date

  From Date Subject
Next Message Devrim Gündüz 2014-07-30 08:35:12 Re: Unifying the spec files?
Previous Message Craig Ringer 2014-07-30 05:37:31 Re: Unifying the spec files?