From: Dennis.Herbrich@hytera.de
To: ptxdist@pengutronix.de
Subject: [ptxdist] Proper quoting of semicolons in URLs
Date: Tue, 26 Feb 2013 10:20:25 +0100 [thread overview]
Message-ID: <OF2B4C8E82.1132C518-ONC1257B1E.0031C497-C1257B1E.00334F89@hytera.de> (raw)
Good day, everyone!
When using ptxdist to "get" a package with an URL with semicolons in it,
for example a snapshot from a gitweb repo, anything after the first
semicolon
is interpreted as options to wget. Unfortunately I was unable to find a
quoting
style that prevented this while still handing over a usable URL to wget:
An example for an URL I want to use:
http://git.xilinx.com/?p=linux-xlnx.git;a=snapshot;h=04d9378881401e71f83b8b4fea0abd71d33b4052;sf=tgz
I'm using ptxdist 2013.01.90 and copied the original kernel.make to my
project
rules, with a custom KERNEL_URL. I tried these variations, and got the
following
(slightly cleaned) results:
"Naive":
KERNEL_URL :=
http://git.xilinx.com/?p=linux-xlnx.git;a=snapshot;h=04d9378881401e71f83b8b4fea0abd71d33b4052;sf=tgz
$ ptxdist-2013.01.90 print KERNEL_URL
http://git.xilinx.com/?p=linux-xlnx.git;a=snapshot;h=04d9378881401e71f83b8b4fea0abd71d33b4052;sf=tgz
$ ptxdist-2013.01.90 get kernel
ptxdist: error: invalid option 'a=snapshot' to ptxd_make_get_http
"Doublequoting":
KERNEL_URL :=
"http://git.xilinx.com/?p=linux-xlnx.git;a=snapshot;h=04d9378881401e71f83b8b4fea0abd71d33b4052;sf=tgz"
$ ptxdist-2013.01.90 print KERNEL_URL
http://git.xilinx.com/?p=linux-xlnx.git
(This downloads an obviously unwanted HTML index page)
"Singlequoting":
KERNEL_URL :=
'http://git.xilinx.com/?p=linux-xlnx.git;a=snapshot;h=04d9378881401e71f83b8b4fea0abd71d33b4052;sf=tgz'
$ ptxdist-2013.01.90 print KERNEL_URL
'http://git.xilinx.com/?p=linux-xlnx.git;a=snapshot;h=04d9378881401e71f83b8b4fea0abd71d33b4052;sf=tgz'
$ ptxdist-2013.01.90 get kernel
Could not download package
URL:
'http://git.xilinx.com/?p=linux-xlnx.git;a=snapshot;h=04d9378881401e71f83b8b4fea0abd71d33b4052;sf=tgz'
Using backslashes to escape the semicolons does not work, either, same
behaviour
as in "Naive".
Using urlencoding as in
KERNEL_URL :=
http://git.xilinx.com/?p=linux-xlnx.git%3Ba=snapshot%3Bh=04d9378881401e71f83b8b4fea0abd71d33b4052%3Bsf=tgz
would technically work with ptxdist, but gitweb doesn't seem to decode
this,
and throws a 404, which seems broken by itself. :(
Does anybody have a suggestion how to quote semicolons in my URL properly,
lest they are passed literally to wget instead of being split into
options?
Is there some $(call verbatim,FOO) macro, perchance?
Thanks!
Dennis Herbrich
Hytera Mobilfunk GmbH
Fritz-Hahne-Str. 7
31848 Bad Münder/ Germany
Abteilung E
Tel.: + 49 (0) 5042 998 339
Fax: + 49 (0) 5042 998 305
mailto:dennis.herbrich@hytera.de
------------------------------------------------------------
Geschäftsführer / President: Matthias Klausing, Sitz der Gesellschaft /
Company's Place of Business: Bad Muender, Registereintrag / Commercial
Register No. Amtsgericht / Local Court Hannover: HRB 100300,
Umsatzsteuer-Identifikationsnummer (USt-IdNr.) / VAT Identification No.:
DE 115 447 987, Elektro-Altgeräte Register (EAR) / WEEE Register No.: DE
187 048 87
--
ptxdist mailing list
ptxdist@pengutronix.de
next reply other threads:[~2013-02-26 9:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-26 9:20 Dennis.Herbrich [this message]
2013-02-26 9:59 ` Marc Kleine-Budde
2013-02-26 10:00 ` Marc Kleine-Budde
2013-02-26 10:03 ` Marc Kleine-Budde
2013-02-26 10:13 ` Dennis.Herbrich
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=OF2B4C8E82.1132C518-ONC1257B1E.0031C497-C1257B1E.00334F89@hytera.de \
--to=dennis.herbrich@hytera.de \
--cc=ptxdist@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox