mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] rootfs: /dev/null creation fails with 'Operation not permitted'
@ 2021-09-30  7:59 Koch, Alexander
  2021-09-30 10:44 ` Michael Olbrich
  0 siblings, 1 reply; 4+ messages in thread
From: Koch, Alexander @ 2021-09-30  7:59 UTC (permalink / raw)
  To: ptxdist

Hi #PTXdist,

I'm currently facing the issue that all my PTXdist builds fail in 
'rootfs.make' during the creation of the /dev/null device node:


--------------------------------------( ... )--

install directory:
   dir=/dev
   owner=0
   group=0
   permissions=0755

install device node:
   owner=0
   group=0
   permissions=0666
   type=c
   major=1
   minor=3
   name=/dev/null

mknod: /mnt/work/ptxdist/platform-pm3/packages/rootfs.tmp/dev/null: 
Operation not permitted
Error: install_node failed!

xpkg_finish: failed.

make: *** [/usr/lib/ptxdist-2020.01.0/rules/rootfs.make:93: 
/mnt/work/ptxdist/platform-pm3/state/rootfs.targetinstall] Error 1

------------------------------------------------


As you can see I'm using ptxdist-2020.01.0 for this but I've taken a 
look at the current release code base and can't see any substantial 
changes to the device node creation part in `install_node()`. So I doubt 
it's an issue of that particular version.

I've also checked I'm not using any fancy mount options for the 
filesystem I'm building on (btrfs) and I do not use SELinux/AppArmor or 
any other restriction framework.

Builds used to work fine for years, so I'm running out of clues what 
could be causing this issue.


Does anybody have an idea what I could check?


Thanks in advance,

Alex
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de

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

* Re: [ptxdist] rootfs: /dev/null creation fails with 'Operation not permitted'
  2021-09-30  7:59 [ptxdist] rootfs: /dev/null creation fails with 'Operation not permitted' Koch, Alexander
@ 2021-09-30 10:44 ` Michael Olbrich
  2021-09-30 12:00   ` Koch, Alexander
  0 siblings, 1 reply; 4+ messages in thread
From: Michael Olbrich @ 2021-09-30 10:44 UTC (permalink / raw)
  To: Koch, Alexander; +Cc: ptxdist

On Thu, Sep 30, 2021 at 07:59:45AM +0000, Koch, Alexander wrote:
> Hi #PTXdist,
> 
> I'm currently facing the issue that all my PTXdist builds fail in 
> 'rootfs.make' during the creation of the /dev/null device node:
> 
> 
> --------------------------------------( ... )--
> 
> install directory:
>    dir=/dev
>    owner=0
>    group=0
>    permissions=0755
> 
> install device node:
>    owner=0
>    group=0
>    permissions=0666
>    type=c
>    major=1
>    minor=3
>    name=/dev/null
> 
> mknod: /mnt/work/ptxdist/platform-pm3/packages/rootfs.tmp/dev/null: 
> Operation not permitted
> Error: install_node failed!
> 
> xpkg_finish: failed.
> 
> make: *** [/usr/lib/ptxdist-2020.01.0/rules/rootfs.make:93: 
> /mnt/work/ptxdist/platform-pm3/state/rootfs.targetinstall] Error 1
> 
> ------------------------------------------------
> 
> 
> As you can see I'm using ptxdist-2020.01.0 for this but I've taken a 
> look at the current release code base and can't see any substantial 
> changes to the device node creation part in `install_node()`. So I doubt 
> it's an issue of that particular version.
> 
> I've also checked I'm not using any fancy mount options for the 
> filesystem I'm building on (btrfs) and I do not use SELinux/AppArmor or 
> any other restriction framework.
> 
> Builds used to work fine for years, so I'm running out of clues what 
> could be causing this issue.
> 
> 
> Does anybody have an idea what I could check?

mknod is run with fakeroot specifically to avoid permissions errors like
this. So either fakeroot is not working properly or there is some bad
interaction with btrfs.
Can you run mknod with platform-*/sysroot-host/bin/fakeroot to see if it
works manually?
Try to create a device file on the same filesystem but also on a tmpfs.
Do you get the same errors?

Regards,
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


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

* Re: [ptxdist] rootfs: /dev/null creation fails with 'Operation not permitted'
  2021-09-30 10:44 ` Michael Olbrich
@ 2021-09-30 12:00   ` Koch, Alexander
  2021-09-30 13:10     ` Koch, Alexander
  0 siblings, 1 reply; 4+ messages in thread
From: Koch, Alexander @ 2021-09-30 12:00 UTC (permalink / raw)
  To: ptxdist

Am Thu, 30 Sep 2021 12:44:34 +0200
schrieb Michael Olbrich <m.olbrich@pengutronix.de>:

> On Thu, Sep 30, 2021 at 07:59:45AM +0000, Koch, Alexander wrote:
> > Hi #PTXdist,
> > 
> > I'm currently facing the issue that all my PTXdist builds fail in 
> > 'rootfs.make' during the creation of the /dev/null device node:
> > 
> > 
> > --------------------------------------( ... )--
> > 
> > install directory:
> >    dir=/dev
> >    owner=0
> >    group=0
> >    permissions=0755
> > 
> > install device node:
> >    owner=0
> >    group=0
> >    permissions=0666
> >    type=c
> >    major=1
> >    minor=3
> >    name=/dev/null
> > 
> > mknod: /mnt/work/ptxdist/platform-pm3/packages/rootfs.tmp/dev/null: 
> > Operation not permitted
> > Error: install_node failed!
> > 
> > xpkg_finish: failed.
> > 
> > make: *** [/usr/lib/ptxdist-2020.01.0/rules/rootfs.make:93: 
> > /mnt/work/ptxdist/platform-pm3/state/rootfs.targetinstall] Error 1
> > 
> > ------------------------------------------------
> > 
> > 
> > As you can see I'm using ptxdist-2020.01.0 for this but I've taken
> > a look at the current release code base and can't see any
> > substantial changes to the device node creation part in
> > `install_node()`. So I doubt it's an issue of that particular
> > version.
> > 
> > I've also checked I'm not using any fancy mount options for the 
> > filesystem I'm building on (btrfs) and I do not use
> > SELinux/AppArmor or any other restriction framework.
> > 
> > Builds used to work fine for years, so I'm running out of clues
> > what could be causing this issue.
> > 
> > 
> > Does anybody have an idea what I could check?  
> 
> mknod is run with fakeroot specifically to avoid permissions errors
> like this. So either fakeroot is not working properly or there is
> some bad interaction with btrfs.
> Can you run mknod with platform-*/sysroot-host/bin/fakeroot to see if
> it works manually?
> Try to create a device file on the same filesystem but also on a
> tmpfs. Do you get the same errors?

Thanks for the hint with `fakeroot`.

It seems that one is not working at all, I get the exact same
permission error as when running without it.

And I do even get it on a fresh tmpfs:

  $ mkdir /tmp/test-fs
  $ sudo mount -t tmpfs -o dev none /tmp/test-fs
  $ ./platform-pm3/sysroot-host/bin/fakeroot -- mknod \
      /tmp/test-fs/null c 1 3
  mknod: /tmp/test-fs/null: Operation not permitted


Maybe I should backport the latest 'fakeroot' package into my PTXdist
project?

I've also noticed on our buildserver everything still works fine so
it's definitely an issue with my local machine. It's an up-to-date Arch
Linux so maybe there's something new that breaks `fakeroot`...


Cheers,

Alex
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de

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

* Re: [ptxdist] rootfs: /dev/null creation fails with 'Operation not permitted'
  2021-09-30 12:00   ` Koch, Alexander
@ 2021-09-30 13:10     ` Koch, Alexander
  0 siblings, 0 replies; 4+ messages in thread
