insufficient flag handling in tools/install.sh

Alexander Best arundel at freebsd.org
Thu Feb 3 19:43:06 UTC 2011


hi there,

i stumbled upon two interesting lines in the amd64 tinderbox output [1]:

[...]
sh /src/tools/install.sh -d -o root -g wheel -m 755  /obj/src/tmp/usr/include/x86;  cd /src/include/../sys/x86/include;  for h in *.h; do  ln -fs ../../../sys/x86/include/$h  /obj/src/tmp/usr/include/x86;  done
install: chown 0:0 /obj/src/tmp/usr/include/x86: Operation not permitted
[...]
sh /src/tools/install.sh -d -o root -g wheel -m 755  /obj/src/lib32/usr/include/x86;  cd /src/include/../sys/x86/include;  sh /src/tools/install.sh -C -o root -g wheel -m 444 *.h  /obj/src/lib32/usr/include/x86
install: chown 0:0 /obj/src/lib32/usr/include/x86: Operation not permitted
[...]

it seems the -d flag breaks the semantics of tools/install.sh entirely and
using the script in such a case simply passes all args over to install(1).

simply adding the -d flag to the first switch statement won't work, since we
need to tell install(1) that it should only expect a single directory as
argument. so the -d flag needs to be passed over to install(1), while options
such as -o X, -g X, etc. need to be stripped away.

any thoughts on how to fix this?

cheers.
alex

[1] http://tinderbox.freebsd.org/tinderbox-head-HEAD-amd64-amd64.full

-- 
a13x


More information about the freebsd-hackers mailing list