Re: New and unified 9.5 spec file is in git

Поиск
Список
Период
Сортировка
От Craig Ringer
Тема Re: New and unified 9.5 spec file is in git
Дата
Msg-id CAMsr+YHbLPO4XthDTmpWrNpJJZ8LN=eh8OiR7WOn6uPr=GbvpQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: New and unified 9.5 spec file is in git  (Craig Ringer <craig@2ndquadrant.com>)
Ответы Re: New and unified 9.5 spec file is in git  (Devrim GÜNDÜZ <devrim@gunduz.org>)
Список pgsql-pkg-yum
I've uploaded a branch with a couple of small improvements. See https://github.com/2ndQuadrant/pgdg-pgrpms .

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:





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.

В списке pgsql-pkg-yum по дате отправления:

Предыдущее
От: Craig Ringer
Дата:
Сообщение: Re: New and unified 9.5 spec file is in git
Следующее
От: Jeff Frost
Дата:
Сообщение: Re: New and unified 9.5 spec file is in git