Yocto Project Discussions
 help / color / mirror / Atom feed
From: "Joe MacDonald" <joe@deserted.net>
To: <peter.morrow@microsoft.com>
Cc: "yi.zhao@windriver.com" <yi.zhao@windriver.com>,
	"yocto@yoctoproject.org" <yocto@yoctoproject.org>,
	<yocto@lists.yoctoproject.org>
Subject: Re: [yocto] [meta-selinux] Dependency loop help with selinux userspace/python3/util-linux
Date: Wed, 11 Dec 2019 08:41:15 -0500	[thread overview]
Message-ID: <20191211134112.GA25548@deserted.net> (raw)
In-Reply-To: <4ebd6f6e2b7b514cb9b075897ae21f8f32be8db7.camel@microsoft.com>

[-- Attachment #1: Type: text/plain, Size: 8957 bytes --]

[Re: [yocto] [meta-selinux] Dependency loop help with selinux userspace/python3/util-linux] On 19.12.11 (Wed 09:21) Peter Morrow via Lists.Yoctoproject.Org wrote:

> On Wed, 2019-12-11 at 10:18 +0800, Yi Zhao via Lists.Yoctoproject.Org
> wrote:
> > 
> > 
> > On 12/5/19 9:46 PM, Peter Morrow via Lists.Yoctoproject.Org wrote:
> > 
> > > 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).
> > 
> > 
> > Hi Peter,
> > I had sent a series patches to update selinux usersapce tools from
> > 2.8 ot 2.9: 
> > https://www.yoctoproject.org/pipermail/yocto/2019-November/047329.html
> > After switch to python3, there is a loop dependency error with
> > libselinux-python package when build libselinux. So I split the
> > original libselinux recipe into  libselinux and libselinux-python.
> > You can refer my patchset.
> 
> Hi Yi,
> 
> Great!  Is there anything stopping these patches being merged?

No, no issue as far as I can tell, I'm preparing another merge to master
in the next couple of days.  This includes Yi's patches, my update
refpolicy purge feature and a few other things currently pending on the
list from the last few weeks.

-J.

> Thanks,
> Peter.
> 
> 
> > 
> > 
> > //Yi
> > 
> > 
> > > 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.
> > > 
> > > 
> > > 
> > > -=-=-=-=-=-=-=-=-=-=-=-
> > > Links: You receive all messages sent to this group.
> > > 
> > > View/Reply Online (#47570): 
> > > https://lists.yoctoproject.org/g/yocto/message/47570
> > > 
> > > Mute This Topic: 
> > > https://lists.yoctoproject.org/mt/66953299/3616783
> > > 
> > > Group Owner: 
> > > yocto+owner@lists.yoctoproject.org
> > > 
> > > Unsubscribe: 
> > > https://lists.yoctoproject.org/g/yocto/unsub
> > >   [
> > > yi.zhao@windriver.com
> > > ]
> > > -=-=-=-=-=-=-=-=-=-=-=-
> > 
> > -=-=-=-=-=-=-=-=-=-=-=-
> > Links: You receive all messages sent to this group.
> > 
> > View/Reply Online (#47623): 
> > https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.yoctoproject.org%2Fg%2Fyocto%2Fmessage%2F47623&amp;data=02%7C01%7Cpeter.morrow%40microsoft.com%7Cf3b2a9c85ae945b3a0e008d77de064c2%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637116275033359425&amp;sdata=tI784Zq%2BnoD%2BGVMjaWOfjRkqo5pJMN74RGfK4k9tQLI%3D&amp;reserved=0
> > 
> > Mute This Topic: 
> > https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.yoctoproject.org%2Fmt%2F66953299%2F3618499&amp;data=02%7C01%7Cpeter.morrow%40microsoft.com%7Cf3b2a9c85ae945b3a0e008d77de064c2%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637116275033359425&amp;sdata=IWzv8oKNUERzRgWWwRaBkh7fWwrQN14KJ1rhR73W484%3D&amp;reserved=0
> > 
> > Group Owner: 
> > yocto+owner@lists.yoctoproject.org
> > 
> > Unsubscribe: 
> > https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.yoctoproject.org%2Fg%2Fyocto%2Funsub&amp;data=02%7C01%7Cpeter.morrow%40microsoft.com%7Cf3b2a9c85ae945b3a0e008d77de064c2%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637116275033359425&amp;sdata=mA9oeKX5%2Fq8B1WiUP6avWHP3%2BBY8OFcEHV%2BfqaJmClo%3D&amp;reserved=0
> >   [
> > peter.morrow@microsoft.com
> > ]
> > -=-=-=-=-=-=-=-=-=-=-=-
> > 
> 

> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> 
> View/Reply Online (#47629): https://lists.yoctoproject.org/g/yocto/message/47629
> Mute This Topic: https://lists.yoctoproject.org/mt/66953299/1150288
> Group Owner: yocto+owner@lists.yoctoproject.org
> Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub  [joe@deserted.net]
> -=-=-=-=-=-=-=-=-=-=-=-


-- 
-Joe MacDonald.
:wq

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 201 bytes --]

  reply	other threads:[~2019-12-11 13:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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=20191211134112.GA25548@deserted.net \
    --to=joe@deserted.net \
    --cc=peter.morrow@microsoft.com \
    --cc=yi.zhao@windriver.com \
    --cc=yocto@lists.yoctoproject.org \
    --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