#4063 closed bug (fixed)
Installer calls its scripts without escaping the mount point
Reported by: | idefix | Owned by: | korli |
---|---|---|---|
Priority: | normal | Milestone: | R1 |
Component: | Applications/Installer | Version: | R1/pre-alpha1 |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Platform: | All |
Description
Installer calls InstallerInitScript and InstallerFinishScript without escaping the mount point, causing the scripts to fail when the name of the volume has special characters (like a space or parentheses):
/bin/sh: -c: line 1: syntax error near unexpected token `(' /bin/sh: -c: line 1: `/bin/sh /boot/system/boot/InstallerInitScript /installer(test)' ignoring 'var'. 343371756 bytes to read in 9358 files ignoring 'var'. /bin/sh: -c: line 1: syntax error near unexpected token `(' /bin/sh: -c: line 1: `/bin/sh /boot/system/boot/InstallerFinishScript /installer(test)' 327.46 MB written (0.96 MB/s)
Consequently, the volume isn't made bootable.
Attachments (2)
Change History (13)
comment:1 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
follow-up: 3 comment:2 by , 15 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Unfortunately, it is not, because the error is in the code that's calling the scripts.
I've made a patch that should fix this bug, but I'm not sure it's the preferred way.
(Note: I've not been able to test this patch, because of a build problem I'm experiencing.)
follow-up: 4 comment:3 by , 15 years ago
Replying to idefix:
(Note: I've not been able to test this patch, because of a build problem I'm experiencing.)
That actually looks like your copy of gensyscallinfos.cpp is corrupt. Can you try deleting src/tools/gensyscalls/gensyscallinfos.cpp and re-svn upping it?
comment:4 by , 15 years ago
Replying to anevilyak:
That actually looks like your copy of gensyscallinfos.cpp is corrupt. Can you try deleting src/tools/gensyscalls/gensyscallinfos.cpp and re-svn upping it?
Unfortunately, that didn't help:
/Build/Haiku> rm src/tools/gensyscalls/gensyscallinfos.cpp /Build/Haiku> svn update src/tools/gensyscalls/ Restored 'src/tools/gensyscalls/gensyscallinfos.cpp' At revision 31604. /Build/Haiku> cd src/apps/installer/ /Build/Haiku/src/apps/installer> jam -q ...patience... ...patience... ...patience... ...patience... ...patience... ...patience... ...patience... ...found 7410 target(s)... ...updating 642 target(s)... C++ ../../../generated/objects/haiku_host/x86/release/tools/gensyscalls/gensyscallinfos.o Link ../../../generated/objects/haiku_host/x86/release/tools/gensyscalls/gensyscallinfos Chmod1 ../../../generated/objects/haiku_host/x86/release/tools/gensyscalls/gensyscallinfos GenSyscallInfos1 ../../../generated/objects/haiku/x86/common/tools/gensyscalls/gensyscalls_infos.cpp Unexpected end of input. ../../../generated/objects/haiku_host/x86/release/tools/gensyscalls/gensyscallinfos ../../../generated/objects/haiku/x86/common/tools/gensyscalls/syscalls.h.pp.parsable ../../../generated/objects/haiku/x86/common/tools/gensyscalls/gensyscalls_infos.cpp ...failed GenSyscallInfos1 ../../../generated/objects/haiku/x86/common/tools/gensyscalls/gensyscalls_infos.cpp ... ...skipped <src!tools!gensyscalls>gensyscalls_infos.o for lack of <src!tools!gensyscalls>gensyscalls_infos.cpp... ...skipped gensyscalls for lack of <src!tools!gensyscalls>gensyscalls_infos.o... ...skipped <syscalls>syscalls.S.inc for lack of gensyscalls... ...skipped <src!system!libroot!os>syscalls.o for lack of <syscalls>syscalls.S.inc... ...skipped os_main.o for lack of <src!system!libroot!os>syscalls.o... ...skipped libroot.so for lack of os_main.o... ...skipped libbe.so for lack of libroot.so... ...skipped Installer for lack of libbe.so... ...failed updating 1 target(s)... ...skipped 8 target(s)... ...updated 2 target(s)... /Build/Haiku/src/apps/installer>
Maybe the gensyscallinfos.cpp-file inside the .svn-folder is corrupt?
I will try to remove the whole gensyscalls-folder and let svn update it with a fresh copy from the server.
follow-ups: 7 11 comment:5 by , 15 years ago
That folder just contains the tool and rules for it. It generates a few files on the fly by using output from others such as headers/private/system/syscalls.h. It's possible one of its input files is corrupt somewhere as well...are you building on Haiku itself by any chance? If so, you may have hit one of the BFS problems and might want to run checkfs.
follow-up: 8 comment:6 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
Applied in hrev31607. Thanks a lot!
comment:7 by , 15 years ago
Replying to anevilyak:
[...]are you building on Haiku itself by any chance? If so, you may have hit one of the BFS problems and might want to run checkfs.
Yes, I'm building on Haiku.
One of the first things I do when I hit an error like that is run checkfs, but it couldn't find anything:
~> checkfs /Build/ checked 108537 nodes, 0 blocks not allocated, 0 blocks already set, 0 blocks could be freed files 86679 directories 21858 attributes 0 attr. dirs 0 indices 0
comment:8 by , 15 years ago
comment:9 by , 15 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
by , 15 years ago
Attachment: | installerfinishscript.patch added |
---|
Patch to fix the mount point checks in InstallerFinishScript
comment:10 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
Ok, thanks a lot, applied in hrev31620. Again, I have not tested it myself, but I presume you have. :-)
comment:11 by , 15 years ago
Replying to anevilyak:
That folder just contains the tool and rules for it. It generates a few files on the fly by using output from others such as headers/private/system/syscalls.h. It's possible one of its input files is corrupt somewhere as well...are you building on Haiku itself by any chance? If so, you may have hit one of the BFS problems and might want to run checkfs.
Well, I have done a complete checkout of Haiku's sourcefiles, but it still errors at the same point...
I'm beginning to suspect the build-environment (Haiku under VMware), but I have no other environment to build Haiku on.
Should be fixed in hrev31532.