Bug 89290 - rpm-4.2-1 possible flaws
rpm-4.2-1 possible flaws
Status: CLOSED CURRENTRELEASE
Product: Red Hat Raw Hide
Classification: Retired
Component: rpm (Show other bugs)
1.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jeff Johnson
Mike McLean
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-04-22 05:45 EDT by Warren Togami
Modified: 2007-04-18 12:53 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-06-21 17:56:30 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Warren Togami 2003-04-22 05:45:37 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030225

Description of problem:
rpm-4.2-1 is missing BuildRequires elfutils-devel or the build fails:

extracting debug info from /var/tmp/rpm-root/bin/rpm
12866 blocks
+ /usr/lib/rpm/redhat/brp-compress
+ /usr/lib/rpm/redhat/brp-strip /usr/bin/strip
+ /usr/lib/rpm/redhat/brp-strip-static-archive /usr/bin/strip
/usr/bin/strip: /var/tmp/rpm-root/usr/lib/stjymLyh/libelf.a: Invalid operation
/usr/bin/strip: /var/tmp/rpm-root/usr/lib/stn9EkBM/libelf.a: Invalid operation
error: Bad exit status from /var/tmp/rpm-tmp.41559 (%install)

Earlier in the build process is this non-fatal error.  Am I missing a different
build requirement?

+ touch /var/tmp/rpm-root/var/lib/rpm/__db.008
+ touch /var/tmp/rpm-root/var/lib/rpm/__db.009
+ gzip -9n 'apidocs/man/man*/*'
gzip: apidocs/man/man*/*: No such file or directory
+ :
+ cd /var/tmp/rpm-root
+ rm -rf ./usr/include/beecrypt

Version-Release number of selected component (if applicable):
rpm-4.2-1 from ftp.rpm.org
Red Hat Linux 9
Comment 1 Jeff Johnson 2003-04-22 09:04:57 EDT
Installing redhat-rpm-config is probably the answer, where
eu-strip, not strip, is used instead.

I believe /usr/bin/strip in current rpm scripts is what is
less surprising and more generally correct, so I'm gonna
close WONTFIX.
Comment 2 Jeff Johnson 2003-04-22 09:07:23 EDT
Oh, the apidocs problem is one of
   a) a file not found in the file manifest
   b) doxygen not installed
   c) man pages you've added (doxygen generated man pages are
    rather fluffy)
Comment 3 Warren Togami 2003-04-22 09:51:26 EDT
> Installing redhat-rpm-config is probably the answer, where
> eu-strip, not strip, is used instead.

Hmm, my chroot had redhat-rpm-config installed and it still failed at that point
during rpmbuild unless elfutils-devel was installed.  Bug?

>Oh, the apidocs problem is one of
>   a) a file not found in the file manifest

Perhaps, though I did not change anything from your rpm-4.2-1 package.

>   b) doxygen not installed

doxygen was installed.

>   c) man pages you've added (doxygen generated man pages are rather fluffy)

I haven't added anything.


More problems that I noticed during configure, are any of these serious?
checking for /usr/local/include in INCPATH... ./configure: line 11266:
/usr/local: is a directory
yes
checking for shared library run path origin... ./config.rpath: ./config.rpath:
No such file or directory
done
Comment 4 Warren Togami 2003-04-25 06:26:00 EDT
jbj, mind if I post the e-mail reply that you sent me directly to the above
questions?
Comment 5 Jeff Johnson 2003-04-25 09:25:35 EDT
Sure, go ahead. Put the text here first, please.
Comment 6 Warren Togami 2003-04-25 21:09:13 EDT
(Copy of JBJ mail)
> Hmm, my chroot had redhat-rpm-config installed and it still failed at that point
> during rpmbuild unless elfutils-devel was installed.  Bug?
> 

Hard call. I carry elfutils internally to rpm solely so that I can
carry functionality back to legacy releases without releasing elfultils
as errata package.

-debuginfo generation is in rpm mainly because that's the first place
that libdwarf appeared in Red Hat 9, not for any real reason.

So installing elfutils-devel (and ignoring the lack of BuildRequires:,
a dependency I'm unwilling to carry because, well, it's not *necessary*
with an internal elfutils I'm forced to carry anyways) is recommended.

FWIW I built from CVS w/o elfutils installed for several weeks without seeing
any problems. OTOH there's 2 other configure pathways to building
rpm, ./configure and rpm -ba, that I seldom look at.

> >Oh, the apidocs problem is one of
> >   a) a file not found in the file manifest
> 
> Perhaps, though I did not change anything from your rpm-4.2-1 package.
> 
> >   b) doxygen not installed
> 
> doxygen was installed.
> 
> >   c) man pages you've added (doxygen generated man pages are rather fluffy)
> 
> I haven't added anything.
> 

Then the error is harmless legacy remnant in rpm.spec (note explicit "|| :")

> 
> More problems that I noticed during configure, are any of these serious?
> checking for /usr/local/include in INCPATH... ./configure: line 11266:
> /usr/local: is a directory
> yes
> checking for shared library run path origin... ./config.rpath: ./config.rpath:
> No such file or directory
> done

Nah, that's been there for years, some weird non-linux hack that I'm
unwilling to touch because I don't do non-linux development.

73 de Jeff
Comment 7 Warren Togami 2003-04-26 03:24:34 EDT
Something is going on here that I don't understand.  No matter what I do,
rpm-4.2-1 fails with the error message at the top of this report if
elfutils-devel is not installed.  This is with "rpm -ba rpm.spec".
Comment 8 Warren Togami 2003-04-26 07:22:21 EDT
All of these results are from rpmbuild -ba rpm.spec.

Summary of problems thus far:
1) rpm-4.2-1 will not build on any system with or without NPTL with or unless
elfutils-devel is installed.

2) rpm-4.2-1 built on a system with and w/o NPTL with elfutils-devel results in
binaries with the broken lock problem after rpm upgrade.  If you erase the locks
(rm -f /var/lib/rpm/__*) or reboot, it seems to work thereafter with no problems.

3) Should not rpm-4.2-1 be modified to override the NPTL test and build with
NPTL enabled by default since rpm-4.2 is for RH9?  (Especially since the
resulting rpm binary has the linuxthreads fallback.)

-checking for mutexes... x86/gcc-assembly
+checking for mutexes... POSIX/pthreads/library

I tried the following before "make" in order to force this change, but it
results in a build failure.  Any ideas what else I need to force, or is it
impossible to build a NPTL-capable rpm on a non-NPTL system?

perl -pi -e 's/#define HAVE_MUTEX_X86_GCC_ASSEMBLY 1/#undef
HAVE_MUTEX_X86_GCC_ASSEMBLY/' db3/db_config.h
perl -pi -e 's/\/* #undef HAVE_MUTEX_PTHREADS *\//#define HAVE_MUTEX_PTHREADS
1/' db3/db_config.h

4) It appears that rpm-build does the wrong thing and dynamically links against
the system's rpm-devel if that package is installed.  Is this a known bug? 
Would a "Conflicts: rpm-devel" be proper?

5) Should the package have BuildRequires
doxygen?
bison?
flex?
bzip2-devel?


http://atrpms.physik.fu-berlin.de/dist/rh9/rpm/
It appears that Axel Thimm already figured out some of these problems.  Check
out his modified rpm.spec.

One notable part of his spec says this:

# If a previous version of rpm is installed, then its shared libs may
# get linked against in library install mode. The library installation
# of librpm looks like:
# /bin/sh ../libtool --mode=relink gcc [...]
# gcc -shared  cpio.lo [...] -L/usr/src/at/work/BUILD/rpm-4.2/popt/.libs
-L/usr/local/lib -L/usr/src/at/work/BUILD/rpm-4.2/zlib
-L/usr/src/at/work/BUILD/rpm-4.2/rpmio/.libs -L/usr/lib
-L/var/tmp/rpm-root/usr/lib -lrpmdb -lrpmio -lpopt     -Wl,-soname
-Wl,librpm-4.2.so -o .libs/librpm-4.2.so
# Note that there is no -L...rpmdb/.libs and also that the installation dir is
after /usr/lib, so instead of librpmdb-4.2 you link against 4.1
BuildConflicts: rpm-devel > %{version}, rpm-devel < %{version}
Comment 9 Warren Togami 2003-06-21 17:56:30 EDT
Problems went away with newer errata kernels.
elf not worth fixing.

Note You need to log in before you can comment on or make changes to this bug.