mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Michael Olbrich <m.olbrich@pengutronix.de>
To: ptxdist@pengutronix.de
Subject: Re: [ptxdist] Clash between rootfs and squashfs-tools packages directory permissions
Date: Mon, 6 Jul 2020 16:20:33 +0200	[thread overview]
Message-ID: <20200706142033.GB19479@pengutronix.de> (raw)
In-Reply-To: <22ba49b7-5cbc-5a38-8aee-8c069a414034@ppc-ag.de>

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
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de

      reply	other threads:[~2020-07-06 14:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-06 13:24 Mircea Ciocan
2020-07-06 14:01 ` Mircea Ciocan
2020-07-06 14:20   ` Michael Olbrich [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200706142033.GB19479@pengutronix.de \
    --to=m.olbrich@pengutronix.de \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox