[oe-commits] [meta-openembedded] branch master-next updated: dlm: Fix host-user-contaminated QA errors

git at git.openembedded.org git at git.openembedded.org
Tue Mar 3 21:10:31 UTC 2020


This is an automated email from the git hooks/post-receive script.

khem pushed a commit to branch master-next
in repository meta-openembedded.

The following commit(s) were added to refs/heads/master-next by this push:
     new 71e0072  dlm: Fix host-user-contaminated QA errors
71e0072 is described below

commit 71e00725fc7d7b470ed8e996fe361951dd1086d2
Author: Khem Raj <raj.khem at gmail.com>
AuthorDate: Tue Mar 3 13:06:31 2020 -0800

    dlm: Fix host-user-contaminated QA errors
    
    - Drop unused 0001-dlm-fix-package-qa-error.patch
    - Merge appends into main task
    - remove explicitly mentioning systemd in deps, systemd bbclass will add it
    - Add a patch to fix install using cp cmd to preserve file permissions
    
    Fixes
    dlm: /usr/lib/libdlmcontrol.so.3 is owned by uid 1000, which is the same as the user running bitbake. This may be due to host contamination [host-user-contaminated]
    
    Signed-off-by: Khem Raj <raj.khem at gmail.com>
---
 .../dlm/dlm/0001-dlm-fix-package-qa-error.patch    | 32 --------------
 ...Replace-cp-a-with-mode-preserving-options.patch | 51 ++++++++++++++++++++++
 meta-networking/recipes-extended/dlm/dlm_4.0.9.bb  | 24 ++++------
 3 files changed, 59 insertions(+), 48 deletions(-)

diff --git a/meta-networking/recipes-extended/dlm/dlm/0001-dlm-fix-package-qa-error.patch b/meta-networking/recipes-extended/dlm/dlm/0001-dlm-fix-package-qa-error.patch
deleted file mode 100644
index 3e384f7..0000000
--- a/meta-networking/recipes-extended/dlm/dlm/0001-dlm-fix-package-qa-error.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 1fb68433bde97d571fc781b52c9521b17fbb8df0 Mon Sep 17 00:00:00 2001
-From: Changqing Li <changqing.li at windriver.com>
-Date: Tue, 24 Jul 2018 17:42:43 +0800
-Subject: [PATCH] dlm: fix package qa error
-
-pass LDFLAG to makefile to fix below error:
-do_package_qa: QA Issue: No GNU_HASH in the elf binary:
-/packages-split/dlm/usr/sbin/dlm_stonith' [ldflags]
-
-Upstream-Status: Inappropriate[oe-specific]
-
-Signed-off-by: Changqing Li <changqing.li at windriver.com>
----
- fence/Makefile | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/fence/Makefile b/fence/Makefile
-index cca0b2c..2b3963c 100644
---- a/fence/Makefile
-+++ b/fence/Makefile
-@@ -33,7 +33,7 @@ BIN_CFLAGS += -fPIE -DPIE
- BIN_CFLAGS += `pkg-config libxml-2.0 --cflags`
- BIN_CFLAGS += -I../include
- 
--BIN_LDFLAGS += -Wl,-z,now -Wl,-z,relro -pie
-+BIN_LDFLAGS += $(LDFLAGS) -Wl,-z,now -Wl,-z,relro -pie
- BIN_LDFLAGS += `pkg-config libxml-2.0 --libs`
- BIN_LDFLAGS += -ldl
- 
--- 
-2.7.4
-
diff --git a/meta-networking/recipes-extended/dlm/dlm/0001-make-Replace-cp-a-with-mode-preserving-options.patch b/meta-networking/recipes-extended/dlm/dlm/0001-make-Replace-cp-a-with-mode-preserving-options.patch
new file mode 100644
index 0000000..e6a3757
--- /dev/null
+++ b/meta-networking/recipes-extended/dlm/dlm/0001-make-Replace-cp-a-with-mode-preserving-options.patch
@@ -0,0 +1,51 @@
+From 2f72f9271b8dd61ca5092e025b0f8243c6fd68f2 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem at gmail.com>
+Date: Tue, 3 Mar 2020 12:38:19 -0800
+Subject: [PATCH] make: Replace cp -a with mode preserving options
+
+Helps fix permissions in staging area
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem at gmail.com>
+---
+ dlm_controld/Makefile | 4 ++--
+ libdlm/Makefile       | 8 ++++----
+ 2 files changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/dlm_controld/Makefile b/dlm_controld/Makefile
+index 6081cf8..fe71be2 100644
+--- a/dlm_controld/Makefile
++++ b/dlm_controld/Makefile
+@@ -88,8 +88,8 @@ install: all
+ 	$(INSTALL) -d $(DESTDIR)/$(PKGDIR)
+ 	$(INSTALL) -m 755 $(BIN_TARGET) $(DESTDIR)/$(BINDIR)
+ 	$(INSTALL) -m 755 $(LIB_TARGET) $(DESTDIR)/$(LIBDIR)
+-	cp -a $(LIB_SO) $(DESTDIR)/$(LIBDIR)
+-	cp -a $(LIB_SMAJOR) $(DESTDIR)/$(LIBDIR)
++	cp -R --no-dereference --preserve=mode,links $(LIB_SO) $(DESTDIR)/$(LIBDIR)
++	cp -R --no-dereference --preserve=mode,links $(LIB_SMAJOR) $(DESTDIR)/$(LIBDIR)
+ 	$(INSTALL) -m 644 $(LIB_PC) $(DESTDIR)/$(PKGDIR)
+ 	$(INSTALL) -m 644 libdlmcontrol.h $(DESTDIR)/$(HDRDIR)
+ 	$(INSTALL) -m 644 dlm_controld.8 $(DESTDIR)/$(MANDIR)/man8/
+diff --git a/libdlm/Makefile b/libdlm/Makefile
+index ab32761..8820bf8 100644
+--- a/libdlm/Makefile
++++ b/libdlm/Makefile
+@@ -125,10 +125,10 @@ install: all
+ 	$(INSTALL) -d $(DESTDIR)/$(UDEVDIR)
+ 	$(INSTALL) -c -m 755 $(LIB_TARGET) $(DESTDIR)/$(LIBDIR)
+ 	$(INSTALL) -c -m 755 $(LLT_TARGET) $(DESTDIR)/$(LIBDIR)
+-	cp -a $(LIB_SO) $(DESTDIR)/$(LIBDIR)
+-	cp -a $(LIB_SMAJOR) $(DESTDIR)/$(LIBDIR)
+-	cp -a $(LLT_SO) $(DESTDIR)/$(LIBDIR)
+-	cp -a $(LLT_SMAJOR) $(DESTDIR)/$(LIBDIR)
++	cp -R --no-dereference --preserve=mode,links $(LIB_SO) $(DESTDIR)/$(LIBDIR)
++	cp -R --no-dereference --preserve=mode,links $(LIB_SMAJOR) $(DESTDIR)/$(LIBDIR)
++	cp -R --no-dereference --preserve=mode,links $(LLT_SO) $(DESTDIR)/$(LIBDIR)
++	cp -R --no-dereference --preserve=mode,links $(LLT_SMAJOR) $(DESTDIR)/$(LIBDIR)
+ 	$(INSTALL) -m 644 $(LIB_PC) $(DESTDIR)/$(PKGDIR)
+ 	$(INSTALL) -m 644 $(LLT_PC) $(DESTDIR)/$(PKGDIR)
+ 	$(INSTALL) -c -m 644 $(HDR_TARGET) $(DESTDIR)/$(HDRDIR)
+-- 
+2.25.1
+
diff --git a/meta-networking/recipes-extended/dlm/dlm_4.0.9.bb b/meta-networking/recipes-extended/dlm/dlm_4.0.9.bb
index 4bf9944..577db70 100644
--- a/meta-networking/recipes-extended/dlm/dlm_4.0.9.bb
+++ b/meta-networking/recipes-extended/dlm/dlm_4.0.9.bb
@@ -8,6 +8,7 @@ REQUIRED_DISTRO_FEATURES = "systemd"
 SRC_URI = "https://pagure.io/dlm/archive/dlm-${PV}/dlm-dlm-${PV}.tar.gz \
            file://0001-dlm-fix-compile-error-since-xml2-config-should-not-b.patch \
            file://0001-Include-sys-sysmacros.h-for-major-minor-macros-in-gl.patch \
+           file://0001-make-Replace-cp-a-with-mode-preserving-options.patch \
            "
 
 SRC_URI[md5sum] = "4c57a941a15547859cd38fd55f66388e"
