public inbox for [email protected]  
help / color / mirror / Atom feed
From: Jason Petersen <[email protected]>
To: Devrim Gündüz <[email protected]>
Cc: Craig Ringer <[email protected]>
Cc: Daniel Farina <[email protected]>
Cc: pgsql-pkg-yum <[email protected]>
Subject: Re: [pgsql-pkg-yum] Amazon Linux PGDG Repo?
Date: Thu, 22 Mar 2018 12:39:17 -0600
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
	<[email protected]>
	<CAOPfGFizQpGSc3qAXgRXrbYF=c3EG3AYZJ3O3iH5MNo3mZMi0w@mail.gmail.com>
	<[email protected]>
	<CAOPfGFimCaPfH66h-4+3HcTCOjfy20zS_d-uR7tTGPX=BiRFBg@mail.gmail.com>
	<[email protected]>
	<CAMsr+YHU8vC=iEn+v2iars8__2Nb-59dQsNA3HzMyuDdCkT9HA@mail.gmail.com>
	<[email protected]>

> On Mar 22, 2018, at 3:42 AM, Devrim Gündüz <[email protected]> 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 <[email protected]>
> 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 <[email protected] <mailto:[email protected]>> 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
[email protected]



Attachments:

  [application/pgp-signature] signature.asc (488B, 3-signature.asc)
  download

view thread (13+ messages)

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected]
  Subject: Re: [pgsql-pkg-yum] Amazon Linux PGDG Repo?
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox