On Mon, Jul 06, 2020 at 04:01:27PM +0200, Mircea Ciocan wrote:
> On 06.07.20 15:24, Mircea Ciocan wrote:
> > While compiling an image with RAUC included, the squashfs-tools is
> > selected as a dependency and it has a different idea about /media
> > directory permissions, don't know which is "right" in this case:
> > 
> > Configuring squashfs-tools.
> > 
> > Incompatible ownership or permissions for '/media':
> > rootfs: 0.0 0755 (implicit from /media/sd)
> > rootfs: 0.0 0777
> > 
> > One of these packages must be fixed!
> > ./ptxdist-2020.07.0/rules/image-root-tgz.make:29: recipe for target
> > './platform-MCIMX6ULL-EVK/images/root.tgz' failed
> > make: *** [./platform-MCIMX6ULL-EVK/images/root.tgz] Error 1
> > 
> > Any idea to solve this "the right way" appreciated.
> > 
> > 
> > Best regards,
> > 
> > Mircea
> 
> A bit more details on the issue:
> 
> I was scratching my head on whom actually install this stuff, but it seem
> that is a ptxconf variable related to rootfs configuration:
> PTXCONF_ROOTFS_MEDIA2="sd"
> 
> This seem to be in the "core" of ptxdist, how can one specify the
> permissions and where could this be solved ?


This is a bug in the rootfs rule. You have:

PTXCONF_ROOTFS_MEDIA1="something"
PTXCONF_ROOTFS_MEDIA2="sd"
PTXCONF_ROOTFS_MEDIA3=""

And PTXCONF_ROOTFS_MEDIA4 and later are not set at all. However, the
actual check looks like this:

ifneq ($(PTXCONF_ROOTFS_MEDIA4),"")
        @$(call install_copy, rootfs, 0, 0, 0777, 
/media/$(PTXCONF_ROOTFS_MEDIA4))
endif

So $(PTXCONF_ROOTFS_MEDIA4) is an empty string and not '""', so this
results in:

        @$(call install_copy, rootfs, 0, 0, 0777, /media/)

So /media/ is first implicitly created with '0755' by /media/sd and then
explicitly with '0777' by the rule above. This results in the conflict you
get. I've queued a patch that changes the condition for media subdirs to:

ifneq ($(call remove_quotes,$(PTXCONF_ROOTFS_MEDIA4)),)

This should hit master soon. You can either copy the rootfs.make to your
BSP and make the same change, or you could set all remaining
PTXCONF_ROOTFS_MEDIA* to 'sd' as well. This way none of them hit the bug
and creating the same directory multiple times is not a problem.

Michael

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
ptxdist mailing list
[email protected]
To unsubscribe, send a mail with subject "unsubscribe" to 
[email protected]

Reply via email to