Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 5 product line. The current stable release is 5.10. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 546464

Summary: Review Request: postgresql84 - Updated version of PostgreSQL database
Product: Red Hat Enterprise Linux 5 Reporter: Tom Lane <tgl>
Component: Package ReviewAssignee: Bill Nottingham <notting>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 5.5CC: hhorak, notting, pm-rhel, rvokal, syeghiay
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-12-19 19:19:50 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 188273, 489479    

Description Tom Lane 2009-12-10 22:52:29 UTC
Spec URL: http://tgl.fedorapeople.org/postgresql84.spec
SRPM URL: http://tgl.fedorapeople.org/postgresql84-8.4.2-1.el6.src.rpm
Description: This is an updated version of postgresql, which we already ship a rather old version of (8.1) in RHEL5.  Because of both on-disk-format and application-level compatibility issues, it seems unwise to replace the existing package; rather this is intended to be installed as an alternative.  There are Conflicts: declarations in the spec to prevent installing both at once, except for the base postgresql-libs packages, which can be installed in parallel.

This package is a very minor cleanup of what we currently ship in Fedora.  One point that will undoubtedly come up in the review is the fact that the SRPM contains multiple upstream tarballs.  This is a historical issue (PyGreSQL and pgtcl used to be part of the postgresql distribution and were split off).  I have attempted to split the package in Fedora, but that effort is stuck in review limbo...

Comment 1 Bill Nottingham 2009-12-18 17:12:43 UTC
Comparing to the Fedora spec:

@@ -587,7 +591,7 @@
 
 %pre server
 groupadd -g 26 -o -r postgres >/dev/null 2>&1 || :
-useradd -M -N -g postgres -o -r -d /var/lib/pgsql -s /bin/bash \
+useradd -M -n -g postgres -o -r -d /var/lib/pgsql -s /bin/bash \
        -c "PostgreSQL Server" -u 26 postgres >/dev/null 2>&1 || :
 
 %post server

That looks like a typo. Pretty sure you still want -N.

More full review:
- Package meets naming and packaging guidelines - OK
- Spec file matches base package name. - OK, for what this does.
- Spec has consistant macro usage. - OK
- Meets Packaging Guidelines. - OK
- License - OK
- License field in spec matches - OK
- License file included in package - OK
- Spec in American English - OK
- Spec is legible.  - OK
- Sources match upstream md5sum:

MD5 (postgresql-8.4.2.tar.bz2) = d738227e2f1f742d2f2d4ab56496c5c6

OK

- Package needs ExcludeArch - OK
- BuildRequires correct - look good
- Spec handles locales/find_lang - OK
- Package has %defattr and permissions on files is good. - OK
- Package has a correct %clean section. -OK 
- Package has correct buildroot  - good enough
- Package is code or permissible content. - OK
- Doc subpackage needed/used. - OK
- Packages %doc files don't affect runtime. - OK
 
- Headers/static libs in -devel subpackage. - OK
- Spec has needed ldconfig in post and postun  - OK
- .pc files in -devel subpackage/requires pkgconfig - N/A
- .so files in -devel subpackage. - OK
- -devel package Requires: %{name} = %{version}-%{release}  - OK
- .la files are removed. - OK
 

- Package compiles and builds on at least one arch. - didn't test
- Package has no duplicate files in %files. - OK
- Package doesn't own any directories other packages own. - OK
- Package owns all the directories it creates. - OK
- No rpmlint output. - didn't check
- final provides and requires are sane:

One big thing: you have Conflicts in the main and server packages.
It looks like all the other subpackages (-docs, -devel, -pl*, -python, etc.) will also conflict, and need an explicit conflicts.

Comment 2 Tom Lane 2009-12-18 17:37:35 UTC
Yeah, the -N is something I just fixed in the Fedora version a couple days ago --- will copy that into the RHEL version of course.  As for the Conflicts, I wasn't sure how far I really needed to go with that: most of the subpackages have explicit versioned dependencies on either the base or server package, so there would be an indirect conflict anyway.  Should I go for the verbose form or keep the number of Conflicts declarations to a minimum?

Comment 3 Bill Nottingham 2009-12-18 17:48:23 UTC
Being verbose can't hurt.

You may also want the main and the server package to 'Provide: postgresql = %{version}-%{release}', to satisfy packages that have a raw dependency on them.
The libraries should be covered by soname deps, and having -devel provide postgresql-devel could have problems in the build system.

Comment 4 Tom Lane 2009-12-18 18:24:43 UTC
Hmm, can I do that without getting RPM confused?  It sounds like the package would conflict with itself.  I'm happy to do that if it'll work.

Comment 5 Bill Nottingham 2009-12-18 18:29:20 UTC
If it's:

Conflicts: postgresql < 8.4
Provides: postgresql = 8.4

it won't be an issue.

Comment 6 Tom Lane 2009-12-18 19:14:03 UTC
Ah, got it.  New specfile and SRPM at http://tgl.fedorapeople.org/

Comment 7 Bill Nottingham 2009-12-18 19:29:55 UTC
Looks good to me.

Comment 8 Tom Lane 2009-12-19 19:19:50 UTC
Got it built after some further fooling with BuildRequires and such --- the settings for Fedora don't work anymore in RHEL5 :-(