Skip to contentSkip to conversation

Fix build errors when enable selinux and ptest

PATCH New [email protected] 1 participant 2 messages Apr 18, 2019

lore
Share & tools
lore
#0 lore raw

cover Fix build errors when enable selinux and ptest

From: Kai Kang <[email protected]>

Fix build errors when enable selinux and ptest:

DISTRO_FEATURES_append = ""

ERROR: busybox-1.30.1-r0 do_package: Error executing a python function in exec_python_func() autogenerated:

The stack trace of python calls that resulted in this exception/failure was:
File: 'exec_python_func() autogenerated', lineno: 2, function: <module>

     0001:
 *** 0002:ptest_update_alternatives(d)
     0003:

File: '/home/kkang/buildarea/wrlx-201902/repo/layers/oe-core/meta/classes/ptest.bbclass', lineno: 97, function: ptest_update_alternatives
0093: for alt_name, alt_link, alt_target, _ in alternatives:
0094: # Some alternatives are for man pages,
0095: # check if the alternative is in PATH
0096: if os.path.dirname(alt_link) in bin_paths:
*** 0097: os.symlink(alt_target, os.path.join(ptest_bindir, alt_name))

     0098:}
     0099:
     0100:do_configure_ptest_base[dirs] = "${B}"
     0101:do_compile_ptest_base[dirs] = "${B}"

Exception: FileExistsError: [Errno 17] File exists: '/usr/lib64/busybox/bin/ash' -> '/home/kkang/buildarea/wrlx-201902/LIN1019-1104/tmp-glibc/ work/aarch64-wrs-linux/busybox/1.30.1-r0/package/usr/lib64/busybox/ptest/bin/ash'

ERROR: busybox-1.30.1-r0 do_package: [Errno 17] File exists: '/usr/lib64/busybox/bin/ash' -> '/home/kkang/buildarea/wrlx-201902/LIN1019-1104/t mp-glibc/work/aarch64-wrs-linux/busybox/1.30.1-r0/package/usr/lib64/busybox/ptest/bin/ash'
ERROR: busybox-1.30.1-r0 do_package: Function failed: ptest_update_alternatives
ERROR: Logfile of failure stored in: /home/kkang/buildarea/wrlx-201902/LIN1019-1104/tmp-glibc/work/aarch64-wrs-linux/busybox/1.30.1-r0/temp/lo g.do_package.87140
ERROR: Task (/home/kkang/buildarea/wrlx-201902/repo/layers/oe-core/meta/recipes-core/busybox/busybox_1.30.1.bb:do_package) failed with exit co de '1'
NOTE: Tasks Summary: Attempted 1775 tasks of which 1774 didn't need to be rerun and 1 failed.

Summary: 1 task failed:
/home/kkang/buildarea/wrlx-201902/repo/layers/oe-core/meta/recipes-core/busybox/busybox_1.30.1.bb:do_package

Kai Kang (1):
busybox: disable PTEST_BINDIR

 recipes-core/busybox/busybox_selinux.inc | 2 ++
 1 file changed, 2 insertions(+)

--
2.20.0

#1 lore raw

PATCH 1/1 busybox: disable PTEST_BINDIR

From: Kai Kang <[email protected]>

A new feature has been added in oe-core to use update-alternative mechanism for ptest. But it conflicts with current patch in meta-selinux. So do not use this new feature for ptest when build with selinux.

---
 recipes-core/busybox/busybox_selinux.inc | 2 ++
 1 file changed, 2 insertions(+)
recipes-core/busybox/busybox_selinux.inc +2 -0
index df7c117..cc83b01 100644
@@ -1,3 +1,5 @@
+PTEST_BINDIR = "0"
+
 FILES_${PN} += "${libdir}/${PN}"
 
 # We should use sh wrappers instead of links so the commands could get correct
Signature · 1 line
2.20.0