Skip to contentSkip to conversation

grub/grub-efi: fix conflict

PATCH New Hongxu Jia 1 participant 2 messages Nov 23, 2016

lore
Share & tools
lore

Hongxu Jia

author
#0 lore raw

cover grub/grub-efi: fix conflict

The following changes since commit 43e652f3d1fee5ce7fad67e6400315eab1b34270:

devtool: add "rename" subcommand (2016-11-07 11:04:22 +0000)

are available in the git repository at:

git://git.openembedded.org/openembedded-core-contrib hongxu/fix-grub
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=hongxu/fix-grub

Hongxu Jia (1):
grub/grub-efi: fix conflict

 meta/recipes-bsp/grub/grub-efi_2.00.bb | 12 +++++++++---
 meta/recipes-bsp/grub/grub2.inc        |  4 ----
 meta/recipes-bsp/grub/grub_2.00.bb     | 18 +++++++++++-------
 3 files changed, 20 insertions(+), 14 deletions(-)
Signature · 1 line
2.8.1
author
#1 lore raw

PATCH 1/1 grub/grub-efi: fix conflict

While installing grub and grub-efi, there are conflict files in ${sysconfdir} ${datadir} ${bindir} ${sbindir}.

Debian use a common package grub-common for both of pc bios and efi, and use package grub-pc-bin for pc bios, grub-efi-amd64-bin for efi. Both of grub-pc-bin and grub-efi-amd64-bin requires grub-common.
https://packages.debian.org/sid/grub-common
https://packages.debian.org/jessie/grub-pc-bin
https://packages.debian.org/jessie/grub-efi-amd64-bin

Fedora use a common package grub2-tools for both of pc bios and efi, and use package grub2 for pc bios, grub2-efi-modules for efi. Both of grub2 and grub2-efi-modules requires grub2-tools.
https://www.rpmfind.net/linux/RPM/fedora/devel/rawhide/x86_64/g/grub2-tools-2.02-0.34.fc24.x86_64.html
https://www.rpmfind.net/linux/RPM/fedora/devel/rawhide/x86_64/g/grub2-2.02-0.34.fc24.x86_64.html
https://www.rpmfind.net/linux/RPM/fedora/devel/rawhide/x86_64/g/grub2-efi-modules-2.02-0.34.fc24.x86_64.html

For OE, we use a common package grub-common for both of pc bios and efi, and use package grub for pc bios, grub-efi for efi.
Both of grubc and grub-efi runtime depends grub-common.

---
 meta/recipes-bsp/grub/grub-efi_2.00.bb | 12 +++++++++---
 meta/recipes-bsp/grub/grub2.inc        |  4 ----
 meta/recipes-bsp/grub/grub_2.00.bb     | 18 +++++++++++-------
 3 files changed, 20 insertions(+), 14 deletions(-)
meta/recipes-bsp/grub/grub-efi_2.00.bb +9 -3
index 5a0dc95..72983da 100644
@@ -1,7 +1,7 @@
 require grub2.inc
 
 DEPENDS_class-target = "grub-efi-native"
-RDEPENDS_${PN}_class-target = "diffutils freetype"
+RDEPENDS_${PN}_class-target = "diffutils freetype grub-common"
 PR = "r3"
 
 SRC_URI += " \
@@ -44,6 +44,13 @@ do_install_class-native() {
 	install -m 755 grub-mkimage ${D}${bindir}
 }
 
+do_install_append_class-target(){
+	# Remove duplicated
+	for dir in ${sysconfdir} ${datadir} ${bindir} ${sbindir}; do
+		rm -rf ${D}$dir
+	done
+}
+
 GRUB_BUILDIN ?= "boot linux ext2 fat serial part_msdos part_gpt normal efi_gop iso9660 search"
 
 do_deploy() {
@@ -61,8 +68,7 @@ do_deploy_class-native() {
 
 addtask deploy after do_install before do_build
 
-FILES_${PN} += "${libdir}/grub/${GRUB_TARGET}-efi \
-                ${datadir}/grub \
+FILES_${PN} = "${libdir}/grub/${GRUB_TARGET}-efi \
                 "
 
 BBCLASSEXTEND = "native"
meta/recipes-bsp/grub/grub2.inc +0 -4
index b10f633..1bb7b84 100644
@@ -64,7 +64,3 @@ do_configure_prepend() {
 	( cd ${S}
 	${S}/autogen.sh )
 }
-
-# grub and grub-efi's sysroot/${datadir}/grub/grub-mkconfig_lib are
-# conflicted, remove it since no one uses it.
-SYSROOT_DIRS_BLACKLIST += "${datadir}/grub/grub-mkconfig_lib"
meta/recipes-bsp/grub/grub_2.00.bb +11 -7
index 07e1d10..7bfece0 100644
@@ -1,6 +1,8 @@
 require grub2.inc
 
-RDEPENDS_${PN} = "diffutils freetype grub-editenv"
+RDEPENDS_${PN} = "diffutils freetype ${PN}-common"
+RDEPENDS_${PN}-common = "${PN}-editenv"
+
 PR = "r1"
 
 EXTRA_OECONF = "--with-platform=pc --disable-grub-mkfont --program-prefix="" \
@@ -8,13 +10,15 @@ EXTRA_OECONF = "--with-platform=pc --disable-grub-mkfont --program-prefix="" \
 
 EXTRA_OECONF += "${@bb.utils.contains('DISTRO_FEATURES', 'largefile', '--enable-largefile', '--disable-largefile', d)}"
 
-PACKAGES =+ "grub-editenv"
-
-FILES_grub-editenv = "${bindir}/grub-editenv"
+PACKAGES =+ "${PN}-editenv ${PN}-common"
 
-do_install_append () {
-    install -d ${D}${sysconfdir}/grub.d
-}
+FILES_${PN}-editenv = "${bindir}/grub-editenv"
+FILES_${PN}-common = " \
+    ${bindir} \
+    ${sysconfdir} \
+    ${sbindir} \
+    ${datadir}/grub \
+"
 
 INSANE_SKIP_${PN} = "arch"
 INSANE_SKIP_${PN}-dbg = "arch"
Signature · 1 line
2.8.1