LFS Hint: Compiling RPM

Erich Heintz erich at heintz.com
Wed Nov 1 15:14:50 PST 2000


Just ran into the need to unpack an SRPM last night (needed to get the
glibc-2.1.x patch for cpio-2.4.2) and went about it a different way.

Primary differences are:
zlib-1.1.3 provides static library zlib.a
Berkeley db-3.1.7 not used. glibc-2.1.3 used by LFS provides db-3 (word has
it that LATER versions of glibc do not).

--

TITLE:
Building RPM for LFS

AUTHOR:
Erich Heintz <erich at heintz.com>

SUMMARY:
LFS hint for installing RPM 3.0.6.

REQUIRES:
bzip2-1.0.1 (part of standard LFS system)
zlib-1.1.3
rpm-3.0.6

DOWNLOADS:
ftp://ftp.info-zip.org/pub/infozip/zlib/zlib-1.1.3.tar.gz
ftp://ftp.rpm.org/pub/rpm/dist/rpm-3.0.x/rpm-3.0.6.tar.gz

Step 1 - Install zlib:
tar xvzf zlib-1.1.3.tar.gz -C /usr/src
cd /usr/src/zlib-1.1.3
../configure --prefix=/usr
make
make install

Step 2 - Install RPM:
tar xvzf rpm-3.0.6.tar.gz -C /usr/src
cd /usr/src/rpm-3.0.6
../configure --prefix=/usr
make
make install

Done!

zlib-1.1.3 provides:

/usr/include/zlib.h
/usr/include/zconf.h
/usr/lib/libz.so
/usr/lib/libz.so.1
/usr/lib/libz.a


rpm-3.0.6 provides:

/bin/rpm
/usr/bin/rpm2cpio
/usr/bin/gendiff
/usr/include/popt.h
/usr/include/rpm/dbindex.h
/usr/include/rpm/header.h
/usr/include/rpm/misc.h
/usr/include/rpm/rpmio.h
/usr/include/rpm/rpmlib.h
/usr/include/rpm/rpmmacro.h
/usr/include/rpm/rpmurl.h
/usr/include/rpm/stringbuf.h
/usr/include/rpm/rpmbuild.h
/usr/include/rpm/rpmspec.h
/usr/lib/libpopt.so.0.0.0
/usr/lib/libpopt.so.0
/usr/lib/libpopt.so
/usr/lib/libpopt.la
/usr/lib/libpopt.a
/usr/lib/librpm.so.0.0.0
/usr/lib/librpm.so.0
/usr/lib/librpm.so
/usr/lib/librpm.la
/usr/lib/librpm.a
/usr/lib/librpmbuild.so.0.0.0
/usr/lib/librpmbuild.so.0
/usr/lib/librpmbuild.so
/usr/lib/librpmbuild.la
/usr/lib/librpmbuild.a
/usr/lib/rpm/brp-compress
/usr/lib/rpm/brp-redhat
/usr/lib/rpm/brp-strip
/usr/lib/rpm/brp-strip-comment-note
/usr/lib/rpm/brp-sparc64-linux
/usr/lib/rpm/check-prereqs
/usr/lib/rpm/convertrpmrc.sh
/usr/lib/rpm/find-lang.sh
/usr/lib/rpm/find-prov.pl
/usr/lib/rpm/find-req.pl
/usr/lib/rpm/cpanflute
/usr/lib/rpm/find-provides.perl
/usr/lib/rpm/find-requires.perl
/usr/lib/rpm/get_magic.pl
/usr/lib/rpm/getpo.sh
/usr/lib/rpm/http.req
/usr/lib/rpm/magic.prov
/usr/lib/rpm/magic.req
/usr/lib/rpm/perl.prov
/usr/lib/rpm/perl.req
/usr/lib/rpm/rpmdiff
/usr/lib/rpm/rpmdiff.cgi
/usr/lib/rpm/u_pkg.sh
/usr/lib/rpm/vpkg-provides.sh
/usr/lib/rpm/vpkg-provides2.sh
/usr/lib/rpm/find-provides
/usr/lib/rpm/find-requires
/usr/lib/rpm/mkinstalldirs
/usr/lib/rpm/config.guess
/usr/lib/rpm/config.sub
/usr/lib/rpm/rpmrc
/usr/lib/rpm/rpmpopt
/usr/lib/rpm/macros
/usr/lib/rpm/noarch-pc-linux
/usr/lib/rpm/noarch-linux
/usr/lib/rpm/i386-pc-linux/macros
/usr/lib/rpm/i386-linux
/usr/lib/rpm/i486-pc-linux/macros
/usr/lib/rpm/i486-linux
/usr/lib/rpm/i586-pc-linux/macros
/usr/lib/rpm/i586-linux
/usr/lib/rpm/i686-pc-linux/macros
/usr/lib/rpm/i686-linux
/usr/lib/rpmrc
/usr/lib/rpmpopt
/usr/share/man/man1/gendiff.1
/usr/share/man/man3/popt.3
/usr/share/man/man8/rpm.8
/usr/share/man/man8/rpm2cpio.8
/usr/share/man/pl/man8/rpm.8
/usr/share/man/ja/man8/rpm.8
/usr/share/man/ja/man8/rpm2cpio.8
/usr/share/man/ru/man8/rpm.8
/usr/share/man/ru/man8/rpm2cpio.8
/usr/share/man/sk/man8/rpm.8

-----Original Message-----
From: root at woody.ichilton.co.uk [mailto:root at woody.ichilton.co.uk]On
Behalf Of Ian Chilton
Sent: Wednesday, November 01, 2000 1:27 PM
To: lfs-discuss at linuxfromscratch.org
Subject: LFS Hint: Compiling RPM


Hello,

TITLE: Compiling RPM on LFS
LFS Version: any
AUTHOR: Ian Chilton <ian at ichilton.co.uk>

SUMMARY: I am not an RPM expert, and have hardly used RedHat, but I needed
to unpack some SRPM's, so got RPM working...here's how I did it..

HINT:

Required Files:

ftp://ftp.info-zip.org/pub/infozip/zlib/zlib-1.1.3.tar.gz
http://www.sleepycat.com/update/3.1.17/db-3.1.17.tar.gz
ftp://ftp.rpm.org/pub/rpm/dist/rpm-3.0.x/rpm-3.0.6.tar.gz


Step 1:

Check if you have: /usr/lib/libz.a
If not, download and unpack:
ftp://sourceware.cygnus.com/pub/bzip2/v100/bzip2-1.0.1.tar.gz
Then copy libz.a to /usr/lib


Step 2 - Install zlib:
tar zxvf zlib-1.1.3.tar.gz
cd  zlib-1.1.3
../configure --shared
make
make install


Step 3 - Install Db:
tar zxvf db-3.1.17.tar.gz
cd db-3.1.17/build_unix
.../dist/configure --prefix=/usr
make
make install


Step 4 - Install RPM:
tar zxvf rpm-3.0.6.tar.gz
../configure --prefix=/usr
make
make install




Bye for Now,

Ian


                     \|||/
                     (o o)
 /----------------ooO-(_)-Ooo----------------\
 |  Ian Chilton                              |
 |  E-Mail : ian at ichilton.co.uk              |
 \-------------------------------------------/



--
Unsubscribe: send email to lfs-discuss-request at linuxfromscratch.org
and put unsubscribe in the subject header of the message



-- 
Unsubscribe: send email to lfs-discuss-request at linuxfromscratch.org
and put unsubscribe in the subject header of the message




More information about the lfs-dev mailing list