Date   

Re: Python modules missing #yocto #python

Tim Orling
 



On Fri, Apr 3, 2020 at 8:29 PM <zidouhzakaria@...> wrote:
Hello,

I am trying to install numpy module in my image using "pipoe". When i bitbake my recipe i got this :

Numpy is already part of oe-core:
Why not just use the existing recipe?


Log data follows:
| DEBUG: Executing shell function do_compile
| ERROR: python3 setup.py build_ext execution failed.
| numpy/random/_bounded_integers.pxd.in has not changed
| Processing numpy/random/_mt19937.pyx
| Traceback (most recent call last):
|   File "path/to/build/work/aarch64-poky-linux/python3-numpy/1.18.2-r0/numpy-1.18.2/tools/cythonize.py", line 61, in process_pyx
|     from Cython.Compiler.Version import version as cython_version
| ImportError: No module named 'Cython'

I installed Cython also with pipoe and added : RDEPENDS_${PN} = "${PYTHON_PN}-cython" to numpy recipe but nothing changed. Any idea ?

Thank you


Python modules missing #yocto #python

zidouhzakaria@...
 

Hello,

I am trying to install numpy module in my image using "pipoe". When i bitbake my recipe i got this :

Log data follows:
| DEBUG: Executing shell function do_compile
| ERROR: python3 setup.py build_ext execution failed.
| numpy/random/_bounded_integers.pxd.in has not changed
| Processing numpy/random/_mt19937.pyx
| Traceback (most recent call last):
|   File "path/to/build/work/aarch64-poky-linux/python3-numpy/1.18.2-r0/numpy-1.18.2/tools/cythonize.py", line 61, in process_pyx
|     from Cython.Compiler.Version import version as cython_version
| ImportError: No module named 'Cython'

I installed Cython also with pipoe and added : RDEPENDS_${PN} = "${PYTHON_PN}-cython" to numpy recipe but nothing changed. Any idea ?

Thank you


Re: JFFS2 no udef, all char/block devices hardlinked to /dev/console

Andreas Dröscher <yocto@...>
 

Am 03.04.20 um 19:26 schrieb Khem Raj:


Running mkfs.jffs2 outside Yocto works. Running mkfs.jffs2 as part of the
default image build step breaks my char/block devices. All device files are
hard linked to the first one. Moreover the permissions are also reset.
are you running same mkfs.jffs2 utility in and outside yocto experiment ? if not then lets fix that first, it could be a problem in the native package that yocto build system produces.
I hope so. Steps I took for debugging.

I changed EXTRA_IMAGECMD_jffs2:

EXTRA_IMAGECMD_jffs2="-p -l -e 0x20000 -D /data/my-device-table.txt -v; exit 1"

This on one hand enables verbose mkfs.jffs2 and on other hand breaks the step. Therefore the root-fs folder is not cleaned up and I can reraun the comand from the run.do_image script.

Trimmed verbose output of:

$ bitbake core-image-minimal

ERROR: core-image-minimal-1.0-r0 do_image_jffs2: Execution of '/data/oe-core/poky/build-au1100-hw/tmp/work/au1100_hw-poky-linux-musl/core-image-minimal/1.0-r0/temp/run.do_image_jffs2.24583' failed with exit code 1:
/
d 0755 0 0:0 bin
d 0755 0 0:0 boot
d 0755 0 0:0 dev
d 0755 0 0:0 etc
d 0755 0 0:0 home
d 0755 0 0:0 lib
d 0755 0 0:0 media
d 0755 0 0:0 mnt
d 0555 0 0:0 proc
d 0755 0 0:0 run
d 0755 0 0:0 sbin
d 0555 0 0:0 sys
d 1777 0 0:0 tmp
d 0755 0 0:0 usr
d 0755 0 0:0 var
/bin
l 0777 19 0:0 ash -> /bin/busybox.nosuid
l 0777 14 0:0 busybox -> busybox.nosuid
f 0755 914688 ( 551963) 0:0 busybox.nosuid
f 4755 68204 ( 39081) 0:0 busybox.suid
l 0777 19 0:0 cat -> /bin/busybox.nosuid
l 0777 19 0:0 chattr -> /bin/busybox.nosuid
...
/boot
/dev
c 0640 5, 1 0:0 console
L 0640 81 0:0 full
L 0640 81 0:0 mtd0
L 0640 81 0:0 mtd1
L 0640 81 0:0 mtd2
L 0640 81 0:0 mtd3
L 0640 81 0:0 mtd4
L 0640 81 0:0 mtd5
L 0640 81 0:0 mtd6
L 0640 81 0:0 mtd7
L 0640 81 0:0 mtdblock0
L 0640 81 0:0 mtdblock1
L 0640 81 0:0 mtdblock2
L 0640 81 0:0 mtdblock3
L 0640 81 0:0 mtdblock4
L 0640 81 0:0 mtdblock5

grep "PATH=" run.do_image_jffs2 returns:

export PATH="/data/oe-core/poky/build-au1100-hw/tmp/work/au1100_hw-poky-linux-musl/core-image-minimal/1.0-r0/recipe-sysroot/usr/bin/crossscripts:/data/oe-core/poky/build-au1100-hw/tmp/work/au1100_hw-poky-linux-musl/core-image-minimal/1.0-r0/recipe-sysroot/opt/poky/3.0.2/sysroots/x86_64-pokysdk-linux/usr/bin/crossscripts:/data/oe-core/poky/build-au1100-hw/tmp/work/au1100_hw-poky-linux-musl/core-image-minimal/1.0-r0/recipe-sysroot/usr/bin/crossscripts:/data/oe-core/poky/build-au1100-hw/tmp/sysroots-uninative/x86_64-linux/usr/bin:/data/oe-core/poky/build-au1100-hw/tmp/work/au1100_hw-poky-linux-musl/core-image-minimal/1.0-r0/recipe-sysroot-native/usr/bin/python3-native:/data/oe-core/poky/scripts:/data/oe-core/poky/build-au1100-hw/tmp/work/au1100_hw-poky-linux-musl/core-image-minimal/1.0-r0/recipe-sysroot-native/usr/bin/mipsel-poky-linux-musl:/data/oe-core/poky/build-au1100-hw/tmp/work/au1100_hw-poky-linux-musl/core-image-minimal/1.0-r0/recipe-sysroot/usr/bin/crossscripts:/data/oe-core/poky/build-au1100-hw/tmp/work/au1100_hw-poky-linux-musl/core-image-minimal/1.0-r0/recipe-sysroot-native/usr/sbin:/data/oe-core/poky/build-au1100-hw/tmp/work/au1100_hw-poky-linux-musl/core-image-minimal/1.0-r0/recipe-sysroot-native/usr/bin:/data/oe-core/poky/build-au1100-hw/tmp/work/au1100_hw-poky-linux-musl/core-image-minimal/1.0-r0/recipe-sysroot-native/sbin:/data/oe-core/poky/build-au1100-hw/tmp/work/au1100_hw-poky-linux-musl/core-image-minimal/1.0-r0/recipe-sysroot-native/bin:/data/oe-core/poky/bitbake/bin:/data/oe-core/poky/build-au1100-hw/tmp/hosttools"

So I do export the PATH above, result:
$ mkfs.jffs2 --version
mkfs.jffs2 (mtd-utils) 2.1.1

Note my Ubuntu has:
$ mkfs.jffs2 --version
mkfs.jffs2 (mtd-utils) 2.0.1

Finaly I run:
$ mkfs.jffs2 --root=/data/oe-core/poky/build-au1100-hw/tmp/work/au1100_hw-poky-linux-musl/core-image-minimal/1.0-r0/rootfs --faketime --output=/data/oe-core/poky/build-au1100-hw/tmp/work/au1100_hw-poky-linux-musl/core-image-minimal/1.0-r0/deploy-core-image-minimal-image-complete/core-image-minimal-au1100-hw-20200403193756.rootfs.jffs2 -p -l -e 0x20000 -D /data/my-device-table.txt -v;

Output:
/
d 0755 0 1000:1000 bin
d 0755 0 1000:1000 boot
d 0755 0 1000:1000 dev
d 0755 0 1000:1000 etc
d 0755 0 1000:1000 home
d 0755 0 1000:1000 lib
d 0755 0 1000:1000 media
d 0755 0 1000:1000 mnt
d 0755 0 1000:1000 proc
d 0755 0 1000:1000 run
d 0755 0 1000:1000 sbin
d 0755 0 1000:1000 sys
d 1755 0 1000:1000 tmp
d 0755 0 1000:1000 usr
d 0755 0 1000:1000 var
/bin
l 0777 19 0:0 ash -> /bin/busybox.nosuid
l 0777 14 0:0 busybox -> busybox.nosuid
f 0755 914688 ( 551963) 0:0 busybox.nosuid
f 4755 68204 ( 39081) 0:0 busybox.suid
l 0777 19 0:0 cat -> /bin/busybox.nosuid
l 0777 19 0:0 chattr -> /bin/busybox.nosuid
...
/boot
/dev
c 0640 5, 1 0:0 console
c 0640 1, 7 0:0 full
c 0640 90, 0 0:0 mtd0
c 0640 90, 2 0:0 mtd1
c 0640 90, 4 0:0 mtd2
c 0640 90, 6 0:0 mtd3
c 0640 90, 8 0:0 mtd4
c 0640 90, 10 0:0 mtd5
c 0640 90, 12 0:0 mtd6
c 0640 90, 14 0:0 mtd7
b 0640 31, 0 0:0 mtdblock0
b 0640 31, 1 0:0 mtdblock1
b 0640 31, 2 0:0 mtdblock2
b 0640 31, 3 0:0 mtdblock3
b 0640 31, 4 0:0 mtdblock4
b 0640 31, 5 0:0 mtdblock5
b 0640 31, 6 0:0 mtdblock6
b 0640 31, 7 0:0 mtdblock7


Re: Files get sporadically lost for native packages

Randy MacLeod
 

On 2020-04-02 4:44 a.m., Konrad Weihmann wrote:

To answer your others questions... see below

On 02.04.20 05:42, Randy MacLeod wrote:
On 2020-03-28 8:26 a.m., Konrad Weihmann wrote:
Hi,

I'm facing the following error message sporadically on all branches I tried so far (master, zeus, warrior and thud)

The stack trace of python calls that resulted in this exception/failure was:
File: 'exec_python_func() autogenerated', lineno: 2, function: <module>
      0001:
  *** 0002:extend_recipe_sysroot(d)
      0003:
File: '/build/poky/meta/classes/staging.bbclass', lineno: 551, function: extend_recipe_sysroot
      0547:                    dest = newmanifest[l]
      0548:                    if l.endswith("/"):
      0549:                        staging_copydir(l, targetdir, dest, seendirs)
      0550:                        continue
  *** 0551:                    staging_copyfile(l, targetdir, dest, postinsts, seendirs)
      0552:
      0553:    bb.note("Installed into sysroot: %s" % str(msg_adding))
      0554:    bb.note("Skipping as already exists in sysroot: %s" % str(msg_exists))
      0555:
File: '/build/poky/meta/classes/staging.bbclass', lineno: 152, function: staging_copyfile
      0148:        os.symlink(linkto, dest)
      0149:        #bb.warn(c)
      0150:    else:
      0151:        try:
  *** 0152:            os.link(c, dest)
      0153:        except OSError as err:
      0154:            if err.errno == errno.EXDEV:
      0155:                bb.utils.copyfile(c, dest)
      0156:            else:
Exception: FileNotFoundError: [Errno 2] No such file or directory: '/build/poky/build/tmp/sysroots-components/x86_64/python3-msgcheck-native/usr/lib/python3.7/site-packages/msgcheck/__pycache__/__init__.cpython-37.pyc' -> '/build/poky/build/tmp/work/qemux86_64-mine-linux/core-image-minimal-mine/1.0-r0/recipe-sysroot-native/usr/lib/python3.7/site-packages/msgcheck/__pycache__/__init__.cpython-37.pyc'

I already had a look at the manifest

cat manifest-x86_64-python3-msgcheck-native.populate_sysroot
/build/poky/build/tmp/sysroots-components/x86_64/python3-msgcheck-native/usr/lib/python3.7/site-packages/msgcheck/__init__.py
/build/poky/build/tmp/sysroots-components/x86_64/python3-msgcheck-native/usr/lib/python3.7/site-packages/msgcheck/po.py
/build/poky/build/tmp/sysroots-components/x86_64/python3-msgcheck-native/usr/lib/python3.7/site-packages/msgcheck/msgcheck.py
/build/poky/build/tmp/sysroots-components/x86_64/python3-msgcheck-native/usr/lib/python3.7/site-packages/msgcheck/__pycache__/__init__.cpython-37.pyc
/build/poky/build/tmp/sysroots-components/x86_64/python3-msgcheck-native/usr/lib/python3.7/site-packages/msgcheck/__pycache__/po.cpython-37.pyc
/build/poky/build/tmp/sysroots-components/x86_64/python3-msgcheck-native/usr/lib/python3.7/site-packages/msgcheck/__pycache__/msgcheck.cpython-37.pyc
/build/poky/build/tmp/sysroots-components/x86_64/python3-msgcheck-native/usr/lib/python3.7/site-packages/msgcheck-2.8-py3.7.egg-info/dependency_links.txt
/build/poky/build/tmp/sysroots-components/x86_64/python3-msgcheck-native/usr/lib/python3.7/site-packages/msgcheck-2.8-py3.7.egg-info/requires.txt
/build/poky/build/tmp/sysroots-components/x86_64/python3-msgcheck-native/usr/lib/python3.7/site-packages/msgcheck-2.8-py3.7.egg-info/top_level.txt
/build/poky/build/tmp/sysroots-components/x86_64/python3-msgcheck-native/usr/lib/python3.7/site-packages/msgcheck-2.8-py3.7.egg-info/SOURCES.txt
/build/poky/build/tmp/sysroots-components/x86_64/python3-msgcheck-native/usr/lib/python3.7/site-packages/msgcheck-2.8-py3.7.egg-info/PKG-INFO
/build/poky/build/tmp/sysroots-components/x86_64/python3-msgcheck-native/usr/lib/python3.7/site-packages/msgcheck-2.8-py3.7.egg-info/entry_points.txt
/build/poky/build/tmp/sysroots-components/x86_64/python3-msgcheck-native/usr/bin/msgcheck
/build/poky/build/tmp/sysroots-components/x86_64/python3-msgcheck-native/sysroot-providers/python3-msgcheck-native
/build/poky/build/tmp/sysroots-components/x86_64/python3-msgcheck-native/usr/lib/python3.7/site-packages/msgcheck-2.8-py3.7.egg-info/
/build/poky/build/tmp/sysroots-components/x86_64/python3-msgcheck-native/usr/lib/python3.7/site-packages/msgcheck/__pycache__/
/build/poky/build/tmp/sysroots-components/x86_64/python3-msgcheck-native/usr/lib/python3.7/site-packages/msgcheck/
/build/poky/build/tmp/sysroots-components/x86_64/python3-msgcheck-native/usr/lib/python3.7/site-packages/
/build/poky/build/tmp/sysroots-components/x86_64/python3-msgcheck-native/usr/lib/python3.7/
/build/poky/build/tmp/sysroots-components/x86_64/python3-msgcheck-native/sysroot-providers/
/build/poky/build/tmp/sysroots-components/x86_64/python3-msgcheck-native/usr/share/
/build/poky/build/tmp/sysroots-components/x86_64/python3-msgcheck-native/usr/bin/
/build/poky/build/tmp/sysroots-components/x86_64/python3-msgcheck-native/usr/lib/
/build/poky/build/tmp/sysroots-components/x86_64/python3-msgcheck-native/usr/

which states the file should be there, but when doing

find /build/poky/build/tmp/sysroots-components/x86_64/python3-msgcheck-native/usr/
/build/poky/build/tmp/sysroots-components/x86_64/python3-msgcheck-native/usr/
/build/poky/build/tmp/sysroots-components/x86_64/python3-msgcheck-native/usr/lib
/build/poky/build/tmp/sysroots-components/x86_64/python3-msgcheck-native/usr/lib/python3.7
/build/poky/build/tmp/sysroots-components/x86_64/python3-msgcheck-native/usr/lib/python3.7/site-packages
/build/poky/build/tmp/sysroots-components/x86_64/python3-msgcheck-native/usr/lib/python3.7/site-packages/msgcheck
/build/poky/build/tmp/sysroots-components/x86_64/python3-msgcheck-native/usr/lib/python3.7/site-packages/msgcheck/__init__.py
/build/poky/build/tmp/sysroots-components/x86_64/python3-msgcheck-native/usr/lib/python3.7/site-packages/msgcheck/__pycache__
/build/poky/build/tmp/sysroots-components/x86_64/python3-msgcheck-native/usr/lib/python3.7/site-packages/msgcheck/__pycache__/po.cpython-37.pyc
/build/poky/build/tmp/sysroots-components/x86_64/python3-msgcheck-native/usr/lib/python3.7/site-packages/msgcheck/__pycache__/msgcheck.cpython-37.pyc
/build/poky/build/tmp/sysroots-components/x86_64/python3-msgcheck-native/usr/lib/python3.7/site-packages/msgcheck/po.py
/build/poky/build/tmp/sysroots-components/x86_64/python3-msgcheck-native/usr/lib/python3.7/site-packages/msgcheck/msgcheck.py
/build/poky/build/tmp/sysroots-components/x86_64/python3-msgcheck-native/usr/lib/python3.7/site-packages/msgcheck-2.8-py3.7.egg-info
/build/poky/build/tmp/sysroots-components/x86_64/python3-msgcheck-native/usr/lib/python3.7/site-packages/msgcheck-2.8-py3.7.egg-info/dependency_links.txt
/build/poky/build/tmp/sysroots-components/x86_64/python3-msgcheck-native/usr/lib/python3.7/site-packages/msgcheck-2.8-py3.7.egg-info/requires.txt
/build/poky/build/tmp/sysroots-components/x86_64/python3-msgcheck-native/usr/lib/python3.7/site-packages/msgcheck-2.8-py3.7.egg-info/top_level.txt
/build/poky/build/tmp/sysroots-components/x86_64/python3-msgcheck-native/usr/lib/python3.7/site-packages/msgcheck-2.8-py3.7.egg-info/SOURCES.txt
/build/poky/build/tmp/sysroots-components/x86_64/python3-msgcheck-native/usr/lib/python3.7/site-packages/msgcheck-2.8-py3.7.egg-info/PKG-INFO
/build/poky/build/tmp/sysroots-components/x86_64/python3-msgcheck-native/usr/lib/python3.7/site-packages/msgcheck-2.8-py3.7.egg-info/entry_points.txt
/build/poky/build/tmp/sysroots-components/x86_64/python3-msgcheck-native/usr/bin
/build/poky/build/tmp/sysroots-components/x86_64/python3-msgcheck-native/usr/bin/msgcheck
/build/poky/build/tmp/sysroots-components/x86_64/python3-msgcheck-native/usr/share

the file isn't there.

This happens to random python packages compiled as native (sometimes even for python-native itself), but (afaik) not for cross or target packages (I'm pretty sure because of the different packaging applied).
So I digged a little into the code classes/sstate.bbclass:sstate_install, which seems to create the sysroot-component dir and the manifest.
There is a gap between the manifest creation (line 285) and the hardlinking (line till 311).

Now my question is there any place where a file potentially could get lost? - at first glance there shouldn't be one - I have to admit that I don't fully understand all this subprocess magic in lib/oe/path.py:copyhardlinktree.
What I do to fix the issue is reopening the manifest and double check for missing files and remove them from the manifest, but this
feels wrong - so any advise is welcome...

Hope that someone more familiar with the topic could have a look.

Hi Konrad,

I'm not really familiar with that code but it's being run buy 1000s of
builder around the world so let's try to eliminate a few possibilities.

When did you start having this problem?
Since the start of the test distribution I'm working on. But also for plain poky builds if I forcefully inject all of the python-native site-packages via local.conf (DEPENDS_class-native += "..."), without actually using them in the recipe scope
How often do you think it's happening: 1 in 3 builds, 1 in 10?
See the other mail - looks like it heavily depends on the host
Tell us about your machine: OS,version, disk, CPUs, ram
See the other mail
Do you do anything special in your conf dir? Send local.conf perhaps.
No custom modification (just for testing the DEPENDS-injection)
Do you have any local bbappends or commits on top of poky or
in other layers?
No
Have you tried to simplify the build to eliminate problems
potentially caused by other layers?
I did - see above
Are you able to reproduce the problem on more than one build machine?
See the other mail
Are you able to reproduce the problem on a different Linux distro?
Not really - Debian 9 was fine all other Hosts are Ubuntu based
Are there other builds or users on the machine that may be causing
extra load?
No the hosts are just being poorly equipped - at least the ones that produce this issue


Hi Konrad,

Thanks for the detailed and complete replies.

I don't think I've seen this error and we do 100s of builds
per day using local many-core systems running Ubuntu-18.04
but with the builds in docker containers using a variety of
OS distributions.

My first *wild* guess is that the problem might go away on the Azure
systems if you allocate more memory. That might be an easy
test to do so that we can confirm that it happens more frequently
when there is a memory constraint. Can you do that test?

I've also BCCed someone who might know someone who
would be interested in fixing Azure + Yocto bugs. Let's see
if they can help. :)

It would also be helpful if you created a defect in:

   https://bugzilla.yoctoproject.org/

and hopefully add a patch in that defect including the -native recipes that
are required to make the problem happen.

Thanks,

../Randy




../Randy


Thanks

Konrad









    


-- 
# Randy MacLeod
# Wind River Linux


Re: JFFS2 no udef, all char/block devices hardlinked to /dev/console

Khem Raj
 

On 4/3/20 1:45 AM, Andreas Dröscher wrote:
Hi
I'm doing a Yocto Zeus build for a very old Linux Kernel (The Kernel is built
outside of Yocto). Since my target CPU, based on mips32 little endian, was
removed from Linux mainline I've opted to use musl to keep at least the
user space up to date.
I'm building a JFFS2 root fs using --devtable= since my kernel does not have
devfs/udev. The file looks like:
/dev/console    c   640      0       0        5      1       - -       -
/dev/full       c   640      0       0        1      7       - -       -
/dev/mtd        c   640      0       0       90      0       0 2       8
/dev/mtdblock   b   640      0       0       31      0       0 1       8
/dev/null       c   666      0       0        1      3       - -       -
...
Running mkfs.jffs2 outside Yocto works. Running mkfs.jffs2 as part of the
default image build step breaks my char/block devices. All device files are
hard linked to the first one. Moreover the permissions are also reset.
are you running same mkfs.jffs2 utility in and outside yocto experiment ? if not then lets fix that first, it could be a problem in the native package that yocto build system produces.

Example Output of ls /dev/*:
crw-r----- 16 root root 5, 1, Jan 1 1970 /dev/console
crw-r----- 16 root root 5, 1, Jan 1 1970 /dev/full
crw-r----- 16 root root 5, 1, Jan 1 1970 /dev/mtd0
crw-r----- 16 root root 5, 1, Jan 1 1970 /dev/mtd1
...
crw-r----- 16 root root 5, 1, Jan 1 1970 /dev/mtdblock0
crw-r----- 16 root root 5, 1, Jan 1 1970 /dev/mtdblock1
..
crw-r----- 16 root root 5, 1, Jan 1 1970 /dev/mtdchar
crw-r----- 16 root root 5, 1, Jan 1 1970 /dev/null
It looks like add_host_filesystem_entry calls lstat for all files added to the
JFFS2 including files that do not exist. For some reason I do not yet understand
lstat returns garbage instead of just failing on my system (Ubuntu 18.04). This
in turn leads to the hard linking and permisson issues described above. I
suggest to disable lstat for device files to counter this issue:
the fact that it works outside yocto, I think it might be premature to disable it, we should see if we can find the real cause for the issue, it could be fixed rightly then


---
 jffsX-utils/mkfs.jffs2.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/jffsX-utils/mkfs.jffs2.c b/jffsX-utils/mkfs.jffs2.c
index 9afd920..2779706 100644
--- a/jffsX-utils/mkfs.jffs2.c
+++ b/jffsX-utils/mkfs.jffs2.c
@@ -219,14 +219,18 @@ static struct filesystem_entry *add_host_filesystem_entry(const char *name,
         const char *path, unsigned long uid, unsigned long gid,
         unsigned long mode, dev_t rdev, struct filesystem_entry *parent)
 {
-    int status;
+    int status = -1;
     char *tmp;
     struct stat sb;
     time_t timestamp = time(NULL);
     struct filesystem_entry *entry;
     memset(&sb, 0, sizeof(struct stat));
-    status = lstat(path, &sb);
+
+    //Do not call lstat for char- and  block-devices
+    if (major(rdev) == 0) {
+        status = lstat(path, &sb);
+    }
     if (status >= 0) {
         /* It is ok for some types of files to not exit on disk (such as


[meta-selinux][PATCH] clean up getVar() usage

Joe MacDonald
 

83eac4de updated the usage of getVar() in classes/selinux.bbclass to
leave out the default expand parameter. This is consistent with the
usage in the core layers.

Bring all other calls to getVar() in the layer into alignment with this
approach.

Signed-off-by: Joe MacDonald <joe_macdonald@...>
---
recipes-core/busybox/busybox_selinux.inc | 8 ++++----
recipes-security/refpolicy/refpolicy_common.inc | 2 +-
recipes-security/selinux/libselinux-python.inc | 2 +-
recipes-security/selinux/libselinux.inc | 2 +-
4 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/recipes-core/busybox/busybox_selinux.inc b/recipes-core/busybox/busybox_selinux.inc
index cc83b01..6e491ce 100644
--- a/recipes-core/busybox/busybox_selinux.inc
+++ b/recipes-core/busybox/busybox_selinux.inc
@@ -8,9 +8,9 @@ python create_sh_wrapper_reset_alternative_vars () {
# We need to load the full set of busybox provides from the /etc/busybox.links
# Use this to see the update-alternatives with the right information

- dvar = d.getVar('D', True)
- pn = d.getVar('PN', True)
- base_bindir = d.getVar('base_bindir', True)
+ dvar = d.getVar('D')
+ pn = d.getVar('PN')
+ base_bindir = d.getVar('base_bindir')

def create_sh_alternative_vars(links, target, mode):
import shutil
@@ -20,7 +20,7 @@ python create_sh_wrapper_reset_alternative_vars () {
os.fchmod(fwp.fileno(), mode)
fwp.close()
# Install the sh wrappers and alternatives reset to link to them
- wpdir = os.path.join(d.getVar('libdir', True), pn)
+ wpdir = os.path.join(d.getVar('libdir'), pn)
wpdir_dest = '%s%s' % (dvar, wpdir)
if not os.path.exists(wpdir_dest):
os.makedirs(wpdir_dest)
diff --git a/recipes-security/refpolicy/refpolicy_common.inc b/recipes-security/refpolicy/refpolicy_common.inc
index 2083a37..1d9ca93 100644
--- a/recipes-security/refpolicy/refpolicy_common.inc
+++ b/recipes-security/refpolicy/refpolicy_common.inc
@@ -117,7 +117,7 @@ python __anonymous () {

# make sure DEFAULT_ENFORCING is something sane
if not re.match('^(enforcing|permissive|disabled)$',
- d.getVar('DEFAULT_ENFORCING', True),
+ d.getVar('DEFAULT_ENFORCING'),
flags=0):
d.setVar('DEFAULT_ENFORCING', 'permissive')
}
diff --git a/recipes-security/selinux/libselinux-python.inc b/recipes-security/selinux/libselinux-python.inc
index 24407e8..6a64473 100644
--- a/recipes-security/selinux/libselinux-python.inc
+++ b/recipes-security/selinux/libselinux-python.inc
@@ -14,7 +14,7 @@ RDEPENDS_${PN} += "libselinux python3-core python3-shell"

def get_policyconfigarch(d):
import re
- target = d.getVar('TARGET_ARCH', True)
+ target = d.getVar('TARGET_ARCH')
p = re.compile('i.86')
target = p.sub('i386',target)
return "ARCH=%s" % (target)
diff --git a/recipes-security/selinux/libselinux.inc b/recipes-security/selinux/libselinux.inc
index 8d381de..fe8c087 100644
--- a/recipes-security/selinux/libselinux.inc
+++ b/recipes-security/selinux/libselinux.inc
@@ -12,7 +12,7 @@ DEPENDS_append_libc-musl = " fts"

def get_policyconfigarch(d):
import re
- target = d.getVar('TARGET_ARCH', True)
+ target = d.getVar('TARGET_ARCH')
p = re.compile('i.86')
target = p.sub('i386',target)
return "ARCH=%s" % (target)
--
2.20.1


Re: Inappropriate error handling

 

On Fri, 03 Apr 2020 02:50:56 -0700
Thomas Köller <thomas@...> wrote:

Hi,

here is an excerpt from a log of a failed build:

WARNING: icu-60.2-r0 do_populate_sysroot_setscene: Failed to fetch URL file://bd/sstate:icu:aarch64-poky-linux:60.2:r0:aarch64:3:bd6b12b7f20a46d35ce4d9382c306075_populate_sysroot.tgz;downloadfilename=bd/sstate:icu:aarch64-poky-linux:60.2:r0:aarch64:3:bd6b12b7f20a46d35ce4d9382c306075_populate_sysroot.tgz, attempting MIRRORS if available
ERROR: icu-60.2-r0 do_populate_sysroot_setscene: Fetcher failure: Unable to find file file://bd/sstate:icu:aarch64-poky-linux:60.2:r0:aarch64:3:bd6b12b7f20a46d35ce4d9382c306075_populate_sysroot.tgz;downloadfilename=bd/sstate:icu:aarch64-poky-linux:60.2:r0:aarch64:3:bd6b12b7f20a46d35ce4d9382c306075_populate_sysroot.tgz anywhere. The paths that were searched were:
/mnt/data/jenkins/workspace/imx-manifest_warrior/sstate
/mnt/data/jenkins/workspace/imx-manifest_warrior/sstate
ERROR: icu-60.2-r0 do_populate_sysroot_setscene: No suitable staging package found
WARNING: Logfile for failed setscene task is /mnt/data/jenkins/workspace/imx-manifest_warrior/buildroot/imx8mqevk-basler/imx-4.14.98-2.0.0_ga_basler/basler-dart-bcon-mipi-dev/build/tmp/work/aarch64-poky-linux/icu/60.2-r0/temp/log.do_populate_sysroot_setscene.44028
WARNING: Setscene task (/mnt/data/jenkins/workspace/imx-manifest_warrior/buildroot/imx8mqevk-basler/imx-4.14.98-2.0.0_ga_basler/basler-dart-bcon-mipi-dev/sources/poky/meta/recipes-support/icu/icu_60.2.bb:do_populate_sysroot_setscene) failed with exit code '1' - real task will be run instead

As can be seen, a setscene task failed. I do not (yet) know why this happened, but that is not what this message is about. What matters is that the real task will be executed later, which works just fine, and the entire build runs to completion without any further errors. However, at the very end I get the following output:

Summary: There were 2 WARNING messages shown.
Summary: There were 2 ERROR messages shown, returning a non-zero exit code.

And then the non-zero exit code that is returned causes my script to take the error exit, even though the build products are all fine and perfectly usable. This really should not happen.
This has been discussed last month:
https://lists.yoctoproject.org/g/yocto/topic/71426351.

I ended up using Joshua Watt's suggestion to run the setscene tasks in a
separate bitbake process and ignore failure:

bitbake --setscene-only <target> || true
bitbake --skip-setscene <target>

I'd like to come up with something better but I don't have the bandwidth to
look into it further right now.

Thanks,

--
Paul Barker
Konsulko Group


Inappropriate error handling

Thomas Köller
 

Hi,

here is an excerpt from a log of a failed build:

WARNING: icu-60.2-r0 do_populate_sysroot_setscene: Failed to fetch URL file://bd/sstate:icu:aarch64-poky-linux:60.2:r0:aarch64:3:bd6b12b7f20a46d35ce4d9382c306075_populate_sysroot.tgz;downloadfilename=bd/sstate:icu:aarch64-poky-linux:60.2:r0:aarch64:3:bd6b12b7f20a46d35ce4d9382c306075_populate_sysroot.tgz, attempting MIRRORS if available
ERROR: icu-60.2-r0 do_populate_sysroot_setscene: Fetcher failure: Unable to find file file://bd/sstate:icu:aarch64-poky-linux:60.2:r0:aarch64:3:bd6b12b7f20a46d35ce4d9382c306075_populate_sysroot.tgz;downloadfilename=bd/sstate:icu:aarch64-poky-linux:60.2:r0:aarch64:3:bd6b12b7f20a46d35ce4d9382c306075_populate_sysroot.tgz anywhere. The paths that were searched were:
/mnt/data/jenkins/workspace/imx-manifest_warrior/sstate
/mnt/data/jenkins/workspace/imx-manifest_warrior/sstate
ERROR: icu-60.2-r0 do_populate_sysroot_setscene: No suitable staging package found
WARNING: Logfile for failed setscene task is /mnt/data/jenkins/workspace/imx-manifest_warrior/buildroot/imx8mqevk-basler/imx-4.14.98-2.0.0_ga_basler/basler-dart-bcon-mipi-dev/build/tmp/work/aarch64-poky-linux/icu/60.2-r0/temp/log.do_populate_sysroot_setscene.44028
WARNING: Setscene task (/mnt/data/jenkins/workspace/imx-manifest_warrior/buildroot/imx8mqevk-basler/imx-4.14.98-2.0.0_ga_basler/basler-dart-bcon-mipi-dev/sources/poky/meta/recipes-support/icu/icu_60.2.bb:do_populate_sysroot_setscene) failed with exit code '1' - real task will be run instead

As can be seen, a setscene task failed. I do not (yet) know why this happened, but that is not what this message is about. What matters is that the real task will be executed later, which works just fine, and the entire build runs to completion without any further errors. However, at the very end I get the following output:

Summary: There were 2 WARNING messages shown.
Summary: There were 2 ERROR messages shown, returning a non-zero exit code.

And then the non-zero exit code that is returned causes my script to take the error exit, even though the build products are all fine and perfectly usable. This really should not happen.


JFFS2 no udef, all char/block devices hardlinked to /dev/console

Andreas Dröscher <yocto@...>
 

Hi

I'm doing a Yocto Zeus build for a very old Linux Kernel (The Kernel is built
outside of Yocto). Since my target CPU, based on mips32 little endian, was
removed from Linux mainline I've opted to use musl to keep at least the
user space up to date.

I'm building a JFFS2 root fs using --devtable= since my kernel does not have
devfs/udev. The file looks like:
/dev/console c 640 0 0 5 1 - - -
/dev/full c 640 0 0 1 7 - - -
/dev/mtd c 640 0 0 90 0 0 2 8
/dev/mtdblock b 640 0 0 31 0 0 1 8
/dev/null c 666 0 0 1 3 - - -
...

Running mkfs.jffs2 outside Yocto works. Running mkfs.jffs2 as part of the
default image build step breaks my char/block devices. All device files are
hard linked to the first one. Moreover the permissions are also reset.

Example Output of ls /dev/*:
crw-r----- 16 root root 5, 1, Jan 1 1970 /dev/console
crw-r----- 16 root root 5, 1, Jan 1 1970 /dev/full
crw-r----- 16 root root 5, 1, Jan 1 1970 /dev/mtd0
crw-r----- 16 root root 5, 1, Jan 1 1970 /dev/mtd1
...
crw-r----- 16 root root 5, 1, Jan 1 1970 /dev/mtdblock0
crw-r----- 16 root root 5, 1, Jan 1 1970 /dev/mtdblock1
..
crw-r----- 16 root root 5, 1, Jan 1 1970 /dev/mtdchar
crw-r----- 16 root root 5, 1, Jan 1 1970 /dev/null

It looks like add_host_filesystem_entry calls lstat for all files added to the
JFFS2 including files that do not exist. For some reason I do not yet understand
lstat returns garbage instead of just failing on my system (Ubuntu 18.04). This
in turn leads to the hard linking and permisson issues described above. I
suggest to disable lstat for device files to counter this issue:

---
jffsX-utils/mkfs.jffs2.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/jffsX-utils/mkfs.jffs2.c b/jffsX-utils/mkfs.jffs2.c
index 9afd920..2779706 100644
--- a/jffsX-utils/mkfs.jffs2.c
+++ b/jffsX-utils/mkfs.jffs2.c
@@ -219,14 +219,18 @@ static struct filesystem_entry *add_host_filesystem_entry(const char *name,
const char *path, unsigned long uid, unsigned long gid,
unsigned long mode, dev_t rdev, struct filesystem_entry *parent)
{
- int status;
+ int status = -1;
char *tmp;
struct stat sb;
time_t timestamp = time(NULL);
struct filesystem_entry *entry;

memset(&sb, 0, sizeof(struct stat));
- status = lstat(path, &sb);
+
+ //Do not call lstat for char- and block-devices
+ if (major(rdev) == 0) {
+ status = lstat(path, &sb);
+ }

if (status >= 0) {
/* It is ok for some types of files to not exit on disk (such as
--
2.17.1

Andreas


JFFS2 no udef, all char/block devices hardlinked to /dev/console

yocto@...
 

Hi

I'm doing a Yocto Zeus build for a very old Linux Kernel (The Kernel is built
outside of Yocto). Since my target CPU, based on mips32 little endian, was
removed from Linux mainline I've opted to use musl to keep at least the
user space up to date.

I'm building a JFFS2 root fs using --devtable= since my kernel does not have
devfs/udev. The file looks like:
/dev/console c 640 0 0 5 1 - - -
/dev/full c 640 0 0 1 7 - - -
/dev/mtd c 640 0 0 90 0 0 2 8
/dev/mtdblock b 640 0 0 31 0 0 1 8
/dev/null c 666 0 0 1 3 - - -
...

Running mkfs.jffs2 outside Yocto works. Running mkfs.jffs2 as part of the
default image build step breaks my char/block devices. All device files are
hard linked to the first one. Moreover the permissions are also reset.

Example Output of ls /dev/*:
crw-r----- 16 root root 5, 1, Jan 1 1970 /dev/console
crw-r----- 16 root root 5, 1, Jan 1 1970 /dev/full
crw-r----- 16 root root 5, 1, Jan 1 1970 /dev/mtd0
crw-r----- 16 root root 5, 1, Jan 1 1970 /dev/mtd1
...
crw-r----- 16 root root 5, 1, Jan 1 1970 /dev/mtdblock0
crw-r----- 16 root root 5, 1, Jan 1 1970 /dev/mtdblock1
..
crw-r----- 16 root root 5, 1, Jan 1 1970 /dev/mtdchar
crw-r----- 16 root root 5, 1, Jan 1 1970 /dev/null

It looks like add_host_filesystem_entry calls lstat for all files added to the
JFFS2 including files that do not exist. For some reason I do not yet understand
lstat returns garbage instead of just failing on my system (Ubuntu 18.04). This
in turn leads to the hard linking and permisson issues described above. I
suggest to disable lstat for device files to counter this issue:

---
jffsX-utils/mkfs.jffs2.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/jffsX-utils/mkfs.jffs2.c b/jffsX-utils/mkfs.jffs2.c
index 9afd920..2779706 100644
--- a/jffsX-utils/mkfs.jffs2.c
+++ b/jffsX-utils/mkfs.jffs2.c
@@ -219,14 +219,18 @@ static struct filesystem_entry *add_host_filesystem_entry(const char *name,
const char *path, unsigned long uid, unsigned long gid,
unsigned long mode, dev_t rdev, struct filesystem_entry *parent)
{
- int status;
+ int status = -1;
char *tmp;
struct stat sb;
time_t timestamp = time(NULL);
struct filesystem_entry *entry;

memset(&sb, 0, sizeof(struct stat));
- status = lstat(path, &sb);
+
+ //Do not call lstat for char- and block-devices
+ if (major(rdev) == 0) {
+ status = lstat(path, &sb);
+ }

if (status >= 0) {
/* It is ok for some types of files to not exit on disk (such as
--
2.17.1

Andreas


Re: Building dependencies in yocto for GO language project

salman.isd@...
 

Solved... I had to add the following to the recipe and then it works.

DEPENDS += "go-dep-native"
 
do_compile_prepend() {
        cd ${WORKDIR}/build/src/${GO_IMPORT}
        dep init
        dep ensure
}


Building dependencies in yocto for GO language project

salman.isd@...
 

I am trying to build a GO project using yocto using the following recipe

DESCRIPTION = "An Identity Provider for ORY Hydra over LDAP"

SECTION = "examples"

HOMEPAGE = "https://github.com/i-core/werther"

LICENSE = "MIT"

LIC_FILES_CHKSUM = "file://src/${GO_IMPORT}/LICENSE;md5=c22a4ad704abf6e006791a40249a18cb"

GO_IMPORT = "github.com/i-core/werther"

SRC_URI = "git://${GO_IMPORT}"

SRCREV = "${AUTOREV}"

FILES_${PN} += "${GOBIN_FINAL}/*"

inherit go

DEPENDS += "go-dep"


But I'm running into this error

ERROR: werther-1.1.1-r0 do_compile: Function failed: do_compile (log file is located at /tmp/tala/tmp/work/cortexa9-neon-tala-linux-gnueabi/werther/1.1.1-r0/temp/log.do_compile.10723)

ERROR: Logfile of failure stored in: /tmp/tala/tmp/work/cortexa9-neon-tala-linux-gnueabi/werther/1.1.1-r0/temp/log.do_compile.10723

Log data follows:

| DEBUG: Executing shell function do_compile

| src/github.com/i-core/werther/internal/ldapclient/ldapclient.go:20:2: cannot find package "github.com/coocood/freecache" in any of:

|             /tmp/tala/tmp/work/cortexa9-neon-tala-linux-gnueabi/werther/1.1.1-r0/recipe-sysroot/usr/lib/go/src/github.com/coocood/freecache (from $GOROOT)

 

|             /tmp/tala/tmp/work/cortexa9-neon-tala-linux-gnueabi/werther/1.1.1-r0/build/src/github.com/coocood/freecache (from $GOPATH)

"github.com/coocood/freecache" is used by the project I am trying to build. There are other dependencies which are also not found (I have omitted them from the above error message).
Basically my question is how I can I resolve these dependencies. I dont think I need to create and put separate recipes for all these go packages.



Re: [meta-spdxscanner][PATCH V2] Remove redundant code.

Joshua Watt
 


On 4/2/20 11:45 AM, Li, Xiaoming wrote:
FOLDER_ID has already been assigned a defalut value "1", so there is no
need add 'or "1"' here.

Signed-off-by: Li Xiaoming <lixm.fnst@...>
---
 classes/fossology-rest.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/classes/fossology-rest.bbclass b/classes/fossology-rest.bbclass
index 5c5ef70..69f4998 100644
--- a/classes/fossology-rest.bbclass
+++ b/classes/fossology-rest.bbclass
@@ -230,7 +230,7 @@ def get_folder_id(d):
         folder_name = d.getVar('FOLDER_NAME')
         folder_id = create_folder(d, folder_name)
     else:
-        folder_id = (d.getVar('FOLDER_ID', True) or "1")
+        folder_id = d.getVar('FOLDER_ID', False)

You probably shouldn't be disabling variable expansion here (i.e. passing False as the second argument)?

 
     bb.note("Folder Id =  " + str(folder_id))
     return str(folder_id)


    


Re: apt-get destroying itself when trying to install package #apt #yocto

stefan.wenninger@...
 

Thank you for your quick clarifications. Sadly we are limited by our hardware to use Yocto for now.

I consider this thread closed.

Thanks again,
Stefan


initramfs with mdev: No match for argument: busybox-mdev

y1dekel@...
 

I am new to yocto. I have read some messages on this forum which suggest ways to build an image with initramfs and mdev. 
So far I have implemented all advises but I am getting this message:


ERROR: image-argus-tiny-initramfs-1.0-r0 do_rootfs: Could not invoke dnf. Command '/home/ubuntu/yocto_warrior/argus-build/tmp/work/raspberrypi3-poky-linux-gnueabi/image-argus-tiny-initramfs/1.0-r0/recipe-sysroot-native/usr/bin/dnf -v --rpmverbosity=info -y -c /home/ubuntu/yocto_warrior/argus-build/tmp/work/raspberrypi3-poky-linux-gnueabi/image-argus-tiny-initramfs/1.0-r0/rootfs/etc/dnf/dnf.conf --setopt=reposdir=/home/ubuntu/yocto_warrior/argus-build/tmp/work/raspberrypi3-poky-linux-gnueabi/image-argus-tiny-initramfs/1.0-r0/rootfs/etc/yum.repos.d --installroot=/home/ubuntu/yocto_warrior/argus-build/tmp/work/raspberrypi3-poky-linux-gnueabi/image-argus-tiny-initramfs/1.0-r0/rootfs --setopt=logdir=/home/ubuntu/yocto_warrior/argus-build/tmp/work/raspberrypi3-poky-linux-gnueabi/image-argus-tiny-initramfs/1.0-r0/temp --repofrompath=oe-repo,/home/ubuntu/yocto_warrior/argus-build/tmp/work/raspberrypi3-poky-linux-gnueabi/image-argus-tiny-initramfs/1.0-r0/oe-rootfs-repo --nogpgcheck install base-passwd busybox busybox-mdev dropbear initramfs-live-boot-tiny packagegroup-core-boot run-postinsts' returned 1:

DNF version: 4.1.0

cachedir: /home/ubuntu/yocto_warrior/argus-build/tmp/work/raspberrypi3-poky-linux-gnueabi/image-argus-tiny-initramfs/1.0-r0/rootfs/var/cache/dnf

Added oe-repo repo from /home/ubuntu/yocto_warrior/argus-build/tmp/work/raspberrypi3-poky-linux-gnueabi/image-argus-tiny-initramfs/1.0-r0/oe-rootfs-repo

repo: using cache for: oe-repo

not found other for: 

not found modules for: 

not found deltainfo for: 

not found updateinfo for: 

oe-repo: using metadata from Thu 02 Apr 2020 09:20:31 AM UTC.

Last metadata expiration check: 0:00:01 ago on Thu 02 Apr 2020 09:20:36 AM UTC.

No module defaults found

No match for argument: busybox-mdev


I have added an mdev include fragment as follows:

CONFIG_MDEV=y
CONFIG_FEATURE_MDEV_LOAD_FIRMWARE=y
PACKAGES =+ "${PN}-mdev"
INITSCRIPT_PACKAGES = "${PN}-httpd ${PN}-syslog ${PN}-udhcpd ${PN}-mdev ${PN}-hwclock"
INITSCRIPT_NAME_${PN}-mdev = "mdev"
INITSCRIPT_PARAMS_${PN}-mdev = "start 04 S ."
CONFFILES_${PN}-mdev = "${sysconfdir}/mdev.conf"
I also implemented a receipt for our image as follows:
VIRTUAL-RUNTIME_dev_manager = "busybox-mdev"
PACKAGE_INSTALL = "initramfs-live-boot-tiny packagegroup-core-boot dropbear ${VIRTUAL-RUNTIME_base-utils} ${VIRTUAL-RUNTIME_dev_manager} base-passwd ${ROOTFS_BOOTSTRAP_INSTALL}"
...
Any idea what I might be missing here?
 


Re: apt-get destroying itself when trying to install package #apt #yocto

Josef Holzmayr <holzmayr@...>
 

Howdy!

On Thu, Apr 02, 2020 at 02:31:44AM -0700, stefan.wenninger@... wrote:
So basically our problem is trying to install .deb packages meant for debian-apt with yocto-apt?
I take it we can only install the .deb packages built by bitbake (deploy/deb/*)?
Exactly.

Would it be possible to install the debian-apt on our system (outside of yocto) and then use the debian.org packages?
Nope. Whats the reason of using Yocto anyways if you are then jumping
through all kinds of hoops to just make it behave like a Debian? If you
want a Debian, you should probably be using a Debian :)

Having said that, there are buliding tools for ingesting the debian
repositories and spitting out an image, like Linutronix' ELBE or the
ISAR project. Maybe thats what fits your needs?

Greetz


Thanks for pointing us towards that package management whitepaper, I am sure it will help us properly setup packet management of our yocto-built .deb packages.

Stefan

--
———————————————
Josef Holzmayr
Software Developer Embedded Systems

Tel: +49 8444 9204-48
Fax: +49 8444 9204-50

R-S-I Elektrotechnik GmbH & Co. KG
Woelkestrasse 11
D-85301 Schweitenkirchen
www.rsi-elektrotechnik.de
———————————————
Amtsgericht Ingolstadt – GmbH: HRB 191328 – KG: HRA 170393
Geschäftsführer: Dr.-Ing. Michael Sorg, Dipl.-Ing. Franz Sorg
Ust-IdNr: DE 128592548

_____________________________________________________________
Amtsgericht Ingolstadt - GmbH: HRB 191328 - KG: HRA 170363
Geschäftsführer: Dr.-Ing. Michael Sorg, Dipl.-Ing. Franz Sorg
USt-IdNr.: DE 128592548


Re: apt-get destroying itself when trying to install package #apt #yocto

stefan.wenninger@...
 

So basically our problem is trying to install .deb packages meant for debian-apt with yocto-apt?
I take it we can only install the .deb packages built by bitbake (deploy/deb/*)?

Would it be possible to install the debian-apt on our system (outside of yocto) and then use the debian.org packages?

Thanks for pointing us towards that package management whitepaper, I am sure it will help us properly setup packet management of our yocto-built .deb packages.

Stefan


Re: apt-get destroying itself when trying to install package #apt #yocto

Josef Holzmayr <holzmayr@...>
 

Long story short:

It does not work like this. Just because the tool has the same name and
the packages have the same suffix, they are basically not related. You
cannot use a debian package repository for your Yocto based build.

Think about randomly injecting SLES packages into a Fedora. Its both
RPMs too, right? But also won't work. Same reasons.

If you need more information, have a look at

https://www.intel.com/content/dam/www/public/us/en/documents/white-papers/package-manager-white-paper.pdf

Greetz

On Thu, Apr 02, 2020 at 02:08:40AM -0700, stefan.wenninger@... wrote:
Hi,
We are trying to install packages on our arm64 architecture directly from debian.org.
Our sources.list contains "deb [ arch=arm64 ] http://ftp.de.debian.org/debian buster main".

1. When executing apt-get update we get the following output:

root@imx8mq-var-dart:~# apt-get update
Get:1 http://ftp.de.debian.org/debian buster InRelease [122 kB]
Ign:1 http://ftp.de.debian.org/debian buster InRelease
Get:2 http://ftp.de.debian.org/debian buster/main arm64 Packages [7737 kB]

Fetched 7858 kB in 5s (1424 kB/s)
Reading package lists... Done
W: GPG error: http://ftp.de.debian.org/debian buster InRelease: Unknown
error executing apt-key
W: The repository 'http://ftp.de.debian.org/debian buster InRelease' is
not signed.
N: Data from such a repository can't be authenticated and is therefore
potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user
configuration details.
E: Failed to fetch /
E: Some index files failed to download. They have been ignored, or old
ones used instead.
We did not worry about the missing gpg authentification since we were able to apt-cache search this source successfully.

2. When we tried to apt-get install python3-psutil we were promted with a large list of mainly perl related packages that were about to be removed:


12 upgraded, 66 newly installed, 531 to remove and 212 not upgraded
[complete output in attachments.]
Allowing these changes to be made led to dpkg trying to overwrite files that are also in other packages. This caused the command to fail.

3. We then tried to pass the "--force-overwrite" option to dpkg with the command:


sudo apt-get -o Dpkg::Options::="--force-overwrite" install python3-psutil
This command told us there were unmet dependencies:


The following packages have unmet dependencies:
libc6-dev : Depends: libc6 (= 2.28-10) but 2.27-r0 is to be installed
Depends: libc-dev-bin (= 2.28-10) but it is not going to be installed
Depends: linux-libc-dev but it is not going to be installed
python3-psutil : Depends: python3 (< 3.8)
Depends: python3 (>= 3.7~)
Depends: python3:any
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or
specify a solution).
[complete output in attachments]

4. We followed the suggestion and ran apt-get -f install.
[complete output in attachments]
That led to dpkg trying to unpack "libc6" but failing because /sbin/ldconfig is not present.
We confirmed that /sbin/ldconfig is in place and an executable on a fresh image.

We have tried to install different packages and to use different orders of commands, but ultimately we always end up with ldconfig being deleted and dpkg failing because of that.
Our best guess it that the way apt-get is set up in our image is faulty.

Relevant Yocto info:

Version: Yocto sumo 2.5
Image: fsl-image-qt5
IMAGE_INSTALL += " apt "
We have PACKAGE_CLASSES = "package_deb" and
PACKAGE_FEED_URIS="http://<host_ip>:5678" in our local.conf. However we
deleted the sources.list entries created by this.
Is this a known issue? Are we missing an important configuration for apt within Yocto?
Is there another way to install and setup apt-get in our image that does not include Yocto?

Thanks,
Stefan
root@imx8mq-var-dart:~# apt-get install python3-psutil
Reading package lists... Done
Building dependency tree... Done
The following additional packages will be installed:
adduser apt apt-utils debconf debconf-i18n debian-archive-keyring dh-python gcc-8-base gpgv libapt-inst2.0 libapt-pkg5.0 libaudit-common libaudit1 libbz2-1.0 libc-dev-bin libc6 libc6-dev
libcap-ng0 libdb5.3 libexpat1 libexpat1-dev libgcc1 libgcrypt20 libgdbm-compat4 libgdbm6 libgmp-dev libgmp10 libgmpxx4ldbl libgnutls30 libgpm2 libhogweed4 libidn2-0 liblocale-gettext-perl
liblz4-1 libmpdec2 libncursesw6 libnettle6 libp11-kit0 libpam-modules libpam-modules-bin libpam0g libpcre3 libperl5.28 libpython3-dev libpython3-stdlib libpython3.7 libpython3.7-dev
libpython3.7-minimal libpython3.7-stdlib libseccomp2 libselinux1 libsemanage-common libsemanage1 libsepol1 libssl1.1 libtasn1-6 libtext-charwidth-perl libtext-iconv-perl libtext-wrapi18n-perl
libtinfo6 libzstd1 linux-libc-dev mime-support passwd perl perl-base perl-modules-5.28 python3 python3-dev python3-distutils python3-lib2to3 python3-minimal python3.7 python3.7-dev
python3.7-minimal xz-utils zlib1g
Suggested packages:
apt-doc aptitude | synaptic | wajig dpkg-dev gnupg | gnupg2 | gnupg1 powermgmt-base debconf-doc debconf-utils whiptail | dialog libterm-readline-gnu-perl libgtk3-perl libnet-ldap-perl
debconf-kde-helper libdpkg-perl gnupg glibc-doc libc-l10n locales manpages-dev rng-tools gdbm-l10n gmp-doc libgmp10-doc libmpfr-dev gnutls-bin gpm libpam-doc sensible-utils perl-doc
libterm-readline-gnu-perl | libterm-readline-perl-perl libb-debug-perl liblocale-codes-perl python3-doc python3-tk python3-venv python-psutil-doc python3.7-venv python3.7-doc binfmt-support
Recommended packages:
manpages manpages-dev
The following packages will be REMOVED:
autoconf automake libexpat-dev libgcc-s-dev libgmpxx4 packagegroup-core-buildessential packagegroup-core-sdk packagegroup-core-standalone-sdk-target packagegroup-fsl-tools-benchmark perl-dev
perl-module--charnames perl-module-anydbm-file perl-module-app-cpan perl-module-app-prove perl-module-app-prove-state perl-module-app-prove-state-result
perl-module-app-prove-state-result-test perl-module-archive-tar perl-module-archive-tar-constant perl-module-archive-tar-file perl-module-arybase perl-module-attribute-handlers
perl-module-attributes perl-module-autodie perl-module-autodie-exception perl-module-autodie-exception-system perl-module-autodie-hints perl-module-autodie-scope-guard
perl-module-autodie-scope-guardstack perl-module-autodie-skip perl-module-autodie-util perl-module-autoloader perl-module-autosplit perl-module-autouse perl-module-b perl-module-b-concise
perl-module-b-debug perl-module-b-deparse perl-module-b-showlex perl-module-b-terse perl-module-b-xref perl-module-base perl-module-benchmark perl-module-bigint perl-module-bignum
perl-module-bigrat perl-module-blib perl-module-bytes perl-module-carp perl-module-carp-heavy perl-module-charnames perl-module-class-struct perl-module-compress-raw-bzip2
perl-module-compress-raw-zlib perl-module-compress-zlib perl-module-config-extensions perl-module-config-perl-v perl-module-constant perl-module-corelist perl-module-cpan perl-module-cwd
perl-module-data-dumper perl-module-db perl-module-dbm-filter perl-module-dbm-filter-compress perl-module-dbm-filter-encode perl-module-dbm-filter-int32 perl-module-dbm-filter-null
perl-module-dbm-filter-utf8 perl-module-deprecate perl-module-devel-peek perl-module-devel-ppport perl-module-devel-selfstubber perl-module-diagnostics perl-module-digest
perl-module-digest-base perl-module-digest-file perl-module-digest-md5 perl-module-digest-sha perl-module-dirhandle perl-module-dynaloader perl-module-encode perl-module-encode-alias
perl-module-encode-byte perl-module-encode-cjkconstants perl-module-encode-cn perl-module-encode-cn-hz perl-module-encode-config perl-module-encode-ebcdic perl-module-encode-encoder
perl-module-encode-encoding perl-module-encode-gsm0338 perl-module-encode-guess perl-module-encode-jp perl-module-encode-jp-h2z perl-module-encode-jp-jis7 perl-module-encode-kr
perl-module-encode-kr-2022-kr perl-module-encode-mime-header perl-module-encode-mime-header-iso-2022-jp perl-module-encode-mime-name perl-module-encode-symbol perl-module-encode-tw
perl-module-encode-unicode perl-module-encode-unicode-utf7 perl-module-encoding perl-module-encoding-warnings perl-module-english perl-module-env perl-module-errno perl-module-experimental
perl-module-exporter perl-module-exporter-heavy perl-module-extutils-cbuilder perl-module-extutils-cbuilder-base perl-module-extutils-cbuilder-platform-aix
perl-module-extutils-cbuilder-platform-android perl-module-extutils-cbuilder-platform-cygwin perl-module-extutils-cbuilder-platform-darwin perl-module-extutils-cbuilder-platform-dec-osf
perl-module-extutils-cbuilder-platform-os2 perl-module-extutils-cbuilder-platform-unix perl-module-extutils-cbuilder-platform-vms perl-module-extutils-cbuilder-platform-windows
perl-module-extutils-cbuilder-platform-windows-bcc perl-module-extutils-cbuilder-platform-windows-gcc perl-module-extutils-cbuilder-platform-windows-msvc perl-module-extutils-command
perl-module-extutils-command-mm perl-module-extutils-constant perl-module-extutils-constant-base perl-module-extutils-constant-proxysubs perl-module-extutils-constant-utils
perl-module-extutils-constant-xs perl-module-extutils-embed perl-module-extutils-install perl-module-extutils-installed perl-module-extutils-liblist perl-module-extutils-liblist-kid
perl-module-extutils-makemaker perl-module-extutils-makemaker-config perl-module-extutils-makemaker-locale perl-module-extutils-makemaker-version perl-module-extutils-manifest
perl-module-extutils-miniperl perl-module-extutils-mkbootstrap perl-module-extutils-mksymlists perl-module-extutils-mm perl-module-extutils-mm-aix perl-module-extutils-mm-any
perl-module-extutils-mm-beos perl-module-extutils-mm-cygwin perl-module-extutils-mm-darwin perl-module-extutils-mm-dos perl-module-extutils-mm-macos perl-module-extutils-mm-nw5
perl-module-extutils-mm-os2 perl-module-extutils-mm-qnx perl-module-extutils-mm-unix perl-module-extutils-mm-uwin perl-module-extutils-mm-vms perl-module-extutils-mm-vos
perl-module-extutils-mm-win32 perl-module-extutils-mm-win95 perl-module-extutils-my perl-module-extutils-packlist perl-module-extutils-parsexs perl-module-extutils-parsexs-constants
perl-module-extutils-parsexs-countlines perl-module-extutils-parsexs-eval perl-module-extutils-parsexs-utilities perl-module-extutils-testlib perl-module-extutils-typemaps
perl-module-extutils-typemaps-cmd perl-module-extutils-typemaps-inputmap perl-module-extutils-typemaps-outputmap perl-module-extutils-typemaps-type perl-module-fatal perl-module-fcntl
perl-module-feature perl-module-fields perl-module-file-basename perl-module-file-compare perl-module-file-copy perl-module-file-dosglob perl-module-file-fetch perl-module-file-find
perl-module-file-glob perl-module-file-globmapper perl-module-file-path perl-module-file-spec perl-module-file-spec-amigaos perl-module-file-spec-cygwin perl-module-file-spec-epoc
perl-module-file-spec-functions perl-module-file-spec-mac perl-module-file-spec-os2 perl-module-file-spec-unix perl-module-file-spec-vms perl-module-file-spec-win32 perl-module-file-stat
perl-module-file-temp perl-module-filecache perl-module-filehandle perl-module-filter-simple perl-module-filter-util-call perl-module-findbin perl-module-getopt-long perl-module-getopt-std
perl-module-hash-util perl-module-hash-util-fieldhash perl-module-i18n-collate perl-module-i18n-langinfo perl-module-i18n-langtags perl-module-i18n-langtags-detect
perl-module-i18n-langtags-list perl-module-io perl-module-io-compress-adapter-bzip2 perl-module-io-compress-adapter-deflate perl-module-io-compress-adapter-identity
perl-module-io-compress-base perl-module-io-compress-base-common perl-module-io-compress-bzip2 perl-module-io-compress-deflate perl-module-io-compress-gzip
perl-module-io-compress-gzip-constants perl-module-io-compress-rawdeflate perl-module-io-compress-zip perl-module-io-compress-zip-constants perl-module-io-compress-zlib-constants
perl-module-io-compress-zlib-extra perl-module-io-dir perl-module-io-file perl-module-io-handle perl-module-io-pipe perl-module-io-poll perl-module-io-seekable perl-module-io-select
perl-module-io-socket perl-module-io-socket-inet perl-module-io-socket-ip perl-module-io-socket-unix perl-module-io-uncompress-adapter-bunzip2 perl-module-io-uncompress-adapter-identity
perl-module-io-uncompress-adapter-inflate perl-module-io-uncompress-anyinflate perl-module-io-uncompress-anyuncompress perl-module-io-uncompress-base perl-module-io-uncompress-bunzip2
perl-module-io-uncompress-gunzip perl-module-io-uncompress-inflate perl-module-io-uncompress-rawinflate perl-module-io-uncompress-unzip perl-module-io-zlib perl-module-ipc-cmd
perl-module-ipc-msg perl-module-ipc-open2 perl-module-ipc-open3 perl-module-ipc-semaphore perl-module-ipc-sharedmem perl-module-ipc-sysv perl-module-json-pp perl-module-json-pp-boolean
perl-module-less perl-module-lib perl-module-list-util perl-module-list-util-xs perl-module-load perl-module-loaded perl-module-locale perl-module-locale-codes
perl-module-locale-codes-constants perl-module-locale-codes-country perl-module-locale-codes-country-codes perl-module-locale-codes-country-retired perl-module-locale-codes-currency
perl-module-locale-codes-currency-codes perl-module-locale-codes-currency-retired perl-module-locale-codes-langext perl-module-locale-codes-langext-codes
perl-module-locale-codes-langext-retired perl-module-locale-codes-langfam perl-module-locale-codes-langfam-codes perl-module-locale-codes-langfam-retired perl-module-locale-codes-language
perl-module-locale-codes-language-codes perl-module-locale-codes-language-retired perl-module-locale-codes-langvar perl-module-locale-codes-langvar-codes
perl-module-locale-codes-langvar-retired perl-module-locale-codes-script perl-module-locale-codes-script-codes perl-module-locale-codes-script-retired perl-module-locale-country
perl-module-locale-currency perl-module-locale-language perl-module-locale-maketext perl-module-locale-maketext-guts perl-module-locale-maketext-gutsloader perl-module-locale-maketext-simple
perl-module-locale-script perl-module-math-bigfloat perl-module-math-bigfloat-trace perl-module-math-bigint perl-module-math-bigint-calc perl-module-math-bigint-calcemu
perl-module-math-bigint-fastcalc perl-module-math-bigint-trace perl-module-math-bigrat perl-module-math-complex perl-module-math-trig perl-module-memoize perl-module-memoize-anydbm-file
perl-module-memoize-expire perl-module-memoize-expirefile perl-module-memoize-sdbm-file perl-module-memoize-storable perl-module-meta-notation perl-module-mime-base64
perl-module-mime-quotedprint perl-module-mro perl-module-net-cmd perl-module-net-config perl-module-net-domain perl-module-net-ftp perl-module-net-ftp-a perl-module-net-ftp-dataconn
perl-module-net-ftp-e perl-module-net-ftp-i perl-module-net-ftp-l perl-module-net-hostent perl-module-net-netent perl-module-net-netrc perl-module-net-nntp perl-module-net-ping
perl-module-net-pop3 perl-module-net-protoent perl-module-net-servent perl-module-net-smtp perl-module-net-time perl-module-next perl-module-o perl-module-odbm-file perl-module-ok
perl-module-opcode perl-module-open perl-module-ops perl-module-overload perl-module-overloading perl-module-params-check perl-module-parent perl-module-perlfaq perl-module-perlio-encoding
perl-module-perlio-mmap perl-module-perlio-scalar perl-module-perlio-via perl-module-perlio-via-quotedprint perl-module-pod-checker perl-module-pod-escapes perl-module-pod-find
perl-module-pod-functions perl-module-pod-inputobjects perl-module-pod-man perl-module-pod-parselink perl-module-pod-parser perl-module-pod-parseutils perl-module-pod-perldoc
perl-module-pod-perldoc-baseto perl-module-pod-perldoc-getoptsoo perl-module-pod-perldoc-toansi perl-module-pod-perldoc-tochecker perl-module-pod-perldoc-toman perl-module-pod-perldoc-tonroff
perl-module-pod-perldoc-topod perl-module-pod-perldoc-tortf perl-module-pod-perldoc-toterm perl-module-pod-perldoc-totext perl-module-pod-perldoc-toxml perl-module-pod-plaintext
perl-module-pod-select perl-module-pod-simple perl-module-pod-simple-blackbox perl-module-pod-simple-checker perl-module-pod-simple-debug perl-module-pod-simple-dumpastext
perl-module-pod-simple-dumpasxml perl-module-pod-simple-linksection perl-module-pod-simple-methody perl-module-pod-simple-progress perl-module-pod-simple-pullparser
perl-module-pod-simple-pullparserendtoken perl-module-pod-simple-pullparserstarttoken perl-module-pod-simple-pullparsertexttoken perl-module-pod-simple-pullparsertoken
perl-module-pod-simple-rtf perl-module-pod-simple-search perl-module-pod-simple-simpletree perl-module-pod-simple-text perl-module-pod-simple-textcontent perl-module-pod-simple-tiedoutfh
perl-module-pod-simple-transcode perl-module-pod-simple-transcodedumb perl-module-pod-simple-transcodesmart perl-module-pod-simple-xmloutstream perl-module-pod-text perl-module-pod-text-color
perl-module-pod-text-overstrike perl-module-pod-text-termcap perl-module-pod-usage perl-module-posix perl-module-re perl-module-safe perl-module-scalar-util perl-module-sdbm-file
perl-module-search-dict perl-module-selectsaver perl-module-selfloader perl-module-sigtrap perl-module-socket perl-module-sort perl-module-storable perl-module-sub-util perl-module-symbol
perl-module-sys-hostname perl-module-sys-syslog perl-module-tap-base perl-module-tap-formatter-base perl-module-tap-formatter-color perl-module-tap-formatter-console
perl-module-tap-formatter-console-parallelsession perl-module-tap-formatter-console-session perl-module-tap-formatter-file perl-module-tap-formatter-file-session
perl-module-tap-formatter-session perl-module-tap-harness perl-module-tap-harness-env perl-module-tap-object perl-module-tap-parser perl-module-tap-parser-aggregator
perl-module-tap-parser-grammar perl-module-tap-parser-iterator perl-module-tap-parser-iterator-array perl-module-tap-parser-iterator-process perl-module-tap-parser-iterator-stream
perl-module-tap-parser-iteratorfactory perl-module-tap-parser-multiplexer perl-module-tap-parser-result perl-module-tap-parser-result-bailout perl-module-tap-parser-result-comment
perl-module-tap-parser-result-plan perl-module-tap-parser-result-pragma perl-module-tap-parser-result-test perl-module-tap-parser-result-unknown perl-module-tap-parser-result-version
perl-module-tap-parser-result-yaml perl-module-tap-parser-resultfactory perl-module-tap-parser-scheduler perl-module-tap-parser-scheduler-job perl-module-tap-parser-scheduler-spinner
perl-module-tap-parser-source perl-module-tap-parser-sourcehandler perl-module-tap-parser-sourcehandler-executable perl-module-tap-parser-sourcehandler-file
perl-module-tap-parser-sourcehandler-handle perl-module-tap-parser-sourcehandler-perl perl-module-tap-parser-sourcehandler-rawtap perl-module-tap-parser-yamlish-reader
perl-module-tap-parser-yamlish-writer perl-module-term-ansicolor perl-module-term-cap perl-module-term-complete perl-module-term-readline perl-module-test perl-module-test-builder
perl-module-test-builder-module perl-module-test-builder-tester perl-module-test-builder-tester-color perl-module-test-harness perl-module-test-more perl-module-test-simple
perl-module-test-tester perl-module-test-tester-capture perl-module-test-tester-capturerunner perl-module-test-tester-delegate perl-module-text-abbrev perl-module-text-balanced
perl-module-text-parsewords perl-module-text-tabs perl-module-text-wrap perl-module-thread perl-module-thread-queue perl-module-thread-semaphore perl-module-threads perl-module-threads-shared
perl-module-tie-array perl-module-tie-file perl-module-tie-handle perl-module-tie-hash perl-module-tie-hash-namedcapture perl-module-tie-memoize perl-module-tie-refhash perl-module-tie-scalar
perl-module-tie-stdhandle perl-module-tie-substrhash perl-module-time-gmtime perl-module-time-hires perl-module-time-local perl-module-time-localtime perl-module-time-piece
perl-module-time-seconds perl-module-time-tm perl-module-unicode-collate perl-module-unicode-collate-cjk-big5 perl-module-unicode-collate-cjk-gb2312 perl-module-unicode-collate-cjk-jisx0208
perl-module-unicode-collate-cjk-korean perl-module-unicode-collate-cjk-pinyin perl-module-unicode-collate-cjk-stroke perl-module-unicode-collate-cjk-zhuyin perl-module-unicode-collate-locale
perl-module-unicode-normalize perl-module-unicode-ucd perl-module-universal perl-module-user-grent perl-module-user-pwent perl-module-utf8 perl-module-version perl-module-version-regex
perl-module-xsloader perl-modules tiobench
The following NEW packages will be installed:
adduser apt-utils debconf debconf-i18n debian-archive-keyring dh-python gcc-8-base gpgv libapt-inst2.0 libapt-pkg5.0 libaudit-common libaudit1 libbz2-1.0 libc-dev-bin libcap-ng0 libdb5.3
libexpat1-dev libgcrypt20 libgdbm6 libgmpxx4ldbl libgpm2 libhogweed4 libidn2-0 liblocale-gettext-perl liblz4-1 libmpdec2 libncursesw6 libnettle6 libp11-kit0 libpam-modules libpam-modules-bin
libpam0g libpcre3 libperl5.28 libpython3-dev libpython3-stdlib libpython3.7 libpython3.7-dev libpython3.7-minimal libpython3.7-stdlib libseccomp2 libselinux1 libsemanage-common libsemanage1
libsepol1 libssl1.1 libtasn1-6 libtext-charwidth-perl libtext-iconv-perl libtext-wrapi18n-perl libtinfo6 libzstd1 linux-libc-dev mime-support passwd perl-base perl-modules-5.28 python3
python3-lib2to3 python3-minimal python3-psutil python3.7 python3.7-dev python3.7-minimal xz-utils zlib1g
The following packages will be upgraded:
apt libc6 libc6-dev libexpat1 libgcc1 libgdbm-compat4 libgmp-dev libgmp10 libgnutls30 perl python3-dev python3-distutils
12 upgraded, 66 newly installed, 531 to remove and 212 not upgraded.
Need to get 36.9 MB of archives.
After this operation, 173 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
WARNING: The following packages cannot be authenticated!
libc-dev-bin linux-libc-dev libc6-dev gcc-8-base libgcc1 libc6 libbz2-1.0 libdb5.3 libgdbm6 libgdbm-compat4 zlib1g perl-base perl-modules-5.28 libperl5.28 perl libaudit-common libcap-ng0
libaudit1 debconf libpam0g libpcre3 libselinux1 libsemanage-common libsepol1 libsemanage1 libpam-modules-bin libpam-modules passwd adduser libgcrypt20 gpgv debian-archive-keyring liblz4-1
libzstd1 libgmpxx4ldbl libgmp-dev libgmp10 libnettle6 libhogweed4 libidn2-0 libp11-kit0 libtasn1-6 libgnutls30 libseccomp2 libapt-pkg5.0 apt liblocale-gettext-perl libssl1.1
libpython3.7-minimal libexpat1 python3.7-minimal python3-minimal python3-lib2to3 python3-distutils mime-support libmpdec2 libtinfo6 libncursesw6 libpython3.7-stdlib libpython3.7 libexpat1-dev
libpython3.7-dev libpython3-dev python3.7-dev dh-python python3-dev python3.7 libpython3-stdlib python3 libapt-inst2.0 apt-utils libtext-iconv-perl libtext-charwidth-perl
libtext-wrapi18n-perl debconf-i18n xz-utils libgpm2 python3-psutil
Install these packages without verification? [y/N] Y
0% [Working]
Get:1 http://ftp.de.debian.org/debian buster/main arm64 libc-dev-bin arm64 2.28-10 [270 kB]
Get:2 http://ftp.de.debian.org/debian buster/main arm64 linux-libc-dev arm64 4.19.98-1 [1294 kB]
Get:3 http://ftp.de.debian.org/debian buster/main arm64 libc6-dev arm64 2.28-10 [2324 kB]
Get:4 http://ftp.de.debian.org/debian buster/main arm64 gcc-8-base arm64 8.3.0-6 [191 kB]
Get:5 http://ftp.de.debian.org/debian buster/main arm64 libgcc1 arm64 1:8.3.0-6 [34.4 kB]
Get:6 http://ftp.de.debian.org/debian buster/main arm64 libc6 arm64 2.28-10 [2521 kB]
Get:7 http://ftp.de.debian.org/debian buster/main arm64 libbz2-1.0 arm64 1.0.6-9.2~deb10u1 [45.5 kB]
Get:8 http://ftp.de.debian.org/debian buster/main arm64 libdb5.3 arm64 5.3.28+dfsg1-0.5 [622 kB]
Get:9 http://ftp.de.debian.org/debian buster/main arm64 libgdbm6 arm64 1.18.1-4 [63.4 kB]
Get:10 http://ftp.de.debian.org/debian buster/main arm64 libgdbm-compat4 arm64 1.18.1-4 [44.0 kB]
Get:11 http://ftp.de.debian.org/debian buster/main arm64 zlib1g arm64 1:1.2.11.dfsg-1 [89.3 kB]
Get:12 http://ftp.de.debian.org/debian buster/main arm64 perl-base arm64 5.28.1-6 [1402 kB]
Get:13 http://ftp.de.debian.org/debian buster/main arm64 perl-modules-5.28 all 5.28.1-6 [2873 kB]
Get:14 http://ftp.de.debian.org/debian buster/main arm64 libperl5.28 arm64 5.28.1-6 [3729 kB]
Get:15 http://ftp.de.debian.org/debian buster/main arm64 perl arm64 5.28.1-6 [204 kB]
Get:16 http://ftp.de.debian.org/debian buster/main arm64 libaudit-common all 1:2.8.4-3 [22.4 kB]
Get:17 http://ftp.de.debian.org/debian buster/main arm64 libcap-ng0 arm64 0.7.9-2 [13.8 kB]
Get:18 http://ftp.de.debian.org/debian buster/main arm64 libaudit1 arm64 1:2.8.4-3 [56.6 kB]
Get:19 http://ftp.de.debian.org/debian buster/main arm64 debconf all 1.5.71 [145 kB]
Get:20 http://ftp.de.debian.org/debian buster/main arm64 libpam0g arm64 1.3.1-5 [125 kB]
Get:21 http://ftp.de.debian.org/debian buster/main arm64 libpcre3 arm64 2:8.39-12 [317 kB]
Get:22 http://ftp.de.debian.org/debian buster/main arm64 libselinux1 arm64 2.8-1+b1 [76.1 kB]
Get:23 http://ftp.de.debian.org/debian buster/main arm64 libsemanage-common all 2.8-2 [17.7 kB]
Get:24 http://ftp.de.debian.org/debian buster/main arm64 libsepol1 arm64 2.8-1 [217 kB]
Get:25 http://ftp.de.debian.org/debian buster/main arm64 libsemanage1 arm64 2.8-2 [90.5 kB]
Get:26 http://ftp.de.debian.org/debian buster/main arm64 libpam-modules-bin arm64 1.3.1-5 [106 kB]
Get:27 http://ftp.de.debian.org/debian buster/main arm64 libpam-modules arm64 1.3.1-5 [303 kB]
Get:28 http://ftp.de.debian.org/debian buster/main arm64 passwd arm64 1:4.5-1.1 [980 kB]
Get:29 http://ftp.de.debian.org/debian buster/main arm64 adduser all 3.118 [240 kB]
Get:30 http://ftp.de.debian.org/debian buster/main arm64 libgcrypt20 arm64 1.8.4-5 [487 kB]
Get:31 http://ftp.de.debian.org/debian buster/main arm64 gpgv arm64 2.2.12-1+deb10u1 [569 kB]
Get:32 http://ftp.de.debian.org/debian buster/main arm64 debian-archive-keyring all 2019.1 [75.1 kB]
Get:33 http://ftp.de.debian.org/debian buster/main arm64 liblz4-1 arm64 1.8.3-1 [50.2 kB]
Get:34 http://ftp.de.debian.org/debian buster/main arm64 libzstd1 arm64 1.3.8+dfsg-3 [214 kB]
Get:35 http://ftp.de.debian.org/debian buster/main arm64 libgmpxx4ldbl arm64 2:6.1.2+dfsg-4 [22.6 kB]
Get:36 http://ftp.de.debian.org/debian buster/main arm64 libgmp-dev arm64 2:6.1.2+dfsg-4 [608 kB]
Get:37 http://ftp.de.debian.org/debian buster/main arm64 libgmp10 arm64 2:6.1.2+dfsg-4 [226 kB]
Get:38 http://ftp.de.debian.org/debian buster/main arm64 libnettle6 arm64 3.4.1-1 [225 kB]
Get:39 http://ftp.de.debian.org/debian buster/main arm64 libhogweed4 arm64 3.4.1-1 [138 kB]
Get:40 http://ftp.de.debian.org/debian buster/main arm64 libidn2-0 arm64 2.0.5-1+deb10u1 [75.6 kB]
Get:41 http://ftp.de.debian.org/debian buster/main arm64 libp11-kit0 arm64 0.23.15-2 [302 kB]
Get:42 http://ftp.de.debian.org/debian buster/main arm64 libtasn1-6 arm64 4.13-3 [47.8 kB]
Get:43 http://ftp.de.debian.org/debian buster/main arm64 libgnutls30 arm64 3.6.7-4+deb10u2 [1061 kB]
Get:44 http://ftp.de.debian.org/debian buster/main arm64 libseccomp2 arm64 2.3.3-4 [39.5 kB]
Get:45 http://ftp.de.debian.org/debian buster/main arm64 libapt-pkg5.0 arm64 1.8.2 [898 kB]
Get:46 http://ftp.de.debian.org/debian buster/main arm64 apt arm64 1.8.2 [1369 kB]
Get:47 http://ftp.de.debian.org/debian buster/main arm64 liblocale-gettext-perl arm64 1.07-3+b4 [18.8 kB]
Get:48 http://ftp.de.debian.org/debian buster/main arm64 libssl1.1 arm64 1.1.1d-0+deb10u2 [1381 kB]
Get:49 http://ftp.de.debian.org/debian buster/main arm64 libpython3.7-minimal arm64 3.7.3-2+deb10u1 [588 kB]
Get:50 http://ftp.de.debian.org/debian buster/main arm64 libexpat1 arm64 2.2.6-2+deb10u1 [85.4 kB]
Get:51 http://ftp.de.debian.org/debian buster/main arm64 python3.7-minimal arm64 3.7.3-2+deb10u1 [1404 kB]
Get:52 http://ftp.de.debian.org/debian buster/main arm64 python3-minimal arm64 3.7.3-1 [36.6 kB]
Get:53 http://ftp.de.debian.org/debian buster/main arm64 python3-lib2to3 all 3.7.3-1 [76.7 kB]
Get:54 http://ftp.de.debian.org/debian buster/main arm64 python3-distutils all 3.7.3-1 [142 kB]
Get:55 http://ftp.de.debian.org/debian buster/main arm64 mime-support all 3.62 [37.2 kB]
Get:56 http://ftp.de.debian.org/debian buster/main arm64 libmpdec2 arm64 2.4.2-2 [77.7 kB]
Get:57 http://ftp.de.debian.org/debian buster/main arm64 libtinfo6 arm64 6.1+20181013-2+deb10u2 [321 kB]
Get:58 http://ftp.de.debian.org/debian buster/main arm64 libncursesw6 arm64 6.1+20181013-2+deb10u2 [120 kB]
Get:59 http://ftp.de.debian.org/debian buster/main arm64 libpython3.7-stdlib arm64 3.7.3-2+deb10u1 [1640 kB]
Get:60 http://ftp.de.debian.org/debian buster/main arm64 libpython3.7 arm64 3.7.3-2+deb10u1 [1371 kB]
Get:61 http://ftp.de.debian.org/debian buster/main arm64 libexpat1-dev arm64 2.2.6-2+deb10u1 [128 kB]
Get:62 http://ftp.de.debian.org/debian buster/main arm64 libpython3.7-dev arm64 3.7.3-2+deb10u1 [2379 kB]
Get:63 http://ftp.de.debian.org/debian buster/main arm64 libpython3-dev arm64 3.7.3-1 [20.1 kB]
Get:64 http://ftp.de.debian.org/debian buster/main arm64 python3.7-dev arm64 3.7.3-2+deb10u1 [509 kB]
Get:65 http://ftp.de.debian.org/debian buster/main arm64 dh-python all 3.20190308 [99.3 kB]
Get:66 http://ftp.de.debian.org/debian buster/main arm64 python3-dev arm64 3.7.3-1 [1264 B]
Get:67 http://ftp.de.debian.org/debian buster/main arm64 python3.7 arm64 3.7.3-2+deb10u1 [330 kB]
Get:68 http://ftp.de.debian.org/debian buster/main arm64 libpython3-stdlib arm64 3.7.3-1 [20.0 kB]
Get:69 http://ftp.de.debian.org/debian buster/main arm64 python3 arm64 3.7.3-1 [61.5 kB]
Get:70 http://ftp.de.debian.org/debian buster/main arm64 libapt-inst2.0 arm64 1.8.2 [202 kB]
Get:71 http://ftp.de.debian.org/debian buster/main arm64 apt-utils arm64 1.8.2 [411 kB]
Get:72 http://ftp.de.debian.org/debian buster/main arm64 libtext-iconv-perl arm64 1.7-5+b6 [15.3 kB]
Get:73 http://ftp.de.debian.org/debian buster/main arm64 libtext-charwidth-perl arm64 0.04-7.1+b1 [9852 B]
Get:74 http://ftp.de.debian.org/debian buster/main arm64 libtext-wrapi18n-perl all 0.06-7.1 [8644 B]
Get:75 http://ftp.de.debian.org/debian buster/main arm64 debconf-i18n all 1.5.71 [206 kB]
Get:76 http://ftp.de.debian.org/debian buster/main arm64 xz-utils arm64 5.2.4-1 [182 kB]
Get:77 http://ftp.de.debian.org/debian buster/main arm64 libgpm2 arm64 1.20.7-5 [34.5 kB]
Get:78 http://ftp.de.debian.org/debian buster/main arm64 python3-psutil arm64 5.5.1-1 [166 kB]
Fetched 36.9 MB in 10s (3496 kB/s)
Selecting previously unselected package libc-dev-bin.
(Reading database ... 56149 files and directories currently installed.)
Preparing to unpack .../libc-dev-bin_2.28-10_arm64.deb ...
Unpacking libc-dev-bin (2.28-10) ...
dpkg: error processing archive /var/cache/apt/archives/libc-dev-bin_2.28-10_arm64.deb (--unpack):
trying to overwrite '/usr/bin/gencat', which is also in package libc6-utils 2.27-r0
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Selecting previously unselected package linux-libc-dev:arm64.
Preparing to unpack .../linux-libc-dev_4.19.98-1_arm64.deb ...
Unpacking linux-libc-dev:arm64 (4.19.98-1) ...
dpkg: error processing archive /var/cache/apt/archives/linux-libc-dev_4.19.98-1_arm64.deb (--unpack):
trying to overwrite '/usr/include/asm-generic/auxvec.h', which is also in package linux-libc-headers-dev 4.14-r0
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Preparing to unpack .../libc6-dev_2.28-10_arm64.deb ...
Unpacking libc6-dev:arm64 (2.28-10) over (2.27-r0) ...
Selecting previously unselected package gcc-8-base:arm64.
Preparing to unpack .../gcc-8-base_8.3.0-6_arm64.deb ...
Unpacking gcc-8-base:arm64 (8.3.0-6) ...
Errors were encountered while processing:
/var/cache/apt/archives/libc-dev-bin_2.28-10_arm64.deb
/var/cache/apt/archives/linux-libc-dev_4.19.98-1_arm64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@imx8mq-var-dart:~# sudo apt-get -o Dpkg::Options::="--force-overwrite" install python3-psutil
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
libc6-dev : Depends: libc6 (= 2.28-10) but 2.27-r0 is to be installed
Depends: libc-dev-bin (= 2.28-10) but it is not going to be installed
Depends: linux-libc-dev but it is not going to be installed
python3-psutil : Depends: python3 (< 3.8)
Depends: python3 (>= 3.7~)
Depends: python3:any
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
root@imx8mq-var-dart:~# apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following package was automatically installed and is no longer required:
gcc-8-base
Use 'apt autoremove' to remove it.
The following additional packages will be installed:
libc-dev-bin libc6 libidn2-0 linux-libc-dev
Suggested packages:
glibc-doc debconf | debconf-2.0 libc-l10n locales
Recommended packages:
manpages manpages-dev
The following NEW packages will be installed:
libc-dev-bin libidn2-0 linux-libc-dev
The following packages will be upgraded:
libc6
1 upgraded, 3 newly installed, 0 to remove and 223 not upgraded.
2 not fully installed or removed.
Need to get 0 B/4161 kB of archives.
After this operation, 15.8 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
WARNING: The following packages cannot be authenticated!
libc6 libc-dev-bin linux-libc-dev libidn2-0
Install these packages without verification? [y/N] y
(Reading database ... 56150 files and directories currently installed.)
Preparing to unpack .../libc6_2.28-10_arm64.deb ...
Checking for services that may need to be restarted...
Checking init scripts...
Unpacking libc6:arm64 (2.28-10) over (2.27-r0) ...
dpkg: warning: 'ldconfig' not found in PATH or not executable
dpkg: error: 1 expected program not found in PATH or not executable
Note: root's PATH should usually contain /usr/local/sbin, /usr/sbin and /sbin
E: Sub-process /usr/bin/dpkg returned an error code (2)
--
———————————————
Josef Holzmayr
Software Developer Embedded Systems

Tel: +49 8444 9204-48
Fax: +49 8444 9204-50

R-S-I Elektrotechnik GmbH & Co. KG
Woelkestrasse 11
D-85301 Schweitenkirchen
www.rsi-elektrotechnik.de
———————————————
Amtsgericht Ingolstadt – GmbH: HRB 191328 – KG: HRA 170393
Geschäftsführer: Dr.-Ing. Michael Sorg, Dipl.-Ing. Franz Sorg
Ust-IdNr: DE 128592548

_____________________________________________________________
Amtsgericht Ingolstadt - GmbH: HRB 191328 - KG: HRA 170363
Geschäftsführer: Dr.-Ing. Michael Sorg, Dipl.-Ing. Franz Sorg
USt-IdNr.: DE 128592548


[meta-selinux][PATCH] selinux.bbclass: remove True option in getVar()

Yi Zhao
 

The getVar() defaults to expanding by default, thus remove the True
option from all getVar() calls.

Signed-off-by: Yi Zhao <yi.zhao@...>
---
classes/selinux.bbclass | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/classes/selinux.bbclass b/classes/selinux.bbclass
index fb0df27..13256d5 100644
--- a/classes/selinux.bbclass
+++ b/classes/selinux.bbclass
@@ -2,8 +2,8 @@ def target_selinux(d, truevar = 'selinux', falsevar = ''):
if not bb.utils.contains("DISTRO_FEATURES", "selinux", True, False, d):
return falsevar

- pn = d.getVar("PN", True)
- type = pn.replace(d.getVar("BPN", True), "")
+ pn = d.getVar("PN")
+ type = pn.replace(d.getVar("BPN"), "")
if type in ("-native", "nativesdk-", "-cross", "-crosssdk"):
return falsevar

--
2.17.1


apt-get destroying itself when trying to install package #apt #yocto

stefan.wenninger@...
 

Hi,
We are trying to install packages on our arm64 architecture directly from debian.org.
Our sources.list contains "deb [ arch=arm64 ] http://ftp.de.debian.org/debian buster main".

1. When executing apt-get update we get the following output:
root@imx8mq-var-dart:~# apt-get update
Get:1 http://ftp.de.debian.org/debian buster InRelease [122 kB]
Ign:1 http://ftp.de.debian.org/debian buster InRelease
Get:2 http://ftp.de.debian.org/debian buster/main arm64 Packages [7737 kB]
Fetched 7858 kB in 5s (1424 kB/s)
Reading package lists... Done
W: GPG error: http://ftp.de.debian.org/debian buster InRelease: Unknown error executing apt-key
W: The repository 'http://ftp.de.debian.org/debian buster InRelease' is not signed.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: Failed to fetch /
E: Some index files failed to download. They have been ignored, or old ones used instead.
We did not worry about the missing gpg authentification since we were able to apt-cache search this source successfully.

2. When we tried to apt-get install python3-psutil we were promted with a large list of mainly perl related packages that were about to be removed:
12 upgraded, 66 newly installed, 531 to remove and 212 not upgraded
[complete output in attachments.]
Allowing these changes to be made led to dpkg trying to overwrite files that are also in other packages. This caused the command to fail.

3. We then tried to pass the "--force-overwrite" option to dpkg with the command:
sudo apt-get -o Dpkg::Options::="--force-overwrite" install python3-psutil
This command told us there were unmet dependencies:
The following packages have unmet dependencies:
 libc6-dev : Depends: libc6 (= 2.28-10) but 2.27-r0 is to be installed
             Depends: libc-dev-bin (= 2.28-10) but it is not going to be installed
             Depends: linux-libc-dev but it is not going to be installed
 python3-psutil : Depends: python3 (< 3.8)
                  Depends: python3 (>= 3.7~)
                  Depends: python3:any
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
[complete output in attachments]

4. We followed the suggestion and ran apt-get -f install.
[complete output in attachments]
That led to dpkg trying to unpack "libc6" but failing because /sbin/ldconfig is not present.
We confirmed that /sbin/ldconfig is in place and an executable on a fresh image.


We have tried to install different packages and to use different orders of commands, but ultimately we always end up with ldconfig being deleted and dpkg failing because of that.
Our best guess it that the way apt-get is set up in our image is faulty.

Relevant Yocto info:
Version: Yocto sumo 2.5
Image: fsl-image-qt5
IMAGE_INSTALL += " apt "
We have PACKAGE_CLASSES = "package_deb" and PACKAGE_FEED_URIS="http://<host_ip>:5678" in our local.conf. However we deleted the sources.list entries created by this.
Is this a known issue? Are we missing an important configuration for apt within Yocto?
Is there another way to install and setup apt-get in our image that does not include Yocto?

Thanks,
Stefan

8321 - 8340 of 57363