Yocto Project Discussions
 help / color / mirror / Atom feed
* [yocto] [meta-selinux] Dependency loop help with selinux userspace/python3/util-linux
@ 2019-12-05 13:46 Peter Morrow
  2019-12-11  2:18 ` Yi Zhao
  0 siblings, 1 reply; 5+ messages in thread
From: Peter Morrow @ 2019-12-05 13:46 UTC (permalink / raw)
  To: yocto@yoctoproject.org; +Cc: Joe_MacDonald@mentor.com

Hi Folks,

I'm trying to upgrade the meta-selinux layer to use a newer version of
the selinux userspace tools (from 2.8 to 2.9), in doing so these newer
userspace tools now depend on python3 instead of python2.  This
unfortunately has created a build time dependency loop in yocto:

python3 --> util-linux --> libselinux --> python3 (used to be python2
with 2.8 selinux userspace).

Running "bitbake libselinux" results in a pile of loops, the one below
illustrates the point.

ERROR:
Dependency loop #1 found:
  Task /workspace/git/yocto-selinux/meta-selinux/recipes-
security/selinux/libselinux_2.9.bb:do_package (dependent Tasks ['gcc-
runtime_9.2.bb:do_packagedata', 'libsepol_2.9.bb:do_packagedata',
'rpm_4.14.2.1.bb:do_populate_sysroot', 'glibc_2.30.bb:do_packagedata',
'python3_3.7.5.bb:do_packagedata', 'libpcre_8.43.bb:do_packagedata',
'pseudo_git.bb:do_populate_sysroot',
'dwarfsrcfiles.bb:do_populate_sysroot',
'libselinux_2.9.bb:do_install'])
  Task /workspace/git/yocto-selinux/meta-selinux/recipes-
security/selinux/libselinux_2.9.bb:do_packagedata (dependent Tasks
['libselinux_2.9.bb:do_package'])
  Task /workspace/git/yocto-selinux/poky/meta/recipes-
extended/pam/libpam_1.3.1.bb:do_package (dependent Tasks ['gcc-
runtime_9.2.bb:do_packagedata', 'rpm_4.14.2.1.bb:do_populate_sysroot',
'glibc_2.30.bb:do_packagedata', 'libselinux_2.9.bb:do_packagedata',
'flex_2.6.0.bb:do_packagedata', 'pseudo_git.bb:do_populate_sysroot',
'libxcrypt_4.4.8.bb:do_packagedata', 'libpam_1.3.1.bb:do_install',
'dwarfsrcfiles.bb:do_populate_sysroot',
'cracklib_2.9.5.bb:do_packagedata', 'libtool-
cross_2.4.6.bb:do_packagedata'])
  Task /workspace/git/yocto-selinux/poky/meta/recipes-
extended/pam/libpam_1.3.1.bb:do_packagedata (dependent Tasks
['libpam_1.3.1.bb:do_package'])
  Task /workspace/git/yocto-selinux/poky/meta/recipes-core/util-
linux/util-linux_2.34.bb:do_package (dependent Tasks ['gcc-
runtime_9.2.bb:do_packagedata', 'rpm_4.14.2.1.bb:do_populate_sysroot',
'bash-completion_2.9.bb:do_packagedata',
'zlib_1.2.11.bb:do_packagedata', 'glibc_2.30.bb:do_packagedata',
'libselinux_2.9.bb:do_packagedata',
'pseudo_git.bb:do_populate_sysroot',
'ncurses_6.1+20190803.bb:do_packagedata',
'libxcrypt_4.4.8.bb:do_packagedata', 'libcap-
ng_0.7.9.bb:do_packagedata', 'opkg-utils_0.4.1.bb:do_packagedata',
'libpam_1.3.1.bb:do_packagedata', 'util-
linux_2.34.bb:do_install_ptest_base',
'dwarfsrcfiles.bb:do_populate_sysroot', 'util-
linux_2.34.bb:do_install', 'libtool-cross_2.4.6.bb:do_packagedata'])
  Task /workspace/git/yocto-selinux/poky/meta/recipes-core/util-
linux/util-linux_2.34.bb:do_packagedata (dependent Tasks ['util-
linux_2.34.bb:do_package'])
  Task /workspace/git/yocto-selinux/poky/meta/recipes-
devtools/python/python3_3.7.5.bb:do_package (dependent Tasks
['xz_5.2.4.bb:do_packagedata', 'bzip2_1.0.8.bb:do_packagedata',
'gdbm_1.18.1.bb:do_packagedata', 'libnsl2_git.bb:do_packagedata', 'gcc-
runtime_9.2.bb:do_packagedata', 'rpm_4.14.2.1.bb:do_populate_sysroot',
'python3_3.7.5.bb:do_install', 'libffi_3.3~rc0.bb:do_packagedata',
'pseudo_git.bb:do_populate_sysroot',
'sqlite3_3.29.0.bb:do_packagedata', 'openssl_1.1.1d.bb:do_packagedata',
'libtirpc_1.1.4.bb:do_packagedata', 'zlib_1.2.11.bb:do_packagedata',
'glibc_2.30.bb:do_packagedata', 'libxcrypt_4.4.8.bb:do_packagedata',
'python3_3.7.5.bb:do_install_ptest_base', 'util-
linux_2.34.bb:do_packagedata', 'opkg-utils_0.4.1.bb:do_packagedata',
'readline_8.0.bb:do_packagedata',
'dwarfsrcfiles.bb:do_populate_sysroot', 'libtool-
cross_2.4.6.bb:do_packagedata'])
  Task /workspace/git/yocto-selinux/poky/meta/recipes-
devtools/python/python3_3.7.5.bb:do_packagedata (dependent Tasks
['python3_3.7.5.bb:do_package'])

Python3 (3.7.5) appears to depend on util-linux for libuuid support, so
I don't think anything can be done with regards to this.  libselinux
now depends on python3 as of 2.9, so again not much can be done here. 
It's proving a bit harder to track down the util-linux dependency on
libselinux but I believe this is a hard depdency as well.

I'm using the master branch of both poky and meta-selinux for testing,
my local.conf file has the following to enable testing:

DISTRO_FEATURES_append=" acl xattr pam selinux"

The crux of the libselinux recipe change is really just changing the
python2 deps over to python3 ones in meta-selinux/recipes-
security/selinux/libselinux.inc.

At this point I'd be trying to look for places where recipes can be
split out to remove the loop, but nothing jumps out at me.

Can anyone offer any advice or pointers on how to get around this?  Or
am I just stuffed?

Many Thanks,
Peter.


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-12-11 15:07 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-12-05 13:46 [yocto] [meta-selinux] Dependency loop help with selinux userspace/python3/util-linux Peter Morrow
2019-12-11  2:18 ` Yi Zhao
2019-12-11  9:21   ` Peter Morrow
2019-12-11 13:41     ` Joe MacDonald
2019-12-11 15:07       ` Peter Morrow

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox