[poky] Systemd on Sumo without python3(runtime)

matthew stanger stangerm2 at gmail.com
Tue Oct 2 07:44:21 PDT 2018


>
> Can you check if some .py file is slipping into libxml2 package ?

I extracted all the .ipks for libxml2, including dev/dbg/doc, and nothing
had .py files.

Have you checked *the contents of the image*

Yes, I've gone over it many times and I'm sure there is no direct
delectation for Py3 in the image.

Here's my extremely simple build image:
### START OF local.conf
# Yocto Project 2.5 Poky distribution [sumo] branch
LICENSE_FLAGS_WHITELIST = "commercial"

DISTRO_FEATURES = "ext2 pam ipv6 usbhost ${DISTRO_FEATURES_LIBC}"
DISTRO_FEATURES_BACKFILL_CONSIDERED += "pulseaudio"

PREFERRED_PROVIDER_jpeg = "libjpeg-turbo"
PREFERRED_PROVIDER_jpeg-native = "libjpeg-turbo-native"
PREFERRED_PROVIDER_udev = "eudev"

# use systemd
DISTRO_FEATURES_append = " systemd"
DISTRO_FEATURES_BACKFILL_CONSIDERED += "sysvinit"
VIRTUAL-RUNTIME_init_manager = "systemd"
VIRTUAL-RUNTIME_initscripts = "systemd-compat-units"

MACHINE_FEATURES_remove = "apm"
IMAGE_FSTYPES = "tar.xz"

MACHINE = "raspberrypi3"

KERNEL_IMAGETYPE = "zImage"

DISABLE_OVERSCAN = "1"
ENABLE_UART = "1"
ENABLE_RPI3_SERIAL_CONSOLE = "1"
SERIAL_CONSOLE = "115200 ttyAMA0"

DL_DIR = "${HOME}/rpi/build/downloads"
SSTATE_DIR = "${HOME}/rpi/build/sstate-cache"
TMPDIR = "${HOME}/rpi/build/tmp"

DISTRO = "poky"
PACKAGE_CLASSES = "package_ipk"

SDKMACHINE = "x86_64"

INHERIT += "extrausers"
EXTRA_USERS_PARAMS = "usermod -P stripped root; "

USER_CLASSES = "image-mklibs image-prelink"
PATCHRESOLVE = "noop"
RM_OLD_IMAGE = "1"
INHERIT += "rm_work"
CONF_VERSION = "1"

#Turn off python3 for any packages that have it configurable
#PACKAGECONFIG_remove = "python"


### START OF image.bb
SUMMARY = "Min RPi Image"
LICENSE = "MIT"

IMAGE_FEATURES += "package-management"
IMAGE_LINGUAS = "en-us"

inherit image

DEPENDS += "bcm2835-bootfiles"

CORE_OS = " \
    kernel-modules \
    openssh openssh-keygen openssh-sftp-server \
    packagegroup-core-boot \
    term-prompt \
    tzdata \
"
IMAGE_INSTALL += " \
    ${CORE_OS} \
"

set_local_timezone() {
    ln -sf /usr/share/zoneinfo/EST5EDT ${IMAGE_ROOTFS}/etc/localtime
}

disable_bootlogd() {
    echo BOOTLOGD_ENABLE=no > ${IMAGE_ROOTFS}/etc/default/bootlogd
}

ROOTFS_POSTPROCESS_COMMAND += " \
    set_local_timezone ; \
    disable_bootlogd ; \
 "

export IMAGE_BASENAME = "pine41-image"


On Tue, Oct 2, 2018 at 5:19 AM Burton, Ross <ross.burton at intel.com> wrote:

