Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 86A5DC0015E for ; Fri, 11 Aug 2023 06:38:41 +0000 (UTC) Subject: libudev-zero recipe issue To: yocto@lists.yoctoproject.org From: "Rob Kramer" X-Originating-Location: Singapore, SG (118.189.41.10) X-Originating-Platform: Linux Chrome 114 User-Agent: GROUPS.IO Web Poster MIME-Version: 1.0 Date: Thu, 10 Aug 2023 23:38:38 -0700 Message-ID: <8A4J.1691735918881680780.WtwR@lists.yoctoproject.org> Content-Type: multipart/alternative; boundary="08DPZG4PdNYAOpRd1M2i" List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Fri, 11 Aug 2023 06:38:41 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/yocto/message/60777 --08DPZG4PdNYAOpRd1M2i Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hi all, I added a new recipe for libudev-zero, which provides a minimal daemon-less= udev implementation. The recipe works, but has an issue that pops up regul= arly where it causes an exception during rootfs: Exception: FileNotFoundError: [Errno 2] No such file or directory: '/ssd/op= t/oe/yocto/kirkstone/build-weston/tmp-glibc/deploy/ipk/core2-64/libudev1_1.= 0.2-r1_core2-64.ipk' -> '/ssd/opt/oe/yocto/kirkstone/build-weston/tmp-glibc= /work/generic64-oe-linux/sollinux-ble-weston/1.0-r0/oe-rootfs-repo/core2-64= /libudev1_1.0.2-r1_core2-64.ipk' It seems like for some reason the ipk has been removed from deploy/ipk. To = recover from this, a 'bitbake -c clean libudev-zero' will restore things th= e next time the rootfs is run. Does anyone have an idea what could cause this? Appended below is the recip= e, and the full error message. Cheers, Rob libudev-zero_1.0.2.bb: DESCRIPTION =3D "Daemon-less libudev replacement" SECTION =3D "base" LICENSE=3D"ISC" LIC_FILES_CHKSUM =3D "file://LICENSE;md5=3D09eac32a84c5d70c105cbfce173a161d= " PR =3D "r1" SRCREV =3D "04a727df50fde3f69127aed4bc48e6cff5430175" SRC_URI =3D "git://github.com/illiliti/${BPN};branch=3Dmaster;protocol=3Dht= tps" SRC_URI[sha256sum] =3D "29dff942cab9519994fb92ba6407f57e08d3dd6e6c0b86bb93d= 7b1d681994ff8" PROVIDES =3D "udev" inherit features_check CONFLICT_DISTRO_FEATURES =3D "systemd" S =3D "${WORKDIR}/git" PACKAGES +=3D "${PN}-netlink" FILES:${PN} =3D "${libdir}" FILES:${PN}-netlink =3D "${bindir}" RPROVIDES:${PN} =3D "hotplug udev" do_configure:prepend() { sed -i 's;PREFIX =3D /usr/local;PREFIX =3D /usr;' ${S}/Makefile } do_compile:append() { $CCLD $LDFLAGS -o contrib/netlink-forward contrib/helper.c } do_install() { oe_runmake install DESTDIR=3D${D} install -d ${D}${bindir} install -m 755 contrib/netlink-forward ${D}${bindir} } Error message: ERROR: sollinux-ble-weston-1.0-r0 do_rootfs: Error executing a python funct= ion in exec_func_python() autogenerated: The stack trace of python calls that resulted in this exception/failure was= : File: 'exec_func_python() autogenerated', lineno: 2, function: 0001: *** 0002:do_rootfs(d) 0003: File: '/opt/oe/yocto/kirkstone/oe-core/meta/classes/image.bbclass', lineno:= 255, function: do_rootfs 0251:=C2=A0 =C2=A0 progress_reporter.next_stage() 0252: 0253:=C2=A0 =C2=A0 # generate rootfs 0254:=C2=A0 =C2=A0 d.setVarFlag('REPRODUCIBLE_TIMESTAMP_ROOTFS', 'export', = '1') *** 0255:=C2=A0 =C2=A0 create_rootfs(d, progress_reporter=3Dprogress_report= er, logcatcher=3Dl ogcatcher) 0256: 0257:=C2=A0 =C2=A0 progress_reporter.finish() 0258:} 0259:do_rootfs[dirs] =3D "${TOPDIR}" File: '/opt/oe/yocto/kirkstone/oe-core/meta/lib/oe/rootfs.py', lineno: 381,= func tion: create_rootfs 0377: 0378:=C2=A0 =C2=A0 img_type =3D d.getVar('IMAGE_PKGTYPE') 0379: 0380:=C2=A0 =C2=A0 cls =3D get_class_for_type(img_type) *** 0381:=C2=A0 =C2=A0 cls(d, manifest_dir, progress_reporter, logcatcher).= create() 0382:=C2=A0 =C2=A0 os.environ.clear() 0383:=C2=A0 =C2=A0 os.environ.update(env_bkp) 0384: 0385: File: '/opt/oe/yocto/kirkstone/oe-core/meta/lib/oe/package_manager/ipk/root= fs.py ', lineno: 136, function: __init__ 0132: 0133:=C2=A0 =C2=A0 =C2=A0 =C2=A0 self.inc_opkg_image_gen =3D self.d.getVar(= 'INC_IPK_IMAGE_GEN') o r "" 0134:=C2=A0 =C2=A0 =C2=A0 =C2=A0 if self._remove_old_rootfs(): 0135:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 bb.utils.remove(self.image_r= ootfs, True) *** 0136:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 self.pm =3D OpkgPM(d, 0137:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0self.image_rootfs, 0138:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0self.opkg_conf, 0139:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0self.pkg_archs) 0140:=C2=A0 =C2=A0 =C2=A0 =C2=A0 else: File: '/opt/oe/yocto/kirkstone/oe-core/meta/lib/oe/package_manager/ipk/__in= it__. py', lineno: 175, function: __init__ 0171:=C2=A0 =C2=A0 =C2=A0 =C2=A0 self.opkg_args =3D "--volatile-cache -f %s= -t %s -o %s " % (self .config_file, self.d.expand('${T}/ipktemp/') ,target_rootfs) 0172:=C2=A0 =C2=A0 =C2=A0 =C2=A0 self.opkg_args +=3D self.d.getVar("OPKG_AR= GS") 0173: 0174:=C2=A0 =C2=A0 =C2=A0 =C2=A0 if prepare_index: *** 0175:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 create_packages_dir(self= .d, self.deploy_dir, d.getVar("DEP LOY_DIR_IPK"), "package_write_ipk", filterbydependencies) 0176: 0177:=C2=A0 =C2=A0 =C2=A0 =C2=A0 self.opkg_dir =3D oe.path.join(target_root= fs, self.d.getVar('OPK GLIBDIR'), "opkg") 0178:=C2=A0 =C2=A0 =C2=A0 =C2=A0 bb.utils.mkdirhier(self.opkg_dir) 0179: File: '/opt/oe/yocto/kirkstone/oe-core/meta/lib/oe/package_manager/__init__= .py', lineno: 525, function: create_packages_dir 0521:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 if destdir not= in seendirs: 0522:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = bb.utils.mkdirhier(destdir) 0523:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = seendirs.add(destdir) 0524:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 try: *** 0525:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 os.link(l, dest) 0526:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 except OSError= as err: 0527:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = if err.errno =3D=3D errno.EXDEV: 0528:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 bb.utils.copyfile(l, dest) 0529:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = else: Exception: FileNotFoundError: [Errno 2] No such file or directory: '/ssd/op= t/oe/yocto/kirkstone/build-weston/tmp-glibc/deploy/ipk/core2-64/libudev1_1.= 0.2-r1_core2-64.ipk' -> '/ssd/opt/oe/yocto/kirkstone/build-weston/tmp-glibc= /work/generic64-oe-linux/sollinux-ble-weston/1.0-r0/oe-rootfs-repo/core2-64= /libudev1_1.0.2-r1_core2-64.ipk' --08DPZG4PdNYAOpRd1M2i Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hi all,

I added a new recipe for libudev-zero, which provides a = minimal daemon-less udev implementation. The recipe works, but has an issue= that pops up regularly where it causes an exception during rootfs:
Exception: FileNotFoundError: [Errno 2] No such file or directory: '/s= sd/opt/oe/yocto/kirkstone/build-weston/tmp-glibc/deploy/ipk/core2-64/libude= v1_1.0.2-r1_core2-64.ipk' -> '/ssd/opt/oe/yocto/kirkstone/build-weston/t= mp-glibc/work/generic64-oe-linux/sollinux-ble-weston/1.0-r0/oe-rootfs-repo/= core2-64/libudev1_1.0.2-r1_core2-64.ipk'

It seems like for some reason the ipk has been removed from depl= oy/ipk. To recover from this, a 'bitbake -c clean libudev-zero' will restor= e things the next time the rootfs is run.

Does anyone have an id= ea what could cause this? Appended below is the recipe, and the full error = message.

Cheers,

     Rob

<= br />libudev-zero_1.0.2.bb:
DESCRIPTION =3D "Daemon-less libudev replacement"
SECTION =3D "base"
LICENSE=3D"ISC"
LIC_FILES_CHKSUM =3D "file://LICENSE;md5=3D09eac32a84c5d70c105cbfce173= a161d"
 
PR =3D "r1"
SRCREV =3D "04a727df50fde3f69127aed4bc48e6cff5430175"
SRC_URI =3D "git://github.com/illiliti/${BPN};branch=3Dmaster;protocol= =3Dhttps"
 
SRC_URI[sha256sum] =3D "29dff942cab9519994fb92ba6407f57e08d3dd6e6c0b86= bb93d7b1d681994ff8"
 
PROVIDES =3D "udev"
 
inherit features_check
 
CONFLICT_DISTRO_FEATURES =3D "systemd"
 
S =3D "${WORKDIR}/git"
 
PACKAGES +=3D "${PN}-netlink"
FILES:${PN} =3D "${libdir}"
FILES:${PN}-netlink =3D "${bindir}"
 
RPROVIDES:${PN} =3D "hotplug udev"
 
do_configure:prepend() {
    sed -i 's;PREFIX =3D /usr/local;PREFIX =3D /usr;' ${S}/M= akefile
}
 
do_compile:append() {
    $CCLD $LDFLAGS -o contrib/netlink-forward contrib/helper= .c
}
 
do_install() {
    oe_runmake install DESTDIR=3D${D}
 
    install -d ${D}${bindir}
    install -m 755 contrib/netlink-forward ${D}${bindir}
}



Error message:
ERROR: sollinux-ble-weston-1.0-r0 do_rootfs: Error executing a python = function in exec_func_python() autogenerated:
 
The stack trace of python calls that resulted in this exception/failur= e was:
File: 'exec_func_python() autogenerated', lineno: 2, function: <mod= ule>
     0001:
 *** 0002:do_rootfs(d)
     0003:
File: '/opt/oe/yocto/kirkstone/oe-core/meta/classes/image.bbclass', li= neno: 255,
 function: do_rootfs
     0251:    progress_reporter.next_stage()<= /div>
     0252:
     0253:    # generate rootfs
     0254:    d.setVarFlag('REPRODUCIBLE_TIME= STAMP_ROOTFS', 'export', '1')
 *** 0255:    create_rootfs(d, progress_reporter=3Dprog= ress_reporter, logcatcher=3Dl
ogcatcher)
     0256:
     0257:    progress_reporter.finish()
     0258:}
     0259:do_rootfs[dirs] =3D "${TOPDIR}"
File: '/opt/oe/yocto/kirkstone/oe-core/meta/lib/oe/rootfs.py', lineno:= 381, func
tion: create_rootfs
     0377:
     0378:    img_type =3D d.getVar('IMAGE_PK= GTYPE')
     0379:
     0380:    cls =3D get_class_for_type(img_= type)
 *** 0381:    cls(d, manifest_dir, progress_reporter, l= ogcatcher).create()
     0382:    os.environ.clear()
     0383:    os.environ.update(env_bkp)
     0384:
     0385:
File: '/opt/oe/yocto/kirkstone/oe-core/meta/lib/oe/package_manager/ipk= /rootfs.py
', lineno: 136, function: __init__
     0132:
     0133:        self.inc_opkg_ima= ge_gen =3D self.d.getVar('INC_IPK_IMAGE_GEN') o
r ""
     0134:        if self._remove_o= ld_rootfs():
     0135:            bb.= utils.remove(self.image_rootfs, True)
 *** 0136:            self.pm =3D O= pkgPM(d,
     0137:            &nb= sp;                self.image_rootf= s,
     0138:            &nb= sp;                self.opkg_conf,<= /div>
     0139:            &nb= sp;                self.pkg_archs)<= /div>
     0140:        else:
File: '/opt/oe/yocto/kirkstone/oe-core/meta/lib/oe/package_manager/ipk= /__init__.
py', lineno: 175, function: __init__
     0171:        self.opkg_args = =3D "--volatile-cache -f %s -t %s -o %s " % (self
.config_file, self.d.expand('${T}/ipktemp/') ,target_rootfs)
     0172:        self.opkg_args += =3D self.d.getVar("OPKG_ARGS")
     0173:
     0174:        if prepare_index:=
 *** 0175:            create_packag= es_dir(self.d, self.deploy_dir, d.getVar("DEP
LOY_DIR_IPK"), "package_write_ipk", filterbydependencies)
     0176:
     0177:        self.opkg_dir =3D= oe.path.join(target_rootfs, self.d.getVar('OPK
GLIBDIR'), "opkg")
     0178:        bb.utils.mkdirhie= r(self.opkg_dir)
     0179:
File: '/opt/oe/yocto/kirkstone/oe-core/meta/lib/oe/package_manager/__i= nit__.py',
 lineno: 525, function: create_packages_dir
     0521:            &nb= sp;   if destdir not in seendirs:
     0522:            &nb= sp;       bb.utils.mkdirhier(destdir)
     0523:            &nb= sp;       seendirs.add(destdir)
     0524:            &nb= sp;   try:
 *** 0525:               =     os.link(l, dest)
     0526:            &nb= sp;   except OSError as err:
     0527:            &nb= sp;       if err.errno =3D=3D errno.EXDEV:
     0528:            &nb= sp;           bb.utils.copyfile(l, dest)
     0529:            &nb= sp;       else:
Exception: FileNotFoundError: [Errno 2] No such file or directory: '/s= sd/opt/oe/yocto/kirkstone/build-weston/tmp-glibc/deploy/ipk/core2-64/libude= v1_1.0.2-r1_core2-64.ipk' -> '/ssd/opt/oe/yocto/kirkstone/build-weston/t= mp-glibc/work/generic64-oe-linux/sollinux-ble-weston/1.0-r0/oe-rootfs-repo/= core2-64/libudev1_1.0.2-r1_core2-64.ipk'
 
--08DPZG4PdNYAOpRd1M2i--