diff options
author | Khem Raj <raj.khem@gmail.com> | 2020-03-03 13:06:31 -0800 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2020-03-03 13:10:33 -0800 |
commit | 71e00725fc7d7b470ed8e996fe361951dd1086d2 (patch) | |
tree | 6f92bdb75362a75bde39b38784a52ee21295ccaf /meta-networking | |
parent | 6f1e04c396cfe01c008803086c00323ac7e1f59b (diff) | |
download | meta-openembedded-71e00725fc7d7b470ed8e996fe361951dd1086d2.tar.gz |
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@gmail.com>
Diffstat (limited to 'meta-networking')
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 3e384f7d9..000000000 --- a/meta-networking/recipes-extended/dlm/dlm/0001-dlm-fix-package-qa-error.patch +++ /dev/null | |||
@@ -1,32 +0,0 @@ | |||
1 | From 1fb68433bde97d571fc781b52c9521b17fbb8df0 Mon Sep 17 00:00:00 2001 | ||
2 | From: Changqing Li <changqing.li@windriver.com> | ||
3 | Date: Tue, 24 Jul 2018 17:42:43 +0800 | ||
4 | Subject: [PATCH] dlm: fix package qa error | ||
5 | |||
6 | pass LDFLAG to makefile to fix below error: | ||
7 | do_package_qa: QA Issue: No GNU_HASH in the elf binary: | ||
8 | /packages-split/dlm/usr/sbin/dlm_stonith' [ldflags] | ||
9 | |||
10 | Upstream-Status: Inappropriate[oe-specific] | ||
11 | |||
12 | Signed-off-by: Changqing Li <changqing.li@windriver.com> | ||
13 | --- | ||
14 | fence/Makefile | 2 +- | ||
15 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
16 | |||
17 | diff --git a/fence/Makefile b/fence/Makefile | ||
18 | index cca0b2c..2b3963c 100644 | ||
19 | --- a/fence/Makefile | ||
20 | +++ b/fence/Makefile | ||
21 | @@ -33,7 +33,7 @@ BIN_CFLAGS += -fPIE -DPIE | ||
22 | BIN_CFLAGS += `pkg-config libxml-2.0 --cflags` | ||
23 | BIN_CFLAGS += -I../include | ||
24 | |||
25 | -BIN_LDFLAGS += -Wl,-z,now -Wl,-z,relro -pie | ||
26 | +BIN_LDFLAGS += $(LDFLAGS) -Wl,-z,now -Wl,-z,relro -pie | ||
27 | BIN_LDFLAGS += `pkg-config libxml-2.0 --libs` | ||
28 | BIN_LDFLAGS += -ldl | ||
29 | |||
30 | -- | ||
31 | 2.7.4 | ||
32 | |||
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 000000000..e6a37579e --- /dev/null +++ b/meta-networking/recipes-extended/dlm/dlm/0001-make-Replace-cp-a-with-mode-preserving-options.patch | |||
@@ -0,0 +1,51 @@ | |||
1 | From 2f72f9271b8dd61ca5092e025b0f8243c6fd68f2 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Tue, 3 Mar 2020 12:38:19 -0800 | ||
4 | Subject: [PATCH] make: Replace cp -a with mode preserving options | ||
5 | |||
6 | Helps fix permissions in staging area | ||
7 | |||
8 | Upstream-Status: Pending | ||
9 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
10 | --- | ||
11 | dlm_controld/Makefile | 4 ++-- | ||
12 | libdlm/Makefile | 8 ++++---- | ||
13 | 2 files changed, 6 insertions(+), 6 deletions(-) | ||
14 | |||
15 | diff --git a/dlm_controld/Makefile b/dlm_controld/Makefile | ||
16 | index 6081cf8..fe71be2 100644 | ||
17 | --- a/dlm_controld/Makefile | ||
18 | +++ b/dlm_controld/Makefile | ||
19 | @@ -88,8 +88,8 @@ install: all | ||
20 | $(INSTALL) -d $(DESTDIR)/$(PKGDIR) | ||
21 | $(INSTALL) -m 755 $(BIN_TARGET) $(DESTDIR)/$(BINDIR) | ||
22 | $(INSTALL) -m 755 $(LIB_TARGET) $(DESTDIR)/$(LIBDIR) | ||
23 | - cp -a $(LIB_SO) $(DESTDIR)/$(LIBDIR) | ||
24 | - cp -a $(LIB_SMAJOR) $(DESTDIR)/$(LIBDIR) | ||
25 | + cp -R --no-dereference --preserve=mode,links $(LIB_SO) $(DESTDIR)/$(LIBDIR) | ||
26 | + cp -R --no-dereference --preserve=mode,links $(LIB_SMAJOR) $(DESTDIR)/$(LIBDIR) | ||
27 | $(INSTALL) -m 644 $(LIB_PC) $(DESTDIR)/$(PKGDIR) | ||
28 | $(INSTALL) -m 644 libdlmcontrol.h $(DESTDIR)/$(HDRDIR) | ||
29 | $(INSTALL) -m 644 dlm_controld.8 $(DESTDIR)/$(MANDIR)/man8/ | ||
30 | diff --git a/libdlm/Makefile b/libdlm/Makefile | ||
31 | index ab32761..8820bf8 100644 | ||
32 | --- a/libdlm/Makefile | ||
33 | +++ b/libdlm/Makefile | ||
34 | @@ -125,10 +125,10 @@ install: all | ||
35 | $(INSTALL) -d $(DESTDIR)/$(UDEVDIR) | ||
36 | $(INSTALL) -c -m 755 $(LIB_TARGET) $(DESTDIR)/$(LIBDIR) | ||
37 | $(INSTALL) -c -m 755 $(LLT_TARGET) $(DESTDIR)/$(LIBDIR) | ||
38 | - cp -a $(LIB_SO) $(DESTDIR)/$(LIBDIR) | ||
39 | - cp -a $(LIB_SMAJOR) $(DESTDIR)/$(LIBDIR) | ||
40 | - cp -a $(LLT_SO) $(DESTDIR)/$(LIBDIR) | ||
41 | - cp -a $(LLT_SMAJOR) $(DESTDIR)/$(LIBDIR) | ||
42 | + cp -R --no-dereference --preserve=mode,links $(LIB_SO) $(DESTDIR)/$(LIBDIR) | ||
43 | + cp -R --no-dereference --preserve=mode,links $(LIB_SMAJOR) $(DESTDIR)/$(LIBDIR) | ||
44 | + cp -R --no-dereference --preserve=mode,links $(LLT_SO) $(DESTDIR)/$(LIBDIR) | ||
45 | + cp -R --no-dereference --preserve=mode,links $(LLT_SMAJOR) $(DESTDIR)/$(LIBDIR) | ||
46 | $(INSTALL) -m 644 $(LIB_PC) $(DESTDIR)/$(PKGDIR) | ||
47 | $(INSTALL) -m 644 $(LLT_PC) $(DESTDIR)/$(PKGDIR) | ||
48 | $(INSTALL) -c -m 644 $(HDR_TARGET) $(DESTDIR)/$(HDRDIR) | ||
49 | -- | ||
50 | 2.25.1 | ||
51 | |||
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 4bf9944aa..577db7087 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" | |||
8 | SRC_URI = "https://pagure.io/dlm/archive/dlm-${PV}/dlm-dlm-${PV}.tar.gz \ | 8 | SRC_URI = "https://pagure.io/dlm/archive/dlm-${PV}/dlm-dlm-${PV}.tar.gz \ |
9 | file://0001-dlm-fix-compile-error-since-xml2-config-should-not-b.patch \ | 9 | file://0001-dlm-fix-compile-error-since-xml2-config-should-not-b.patch \ |
10 | file://0001-Include-sys-sysmacros.h-for-major-minor-macros-in-gl.patch \ | 10 | file://0001-Include-sys-sysmacros.h-for-major-minor-macros-in-gl.patch \ |
11 | file://0001-make-Replace-cp-a-with-mode-preserving-options.patch \ | ||
11 | " | 12 | " |
12 | 13 | ||
13 | SRC_URI[md5sum] = "4c57a941a15547859cd38fd55f66388e" | 14 | SRC_URI[md5sum] = "4c57a941a15547859cd38fd55f66388e" |
@@ -21,7 +22,7 @@ LIC_FILES_CHKSUM = "file://README.license;md5=8f0bbcdd678df1bce9863492b6c8832d" | |||
21 | 22 | ||
22 | S = "${WORKDIR}/dlm-dlm-${PV}" | 23 | S = "${WORKDIR}/dlm-dlm-${PV}" |
23 | 24 | ||
24 | DEPENDS = "corosync systemd" | 25 | DEPENDS += "corosync" |
25 | 26 | ||
26 | inherit pkgconfig systemd features_check | 27 | inherit pkgconfig systemd features_check |
27 | 28 | ||
@@ -40,29 +41,20 @@ do_compile_prepend_toolchain-clang() { | |||
40 | sed -i -e "s/-fstack-clash-protection//g" ${S}/*/Makefile | 41 | sed -i -e "s/-fstack-clash-protection//g" ${S}/*/Makefile |
41 | } | 42 | } |
42 | 43 | ||
43 | do_compile_prepend() { | 44 | do_compile() { |
44 | sed -i "s/libsystemd-daemon/libsystemd/g" ${S}/dlm_controld/Makefile | 45 | sed -i "s/libsystemd-daemon/libsystemd/g" ${S}/dlm_controld/Makefile |
45 | sed -i -e "s/ ${DONTBUILD}//g" ${S}/Makefile | 46 | sed -i -e "s/ ${DONTBUILD}//g" ${S}/Makefile |
46 | } | ||
47 | |||
48 | do_compile () { | ||
49 | oe_runmake 'CC=${CC}' | 47 | oe_runmake 'CC=${CC}' |
50 | } | 48 | } |
51 | 49 | ||
52 | do_install_append (){ | 50 | do_install() { |
53 | install -d ${D}${sysconfdir}/sysconfig/ | 51 | oe_runmake install DESTDIR=${D} LIBDIR=${libdir} |
54 | install -d ${D}${sysconfdir}/init.d/ | 52 | install -Dm 0644 ${S}/init/dlm.sysconfig ${D}${sysconfdir}/sysconfig/dlm |
55 | install -m 0644 ${S}/init/dlm.sysconfig ${D}${sysconfdir}/sysconfig/dlm | 53 | install -Dm 0644 ${S}/init/dlm.init ${D}${sysconfdir}/init.d/dlm |
56 | install -m 0644 ${S}/init/dlm.init ${D}${sysconfdir}/init.d/dlm | ||
57 | 54 | ||
58 | # install systemd unit files | 55 | # install systemd unit files |
59 | if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then | 56 | if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then |
60 | install -d ${D}${systemd_unitdir}/system | 57 | install -Dm 0644 ${S}/init/dlm.service ${D}${systemd_unitdir}/system/dlm.service |
61 | install -m 0644 ${S}/init/dlm.service ${D}${systemd_unitdir}/system | ||
62 | fi | 58 | fi |
63 | } | 59 | } |
64 | 60 | ||
65 | do_install() { | ||
66 | oe_runmake install DESTDIR=${D} LIBDIR=${libdir} | ||
67 | } | ||
68 | |||