Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1aLkIa-0000h9-PB for pgsql-pkg-yum@arkaria.postgresql.org; Wed, 20 Jan 2016 04:23:12 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1aLkIa-0004ea-Av for pgsql-pkg-yum@arkaria.postgresql.org; Wed, 20 Jan 2016 04:23:12 +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.84) (envelope-from ) id 1aLkIW-0004bI-3q for pgsql-pkg-yum@postgresql.org; Wed, 20 Jan 2016 04:23:08 +0000 Received: from mail-lf0-x232.google.com ([2a00:1450:4010:c07::232]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1aLkIN-0000Sf-VZ for pgsql-pkg-yum@postgresql.org; Wed, 20 Jan 2016 04:23:07 +0000 Received: by mail-lf0-x232.google.com with SMTP id m198so204476331lfm.0 for ; Tue, 19 Jan 2016 20:22:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=JFU0jQtUcTM+WMvxgj0a+hQRKWI89fNv80C3HaMLAxc=; b=U/Z0sCg/HMdIQWLs106hHHKBUQzViDupK4mC/Is1Jfp4dd+YYC1aY16vzvXqHN4J22 pjOS5BR1klWK6A8ihywuX18hq9Ov3fIPU9eeB3odtIcsGCwr8LE3qo0Q5Pxv5qO3GS3f ad2Zx+eUvUm26bvyzmYV35qrlgrqhuAIrkB7j+mbgKeltKkXg8nM29AZzVa/dy7l1829 SA0rx82KQmqAcFftnFeo5DjHrpOMYT8K4Sw3zcDAb0rcOb68j2LhZAz2GgeWu9OkQXOK iNK3cxtEDYzZcmmFwU8jw429JDCy/UfO3cwr/hxP6g24rPNoRXLa2kTauBwzKtK+GitG fDBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=JFU0jQtUcTM+WMvxgj0a+hQRKWI89fNv80C3HaMLAxc=; b=DWpF2BNYAQ8KLwFLt7Ips2ibi7nfVaJfippp3a94ol1dEkuYj5R10b09Lb1nZgh4ub lUrq5ZASta65kJQZ3BCAACTm6WPfzklXr0EyPUazBgRE4r+APFK1gTA9H5HM8RShDiO4 DQjIBS76Ru6y9W9TTv3qg+Rjqd5oY8EoZCk3ZcJX0kte9SPE5VaE0hSV7hgtbo6ccHRf c38SzoUiDTOtThjsoi3iPwkb1FiPKNs5cABtA7Q4d48PKvAij7sqQ6MM8qdvh8Bal45V 6Z7HwRsUKGFh6v+XYGtxJ7vSA005kziga7+KkihEwv2e/WvyiCaoD5xVh28J4jiluIY2 7jqQ== X-Gm-Message-State: ALoCoQkneuMo2rrgCG/cNSSZB8UNIu/vIfWXMzCtDvMLo2zUOAs5jN2SxbWq31H1jPq/ugyl/09DP88f3DJ/7yoZ1jS4yGg/vJVd9+eJk3LpjM+CTD9b87Y= MIME-Version: 1.0 X-Received: by 10.25.18.89 with SMTP id h86mr9943236lfi.165.1453263777872; Tue, 19 Jan 2016 20:22:57 -0800 (PST) Received: by 10.114.1.7 with HTTP; Tue, 19 Jan 2016 20:22:57 -0800 (PST) In-Reply-To: References: <1453239881.24314.362.camel@gunduz.org> Date: Wed, 20 Jan 2016 12:22:57 +0800 Message-ID: Subject: Re: New and unified 9.5 spec file is in git From: Craig Ringer To: =?UTF-8?B?RGV2cmltIEfDnE5Ew5xa?= Cc: pgsql-pkg-yum Content-Type: multipart/alternative; boundary=001a113fb96a3edeb90529bc57bf X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-pkg-yum Precedence: bulk Sender: pgsql-pkg-yum-owner@postgresql.org --001a113fb96a3edeb90529bc57bf Content-Type: text/plain; charset=UTF-8 I've uploaded a branch with a couple of small improvements. See https://github.com/2ndQuadrant/pgdg-pgrpms . git remote add 2ndq https://github.com/2ndQuadrant/pgdg-pgrpms.git git fetch 2ndq # view it git log -p remotes/2ndq/add-builddepends # merge it git merge remotes/2ndq/add-builddepends This is the main patch of interest: https://github.com/2ndQuadrant/pgdg-pgrpms/commit/60524156129b27b9cf3836621a0d05afb658d60e A further suggested improvement, which I haven't put in that tree but wanted to flag as an idea - detect the target based on the directory name so there's no need to have a different Makefile for each target dir and they can all just be symlinks. For each dist's Makefile: -DIST=.rhel5 SPECFILE="postgresql-9.5.spec" +# This gibberish gets the immediate parent directory's name, prepends RPMDIST_ +# and looks it up as a Make variable lazily on first evaluation. That way we +# don't require a new Makefile for each build directory. +# +# The RPMDIST_ vars are defined in Makefile.global +# +DIST=$(RPMDIST_$(shell basename $(dir $(abspath $(lastword $(MAKEFILE_LIST)))))) then in Makefile.global: +# These mappings could be automated with $(foreach ...) and $(eval ...) +# but there hardly seems any point. +RPMDIST_EL-5=.rhel5 +RPMDIST_EL-6=.rhel6 +RPMDIST_EL-7=.rhel7 +RPMDIST_F-21=.fc21 +RPMDIST_F-22=.fc22 +RPMDIST_F-23=.fc23 Then EL-5, EL-6, EL-7, F-22 and F-23 can be deleted and replaced with common/ which is symlinks to each of them. That shouldn't upset the build system; otherwise I'd suggest switching moving all files up a level, removing the dist subtrees, and using "make DIST=EL-5" or whatever to control the target. Less duplication in the source tree, no need to remember to copy files around, easier to track history. --001a113fb96a3edeb90529bc57bf Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
I've uploaded a branch with a couple of small imp= rovements. See=C2=A0= https://github.com/2ndQuadrant/pgdg-pgrpms .

git fe= tch 2ndq
# view it
git log -p remotes/2ndq/add-builddep= ends
# merge it
git merge=C2=A0remotes/2ndq/add-buildde= pends

This is the main patch of interest:

<= div>



A further suggested improve= ment, which I haven't put in that tree but wanted to flag as an idea - = detect the target based on the directory name so there's no need to hav= e a different Makefile for each target dir and they can all just be symlink= s.

For each dist's Makefile:

-DIST=3D.rhel5
=C2=A0SPECFILE=3D"postgresql-9.5.spec&= quot;
+# This gibberish gets the immediate parent directory's= name, prepends RPMDIST_
+# and looks it up as a Make variable la= zily on first evaluation. That way we
+# don't require a new = Makefile for each build directory.
+#
+# The RPMDIST_ v= ars are defined in Makefile.global
+#
+DIST=3D$(RPMDIST= _$(shell basename $(dir $(abspath $(lastword $(MAKEFILE_LIST))))))

then in Makefile.global:

+# These mappings could be automated with $(foreach ...) and $(eval ...)=
+# but there hardly seems any point.
+RPMDIST_EL-5=3D.= rhel5
+RPMDIST_EL-6=3D.rhel6
+RPMDIST_EL-7=3D.rhel7
+RPMDIST_F-21=3D.fc21
+RPMDIST_F-22=3D.fc22
+RPM= DIST_F-23=3D.fc23

Then EL-5, EL-6, EL-7, F-2= 2 and F-23 can be deleted and replaced with common/ which is symlinks to ea= ch of them. That shouldn't upset the build system; otherwise I'd su= ggest switching moving all files up a level, removing the dist subtrees, an= d using "make DIST=3DEL-5" or whatever to control the target.

Less duplication in the source tree, no need to remem= ber to copy files around, easier to track history.
--001a113fb96a3edeb90529bc57bf--