daily pastebin goal
28%
SHARE
TWEET

Untitled

a guest Jul 21st, 2017 447 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. diff --git a/recipes-core/rpm/rpm/0001-Make-sure-CPPFLAGS-are-setup-correctly-for-finding-n.patch b/recipes-core/rpm/rpm/0001-Make-sure-CPPFLAGS-are-setup-correctly-for-finding-n.patch
  2. new file mode 100644
  3. index 0000000..b806ec2
  4. --- /dev/null
  5. +++ b/recipes-core/rpm/rpm/0001-Make-sure-CPPFLAGS-are-setup-correctly-for-finding-n.patch
  6. @@ -0,0 +1,32 @@
  7. +From 64b6cbbb4422ccd55922584bfd01bf00c871cb40 Mon Sep 17 00:00:00 2001
  8. +From: Mark Wielaard <mjw@redhat.com>
  9. +Date: Fri, 18 Mar 2016 16:54:39 +0100
  10. +Subject: [PATCH] Make sure CPPFLAGS are setup correctly for finding nspr.h
  11. +
  12. +If we have pkgconfig make sure CPPFLAGS are setup correctly for the nss
  13. +-I include path. Otherwise the checks to find nspr.h will fail.
  14. +---
  15. + configure.ac | 7 +++++++
  16. + 1 file changed, 7 insertions(+)
  17. +
  18. +diff --git a/configure.ac b/configure.ac
  19. +index fd73b33..3befb15 100644
  20. +--- a/configure.ac
  21. ++++ b/configure.ac
  22. +@@ -281,6 +281,13 @@ AC_SUBST(WITH_BEECRYPT_INCLUDE)
  23. + WITH_NSS_INCLUDE=
  24. + WITH_NSS_LIB=
  25. + if test "$with_beecrypt" != yes ; then
  26. ++# If we have pkgconfig make sure CPPFLAGS are setup correctly for the nss
  27. ++# -I include path. Otherwise the below checks will fail because nspr.h
  28. ++# cannot be found.
  29. ++AC_PATH_TOOL([PKGCONFIG], [pkg-config], [no], [$PATH:/usr/bin:/usr/local/bin])
  30. ++if test "x$PKGCONFIG" != "xno"; then
  31. ++  CPPFLAGS="$CPPFLAGS $($PKGCONFIG --cflags nss)"
  32. ++fi
  33. + AC_CHECK_HEADERS([nspr.h nss.h sechash.h], [], [
  34. +   AC_MSG_ERROR([missing required NSPR / NSS header])
  35. + ])
  36. +--
  37. +2.7.4
  38. +
  39. diff --git a/recipes-core/rpm/rpm/0002-configure-with-external-db-should-fall-back-to-exter.patch b/recipes-core/rpm/rpm/0002-configure-with-external-db-should-fall-back-to-exter.patch
  40. new file mode 100644
  41. index 0000000..b28c802
  42. --- /dev/null
  43. +++ b/recipes-core/rpm/rpm/0002-configure-with-external-db-should-fall-back-to-exter.patch
  44. @@ -0,0 +1,73 @@
  45. +From 9e64f8d5b7260bffa9fcfd1c1a408cfe1db65cf7 Mon Sep 17 00:00:00 2001
  46. +From: Mark Wielaard <mjw@redhat.com>
  47. +Date: Fri, 18 Mar 2016 17:14:43 +0100
  48. +Subject: [PATCH] configure --with-external-db should fall back to external if
  49. + unspecified.
  50. +
  51. +configure.ac implies that there is a fall back to the internal db if
  52. +no external one is specified or found. But that doesn't work since
  53. +with_external_db defaults to no when not --with[out]-external-db isn't
  54. +given. Fix that by defaulting to "maybe" and then after the check for an
  55. +internal db fails fall back to the external db.h if available.
  56. +
  57. +This keeps the current behavior of defaulting to --without-external-db (no)
  58. +if nothing is specified, but falls back to trying with the external one if
  59. +there is no in tree internal db. Giving an explicit --with-external-db or
  60. +--without-external-db doesn't change and produces an error if no external
  61. +or no internal db is found.
  62. +---
  63. + configure.ac | 28 +++++++++++++++++++++++++---
  64. + 1 file changed, 25 insertions(+), 3 deletions(-)
  65. +
  66. +diff --git a/configure.ac b/configure.ac
  67. +index 3befb15..b77160b 100644
  68. +--- a/configure.ac
  69. ++++ b/configure.ac
  70. +@@ -374,7 +374,7 @@ AC_ARG_WITH(external_db, [AS_HELP_STRING([--with-external-db],[build against an
  71. + yes|no) ;;
  72. + *) AC_MSG_ERROR([invalid argument to --with-external-db]) ;;
  73. + esac],
  74. +-[with_external_db=no])
  75. ++[with_external_db=maybe])
  76. +
  77. + case "$with_external_db" in
  78. + yes )
  79. +@@ -393,11 +393,33 @@ yes )
  80. +     AC_MSG_ERROR([missing required header db.h])
  81. +   ])
  82. +   ;;
  83. +-* ) # Fall back to internal db if available
  84. ++no|maybe )
  85. ++  # Try internal database first, then fall back to external
  86. ++  # unless --without-external-db (no) was explicitly given.
  87. +   if [ test -x db/dist/configure ]; then
  88. +     AC_DEFINE(HAVE_DB_H, 1, [Define if you have the <db3/db.h> header file])
  89. +   else
  90. +-    AC_MSG_ERROR([internal Berkeley DB directory not present, see INSTALL])
  91. ++    case "$with_external_db" in
  92. ++    maybe)
  93. ++      AC_CHECK_HEADERS([db.h],[
  94. ++        AC_PREPROC_IFELSE([
  95. ++          AC_LANG_SOURCE([
  96. ++          #include <db.h>
  97. ++          #if ((DB_VERSION_MAJOR < 4) || (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR < 5))
  98. ++          #error Berkeley DB too old
  99. ++          #endif
  100. ++          ])
  101. ++        ],[ WITH_DB_LIB=-ldb ],
  102. ++          [ AC_MSG_ERROR([Berkeley DB version >= 4.5 required])
  103. ++        ])
  104. ++      ],[
  105. ++        AC_MSG_ERROR([missing required header db.h])
  106. ++      ])
  107. ++    ;;
  108. ++    no)
  109. ++      AC_MSG_ERROR([internal Berkeley DB directory not present, see INSTALL])
  110. ++    ;;
  111. ++    esac
  112. +   fi
  113. +   ;;
  114. + esac
  115. +--
  116. +2.7.4
  117. +
  118. diff --git a/recipes-core/rpm/rpm/0003-Detect-bfd.h-to-enable-disable-sepdebugcrcfix-buildi.patch b/recipes-core/rpm/rpm/0003-Detect-bfd.h-to-enable-disable-sepdebugcrcfix-buildi.patch
  119. new file mode 100644
  120. index 0000000..ed30004
  121. --- /dev/null
  122. +++ b/recipes-core/rpm/rpm/0003-Detect-bfd.h-to-enable-disable-sepdebugcrcfix-buildi.patch
  123. @@ -0,0 +1,53 @@
  124. +From edadcf67980764c104c25c7c1a0ba91257b89698 Mon Sep 17 00:00:00 2001
  125. +From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
  126. +Date: Thu, 8 Dec 2016 23:33:30 +0100
  127. +Subject: [PATCH 1/2] Detect bfd.h to enable/disable sepdebugcrcfix building
  128. +
  129. +tools/sepdebugcrcfix includes <bfd.h>, but this header from binutils
  130. +is not checked in the configure script. Due to this, sepdebugcrcfix is
  131. +attempted to be built even when <bfd.h> is not available. This commit
  132. +addresses that by adding the appropriate configure check.
  133. +
  134. +This fixes the following build error:
  135. +
  136. +tools/sepdebugcrcfix.c:31:17: fatal error: bfd.h: No such file or directory
  137. +compilation terminated.
  138. +make[3]: *** [tools/sepdebugcrcfix.o] Error 1
  139. +
  140. +Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
  141. +---
  142. + Makefile.am  | 2 ++
  143. + configure.ac | 3 +++
  144. + 2 files changed, 5 insertions(+)
  145. +
  146. +diff --git a/Makefile.am b/Makefile.am
  147. +index 863138c..d8a68f0 100644
  148. +--- a/Makefile.am
  149. ++++ b/Makefile.am
  150. +@@ -168,9 +168,11 @@ elfdeps_SOURCES = tools/elfdeps.c
  151. + elfdeps_LDADD =               rpmio/librpmio.la
  152. + elfdeps_LDADD +=      @WITH_LIBELF_LIB@ @WITH_POPT_LIB@
  153. +
  154. ++if HAS_BFD_H
  155. + rpmlibexec_PROGRAMS +=        sepdebugcrcfix
  156. + sepdebugcrcfix_SOURCES = tools/sepdebugcrcfix.c
  157. + sepdebugcrcfix_LDADD =        @WITH_LIBELF_LIB@
  158. ++endif # HAS_BFD_H
  159. + endif
  160. + endif
  161. +
  162. +diff --git a/configure.ac b/configure.ac
  163. +index c5ae701..b99ecb8 100644
  164. +--- a/configure.ac
  165. ++++ b/configure.ac
  166. +@@ -242,6 +242,9 @@ AC_CHECK_HEADERS([dwarf.h], [
  167. + ])
  168. + AM_CONDITIONAL(LIBDWARF,[test "$WITH_LIBDWARF" = yes])
  169. +
  170. ++AC_CHECK_HEADERS([bfd.h])
  171. ++AM_CONDITIONAL(HAS_BFD_H, [test "${ac_cv_header_bfd_h}" = "yes"])
  172. ++
  173. + #=================
  174. + # Check for beecrypt library if requested.
  175. + AC_ARG_WITH(beecrypt, [  --with-beecrypt         build with beecrypt support ],,[with_beecrypt=no])
  176. +
  177. diff --git a/recipes-core/rpm/rpm/0004-tools-sepdebugcrcfix.c-fix-build-with-recent-binutil.patch b/recipes-core/rpm/rpm/0004-tools-sepdebugcrcfix.c-fix-build-with-recent-binutil.patch
  178. new file mode 100644
  179. index 0000000..226c892
  180. --- /dev/null
  181. +++ b/recipes-core/rpm/rpm/0004-tools-sepdebugcrcfix.c-fix-build-with-recent-binutil.patch
  182. @@ -0,0 +1,41 @@
  183. +From 65afab91444d4996a8e61d1e2d27d52e18417ef5 Mon Sep 17 00:00:00 2001
  184. +From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
  185. +Date: Thu, 8 Dec 2016 23:45:55 +0100
  186. +Subject: [PATCH 2/2] tools/sepdebugcrcfix.c: fix build with recent binutils
  187. +
  188. +Moderately recent binutils versions install a <bfd.h> header that
  189. +checks if config.h is included. While this makes sense in binutils
  190. +itself, it does not outside. So the binutils developers have added a
  191. +check: if PACKAGE or PACKAGE_VERSION are defined, they assume you're
  192. +re-using bfd.h outside of binutils, and therefore including it without
  193. +including config.h is legit.
  194. +
  195. +So we take the same approch as numerous users of bfd.h: fake a PACKAGE
  196. +definition. See for example tools/perf/util/srcline.c in the Linux
  197. +kernel source tree.
  198. +
  199. +This fixes the following build error:
  200. +
  201. +In file included from tools/sepdebugcrcfix.c:31:0:
  202. +/home/test/autobuild/run/instance-0/output/host/usr/arc-buildroot-linux-uclibc/sysroot/usr/include/bfd.h:35:2: error: #error config.h must be included before this header
  203. + #error config.h must be included before this header
  204. +
  205. +Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
  206. +---
  207. + tools/sepdebugcrcfix.c | 2 ++
  208. + 1 file changed, 2 insertions(+)
  209. +
  210. +diff --git a/tools/sepdebugcrcfix.c b/tools/sepdebugcrcfix.c
  211. +index cd7fa02..e7b480f 100644
  212. +--- a/tools/sepdebugcrcfix.c
  213. ++++ b/tools/sepdebugcrcfix.c
  214. +@@ -28,6 +28,8 @@
  215. + #include <error.h>
  216. + #include <libelf.h>
  217. + #include <gelf.h>
  218. ++/* Needed to please <bfd.h> */
  219. ++#define PACKAGE "rpm"
  220. + #include <bfd.h>
  221. +
  222. + #define _(x) x
  223. +
  224. diff --git a/recipes-core/rpm/rpm_%.bbappend b/recipes-core/rpm/rpm_%.bbappend
  225. new file mode 100644
  226. index 0000000..b55d832
  227. --- /dev/null
  228. +++ b/recipes-core/rpm/rpm_%.bbappend
  229. @@ -0,0 +1,20 @@
  230. +FILESEXTRAPATHS_prepend := "${THISDIR}/rpm:"
  231. +
  232. +SRC_URI = "git://github.com/rpm-software-management/rpm;branch=rpm-4.13.x \
  233. +                       file://0001-Make-sure-CPPFLAGS-are-setup-correctly-for-finding-n.patch \
  234. +                       file://0002-configure-with-external-db-should-fall-back-to-exter.patch \
  235. +                       file://0003-Detect-bfd.h-to-enable-disable-sepdebugcrcfix-buildi.patch \
  236. +                       file://0004-tools-sepdebugcrcfix.c-fix-build-with-recent-binutil.patch \
  237. +                       file://0001-Add-PYTHON_ABI-when-searching-for-python-libraries.patch \
  238. +"
  239. +
  240. +PV = "4.13.0.1+git${SRCPV}"
  241. +PE = "1"
  242. +SRCREV = "rpm-4.13.0.1-release"
  243. +
  244. +
  245. +do_install_prepend() {
  246. +       install -d ${D}${bindir}
  247. +       install -m 0755 ${S}/../build/.libs/rpm ${D}/${bindir}
  248. +}
  249. +
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top