Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Strange MAKEDEV problem



On 21 March 2012 10:05, Chavdar Ivanov <ci4ic4%gmail.com@localhost> wrote:
> Hi,

More weirdness...

I decided to rebuild; this failed with
===> Build platform:      NetBSD 6.99.4 amd64
===> HOST_SH:             /bin/sh
===> TOOLDIR path:        /usr/obj/auto-current/tools
===> DESTDIR path:        /usr/obj/auto-current/destdir/amd64
===> RELEASEDIR path:     /usr/obj/auto-current/releasedir
===> Updated makewrapper: /usr/obj/auto-current/tools/bin/nbmake-amd64
./build.sh: /usr/obj/auto-current/tools/bin/nbmake-amd64: permission denied

ERROR: Failed to make release
*** BUILD ABORTED ***
...

and indeed

 # ls -l /usr/obj/auto-current/tools/bin/nbmake-amd64
-rw-r--r--  1 root  wheel  1304 Mar 21 09:52
/usr/obj/auto-current/tools/bin/nbmake-amd64

but then:

root@support6 /devi # ls -l /usr/obj/auto-current/tools/bin/nbmake-amd64
-rw-r--r--  1 root  wheel  1304 Mar 21 09:52
/usr/obj/auto-current/tools/bin/nbmake-amd64
root@support6 /devi # chmod +x /usr/obj/auto-current/tools/bin/nbmake-amd64
root@support6 /devi # ls -l /usr/obj/auto-current/tools/bin/nbmake-amd64
-rw-r--r--  1 root  wheel  1304 Mar 21 09:52
/usr/obj/auto-current/tools/bin/nbmake-amd64
root@support6 /devi # chmod 755 /usr/obj/auto-current/tools/bin/nbmake-amd64
root@support6 /devi # ls -l /usr/obj/auto-current/tools/bin/nbmake-amd64
-rw-r--r--  1 root  wheel  1304 Mar 21 09:52
/usr/obj/auto-current/tools/bin/nbmake-amd64
root@support6 /devi # which chmod
/bin/chmod
root@support6 /devi # ls -l /bin/chmod
-r-xr-xr-x  1 root  wheel  11682 Mar 20 23:16 /bin/chmod*


No idea what is going on.

...

>
> On
>
>  # uname -a
> NetBSD support6 6.99.4 NetBSD 6.99.4 (MYDOMU) #5: Tue Mar 20 23:53:34
> GMT 2012  root@support6:/usr/src/sys/arch/amd64/compile/MYDOMU amd64
>
> using yesterday's XEN3_DOMU kernel (with MULTIPROCESSING, no
> DIAGNOSTICS and DEBUG) I get for some reason all the devices made with
> mode 000, as follows:
>
> -----
>
> root@support6 /devo # rm -r [a-z]*
> root@support6 /devo # ./MAKEDEV std
> root@support6 /devo # ls -l
> total 88
> -r-xr-xr-x  1 root  wheel   40279 Mar 21 09:37 MAKEDEV*
> -r-xr-xr-x  1 root  wheel    2549 May  1  2008 MAKEDEV.local*
> c---------  1 root  wheel   0,  0 Mar 21 09:53 console
> c---------  1 root  wheel   0,  1 Mar 21 09:53 constty
> c---------  1 root  kmem    4,  0 Mar 21 09:53 drum
> c---------  1 root  wheel   7,  0 Mar 21 09:53 klog
> c---------  1 root  kmem    2,  1 Mar 21 09:53 kmem
> c---------  1 root  wheel  85,  0 Mar 21 09:53 ksyms
> c---------  1 root  kmem    2,  0 Mar 21 09:53 mem
> c---------  1 root  wheel   2,  2 Mar 21 09:53 null
> c---------  1 root  wheel  22,  2 Mar 21 09:53 stderr
> c---------  1 root  wheel  22,  0 Mar 21 09:53 stdin
> c---------  1 root  wheel  22,  1 Mar 21 09:53 stdout
> c---------  1 root  wheel   1,  0 Mar 21 09:53 tty
> c---------  1 root  wheel   2, 12 Mar 21 09:53 zero
>
> etc. as if I have umask 777.
>
> If I use -m, I get:
>
> root@support6 /devi # rm [a-z]*
> root@support6 /devi # ./MAKEDEV -m /sbin/mknod std
> root@support6 /devi # ls -la
> total 96
> drwxr-xr-x   2 root  wheel     512 Mar 21 09:58 ./
> drwxr-xr-x  31 root  wheel    1024 Mar 21 09:57 ../
> -r-xr-xr-x   1 root  wheel   40017 Mar 21 09:57 MAKEDEV*
> -r-xr-xr-x   1 root  wheel    2549 Mar 21 09:57 MAKEDEV.local*
> crw-r--r--   1 root  wheel   0,  0 Mar 21 09:58 console
> crw-r--r--   1 root  wheel   0,  1 Mar 21 09:58 constty
> crw-r--r--   1 root  kmem    4,  0 Mar 21 09:58 drum
> crw-r--r--   1 root  wheel   7,  0 Mar 21 09:58 klog
> crw-r--r--   1 root  kmem    2,  1 Mar 21 09:58 kmem
> crw-r--r--   1 root  wheel  85,  0 Mar 21 09:58 ksyms
> ..
>
> which just follows the mask;
>
> with -t I get:
>
> root@support6 /devi # rm [a-z]*
> root@support6 /devi # ./MAKEDEV -t /usr/sbin/mtree  std
> root@support6 /devi # ls -la
> total 96
> drwxr-xr-x   2 root  wheel     512 Mar 21 09:59 ./
> drwxr-xr-x  31 root  wheel    1024 Mar 21 09:57 ../
> -r-xr-xr-x   1 root  wheel   40017 Mar 21 09:57 MAKEDEV*
> -r-xr-xr-x   1 root  wheel    2549 Mar 21 09:57 MAKEDEV.local*
> c---------   1 root  wheel   0,  0 Mar 21 09:59 console
> c---------   1 root  wheel   0,  1 Mar 21 09:59 constty
> c---------   1 root  kmem    4,  0 Mar 21 09:59 drum
> c---------   1 root  wheel   7,  0 Mar 21 09:59 klog
> c---------   1 root  kmem    2,  1 Mar 21 09:59 kmem
> ....
>
> just like with pax:
>
> root@support6 /devi # ./MAKEDEV -p /bin/pax  std
> root@support6 /devi # ls -l
> total 88
> -r-xr-xr-x  1 root  wheel   40017 Mar 21 09:57 MAKEDEV*
> -r-xr-xr-x  1 root  wheel    2549 Mar 21 09:57 MAKEDEV.local*
> c---------  1 root  wheel   0,  0 Mar 21 10:01 console
> c---------  1 root  wheel   0,  1 Mar 21 10:01 constty
> c---------  1 root  kmem    4,  0 Mar 21 10:01 drum
> c---------  1 root  wheel   7,  0 Mar 21 10:01 klog
> c---------  1 root  kmem    2,  1 Mar 21 10:01 kmem
>
>
> -----
>
> I tried to debug the script, but can't find any obvious reason.
> Perhaps some missing files in /etc/mtree ?
> --
>
> Chavdar
>
> ----



-- 
----


Home | Main Index | Thread Index | Old Index