Clemens Helfmeier dixit:
>Does not work:
> wireless-wpa-key "asdfkjh320AS3S3fs"
Is not supported, anyway (TTBOMK).
>Does work:
> wireless-wpa-key asdfkjh320AS3S3fs
Yes.
>Maybe we should drop the quotation marks in the build system inside the sed
>script already.
No, that would break things like the one from below.
>On Sun, Feb 05, 2012 at 04:42:43PM +0100, Clemens Helfmeier wrote:
>> using spaces (" ") in passwords for WPA configuration of wireless breaks the
>> build. Sed complains about unterminated "s" command due to the spaces
>> interrupting the sed program.
[…]
>> In order to make things work on my machine, I have to apply the attached
>> patch. It uses ' instead of " for sed program enclosure.
It’s highly likely that your problem instead comes from using
a dollar sign, accent gravis, apostroph or double quote inside
the password string.
The _real_ problem at hand here is that GNU make doesn’t have
(TTBOMK) something like BSD make’s :Q operator, which quotes
the (make) variable’s content for shell quotation rules. With
that, we’ve mostly removed the problem in MirPorts. Here’s an
illustration of the problem:
begin 755 illp.sh
M(R$O8FEN+VUK<V@*:3TP"G!R:6YT("UN(&-A;&QE9"!W:71H(&%R9W8Z"F9O
M<B!X(&EN("(D,"(@(B1`(CL@9&\*"7!R:6YT("UN("(@6R0H*&DK*RDI73TG
A)'MX+R]<)R]<)UQ<7"=<)WTG(@ID;VYE"G!R:6YT("X*
`
end
tg@blau:~ $ uuencode illp.mk illp.mk
begin 644 illp.mk
M4T]-159!4CT)9F]O(&)A<B`G(&)A>B`B(&)L82`D)&UE:"!@=')U96`B)R!<
M(R!B;'5B"B,@=')A;G-L871E<R!T;R!F;V\@8F%R("<@8F%Z("(@8FQA("1M
M96@@8'1R=65@(B<@(R!B;'5B"B,@:6X@<VAE;&PL(&1U92!T;R!M86MEXH"9
M<R!O=VX@<75O=&%T:6]N(')U;&5S"@IA;&PZ"@E`96-H;R`G<G5N(&]N92!O
M9CH@;6%K92`M9B!I;&QP+FUK('MG;G4L8G-D?6%L;"<*"F=N=6%L;#H*"2,@
M=VET:&]U="!Q=6]T97,*"2XO:6QL<"YS:"`D>U-/345605)]"@DC('=I=&@@
M<VEN9VQE('%U;W1E<PH)+B]I;&QP+G-H("<D>U-/345605)])PH)(R!W:71H
M(&1O=6)L92!Q=6]T97,*"2XO:6QL<"YS:"`B)'M33TU%5D%2?2(*"F)S9&%L
M;#H*"2,@=VET:"!"[email protected]$@;6]D:69I97(*"2XO:6QL<"YS:"`D>U-/3456
&05(Z47T*
`
end
I’m illustrating the argument split below:
tg@blau:~ $ gmake -f illp.mk gnuall
# without quotes
./illp.sh foo bar ' baz " bla $meh `true`"' # blub
called with argv: [0]='./illp.sh' [1]='foo' [2]='bar' [3]=' baz " bla $meh
`true`"'.
^^^ ^^^
^^^^^^^^^^^^^^^^^^^^^^^
# with single quotes
./illp.sh 'foo bar ' baz " bla $meh `true`"' # blub'
called with argv: [0]='./illp.sh' [1]='foo bar ' [2]='baz' [3]=' bla # blub'.
^^^^^^^^ ^^^ ^^^^^^^^^^^^^
# with double quotes
./illp.sh "foo bar ' baz " bla $meh `true`"' # blub"
called with argv: [0]='./illp.sh' [1]='foo bar '\'' baz ' [2]='bla' [3]=''\'' #
blub'.
^^^^^^^^^^^^^^^^^ ^^^
^^^^^^^^^^^
tg@blau:~ $ mmake -f illp.mk bsdall
# with BSD :Q modifier
./illp.sh foo\ bar\ \'\ baz\ \"\ bla\ \$meh\ \`true\`\"\'\ \#\ blub
called with argv: [0]='./illp.sh' [1]='foo bar '\'' baz " bla $meh `true`"'\''
# blub'.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
As you can see, only BSD make gets everything right (either the
accent gravis vanishes, or the hashmark, and word splitting is
done too, otherwise). I haven’t seen a GNU fix for that, and in
all GNU make-using projects I’ve encountered, people just don’t
seem to care about it at all. Many don’t even quote at all…
bye,
//mirabilos
--
“Having a smoking section in a restaurant is like having
a peeing section in a swimming pool.”
-- Edward Burr
_______________________________________________
freewrt-developers mailing list
[email protected]
https://www.freewrt.org/lists/listinfo/freewrt-developers