@@ -21,7 +22,7 @@ LIC_FILES_CHKSUM = "file://README.license;md5=8f0bbcdd678df1bce9863492b6c8832d"
 
 S = "${WORKDIR}/dlm-dlm-${PV}"
 
-DEPENDS = "corosync systemd"
+DEPENDS += "corosync"
 
 inherit pkgconfig systemd features_check
 
@@ -40,29 +41,20 @@ do_compile_prepend_toolchain-clang() {
     sed -i -e "s/-fstack-clash-protection//g" ${S}/*/Makefile
 }
 
-do_compile_prepend() {
+do_compile() {
     sed -i "s/libsystemd-daemon/libsystemd/g" ${S}/dlm_controld/Makefile
     sed -i -e "s/ ${DONTBUILD}//g" ${S}/Makefile
-}
-
-do_compile () {
     oe_runmake 'CC=${CC}'
 }
 
-do_install_append (){
-    install -d ${D}${sysconfdir}/sysconfig/
-    install -d ${D}${sysconfdir}/init.d/
-    install -m 0644 ${S}/init/dlm.sysconfig ${D}${sysconfdir}/sysconfig/dlm
-    install -m 0644 ${S}/init/dlm.init ${D}${sysconfdir}/init.d/dlm
+do_install() {
+    oe_runmake install DESTDIR=${D} LIBDIR=${libdir}
+    install -Dm 0644 ${S}/init/dlm.sysconfig ${D}${sysconfdir}/sysconfig/dlm
+    install -Dm 0644 ${S}/init/dlm.init ${D}${sysconfdir}/init.d/dlm
 
     # install systemd unit files
     if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
-        install -d ${D}${systemd_unitdir}/system
-        install -m 0644 ${S}/init/dlm.service ${D}${systemd_unitdir}/system
+        install -Dm 0644 ${S}/init/dlm.service ${D}${systemd_unitdir}/system/dlm.service
     fi
 }
 
-do_install() {
-    oe_runmake install DESTDIR=${D} LIBDIR=${libdir}
-}
-

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list