summaryrefslogtreecommitdiff
path: root/meta/packages/rpm
diff options
context:
space:
mode:
Diffstat (limited to 'meta/packages/rpm')
-rw-r--r--meta/packages/rpm/files/cross_libpaths.patch253
-rw-r--r--meta/packages/rpm/files/disabledwarf.patch21
-rw-r--r--meta/packages/rpm/files/extcond.patch78
-rw-r--r--meta/packages/rpm/files/external-tools.patch108
-rw-r--r--meta/packages/rpm/files/missingok.patch44
-rw-r--r--meta/packages/rpm/files/tagsbackport.patch37
-rw-r--r--meta/packages/rpm/files/weakdeps.patch312
-rw-r--r--meta/packages/rpm/rpm-native_4.4.2.3.bb6
-rw-r--r--meta/packages/rpm/rpm/remove-compiled-tests.patch440
-rw-r--r--meta/packages/rpm/rpm_4.4.2.3.bb117
-rw-r--r--meta/packages/rpm/rpm_5.1.9.bb96
11 files changed, 536 insertions, 976 deletions
diff --git a/meta/packages/rpm/files/cross_libpaths.patch b/meta/packages/rpm/files/cross_libpaths.patch
deleted file mode 100644
index 9e8f7dca8..000000000
--- a/meta/packages/rpm/files/cross_libpaths.patch
+++ /dev/null
@@ -1,253 +0,0 @@
-Index: rpm-4.4.2.3/configure.ac
-===================================================================
---- rpm-4.4.2.3.orig/configure.ac 2008-08-23 16:03:51.000000000 +0100
-+++ rpm-4.4.2.3/configure.ac 2008-08-25 16:26:11.000000000 +0100
-@@ -326,10 +326,8 @@
-
- localdone=
-
--dirs=$prefix
- if test "$cross_compiling" != "yes"; then
-- dirs="$dirs /usr/local"
--fi
-+dirs="$prefix /usr/local"
- for dir in $dirs
- do
- case $dir in
-@@ -371,6 +369,7 @@
- else
- AC_MSG_RESULT(no)
- fi
-+fi
-
- dnl
- dnl Check for features
-@@ -473,7 +472,7 @@
- AC_CHECK_HEADER([beecrypt/api.h], [
- AC_DEFINE(HAVE_BEECRYPT_API_H, 1, [Define to 1 if you have the <beecrypt/api.h> header file.])
- ])
-- WITH_BEECRYPT_INCLUDE="-I${includedir}/beecrypt"
-+ WITH_BEECRYPT_INCLUDE=""
- WITH_BEECRYPT_LIB="-lbeecrypt"
- ])
- ],[
-@@ -506,7 +505,7 @@
- AC_CHECK_LIB(neon, ne_send_request_chunk, [
- AC_DEFINE(HAVE_NEON_NE_SEND_REQUEST_CHUNK, 1, [Define to 1 if you have ne_send_request_chunk() in libneon.])
- ])
-- WITH_NEON_INCLUDE="-I${includedir}/neon"
-+ WITH_NEON_INCLUDE=""
- WITH_NEON_LIB="-lneon"
- ])
- ],[
-@@ -857,6 +856,12 @@
- dnl
- dnl Auto-detect which python bindings should be built.
- dnl
-+
-+AC_ARG_WITH(python-incdir, [ --with-python-incdir python include directory ])
-+PYTHON_INCDIR=$withval
-+AC_ARG_WITH(python-libdir, [ --with-python-libdir python library directory ])
-+PYTHON_LIBDIR=$withval
-+
- withval=auto
- AC_ARG_WITH(python, [ --with-python build rpm python bindings ])
-
-@@ -934,6 +939,8 @@
- AC_SUBST(WITH_PYTHON_SUBDIR)
- AC_SUBST(WITH_PYTHON_SUBPACKAGE)
- AC_SUBST(WITH_PYTHON_VERSION)
-+AC_SUBST(PYTHON_LIBDIR)
-+AC_SUBST(PYTHON_INCDIR)
-
- AC_PATH_PROG(__DOXYGEN, doxygen, no, $PATH)
- dnl
-Index: rpm-4.4.2.3/rpmio/Makefile.am
-===================================================================
---- rpm-4.4.2.3.orig/rpmio/Makefile.am 2008-04-01 08:28:22.000000000 +0100
-+++ rpm-4.4.2.3/rpmio/Makefile.am 2008-08-23 12:14:12.000000000 +0100
-@@ -26,9 +26,7 @@
-
- BEECRYPTLOBJS = $(shell test X"@WITH_BEECRYPT_SUBDIR@" != X && cat $(top_builddir)/@WITH_BEECTYPT_SUBDIR@/listobjs)
-
--LDFLAGS = -L$(RPM_BUILD_ROOT)$(usrlibdir) -L$(DESTDIR)$(usrlibdir)
--
--usrlibdir = $(libdir)@MARK64@
-+usrlibdir = $(libdir)
- usrlib_LTLIBRARIES = librpmio.la
- librpmio_la_SOURCES = \
- argv.c digest.c fts.c macro.c rpmdav.c \
-Index: rpm-4.4.2.3/rpmio/rpmio_internal.h
-===================================================================
---- rpm-4.4.2.3.orig/rpmio/rpmio_internal.h 2008-04-01 08:28:22.000000000 +0100
-+++ rpm-4.4.2.3/rpmio/rpmio_internal.h 2008-08-23 12:07:29.000000000 +0100
-@@ -12,22 +12,22 @@
- #if HAVE_BEECRYPT_API_H
- #include <api.h>
- #else
--#include <beecrypt.api.h>
-+#include <beecrypt/beecrypt.api.h>
- #endif
-
- #include <rpmpgp.h>
- #include <rpmsw.h>
-
- /* Drag in the beecrypt includes. */
--#include <beecrypt.h>
--#include <base64.h>
--#include <dsa.h>
--#include <endianness.h>
--#include <md5.h>
--#include <mp.h>
--#include <rsa.h>
--#include <rsapk.h>
--#include <sha1.h>
-+#include <beecrypt/beecrypt.h>
-+#include <beecrypt/base64.h>
-+#include <beecrypt/dsa.h>
-+#include <beecrypt/endianness.h>
-+#include <beecrypt/md5.h>
-+#include <beecrypt/mp.h>
-+#include <beecrypt/rsa.h>
-+#include <beecrypt/rsapk.h>
-+#include <beecrypt/sha1.h>
- #if HAVE_BEECRYPT_API_H
- #include <sha256.h>
- #include <sha384.h>
-Index: rpm-4.4.2.3/Makefile.am
-===================================================================
---- rpm-4.4.2.3.orig/Makefile.am 2008-04-01 08:28:21.000000000 +0100
-+++ rpm-4.4.2.3/Makefile.am 2008-08-25 23:09:40.000000000 +0100
-@@ -10,7 +10,7 @@
- po/*.in po/*.po po/rpm.pot \
- rpm.magic rpmpopt-$(VERSION) rpmqv.c
-
--SUBDIRS = po misc @WITH_ZLIB_SUBDIR@ @WITH_ELFUTILS_SUBDIR@ @WITH_MAGIC_SUBDIR@ @WITH_DB_SUBDIR@ @WITH_SQLITE3_SUBDIR@ @WITH_POPT_SUBDIR@ @WITH_BEECRYPT_SUBDIR@ @WITH_NEON_SUBDIR@ lua rpmio rpmdb lib build @WITH_PYTHON_SUBDIR@ tools scripts doc .
-+SUBDIRS = po misc @WITH_ZLIB_SUBDIR@ @WITH_ELFUTILS_SUBDIR@ @WITH_MAGIC_SUBDIR@ @WITH_DB_SUBDIR@ @WITH_SQLITE3_SUBDIR@ @WITH_POPT_SUBDIR@ @WITH_BEECRYPT_SUBDIR@ @WITH_NEON_SUBDIR@ rpmio rpmdb lib build @WITH_PYTHON_SUBDIR@ tools scripts doc .
-
- INCLUDES = \
- -I$(top_srcdir)/build \
-@@ -93,7 +93,7 @@
- rpm2cpio_LDFLAGS = $(myLDFLAGS)
- rpm2cpio_LDADD = $(myLDADD) @LIBMISC@
-
--$(PROGRAMS): $(myLDADD) @WITH_APIDOCS_TARGET@
-+$(PROGRAMS): @WITH_APIDOCS_TARGET@
-
- .PHONY: splint
- splint:
-Index: rpm-4.4.2.3/rpmdb/Makefile.am
-===================================================================
---- rpm-4.4.2.3.orig/rpmdb/Makefile.am 2008-04-01 08:28:22.000000000 +0100
-+++ rpm-4.4.2.3/rpmdb/Makefile.am 2008-08-23 12:13:18.000000000 +0100
-@@ -41,10 +41,7 @@
- # XXX watchout, ../db3/libdb.la created by this Makefile may surprise
- libdb_la = $(top_builddir)/$(WITH_DB_SUBDIR)/libdb.la
-
--# XXX grrr, RPM_BUILD_ROOT prevents build pollution if/when -lrpm different
--LDFLAGS = -L$(RPM_BUILD_ROOT)$(usrlibdir) -L$(DESTDIR)$(usrlibdir)
--
--usrlibdir = $(libdir)@MARK64@
-+usrlibdir = $(libdir)
- usrlib_LTLIBRARIES = librpmdb.la
- librpmdb_la_SOURCES = \
- dbconfig.c fprint.c \
-Index: rpm-4.4.2.3/lib/Makefile.am
-===================================================================
---- rpm-4.4.2.3.orig/lib/Makefile.am 2008-04-01 08:28:22.000000000 +0100
-+++ rpm-4.4.2.3/lib/Makefile.am 2008-08-23 16:03:51.000000000 +0100
-@@ -29,9 +29,7 @@
- mylibs = librpm.la
- LIBS =
-
--LDFLAGS = -L$(RPM_BUILD_ROOT)$(usrlibdir) -L$(DESTDIR)$(usrlibdir)
--
--usrlibdir = $(libdir)@MARK64@
-+usrlibdir = $(libdir)
- usrlib_LTLIBRARIES = librpm.la
- librpm_la_SOURCES = \
- cpio.c depends.c formats.c fs.c fsm.c getdate.c \
-Index: rpm-4.4.2.3/build/Makefile.am
-===================================================================
---- rpm-4.4.2.3.orig/build/Makefile.am 2008-04-01 08:28:21.000000000 +0100
-+++ rpm-4.4.2.3/build/Makefile.am 2008-08-23 16:03:51.000000000 +0100
-@@ -22,9 +22,7 @@
- pkginc_HEADERS = rpmbuild.h rpmfc.h rpmfile.h rpmspec.h
- noinst_HEADERS = buildio.h
-
--LDFLAGS = -L$(RPM_BUILD_ROOT)$(usrlibdir) -L$(DESTDIR)$(usrlibdir)
--
--usrlibdir = $(libdir)@MARK64@
-+usrlibdir = $(libdir)
- usrlib_LTLIBRARIES = librpmbuild.la
- librpmbuild_la_SOURCES = \
- build.c expression.c files.c misc.c names.c pack.c \
-Index: rpm-4.4.2.3/python/Makefile.am
-===================================================================
---- rpm-4.4.2.3.orig/python/Makefile.am 2008-04-01 08:28:22.000000000 +0100
-+++ rpm-4.4.2.3/python/Makefile.am 2008-08-25 16:26:56.000000000 +0100
-@@ -4,8 +4,8 @@
-
- LINT = splint
-
--pylibdir = ${prefix}/lib@MARK64@/python@WITH_PYTHON_VERSION@
--pyincdir = $(prefix)/include/python@WITH_PYTHON_VERSION@
-+pylibdir = @PYTHON_LIBDIR@
-+pyincdir = @PYTHON_INCDIR@
-
- SUBDIRS = rpm
-
-Index: rpm-4.4.2.3/python/rpm/Makefile.am
-===================================================================
---- rpm-4.4.2.3.orig/python/rpm/Makefile.am 2008-04-01 08:28:22.000000000 +0100
-+++ rpm-4.4.2.3/python/rpm/Makefile.am 2008-08-25 16:27:29.000000000 +0100
-@@ -4,8 +4,8 @@
-
- PYVER = @WITH_PYTHON_VERSION@
-
--pylibdir = ${prefix}/lib@MARK64@/python@WITH_PYTHON_VERSION@
--pyincdir = $(prefix)/include/python@WITH_PYTHON_VERSION@
-+pylibdir = @PYTHON_LIBDIR@
-+pyincdir = @PYTHON_INCDIR@
-
- EXTRA_DIST = \
- __init__.py
-Index: rpm-4.4.2.3/file/src/Makefile.am
-===================================================================
---- rpm-4.4.2.3.orig/file/src/Makefile.am 2008-08-23 16:06:25.000000000 +0100
-+++ rpm-4.4.2.3/file/src/Makefile.am 2008-08-23 16:06:39.000000000 +0100
-@@ -4,7 +4,7 @@
- EXTRA_DIST = test.c
-
- # XXX Make sure compress.c links internal zlib
--INCLUDES = -I. -I ../../zlib
-+INCLUDES = -I.
-
- pkglibdir = @prefix@/lib/rpm
- MAGIC = $(pkglibdir)/magic
-@@ -26,7 +26,7 @@
-
- noinst_PROGRAMS = file
- file_SOURCES = file.c
--file_LDFLAGS = -L../../zlib # -all-static
-+#file_LDFLAGS = -L../../zlib # -all-static
- file_LDADD = libmagic.la
-
- listobjs:
-Index: rpm-4.4.2.3/file/magic/Makefile.am
-===================================================================
---- rpm-4.4.2.3.orig/file/magic/Makefile.am 2008-08-25 16:14:47.000000000 +0100
-+++ rpm-4.4.2.3/file/magic/Makefile.am 2008-08-25 16:15:02.000000000 +0100
-@@ -18,10 +18,10 @@
- done >> $@
-
- magic.mgc: magic
-- $(top_builddir)/src/file -C -m magic
-+ file -C -m magic
-
- magic.mime.mgc: magic.mime
-- $(top_builddir)/src/file -C -m $(srcdir)/magic.mime
-+ file -C -m $(srcdir)/magic.mime
-
- magic_FRAGMENTS = \
- Magdir/acorn \
diff --git a/meta/packages/rpm/files/disabledwarf.patch b/meta/packages/rpm/files/disabledwarf.patch
deleted file mode 100644
index 6f09cc596..000000000
--- a/meta/packages/rpm/files/disabledwarf.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-Index: rpm-4.4.2.3/configure.ac
-===================================================================
---- rpm-4.4.2.3.orig/configure.ac 2009-11-30 17:23:22.000000000 +0000
-+++ rpm-4.4.2.3/configure.ac 2009-11-30 17:23:52.000000000 +0000
-@@ -448,16 +448,6 @@
-
- WITH_LIBDWARF_INCLUDE=
- WITH_LIBDWARF_DEBUGEDIT=
--AC_CHECK_HEADER([dwarf.h], [
-- AC_DEFINE(HAVE_DWARF_H, 1, [Define to 1 if you have the <dwarf.h> header file.])
-- WITH_LIBDWARF_DEBUGEDIT="debugedit"
--],[
-- if test -d elfutils/libdwarf ; then
-- AC_DEFINE(HAVE_DWARF_H, 1, [Define to 1 if you have the <dwarf.h> header file.])
-- WITH_LIBDWARF_INCLUDE="-I\${top_srcdir}/${WITH_ELFUTILS_SUBDIR}/libdwarf"
-- WITH_LIBDWARF_DEBUGEDIT="debugedit"
-- fi
--])
- AC_SUBST(WITH_LIBDWARF_INCLUDE)
- AC_SUBST(WITH_LIBDWARF_DEBUGEDIT)
-
diff --git a/meta/packages/rpm/files/extcond.patch b/meta/packages/rpm/files/extcond.patch
deleted file mode 100644
index 6963b8606..000000000
--- a/meta/packages/rpm/files/extcond.patch
+++ /dev/null
@@ -1,78 +0,0 @@
-This patch supports an extension in the condition evaluation.
-If the condition is a format and returns an nonempty string, it is
-assumed to be true.
-This mechanism is used by the weakdeps patch to filter the
-"RPMSENSE_STRONG" flag.
-
---- ./rpmdb/header.c.orig 2005-06-06 23:33:54.000000000 +0000
-+++ ./rpmdb/header.c 2006-03-17 18:08:02.000000000 +0000
-@@ -2980,8 +2980,12 @@ static int parseExpression(headerSprintf
-
- *endPtr = chptr;
-
-+ token->u.cond.tag.type = NULL;
-+ token->u.cond.tag.format = "";
- token->type = PTOK_COND;
-
-+ if ((token->u.cond.tag.type = strchr(str, ':')) != 0)
-+ *token->u.cond.tag.type++ = 0;
- (void) findTag(hsa, token, str);
-
- return 0;
-@@ -3239,6 +3243,7 @@ static char * singleSprintf(headerSprint
- int_32 type;
- int_32 count;
- sprintfToken spft;
-+ sprintfTag stag;
- int condNumFormats;
- size_t need;
-
-@@ -3270,6 +3275,18 @@ static char * singleSprintf(headerSprint
- if (token->u.cond.tag.ext || headerIsEntry(hsa->h, token->u.cond.tag.tag)) {
- spft = token->u.cond.ifFormat;
- condNumFormats = token->u.cond.numIfTokens;
-+ if (token->u.cond.tag.fmt) {
-+ /* check if format creates output */
-+ size_t vallen = hsa->vallen;
-+ formatValue(hsa, &token->u.cond.tag, element);
-+ if (hsa->vallen == vallen) {
-+ spft = token->u.cond.elseFormat;
-+ condNumFormats = token->u.cond.numElseTokens;
-+ } else {
-+ hsa->vallen = vallen;
-+ hsa->val[hsa->vallen] = 0;
-+ }
-+ }
- } else {
- spft = token->u.cond.elseFormat;
- condNumFormats = token->u.cond.numElseTokens;
-@@ -3291,19 +3308,22 @@ static char * singleSprintf(headerSprint
- spft = token->u.array.format;
- for (i = 0; i < token->u.array.numTokens; i++, spft++)
- {
-- if (spft->type != PTOK_TAG ||
-- spft->u.tag.arrayCount ||
-- spft->u.tag.justOne) continue;
-+ if (spft->type != PTOK_TAG && spft->type != PTOK_COND)
-+ continue;
-+
-+ stag = (spft->type == PTOK_COND ? &spft->u.cond.tag : &spft->u.tag);
-+ if (stag->arrayCount || stag->justOne)
-+ continue;
-
-- if (spft->u.tag.ext) {
-+ if (stag->ext) {
- /*@-boundswrite@*/
-- if (getExtension(hsa, spft->u.tag.ext, &type, NULL, &count,
-- hsa->ec + spft->u.tag.extNum))
-+ if (getExtension(hsa, stag->ext, &type, NULL, &count,
-+ hsa->ec + stag->extNum))
- continue;
- /*@=boundswrite@*/
- } else {
- /*@-boundswrite@*/
-- if (!headerGetEntry(hsa->h, spft->u.tag.tag, &type, NULL, &count))
-+ if (!headerGetEntry(hsa->h, stag->tag, &type, NULL, &count))
- continue;
- /*@=boundswrite@*/
- }
diff --git a/meta/packages/rpm/files/external-tools.patch b/meta/packages/rpm/files/external-tools.patch
deleted file mode 100644
index 2b2ff701a..000000000
--- a/meta/packages/rpm/files/external-tools.patch
+++ /dev/null
@@ -1,108 +0,0 @@
-Index: rpm-4.4.2.3/configure.ac
-===================================================================
---- rpm-4.4.2.3.orig/configure.ac 2008-04-01 08:30:14.000000000 +0100
-+++ rpm-4.4.2.3/configure.ac 2008-08-17 10:57:30.000000000 +0100
-@@ -529,7 +529,7 @@
- WITH_MAGIC_INCLUDE=
- WITH_MAGIC_LIB=
-
--if test -d file ; then
-+if test -d file ; then
- WITH_RPMFILE=rpmfile
- WITH_MAGIC_SUBDIR=file
- WITH_MAGIC_INCLUDE="-I\${top_srcdir}/${WITH_MAGIC_SUBDIR}/src"
-@@ -1307,7 +1307,7 @@
- dnl # XXX Propagate -lucb to popt ...
- dnl export LIBS INCPATH CONFIG_SITE
-
--AC_CONFIG_SUBDIRS(popt file db3)
-+AC_CONFIG_SUBDIRS(db/dist file)
-
- AC_CONFIG_FILES([ Doxyfile Makefile rpmrc macros platform rpmpopt
- rpmio/Makefile rpmdb/Makefile lib/Makefile build/Makefile
-Index: rpm-4.4.2.3/db/dist/configure.ac
-===================================================================
---- rpm-4.4.2.3.orig/db/dist/configure.ac 2008-04-01 08:28:21.000000000 +0100
-+++ rpm-4.4.2.3/db/dist/configure.ac 2008-08-17 09:54:37.000000000 +0100
-@@ -11,14 +11,6 @@
- AC_CANONICAL_HOST()
- AC_ARG_PROGRAM()
-
--# Don't build in the top-level or dist directories.
--AC_MSG_CHECKING(if building in the top-level or dist directories)
--if [ test -d db_archive -o -f configure.ac ] ; then
-- AC_MSG_RESULT(yes)
-- AC_MSG_ERROR(
-- [Berkeley DB should not be built in the top-level or dist directories.])
--fi
--AC_MSG_RESULT(no)
-
- # Substitution variables.
- AC_SUBST(ADDITIONAL_INCS)
-@@ -281,7 +273,7 @@
- AC_PROG_LIBTOOL
-
- SOFLAGS="-rpath \$(libdir)"
--LIBTOOL_PROG="${SHELL} ./libtool"
-+LIBTOOL_PROG="${SHELL} ./$host_alias-libtool"
-
- # Set SOSUFFIX and friends
- SOSUFFIX_CONFIG
-@@ -297,7 +289,7 @@
- MAKEFILE_XSOLINK="\$(LIBTOOL) --mode=link ${MAKEFILE_CXXLINK} -avoid-version"
- MAKEFILE_CXXLINK="\$(LIBTOOL) --mode=link ${MAKEFILE_CXXLINK}"
-
--LIBTOOL="\$(SHELL) ./libtool"
-+LIBTOOL="\$(SHELL) ./$host_alias-libtool"
-
- case "$host_os" in
- cygwin* | mingw*)
-Index: rpm-4.4.2.3/db/dist/aclocal/options.ac
-===================================================================
---- rpm-4.4.2.3.orig/db/dist/aclocal/options.ac 2008-08-17 09:57:49.000000000 +0100
-+++ rpm-4.4.2.3/db/dist/aclocal/options.ac 2008-08-17 09:57:59.000000000 +0100
-@@ -277,10 +277,6 @@
-
- # Uniquename excludes C++, Java, RPC.
- if test "$db_cv_uniquename" = "yes"; then
-- if test "$db_cv_rpc" = "yes"; then
-- AC_MSG_ERROR(
-- [--with-uniquename is not compatible with --enable-rpc])
-- fi
- if test "$db_cv_cxx" = "yes"; then
- AC_MSG_ERROR(
- [--with-uniquename is not compatible with --enable-cxx])
-Index: rpm-4.4.2.3/db/dist/aclocal/rpc.ac
-===================================================================
---- rpm-4.4.2.3.orig/db/dist/aclocal/rpc.ac 2008-08-17 10:46:26.000000000 +0100
-+++ rpm-4.4.2.3/db/dist/aclocal/rpc.ac 2008-08-17 10:46:47.000000000 +0100
-@@ -60,6 +60,7 @@
- -e 's/^}/__dbsrv_timeout(0);}/' \
- -e '}' \
- -e '1,/^#include/s/^#include/#include "db_config.h"\
-+#include "db_int_def.h"\
- &/' > db_server_svc.c
-
- $RPCGEN -c $XDR_FILE |
-Index: rpm-4.4.2.3/tools/rpmfile.c
-===================================================================
---- rpm-4.4.2.3.orig/tools/rpmfile.c 2008-08-17 11:01:51.000000000 +0100
-+++ rpm-4.4.2.3/tools/rpmfile.c 2008-08-17 11:03:07.000000000 +0100
-@@ -29,7 +29,7 @@
- * file - find type of a file or files - main program.
- */
-
--#include "file.h"
-+#include "../file/src/file.h"
- #include "magic.h"
-
- #include <stdio.h>
-@@ -69,7 +69,7 @@
-
- #include <netinet/in.h> /* for byte swapping */
-
--#include "patchlevel.h"
-+#include "../file/src/patchlevel.h"
-
- #ifndef lint
- FILE_RCSID("@(#)$Id: file.c,v 1.96 2005/03/06 05:58:22 christos Exp $")
diff --git a/meta/packages/rpm/files/missingok.patch b/meta/packages/rpm/files/missingok.patch
deleted file mode 100644
index b008c9a02..000000000
--- a/meta/packages/rpm/files/missingok.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-Obey MISSINGOK flag for dependencies. Backport from rpm-4.4.7.
-
-Index: lib/depends.c
-===================================================================
---- lib/depends.c.orig 2008-04-01 08:28:22.000000000 +0100
-+++ lib/depends.c 2008-09-04 14:09:58.000000000 +0100
-@@ -593,8 +593,13 @@
- /*@=boundsread@*/
-
- unsatisfied:
-- rc = 1; /* dependency is unsatisfied */
-- rpmdsNotify(dep, NULL, rc);
-+ if (rpmdsFlags(dep) & RPMSENSE_MISSINGOK) {
-+ rc = 0; /* dependency is unsatisfied, but just a hint. */
-+ rpmdsNotify(dep, _("(hint skipped)"), rc);
-+ } else {
-+ rc = 1; /* dependency is unsatisfied */
-+ rpmdsNotify(dep, NULL, rc);
-+ }
-
- exit:
- /*
-@@ -963,6 +968,8 @@
- return "Requires(postun):";
- if (f & RPMSENSE_SCRIPT_VERIFY)
- return "Requires(verify):";
-+ if (f & RPMSENSE_MISSINGOK)
-+ return "Requires(hint):";
- if (f & RPMSENSE_FIND_REQUIRES)
- return "Requires(auto):";
- return "Requires:";
-Index: lib/rpmlib.h
-===================================================================
---- lib/rpmlib.h.orig 2008-09-03 22:22:43.000000000 +0100
-+++ lib/rpmlib.h 2008-09-04 15:17:17.000000000 +0100
-@@ -562,6 +562,8 @@
- RPMSENSE_SCRIPT_POSTUN | \
- RPMSENSE_SCRIPT_VERIFY | \
- RPMSENSE_FIND_REQUIRES | \
-+ RPMSENSE_MISSINGOK | \
-+ RPMSENSE_STRONG | \
- RPMSENSE_SCRIPT_PREP | \
- RPMSENSE_SCRIPT_BUILD | \
- RPMSENSE_SCRIPT_INSTALL | \
diff --git a/meta/packages/rpm/files/tagsbackport.patch b/meta/packages/rpm/files/tagsbackport.patch
deleted file mode 100644
index a2a360944..000000000
--- a/meta/packages/rpm/files/tagsbackport.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-Backported some new tags and sense values.
-
-Index: lib/rpmlib.h
-===================================================================
---- lib/rpmlib.h.orig 2008-08-26 17:07:12.000000000 +0100
-+++ lib/rpmlib.h 2008-08-26 17:22:21.000000000 +0100
-@@ -447,7 +447,19 @@
- RPMTAG_PRIORITY = 1162, /* i extension placeholder */
- RPMTAG_CVSID = 1163, /* s */
- #define RPMTAG_SVNID RPMTAG_CVSID /* s */
-+ RPMTAG_BLINKPKGID = 1164, /* s[] */
-+ RPMTAG_BLINKHDRID = 1165, /* s[] */
-+ RPMTAG_BLINKNEVRA = 1166, /* s[] */
-+ RPMTAG_FLINKPKGID = 1167, /* s[] */
-+ RPMTAG_FLINKHDRID = 1168, /* s[] */
-+ RPMTAG_FLINKNEVRA = 1169, /* s[] */
-+ RPMTAG_PACKAGEORIGIN = 1170, /* s */
- RPMTAG_TRIGGERPREIN = 1171, /*!< internal */
-+ RPMTAG_BUILDSUGGESTS = 1172, /*!< internal */
-+ RPMTAG_BUILDENHANCES = 1173, /*!< internal */
-+ RPMTAG_SCRIPTSTATES = 1174, /*!< i scriptlet exit codes */
-+ RPMTAG_SCRIPTMETRICS = 1175, /*!< i scriptlet execution times */
-+ RPMTAG_BUILDCPUCLOCK = 1176, /*!< i */
-
- /*@-enummemuse@*/
- RPMTAG_FIRSTFREE_TAG /*!< internal */
-@@ -531,7 +543,9 @@
- /*@=enummemuse@*/
- RPMSENSE_KEYRING = (1 << 26),
- RPMSENSE_STRONG = (1 << 27),
-- RPMSENSE_CONFIG = (1 << 28)
-+ RPMSENSE_CONFIG = (1 << 28),
-+ RPMSENSE_PROBE = (1 << 29),
-+ RPMSENSE_PACKAGE = (1 << 30)
- } rpmsenseFlags;
-
- #define RPMSENSE_SENSEMASK 15 /* Mask to get senses, ie serial, */
diff --git a/meta/packages/rpm/files/weakdeps.patch b/meta/packages/rpm/files/weakdeps.patch
deleted file mode 100644
index a013b7554..000000000
--- a/meta/packages/rpm/files/weakdeps.patch
+++ /dev/null
@@ -1,312 +0,0 @@
-Taken from OpenSUSE 11 rpm source file - RP 26/8/08
-
-Add support for weak dependencies:
-
-A) use RPMTAG_SUGGESTS and RPMTAG_ENHANCES to store them.
-
- This is different to upstream, which uses RPMSENSE_MISSINGOK
- and RPMTAG_REQUIRES/RPMTAG_PROVIDES instead. I chose different
- tags because I wanted to be compatible. The point is that
- applications that don't know about the new MISSINGOK semantics
- will mis-interpret the provides/requires otherwise, which
- I deemed to risky.
-
-B) use RPMSENSE_STRONG to support a "strong" version, "Recommends"
- instead of "Suggests" and "Supplements" instead of "Enhances".
-
-Needs extcond.diff for query operations.
-
-Index: build/parsePreamble.c
-===================================================================
---- build/parsePreamble.c.orig 2008-04-01 08:28:21.000000000 +0100
-+++ build/parsePreamble.c 2008-08-26 16:58:09.000000000 +0100
-@@ -129,6 +129,8 @@
- { "post", RPMSENSE_SCRIPT_POST },
- { "rpmlib", RPMSENSE_RPMLIB },
- { "verify", RPMSENSE_SCRIPT_VERIFY },
-+ { "hint", RPMSENSE_MISSINGOK },
-+ { "strong", RPMSENSE_STRONG },
- { NULL, 0 }
- };
-
-@@ -140,6 +142,8 @@
- { "build", RPMSENSE_SCRIPT_BUILD },
- { "install", RPMSENSE_SCRIPT_INSTALL },
- { "clean", RPMSENSE_SCRIPT_CLEAN },
-+ { "hint", RPMSENSE_MISSINGOK },
-+ { "strong", RPMSENSE_STRONG },
- { NULL, 0 }
- };
-
-@@ -692,6 +696,18 @@
- if ((rc = parseRCPOT(spec, pkg, field, tag, 0, tagflags)))
- return rc;
- break;
-+ case RPMTAG_SUGGESTSFLAGS:
-+ case RPMTAG_ENHANCESFLAGS:
-+ case RPMTAG_BUILDSUGGESTS:
-+ case RPMTAG_BUILDENHANCES:
-+ tagflags = RPMSENSE_MISSINGOK;
-+ if (macro && (!strcmp(macro, "recommends") || !strcmp(macro, "buildrecommends")))
-+ tagflags |= RPMSENSE_STRONG;
-+ if (macro && (!strcmp(macro, "supplements") || !strcmp(macro, "buildsupplements")))
-+ tagflags |= RPMSENSE_STRONG;
-+ if ((rc = parseRCPOT(spec, pkg, field, tag, 0, tagflags)))
-+ return rc;
-+ break;
- case RPMTAG_EXCLUDEARCH:
- case RPMTAG_EXCLUSIVEARCH:
- case RPMTAG_EXCLUDEOS:
-@@ -783,6 +799,14 @@
- {RPMTAG_DISTTAG, 0, 0, 0, "disttag"},
- {RPMTAG_CVSID, 0, 0, 0, "cvsid"},
- {RPMTAG_SVNID, 0, 0, 0, "svnid"},
-+ {RPMTAG_SUGGESTSFLAGS, 0, 0, 0, "recommends"},
-+ {RPMTAG_SUGGESTSFLAGS, 0, 0, 0, "suggests"},
-+ {RPMTAG_ENHANCESFLAGS, 0, 0, 0, "supplements"},
-+ {RPMTAG_ENHANCESFLAGS, 0, 0, 0, "enhances"},
-+ {RPMTAG_BUILDSUGGESTS, 0, 0, 0, "buildrecommends"},
-+ {RPMTAG_BUILDSUGGESTS, 0, 0, 0, "buildsuggests"},
-+ {RPMTAG_BUILDENHANCES, 0, 0, 0, "buildsupplements"},
-+ {RPMTAG_BUILDENHANCES, 0, 0, 0, "buildenhances"},
- /*@-nullassign@*/ /* LCL: can't add null annotation */
- {0, 0, 0, 0, 0}
- /*@=nullassign@*/
-Index: build/parseReqs.c
-===================================================================
---- build/parseReqs.c.orig 2008-04-01 08:28:21.000000000 +0100
-+++ build/parseReqs.c 2008-08-26 16:58:09.000000000 +0100
-@@ -85,6 +85,14 @@
- tagflags |= RPMSENSE_ANY;
- h = spec->buildRestrictions;
- break;
-+ case RPMTAG_SUGGESTSFLAGS:
-+ case RPMTAG_ENHANCESFLAGS:
-+ h = pkg->header;
-+ break;
-+ case RPMTAG_BUILDSUGGESTS:
-+ case RPMTAG_BUILDENHANCES:
-+ h = spec->buildRestrictions;
-+ break;
- default:
- case RPMTAG_REQUIREFLAGS:
- tagflags |= RPMSENSE_ANY;
-Index: build/reqprov.c
-===================================================================
---- build/reqprov.c.orig 2008-04-01 08:28:21.000000000 +0100
-+++ build/reqprov.c 2008-08-26 16:58:09.000000000 +0100
-@@ -48,6 +48,16 @@
- flagtag = RPMTAG_TRIGGERFLAGS;
- indextag = RPMTAG_TRIGGERINDEX;
- extra = Flags & RPMSENSE_TRIGGER;
-+ } else if (tagN == RPMTAG_SUGGESTSFLAGS || tagN == RPMTAG_BUILDSUGGESTS) {
-+ nametag = RPMTAG_SUGGESTSNAME;
-+ versiontag = RPMTAG_SUGGESTSVERSION;
-+ flagtag = RPMTAG_SUGGESTSFLAGS;
-+ extra = Flags & _ALL_REQUIRES_MASK;
-+ } else if (tagN == RPMTAG_ENHANCESFLAGS || tagN == RPMTAG_BUILDENHANCES) {
-+ nametag = RPMTAG_ENHANCESNAME;
-+ versiontag = RPMTAG_ENHANCESVERSION;
-+ flagtag = RPMTAG_ENHANCESFLAGS;
-+ extra = Flags & _ALL_REQUIRES_MASK;
- } else {
- nametag = RPMTAG_REQUIRENAME;
- versiontag = RPMTAG_REQUIREVERSION;
-Index: build/rpmfc.c
-===================================================================
---- build/rpmfc.c.orig 2008-04-01 08:28:21.000000000 +0100
-+++ build/rpmfc.c 2008-08-26 16:58:09.000000000 +0100
-@@ -1385,6 +1385,12 @@
- { "Obsoletes", { "%{?__find_obsoletes}", NULL, NULL, NULL },
- RPMTAG_OBSOLETENAME, RPMTAG_OBSOLETEVERSION, RPMTAG_OBSOLETEFLAGS,
- 0, -1 },
-+ { "Enhances", { "%{?__find_enhances}", NULL, NULL, NULL },
-+ RPMTAG_ENHANCESNAME, RPMTAG_ENHANCESVERSION, RPMTAG_ENHANCESFLAGS,
-+ RPMSENSE_STRONG, RPMSENSE_STRONG },
-+ { "Supplements", { "%{?__find_supplements}", NULL, NULL, NULL },
-+ RPMTAG_ENHANCESNAME, RPMTAG_ENHANCESVERSION, RPMTAG_ENHANCESFLAGS,
-+ RPMSENSE_STRONG, 0 },
- { NULL, { NULL, NULL, NULL, NULL }, 0, 0, 0, 0, 0 }
- };
-
-@@ -1480,6 +1486,14 @@
- failnonzero = 0;
- tagflags = RPMSENSE_FIND_REQUIRES;
- /*@switchbreak@*/ break;
-+ case RPMTAG_ENHANCESFLAGS:
-+ if (!pkg->autoProv)
-+ continue;
-+ failnonzero = 0;
-+ tagflags = RPMSENSE_FIND_REQUIRES | RPMSENSE_MISSINGOK;
-+ if (strcmp(dm->msg, "Supplements") == 0)
-+ tagflags |= RPMSENSE_STRONG;
-+ /*@switchbreak@*/ break;
- default:
- continue;
- /*@notreached@*/ /*@switchbreak@*/ break;
-Index: lib/rpmlib.h
-===================================================================
---- lib/rpmlib.h.orig 2008-04-01 08:28:22.000000000 +0100
-+++ lib/rpmlib.h 2008-08-26 17:00:37.000000000 +0100
-@@ -530,7 +530,7 @@
- RPMSENSE_TRIGGERPREIN = (1 << 25), /*!< @todo Implement %triggerprein. */
- /*@=enummemuse@*/
- RPMSENSE_KEYRING = (1 << 26),
-- RPMSENSE_PATCHES = (1 << 27),
-+ RPMSENSE_STRONG = (1 << 27),
- RPMSENSE_CONFIG = (1 << 28)
- } rpmsenseFlags;
-
-Index: python/rpmmodule.c
-===================================================================
---- python/rpmmodule.c.orig 2008-04-01 08:28:22.000000000 +0100
-+++ python/rpmmodule.c 2008-08-26 16:58:09.000000000 +0100
-@@ -433,7 +433,7 @@
- REGISTER_ENUM(RPMSENSE_RPMLIB);
- REGISTER_ENUM(RPMSENSE_TRIGGERPREIN);
- REGISTER_ENUM(RPMSENSE_KEYRING);
-- REGISTER_ENUM(RPMSENSE_PATCHES);
-+ REGISTER_ENUM(RPMSENSE_STRONG);
- REGISTER_ENUM(RPMSENSE_CONFIG);
-
- REGISTER_ENUM(RPMTRANS_FLAG_TEST);
-Index: lib/rpmds.c
-===================================================================
---- lib/rpmds.c.orig 2008-04-01 08:28:22.000000000 +0100
-+++ lib/rpmds.c 2008-08-26 16:58:09.000000000 +0100
-@@ -320,6 +320,11 @@
- tagEVR = RPMTAG_TRIGGERVERSION;
- tagF = RPMTAG_TRIGGERFLAGS;
- } else
-+ if (tagN == RPMTAG_ENHANCESNAME) {
-+ Type = "Enhances";
-+ tagEVR = RPMTAG_ENHANCESVERSION;
-+ tagF = RPMTAG_ENHANCESFLAGS;
-+ } else
- goto exit;
-
- /*@-branchstate@*/
-Index: rpmpopt.in
-===================================================================
---- rpmpopt.in.orig 2008-04-01 08:28:22.000000000 +0100
-+++ rpmpopt.in 2008-08-26 16:58:09.000000000 +0100
-@@ -68,6 +68,22 @@
- --POPTdesc=$"list capabilities required by package(s)"
- rpm alias -R --requires
-
-+rpm alias --suggests --qf \
-+ "[%|SUGGESTSFLAGS:depflag_strong?{}:{%{SUGGESTSNAME} %{SUGGESTSFLAGS:depflags} %{SUGGESTSVERSION}\n}|]" \
-+ --POPTdesc=$"list capabilities this package suggests"
-+
-+rpm alias --recommends --qf \
-+ "[%|SUGGESTSFLAGS:depflag_strong?{%{SUGGESTSNAME} %{SUGGESTSFLAGS:depflags} %{SUGGESTSVERSION}\n}|]" \
-+ --POPTdesc=$"list capabilities this package recommends"
-+
-+rpm alias --enhances --qf \
-+ "[%|ENHANCESFLAGS:depflag_strong?{}:{%{ENHANCESNAME} %{ENHANCESFLAGS:depflags} %{ENHANCESVERSION}\n}|]" \
-+ --POPTdesc=$"list capabilities this package enhances"
-+
-+rpm alias --supplements --qf \
-+ "[%|ENHANCESFLAGS:depflag_strong?{%{ENHANCESNAME} %{ENHANCESFLAGS:depflags} %{ENHANCESVERSION}\n}|]" \
-+ --POPTdesc=$"list capabilities this package supplements"
-+
- rpm alias --info --qf 'Name : %-27{NAME} Relocations: %|PREFIXES?{[%{PREFIXES} ]}:{(not relocatable)}|\n\
- Version : %-27{VERSION} Vendor: %{VENDOR}\n\
- Release : %-27{RELEASE} Build Date: %{BUILDTIME:date}\n\
-@@ -351,6 +367,22 @@
- --POPTdesc=$"list capabilities required by package(s)"
- rpmq alias -R --requires
-
-+rpmq alias --suggests --qf \
-+ "[%|SUGGESTSFLAGS:depflag_strong?{}:{%{SUGGESTSNAME} %{SUGGESTSFLAGS:depflags} %{SUGGESTSVERSION}\n}|]" \
-+ --POPTdesc=$"list capabilities this package suggests"
-+
-+rpmq alias --recommends --qf \
-+ "[%|SUGGESTSFLAGS:depflag_strong?{%{SUGGESTSNAME} %{SUGGESTSFLAGS:depflags} %{SUGGESTSVERSION}\n}|]" \
-+ --POPTdesc=$"list capabilities this package recommends"
-+
-+rpmq alias --enhances --qf \
-+ "[%|ENHANCESFLAGS:depflag_strong?{}:{%{ENHANCESNAME} %{ENHANCESFLAGS:depflags} %{ENHANCESVERSION}\n}|]" \
-+ --POPTdesc=$"list capabilities this package enhances"
-+
-+rpmq alias --supplements --qf \
-+ "[%|ENHANCESFLAGS:depflag_strong?{%{ENHANCESNAME} %{ENHANCESFLAGS:depflags} %{ENHANCESVERSION}\n}|]" \
-+ --POPTdesc=$"list capabilities this package supplements"
-+
- rpmq alias --info --qf 'Name : %-27{NAME} Relocations: %|PREFIXES?{[%{PREFIXES} ]}:{(not relocatable)}|\n\
- Version : %-27{VERSION} Vendor: %{VENDOR}\n\
- Release : %-27{RELEASE} Build Date: %{BUILDTIME:date}\n\
-@@ -452,6 +484,22 @@
- --POPTdesc=$"list capabilities required by package(s)"
- rpmquery alias -R --requires
-
-+rpmquery alias --suggests --qf \
-+ "[%|SUGGESTSFLAGS:depflag_strong?{}:{%{SUGGESTSNAME} %{SUGGESTSFLAGS:depflags} %{SUGGESTSVERSION}\n}|]" \
-+ --POPTdesc=$"list capabilities this package suggests"
-+
-+rpmquery alias --recommends --qf \
-+ "[%|SUGGESTSFLAGS:depflag_strong?{%{SUGGESTSNAME} %{SUGGESTSFLAGS:depflags} %{SUGGESTSVERSION}\n}|]" \
-+ --POPTdesc=$"list capabilities this package recommends"
-+
-+rpmquery alias --enhances --qf \
-+ "[%|ENHANCESFLAGS:depflag_strong?{}:{%{ENHANCESNAME} %{ENHANCESFLAGS:depflags} %{ENHANCESVERSION}\n}|]" \
-+ --POPTdesc=$"list capabilities this package enhances"
-+
-+rpmquery alias --supplements --qf \
-+ "[%|ENHANCESFLAGS:depflag_strong?{%{ENHANCESNAME} %{ENHANCESFLAGS:depflags} %{ENHANCESVERSION}\n}|]" \
-+ --POPTdesc=$"list capabilities this package supplements"
-+
- rpmquery alias --info --qf 'Name : %-27{NAME} Relocations: %|PREFIXES?{[%{PREFIXES} ]}:{(not relocatable)}|\n\
- Version : %-27{VERSION} Vendor: %{VENDOR}\n\
- Release : %-27{RELEASE} Build Date: %{BUILDTIME:date}\n\
-Index: lib/formats.c
-===================================================================
---- lib/formats.c.orig 2008-04-01 08:28:22.000000000 +0100
-+++ lib/formats.c 2008-08-26 16:58:09.000000000 +0100
-@@ -543,6 +543,38 @@
- return val;
- }
-
-+static /*@only@*/ char * depflag_strongFormat(int_32 type, const void * data,
-+ char * formatPrefix, int padding, /*@unused@*/ int element)
-+ /*@modifies formatPrefix @*/
-+ /*@requires maxRead(data) >= 0 @*/
-+{
-+ char * val;
-+ char buf[10];
-+ int anint;
-+
-+ if (type != RPM_INT32_TYPE) {
-+ val = xstrdup(_("(not a number)"));
-+ } else {
-+ anint = *((int_32 *) data);
-+ buf[0] = '\0';
-+
-+/*@-boundswrite@*/
-+ if (anint & RPMSENSE_STRONG)
-+ strcat(buf, "strong");
-+/*@=boundswrite@*/
-+
-+ val = xmalloc(7 + padding);
-+/*@-boundswrite@*/
-+ strcat(formatPrefix, "s");
-+/*@=boundswrite@*/
-+ /*@-formatconst@*/
-+ sprintf(val, formatPrefix, buf);
-+ /*@=formatconst@*/
-+ }
-+
-+ return val;
-+}
-+
- /**
- * Retrieve mounted file system paths.
- * @param h header
-@@ -1171,6 +1203,7 @@
- { HEADER_EXT_FORMAT, "base64", { base64Format } },
- { HEADER_EXT_FORMAT, "pgpsig", { pgpsigFormat } },
- { HEADER_EXT_FORMAT, "depflags", { depflagsFormat } },
-+ { HEADER_EXT_FORMAT, "depflag_strong", { depflag_strongFormat } },
- { HEADER_EXT_FORMAT, "fflags", { fflagsFormat } },
- { HEADER_EXT_FORMAT, "perms", { permsFormat } },
- { HEADER_EXT_FORMAT, "permissions", { permsFormat } },
diff --git a/meta/packages/rpm/rpm-native_4.4.2.3.bb b/meta/packages/rpm/rpm-native_4.4.2.3.bb
deleted file mode 100644
index 8a59289b1..000000000
--- a/meta/packages/rpm/rpm-native_4.4.2.3.bb
+++ /dev/null
@@ -1,6 +0,0 @@
-require rpm_${PV}.bb
-inherit native
-
-DEPENDS = "beecrypt-native zlib-native file-native popt-native python-native gettext-native"
-
-export varprefix = "${localstatedir}"
diff --git a/meta/packages/rpm/rpm/remove-compiled-tests.patch b/meta/packages/rpm/rpm/remove-compiled-tests.patch
new file mode 100644
index 000000000..69b7130b9
--- /dev/null
+++ b/meta/packages/rpm/rpm/remove-compiled-tests.patch
@@ -0,0 +1,440 @@
+Index: rpm-5.1.9/configure.ac
+===================================================================
+--- rpm-5.1.9.orig/configure.ac 2009-04-18 17:47:02.000000000 +0100
++++ rpm-5.1.9/configure.ac 2010-07-06 14:47:28.985462456 +0100
+@@ -643,38 +643,22 @@
+ dnl look for libc features
+ PROVIDES_ERRNO=no
+ AC_MSG_CHECKING(if <netdb.h> defines h_errno)
+-AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <netdb.h>]], [[printf("%d",h_errno)]])],[PROVIDES_ERRNO=yes],[])
+-AC_MSG_RESULT($PROVIDES_ERRNO)
+-if test $PROVIDES_ERRNO = yes; then
+- AC_DEFINE(HAVE_HERRNO, 1, [ Define as 1 if <netdb.h> defines h_errno])
+-fi
++AC_DEFINE(HAVE_HERRNO, 1, [ Define as 1 if <netdb.h> defines h_errno])
+
+ dnl If a system doesn't have S_IFSOCK, define it as 0 which will
+ dnl make S_ISSOCK always return false (nice, eh?)
+ AC_MSG_CHECKING(if <sys/stat.h> defines S_IFSOCK)
+-AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <sys/stat.h>]], [[printf("%d", S_IFSOCK)]])],[HAS_S_IFSOCK=yes],[HAS_S_IFSOCK=no])
+-AC_MSG_RESULT($HAS_S_IFSOCK)
+-if test $HAS_S_IFSOCK = yes; then
+- AC_DEFINE(HAVE_S_IFSOCK, 1, [Define as 1 if <sys/stat.h> defines S_IFSOCK])
+-fi
++AC_DEFINE(HAVE_S_IFSOCK, 1, [Define as 1 if <sys/stat.h> defines S_IFSOCK])
+
+ dnl Some Unix's are missing S_ISLNK, S_ISSOCK
+ AC_MSG_CHECKING(if <sys/stat.h> defines S_ISLNK)
+-AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <sys/stat.h>]], [[printf("%d", S_ISLNK(0755))]])],[HAS_S_ISLNK=yes],[HAS_S_ISLNK=no])
+-AC_MSG_RESULT($HAS_S_ISLNK)
+-if test $HAS_S_ISLNK = yes; then
+- AC_DEFINE(HAVE_S_ISLNK, 1, [Define as 1 if <sys/stat.h> defines S_ISLNK])
+-fi
++AC_DEFINE(HAVE_S_ISLNK, 1, [Define as 1 if <sys/stat.h> defines S_ISLNK])
+
+ AC_MSG_CHECKING(if <sys/stat.h> defines S_ISSOCK)
+-AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <sys/stat.h>]], [[printf("%d", S_ISSOCK(0755))]])],[HAS_S_ISSOCK=yes],[HAS_S_ISSOCK=no])
+-AC_MSG_RESULT($HAS_S_ISSOCK)
+-if test $HAS_S_ISSOCK = yes; then
+- AC_DEFINE(HAVE_S_ISSOCK, 1, [Define as 1 if <sys/stat.h> defines S_ISSOCK])
+-fi
++AC_DEFINE(HAVE_S_ISSOCK, 1, [Define as 1 if <sys/stat.h> defines S_ISSOCK])
+
+ AC_MSG_CHECKING(if timezone is defined)
+-AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <time.h>]], [[printf("%ld", timezone)]])],[HAS_TIMEZONE=yes],[HAS_TIMEZONE=no])
++$HAS_TIMEZONE=yes
+ AC_MSG_RESULT($HAS_TIMEZONE)
+
+ dnl check for missing typedefs
+@@ -726,53 +710,12 @@
+ AC_MSG_RESULT(yes)
+ AC_CHECK_HEADERS([libelf.h gelf.h])
+ if test ".$ac_cv_header_libelf_h" = .no; then
+- dnl # <libelf.h> on Solaris is incompatible with LFS. If we couldn't
+- dnl # include <libelf.h>, see if we can when _FILE_OFFSET_BITS is
+- dnl # set for non-LFS. Same applies for <gelf.h>, since it probably
+- dnl # includes <libelf.h>
+- AC_MSG_CHECKING([if libelf.h conflicts with _LARGEFILE_SOURCE])
+- AC_COMPILE_IFELSE([
+- AC_LANG_PROGRAM([[
+-#undef _LARGEFILE64_SOURCE
+-#undef _LARGEFILE_SOURCE
+-#if !defined(_LP64)
+-# undef _FILE_OFFSET_BITS
+-# define _FILE_OFFSET_BITS 32
+-#endif
+-#include <libelf.h>
+- ]], [[
+- Elf_Data foo;
+- ]])
+- ], [
+- AC_DEFINE(HAVE_LIBELF_H, 1, [Define to 1 if you have libelf.h])
+- ac_cv_header_libelf_h=yes
+- AC_DEFINE(LIBELF_H_LFS_CONFLICT, 1, [Define to 1 if libelf.h is incompatible with LFS API])
+- AC_MSG_RESULT(yes)
+- ], [
+- AC_MSG_RESULT(no)
+- ])
++ AC_DEFINE(HAVE_LIBELF_H, 1, [Define to 1 if you have libelf.h])
++ ac_cv_header_libelf_h=yes
+ fi
+ if test ".$ac_cv_header_gelf_h" = .no; then
+- AC_MSG_CHECKING([if gelf.h conflicts with _LARGEFILE_SOURCE])
+- AC_COMPILE_IFELSE([
+- AC_LANG_PROGRAM([[
+-#undef _LARGEFILE64_SOURCE
+-#undef _LARGEFILE_SOURCE
+-#if !defined(_LP64)
+-# undef _FILE_OFFSET_BITS
+-# define _FILE_OFFSET_BITS 32
+-#endif
+-#include <gelf.h>
+- ]], [[
+- Elf32_Verdef foo;
+- ]])
+- ], [
+- AC_DEFINE(HAVE_GELF_H, 1, [Define to 1 if you have gelf.h])
+- ac_cv_header_gelf_h=yes
+- AC_MSG_RESULT(yes)
+- ], [
+- AC_MSG_RESULT(no)
+- ])
++ AC_DEFINE(HAVE_GELF_H, 1, [Define to 1 if you have gelf.h])
++ ac_cv_header_gelf_h=yes
+ fi
+ if test ".$ac_cv_header_gelf_h" = .yes; then
+ AC_CHECK_LIB([elf], [elf_version], [
+@@ -854,78 +797,9 @@
+ python_version=""
+ ;;
+ esac
+- for python_ver in $python_version ; do
+- if test "$python_ver" != "2.x" ; then
+- AC_MSG_CHECKING([for Python ${python_ver} API])
+- save_CFLAGS="${CFLAGS}"
+- for i in "$prefix" "/usr/local" "/usr"; do
+- CFLAGS="${save_CFLAGS} -I$i/include/python${python_ver}"
+- AC_RUN_IFELSE([AC_LANG_SOURCE(
+- [[#include "Python.h"
+- main() { exit(strncmp("${python_ver}", PY_VERSION, 3)); } ]])
+- ], [
+- PYTHON_VERSION="${python_ver}"
+- AC_MSG_RESULT(yes)
+- PYTHON_PREFIX="${i}"
+- break
+- ], [
+- ], [
+- dnl if we're cross compiling, assume the user has a clue
+- if test "$withval" = "$python_ver"; then
+- PYTHON_VERSION="${python_ver}"
+- AC_MSG_RESULT(yes)
+- break
+- fi
+- ])
+- done
+- CFLAGS="${save_CFLAGS}"
+- if test ".$PYTHON_VERSION" == "."; then
+- dnl check Mac OS X framework
+- save_CFLAGS="${CFLAGS}"
+- for f in "~" "" "/System" "/Network"; do
+- CFLAGS="${save_CFLAGS} -I$f/Library/Frameworks/Python.framework/Versions/${python_ver}/include/python${python_ver}"
+- AC_RUN_IFELSE([AC_LANG_SOURCE(
+- [[#include "Python.h"
+- main() { exit(strncmp("${python_ver}", PY_VERSION, 3)); } ]])
+- ], [
+- PYTHON_VERSION="${python_ver}"
+- AC_MSG_RESULT([yes (using Python.framework)])
+- PYTHON_PREFIX="$f/Library/Frameworks/Python.framework/Versions/${python_ver}"
+- break
+- ], [
+- ])
+- done
+- CFLAGS="${save_CFLAGS}"
+- fi
+- if test ".$PYTHON_VERSION" == "."; then
+- AC_MSG_RESULT(no)
+- fi
+- else
+- AC_MSG_CHECKING([for Python 2.x API])
+- AC_RUN_IFELSE([AC_LANG_SOURCE(
+- [[#include <python/Python.h>
+- main() { exit(strncmp("2.", PY_VERSION, 2)); } ]])
+- ], [
+- PYTHON_VERSION=""
+- AC_MSG_RESULT(yes)
+- ], [
+- AC_MSG_RESULT(no)
+- ], [
+- dnl if we're cross compiling, assume the user has a clue
+- if test "$withval" = "$python_ver"; then
+- PYTHON_VERSION="${python_ver}"
+- AC_MSG_RESULT(yes)
+- else
+- AC_MSG_RESULT(no)
+- fi
+- ])
+- fi
+- if test ".$PYTHON_VERSION" != "."; then
+- WITH_PYTHON_SUBDIR=python
+- WITH_PYTHON_SUBPACKAGE=1
+- break
+- fi
+- done
++ PYTHON_VERSION="${python_ver}"
++ WITH_PYTHON_SUBDIR=python
++ WITH_PYTHON_SUBPACKAGE=1
+ fi
+ AC_ARG_WITH(python-inc-dir, AS_HELP_STRING([--with-python-inc-dir=DIR], [directory with Python include files]),
+ [WITH_PYTHON_INCDIR="$withval"], [WITH_PYTHON_INCDIR="`(python -c 'from distutils.sysconfig import get_python_inc; print get_python_inc()') 2>/dev/null`"])
+@@ -1157,15 +1031,8 @@
+ AC_SUBST(WITH_PCRE_LIBS)
+ else
+ dnl # make sure PCRE POSIX API can be really _USED_ by RPM
+- LIBS_SAVED="$LIBS"
+ LIBS="-lpcreposix $LIBS"
+- AC_LINK_IFELSE([
+- AC_LANG_PROGRAM([#include <pcreposix.h>], [(void)regcomp(0, 0, 0)])
+- ], [
+- AC_DEFINE(WITH_PCRE_POSIX, 1, [Define as 1 if PCRE's POSIX API is available])
+- ], [
+- LIBS="$LIBS_SAVED"
+- ])
++ AC_DEFINE(WITH_PCRE_POSIX, 1, [Define as 1 if PCRE's POSIX API is available])
+ fi
+ dnl # enable PCRE native API support for embedded Lua
+ if test ".$WITH_LUA" = .yes; then
+@@ -1234,30 +1101,7 @@
+
+ dnl # figure out what root's primary group is
+ AC_MSG_CHECKING([root's primary group])
+-AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h>
+-#include <sys/types.h>
+-#include <pwd.h>
+-#include <grp.h>
+-int main()
+-{
+- struct passwd *root = NULL;
+- struct group *roots_group = NULL;
+- FILE * tempfile = NULL;
+- root = getpwuid( (uid_t) 0 );
+- if (root != NULL) {
+- roots_group = getgrgid(root->pw_gid);
+- if (roots_group != NULL) {
+- tempfile = fopen("conftest_rootg", "w");
+- if (tempfile != NULL) {
+- fprintf(tempfile, "%s\n", roots_group->gr_name);
+- fclose(tempfile);
+- exit(0);
+- }
+- }
+- }
+- exit(1);
+-}]])],[ROOT_GROUP=`cat conftest_rootg`; rm -f conftest_rootg],[ROOT_GROUP="root"],[ROOT_GROUP="root"
+-])
++$ROOT_GROUP="root"
+ AC_MSG_RESULT([$ROOT_GROUP])
+ AC_SUBST(ROOT_GROUP)
+
+Index: rpm-5.1.9/pcre/configure.ac
+===================================================================
+--- rpm-5.1.9.orig/pcre/configure.ac 2009-01-14 20:19:31.000000000 +0000
++++ rpm-5.1.9/pcre/configure.ac 2010-07-06 14:51:50.769586089 +0100
+@@ -278,34 +278,6 @@
+ # The files below are C++ header files.
+ pcre_have_type_traits="0"
+ pcre_have_bits_type_traits="0"
+-if test "x$enable_cpp" = "xyes" -a -n "$CXX"
+-then
+-AC_LANG_PUSH(C++)
+-
+-# Older versions of pcre defined pcrecpp::no_arg, but in new versions
+-# it's called pcrecpp::RE::no_arg. For backwards ABI compatibility,
+-# we want to make one an alias for the other. Different systems do
+-# this in different ways. Some systems, for instance, can do it via
+-# a linker flag: -alias (for os x 10.5) or -i (for os x <=10.4).
+-OLD_LDFLAGS="$LDFLAGS"
+-for flag in "-alias,__ZN7pcrecpp2RE6no_argE,__ZN7pcrecpp6no_argE" \
+- "-i__ZN7pcrecpp6no_argE:__ZN7pcrecpp2RE6no_argE"; do
+- AC_MSG_CHECKING([for alias support in the linker])
+- LDFLAGS="$OLD_LDFLAGS -Wl,$flag"
+- # We try to run the linker with this new ld flag. If the link fails,
+- # we give up and remove the new flag from LDFLAGS.
+- AC_LINK_IFELSE(AC_LANG_PROGRAM([namespace pcrecpp {
+- class RE { static int no_arg; };
+- int RE::no_arg;
+- }],
+- []),
+- [AC_MSG_RESULT([yes]);
+- EXTRA_LIBPCRECPP_LDFLAGS="$EXTRA_LIBPCRECPP_LDFLAGS -Wl,$flag";
+- break;],
+- AC_MSG_RESULT([no]))
+-done
+-LDFLAGS="$OLD_LDFLAGS"
+-
+ # We could be more clever here, given we're doing AC_SUBST with this
+ # (eg set a var to be the name of the include file we want). But we're not
+ # so it's easy to change back to 'regular' autoconf vars if we needed to.
+@@ -316,7 +288,6 @@
+ AC_CHECK_HEADERS(type_traits.h, [pcre_have_type_traits="1"],
+ [pcre_have_type_traits="0"])
+
+-AC_LANG_POP
+ fi
+ # Using AC_SUBST eliminates the need to include config.h in a public .h file
+ AC_SUBST(pcre_have_type_traits)
+Index: rpm-5.1.9/db/dist/configure.ac
+===================================================================
+--- rpm-5.1.9.orig/db/dist/configure.ac 2008-06-15 08:16:21.000000000 +0100
++++ rpm-5.1.9/db/dist/configure.ac 2010-07-06 15:36:39.262461127 +0100
+@@ -602,24 +602,6 @@
+ aux*) AC_LIBOBJ([getopt]);;
+ esac
+
+-# Linux has a broken O_DIRECT flag, but you can't detect it at configure time.
+-# Linux and SGI require buffer alignment we may not match, otherwise writes
+-# will fail. Default to not using the O_DIRECT flag.
+-if test "$db_cv_o_direct" = "yes"; then
+- AC_CACHE_CHECK([for open/O_DIRECT], db_cv_open_o_direct, [
+- AC_TRY_LINK([
+- #include <sys/types.h>
+- #include <fcntl.h>], [
+- open("a", O_RDONLY | O_DIRECT, 0);
+- ], [db_cv_open_o_direct=yes], [db_cv_open_o_direct=no])])
+- if test \
+- "$db_cv_o_direct" = "yes" -a "$db_cv_open_o_direct" = "yes"; then
+- AC_DEFINE(HAVE_O_DIRECT)
+- AH_TEMPLATE(HAVE_O_DIRECT,
+- [Define to 1 if you have the O_DIRECT flag.])
+- fi
+-fi
+-
+ # Check for largefile support.
+ AC_SYS_LARGEFILE
+
+Index: rpm-5.1.9/xz/configure.ac
+===================================================================
+--- rpm-5.1.9.orig/xz/configure.ac 2009-02-16 17:07:46.000000000 +0000
++++ rpm-5.1.9/xz/configure.ac 2010-07-06 15:41:22.632467951 +0100
+@@ -457,26 +457,9 @@
+ #endif
+ ])
+
+-# Even if we have byteswap.h, we may lack the specific macros/functions.
+-if test x$ac_cv_header_byteswap_h = xyes ; then
+- m4_foreach([FUNC], [bswap_16,bswap_32,bswap_64], [
+- AC_MSG_CHECKING([if FUNC is available])
+- AC_LINK_IFELSE([AC_LANG_SOURCE([
+-#include <byteswap.h>
+-int
+-main(void)
+-{
+- FUNC[](42);
+- return 0;
+-}
+- ])], [
+- AC_DEFINE(HAVE_[]m4_toupper(FUNC), [1],
+- [Define to 1 if] FUNC [is available.])
+- AC_MSG_RESULT([yes])
+- ], [AC_MSG_RESULT([no])])
+-
+- ])dnl
+-fi
++AC_DEFINE(HAVE_BSWAP_16, 1)
++AC_DEFINE(HAVE_BSWAP_32, 1)
++AC_DEFINE(HAVE_BSWAP_64, 1)
+
+
+ ###############################################################################
+@@ -527,90 +510,16 @@
+ # xz command line tool uses this to automatically limit its memory usage.
+ # - sysconf() gives all the needed info on GNU+Linux and Solaris.
+ # - BSDs use sysctl().
+-AC_MSG_CHECKING([how to detect the amount of physical memory])
+-AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
+-#include <unistd.h>
+-int
+-main()
+-{
+- long i;
+- i = sysconf(_SC_PAGESIZE);
+- i = sysconf(_SC_PHYS_PAGES);
+- return 0;
+-}
+-]])], [
+- AC_DEFINE([HAVE_PHYSMEM_SYSCONF], [1],
++AC_DEFINE([HAVE_PHYSMEM_SYSCONF], [1],
+ [Define to 1 if the amount of physical memory can be detected
+ with sysconf(_SC_PAGESIZE) and sysconf(_SC_PHYS_PAGES).])
+- AC_MSG_RESULT([sysconf])
+-], [
+-AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
+-#include <sys/types.h>
+-#ifdef HAVE_SYS_PARAM_H
+-# include <sys/param.h>
+-#endif
+-#include <sys/sysctl.h>
+-int
+-main()
+-{
+- int name[2] = { CTL_HW, HW_PHYSMEM };
+- unsigned long mem;
+- size_t mem_ptr_size = sizeof(mem);
+- sysctl(name, 2, &mem, &mem_ptr_size, NULL, NULL);
+- return 0;
+-}
+-]])], [
+- AC_DEFINE([HAVE_PHYSMEM_SYSCTL], [1],
+- [Define to 1 if the amount of physical memory can be detected
+- with sysctl().])
+- AC_MSG_RESULT([sysctl])
+-], [
+- AC_MSG_RESULT([unknown])
+-])])
+
+ # Check how to find out the number of available CPU cores in the system.
+ # sysconf(_SC_NPROCESSORS_ONLN) works on most systems, except that BSDs
+ # use sysctl().
+-AC_MSG_CHECKING([how to detect the number of available CPU cores])
+-AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
+-#include <unistd.h>
+-int
+-main()
+-{
+- long i;
+- i = sysconf(_SC_NPROCESSORS_ONLN);
+- return 0;
+-}
+-]])], [
+- AC_DEFINE([HAVE_NCPU_SYSCONF], [1],
++AC_DEFINE([HAVE_NCPU_SYSCONF], [1],
+ [Define to 1 if the number of available CPU cores can be
+ detected with sysconf(_SC_NPROCESSORS_ONLN).])
+- AC_MSG_RESULT([sysconf])
+-], [
+-AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
+-#include <sys/types.h>
+-#ifdef HAVE_SYS_PARAM_H
+-# include <sys/param.h>
+-#endif
+-#include <sys/sysctl.h>
+-int
+-main()
+-{
+- int name[2] = { CTL_HW, HW_NCPU };
+- int cpus;
+- size_t cpus_size = sizeof(cpus);
+- sysctl(name, 2, &cpus, &cpus_size, NULL, NULL);
+- return 0;
+-}
+-]])], [
+- AC_DEFINE([HAVE_NCPU_SYSCTL], [1],
+- [Define to 1 if the number of available CPU cores can be
+- detected with sysctl().])
+- AC_MSG_RESULT([sysctl])
+-], [
+- AC_MSG_RESULT([unknown])
+-])])
+-
+
+ ###############################################################################
+ # If using GCC, set some additional CFLAGS:
diff --git a/meta/packages/rpm/rpm_4.4.2.3.bb b/meta/packages/rpm/rpm_4.4.2.3.bb
deleted file mode 100644
index 660565002..000000000
--- a/meta/packages/rpm/rpm_4.4.2.3.bb
+++ /dev/null
@@ -1,117 +0,0 @@
-DESCRIPTION = "The RPM Package Manager."
-HOMEPAGE = "http://rpm.org/"
-BUGTRACKER = "http://rpm.org/report"
-
-# library is covered under dual license of GPL | LGPL
-LICENSE = "(LGPLv2+ | GPLv2+) & GPLv2+"
-
-DEPENDS = "zlib beecrypt file popt python"
-PR = "r16"
-
-SRC_URI = "http://www.rpm.org/releases/rpm-4.4.x/rpm-4.4.2.3.tar.gz \
- file://external-tools.patch;patch=1 \
- file://cross_libpaths.patch;patch=1 \
- file://weakdeps.patch;patch=1;pnum=0 \
- file://tagsbackport.patch;patch=1;pnum=0 \
- file://missingok.patch;patch=1;pnum=0 \
- file://extcond.patch;patch=1;pnum=0 \
- file://disabledwarf.patch;patch=1"
-
-S = "${WORKDIR}/rpm-${PV}"
-
-inherit autotools gettext
-
-acpaths = "-I ${S}/db/dist/aclocal -I ${S}/db/dist/aclocal_java"
-
-EXTRA_OECONF = "--with-python=$PYTHONVER \
- --with-python-incdir=${STAGING_INCDIR}/python$PYTHONVER \
- --with-python-libdir=${libdir}/python$PYTHONVER \
- --without-apidocs \
- --without-selinux \
- --without-lua \
- --without-dmalloc \
- --without-efence"
-
-PACKAGES += "python-rpm"
-FILES_python-rpm = "${libdir}/python*/site-packages/rpm/_*"
-
-# Handle the db MUTEX settings here, the POSIX library is
-# the default - "POSIX/pthreads/library".
-# Don't ignore the nice SWP instruction on the ARM:
-# These enable the ARM assembler mutex code, this won't
-# work with thumb compilation...
-ARM_MUTEX = "--with-mutex=ARM/gcc-assembly"
-MUTEX = ""
-MUTEX_arm = "${ARM_MUTEX}"
-MUTEX_armeb = "${ARM_MUTEX}"
-EXTRA_OECONF += "${MUTEX}"
-
-export varprefix = "${localstatedir}"
-
-do_configure () {
- rm ${S}/popt/ -Rf
- rm ${S}/db/dist/configure.in -f
- cd ${S}/db/dist/aclocal
- rm libtool* -f
- for i in `ls *.ac`; do
- j=`echo $i | sed 's/.ac/.m4/g'`
- mv $i $j
- done
- cd ${S}/db/dist/aclocal_java
- for i in `ls *.ac`; do
- j=`echo $i | sed 's/.ac/.m4/g'`
- mv $i $j
- done
- cd ${S}
- autotools_do_configure
- cd ${S}/db/dist
- . ./RELEASE
- # Edit version information we couldn't pre-compute.
- (echo "1,\$s/__EDIT_DB_VERSION_MAJOR__/$DB_VERSION_MAJOR/g" &&
- echo "1,\$s/__EDIT_DB_VERSION_MINOR__/$DB_VERSION_MINOR/g" &&
- echo "1,\$s/__EDIT_DB_VERSION_PATCH__/$DB_VERSION_PATCH/g" &&
- echo "1,\$s/__EDIT_DB_VERSION_STRING__/$DB_VERSION_STRING/g" &&
- echo "1,\$s/__EDIT_DB_VERSION_UNIQUE_NAME__/$DB_VERSION_UNIQUE_NAME/g" &&
- echo "1,\$s/__EDIT_DB_VERSION__/$DB_VERSION/g" &&
- echo "w" &&
- echo "q") | ed configure
- cd ${S}/db3
- ${S}/db3/configure \
- --build=${BUILD_SYS} \
- --host=${HOST_SYS} \
- --target=${TARGET_SYS} \
- --prefix=${prefix} \
- --exec_prefix=${exec_prefix} \
- --bindir=${bindir} \
- --sbindir=${sbindir} \
- --libexecdir=${libexecdir} \
- --datadir=${datadir} \
- --sysconfdir=${sysconfdir} \
- --sharedstatedir=${sharedstatedir} \
- --localstatedir=${localstatedir} \
- --libdir=${libdir} \
- --includedir=${includedir} \
- --oldincludedir=${oldincludedir} \
- --infodir=${infodir} \
- --mandir=${mandir} \
- ${EXTRA_OECONF} \
- --with-pic
-
-}
-
-do_install_append () {
- rmdir ${D}${localstatedir}/tmp || true
-}
-
-def rpm_python_version(d):
- import os, bb
- staging_incdir = bb.data.getVar( "STAGING_INCDIR", d, 1 )
- if os.path.exists( "%s/python2.6" % staging_incdir ): return "2.6"
- if os.path.exists( "%s/python2.5" % staging_incdir ): return "2.5"
- if os.path.exists( "%s/python2.4" % staging_incdir ): return "2.4"
- if os.path.exists( "%s/python2.3" % staging_incdir ): return "2.3"
- raise "No Python in STAGING_INCDIR. Forgot to build python/python-native?"
-
-# Use a shell variable here since otherwise gettext trys to expand this at
-# parse time when it manipulates EXTRA_OECONF which fails
-export PYTHONVER = "${@rpm_python_version(d)}"
diff --git a/meta/packages/rpm/rpm_5.1.9.bb b/meta/packages/rpm/rpm_5.1.9.bb
new file mode 100644
index 000000000..9ba112653
--- /dev/null
+++ b/meta/packages/rpm/rpm_5.1.9.bb
@@ -0,0 +1,96 @@
+DESCRIPTION = "The RPM Package Manager - relaunched"
+HOMEPAGE = "http://rpm5.org/"
+LICENSE = "LGPL 2.1"
+DEPENDS = "zlib perl popt beecrypt python libpcre"
+PR = "r0"
+
+SRC_URI = "http://www.rpm5.org/files/rpm/rpm-5.1/${BPN}-${PV}.tar.gz \
+ file://remove-compiled-tests.patch;apply=no \
+ "
+inherit autotools gettext
+
+acpaths = "-I ${S}/db/dist/aclocal -I ${S}/db/dist/aclocal_java"
+
+# Specify the default rpm macros in terms of adjustable variables
+rpm_macros = "%{_usrlibrpm}/macros:%{_usrlibrpm}/poky/macros:%{_usrlibrpm}/poky/%{_target}/macros:~/.oerpmmacros"
+
+EXTRA_OECONF = "--with-python=$PYTHONVER \
+ --with-python-inc-dir=${STAGING_INCDIR}/python$PYTHONVER \
+ --with-python-lib-dir=${libdir}/python$PYTHONVER \
+ --with-db=internal \
+ --with-db-tools-integrated \
+ --without-apidocs \
+ --without-selinux \
+ --without-lua \
+ --without-dmalloc \
+ --without-efence \
+ --without-neon \
+ --with-pcre=${libdir} \
+ --with-path-macros=${rpm_macros}"
+
+CFLAGS_append = " -DRPM_VENDOR_WINDRIVER"
+
+PACKAGES += "python-rpm"
+FILES_python-rpm = "${libdir}/python*/site-packages/rpm/_*"
+
+# The mutex needs to be POSIX/pthreads/library or we can't
+# share a database between host and target environments
+# (there is a minor performance penalty, but not one great enough
+# to justify the pain of a more optimized approach!)
+EXTRA_OECONF += "--with-mutex=POSIX/pthreads/library"
+
+do_configure() {
+ rm ${S}/db/dist/configure.in -f
+ for i in `find ${S} -name *.ac`; do
+ j=`echo $i | sed 's/.ac/.m4/g'`
+ mv $i $j
+ done
+ export ac_cv_va_copy=C99
+ autotools_do_configure
+ cd ${S}/db3
+ ${S}/db3/configure \
+ --build=${BUILD_SYS} \
+ --host=${HOST_SYS} \
+ --target=${TARGET_SYS} \
+ --prefix=${prefix} \
+ --exec_prefix=${exec_prefix} \
+ --bindir=${bindir} \
+ --sbindir=${sbindir} \
+ --libexecdir=${libexecdir} \
+ --datadir=${datadir} \
+ --sysconfdir=${sysconfdir} \
+ --sharedstatedir=${sharedstatedir} \
+ --localstatedir=${localstatedir} \
+ --libdir=${libdir} \
+ --includedir=${includedir} \
+ --oldincludedir=${oldincludedir} \
+ --infodir=${infodir} \
+ --mandir=${mandir} \
+ ${EXTRA_OECONF}
+}
+
+INSTALL_ACTIONS=""
+
+# When installing the native version, the rpm components are renamed with a
+# naming transform. We need to adjust the rpmpopt file with the same transform
+INSTALL_ACTIONS_virtclass-native="sed -i -e 's,rpm,${HOST_SYS}-rpm,' ${D}/${libdir}/rpm/rpmpopt"
+
+do_install_append() {
+ ${INSTALL_ACTIONS}
+ sed -i -e 's,%__check_files,#%%__check_files,' ${D}/${libdir}/rpm/macros
+}
+
+def rpm_python_version(d):
+ import os, bb
+ staging_incdir = bb.data.getVar( "STAGING_INCDIR", d, 1 )
+ if os.path.exists( "%s/python2.6" % staging_incdir ): return "2.6"
+ if os.path.exists( "%s/python2.5" % staging_incdir ): return "2.5"
+ if os.path.exists( "%s/python2.4" % staging_incdir ): return "2.4"
+ if os.path.exists( "%s/python2.3" % staging_incdir ): return "2.3"
+ raise "No Python in STAGING_INCDIR. Forgot to build python/python-native?"
+
+# Use a shell variable here since otherwise gettext trys to expand this at
+# parse time when it manipulates EXTRA_OECONF which fails
+export PYTHONVER = "${@rpm_python_version(d)}"
+
+BBCLASSEXTEND = "native"