summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/rpm/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/rpm
parent5276472c5e17191e503247257b572ed7643e3889 (diff)
downloadast2050-yocto-poky-eaedf2e9410a08ff3594b0ec23c543c74ed1e85b.zip
ast2050-yocto-poky-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/rpm')
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpmatch.patch42
-rw-r--r--meta/recipes-devtools/rpm/rpm/uclibc-support.patch63
2 files changed, 105 insertions, 0 deletions
diff --git a/meta/recipes-devtools/rpm/rpm/rpmatch.patch b/meta/recipes-devtools/rpm/rpm/rpmatch.patch
new file mode 100644
index 0000000..8ea3490
--- /dev/null
+++ b/meta/recipes-devtools/rpm/rpm/rpmatch.patch
@@ -0,0 +1,42 @@
+Add configure check for rpmatch() and
+creates a compatable macro if it is not provided by the C library.
+
+This is needed for uclibc since it does not have the above function
+implemented.
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Index: rpm-5.4.0/configure.ac
+===================================================================
+--- rpm-5.4.0.orig/configure.ac 2012-05-31 15:40:05.985990822 -0700
++++ rpm-5.4.0/configure.ac 2012-05-31 15:41:15.601995311 -0700
+@@ -800,7 +800,7 @@
+ ftok getaddrinfo getattrlist getcwd getdelim getline getmode getnameinfo dnl
+ getpassphrase getxattr getwd iconv inet_aton lchflags lchmod lchown dnl
+ lgetxattr lsetxattr lutimes madvise mempcpy mkdtemp mkstemp mtrace dnl
+- posix_fadvise posix_fallocate putenv realpath regcomp __secure_getenv dnl
++ posix_fadvise posix_fallocate putenv realpath regcomp rpmatch __secure_getenv dnl
+ setattrlist setenv setlocale setmode setxattr dnl
+ sigaddset sigdelset sigemptyset sighold sigrelse sigpause dnl
+ sigprocmask sigsuspend sigaction dnl
+Index: rpm-5.4.0/system.h
+===================================================================
+--- rpm-5.4.0.orig/system.h 2012-05-31 15:40:05.997991504 -0700
++++ rpm-5.4.0/system.h 2012-05-31 15:42:04.941997731 -0700
+@@ -410,6 +410,14 @@
+ #endif /* defined(__GNUC__) */
+ #endif /* HAVE_MCHECK_H */
+
++#ifndef HAVE_RPMATCH
++#define rpmatch(line) \
++ ( (line == NULL)? -1 : \
++ (*line == 'y' || *line == 'Y')? 1 : \
++ (*line == 'n' || *line == 'N')? 0 : \
++ -1 )
++#endif
++
+ /* Retrofit glibc __progname */
+ #if defined __GLIBC__ && __GLIBC__ >= 2
+ #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 0000000..64746ce
--- /dev/null
+++ b/meta/recipes-devtools/rpm/rpm/uclibc-support.patch
@@ -0,0 +1,63 @@
+Define the x* wrappers for uclibc as well
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Index: rpm-5.4.9/rpmio/rpmio.h
+===================================================================
+--- rpm-5.4.9.orig/rpmio/rpmio.h 2010-09-29 07:54:30.000000000 -0700
++++ rpm-5.4.9/rpmio/rpmio.h 2012-06-12 07:29:19.610745014 -0700
+@@ -23,7 +23,8 @@
+ */
+ /*@{*/
+ #if !defined(__LCLINT__) && !defined(__UCLIBC__) && defined(__GLIBC__) && \
+- (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2))
++ (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2)) && \
++ !defined(__UCLIBC__)
+ #define USE_COOKIE_SEEK_POINTER 1
+ typedef _IO_off64_t _libio_off_t;
+ typedef _libio_off_t * _libio_pos_t;
+Index: rpm-5.4.9/system.h
+===================================================================
+--- rpm-5.4.9.orig/system.h 2012-04-26 10:46:49.000000000 -0700
++++ rpm-5.4.9/system.h 2012-06-12 07:30:08.242747422 -0700
+@@ -410,7 +410,7 @@
+ #endif /* defined(__LCLINT__) */
+
+ /* Memory allocation via macro defs to get meaningful locations from mtrace() */
+-#if defined(__GNUC__)
++#if defined(__GNUC__) || defined(__UCLIBC__)
+ #define xmalloc(_size) (malloc(_size) ? : vmefail(_size))
+ #define xcalloc(_nmemb, _size) (calloc((_nmemb), (_size)) ? : vmefail(_size))
+ #define xrealloc(_ptr, _size) (realloc((_ptr), (_size)) ? : vmefail(_size))
+Index: rpm-5.4.9/lib/librpm.vers
+===================================================================
+--- rpm-5.4.9.orig/lib/librpm.vers 2011-04-10 15:55:23.000000000 -0700
++++ rpm-5.4.9/lib/librpm.vers 2012-06-12 07:29:19.610745014 -0700
+@@ -405,6 +405,10 @@
+ specedit;
+ strict_erasures;
+ XrpmtsiInit;
++ xmalloc;
++ xrealloc;
++ xcalloc;
++ xstrdup;
+ local:
+ *;
+ };
+Index: rpm-5.4.9/rpmio/librpmio.vers
+===================================================================
+--- rpm-5.4.9.orig/rpmio/librpmio.vers 2012-05-07 07:38:23.000000000 -0700
++++ rpm-5.4.9/rpmio/librpmio.vers 2012-06-12 07:29:19.626745024 -0700
+@@ -994,6 +994,10 @@
+ mongo_simple_int_command;
+ mongo_simple_str_command;
+ mongo_update;
++ xmalloc;
++ xrealloc;
++ xcalloc;
++ xstrdup;
+ local:
+ *;
+ };
OpenPOWER on IntegriCloud