Bug 229322

Summary: Review Request: postgresql-pgpool-ha : pgpool-ha uses heartbeat to keep pgpool from being a single point of failure
Product: [Fedora] Fedora Reporter: Devrim GUNDUZ <devrim>
Component: Package ReviewAssignee: Gwyn Ciesla <gwync>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Package Reviews List <fedora-package-review>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: kevin, lxtnow
Target Milestone: ---Flags: gwync: fedora-review+
wtogami: fedora-cvs+
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-10-23 14:38:33 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: 229321    
Bug Blocks:    

Description Devrim GUNDUZ 2007-02-20 10:12:32 UTC
Spec URL: http://developer.postgresql.org/~devrim/rpms/other/pgpool-II/postgresql-pgpool-ha.spec
SRPM URL: 
http://developer.postgresql.org/~devrim/rpms/other/pgpool-II/postgresql-pgpool-ha-1.0.0-2.src.rpm
Description: 
Pgpool-HA combines pgpool with heartbeat. Pgpool is a replication
server of PostgreSQL and makes reliability, but the pgpool server is
always a single point failure.  Pgpool-HA uses heartbeat to eliminate
this.

Comment 1 Gwyn Ciesla 2007-04-18 13:27:59 UTC
ISSUES:
BuildRequires = heartbeat-devel

Build error:
usr/bin/install -c -m 755 pgpool /usr/lib/ocf/resource.d/heartbeat/
/usr/bin/install: cannot create regular file
`/usr/lib/ocf/resource.d/heartbeat/pgpool': Permission denied
make: *** [install] Error 1
error: Bad exit status from /var/tmp/rpm-tmp.4563 (%install)


RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.4563 (%install)


Comment 2 Devrim GUNDUZ 2007-04-18 13:43:58 UTC
Hi,

New spec file:

http://developer.postgresql.org/~devrim/rpms/other/pgpool-II/postgresql-pgpool-ha.spec

New SRPM:
http://developer.postgresql.org/~devrim/rpms/other/pgpool-II/postgresql-pgpool-ha-1.0.0-3.src.rpm

I also removed Vendor tag, and added postgresql-pgpool-II as buildrequires.

Regards, Devrim

Comment 3 Gwyn Ciesla 2007-04-18 13:54:42 UTC
Same build error.  I have the BRs installed.  It's trying to install pgpool to
my actual /usr/lib/ocf/resource.d/heartbeat/, not the one in BuildRoot.

Comment 4 manuel wolfshant 2007-04-20 23:36:10 UTC
1. the date of the newest entry in  %changelog is obviously wrong, since it was
modified 2007-04-18, not Oct 10 2006
2. I fail to understand why is the same file included twice (see
install -m 755 pgpool %{buildroot}%{_sysconfdir}/ha.d/resource.d/heartbeat/pgpool
install -m 755 pgpool %{buildroot}%{_libdir}/ocf/resource.d/heartbeat/)
You could symlink it if you really need it twice
3. Installing files under %{_libdir} prevents the package from being noarch
4. I did not actually test because postgresql-pgpool-II has not yet been pushed,
but from looking at the spec I'd say that the %build step should include a make,
while %install should include a "make install". In the current version of the
spec, the actual build seems to take place in %install.


Comment 5 Gwyn Ciesla 2007-04-27 11:50:21 UTC
Any progress on the build error, or a new SPEC/SRPM addressing #4?

Comment 6 Devrim GUNDUZ 2007-06-02 19:03:54 UTC
New spec:
http://developer.postgresql.org/~devrim/rpms/other/pgpool-ha/postgresql-pgpool-ha.spec

New SRPM:
http://developer.postgresql.org/~devrim/rpms/other/pgpool-ha/postgresql-pgpool-ha-1.0.0-4.src.rpm

Below is the rpmlint errors. I'm inclined to leave them as-is. Thoughts?

E: postgresql-pgpool-ha no-binary
The package should be of the noarch architecture because it doesn't contain
any binaries.

E: postgresql-pgpool-ha only-non-binary-in-usr-lib
There are only non binary files in /usr/lib so they should be in /usr/share.


Comment 7 Gwyn Ciesla 2007-06-04 16:26:23 UTC
Still:

+ make install
/usr/bin/install -c -m 755 pgpool /usr/lib/ocf/resource.d/heartbeat/
/usr/bin/install: cannot create regular file
`/usr/lib/ocf/resource.d/heartbeat/pgpool': Permission denied
make: *** [install] Error 1
error: Bad exit status from /var/tmp/rpm-tmp.60603 (%install)


RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.60603 (%install)

No idea why this is happening.

Comment 8 Devrim GUNDUZ 2007-06-23 22:17:45 UTC
1.1.0 was released:

New spec:
http://developer.postgresql.org/~devrim/rpms/other/pgpool-II/postgresql-pgpool-ha.spec

New SRPM:
http://developer.postgresql.org/~devrim/rpms/other/pgpool-II/postgresql-pgpool-ha-1.1.0-1.fc7.src.rpm

rpmlint error:
E: postgresql-pgpool-ha only-non-binary-in-usr-lib
There are only non binary files in /usr/lib so they should be in /usr/share.

Regards, Devrim


Comment 9 Gwyn Ciesla 2007-07-02 19:01:29 UTC
SPEC provided and spec in SRPM difer:
[limb@fawkes fedora]$ diff postgresql-pgpool-ha.spec
/usr/src/redhat/SPECS/postgresql-pgpool-ha.spec
14d13
< BuildArch:    noarch

Which is right?

Comment 10 Devrim GUNDUZ 2007-07-02 19:09:09 UTC
Hello,

(In reply to comment #9)

> Which is right?

Ouch. BuildArch:      noarch is ok.

Regards, Devrim

Comment 11 Gwyn Ciesla 2007-07-02 19:18:14 UTC
Ok.

But. . .

[limb@fawkes SPECS]$ rpmbuild -ba postgresql-pgpool-ha.spec
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.35249
+ umask 022
+ cd /usr/src/redhat/BUILD
+ LANG=C
+ export LANG
+ unset DISPLAY
+ cd /usr/src/redhat/BUILD
+ rm -rf pgpool-ha-1.1.0
+ /usr/bin/bzip2 -dc /usr/src/redhat/SOURCES/pgpool-ha-1.1.0.tar.bz2
+ tar -xf -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd pgpool-ha-1.1.0
++ /usr/bin/id -u
+ '[' 500 = 0 ']'
++ /usr/bin/id -u
+ '[' 500 = 0 ']'
+ /bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ exit 0
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.35249
+ umask 022
+ cd /usr/src/redhat/BUILD
+ cd pgpool-ha-1.1.0
+ LANG=C
+ export LANG
+ unset DISPLAY
+ CFLAGS='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
-fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic
-fasynchronous-unwind-tables'
+ export CFLAGS
+ CXXFLAGS='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
-fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic
-fasynchronous-unwind-tables'
+ export CXXFLAGS
+ FFLAGS='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
-fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic
-fasynchronous-unwind-tables'
+ export FFLAGS
++ find . -name config.guess -o -name config.sub
+ ./configure --build=i686-redhat-linux-gnu --host=i686-redhat-linux-gnu
--target=noarch-redhat-linux-gnu --program-prefix= --prefix=/usr
--exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc
--datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib
--libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/usr/com
--mandir=/usr/share/man --infodir=/usr/share/info --bindir=/usr/bin
--sysconfdir=/etc --mandir=/usr/share/man --libdir=/usr/lib
checking for a BSD-compatible install... /usr/bin/install -c
checking for /usr/lib/ocf/resource.d/heartbeat... yes
checking for psql... /usr/bin/psql
checking for pgpool... /usr/bin/pgpool
configure: creating ./config.status
config.status: creating src/Makefile
+ make -C src
make: Entering directory `/usr/src/redhat/BUILD/pgpool-ha-1.1.0/src'
sed -e 's#@_PSQL_@#/usr/bin/psql#g' < pgpool.monitor.in | \
        sed -e 's#@_PGPOOL_@#/usr/bin/pgpool#g' > pgpool.monitor
sed -e 's#@_PSQL_@#/usr/bin/psql#g' < pgpool.in | \
        sed -e 's#@_PGPOOL_@#/usr/bin/pgpool#g' > pgpool
make: Leaving directory `/usr/src/redhat/BUILD/pgpool-ha-1.1.0/src'
+ exit 0
Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.52313
+ umask 022
+ cd /usr/src/redhat/BUILD
+ cd pgpool-ha-1.1.0
+ LANG=C
+ export LANG
+ unset DISPLAY
+ rm -rf /var/tmp/postgresql-pgpool-ha-1.1.0-1.fc7-root-limb
+ cd src
+ make install
/usr/bin/install -c -m 755 pgpool /usr/lib/ocf/resource.d/heartbeat/
/usr/bin/install: cannot create regular file
`/usr/lib/ocf/resource.d/heartbeat/pgpool': Permission denied
make: *** [install] Error 1
error: Bad exit status from /var/tmp/rpm-tmp.52313 (%install)


RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.52313 (%install)


Comment 12 Gwyn Ciesla 2007-07-04 17:21:30 UTC
Culprit found.  src/Makefile hard codes the installation paths.  It's a short
makefile, so you can probably skip make install and just install the file manually.

Comment 13 Gwyn Ciesla 2007-07-04 17:35:43 UTC
Yup, commenting out the make install line did it, since you're already
installing the files.  Looks like it includes everything it needs, but you'll
have to check.
rpmlint on SRPM is clean.
rpmlint on the RPM gives
E: postgresql-pgpool-ha only-non-binary-in-usr-lib
There are only non binary files in /usr/lib so they should be in /usr/share.


Comment 15 Gwyn Ciesla 2007-07-04 18:39:25 UTC
rpmlint clean.
package and spec names are good.
meets packaging guidelines.
license good and included.
spec is legible American English.
source md5 matches.
builds on f7 i386.


Comment 16 Devrim GUNDUZ 2007-07-04 18:51:54 UTC
So, approved? ;)

Regards, Devrim

Comment 17 Gwyn Ciesla 2007-07-04 18:56:04 UTC
Soon.  :) Working on a mock build to test BRs and then I'll be AFK until
tomorrow. Sadly my fast dev box is kaput, and I'm using the slow one. And so it
goes.

Comment 18 Gwyn Ciesla 2007-07-04 19:03:11 UTC
BRs are good, built in mock.

Comment 19 Gwyn Ciesla 2007-07-05 13:50:57 UTC
locales ok.
no libs of any kind.
not relocatable.
owns all created directories.
no duplicates.
perms ok.
defattr ok.
clean correct.
sane macros.
code, not content.
no large docs, devel, subpackages or pkc file.
no .la.
not a desktop app.
no conflicts of ownership AFAICS.
install begins by wiping buildroot.
All utk-8 filenames.

APPROVED.


Comment 20 Devrim GUNDUZ 2007-07-05 14:01:40 UTC
New Package CVS Request
=======================
Package Name: pgpool-ha
Short Description: : Pgpool-HA uses heartbeat to keep pgpool from being a single
point of failure
Owners: devrim 
Branches: FC-6 F-7 EL-4 EL-5

Comment 21 Kevin Fenzi 2007-07-05 16:10:10 UTC
One possible issue here... you are installing into /usr/share/ocf, but I had to
move the heartbeat files off to /usr/%{_libdir}/ because it turns out the
heartbeat ocf files are arch dependent. ;( 

Not sure if it will still look in /usr/share/ocf for other ocf files or not. 
Any ideas?

Comment 22 Gwyn Ciesla 2007-07-05 16:16:50 UTC
I see.  I erroneously assumed non-binary==noarch.  I'm not experienced enough
with heartbeat to answer with any certainty.  Good catch.

Devrim?

Comment 23 Devrim GUNDUZ 2007-07-05 19:02:59 UTC
(Ouch... Fixing package name)

New Package CVS Request
=======================
Package Name: postgresql-pgpool-ha
Short Description: : Pgpool-HA uses heartbeat to keep pgpool from being a single
point of failure
Owners: devrim 
Branches: FC-6 F-7 EL-4 EL-5



Comment 24 Kevin Fenzi 2007-07-05 20:33:02 UTC
Devrim: Any thoughts on comment #21? 

I have talked with upstream and I think things might be fixed up for the
upcoming release, but not sure...

Comment 26 Kevin Fenzi 2007-07-06 00:46:22 UTC
Humm... will that work with this package being noarch? 

So, if this noarch package builds on x86_64 host, lib64 will be used, no matter
where it is installed. Not sure if there is any way to install the ocf file in a
arch specific location when the package is noarch. Again, heartbeat might still
look in /usr/share/ocf, but I am not sure. Can you confirm? 

Comment 27 Kevin Fenzi 2007-07-06 19:09:47 UTC
Yeah, I am sure this isn't going to work as a noarch package unless heartbeat
looks in libdir _and_ /usr/share/ocf, which it doesn't look like is the case. ;( 

So, two options: 

- Make this package arch 
- Wait and see if the heartbeat fixes upstream will make things ok to move back
to datadir for ocf files. 

(I'm going to unset the cvs flag for now while we figure this out...)

Comment 28 Gwyn Ciesla 2007-07-06 19:14:52 UTC
I vote make it arch.

Comment 30 Gwyn Ciesla 2007-07-09 10:12:24 UTC
Specs differ:
[limb@fawkes fedora]$ diff postgresql-pgpool-ha.spec
/usr/src/redhat/SPECS/postgresql-pgpool-ha.spec
4c4
< Name:         postgresql-%{short_name}
---
> Name:         postgresql-pgpool-ha
6c6
< Release:      4%{?dist}
---
> Release:      2%{?dist}
13a14
> BuildArch:    noarch
49,55d49
< * Mon Jul 9 2007 Devrim GUNDUZ <devrim> 1.1.0-4
< - Made package arch, per bz review.
< - Move ocf path back to datadir/ocf/resource.d .
<
< * Thu Jul 5 2007 Devrim GUNDUZ <devrim> 1.1.0-3
< - Fix ocf path
<

Using URLd spec builds fine, and rpmlint only complains about noarch, which is
fine, so I re-affirm my approval.


Comment 31 Devrim GUNDUZ 2007-07-09 10:18:33 UTC
Hi,

(In reply to comment #30)
> Specs differ:

Maybe you hit your browser's cache? It looks ok to me. Anyway, it's not that
important.

> Using URLd spec builds fine, and rpmlint only complains about noarch, which is
> fine, so I re-affirm my approval.

Thanks.

Regards, Devrim 



Comment 32 Devrim GUNDUZ 2007-07-09 10:20:17 UTC
New Package CVS Request
=======================
Package Name: postgresql-pgpool-ha
Short Description: : Pgpool-HA uses heartbeat to keep pgpool from being a single
point of failure
Owners: devrim 
Branches: FC-6 F-7 EL-4 EL-5

Comment 33 Gwyn Ciesla 2007-10-23 14:38:33 UTC
Built, closing.