Subject: Amazon Linux PGDG Repo?

From: Jason Petersen <[email-masked]>
Date: Fri, 6 Oct 2017 11:51:41 -0600

What happened to the Amazon Linux PGDG repo? It seems to have disappeared entirely as of v10.

--
Jason Petersen
Software Engineer | Citus Data
303.736.9255
[email-masked]

---

From: Devrim Gündüz <[email-masked]>
Date: Mon, 09 Oct 2017 19:01:19 +0100

Hi Jason,

> What happened to the Amazon Linux PGDG repo? It seems to have disappeared

When I launched Amazon repo, it was a RHEL 6 clone, so those RPMS were actually
HEL 6 RPMS. 

Recently, it diverted a lot, so I gave up.

Regards,
-- 
Devrim Gündüz
EnterpriseDB: https://www.enterprisedb.com
PostgreSQL Consultant, Red Hat Certified Engineer
Twitter: @DevrimGunduz , @DevrimGunduzTR

---

From: Daniel Farina <[email-masked]>
Date: Mon, 09 Oct 2017 20:07:21 +0000

> Recently, it diverted a lot, so I gave up.

That is true, with regard to PostGIS in particular I've had to do quite a
bit of hackery to get things to work (and I'm currently broken at the
moment).

Nevertheless, Amazon Linux is the one way to get competent kernel defect
support on AWS , so I'm fairly committed to using it. The newer userland
packages are also sometimes useful. And most pgdg packages compile fine.

As-is I'd probably continue to maintain a barely-good-enough fork of pgrpms
to do my packages. Is there a better way?

---

From: Devrim Gündüz <[email-masked]>
Date: Tue, 10 Oct 2017 13:15:55 +0100

Hi,

> to do my packages. Is there a better way?

How do you make those changes? Are they inside conditionals, like I did for
SLES, or did you just fork them? If they are inside conditionals, we can commit
them back to our repo as a first step -- at least it would save time for other
users.

The 2nd step would be having a community managed build server on Amazon, but
given that we recently added SLES 12 and RHEL 7 PPCLE support to our repo, I am
out of cycles to add a new platform. My community time at EDB is already 200%
booked.

Regards,

---

From: Jason Petersen <[email-masked]>
Date: Tue, 10 Oct 2017 10:34:43 -0600

> On Oct 10, 2017, at 6:15 AM, Devrim Gündüz <[email-masked]> wrote:
> 
> The 2nd step would be having a community managed build server on Amazon

This happened somewhat quietly, but there are now Amazon Linux images in Docker Hub. It might be reasonable to just bring the specfiles into such a container and build the rpms there (they only have fairly recent Amazon Linux versions, but that might be OK).

My build logic for Citus is a collection of shell scripts and Docker images, so this is probably something I could get together if the pgrpm specfiles are relatively general.

---

From: Daniel Farina <[email-masked]>
Date: Tue, 10 Oct 2017 23:30:21 +0000

> them back to our repo as a first step -- at least it would save time for

I forked them. Do you an idea what macros can be used to make amazon-linux
specific paths?

---

From: Payal Singh <[email-masked]>
Date: Wed, 21 Mar 2018 11:10:40 -0400

Hi,

Looking to see if there is any progress on this? It seems like there is
still no officially supported package for pg10 on amazon linux.

Thanks,

Payal Singh,
Database Administrator,
OmniTI Computer Consulting Inc.
Phone: 240.646.0770 x 253

---

From: Devrim Gündüz <[email-masked]>
Date: Wed, 21 Mar 2018 23:40:33 +0000

Hi Daniel,

> I forked them. Do you an idea what macros can be used to make amazon-linux

I found this on Google:

%global is_amz %(grep -qi 'Amazon Linux' /etc/system-release && echo 1 || echo 0)

But not sure how you'll detect different Amazon Linux versions, I don't have
access to them. Maybe you can improve the grep part.

Regards,

---

From: Devrim Gündüz <[email-masked]>
Date: Wed, 21 Mar 2018 23:42:27 +0000

Hi,

> still no officially supported package for pg10 on amazon linux.

Unfortunately, no. I'm willing to add macros to the spec files, but there is no
 interest at this point to go further.

Regards,

---

From: Craig Ringer <[email-masked]>
Date: Thu, 22 Mar 2018 11:54:43 +0800

> access to them. Maybe you can improve the grep part.
They haven't added anything to rpmmacros?

rpm --showrc?

If not, that's surely a bug in their distribution. Not that they're always
big on caring about bugs.

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

---

From: Devrim Gündüz <[email-masked]>
Date: Thu, 22 Mar 2018 09:42:16 +0000

Hi,

> big on caring about bugs.

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

Regards,

---

From: Payal Singh <[email-masked]>
Date: Thu, 22 Mar 2018 09:36:07 -0400

>  interest at this point to go further.
Probably out of the scope of this email group, but I'm curious if you or
anyone else might have any advice for people running postgres on amazon
linux? Installation of centOS packages fails with systemd related errors.
Aside from installing from source, is there any alternative if we want to
upgrade to pg10 on amazon linux?

Thanks,

Payal Singh,
Database Administrator,

---

From: Jason Petersen <[email-masked]>
Date: Thu, 22 Mar 2018 12:39:17 -0600

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