From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Message-ID: <512C87D6.7020002@pengutronix.de> Date: Tue, 26 Feb 2013 11:00:54 +0100 From: Marc Kleine-Budde MIME-Version: 1.0 References: <512C8783.1020105@pengutronix.de> In-Reply-To: <512C8783.1020105@pengutronix.de> Subject: Re: [ptxdist] Proper quoting of semicolons in URLs Reply-To: ptxdist@pengutronix.de List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============2143487706==" Sender: ptxdist-bounces@pengutronix.de Errors-To: ptxdist-bounces@pengutronix.de To: ptxdist@pengutronix.de Cc: Dennis.Herbrich@hytera.de This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --===============2143487706== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="----enig2UTFLFPILMIHCUJOQUBQM" This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2UTFLFPILMIHCUJOQUBQM Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 02/26/2013 10:59 AM, Marc Kleine-Budde wrote: > On 02/26/2013 10:20 AM, Dennis.Herbrich@hytera.de wrote: >> Good day, everyone! >> >> When using ptxdist to "get" a package with an URL with semicolons in i= t,=20 >> for example a snapshot from a gitweb repo, anything after the first=20 >> semicolon >> is interpreted as options to wget. Unfortunately I was unable to find = a=20 >> quoting >> style that prevented this while still handing over a usable URL to wge= t: >> >> An example for an URL I want to use: >> http://git.xilinx.com/?p=3Dlinux-xlnx.git;a=3Dsnapshot;h=3D04d93788814= 01e71f83b8b4fea0abd71d33b4052;sf=3Dtgz >> >> I'm using ptxdist 2013.01.90 and copied the original kernel.make to my= =20 >> project >> rules, with a custom KERNEL_URL. I tried these variations, and got the= =20 >> following >> (slightly cleaned) results: >> >> "Naive": >> KERNEL_URL :=3D=20 >> http://git.xilinx.com/?p=3Dlinux-xlnx.git;a=3Dsnapshot;h=3D04d93788814= 01e71f83b8b4fea0abd71d33b4052;sf=3Dtgz >> >> $ ptxdist-2013.01.90 print KERNEL_URL >> http://git.xilinx.com/?p=3Dlinux-xlnx.git;a=3Dsnapshot;h=3D04d93788814= 01e71f83b8b4fea0abd71d33b4052;sf=3Dtgz >> $ ptxdist-2013.01.90 get kernel >> ptxdist: error: invalid option 'a=3Dsnapshot' to ptxd_make_get_http >> >> >> "Doublequoting": >> KERNEL_URL :=3D=20 >> "http://git.xilinx.com/?p=3Dlinux-xlnx.git;a=3Dsnapshot;h=3D04d9378881= 401e71f83b8b4fea0abd71d33b4052;sf=3Dtgz" >> >> $ ptxdist-2013.01.90 print KERNEL_URL >> http://git.xilinx.com/?p=3Dlinux-xlnx.git >> (This downloads an obviously unwanted HTML index page) >> >> >> "Singlequoting": >> KERNEL_URL :=3D=20 >> 'http://git.xilinx.com/?p=3Dlinux-xlnx.git;a=3Dsnapshot;h=3D04d9378881= 401e71f83b8b4fea0abd71d33b4052;sf=3Dtgz' >> >> $ ptxdist-2013.01.90 print KERNEL_URL >> 'http://git.xilinx.com/?p=3Dlinux-xlnx.git;a=3Dsnapshot;h=3D04d9378881= 401e71f83b8b4fea0abd71d33b4052;sf=3Dtgz' >> $ ptxdist-2013.01.90 get kernel >> Could not download package >> URL:=20 >> 'http://git.xilinx.com/?p=3Dlinux-xlnx.git;a=3Dsnapshot;h=3D04d9378881= 401e71f83b8b4fea0abd71d33b4052;sf=3Dtgz' >> >> >> Using backslashes to escape the semicolons does not work, either, same= =20 >> behaviour >> as in "Naive". >> >> Using urlencoding as in=20 >> KERNEL_URL :=3D=20 >> http://git.xilinx.com/?p=3Dlinux-xlnx.git%3Ba=3Dsnapshot%3Bh=3D04d9378= 881401e71f83b8b4fea0abd71d33b4052%3Bsf=3Dtgz >> would technically work with ptxdist, but gitweb doesn't seem to decode= =20 >> this, >> and throws a 404, which seems broken by itself. :( >> >> Does anybody have a suggestion how to quote semicolons in my URL prope= rly, >> lest they are passed literally to wget instead of being split into=20 >> options? >> Is there some $(call verbatim,FOO) macro, perchance? >=20 > What about using %3B instead of ; > http://www.w3schools.com/TAGS/ref_urlencode.asp Doh - you tried already. Marc --=20 Pengutronix e.K. | Marc Kleine-Budde | Industrial Linux Solutions | Phone: +49-231-2826-924 | Vertretung West/Dortmund | Fax: +49-5121-206917-5555 | Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de | ------enig2UTFLFPILMIHCUJOQUBQM Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlEsh9cACgkQjTAFq1RaXHNrBgCeKMhkoPWu+Lx2q0cKelSAXYzo klwAoIf2GG6XpaC6Y360+Jn10c9UEfxZ =PA1x -----END PGP SIGNATURE----- ------enig2UTFLFPILMIHCUJOQUBQM-- --===============2143487706== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline -- ptxdist mailing list ptxdist@pengutronix.de --===============2143487706==--