Skip to contentSkip to conversation

grub: disable lzma, device-mapper, zfs and nvpair

PATCH Applied Constantin Musca 2 participants 2 messages Sep 14, 2012 – Sep 19, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 grub: disable lzma, device-mapper, zfs and nvpair

check-if-liblzma-is-disabled.patch: added
- add support for the --enable_liblzma option

[YOCTO #2750]

---
 .../grub/files/check-if-liblzma-is-disabled.patch  |   33 ++++++++++++++++++++
 meta/recipes-bsp/grub/grub-efi-native_2.00.bb      |    6 ++--
 meta/recipes-bsp/grub/grub_2.00.bb                 |    6 ++--
 3 files changed, 41 insertions(+), 4 deletions(-)
 create mode 100644 meta/recipes-bsp/grub/files/check-if-liblzma-is-disabled.patch
meta/recipes-bsp/grub/files/check-if-liblzma-is-disabled.patch new file +33 -0
new file mode 100644
index 0000000..0eece08
@@ -0,0 +1,33 @@
+Disable liblzma if --enable-liblzma=no
+
+Upstream-Status: Inappropriate [configuration]
+
+Signed-off-by: Constantin Musca <[email protected]>
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -1029,10 +1029,20 @@ fi
+ 
+ AC_SUBST([LIBGEOM])
+ 
+-AC_CHECK_LIB([lzma], [lzma_code],
+-             [LIBLZMA="-llzma"
+-              AC_DEFINE([HAVE_LIBLZMA], [1],
+-                        [Define to 1 if you have the LZMA library.])],)
++AC_ARG_ENABLE([liblzma],
++              [AS_HELP_STRING([--enable-liblzma],
++                              [enable liblzma integration (default=guessed)])])
++if test x"$enable_liblzma" = xno ; then
++  liblzma_excuse="explicitly disabled"
++fi
++
++if test x"$liblzma_excuse" = x ; then
++  AC_CHECK_LIB([lzma], [lzma_code],
++               [LIBLZMA="-llzma"
++                AC_DEFINE([HAVE_LIBLZMA], [1],
++                          [Define to 1 if you have the LZMA library.])],)
++fi
++
+ AC_SUBST([LIBLZMA])
+ 
+ AC_ARG_ENABLE([libzfs],
meta/recipes-bsp/grub/grub-efi-native_2.00.bb +4 -2
index 776bf23..14ab9ea 100644
@@ -16,7 +16,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
 # FIXME: We should be able to optionally drop freetype as a dependency
 DEPENDS = "autogen-native"
 RDEPENDS_${PN} = "diffutils freetype"
-PR = "r0"
+PR = "r1"
 
 # Native packages do not normally rebuild when the target changes.
 # Ensure this is built once per HOST-TARGET pair.
@@ -26,6 +26,7 @@ SRC_URI = "ftp://ftp.gnu.org/gnu/grub/grub-${PV}.tar.gz \
            file://grub-2.00-fpmath-sse-387-fix.patch \
 	   file://grub-2.00-fix-enable_execute_stack-check.patch \
            file://grub-2.00-disable-help2man.patch \
+           file://check-if-liblzma-is-disabled.patch \
 	   file://grub-no-unused-result.patch \
           "
 SRC_URI[md5sum] = "e927540b6eda8b024fb0391eeaa4091c"
@@ -59,7 +60,8 @@ inherit native
 inherit deploy
 
 EXTRA_OECONF = "--with-platform=efi --disable-grub-mkfont \
-                --target=${GRUB_TARGET} --enable-efiemu=no --program-prefix=''"
+                --target=${GRUB_TARGET} --enable-efiemu=no --program-prefix='' \
+                --enable-liblzma=no --enable-device-mapper=no --enable-libzfs=no"
 
 do_mkimage() {
 	./grub-mkimage -p /EFI/BOOT -d ./grub-core/ \
meta/recipes-bsp/grub/grub_2.00.bb +4 -2
index 821d9ff..8d22424 100644
@@ -13,12 +13,13 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
 
 DEPENDS = "autogen-native flex-native"
 RDEPENDS_${PN} = "diffutils freetype"
-PR = "r0"
+PR = "r1"
 
 SRC_URI = "ftp://ftp.gnu.org/gnu/grub/grub-${PV}.tar.gz \
           file://grub-install.in.patch \
           file://grub-2.00-fpmath-sse-387-fix.patch \
           file://remove-gets.patch \
+          file://check-if-liblzma-is-disabled.patch \
           file://40_custom"
 
 SRC_URI[md5sum] = "e927540b6eda8b024fb0391eeaa4091c"
@@ -32,7 +33,8 @@ FILES_${PN}-dbg += "${libdir}/${BPN}/i386-pc/.debug"
 inherit autotools
 inherit gettext
 
-EXTRA_OECONF = "--with-platform=pc --disable-grub-mkfont --program-prefix="""
+EXTRA_OECONF = "--with-platform=pc --disable-grub-mkfont --program-prefix="" \
+               --enable-liblzma=no --enable-device-mapper=no --enable-libzfs=no"
 
 do_install_append () {
     install -d ${D}${sysconfdir}/grub.d
Signature · 1 line
1.7.9.5
Applied
#1 lore raw
Quoted 5 lines · Constantin Musca

check-if-liblzma-is-disabled.patch: added
- add support for the --enable_liblzma option

[YOCTO #2750]

Quoted 8 lines
---
  .../grub/files/check-if-liblzma-is-disabled.patch  |   33 ++++++++++++++++++++
  meta/recipes-bsp/grub/grub-efi-native_2.00.bb      |    6 ++--
  meta/recipes-bsp/grub/grub_2.00.bb                 |    6 ++--
  3 files changed, 41 insertions(+), 4 deletions(-)

create mode 100644 meta/recipes-bsp/grub/files/check-if-liblzma-is-disabled.patch

Merged into OE-Core

Thanks
Sau!

Quoted 100 lines
meta/recipes-bsp/grub/files/check-if-liblzma-is-disabled.patch new file +33 -0
new file mode 100644
index 0000000..0eece08
@@ -0,0 +1,33 @@
+Disable liblzma if --enable-liblzma=no
+
+Upstream-Status: Inappropriate [configuration]
+
+Signed-off-by: Constantin Musca <[email protected]>
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -1029,10 +1029,20 @@ fi
+
+ AC_SUBST([LIBGEOM])
+
+-AC_CHECK_LIB([lzma], [lzma_code],
+-             [LIBLZMA="-llzma"
+-              AC_DEFINE([HAVE_LIBLZMA], [1],
+-                        [Define to 1 if you have the LZMA library.])],)
++AC_ARG_ENABLE([liblzma],
++              [AS_HELP_STRING([--enable-liblzma],
++                              [enable liblzma integration (default=guessed)])])
++if test x"$enable_liblzma" = xno ; then
++  liblzma_excuse="explicitly disabled"
++fi
++
++if test x"$liblzma_excuse" = x ; then
++  AC_CHECK_LIB([lzma], [lzma_code],
++               [LIBLZMA="-llzma"
++                AC_DEFINE([HAVE_LIBLZMA], [1],
++                          [Define to 1 if you have the LZMA library.])],)
++fi
++
+ AC_SUBST([LIBLZMA])
+
+ AC_ARG_ENABLE([libzfs],
meta/recipes-bsp/grub/grub-efi-native_2.00.bb +4 -2
index 776bf23..14ab9ea 100644
@@ -16,7 +16,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
  # FIXME: We should be able to optionally drop freetype as a dependency
  DEPENDS = "autogen-native"
  RDEPENDS_${PN} = "diffutils freetype"
-PR = "r0"
+PR = "r1"
 
  # Native packages do not normally rebuild when the target changes.
  # Ensure this is built once per HOST-TARGET pair.
@@ -26,6 +26,7 @@ SRC_URI = "ftp://ftp.gnu.org/gnu/grub/grub-${PV}.tar.gz \
             file://grub-2.00-fpmath-sse-387-fix.patch \
  	   file://grub-2.00-fix-enable_execute_stack-check.patch \
             file://grub-2.00-disable-help2man.patch \
+           file://check-if-liblzma-is-disabled.patch \
  	   file://grub-no-unused-result.patch \
            "
  SRC_URI[md5sum] = "e927540b6eda8b024fb0391eeaa4091c"
@@ -59,7 +60,8 @@ inherit native
  inherit deploy
 
  EXTRA_OECONF = "--with-platform=efi --disable-grub-mkfont \
-                --target=${GRUB_TARGET} --enable-efiemu=no --program-prefix=''"
+                --target=${GRUB_TARGET} --enable-efiemu=no --program-prefix='' \
+                --enable-liblzma=no --enable-device-mapper=no --enable-libzfs=no"
 
  do_mkimage() {
  	./grub-mkimage -p /EFI/BOOT -d ./grub-core/ \
meta/recipes-bsp/grub/grub_2.00.bb +4 -2
index 821d9ff..8d22424 100644
@@ -13,12 +13,13 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
 
  DEPENDS = "autogen-native flex-native"
  RDEPENDS_${PN} = "diffutils freetype"
-PR = "r0"
+PR = "r1"
 
  SRC_URI = "ftp://ftp.gnu.org/gnu/grub/grub-${PV}.tar.gz \
            file://grub-install.in.patch \
            file://grub-2.00-fpmath-sse-387-fix.patch \
            file://remove-gets.patch \
+          file://check-if-liblzma-is-disabled.patch \
            file://40_custom"
 
  SRC_URI[md5sum] = "e927540b6eda8b024fb0391eeaa4091c"
@@ -32,7 +33,8 @@ FILES_${PN}-dbg += "${libdir}/${BPN}/i386-pc/.debug"
  inherit autotools
  inherit gettext
 
-EXTRA_OECONF = "--with-platform=pc --disable-grub-mkfont --program-prefix="""
+EXTRA_OECONF = "--with-platform=pc --disable-grub-mkfont --program-prefix="" \
+               --enable-liblzma=no --enable-device-mapper=no --enable-libzfs=no"
 
  do_install_append () {
      install -d ${D}${sysconfdir}/grub.d