Unifying the spec files?
От | Craig Ringer |
---|---|
Тема | Unifying the spec files? |
Дата | |
Msg-id | 53D6FD0C.5080903@2ndquadrant.com обсуждение исходный текст |
Ответы |
Re: Unifying the spec files?
|
Список | pgsql-pkg-yum |
Hi While looking over the spec files for the releases I noticed that the _vast_ majority of content is the same for each spec. Where differences exist it isn't always clear why. For example, EL-7 seems to generate an init script differently to EL-6, and the EL-7 packages have postgres_fdw and sepgsql but EL-6 doesn't. I'm a little curious about why the spec files seem to be copied and edited, rather than having a single spec for the package across all supported versions and using conditionals. I'm sure you've thought of that, so there'll be good reasons - did you try this and run into issues? As I'm facing the need to do multi-distro patch releases (hotfixes, basically) where I'll need to rapidly produce new RPMs for each supported distro, these differences are not fun to deal with, so if there's a way to use a single spec file and just use conditionals I'd be pretty happy. e.g. SuSE defines a %{suse_version} macro, RHEL defines %{rhel} for the RHEL release, %{fedora} for the fedora release. rpmbuild --showrc will report defined macros. If used for builds, mock will define appropriate macros either in the chroot or by calling rpmbuild. If I prep a unified spec for postgresql would you be willing to review and give it a go? Useful info: http://rpm5.org/docs/rpm-guide.html#id3039571 http://en.opensuse.org/openSUSE:RPM_conditional_builds http://fedoraproject.org/wiki/Packaging:DistTag https://fedoraproject.org/wiki/Packaging:RPMMacros?rd=Packaging/RPMMacros http://backreference.org/2011/09/17/some-tips-on-rpm-conditional-macros/ -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services
В списке pgsql-pkg-yum по дате отправления: