Subject: Amazon Linux RPM Changes

From: Jason Petersen <[email-masked]>
Date: Thu, 6 Oct 2016 14:00:29 -0600

We install PGDG as part of a CloudFormation template we offer to construct and configure a cluster on EC2. The template included installation of the pgdg-ami201503-95-9.5-2.noarch.rpm package directly from a PGDG URL.

Unfortunately, this package was removed, causing deployment issues for users of our template. While I understand replacing it with the -3 variant (which uses HTTPS URLs), I don’t understand why older versions were removed. In every other Red Hat OS, they remain; seemingly only the Amazon Linux variants were removed.

Why were the older Amazon repo RPMs removed, and what is the policy going forward on their removal?

Solution?

I noticed one of the OSes has a -latest.rpm variant. If this could be provided for all OSes, it makes installation much simpler (it could be implemented by a symlink). We’ve had to write our own scripts (here <https://github.com/citusdata/packaging/blob/b5c005ad507d30ff419908f66a47b466623df48d/update_dockerfiles#L20-L35> and here <https://github.com/citusdata/packaging/blob/0c70a0b65122b2afae9dc30cc6b13ad9ce9490cd/community/rpm.sh#L107-L146>) to ensure we have the “right” version for a given Red Hat OS. Being able to append -latest.rpm to all URLs would be a fantastic improvement and let us remove this knowledge from our codebase.

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

---

From: Devrim Gündüz <[email-masked]>
Date: Fri, 07 Oct 2016 00:21:15 +0300

Hi Jason,

On Thu, 2016-10-06 at 14:00 -0600, Jason Petersen wrote:
> We install PGDG as part of a CloudFormation template we offer to construct
> and configure a cluster on EC2. The template included installation of the
> pgdg-ami201503-95-9.5-2.noarch.rpm package directly from a PGDG URL.
> 
> Unfortunately, this package was removed, causing deployment issues for users
> of our template. While I understand replacing it with the -3 variant (which
> uses HTTPS URLs), I don’t understand why older versions were removed. In
> every other Red Hat OS, they remain; seemingly only the Amazon Linux variants
> were removed.

Apologies, and sorry for the inconvenience. That was not supposed to happen. We
don't have any archives, so cannot see what went wrong :-( If that is the only
broken package, I will be more than happy to provide -2.noarch using the same
spec.

> Why were the older Amazon repo RPMs removed,

Again, probably a part of a manual cleanup that I did :(

>  and what is the policy going forward on their removal?

n-2 release, but please note that repo RPMs change *very* rarely under normal
circumstances: For example, I don't expect any change in next few years, to be
honest, unless postgresql.org infrastructure changes, so I'd rely on the very
latest RPM, but:

> Solution?
> 
> I noticed one of the OSes has a -latest.rpm variant.

Well, that was a part of a longer term plan, like an installer, but I failed to
complete, because: (See below)

>  If this could be provided for all OSes, it makes installation much simpler
> (it could be implemented by a symlink). We’ve had to write our own scripts
> (here
> <https://github.com/citusdata/packaging/blob/b5c005ad507d30ff419908f66a47b466
> 623df48d/update_dockerfiles#L20-L35> and here
> <https://github.com/citusdata/packaging/blob/0c70a0b65122b2afae9dc30cc6b13ad9
> ce9490cd/community/rpm.sh#L107-L146>) to ensure we have the “right” version
> for a given Red Hat OS. Being able to append -latest.rpm to all URLs would be
> a fantastic improvement and let us remove this knowledge from our codebase.

I picked up a different route:

https://git.postgresql.org/gitweb/?p=pgrpms.git;a=blob;f=scripts/InstallPGDGRepoRPM.sh

Instead of trying to find the latest, and given that I don't plan to change
repo files in foreseeable future, within the script, I created a temp repo
which would download and install the repo RPM. See 

https://git.postgresql.org/gitweb/?p=pgrpms.git;a=blob;f=scripts/InstallPGDGRepoRPM.sh#l102

as an example.

For the -latest thing: I am open to any scripting ideas in here.

Regards,

-- 
Devrim GÜNDÜZ
EnterpriseDB: http://www.enterprisedb.com
PostgreSQL Danışmanı/Consultant, Red Hat Certified Engineer
Twitter: @DevrimGunduz , @DevrimGunduzTR