From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail.hytera.de ([62.157.183.118]) by metis.ext.pengutronix.de with esmtp (Exim 4.72) (envelope-from ) id 1UAGi7-0006nh-TJ for ptxdist@pengutronix.de; Tue, 26 Feb 2013 10:20:32 +0100 Received: from domino.hytera.de ([172.21.102.22] helo=nbmx01.hytera.de) by mail.hytera.de with esmtp (Exim 4.72) (envelope-from ) id 1UAGi1-0003dO-T2 for ptxdist@pengutronix.de; Tue, 26 Feb 2013 10:20:25 +0100 MIME-Version: 1.0 Message-ID: From: Dennis.Herbrich@hytera.de Date: Tue, 26 Feb 2013 10:20:25 +0100 Subject: [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: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Sender: ptxdist-bounces@pengutronix.de Errors-To: ptxdist-bounces@pengutronix.de To: ptxdist@pengutronix.de 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=3Dlinux-xlnx.git;a=3Dsnapshot;h=3D04d9378881401e71= f83b8b4fea0abd71d33b4052;sf=3Dtgz 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 :=3D = http://git.xilinx.com/?p=3Dlinux-xlnx.git;a=3Dsnapshot;h=3D04d9378881401e71= f83b8b4fea0abd71d33b4052;sf=3Dtgz $ ptxdist-2013.01.90 print KERNEL_URL http://git.xilinx.com/?p=3Dlinux-xlnx.git;a=3Dsnapshot;h=3D04d9378881401e71= f83b8b4fea0abd71d33b4052;sf=3Dtgz $ ptxdist-2013.01.90 get kernel ptxdist: error: invalid option 'a=3Dsnapshot' to ptxd_make_get_http "Doublequoting": KERNEL_URL :=3D = "http://git.xilinx.com/?p=3Dlinux-xlnx.git;a=3Dsnapshot;h=3D04d9378881401e7= 1f83b8b4fea0abd71d33b4052;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 = 'http://git.xilinx.com/?p=3Dlinux-xlnx.git;a=3Dsnapshot;h=3D04d9378881401e7= 1f83b8b4fea0abd71d33b4052;sf=3Dtgz' $ ptxdist-2013.01.90 print KERNEL_URL 'http://git.xilinx.com/?p=3Dlinux-xlnx.git;a=3Dsnapshot;h=3D04d9378881401e7= 1f83b8b4fea0abd71d33b4052;sf=3Dtgz' $ ptxdist-2013.01.90 get kernel Could not download package URL: = 'http://git.xilinx.com/?p=3Dlinux-xlnx.git;a=3Dsnapshot;h=3D04d9378881401e7= 1f83b8b4fea0abd71d33b4052;sf=3Dtgz' Using backslashes to escape the semicolons does not work, either, same = behaviour as in "Naive". Using urlencoding as in = KERNEL_URL :=3D = http://git.xilinx.com/?p=3Dlinux-xlnx.git%3Ba=3Dsnapshot%3Bh=3D04d937888140= 1e71f83b8b4fea0abd71d33b4052%3Bsf=3Dtgz 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=FCnder/ Germany Abteilung E Tel.: + 49 (0) 5042 998 339 Fax: + 49 (0) 5042 998 305 mailto:dennis.herbrich@hytera.de ------------------------------------------------------------ Gesch=E4ftsf=FChrer / 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=E4te Register (EAR) / WEEE Register No.: DE = 187 048 87 -- = ptxdist mailing list ptxdist@pengutronix.de