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:
Subject: Re: [pgsql-pkg-yum] Amazon Linux PGDG Repo?
Date: October 11, 2017 at 11:30:26 AM MDT
[…]
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:
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