]> code.ossystems Code Review - openembedded-core.git/commitdiff
rpm: compatiblity and header fix
authorQing He <qing.he@intel.com>
Thu, 26 Aug 2010 00:41:03 +0000 (08:41 +0800)
committerRichard Purdie <rpurdie@linux.intel.com>
Tue, 31 Aug 2010 16:19:19 +0000 (17:19 +0100)
changes:
  - add headerAddOrAppendEntry in lib/rpm4compat.h for compatibility
  - fix rpmbag.h introduced in rpm 5.1.10

Signed-off-by: Qing He <qing.he@intel.com>
meta/recipes-devtools/rpm/rpm/export-rpmbag-h.patch [new file with mode: 0644]
meta/recipes-devtools/rpm/rpm/hdraddorappend.patch [new file with mode: 0644]
meta/recipes-devtools/rpm/rpm_5.1.10.bb

diff --git a/meta/recipes-devtools/rpm/rpm/export-rpmbag-h.patch b/meta/recipes-devtools/rpm/rpm/export-rpmbag-h.patch
new file mode 100644 (file)
index 0000000..2f203fb
--- /dev/null
@@ -0,0 +1,45 @@
+rpmbag.h (added in 5.1.10) is used by rpmts.h, thus should be
+exported. Change Makefile.in as well since currently autoreconf
+is not performed for rpm.
+
+8/26/2010 - created by Qing He <qing.he@intel.com>
+
+diff --git a/rpmio/Makefile.am b/rpmio/Makefile.am
+index ce9e4f7..0d825b6 100644
+--- a/rpmio/Makefile.am
++++ b/rpmio/Makefile.am
+@@ -59,12 +59,12 @@ pkginc_HEADERS = \
+       argv.h envvar.h fts.h mire.h rpmbc.h rpmcb.h rpmdav.h rpmgc.h \
+       rpmhash.h rpmio.h rpmiotypes.h rpmio-stub.h rpmku.h rpmlog.h \
+       rpmmacro.h rpmmg.h rpmnss.h rpmpgp.h rpmsq.h rpmssl.h rpmsw.h \
+-      rpmurl.h rpmxar.h ugid.h rpmuuid.h rpmzlog.h yarn.h
++      rpmurl.h rpmxar.h ugid.h rpmuuid.h rpmzlog.h yarn.h rpmbag.h
+ noinst_HEADERS = \
+       ar.h cpio.h crc.h fnmatch.h glob.h iosm.h \
+       md2.h md4.h poptIO.h rmd128.h rmd160.h rmd256.h rmd320.h sha224.h \
+       salsa10.h salsa20.h tar.h tiger.h \
+-      rpmbag.h rpmbf.h rpmbz.h rpmhook.h rpmio_internal.h rpmlua.h
++      rpmbf.h rpmbz.h rpmhook.h rpmio_internal.h rpmlua.h
+ usrlibdir = $(libdir)
+ usrlib_LTLIBRARIES = librpmio.la
+diff --git a/rpmio/Makefile.in b/rpmio/Makefile.in
+index ef76570..0b212bd 100644
+--- a/rpmio/Makefile.in
++++ b/rpmio/Makefile.in
+@@ -638,13 +638,13 @@ pkginc_HEADERS = \
+       argv.h envvar.h fts.h mire.h rpmbc.h rpmcb.h rpmdav.h rpmgc.h \
+       rpmhash.h rpmio.h rpmiotypes.h rpmio-stub.h rpmku.h rpmlog.h \
+       rpmmacro.h rpmmg.h rpmnss.h rpmpgp.h rpmsq.h rpmssl.h rpmsw.h \
+-      rpmurl.h rpmxar.h ugid.h rpmuuid.h rpmzlog.h yarn.h
++      rpmurl.h rpmxar.h ugid.h rpmuuid.h rpmzlog.h yarn.h rpmbag.h
+ noinst_HEADERS = \
+       ar.h cpio.h crc.h fnmatch.h glob.h iosm.h \
+       md2.h md4.h poptIO.h rmd128.h rmd160.h rmd256.h rmd320.h sha224.h \
+       salsa10.h salsa20.h tar.h tiger.h \
+-      rpmbag.h rpmbf.h rpmbz.h rpmhook.h rpmio_internal.h rpmlua.h
++      rpmbf.h rpmbz.h rpmhook.h rpmio_internal.h rpmlua.h
+ usrlibdir = $(libdir)
+ usrlib_LTLIBRARIES = librpmio.la
diff --git a/meta/recipes-devtools/rpm/rpm/hdraddorappend.patch b/meta/recipes-devtools/rpm/rpm/hdraddorappend.patch
new file mode 100644 (file)
index 0000000..020337a
--- /dev/null
@@ -0,0 +1,22 @@
+diff --git a/lib/rpm4compat.h b/lib/rpm4compat.h
+index b957f8e..b1954d5 100644
+--- a/lib/rpm4compat.h
++++ b/lib/rpm4compat.h
+@@ -211,6 +211,17 @@ static inline int headerAddEntry(Header h, int_32 tag, int_32 type, const void *
+       return headerPut(h, he, 0);
+ }
++static inline int headerAddOrAppendEntry(Header h, int_32 tag, int_32 type, const void * p, int_32 c) {
++      HE_t he = (HE_s*)memset(alloca(sizeof(*he)), 0, sizeof(*he));
++
++      he->tag = (rpmTag)tag;
++      he->t = (rpmTagType)type;
++      he->p.str = (const char*)p;
++      he->c = (rpmTagCount)c;
++      he->append = 1;
++      return headerPut(h, he, 0);
++}
++
+ static inline int headerRemoveEntry(Header h, int_32 tag) {
+       HE_t he = (HE_s*)memset(alloca(sizeof(*he)), 0, sizeof(*he));
index a7097f760ca989ed124c81d5c5dab5036149124a..d75e48f416f864a4e0599b40a908bb45929311fb 100644 (file)
@@ -3,9 +3,11 @@ DESCRIPTION_rpm-build = "The RPM Package Manager rpmbuild and related commands."
 HOMEPAGE = "http://rpm5.org/"
 LICENSE = "LGPL 2.1"
 DEPENDS = "zlib perl popt beecrypt python libpcre elfutils"
-PR = "r2"
+PR = "r3"
 
 SRC_URI = "http://www.rpm5.org/files/rpm/rpm-5.1/SNAPSHOT/${BPN}-${PV}.tar.gz \
+           file://hdraddorappend.patch \
+           file://export-rpmbag-h.patch \
           file://remove-compiled-tests.patch;apply=no \
           file://perfile_rpmdeps.sh \
          "