public inbox for [email protected]  
help / color / mirror / Atom feed
From: Craig Ringer <[email protected]>
To: Devrim GÜNDÜZ <[email protected]>
Cc: pgsql-pkg-yum <[email protected]>
Subject: Re: New and unified 9.5 spec file is in git
Date: Wed, 20 Jan 2016 12:22:57 +0800
Message-ID: <CAMsr+YHbLPO4XthDTmpWrNpJJZ8LN=eh8OiR7WOn6uPr=GbvpQ@mail.gmail.com> (raw)
In-Reply-To: <CAMsr+YFNvjv1NDwuFqBvvg9SV4h1Y-CFVTwaLM4MJ5FHFg3o5w@mail.gmail.com>
References: <[email protected]>
	<CAMsr+YFqaX7shapoLRJ2S7QD1vst9ENrOtGU-_OD18Z=vpoHTA@mail.gmail.com>
	<CAMsr+YFNvjv1NDwuFqBvvg9SV4h1Y-CFVTwaLM4MJ5FHFg3o5w@mail.gmail.com>
List-Unsubscribe: <mailto:[email protected]?body=unsub%20pgsql-pkg-yum>

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.


view thread (11+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: New and unified 9.5 spec file is in git
  In-Reply-To: <CAMsr+YHbLPO4XthDTmpWrNpJJZ8LN=eh8OiR7WOn6uPr=GbvpQ@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox