[Fwd: [HACKERS] Re: Postgresql 6.5-1 rpms on RedHat 6.0]

From: Lamar Owen <lamar(dot)owen(at)wgcr(dot)org>
To: pgsql-hackers(at)postgresql(dot)org
Cc: jbj(at)redhat(dot)com, lockhart(at)alumni(dot)caltech(dot)edu
Subject: [Fwd: [HACKERS] Re: Postgresql 6.5-1 rpms on RedHat 6.0]
Date: 1999-07-08 14:44:39
Message-ID: 3784B957.FC6CEE10@wgcr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

[a possible answer to the RedHat 6.0 rpm -ba on Thomas' new src.rpm]

Jeff Johnson wrote:

>Lamar Owen wrote:
> > The error is manifested as a "bad exit status" after doing the
> > recursive chgrp and before doing the recursive chmod of %setup.

> Hmmm, I think I know this one.
>
> Rpm attempts to control for the behavior of tar when run by root
> by dooing chown/chgrp/chmod -R. All would be well, except that
> chgrp, when presented with a dangling symlink returns a non-zero
> return code which causes the build to crap out.
>
> There are two approaches to a fix:
>
> 1) Take the dangling (i.e. the target of the symlink doesn't exist)
> symlink out of the postgres tar ball.
>
> 2) Don't attempt the chgrp while building. You can nuke the macro
> %_fixgrp in /usr/lib/rpm/macros. You can also add
> %undefine _fixgrp
> just before the %setup in the postgres spec file. However, you will
> need to use the just released rpm-3.02 if you want to do the %undefine
> successfully.
>
> Please post this wherever is appropriate.
>
> 73 de Jeff
>
> --
> Jeff Johnson ARS N3NPQ
> jbj(at)redhat(dot)com (jbj(at)jbj(dot)org)
> Chapel Hill, NC

Ok, where does the tarball have a dangling symlink....
There are four symlinks in the tarball:
[root(at)utility postgresql-6.5]# find -type l -print
./src/interfaces/odbc/port
./src/interfaces/odbc/makefiles
./src/interfaces/odbc/template
./src/interfaces/odbc/config.h
[root(at)utility postgresql-6.5]# ls -lR|grep lrwxrwxrwx
lrwxrwxrwx 1 root root 24 Jul 8 10:18 config.h ->
../.././inclu
de/config.h
lrwxrwxrwx 1 root root 17 Jul 8 10:18 makefiles ->
../.././make
files
lrwxrwxrwx 1 root root 20 Jul 8 10:18 port ->
../.././include/p
ort
lrwxrwxrwx 1 root root 16 Jul 8 10:18 template ->
../.././templ
ate

[root(at)utility postgresql-6.5]# cd src/interfaces/odbc
[root(at)utility odbc]# ls ../../.
DEVELOPERS config.guess install-sh test
GNUmakefile.in config.sub interfaces tools
Makefile configure lextest tutorial
Makefile.global.in configure.in makefiles utils
Makefile.shlib corba man win32
backend data pl win32.mak
bin include template

Hmmm... seems that config.h and port do not exist -- voila! The dangling
symlinks. Can empty port and config.h files be shipped, or will that
break configure (which is what I'm assuming creates these files?)?

The 6.5-1.beta1 spec file from rawhide handles this using the second
method, although it is incorrectly labeled as being a sparc/alpha fix:
----from postgresql.spec, from
ftp://rawhide.redhat.com/SRPMS/SRPMS/postgresql-6.5-1.beta1.src.rpm-----
# XXX work around sparc/alpha dangling symlink problem
%undefine _fixgroup
-----------------------------
Which is why my rpms, derived from this spec file, built on 6.0, while
Thomas' src.rpm, not derived from this spec file and built on 5.2,
didn't build on 6.0. So, there are two possibilities:

1.) Eliminate the dangling symlinks.
2.) Put the _fixgroup kludge in place in the production SRPM. HOWEVER,
this ONLY works with rpm >= 3.0.x -- which means a RH 5.2 system running
rpm 2.5 won't build it -- but we're supposed to update our rpm version
anyway.

Thomas?

And, thanks, Jeff!

Lamar Owen
WGCR Internet Radio
KF4MYT

Browse pgsql-hackers by date

  From Date Subject
Next Message Vince Vielhaber 1999-07-08 15:04:12 Re: [HACKERS] PATCH for pgconnection.h
Previous Message Tom Lane 1999-07-08 14:44:09 Re: [HACKERS] Delaying insertion of default values