Bug 68 - MAKE RPM doesn't work (slony 2.0.0)
Summary: MAKE RPM doesn't work (slony 2.0.0)
Status: RESOLVED FIXED
Alias: None
Product: Slony-I
Classification: Unclassified
Component: rpm (show other bugs)
Version: devel
Hardware: PC Windows
: high major
Assignee: Slony Bugs List
URL:
Depends on:
Blocks:
 
Reported: 2008-12-16 07:53 UTC by Andrew O'Connell
Modified: 2009-01-26 09:00 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew O'Connell 2008-12-16 07:53:34 UTC
Hi, the rpm build process doesn't work properly, I can kinda see what's wrong (I think) but have don't know how to fix it :

I'm running on a centos 5 box, the same thing happens on my Centos 4 box as well..


I submitted anther bug due to the spec file attacking the wrong tar file earlier this month :)


At the end of ./configure --with-pgconfigdir=/usr/bin/pg_config && make rpm

I get

Processing files: slony1-2.0.0-1_PG8.3.0
Executing(%doc): /bin/sh -e /var/tmp/rpm-tmp.59017
+ umask 022
+ cd /usr/src/redhat/BUILD
+ cd slony1-2.0.0
+ DOCDIR=/var/tmp/slony1-2.0.0-1_PG8.3.0-root-root/usr/share/doc/slony1-2.0.0
+ export DOCDIR
+ rm -rf /var/tmp/slony1-2.0.0-1_PG8.3.0-root-root/usr/share/doc/slony1-2.0.0
+ /bin/mkdir -p /var/tmp/slony1-2.0.0-1_PG8.3.0-root-root/usr/share/doc/slony1-2.0.0
+ cp -pr COPYRIGHT UPGRADING HISTORY-1.1 INSTALL SAMPLE RELEASE-2.0 /var/tmp/slony1-2.0.0-1_PG8.3.0-root-root/usr/share/doc/slony1-2.0.0
+ exit 0
Provides: config(slony1) = 2.0.0-1_PG8.3.0 slony1_funcs.so
Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1
Requires: /bin/bash /bin/sh /etc/slon_tools.conf /usr/bin/perl /usr/bin/sh /usr/lib/pgsql/slon-tools.pm config(slony1) = 2.0.0-1_PG8.3.0 libc.so.6 libc.so.6(GLIBC_2.0) libc.so.6(GLIBC_2.1) libc.so.6(GLIBC_2.1.2) libc.so.6(GLIBC_2.1.3) libc.so.6(GLIBC_2.2) libc.so.6(GLIBC_2.3) libc.so.6(GLIBC_2.3.3) libc.so.6(GLIBC_2.3.4) libc.so.6(GLIBC_2.4) libpq.so.5 libpthread.so.0 libpthread.so.0(GLIBC_2.0) libpthread.so.0(GLIBC_2.1) libpthread.so.0(GLIBC_2.3.2) perl(@@PGLIBDIR@@::slon-tools) perl(DBI) perl(File::Temp) perl(Getopt::Long) perl(strict) postgresql-server = 8.3.0 rtld(GNU_HASH)
Checking for unpackaged file(s): /usr/lib/rpm/check-files /var/tmp/slony1-2.0.0-1_PG8.3.0-root-root
Wrote: /usr/src/redhat/SRPMS/slony1-2.0.0-1_PG8.3.0.src.rpm
Wrote: /usr/src/redhat/RPMS/i386/slony1-2.0.0-1_PG8.3.0.i386.rpm
Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.55567
+ umask 022
+ cd /usr/src/redhat/BUILD
+ cd slony1-2.0.0
+ rm -rf /var/tmp/slony1-2.0.0-1_PG8.3.0-root-root
+ exit 0



I try 

rpm -Uhv /usr/src/redhat/RPMS/i386/slony1-2.0.0-1_PG8.3.0.i386.rpm
error: Failed dependencies:
        /usr/bin/sh is needed by slony1-2.0.0-1_PG8.3.0.i386
        perl(@@PGLIBDIR@@::slon-tools) is needed by slony1-2.0.0-1_PG8.3.0.i386



I think that the /usr/bin/sh  dependency is not needed as you have two sh checks at the start

I have no idea what's up with perl(@@PGLIBDIR@@::slon-tools !!!!

Can anyone shed any more light on this as I'd really rather use RPMs than make install 


Thanks,

Andrew
Comment 1 Devrim GUNDUZ 2008-12-16 09:16:51 UTC
I'm aware of the problem, and comitted a patch to rpm repository to fix the first error. I'll let you know when I fix the issue completely. 
Comment 2 Andrew O'Connell 2008-12-16 09:23:49 UTC
Let me know if I can help at all... I couldn't see how I changed that.
Comment 3 Devrim GUNDUZ 2008-12-24 09:54:50 UTC
I built RPMs on Fedora 10:

http://yum.pgsqlrpms.org/8.3/fedora/fedora-10-i386/repoview/letter_s.group.html

Here is the SRPM link:
http://yum.pgsqlrpms.org/srpms/8.3/fedora/fedora-10-i386/repoview/slony1.html

Please let me know if the SRPM works for you.
Comment 4 Andrew O'Connell 2009-01-05 07:02:43 UTC
Hi,

Thanks for getting a fix on this so quick. 

We're running Centos/Redhat 4 & 5 so I needed to re-build the rpms for that.

I worked out how to apply the patch to get rid of the below error

  /usr/bin/sh is needed by slony1-2.0.0-1_PG8.3.0.i386


But can't quite figure out what to do to get rid of the perl error 

 perl(@@PGLIBDIR@@::slon-tools) is needed by slony1-2.0.0-1_PG8.3.0.i386

Can you shed any light?

Would it be usefull for be to email anyone the built rpms (against Pg8.3) ?

Thanks!

Andrew
Comment 5 Andrew O'Connell 2009-01-06 03:35:27 UTC
OK, I think I have a list of fixes now, thanks for the pointers

Slony.spec.in & Slony.spec

Change the line below to read :
Source0:        @PACKAGE_NAME@-%{version}.tar.bz2



Add to tools/altperl/Makefile :

-e "s#@@PGLIBDIR@@#$(perlsharedir)#;" \

(found this on http://archive.netbsd.se/?ml=slony1-bugs&a=2007-07&t=4562793)


Change /tools/slony-cluster-analysis-mass.sh & slony1-2.0.0/tools/slony-cluster-analysis.sh

from
#!/usr/bin/sh

to 
#!/bin/sh

then use 

./configure --with-perltools 
and 
make rpm

the result seams to not throwup any errors when doing 
rpm -ihv --test /usr/src/redhat/RPMS/i386/slony1-2.0.0-1_PG8.3.0.i386.rpm

If anyone wants the rpms then shout
Comment 6 Devrim GUNDUZ 2009-01-26 09:00:51 UTC
I'm closing this bug, since the changes will hopefully appear in 2.0.1.