[Pkg-dkms-maint] Bug#810665: "/usr/sbin/dkms status" needs /proc	due to bashism
    Trent W. Buck 
    trentbuck at gmail.com
       
    Mon Jan 11 06:00:59 UTC 2016
    
    
  
Package: dkms
Version: 2.2.0.3-2
Severity: wishlist
I wanted to install zfsonlinux in a debootstrap chroot.
It didn't work:
    Setting up spl-dkms (0.6.5-1-wheezy) ...
    Removing old spl-0.6.5 DKMS files...
    [ /usr/sbin/dkms status -m spl -v 0.6.5 -k 3.16.0-4-amd64 ]
    /usr/sbin/dkms: line 1874: /dev/fd/62: No such file or directory
    /usr/sbin/dkms: line 1805: /dev/fd/62: No such file or directory
OTOH, "dkms build" works just fine :-)
This is because the bash idiom <(foo) relies on /dev/fd -> /proc/self/fd:
    $ ls -l <(date)
    lr-x------ 1 twb twb 64 Jan 11 16:34 /dev/fd/63 -> pipe:[20778]
But inside a chroot without /proc:
    (bootstrap)# ls -l <(date)
    ls: cannot access /dev/fd/63: No such file or directory
In most cases, dkms uses this because:
    while read ...; do x=...; done < <(f); echo "$x"   # works
    f | while read ...; do x=...; done; echo "$x"      # fails
Because the RHS of a pipe is a child process,
so new lexical binding (x=) can't propagate back to the parent.
So: removing the <()'s would make my life a little easier,
but your life harder.
You will probably WONTFIX this; that's OK.
I decided to report it anyway,
because the reason DKMS needs /proc is not obvious.
PS: bash can use FIFOs instead of /dev/fd,
but it looks like that's a compile-time decision,
and because /proc is usually mounted,
I doubt Debian's bash maintainers will be keen to change that :-)
    
    
More information about the Pkg-dkms-maint
mailing list