weird bug in rebuilding RPMs

From: zhong ming wu <mr(dot)z(dot)m(dot)wu(at)gmail(dot)com>
To: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: weird bug in rebuilding RPMs
Date: 2010-02-07 14:50:12
Message-ID: 9e434c4d1002070650m74fd89pf4c3ca51d321f36@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-general

Hello,

I'm a long time user and I had always installed postgres by compiling
from source. I recently moved to a new environment where
everything is installed as rpm and plus I need to install a newer
postgres for testing while keeping the existing version in place.
That leads me to repackage postgres rpm.

Because I will eventually be installing red hat rpm I take their
latest srpm and modify their rpm spec file in order to let me install
rpm. After trials and errors I have managed to rebuild rpm to my
satisfaction but would like to report a minor bug.

I can now rebuild rpms so that all files go under a specific directory
specified by _prefix directive in ~/.rpmmacros Forgetting lots of
other bugs that I managed to fix, this weird bug is making me use
_prefix that does not include the word "pgsql" in the path name any
where. For example if _prefix path has the word pgsqL or pgsq
or pgsqA then rebuilding is successful but if the path includes the
word pgsql or pgsql-8.1.18 or pgsqll then rebuilding breaks down.

It is failing at install stage. This is the command.
$ rpmbuild --bi spec
I always do "rpmbuild --clean spec" before any rebuilding.

What follows is the error message before it quits (prefix is
/usr/local/pgsql/bla)
-------------
make: Leaving directory `/home/me/build/BUILD/postgresql-8.1.18/contrib/xml2'
+ case `uname -i` in
++ uname -i
++ uname -i
+ mv /var/tmp/postgresql-8.1.18-2.1-root//usr/local/pgsql/bla/include/pg_config.h
/var/tmp/postgresql-8.1.18-2.1-root//usr/local/pgsql/bla/include/pg_config
_x86_64.h
+ install -m 644 /home/me/build/SOURCES/pg_config.h
/var/tmp/postgresql-8.1.18-2.1-root//usr/local/pgsql/bla/include
++ uname -i
+ mv /var/tmp/postgresql-8.1.18-2.1-root//usr/local/pgsql/bla/include/pgsql/server/pg_config.h
/var/tmp/postgresql-8.1.18-2.1-root//usr/local/pgsql/bla/incl
ude/pgsql/server/pg_config_x86_64.h
mv: cannot stat
`/var/tmp/postgresql-8.1.18-2.1-root//usr/local/pgsql/bla/include/pgsql/server/pg_config.h':
No such file or directory
error: Bad exit status from /var/tmp/rpm-tmp.56667 (%install)

RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.56667 (%install)
-------------
If any one else would find it useful, I can also post a diff of the
spec file which will make it possible for repackaging and including
renaming so that it does not override the existing version. Most
bugs I encountered are of the nature: paths that should not be
hard-coded are hard-coded and vice versa.

Thanks

mr.wu

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Zdenek Kotala 2010-02-07 19:57:24 Re: BUG #5318: Inconsistent PHP pg_result_error_field PGSQL_DIAG_SOURCE_FUNCTION across instalations
Previous Message Robert Haas 2010-02-07 13:58:20 Re: Possible stability issue: permanent hang on dropdb

Browse pgsql-general by date

  From Date Subject
Next Message Karl Denninger 2010-02-07 19:54:55 Problem with pg_compresslog'd archives
Previous Message kz win 2010-02-07 14:36:39 weird bug in rebuilding RPMs