Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1ez57b-0003Iy-K3 for pgsql-pkg-yum@arkaria.postgresql.org; Thu, 22 Mar 2018 18:39:31 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ez57a-0001sU-AF for pgsql-pkg-yum@arkaria.postgresql.org; Thu, 22 Mar 2018 18:39:30 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1ez57a-0001sK-3G for pgsql-pkg-yum@lists.postgresql.org; Thu, 22 Mar 2018 18:39:30 +0000 Received: from mail-io0-x22f.google.com ([2607:f8b0:4001:c06::22f]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ez57S-0006wt-I9 for pgsql-pkg-yum@postgresql.org; Thu, 22 Mar 2018 18:39:29 +0000 Received: by mail-io0-x22f.google.com with SMTP id y128so12182417iod.4 for ; Thu, 22 Mar 2018 11:39:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=citusdata.com; s=google; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=2pTWMTsgGDQMmshoClfhMuCYiPjysukHKVQoSV25GnM=; b=GQaZ8FbCy1bVysaAVqdBMOvtNkTmrZ3ZkNT0skTQcnZ6UsA1pQ2oMzcp7W+b5uUHAW 3rk7bEZaNAJHah5Rd9f8WHr9eGqadB3xFdieFXnZET9wA4ooJ4Ki/zGx4slVQsqmFkp1 9Df3IUBZg6fdyQJKQDEIt3MLBPEzDGYcYDJko= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=2pTWMTsgGDQMmshoClfhMuCYiPjysukHKVQoSV25GnM=; b=SqTBVgoIZGma5Lh2s0sVwix4ZP5mX/ApBbEs1brIOOYP8Gs/AV2IijLKX8XvgHu6QP LlLIoIIoWFq/pO4CPROmVjRpNkWLci+YJLhgQIufY7coQVRN3xOQF8GZ58EcYs5CJUxU v1Gyb527pcC/0NGaSVrBlpSeF+gbwQwz1F4DzFiPbHvydfMY5IyxOU7WoltLcUsu4xx1 Kk9vW+2AtxMuXPUuLPLHvevSvch7GsWjSzpaTZD0OWkkqX+/iK0HdD/o/vzuE/4FwqDI l7cSCzQaKka+eKXMdCsN8ype08/+1Rrtu9bukvEFDli/wxjdwXokOUhX2OXrl+U2fkQV Y77g== X-Gm-Message-State: AElRT7Ez+nEy0nGE4DdTf9tVP/sZj0NVsGqjQ2LVTTmIHu4M99bPdVQd TkTPCgoCvlB25tKSjU2aSp0QFbKW51U= X-Google-Smtp-Source: AIpwx495oRYM4xolg9jsFXtaPuTVOgL+49GcoGW/lpeWY/eTBRnaSQJzRgx9qM3Bmc1uW33/IUJv+g== X-Received: by 10.107.168.75 with SMTP id r72mr5396552ioe.16.1521743960264; Thu, 22 Mar 2018 11:39:20 -0700 (PDT) Received: from [192.168.1.253] (c-73-34-52-237.hsd1.co.comcast.net. [73.34.52.237]) by smtp.gmail.com with ESMTPSA id s4-v6sm5314632ita.36.2018.03.22.11.39.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 Mar 2018 11:39:18 -0700 (PDT) From: Jason Petersen Message-Id: Content-Type: multipart/signed; boundary="Apple-Mail=_87417A36-E962-4201-8F60-91383497C903"; protocol="application/pgp-signature"; micalg=pgp-sha512 Mime-Version: 1.0 (Mac OS X Mail 11.2 \(3445.5.20\)) Subject: Re: [pgsql-pkg-yum] Amazon Linux PGDG Repo? Date: Thu, 22 Mar 2018 12:39:17 -0600 In-Reply-To: <1521711736.3121.117.camel@gunduz.org> Cc: Craig Ringer , Daniel Farina , pgsql-pkg-yum To: =?utf-8?B?RGV2cmltIEfDvG5kw7x6?= References: <2BB723C7-A28E-4D97-9270-B71F0BEEE338@citusdata.com> <1507572079.26403.34.camel@gunduz.org> <1507637755.26403.49.camel@gunduz.org> <1521675633.3121.81.camel@gunduz.org> <1521711736.3121.117.camel@gunduz.org> X-Mailer: Apple Mail (2.3445.5.20) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --Apple-Mail=_87417A36-E962-4201-8F60-91383497C903 Content-Type: multipart/alternative; boundary="Apple-Mail=_F006CE6D-89E0-491B-A17C-C6463F11C17B" --Apple-Mail=_F006CE6D-89E0-491B-A17C-C6463F11C17B Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Mar 22, 2018, at 3:42 AM, Devrim G=C3=BCnd=C3=BCz = wrote: >=20 > 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=E2=80=99t really understand the above? Or I guess = you meant temporarily? I emailed with Daniel about it a while back, here=E2=80=99s a snippet. = Spoiler: there are macros=E2=80=A6 > Begin forwarded message: >=20 > From: Jason Petersen > Subject: Re: [pgsql-pkg-yum] Amazon Linux PGDG Repo? > Date: October 11, 2017 at 11:30:26 AM MDT >=20 > [=E2=80=A6] >=20 >> On Oct 10, 2017, at 5:18 PM, Daniel Farina > wrote: >>=20 >> 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. >=20 > I started out doing that, then I got more curious where %rhel was = defined and why it wasn=E2=80=99t defined in Amazon Linux. This led me = to /etc/rpm/macros.disttag, which on Amazon Linux has this: >=20 > # dist macros >=20 > %amzn 1 > %dist .amzn1 > %amzn1 1 >=20 > Based on that I was able to add if statements to, for instance, = include the python27-devel package (on RHEL it=E2=80=99s just = python-devel, so RHEL logic wasn=E2=80=99t directly applicable). Where I = didn=E2=80=99t know the =E2=80=9Cright=E2=80=9D answer, I just defaulted = to adding conditionals to have amzn behave identically to RHEL 6 (no = systemd, no Python 3, etc.) >=20 > With that I got a package build going of all the postgresql packages = (libpq, contrib, etc. all included). If this is =E2=80=9Cstandard=E2=80=9D= enough we [could] probably [=E2=80=A6 add these conditionals =E2=80=A6] = 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=E2=80=A6= -- Jason Petersen Software Engineer | Citus Data 303.736.9255 jason@citusdata.com --Apple-Mail=_F006CE6D-89E0-491B-A17C-C6463F11C17B Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8
On = Mar 22, 2018, at 3:42 AM, Devrim G=C3=BCnd=C3=BCz <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=E2=80=99t really = understand the above? Or I guess you meant temporarily?

I emailed with Daniel = about it a while back, here=E2=80=99s a snippet. Spoiler: there are = macros=E2=80=A6

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

[=E2=80=A6]

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=E2=80=99t 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=E2=80=99= s just python-devel, so RHEL logic wasn=E2=80=99t = directly applicable). Where I didn=E2=80=99t know the =E2=80=9Cright=E2=80= =9D 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 =E2=80=9Cstandard=E2=80=9D enough we [could] = probably [=E2=80=A6 add these conditionals =E2=80=A6] 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=E2=80=A6

