diff options
author | Qing He <qing.he@intel.com> | 2010-08-26 08:41:03 +0800 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2010-08-31 17:19:19 +0100 |
commit | a0b72c297193d7cc3edb5a36bb8acbc5190537ed (patch) | |
tree | b88a980b1027690d0bb2a2849951f9b831d48108 /meta/recipes-devtools/rpm | |
parent | adfd0e04343ad7770642eadf07a7f9185be6e25d (diff) | |
download | poky-a0b72c297193d7cc3edb5a36bb8acbc5190537ed.tar.gz |
rpm: compatiblity and header fix
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>
Diffstat (limited to 'meta/recipes-devtools/rpm')
-rw-r--r-- | meta/recipes-devtools/rpm/rpm/export-rpmbag-h.patch | 45 | ||||
-rw-r--r-- | meta/recipes-devtools/rpm/rpm/hdraddorappend.patch | 22 | ||||
-rw-r--r-- | meta/recipes-devtools/rpm/rpm_5.1.10.bb | 4 |
3 files changed, 70 insertions, 1 deletions
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 index 0000000000..2f203fb3d0 --- /dev/null +++ b/meta/recipes-devtools/rpm/rpm/export-rpmbag-h.patch | |||
@@ -0,0 +1,45 @@ | |||
1 | rpmbag.h (added in 5.1.10) is used by rpmts.h, thus should be | ||
2 | exported. Change Makefile.in as well since currently autoreconf | ||
3 | is not performed for rpm. | ||
4 | |||
5 | 8/26/2010 - created by Qing He <qing.he@intel.com> | ||
6 | |||
7 | diff --git a/rpmio/Makefile.am b/rpmio/Makefile.am | ||
8 | index ce9e4f7..0d825b6 100644 | ||
9 | --- a/rpmio/Makefile.am | ||
10 | +++ b/rpmio/Makefile.am | ||
11 | @@ -59,12 +59,12 @@ pkginc_HEADERS = \ | ||
12 | argv.h envvar.h fts.h mire.h rpmbc.h rpmcb.h rpmdav.h rpmgc.h \ | ||
13 | rpmhash.h rpmio.h rpmiotypes.h rpmio-stub.h rpmku.h rpmlog.h \ | ||
14 | rpmmacro.h rpmmg.h rpmnss.h rpmpgp.h rpmsq.h rpmssl.h rpmsw.h \ | ||
15 | - rpmurl.h rpmxar.h ugid.h rpmuuid.h rpmzlog.h yarn.h | ||
16 | + rpmurl.h rpmxar.h ugid.h rpmuuid.h rpmzlog.h yarn.h rpmbag.h | ||
17 | noinst_HEADERS = \ | ||
18 | ar.h cpio.h crc.h fnmatch.h glob.h iosm.h \ | ||
19 | md2.h md4.h poptIO.h rmd128.h rmd160.h rmd256.h rmd320.h sha224.h \ | ||
20 | salsa10.h salsa20.h tar.h tiger.h \ | ||
21 | - rpmbag.h rpmbf.h rpmbz.h rpmhook.h rpmio_internal.h rpmlua.h | ||
22 | + rpmbf.h rpmbz.h rpmhook.h rpmio_internal.h rpmlua.h | ||
23 | |||
24 | usrlibdir = $(libdir) | ||
25 | usrlib_LTLIBRARIES = librpmio.la | ||
26 | diff --git a/rpmio/Makefile.in b/rpmio/Makefile.in | ||
27 | index ef76570..0b212bd 100644 | ||
28 | --- a/rpmio/Makefile.in | ||
29 | +++ b/rpmio/Makefile.in | ||
30 | @@ -638,13 +638,13 @@ pkginc_HEADERS = \ | ||
31 | argv.h envvar.h fts.h mire.h rpmbc.h rpmcb.h rpmdav.h rpmgc.h \ | ||
32 | rpmhash.h rpmio.h rpmiotypes.h rpmio-stub.h rpmku.h rpmlog.h \ | ||
33 | rpmmacro.h rpmmg.h rpmnss.h rpmpgp.h rpmsq.h rpmssl.h rpmsw.h \ | ||
34 | - rpmurl.h rpmxar.h ugid.h rpmuuid.h rpmzlog.h yarn.h | ||
35 | + rpmurl.h rpmxar.h ugid.h rpmuuid.h rpmzlog.h yarn.h rpmbag.h | ||
36 | |||
37 | noinst_HEADERS = \ | ||
38 | ar.h cpio.h crc.h fnmatch.h glob.h iosm.h \ | ||
39 | md2.h md4.h poptIO.h rmd128.h rmd160.h rmd256.h rmd320.h sha224.h \ | ||
40 | salsa10.h salsa20.h tar.h tiger.h \ | ||
41 | - rpmbag.h rpmbf.h rpmbz.h rpmhook.h rpmio_internal.h rpmlua.h | ||
42 | + rpmbf.h rpmbz.h rpmhook.h rpmio_internal.h rpmlua.h | ||
43 | |||
44 | usrlibdir = $(libdir) | ||
45 | 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 index 0000000000..020337a598 --- /dev/null +++ b/meta/recipes-devtools/rpm/rpm/hdraddorappend.patch | |||
@@ -0,0 +1,22 @@ | |||
1 | diff --git a/lib/rpm4compat.h b/lib/rpm4compat.h | ||
2 | index b957f8e..b1954d5 100644 | ||
3 | --- a/lib/rpm4compat.h | ||
4 | +++ b/lib/rpm4compat.h | ||
5 | @@ -211,6 +211,17 @@ static inline int headerAddEntry(Header h, int_32 tag, int_32 type, const void * | ||
6 | return headerPut(h, he, 0); | ||
7 | } | ||
8 | |||
9 | +static inline int headerAddOrAppendEntry(Header h, int_32 tag, int_32 type, const void * p, int_32 c) { | ||
10 | + HE_t he = (HE_s*)memset(alloca(sizeof(*he)), 0, sizeof(*he)); | ||
11 | + | ||
12 | + he->tag = (rpmTag)tag; | ||
13 | + he->t = (rpmTagType)type; | ||
14 | + he->p.str = (const char*)p; | ||
15 | + he->c = (rpmTagCount)c; | ||
16 | + he->append = 1; | ||
17 | + return headerPut(h, he, 0); | ||
18 | +} | ||
19 | + | ||
20 | static inline int headerRemoveEntry(Header h, int_32 tag) { | ||
21 | HE_t he = (HE_s*)memset(alloca(sizeof(*he)), 0, sizeof(*he)); | ||
22 | |||
diff --git a/meta/recipes-devtools/rpm/rpm_5.1.10.bb b/meta/recipes-devtools/rpm/rpm_5.1.10.bb index a7097f760c..d75e48f416 100644 --- a/meta/recipes-devtools/rpm/rpm_5.1.10.bb +++ b/meta/recipes-devtools/rpm/rpm_5.1.10.bb | |||
@@ -3,9 +3,11 @@ DESCRIPTION_rpm-build = "The RPM Package Manager rpmbuild and related commands." | |||
3 | HOMEPAGE = "http://rpm5.org/" | 3 | HOMEPAGE = "http://rpm5.org/" |
4 | LICENSE = "LGPL 2.1" | 4 | LICENSE = "LGPL 2.1" |
5 | DEPENDS = "zlib perl popt beecrypt python libpcre elfutils" | 5 | DEPENDS = "zlib perl popt beecrypt python libpcre elfutils" |
6 | PR = "r2" | 6 | PR = "r3" |
7 | 7 | ||
8 | SRC_URI = "http://www.rpm5.org/files/rpm/rpm-5.1/SNAPSHOT/${BPN}-${PV}.tar.gz \ | 8 | SRC_URI = "http://www.rpm5.org/files/rpm/rpm-5.1/SNAPSHOT/${BPN}-${PV}.tar.gz \ |
9 | file://hdraddorappend.patch \ | ||
10 | file://export-rpmbag-h.patch \ | ||
9 | file://remove-compiled-tests.patch;apply=no \ | 11 | file://remove-compiled-tests.patch;apply=no \ |
10 | file://perfile_rpmdeps.sh \ | 12 | file://perfile_rpmdeps.sh \ |
11 | " | 13 | " |