Skip to contentSkip to conversation

Dependency loop help with selinux userspace/python3/util-linux

yocto Peter Morrow 3 participants 5 messages Dec 5, 2019 – Dec 11, 2019

lore
Share & tools
lore
#0 lore 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.

#1 lore raw
Quoted 9 lines · Peter Morrow via Lists.Yoctoproject.Org

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.

//Yi

Quoted 97 lines

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: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

#2 lore raw
Quoted 18 lines · Yi Zhao via Lists.Yoctoproject.Org
Quoted 9 lines · Peter Morrow via Lists.Yoctoproject.Org

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:

Quoted 3 lines

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

Quoted 8 lines

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?

Thanks,
Peter.

Quoted 154 lines

//Yi

Quoted 123 lines

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:
[email protected]

Quoted 6 lines

Unsubscribe:
https://lists.yoctoproject.org/g/yocto/unsub
[
[email protected]
]
-=-=-=-=-=-=-=-=-=-=-=-

-=-=-=-=-=-=-=-=-=-=-=-
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&data=02%7C01%7Cpeter.morrow%40microsoft.com%7Cf3b2a9c85ae945b3a0e008d77de064c2%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637116275033359425&sdata=tI784Zq%2BnoD%2BGVMjaWOfjRkqo5pJMN74RGfK4k9tQLI%3D&reserved=0

Mute This Topic:
https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.yoctoproject.org%2Fmt%2F66953299%2F3618499&data=02%7C01%7Cpeter.morrow%40microsoft.com%7Cf3b2a9c85ae945b3a0e008d77de064c2%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637116275033359425&sdata=IWzv8oKNUERzRgWWwRaBkh7fWwrQN14KJ1rhR73W484%3D&reserved=0

Group Owner:
[email protected]

Unsubscribe:
https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.yoctoproject.org%2Fg%2Fyocto%2Funsub&data=02%7C01%7Cpeter.morrow%40microsoft.com%7Cf3b2a9c85ae945b3a0e008d77de064c2%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637116275033359425&sdata=mA9oeKX5%2Fq8B1WiUP6avWHP3%2BBY8OFcEHV%2BfqaJmClo%3D&reserved=0
[
[email protected]
]
-=-=-=-=-=-=-=-=-=-=-=-

#3 lore raw
Quoted 29 lines · [Re: [yocto] [meta-selinux] Dependency loop help with selinux…
Quoted 18 lines · Yi Zhao via Lists.Yoctoproject.Org
Quoted 9 lines · Peter Morrow via Lists.Yoctoproject.Org

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:

Quoted 3 lines

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

Quoted 8 lines

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.

Quoted 3 lines

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.

Quoted 168 lines

Thanks,
Peter.

Quoted 147 lines

//Yi

Quoted 123 lines

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:
[email protected]

Quoted 6 lines

Unsubscribe:
https://lists.yoctoproject.org/g/yocto/unsub
[
[email protected]
]
-=-=-=-=-=-=-=-=-=-=-=-

-=-=-=-=-=-=-=-=-=-=-=-
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&data=02%7C01%7Cpeter.morrow%40microsoft.com%7Cf3b2a9c85ae945b3a0e008d77de064c2%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637116275033359425&sdata=tI784Zq%2BnoD%2BGVMjaWOfjRkqo5pJMN74RGfK4k9tQLI%3D&reserved=0

Mute This Topic:
https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.yoctoproject.org%2Fmt%2F66953299%2F3618499&data=02%7C01%7Cpeter.morrow%40microsoft.com%7Cf3b2a9c85ae945b3a0e008d77de064c2%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637116275033359425&sdata=IWzv8oKNUERzRgWWwRaBkh7fWwrQN14KJ1rhR73W484%3D&reserved=0

Group Owner:
[email protected]

Quoted 7 lines

Unsubscribe:
https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.yoctoproject.org%2Fg%2Fyocto%2Funsub&data=02%7C01%7Cpeter.morrow%40microsoft.com%7Cf3b2a9c85ae945b3a0e008d77de064c2%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637116275033359425&sdata=mA9oeKX5%2Fq8B1WiUP6avWHP3%2BBY8OFcEHV%2BfqaJmClo%3D&reserved=0
[
[email protected]
]
-=-=-=-=-=-=-=-=-=-=-=-

-=-=-=-=-=-=-=-=-=-=-=-
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: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Signature · 2 lines
-Joe MacDonald.
:wq
#4 lore raw

On Wed, 2019-12-11 at 08:41 -0500, Joe MacDonald wrote:

[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>

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.

Excellent , thanks Joe.

Peter.

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>

https://lists.yoctoproject.org/g/yocto/message/47570

Mute This Topic:

<https://lists.yoctoproject.org/mt/66953299/3616783>

https://lists.yoctoproject.org/mt/66953299/3616783

Group Owner:

<mailto:[email protected]>

[email protected]

Unsubscribe:

<https://lists.yoctoproject.org/g/yocto/unsub>

https://lists.yoctoproject.org/g/yocto/unsub

[

<mailto:[email protected]>

[email protected]

]

-=-=-=-=-=-=-=-=-=-=-=-

-=-=-=-=-=-=-=-=-=-=-=-

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>

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>

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:

<mailto:[email protected]>

[email protected]

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>

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

[

<mailto:[email protected]>

[email protected]

]

-=-=-=-=-=-=-=-=-=-=-=-

-=-=-=-=-=-=-=-=-=-=-=-

Links: You receive all messages sent to this group.

View/Reply Online (#47629):

<https://lists.yoctoproject.org/g/yocto/message/47629>

https://lists.yoctoproject.org/g/yocto/message/47629

Mute This Topic:

<https://lists.yoctoproject.org/mt/66953299/1150288>

https://lists.yoctoproject.org/mt/66953299/1150288

Group Owner:

<mailto:[email protected]>

[email protected]

Unsubscribe:

<https://lists.yoctoproject.org/g/yocto/unsub>

https://lists.yoctoproject.org/g/yocto/unsub

[

<mailto:[email protected]>

[email protected]

]

-=-=-=-=-=-=-=-=-=-=-=-