Bug 84438

Summary: RFE: rpm .spec -- can it pick up a couple more ifdefs rpm-4.2-0.68.src.rpm
Product: [Retired] Red Hat Raw Hide Reporter: R P Herrold <herrold>
Component: rpmAssignee: Jeff Johnson <jbj>
Status: CLOSED DEFERRED QA Contact: Mike McLean <mikem>
Severity: medium Docs Contact:
Priority: medium    
Version: 1.0CC: wtogami
Target Milestone: ---Keywords: FutureFeature
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2003-02-20 16:20:15 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:

Description R P Herrold 2003-02-17 02:31:55 UTC
... building RPM is obtuse with the base Red Hatwork workstation install -- 

a missing BuildRequires: elfutils-devel seems to presently exist.

<snip>
creating rpmsignature
source='debugedit.c' object='debugedit.o' libtool=no \
depfile='.deps/debugedit.Po' tmpdepfile='.deps/debugedit.TPo' \
depmode=gcc3 /bin/sh ../depcomp \
gcc -DHAVE_CONFIG_H -I. -I. -I.. -I. -I.. -I../build -I../lib -I../rpmdb
-I../rpmio -I../popt -I../file -I../zlib -I../misc    -O2 -march=i386 -mcpu=i686
-g -D_GNU_SOURCE -D_REENTRANT -Wall -Wpointer-arith -Wstrict-prototypes
-Wmissing-prototypes -Wno-char-subscripts -c `test -f 'debugedit.c' || echo
'./'`debugedit.c
debugedit.c:36:18: gelf.h: No such file or directory
debugedit.c:37:19: dwarf.h: No such file or directory
debugedit.c:53: parse error before "Elf"
debugedit.c:53: warning: no semicolon at end of struct or union
debugedit.c:54: warning: type defaults to `int' in declaration of `ehdr'
debugedit.c:54: warning: data definition has no type or storage class
debugedit.c:55: parse error before '*' token
<and so on for many many lines>


Present un-stated Build-requirements include doxygen, and the elfutils-devel

raw hide: rpm-4.2-0.68.src.rpm

two approaches exist:  BuildRequire them, or 

ifdef around the relevant sub-packages ... if not present.

It seems that the hope would be that, for non-i386 arches, rpm can build enough
of itself to bet rpm-build, so one can bootstrap a rebuild of the toolchain
needed to build:

gcc, binutils,  glibc, rpm itself, and hopefully to kernel

[herrold@dhcp249 SPECS]$ grep -i ^Build rpm.spec
BuildRequires: elfutils-libelf
BuildRequires: zlib-devel
BuildRequires: bzip2 >= 0.9.0c-2
BuildRequires: python-devel >= %{with_python_version}
[herrold@dhcp249 SPECS]$

I am thinking here also of the trans-port-int for Sparc -- elfutils-devel is
probably simply not applicable off ix86 ... this leans to the ifdef extension
approach.

Dunno -- the RPM .spec file is already a work of art -- ...

Comment 1 R P Herrold 2003-02-17 02:38:21 UTC
adding it. of course, I get:


Requires(postun): /sbin/ldconfig
Requires: libc.so.6 libc.so.6(GLIBC_2.0) libc.so.6(GLIBC_2.1)
libc.so.6(GLIBC_2.1.3) libc.so.6(GLIBC_2.3)
Processing files: rpm-debuginfo-4.2-0.68
Provides: _rpmdb.so.debug libpopt.so.0.0.0.debug librpm-4.2.so.debug
librpmbuild-4.2.so.debug librpmdb-4.2.so.debug librpmio-4.2.so.debug
rpmmodule.so.debug
Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1
Checking for unpackaged file(s): /usr/lib/rpm/check-files /var/tmp/rpm-root
Wrote: /home/herrold/redhat/SRPMS/rpm-4.2-0.68.src.rpm
Wrote: /home/herrold/redhat/RPMS/i386/rpm-4.2-0.68.i386.rpm
Wrote: /home/herrold/redhat/RPMS/i386/rpm-devel-4.2-0.68.i386.rpm
Wrote: /home/herrold/redhat/RPMS/i386/rpm-build-4.2-0.68.i386.rpm
Wrote: /home/herrold/redhat/RPMS/i386/rpm-python-4.2-0.68.i386.rpm
Wrote: /home/herrold/redhat/RPMS/i386/popt-1.8-0.68.i386.rpm
Wrote: /home/herrold/redhat/RPMS/i386/rpm-debuginfo-4.2-0.68.i386.rpm
Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.32281
+ umask 022
+ cd /home/herrold/redhat/BUILD
+ cd rpm-4.2
+ rm -rf /var/tmp/rpm-root
+ exit 0
[herrold@dhcp249 SPECS]$

Comment 2 R P Herrold 2003-02-17 02:50:26 UTC
doing this for:

https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=84230

Comment 3 R P Herrold 2003-02-18 17:13:04 UTC
This bug may be a dupe of: 81190 -- but with the off x86 aspect, is probably not 

... As the 'not a BuildRequire' route is stated, it would seem that either
ifdef'ing around arch dependent stuff in the .spec file, or perhaps in the build
setup ./configure has to happen?


Comment 4 Jeff Johnson 2003-02-20 16:20:15 UTC
The right fix is to get debugedit functionality included
in elfutils.

Deferred until then, probably not soon.