Yocto Project Discussions
 help / color / mirror / Atom feed
From: "Peter Morrow" <peter.morrow@microsoft.com>
To: "yocto@yoctoproject.org" <yocto@yoctoproject.org>
Cc: "Joe_MacDonald@mentor.com" <Joe_MacDonald@mentor.com>
Subject: [yocto] [meta-selinux] Dependency loop help with selinux userspace/python3/util-linux
Date: Thu, 5 Dec 2019 13:46:58 +0000	[thread overview]
Message-ID: <e95481c9b63c68e8545662310bf6cbd2f4bd6f71.camel@microsoft.com> (raw)

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.


             reply	other threads:[~2019-12-05 13:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-05 13:46 Peter Morrow [this message]
2019-12-11  2:18 ` [yocto] [meta-selinux] Dependency loop help with selinux userspace/python3/util-linux Yi Zhao
2019-12-11  9:21   ` Peter Morrow
2019-12-11 13:41     ` Joe MacDonald
2019-12-11 15:07       ` Peter Morrow

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e95481c9b63c68e8545662310bf6cbd2f4bd6f71.camel@microsoft.com \
    --to=peter.morrow@microsoft.com \
    --cc=Joe_MacDonald@mentor.com \
    --cc=yocto@yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox