[4.0] Use strip (instead of eu-strip) to support --strip-debug of *.so at build time
[platform/upstream/rpm.git] / INSTALL
diff --git a/INSTALL b/INSTALL
index 539cfbc..85cc8d6 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -2,25 +2,98 @@ To build RPM you will need several other packages:
 --------------------------------------------------
 
 The zlib library for compression support. You might also need/want
-the zip executable for java jar dependency analysis. All available from
-    ftp://ftp.freesoftware.com/pub/infozip/zlib/
-
-The Berkeley db1 and db3 libraries. These are available from
-    http://www.sleepycat.com.
-
-Minimal instructions for building db3 are (see a Red Hat dbN package
-spac file for more conmplete details)
+the unzip executable for java jar dependency analysis. All available from
+    http://www.gzip.org/zlib/
+
+The libmagic (aka file) library for file type detection (used by rpmbuild). 
+The source for the file utility + library is available from
+    ftp://ftp.astron.com/pub/file/
+
+The NSS >= 3.12 library for encryption, and NSPR library which NSS uses. 
+Both NSPR and NSS libraries and headers need to be installed during RPM
+compilation. As NSPR and NSS typically install their headers outside
+the regular include search path, you need to tell configure about this,
+eg something like:
+    ./configure <......> CPPFLAGS="-I/usr/include/nspr -I/usr/include/nss"
+
+The NSPR and NSS libraries are available from 
+    http://www.mozilla.org/projects/security/pki/nss/
+    http://www.mozilla.org/projects/nspr/
+
+The Berkeley DB >= 4.3.x (4.5.x or newer recommended) is required for the
+default database backend. BDB can be downloaded from
+http://www.oracle.com/technology/software/products/berkeley-db/index.html
+
+RPM supports two different ways to include it, both methods have their 
+distinct advantages and disadvantages:
+
+1) Building and using an internal copy of BDB
+   
+   This is the "safe" way: upgrades to system BDB can not affect your
+   rpmdb integrity and you have full control over how BDB is configured. 
+   On the other hand, any updates (security or bugfix) to BDB will require 
+   rebuilding RPM. 
+
+   To use this method, download a recent version of BDB from the URL above,
+   expand the tarball into rpm source directory root and create "db" symlink
+   to it, eg:
+   $ wget http://download.oracle.com/berkeley-db/db-4.5.20.tar.gz
+   $ tar xzf db-4.5.20.tar.gz
+   $ ln -s db-4.5.20 db
+   $ ./configure [other options...]
+
+2) Linking to external (system) BDB
+
+   If you can control when and how system BDB is upgraded, this option
+   saves space, removes the need to rebuild RPM in case of security etc
+   updates to BDB and also makes build rpm itself much faster. On the other
+   hand, major BDB upgrades can be disruptive, especially if
+   the on-disk format changes somehow. 
+
+   To use this method, simply pass in --with-external-db to ./configure
+   script. If the system BDB is installed outside compiler + linker default
+   paths, you can use CPPFLAGS and LDFLAGS to tell configure where to look,
+   for example:
+
+   $ ./configure --with-external-db CPPFLAGS=-I/usr/include/db45
+
+Minimal instructions for building BDB are 
     cd build_unix 
-    ../dist/configure --enable-compat185
+    ../dist/configure --with-posixmutexes
     make
     make install
 
-It may be desired to install bzip2 and gzip so that RPM can use these
-formats.  Gzip, is necessary to build packages that contain compressed
+For embedded Lua scripting support (recommended and enabled by default),
+you'll need Lua >= 5.1 library + development environment installed.
+Note that only the library is needed at runtime, RPM never calls external
+Lua interpreter for anything. Lua is available from 
+    http://www.lua.org
+
+If SELinux support is desired, it can be enabled with --with-selinux option
+to configure and libselinux development environment installed. SELinux
+is available from
+    http://www.nsa.gov/selinux/
+
+It may be desired to install bzip2, gzip, and xz/lzma so that RPM can use these
+formats.  Gzip is necessary to build packages that contain compressed
 tar balls, these are quite common on the Internet.
 These are availible from
-    http://www.digistar.com/bzip2/index.html
-    http://sources.redhat.com/bzip2/
+    http://www.gzip.org
+    http://www.bzip.org
+    http://tukaani.org/xz/
+
+If you want to build the Python bindings to RPM library, it can be enabled
+with --enable-python option to configure. You'll need to have Python (>= 2.3)
+runtime and C API development environment installed, this is available from 
+    http://www.python.org/
+
+To enable POSIX.1e draft 15 file capabilities support, configure with
+--with-cap. You'll also need recent libcap, available from:
+    http://ftp.kernel.org/pub/linux/libs/security/linux-privs/libcap2/
+
+To enable POSIX 1003.1e draft 17 ACL verification support, configure with
+--with-acl. You'll also need the ACL library, available from:
+    ftp://oss.sgi.com/projects/xfs/cmd_tars/
 
 For best results you should compile with GCC and GNU Make.  Users have
 reported difficulty with other build tools (any patches to lift these
@@ -32,33 +105,21 @@ gettext (currently this is required to build rpm but we hope to
 lift this requirement soon), available from 
     http://www.gnu.org/
 
-If you are going to hack the sources (or compile from anonymous cvs
-retrevial) you will need most of the GNU development tools including:
+If you are going to hack the sources (or compile from source repository)
+you will need most of the GNU development tools including:
 autoconf, automake, gettext, libtool, makeinfo, perl, GNU m4, GNU tar
 available from 
     http://www.gnu.org/
 
-If you plan on using cryptographic signatures you will need a version
-of GPG.
-
-Since Red Hat 6.1 uses gnupg for signing packages, previous releases were
-signed with pgp-2.6.3. Pgp5 can be used instead of pgp-2.6.3 signatures iff
-RSA signature's are used.
-
-These can be downloaded (for US citizens) from:
-    http://web.mit.edu/network/pgp.html
-    http://www.gnu.org/
-    http://www.pgpi.com/
-
-Note: rpm-4.0 on Red Hat 7.0 is currently using
-    zlib-1.1.3
-    db1-1.85
-    db3-3.1.14
-    bzip2-1.0.1
-    gnupg-1.0.2
-You may use the tarballs within those packagese, and examine the patches and
-spec files for details about how to build the libraries needed by rpm.
+RPM distribution tarballs come with doxygen generated HTML documentation
+for the public RPM API, but if you want to generate documentation for
+the entire source including internal API's, use --enable-hackingdocs
+configure option. Doxygen is needed for this, it's available at
+    http://www.stack.nl/~dimitri/doxygen/
 
+If you plan on using cryptographic signatures you will need a version
+of GPG, available from
+    http://www.gnupg.org/
 
 To compile RPM:
 --------------
@@ -66,14 +127,10 @@ To compile RPM:
 RPM uses a small shell script to run: libtool, autoconf,
 automake. This step should not be necessary if you are running a
 released version of rpm, however if you have gotten the rpm sources
-using anonymous CVS or via anonymous FTP, you should probably regenerate
-intermediate files by re-running the autogen.sh script.
+directly from the source code repository, you need to generate
+intermediate files by running the autogen.sh script.
 
 The autogen.sh script checks that the required tools are installed.
-While other versions of the tools may be used, the script checks for
-the same version of the tools that was used at the time the tarball
-was produced. Edit the top of the script to change version numbers if you wish.
-
 The autogen.sh script also runs configure for you and passes the command line
 arguments to configure.  To run it without configure type:
 
@@ -104,20 +161,12 @@ and then install with:
 
     make install
 
-If you wish to make a tarfile of the binaries so that you may easily
-install on machines with OS package managers other then rpm (ed note:
-what about putting gzip and bzip2 in the tar, modifying the
-/etc/rpmrc?):
-
-    make tar
+Rpm comes with an automated self-test suite. The test-suite relies heavily
+on fakechroot (https://github.com/fakechroot/) and cannot be executed
+without it. Provided that fakechroot was found during configure,
+it can be executed after a succesful build with:
 
-when installing. If you do install from a tarball, you will need to do
-something like
-
-    mkdir /var/lib/rpm
-    rpm --initdb
-
-to initialize your rpm database.
+    make check
 
 Finally, if you wish to prepare an rpm source tar ball, you should do
 
@@ -130,9 +179,9 @@ After RPM has been installed you can run rpm to build an rpm package.
 Edit the rpm.spec file to mirror any special steps you needed to
 follow to make rpm compile and change the specfile to match your
 taste.  You will need to put the rpm source tar file into the
-redhat/SOURCES directory and we suggest putting the specfile in the
-redhat/SPECS directory, then run rpm -ba rpm.spec.  You will end up
-with two rpms which can be found in redhat/RPMS and redhat/SRPMS.
+SOURCES directory and we suggest putting the specfile in the
+SPECS directory, then run rpmbuild -ba rpm.spec.  You will end up
+with two rpms which can be found in RPMS and SRPMS.
 
 If you are going to install rpm on machines with OS package managers
 other then rpm, you may choose to install the base rpm package via a
@@ -152,8 +201,9 @@ Non Linux Configuration Issues:
 OS dependencies:
 ----------------
 
-Under Red Hat Linux all libraries (in fact all files distributed with
-the OS) are under RPM control and this section is not an issue.
+Under RPM based Linux distributions all libraries (in fact all files 
+distributed with the OS) are under RPM control and this section is not 
+an issue.
 
 RPM will need to be informed of all the dependencies which were
 satisfied before RPM was installed.  Typically this only refers to
@@ -177,7 +227,7 @@ with:
 and if you wish to ensure that some directories are not traversed you
 can use the option: 
 
-    --ignore_dirs 'egrep|pattern|of|paths|to|ignore
+    --ignore_dirs 'grep-E|pattern|of|paths|to|ignore
 
 By default the generated rpm will include a %verifyscript to verify
 checksum of all files traversed has not changed.  This additional
@@ -253,36 +303,12 @@ Pro would want `i586pro' over `i586-pro', but it does make parsing
 this filename by other programs a bit more difficult.
 
 
-GPG/PGP/PGP5
-------------
+GPG
+---
 
 To use the signing features of rpm, you will need to configure certain
-rpm macros.
-
-Here's what I use for gpg:
-
-    /etc/rpm/macros for per-system (or ~/.rpmmacros for per-user) configuration
-       %_signature     gpg
-       %_gpg_name      Jeff Johnson (ARS N3NPQ) <jbj@redhat.com>
-       %_gpg_path      /home/devel/jbj/.gnupg
-
-Here's what I use for pgp2.6:
-
-    /etc/rpm/macros for per-system (or ~/.rpmmacros for per-user) configuration
-       %_signature     pgp
-       %_pgpbin        /usr/bin/pgp
-       %_pgp_name      Jeff Johnson <jbj@redhat.com>
-       %_pgp_path      /home/jbj/.pgp
-
-In order to use pgp5, you will need to change:
-
-       %_signature     pgp5
-       %_pgpbin        /path/to/pgp5/binary
-       %_pgp_path      /path/to/pgp5/keyring
+rpm macros in ~/.rpmmacros:
 
-(Note: Only one of pgp and pgp5 may be used because of name conflicts.)
+       %_gpg_name      <GPG UID>
+       %_gpg_path      %(echo $HOME)/.gnupg
 
-You may also need Red Hat GPG/PGP public keys. These can be found in the
-rpm source tarball, in /usr/doc/rpm*, or form http://www.redhat.com. In
-order to verify a package signed by Red Hat you will need to import these
-keys onto you key ring. See the GPG/PGP documentation for how to do this.