From: Koch, Alexander @ 2021-09-30 13:10 UTC (permalink / raw)
  To: ptxdist

Am Thu, 30 Sep 2021 12:00:50 +0000
schrieb "Koch, Alexander" <akoch@initse.com>:

> Am Thu, 30 Sep 2021 12:44:34 +0200
> schrieb Michael Olbrich <m.olbrich@pengutronix.de>:
> 
> > On Thu, Sep 30, 2021 at 07:59:45AM +0000, Koch, Alexander wrote:  
> > > Hi #PTXdist,
> > > 
> > > I'm currently facing the issue that all my PTXdist builds fail in 
> > > 'rootfs.make' during the creation of the /dev/null device node:
> > > 
> > > 
> > > --------------------------------------( ... )--
> > > 
> > > install directory:
> > >    dir=/dev
> > >    owner=0
> > >    group=0
> > >    permissions=0755
> > > 
> > > install device node:
> > >    owner=0
> > >    group=0
> > >    permissions=0666
> > >    type=c
> > >    major=1
> > >    minor=3
> > >    name=/dev/null
> > > 
> > > mknod:
> > > /mnt/work/ptxdist/platform-pm3/packages/rootfs.tmp/dev/null:
> > > Operation not permitted Error: install_node failed!
> > > 
> > > xpkg_finish: failed.
> > > 
> > > make: *** [/usr/lib/ptxdist-2020.01.0/rules/rootfs.make:93: 
> > > /mnt/work/ptxdist/platform-pm3/state/rootfs.targetinstall] Error 1
> > > 
> > > ------------------------------------------------
> > > 
> > > 
> > > As you can see I'm using ptxdist-2020.01.0 for this but I've taken
> > > a look at the current release code base and can't see any
> > > substantial changes to the device node creation part in
> > > `install_node()`. So I doubt it's an issue of that particular
> > > version.
> > > 
> > > I've also checked I'm not using any fancy mount options for the 
> > > filesystem I'm building on (btrfs) and I do not use
> > > SELinux/AppArmor or any other restriction framework.
> > > 
> > > Builds used to work fine for years, so I'm running out of clues
> > > what could be causing this issue.
> > > 
> > > 
> > > Does anybody have an idea what I could check?    
> > 
> > mknod is run with fakeroot specifically to avoid permissions errors
> > like this. So either fakeroot is not working properly or there is
> > some bad interaction with btrfs.
> > Can you run mknod with platform-*/sysroot-host/bin/fakeroot to see
> > if it works manually?
> > Try to create a device file on the same filesystem but also on a
> > tmpfs. Do you get the same errors?  
> 
> Thanks for the hint with `fakeroot`.
> 
> It seems that one is not working at all, I get the exact same
> permission error as when running without it.
> 
> And I do even get it on a fresh tmpfs:
> 
>   $ mkdir /tmp/test-fs
>   $ sudo mount -t tmpfs -o dev none /tmp/test-fs
>   $ ./platform-pm3/sysroot-host/bin/fakeroot -- mknod \
>       /tmp/test-fs/null c 1 3
>   mknod: /tmp/test-fs/null: Operation not permitted
> 
> 
> Maybe I should backport the latest 'fakeroot' package into my PTXdist
> project?
> 

Confirmed: upgrading 'host-fakeroot' to the latest package version
1.25.3 fixes the issue.

Upstream (as well as Arch) has 1.26 but it seems that's not a trivial
upgrade so I'll stick with 1.25.3.

Thanks again for the hint!


Best regards,

Alex
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de

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

end of thread, other threads:[~2021-09-30 13:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-30  7:59 [ptxdist] rootfs: /dev/null creation fails with 'Operation not permitted' Koch, Alexander
2021-09-30 10:44 ` Michael Olbrich
2021-09-30 12:00   ` Koch, Alexander
2021-09-30 13:10     ` Koch, Alexander

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox