Skip to contentSkip to conversation

grub/grub-efi: fix conflict & fix librepo typo

PATCH In review Hongxu Jia 1 participant 4 messages Jun 9, 2017 – Jul 17, 2017

lore
Share & tools
lore

Hongxu Jia

author
#0 lore raw

cover grub/grub-efi: fix conflict & fix librepo typo

1. For "grub/grub-efi: fix conflict", the test steps:

vim local.conf
---
MACHINE = "qemux86-64"
IMAGE_INSTALL_append = " grub grub-efi"
---

bitbake core-image-minimal

//Hongxu

The following changes since commit 4a7612c7a12b9a381fb8343ba9586272b889fc15:

buildhistory: skip tests if GitPython module is missing (2017-06-07 16:00:49 +0100)

are available in the git repository at:

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

Hongxu Jia (2):
grub/grub-efi: fix conflict
librepo: Fix typo: correct LRO_SSLVERIFYHOST with
CURLOPT_SSL_VERIFYHOST

 meta/recipes-bsp/grub/grub-efi_2.02.bb             |  7 ++--
 meta/recipes-bsp/grub/grub2.inc                    |  4 ---
 meta/recipes-bsp/grub/grub_2.02.bb                 | 13 +++++--
 ...rrect-LRO_SSLVERIFYHOST-with-CURLOPT_SSL_.patch | 40 ++++++++++++++++++++++
 meta/recipes-devtools/librepo/librepo_git.bb       |  1 +
 5 files changed, 56 insertions(+), 9 deletions(-)
 create mode 100644 meta/recipes-devtools/librepo/librepo/0005-Fix-typo-correct-LRO_SSLVERIFYHOST-with-CURLOPT_SSL_.patch
Signature · 1 line
2.8.1
author
#1 lore raw

PATCH 1/2 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.

[YOCTO #11639]

---
 meta/recipes-bsp/grub/grub-efi_2.02.bb |  7 +++++--
 meta/recipes-bsp/grub/grub2.inc        |  4 ----
 meta/recipes-bsp/grub/grub_2.02.bb     | 13 ++++++++++---
 3 files changed, 15 insertions(+), 9 deletions(-)
meta/recipes-bsp/grub/grub-efi_2.02.bb +5 -2
index 9d494d5..3c87cb7 100644
@@ -3,7 +3,7 @@ require grub2.inc
 GRUBPLATFORM = "efi"
 
 DEPENDS_class-target = "grub-efi-native"
-RDEPENDS_${PN}_class-target = "diffutils freetype"
+RDEPENDS_${PN}_class-target = "diffutils freetype grub-common"
 
 SRC_URI += " \
            file://cfg \
@@ -41,6 +41,10 @@ do_install_class-native() {
 	install -m 755 grub-mkimage ${D}${bindir}
 }
 
+do_install_class-target() {
+	oe_runmake 'DESTDIR=${D}' -C grub-core install
+}
+
 GRUB_BUILDIN ?= "boot linux ext2 fat serial part_msdos part_gpt normal efi_gop iso9660 search"
 
 do_deploy() {
@@ -59,7 +63,6 @@ do_deploy_class-native() {
 addtask deploy after do_install before do_build
 
 FILES_${PN} += "${libdir}/grub/${GRUB_TARGET}-efi \
-                ${datadir}/grub \
                 "
 
 # 64-bit binaries are expected for the bootloader with an x32 userland
meta/recipes-bsp/grub/grub2.inc +0 -4
index bb6ebdd..2bf3245 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.02.bb +10 -3
index 57c6559..ea41ee9 100644
@@ -1,10 +1,17 @@
 require grub2.inc
 
-RDEPENDS_${PN} = "diffutils freetype grub-editenv"
+RDEPENDS_${PN}-common = "${PN}-editenv"
+RDEPENDS_${PN} = "diffutils freetype ${PN}-common"
 
-PACKAGES =+ "grub-editenv"
+PACKAGES =+ "${PN}-editenv ${PN}-common"
 
-FILES_grub-editenv = "${bindir}/grub-editenv"
+FILES_${PN}-editenv = "${bindir}/grub-editenv"
+FILES_${PN}-common = " \
+    ${bindir} \
+    ${sysconfdir} \
+    ${sbindir} \
+    ${datadir}/grub \
+"
 
 do_install_append () {
     install -d ${D}${sysconfdir}/grub.d
Signature · 1 line
2.8.1
author
#3 lore raw

PATCH 2/2 librepo: Fix typo: correct LRO_SSLVERIFYHOST with CURLOPT_SSL_VERIFYHOST

In reply to Hongxu Jia

The commit 51d32c6cd88ba0139c32793183fd6a236c1ef456 in
git://github.com/rpm-software-management/librepo.git
...

Author: Tomas Mlcoch <[email protected]>
Date:   Mon May 5 14:31:35 2014 +0200

Add LRO_SSLVERIFYPEER and LRO_SSLVERIFYHOST options (RhBug: 1093014)
...

It incorrectly setopt CURLOPT_SSL_VERIFYPEER for LRO_SSLVERIFYHOST. Use CURLOPT_SSL_VERIFYHOST to correct.

---
 ...rrect-LRO_SSLVERIFYHOST-with-CURLOPT_SSL_.patch | 40 ++++++++++++++++++++++
 meta/recipes-devtools/librepo/librepo_git.bb       |  1 +
 2 files changed, 41 insertions(+)
 create mode 100644 meta/recipes-devtools/librepo/librepo/0005-Fix-typo-correct-LRO_SSLVERIFYHOST-with-CURLOPT_SSL_.patch
meta/recipes-devtools/librepo/librepo/0005-Fix-typo-correct-LRO_SSLVERIFYHOST-with-CURLOPT_SSL_.patch new file +40 -0
new file mode 100644
index 0000000..b0c7d1c
@@ -0,0 +1,40 @@
+From a4bbbccce6edc1a2d1bd475506e2975fd7696c88 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <[email protected]>
+Date: Thu, 8 Jun 2017 16:31:30 +0800
+Subject: [PATCH] Fix typo: correct LRO_SSLVERIFYHOST with
+ CURLOPT_SSL_VERIFYHOST
+
+In commit 51d32c6cd88ba0139c32793183fd6a236c1ef456
+---
+Author: Tomas Mlcoch <[email protected]>
+Date:   Mon May 5 14:31:35 2014 +0200
+
+    Add LRO_SSLVERIFYPEER and LRO_SSLVERIFYHOST options (RhBug: 1093014)
+---
+
+It incorrectly setopt CURLOPT_SSL_VERIFYPEER for LRO_SSLVERIFYHOST.
+Use CURLOPT_SSL_VERIFYHOST to correct.
+
+Upstream-Status: Submitted
+
+Signed-off-by: Hongxu Jia <[email protected]>
+---
+ librepo/handle.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/librepo/handle.c b/librepo/handle.c
+index ccea79b..ff39db4 100644
+--- a/librepo/handle.c
++++ b/librepo/handle.c
+@@ -629,7 +629,7 @@ lr_handle_setopt(LrHandle *handle,
+ 
+     case LRO_SSLVERIFYHOST:
+         handle->sslverifyhost = va_arg(arg, long) ? 2 : 0;
+-        c_rc = curl_easy_setopt(c_h, CURLOPT_SSL_VERIFYPEER, handle->sslverifyhost);
++        c_rc = curl_easy_setopt(c_h, CURLOPT_SSL_VERIFYHOST, handle->sslverifyhost);
+         break;
+ 
+     case LRO_SSLCLIENTCERT:
+-- 
+2.7.4
+
meta/recipes-devtools/librepo/librepo_git.bb +1 -0
index 2f194f1..3238b14 100644
@@ -7,6 +7,7 @@ SRC_URI = "git://github.com/rpm-software-management/librepo.git \
            file://0002-Do-not-try-to-obtain-PYTHON_INSTALL_DIR-by-running-p.patch \
            file://0003-tests-fix-a-race-when-deleting-temporary-directories.patch \
            file://0004-Set-gpgme-variables-with-pkg-config-not-with-cmake-m.patch \
+           file://0005-Fix-typo-correct-LRO_SSLVERIFYHOST-with-CURLOPT_SSL_.patch \
            "
 
 PV = "1.7.20+git${SRCPV}"
Signature · 1 line
2.8.1
author
#2 lore raw

Re: [PATCH 1/2] grub/grub-efi: fix conflict

In reply to Hongxu Jia

Ping, any comments?

//Hongxu

Quoted 99 lines · Hongxu Jia

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.

[YOCTO #11639]

---
  meta/recipes-bsp/grub/grub-efi_2.02.bb |  7 +++++--
  meta/recipes-bsp/grub/grub2.inc        |  4 ----
  meta/recipes-bsp/grub/grub_2.02.bb     | 13 ++++++++++---
  3 files changed, 15 insertions(+), 9 deletions(-)
meta/recipes-bsp/grub/grub-efi_2.02.bb +5 -2
index 9d494d5..3c87cb7 100644
@@ -3,7 +3,7 @@ require grub2.inc
  GRUBPLATFORM = "efi"
 
  DEPENDS_class-target = "grub-efi-native"
-RDEPENDS_${PN}_class-target = "diffutils freetype"
+RDEPENDS_${PN}_class-target = "diffutils freetype grub-common"
 
  SRC_URI += " \
             file://cfg \
@@ -41,6 +41,10 @@ do_install_class-native() {
  	install -m 755 grub-mkimage ${D}${bindir}
  }
 
+do_install_class-target() {
+	oe_runmake 'DESTDIR=${D}' -C grub-core install
+}
+
  GRUB_BUILDIN ?= "boot linux ext2 fat serial part_msdos part_gpt normal efi_gop iso9660 search"
 
  do_deploy() {
@@ -59,7 +63,6 @@ do_deploy_class-native() {
  addtask deploy after do_install before do_build
 
  FILES_${PN} += "${libdir}/grub/${GRUB_TARGET}-efi \
-                ${datadir}/grub \
                  "
 
  # 64-bit binaries are expected for the bootloader with an x32 userland
meta/recipes-bsp/grub/grub2.inc +0 -4
index bb6ebdd..2bf3245 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.02.bb +10 -3
index 57c6559..ea41ee9 100644
@@ -1,10 +1,17 @@
  require grub2.inc
 
-RDEPENDS_${PN} = "diffutils freetype grub-editenv"
+RDEPENDS_${PN}-common = "${PN}-editenv"
+RDEPENDS_${PN} = "diffutils freetype ${PN}-common"
 
-PACKAGES =+ "grub-editenv"
+PACKAGES =+ "${PN}-editenv ${PN}-common"
 
-FILES_grub-editenv = "${bindir}/grub-editenv"
+FILES_${PN}-editenv = "${bindir}/grub-editenv"
+FILES_${PN}-common = " \
+    ${bindir} \
+    ${sysconfdir} \
+    ${sbindir} \
+    ${datadir}/grub \
+"
 
  do_install_append () {
      install -d ${D}${sysconfdir}/grub.d