All of lore.kernel.org
 help / color / mirror / Atom feed
* Can't build gatesgarth after PSEUDO_IGNORE_PATHS change in poky
@ 2021-03-24 23:44 Ramsay, Lincoln
  2021-03-30  4:19 ` Ramsay, Lincoln
  0 siblings, 1 reply; 2+ messages in thread
From: Ramsay, Lincoln @ 2021-03-24 23:44 UTC (permalink / raw)
  To: yocto

Hi,

The patch to add intercept_scripts to PSEUDO_IGNORE_PATHS breaks all my builds. This is commit edc8051bc09648433ec16a5b6a8ae0b87f50d9d6 on the gatesgarth branch.

I get a large number of warnings:

WARNING: og-image-consoleserver-1.0-r0 do_rootfs: copyfile: failed to chown/chmod /home/build/work/build/ogpuma/tmp-glibc/work/ogpuma-og-linux/og-image-consoleserver/1.0-r0/intercept_scripts-5ec94d6f75025284385558de3938c138bea2e7e9d09944e9dd41e4719d513fc8/update_udev_hwdb ([Errno 1] Operation not permitted: '/home/build/work/build/ogpuma/tmp-glibc/work/ogpuma-og-linux/og-image-consoleserver/1.0-r0/intercept_scripts-5ec94d6f75025284385558de3938c138bea2e7e9d09944e9dd41e4719d513fc8/update_udev_hwdb')

More significantly, the copy of intercept_scripts are not executable so I get an error.

ERROR: og-image-consoleserver-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.

The actual failing command looks like this:

+ /home/build/work/build/ogpuma/tmp-glibc/work/ogpuma-og-linux/og-image-consoleserver/1.0-r0/intercept_scripts-5ec94d6f75025284385558de3938c138bea2e7e9d09944e9dd41e4719d513fc8/postinst_intercept update_udev_hwdb udev-hwdb mlprefix= binprefix= rootlibexecdir=/lib PREFERRED_PROVIDER_udev=systemd
/var/tmp/rpm-tmp.k3LlRZ: line 5: /home/build/work/build/ogpuma/tmp-glibc/work/ogpuma-og-linux/og-image-consoleserver/1.0-r0/intercept_scripts-5ec94d6f75025284385558de3938c138bea2e7e9d09944e9dd41e4719d513fc8/postinst_intercept: Permission denied

If I update PSEUDO_IGNORE_PATHS in image.bbclass, I can once again build.

-PSEUDO_IGNORE_PATHS .= ",${WORKDIR}/intercept_scripts,${WORKDIR}/oe-rootfs-repo"
+PSEUDO_IGNORE_PATHS .= ",${WORKDIR}/oe-rootfs-repo"


I am not sure if it's possible to work around this using a local.conf mod... I tried

PSEUDO_IGNORE_PATHS_remove = ",${WORKDIR}/intercept_scripts"

but it didn't work, so the only options I have right now are changing poky (ew) or not updating past this commit.


I build under Docker (with an Ubuntu 18.04 base), in case that is relevant.

Lincoln

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Can't build gatesgarth after PSEUDO_IGNORE_PATHS change in poky
  2021-03-24 23:44 Can't build gatesgarth after PSEUDO_IGNORE_PATHS change in poky Ramsay, Lincoln
@ 2021-03-30  4:19 ` Ramsay, Lincoln
  0 siblings, 0 replies; 2+ messages in thread
From: Ramsay, Lincoln @ 2021-03-30  4:19 UTC (permalink / raw)
  To: yocto

Hi,

Just to follow up on this, I eventually figured out the root cause, but I still don't understand why PSEUDO_IGNORE_PATHS was allowing it to work...

When I setup my PC, I created the user and then changed the UID of the user (for NFS auth reasons). The end result of this is that my user has UID 1111 but GID 1000.

I do all of my building in Docker and a user is created that (in theory) matches my real user so that ownership for bind-mounted locations “just works”. However, the in-Docker user has UID 1111 but GID 1111.

When bb.utils.copyfile tries to copy files, it is copying from a source directory that is 1111/1000 into a target directory that would be 1111/1111. I still don’t quite know how, but that seems to be behind the chmod failing.

The chmod failing is (as already noted) why the +x is lost on the postinstall_intercept script, which is why I got failing builds instead of just the chmod warnings.

I have fixed this by updating my Docker creation scripts (to ensure the in-Docker user has GID 1000) and to find and update all the files with GID 1111 to have GID 1000 instead.

find . -gid 1111 -print0 | xargs -0 chgrp -h 1000

I can once again build without patching poky :)

Lincoln

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-03-30  4:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-24 23:44 Can't build gatesgarth after PSEUDO_IGNORE_PATHS change in poky Ramsay, Lincoln
2021-03-30  4:19 ` Ramsay, Lincoln

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.