Bug 5583 - rpm fixes for non-linux platforms...
rpm fixes for non-linux platforms...
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: rpm (Show other bugs)
6.1
sparc Linux
medium Severity medium
: ---
: ---
Assigned To: Jeff Johnson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 1999-10-05 10:57 EDT by Nigel Metheringham
Modified: 2008-05-01 11:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 1999-12-15 13:09:03 EST
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 Nigel Metheringham 1999-10-05 10:57:28 EDT
[Not really a RH 6.1 issue, but its the version of rpm that
ships in 6.1]

Recent changes to rpm have made a few parts rather dependant
on the glibc libraries.  Specifically misc/err.c is glibc
dependant - it includes features.h which is a glibc-ism and
uses some functions form it as well...

Some of the functions which are glibc specific are
reimplemented in libmisc.a.  However libmisc.a is not linked
into the majority of programs.  The following patch (at end)
to fix this should be OK on all architectures including RH
linux iteself (since then libmisc is created but empty).

Additionally for solaris I faked up a misc/features.h with
the following contents (its a hack, but it works)

--- start features.h---
#define __P(x) x
#define __BEGIN_DECLS
#define __END_DECLS
#define fputs_unlocked(x,y)     fputs(x,y)
#define __set_errno(x)          errno=x
static char * __progname = "rpm";
--- end features.h---

#### Patch data follows ####
diff -c 'BUILD/rpm-3.0.3.orig/Makefile.in'
'BUILD/rpm-3.0.3/Makefile.in'
Index: ./Makefile.in
*** ./Makefile.in	Sun Sep 26 01:44:56 1999
--- ./Makefile.in	Tue Oct  5 12:58:57 1999
***************
*** 183,189 ****
  CVSTAG = r$(subst .,-,$(VERSION))

  rpm2cpio_SOURCES = rpm2cpio.c
! rpm2cpio_LDADD = $(mylibs)

  rpmconvert_SOURCES = convertdb.c oldrpmdb.c
  rpmconvert_LDADD = $(mylibs) @LIBMISC@ -lgdbm
--- 183,189 ----
  CVSTAG = r$(subst .,-,$(VERSION))

  rpm2cpio_SOURCES = rpm2cpio.c
! rpm2cpio_LDADD = $(mylibs) @LIBMISC@

  rpmconvert_SOURCES = convertdb.c oldrpmdb.c
  rpmconvert_LDADD = $(mylibs) @LIBMISC@ -lgdbm
diff -c 'BUILD/rpm-3.0.3.orig/tools/Makefile.in'
'BUILD/rpm-3.0.3/tools/Makefile.in'
Index: ./tools/Makefile.in
*** ./tools/Makefile.in	Sun Sep 26 01:45:10 1999
--- ./tools/Makefile.in	Tue Oct  5 12:57:56 1999
***************
*** 153,159 ****
  mylibs = $(top_builddir)/build/.libs/librpmbuild.a
$(top_builddir)/lib/.libs/librpm.a
$(top_builddir)/popt/.libs/libpopt.a


! LDADD = $(top_builddir)/lib/.libs/librpm.a

  noinst_PROGRAMS =  	dump dumpdb javadeps rpmarchive
rpmheader rpminject rpmlead rpmsignature

--- 153,159 ----
  mylibs = $(top_builddir)/build/.libs/librpmbuild.a
$(top_builddir)/lib/.libs/librpm.a
$(top_builddir)/popt/.libs/libpopt.a


! LDADD = $(top_builddir)/lib/.libs/librpm.a @LIBMISC@

  noinst_PROGRAMS =  	dump dumpdb javadeps rpmarchive
rpmheader rpminject rpmlead rpmsignature

#### End of Patch data ####
Comment 1 Jeff Johnson 1999-10-05 11:34:59 EDT
Thanks for the patch, I will add during the rpm-3.0.4 development
cycle. For rpm-3.0.3, I chickened out and removed all dependencies on
err.h until I had a chance to think through what you have done in your
patch.
Comment 2 Jeff Johnson 1999-12-15 13:09:59 EST
rpm-3.0.4 does not use/need err.c. In addition, most of the libmisc portability
functions, if needed, are now included in rpmlib (see lib/stubs.c) to avoid
tedious shared library dependency issues when linking against rpmlib.

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