copy real binary when symblink /bin and /sbin 98/4198/1
authorGui Chen <gui.chen@intel.com>
Mon, 24 Jun 2013 05:57:08 +0000 (01:57 -0400)
committerGui Chen <gui.chen@intel.com>
Mon, 24 Jun 2013 05:58:08 +0000 (01:58 -0400)
when /bin and /sbin is symbolic link of /usr/bin and /usr/sbin,
try to copy the actual binaries from /usr/(s)bin to /(s)bin

Signed-off-by: Gui Chen <gui.chen@intel.com>
packaging/mic-bootstrap.spec

index 801b2d7..bb0f167 100644 (file)
@@ -74,6 +74,9 @@ sed -f $sedtmp -i filestoinclude1
 # tar copy to bootstrap dir under buildroot
 # prefix /bootstrap will fix conflicts
 tar -T filestoinclude1 -cpf - | ( cd %buildroot/bootstrap && tar -xpf - )
+# tar copy /usr/bin and /usr/sbin to /bin and /sbin to fix symblic lost in tar
+(cd /usr/bin && tar -cpf - *) | (cd %buildroot/bootstrap/bin && tar -xpf -)
+(cd /usr/sbin && tar -cpf - *) | (cd %buildroot/bootstrap/sbin && tar -xpf -)
 rm filestoinclude1
 
 # Todo: refractor