De-duplicating the tree - Mailing list pgsql-pkg-yum

From Craig Ringer
Subject De-duplicating the tree
Date
Msg-id CAMsr+YG4TFORntLkzYSwEXgq-fPScOeyV+=4v7EfuNocwGovtA@mail.gmail.com
Whole thread Raw
Responses Re: De-duplicating the tree  (Craig Ringer <craig@2ndquadrant.com>)
Re: De-duplicating the tree  (Devrim GÜNDÜZ <devrim@gunduz.org>)
List pgsql-pkg-yum
Hi all

Now that more and more packages share spec files and often more across the different OS versions, if not (yet) across Pg versions, I think it's worth looking at how to reduce the manual copy&paste involved in doing simple updates. It's error prone and tedious, and it shouldn't really be necessary.

Since I presume the build scripts etc are pretty heavily reliant on the current tree structure and there's a lot of legacy that might still need rebuilding one day, I'd like to symlink everything shared so that the build system doesn't get upset. I've checked that mock won't be upset, you just pass --symlink-dereference when building the srpm. If symlinks upset whatever the build scripts are used for the main repo tree it should be pretty trivial to tweak them to make them follow symlinks.

I'm thinking of starting with moving specs etc into per-version common/ dirs, like

rpm/redhat/9.5/repmgr/EL-6/repmgr.spec 
=> rpm/redhat/9.5/repmgr/common/repmgr.spec
 
That'll bring the number of changes needed for many packages from 20+ down to 3-5 for a common update.

I'll prep a branch for, say, repmgr showing how it'd look so you can test your build scripts.

--
 Craig Ringer                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services

pgsql-pkg-yum by date:

Previous
From: John Harvey
Date:
Subject: Re: Push branch / submit Pull Request
Next
From: Craig Ringer
Date:
Subject: Re: De-duplicating the tree