Re: [pgsql-pkg-yum] Amazon Linux PGDG Repo? - Mailing list pgsql-pkg-yum

From Jason Petersen
Subject Re: [pgsql-pkg-yum] Amazon Linux PGDG Repo?
Date
Msg-id D2EBB988-3430-42A7-9C38-51A8F418DFBC@citusdata.com
Whole thread Raw
In response to Re: [pgsql-pkg-yum] Amazon Linux PGDG Repo?  (Devrim Gündüz <devrim@gunduz.org>)
List pgsql-pkg-yum
On Mar 22, 2018, at 3:42 AM, Devrim Gündüz <devrim@gunduz.org> wrote:

I don't know, I don't have access to Amazon Linux. Daniel?

Apart from EC2 having free instance types, Amazon Linux can now be run in Docker, so I don’t really understand the above? Or I guess you meant temporarily?

I emailed with Daniel about it a while back, here’s a snippet. Spoiler: there are macros…

Begin forwarded message:

From: Jason Petersen <jason@citusdata.com>
Subject: Re: [pgsql-pkg-yum] Amazon Linux PGDG Repo?
Date: October 11, 2017 at 11:30:26 AM MDT

[…]

On Oct 10, 2017, at 5:18 PM, Daniel Farina <daniel@citusdata.com> wrote:

Were you able to use macro detection to achieve this? I've done something similar by overriding the macros, e.g. via some "%global" statements. That's how I made packages.

I started out doing that, then I got more curious where %rhel was defined and why it wasn’t defined in Amazon Linux. This led me to /etc/rpm/macros.disttag, which on Amazon Linux has this:

# dist macros
     
%amzn               1
%dist          .amzn1
%amzn1             1

Based on that I was able to add if statements to, for instance, include the python27-devel package (on RHEL it’s just python-devel, so RHEL logic wasn’t directly applicable). Where I didn’t know the “right” answer, I just defaulted to adding conditionals to have amzn behave identically to RHEL 6 (no systemd, no Python 3, etc.)

With that I got a package build going of all the postgresql packages (libpq, contrib, etc. all included). If this is “standard” enough we [could] probably [… add these conditionals …] to the specfiles and add a buildfarm instance that just runs Amazon Linux in Docker and dumps the rpms to a shared volume for export.

So you can easily test for %amzn, %amzn1, or the contents of %dist…

--
Jason Petersen
Software Engineer | Citus Data
303.736.9255

Attachment

pgsql-pkg-yum by date:

Previous
From: Payal Singh
Date:
Subject: Re: [pgsql-pkg-yum] Amazon Linux PGDG Repo?
Next
From: Daniel Farina
Date:
Subject: Re: How are debuginfo packages generated?