From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from dude02.hi.pengutronix.de ([2001:67c:670:100:1d::28]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jsRyz-0003J6-GN for ptxdist@pengutronix.de; Mon, 06 Jul 2020 16:20:33 +0200 Received: from mol by dude02.hi.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1jsRyz-0005cW-89 for ptxdist@pengutronix.de; Mon, 06 Jul 2020 16:20:33 +0200 Date: Mon, 6 Jul 2020 16:20:33 +0200 From: Michael Olbrich Message-ID: <20200706142033.GB19479@pengutronix.de> References: <2730f7e5-d016-b9d2-ecfc-a2f6f858dbc5@ppc-ag.de> <22ba49b7-5cbc-5a38-8aee-8c069a414034@ppc-ag.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <22ba49b7-5cbc-5a38-8aee-8c069a414034@ppc-ag.de> Subject: Re: [ptxdist] Clash between rootfs and squashfs-tools packages directory permissions List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ptxdist-bounces@pengutronix.de Sender: "ptxdist" To: ptxdist@pengutronix.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