Skip to content

Instantly share code, notes, and snippets.

@rpcme
Created April 1, 2021 12:47
Show Gist options
  • Save rpcme/808f79afd42abdc0d3245acc7063f491 to your computer and use it in GitHub Desktop.
Save rpcme/808f79afd42abdc0d3245acc7063f491 to your computer and use it in GitHub Desktop.
do_rootfs error
WARNING: core-image-minimal-1.0-r0 do_rootfs: copyfile: failed to chown/chmod /build-output/work/raspberrypi4_64-poky-linux/core-image-minimal/1.0-r0/intercept_scripts-07effacab75b8c174c2289a1016a957b333b0d0ba0fcdfe8064c7129b808ecd2/delay_to_first_boot ([Errno 1] Operation not permitted: '/build-output/work/raspberrypi4_64-poky-linux/core-image-minimal/1.0-r0/intercept_scripts-07effacab75b8c174c2289a1016a957b333b0d0ba0fcdfe8064c7129b808ecd2/delay_to_first_boot')
WARNING: core-image-minimal-1.0-r0 do_rootfs: copyfile: failed to chown/chmod /build-output/work/raspberrypi4_64-poky-linux/core-image-minimal/1.0-r0/intercept_scripts-07effacab75b8c174c2289a1016a957b333b0d0ba0fcdfe8064c7129b808ecd2/postinst_intercept ([Errno 1] Operation not permitted: '/build-output/work/raspberrypi4_64-poky-linux/core-image-minimal/1.0-r0/intercept_scripts-07effacab75b8c174c2289a1016a957b333b0d0ba0fcdfe8064c7129b808ecd2/postinst_intercept')
WARNING: core-image-minimal-1.0-r0 do_rootfs: copyfile: failed to chown/chmod /build-output/work/raspberrypi4_64-poky-linux/core-image-minimal/1.0-r0/intercept_scripts-07effacab75b8c174c2289a1016a957b333b0d0ba0fcdfe8064c7129b808ecd2/update_desktop_database ([Errno 1] Operation not permitted: '/build-output/work/raspberrypi4_64-poky-linux/core-image-minimal/1.0-r0/intercept_scripts-07effacab75b8c174c2289a1016a957b333b0d0ba0fcdfe8064c7129b808ecd2/update_desktop_database')
WARNING: core-image-minimal-1.0-r0 do_rootfs: copyfile: failed to chown/chmod /build-output/work/raspberrypi4_64-poky-linux/core-image-minimal/1.0-r0/intercept_scripts-07effacab75b8c174c2289a1016a957b333b0d0ba0fcdfe8064c7129b808ecd2/update_font_cache ([Errno 1] Operation not permitted: '/build-output/work/raspberrypi4_64-poky-linux/core-image-minimal/1.0-r0/intercept_scripts-07effacab75b8c174c2289a1016a957b333b0d0ba0fcdfe8064c7129b808ecd2/update_font_cache')
WARNING: core-image-minimal-1.0-r0 do_rootfs: copyfile: failed to chown/chmod /build-output/work/raspberrypi4_64-poky-linux/core-image-minimal/1.0-r0/intercept_scripts-07effacab75b8c174c2289a1016a957b333b0d0ba0fcdfe8064c7129b808ecd2/update_gio_module_cache ([Errno 1] Operation not permitted: '/build-output/work/raspberrypi4_64-poky-linux/core-image-minimal/1.0-r0/intercept_scripts-07effacab75b8c174c2289a1016a957b333b0d0ba0fcdfe8064c7129b808ecd2/update_gio_module_cache')
WARNING: core-image-minimal-1.0-r0 do_rootfs: copyfile: failed to chown/chmod /build-output/work/raspberrypi4_64-poky-linux/core-image-minimal/1.0-r0/intercept_scripts-07effacab75b8c174c2289a1016a957b333b0d0ba0fcdfe8064c7129b808ecd2/update_gtk_icon_cache ([Errno 1] Operation not permitted: '/build-output/work/raspberrypi4_64-poky-linux/core-image-minimal/1.0-r0/intercept_scripts-07effacab75b8c174c2289a1016a957b333b0d0ba0fcdfe8064c7129b808ecd2/update_gtk_icon_cache')
WARNING: core-image-minimal-1.0-r0 do_rootfs: copyfile: failed to chown/chmod /build-output/work/raspberrypi4_64-poky-linux/core-image-minimal/1.0-r0/intercept_scripts-07effacab75b8c174c2289a1016a957b333b0d0ba0fcdfe8064c7129b808ecd2/update_gtk_immodules_cache ([Errno 1] Operation not permitted: '/build-output/work/raspberrypi4_64-poky-linux/core-image-minimal/1.0-r0/intercept_scripts-07effacab75b8c174c2289a1016a957b333b0d0ba0fcdfe8064c7129b808ecd2/update_gtk_immodules_cache')
WARNING: core-image-minimal-1.0-r0 do_rootfs: copyfile: failed to chown/chmod /build-output/work/raspberrypi4_64-poky-linux/core-image-minimal/1.0-r0/intercept_scripts-07effacab75b8c174c2289a1016a957b333b0d0ba0fcdfe8064c7129b808ecd2/update_mime_database ([Errno 1] Operation not permitted: '/build-output/work/raspberrypi4_64-poky-linux/core-image-minimal/1.0-r0/intercept_scripts-07effacab75b8c174c2289a1016a957b333b0d0ba0fcdfe8064c7129b808ecd2/update_mime_database')
WARNING: core-image-minimal-1.0-r0 do_rootfs: copyfile: failed to chown/chmod /build-output/work/raspberrypi4_64-poky-linux/core-image-minimal/1.0-r0/intercept_scripts-07effacab75b8c174c2289a1016a957b333b0d0ba0fcdfe8064c7129b808ecd2/update_pixbuf_cache ([Errno 1] Operation not permitted: '/build-output/work/raspberrypi4_64-poky-linux/core-image-minimal/1.0-r0/intercept_scripts-07effacab75b8c174c2289a1016a957b333b0d0ba0fcdfe8064c7129b808ecd2/update_pixbuf_cache')
WARNING: core-image-minimal-1.0-r0 do_rootfs: copyfile: failed to chown/chmod /build-output/work/raspberrypi4_64-poky-linux/core-image-minimal/1.0-r0/intercept_scripts-07effacab75b8c174c2289a1016a957b333b0d0ba0fcdfe8064c7129b808ecd2/update_udev_hwdb ([Errno 1] Operation not permitted: '/build-output/work/raspberrypi4_64-poky-linux/core-image-minimal/1.0-r0/intercept_scripts-07effacab75b8c174c2289a1016a957b333b0d0ba0fcdfe8064c7129b808ecd2/update_udev_hwdb')
ERROR: core-image-minimal-1.0-r0 do_rootfs: Postinstall scriptlets of ['libglib-2.0-0', 'udev-hwdb'] have failed. If the intention is to defer them to first boot,
then please place them into pkg_postinst_ontarget_${PN} ().
Deferring to first boot via 'exit 1' is no longer supported.
@chuckwolber
Copy link

chuckwolber commented May 5, 2021

Happened to me on Hardknott today, latest commit.

I traced the failure down to a chown, which lead me down the pseudo (formerly fakeroot) route. I did a devshell -c on my image, and I saw that the intercept_scripts directory in the image work directory is not part of the set of directories covered by pseudo. When I checked my environment, I was able to clearly see that the intercept-scripts directory was listed as a member of the PSEUDO_IGNORE_PATHS variable. After poking around the code a bit, I believe this is the commit that is causing the breakage:

https://git.openembedded.org/openembedded-core/commit/meta/classes/image.bbclass?id=9463be2292b942a1072eea88881b9644e55aadb9

And looking at this file: https://git.openembedded.org/openembedded-core/tree/meta/lib/oe/package_manager/__init__.py?h=hardknott#n173

You can clearly see where the intercept_scripts directory is named on line 178, and line 192 is where the copyFile utility is used to copy the intercept script into place. The chown in the copyFile utility is what is failing, and it is because of the change made to image.bbclass in the commit above.

I do not know if this is a bug, or something is going wrong. I have reported this to the Yocto mailing list.

Edit: If you add this to your image file, it works around the problem:

python () {                                                                        
    pseudo_ignore_paths = d.getVar('PSEUDO_IGNORE_PATHS')                          
    result = ','.join([x for x in pseudo_ignore_paths.split(',') if "intercept_scripts" not in x]) 
    d.setVar('PSEUDO_IGNORE_PATHS', result)                                        
} 

Edit: After discussing this with the Yocto team, it appears that the problem is due to the ownership of my poky repository clone. They are testing a code patch to fix the issue.

@rpurdie
Copy link

rpurdie commented May 6, 2021

I think this is where you have a layer checkout owned by root. There is a potential fix in master now: http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=eff192abe2ee43ebf981bafbb7fca8602ebdcf0c

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment