summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/rpm
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2012-05-31 15:51:52 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-06-18 17:24:40 +0100
commiteaedf2e9410a08ff3594b0ec23c543c74ed1e85b (patch)
tree0d25099a95d9929d19e4130d83779111bbee006a /meta/recipes-devtools/rpm
parent5276472c5e17191e503247257b572ed7643e3889 (diff)
downloadpoky-eaedf2e9410a08ff3594b0ec23c543c74ed1e85b.tar.gz
rpm: Fix compilation on uclibc
rpmatch is not there in uclibc therefore add logic to configure to detect it. x* wrappers need to be defined for uclibc as well. (From OE-Core rev: 0cd3a4f3cfd0eb70915e3b59be8d04ee2d92749e) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/rpm')
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpmatch.patch42
-rw-r--r--meta/recipes-devtools/rpm/rpm/uclibc-support.patch63
-rw-r--r--meta/recipes-devtools/rpm/rpm_5.4.9.bb4
3 files changed, 108 insertions, 1 deletions
diff --git a/meta/recipes-devtools/rpm/rpm/rpmatch.patch b/meta/recipes-devtools/rpm/rpm/rpmatch.patch
new file mode 100644
index 0000000000..8ea349003a
--- /dev/null
+++ b/meta/recipes-devtools/rpm/rpm/rpmatch.patch
@@ -0,0 +1,42 @@
1Add configure check for rpmatch() and
2creates a compatable macro if it is not provided by the C library.
3
4This is needed for uclibc since it does not have the above function
5implemented.
6
7Upstream-Status: Pending
8
9Signed-off-by: Khem Raj <raj.khem@gmail.com>
10
11Index: rpm-5.4.0/configure.ac
12===================================================================
13--- rpm-5.4.0.orig/configure.ac 2012-05-31 15:40:05.985990822 -0700
14+++ rpm-5.4.0/configure.ac 2012-05-31 15:41:15.601995311 -0700
15@@ -800,7 +800,7 @@
16 ftok getaddrinfo getattrlist getcwd getdelim getline getmode getnameinfo dnl
17 getpassphrase getxattr getwd iconv inet_aton lchflags lchmod lchown dnl
18 lgetxattr lsetxattr lutimes madvise mempcpy mkdtemp mkstemp mtrace dnl
19- posix_fadvise posix_fallocate putenv realpath regcomp __secure_getenv dnl
20+ posix_fadvise posix_fallocate putenv realpath regcomp rpmatch __secure_getenv dnl
21 setattrlist setenv setlocale setmode setxattr dnl
22 sigaddset sigdelset sigemptyset sighold sigrelse sigpause dnl
23 sigprocmask sigsuspend sigaction dnl
24Index: rpm-5.4.0/system.h
25===================================================================
26--- rpm-5.4.0.orig/system.h 2012-05-31 15:40:05.997991504 -0700
27+++ rpm-5.4.0/system.h 2012-05-31 15:42:04.941997731 -0700
28@@ -410,6 +410,14 @@
29 #endif /* defined(__GNUC__) */
30 #endif /* HAVE_MCHECK_H */
31
32+#ifndef HAVE_RPMATCH
33+#define rpmatch(line) \
34+ ( (line == NULL)? -1 : \
35+ (*line == 'y' || *line == 'Y')? 1 : \
36+ (*line == 'n' || *line == 'N')? 0 : \
37+ -1 )
38+#endif
39+
40 /* Retrofit glibc __progname */
41 #if defined __GLIBC__ && __GLIBC__ >= 2
42 #if __GLIBC_MINOR__ >= 1
diff --git a/meta/recipes-devtools/rpm/rpm/uclibc-support.patch b/meta/recipes-devtools/rpm/rpm/uclibc-support.patch
new file mode 100644
index 0000000000..64746ce224
--- /dev/null
+++ b/meta/recipes-devtools/rpm/rpm/uclibc-support.patch
@@ -0,0 +1,63 @@
1Define the x* wrappers for uclibc as well
2
3Upstream-Status: Pending
4
5Signed-off-by: Khem Raj <raj.khem@gmail.com>
6
7Index: rpm-5.4.9/rpmio/rpmio.h
8===================================================================
9--- rpm-5.4.9.orig/rpmio/rpmio.h 2010-09-29 07:54:30.000000000 -0700
10+++ rpm-5.4.9/rpmio/rpmio.h 2012-06-12 07:29:19.610745014 -0700
11@@ -23,7 +23,8 @@
12 */
13 /*@{*/
14 #if !defined(__LCLINT__) && !defined(__UCLIBC__) && defined(__GLIBC__) && \
15- (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2))
16+ (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2)) && \
17+ !defined(__UCLIBC__)
18 #define USE_COOKIE_SEEK_POINTER 1
19 typedef _IO_off64_t _libio_off_t;
20 typedef _libio_off_t * _libio_pos_t;
21Index: rpm-5.4.9/system.h
22===================================================================
23--- rpm-5.4.9.orig/system.h 2012-04-26 10:46:49.000000000 -0700
24+++ rpm-5.4.9/system.h 2012-06-12 07:30:08.242747422 -0700
25@@ -410,7 +410,7 @@
26 #endif /* defined(__LCLINT__) */
27
28 /* Memory allocation via macro defs to get meaningful locations from mtrace() */
29-#if defined(__GNUC__)
30+#if defined(__GNUC__) || defined(__UCLIBC__)
31 #define xmalloc(_size) (malloc(_size) ? : vmefail(_size))
32 #define xcalloc(_nmemb, _size) (calloc((_nmemb), (_size)) ? : vmefail(_size))
33 #define xrealloc(_ptr, _size) (realloc((_ptr), (_size)) ? : vmefail(_size))
34Index: rpm-5.4.9/lib/librpm.vers
35===================================================================
36--- rpm-5.4.9.orig/lib/librpm.vers 2011-04-10 15:55:23.000000000 -0700
37+++ rpm-5.4.9/lib/librpm.vers 2012-06-12 07:29:19.610745014 -0700
38@@ -405,6 +405,10 @@
39 specedit;
40 strict_erasures;
41 XrpmtsiInit;
42+ xmalloc;
43+ xrealloc;
44+ xcalloc;
45+ xstrdup;
46 local:
47 *;
48 };
49Index: rpm-5.4.9/rpmio/librpmio.vers
50===================================================================
51--- rpm-5.4.9.orig/rpmio/librpmio.vers 2012-05-07 07:38:23.000000000 -0700
52+++ rpm-5.4.9/rpmio/librpmio.vers 2012-06-12 07:29:19.626745024 -0700
53@@ -994,6 +994,10 @@
54 mongo_simple_int_command;
55 mongo_simple_str_command;
56 mongo_update;
57+ xmalloc;
58+ xrealloc;
59+ xcalloc;
60+ xstrdup;
61 local:
62 *;
63 };
diff --git a/meta/recipes-devtools/rpm/rpm_5.4.9.bb b/meta/recipes-devtools/rpm/rpm_5.4.9.bb
index 51cf93ba76..404916a335 100644
--- a/meta/recipes-devtools/rpm/rpm_5.4.9.bb
+++ b/meta/recipes-devtools/rpm/rpm_5.4.9.bb
@@ -43,7 +43,7 @@ LICENSE = "LGPLv2.1"
43LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1" 43LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1"
44 44
45DEPENDS = "libpcre attr acl popt ossp-uuid file" 45DEPENDS = "libpcre attr acl popt ossp-uuid file"
46PR = "r43" 46PR = "r44"
47 47
48# rpm2cpio is a shell script, which is part of the rpm src.rpm. It is needed 48# rpm2cpio is a shell script, which is part of the rpm src.rpm. It is needed
49# in order to extract the distribution SRPM into a format we can extract... 49# in order to extract the distribution SRPM into a format we can extract...
@@ -72,6 +72,8 @@ SRC_URI = "http://www.rpm5.org/files/rpm/rpm-5.4/rpm-5.4.9-0.20120508.src.rpm;ex
72 file://rpm-ossp-uuid.patch \ 72 file://rpm-ossp-uuid.patch \
73 file://rpm-packageorigin.patch \ 73 file://rpm-packageorigin.patch \
74 file://rpm-pkgconfigdeps.patch \ 74 file://rpm-pkgconfigdeps.patch \
75 file://uclibc-support.patch \
76 file://rpmatch.patch \
75 " 77 "
76 78
77SRC_URI[md5sum] = "60d56ace884340c1b3fcac6a1d58e768" 79SRC_URI[md5sum] = "60d56ace884340c1b3fcac6a1d58e768"