--
Jason = Petersen
Software = Engineer | Citus Data
303.736.9255

= --Apple-Mail=_F006CE6D-89E0-491B-A17C-C6463F11C17B-- --Apple-Mail=_87417A36-E962-4201-8F60-91383497C903 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEES2fqzcKg5RjATLlynx01ENEQq6kFAlqz+FUACgkQnx01ENEQ q6nHnggAgnUl+fy8opbQSGg5OAaDwO+yhgYNXi1x6FBBB159xgJxeBmFJ2rSuJRO xQ0KIYjrKSgt7nCD89EXvCuAJxUFzhj9xrI/tr1fmxgAj1LaruLTt+hvRtiz4L2Q zvSQQBVAe7TbjszpKhan/WQUDo7sdoF74ia0pKD+iKcNmaHH9NC/0G3NlDEUmZFe 6EEMkWntzovHImQVxNzy90HWj4NOq5gCprMH2c4aCOu6mgP0g/7p2Z6DQ8gv2U1Y i1bseHaHfx2N7qQ+IIQ7hAO6yE/k5rq7qB1C1wSUmUQUb/DQ2RB87tJrr+FOia3a kLPtnfjhBEonFt8B4u5+cqlgqYrmVA== =KWtF -----END PGP SIGNATURE----- --Apple-Mail=_87417A36-E962-4201-8F60-91383497C903--