> The packages generated by libxml2 include libxml2 (depends on libc and
> libz) and libxml2-python (depends on python3).  Again, it's fine for a
> target Python 3 to be built as that doesn't mean it will be installed
> in your image.
>
> Have you checked *the contents of the image* instead of looking at the
> build dependencies?
>
> Ross
> On Tue, 2 Oct 2018 at 04:20, matthew stanger <stangerm2 at gmail.com> wrote:
> >
> > Just to leave a clean paper trail. It was the
> > 'IMAGE_FEATURES+=package-managment' in my local.conf, thus 'opkg'
> > needing (configurable)Py3 indirectly, and not systemd:
> >   "opkg" -> "libarchive"
> >   "libarchive" -> "libxml2"
> >   "libxml2" -> "python3"
> >
> > With libxml2 being marked clearly in openembedded for Py3
> > (https://layers.openembedded.org/layerindex/recipe/80796/).
> >
> > Cheers,
> > On Mon, Oct 1, 2018 at 10:10 AM Khem Raj <raj.khem at gmail.com> wrote:
> > >
> > > On Mon, Oct 1, 2018 at 8:34 AM matthew stanger <stangerm2 at gmail.com>
> wrote:
> > > >
> > > > Ahh thanks, that explains that. I'm not aware that I'm pulling in Py3
> > > > as part of my image but I must be somewhere. I'm just using a trimmed
> > > > version of the console-image.bb of the Raspberry Pi meta-layer by
> > > > Scott Ellis (
> https://github.com/jumpnow/meta-rpi/blob/sumo/images/console-image.bb)
> > > > where I changed out sysvinit for systemd in the local.conf and am
> only
> > > > building the $(CORE_OS) targets [kernel-modules, openssh
> > > > openssh-keygen openssh-sftp-server, packagegroup-core-boot,
> > > > term-prompt, tzdata], so I'm not sure where the Py3 part is being
> set.
> > > > I know you're busy so what would be the best way in this case for me
> > > > to track down where this is set?
> > >
> > > Generally its better to start of a known smaller images preferably
> > > from OE-core and then build on top by
> > > adding your own needs, building up is easier than tearing down in this
> > > case. The image you are basing of has a lot of stuff which can pull in
> > > py3 especially the dev packages.
> > >
> > > to sort out your case. enable buildhistory, then go into buildhistory
> folder.
> > > e.g. buildhistory/images/qemux86/musl/core-image-sato
> > > and then inspect depends-nokernel-nolibc-noupdate-nomodules.dot
> > > especially look for "python3" in RHS of -> marker
> > >
> > > that will give you the package on LHS which is asking for python3 then
> you
> > > can walk backwards from there.
> > >
> > > > On Mon, Oct 1, 2018 at 9:05 AM Burton, Ross <ross.burton at intel.com>
> wrote:
> > > > >
> > > > > Well, -g shows you *build* dependencies, not target.  Build
> > > > > dependencies are recipes, whereas target dependencies will be
> > > > > packages.
> > > > >
> > > > > I see systemd just depending on update-alternatives-opkg, part of
> > > > > opkg-utils but without the Python dependency.
> > > > >
> > > > > Have you demonstrated that Py3 is part of your *images*?
> > > > >
> > > > > Ross
> > > > > On Mon, 1 Oct 2018 at 15:55, matthew stanger <stangerm2 at gmail.com>
> wrote:
> > > > > >
> > > > > > Hi Ross,
> > > > > >
> > > > > > Thanks for the reply. It seems running 'bitbake -g systemd'
> yields:
> > > > > > "systemd" -> "opkg-utils"
> > > > > > "opkg-utils" -> "python3"
> > > > > >
> > > > > > I actually used a previous ML post about this from you to
> address that
> > > > > > aspect (
> https://lists.yoctoproject.org/pipermail/poky/2016-January/010342.html).
> > > > > > However I still don't understand why opkg-utils are listed as
> > > > > > dependencies for systemd. I do have opkg as part of my image via
> > > > > > 'IMAGE_FEATURES+=package-managment' but I thought they should be
> > > > > > unrelated in this context?
> > > > > > On Mon, Oct 1, 2018 at 4:59 AM Burton, Ross <
> ross.burton at intel.com> wrote:
> > > > > > >
> > > > > > > On Sun, 30 Sep 2018 at 20:02, matthew stanger <
> stangerm2 at gmail.com> wrote:
> > > > > > > > I'm having trouble removing python3 from being installed as
> a runtime
> > > > > > > > package using the Sumo branch. Per the systemd(v237) build
> > > > > > > > spec's(https://github.com/systemd/systemd/blob/v237/README)
> line 167
> > > > > > > > there isn't runtime requirements for python3, only build
> time.
> > > > > > > >
> > > > > > > > It looks to me when running a .dot on the systemd
> dependencies that
> > > > > > > > python3 is being pulled in by 'meson' as a non'-native'
> dependency,
> > > > > > > > but this is where I'm lost. Could anyone clarify the logic
> here on how
> > > > > > > > to trim python3 to a native only dependency for systemd? Or
> is there
> > > > > > > > something fundamental I'm missing?
> > > > > > >
> > > > > > > Looking at the recipe I don't see where a Python 3 dependency
> comes
> > > > > > > from.  Have you verified that it's coming from systemd?
> > > > > > >
> > > > > > > Ross
> > > > --
> > > > _______________________________________________
> > > > poky mailing list
> > > > poky at yoctoproject.org
> > > > https://lists.yoctoproject.org/listinfo/poky
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/poky/attachments/20181002/a9047d14/attachment-0001.html>


More information about the poky mailing list