Allow spectrum fw to build behind a proxy
PATCH 1/1 Allow spectrum fw to build behind a proxy
Spectrum-fw runs a script which uses curl, wget or ftp to pull an archive rather than the archive being a part of the SRC_URI. Whilst it would probably be preferable to pull this as part of the SRC_URI (incidentally, if it was, the script wouldn't need to be modified), the "&" in the archive name has foiled my attempts at doing that.
This patch modifies the script to at least use the "FETCHCMD_wget" variable which can be provided to help when accessing through a proxy.
---
recipes/orinoco/spectrum-fw.bb | 1 + recipes/orinoco/spectrum-fw/get_symbol_fw | 9 +++++++-- 2 files changed, 8 insertions(+), 2 deletions(-)
recipes/orinoco/spectrum-fw.bb +1 -0
@@ -8,6 +8,7 @@ SRC_URI = "file://get_symbol_fw \ S = "${WORKDIR}" do_configure() { + export FETCHCMD_wget="${FETCHCMD_wget}"; ./get_symbol_fw }
recipes/orinoco/spectrum-fw/get_symbol_fw +7 -2
@@ -23,8 +23,13 @@ DRIVER1=symbol1.drv DRIVER2=symbol2.drv get_file() { + if [ "${FETCHCMD_wget}" == "" ] + then + FETCHCMD_wget="wget --passive-ftp" + fi + curl --remote-name "$1" || \ - wget --passive-ftp "$1" || \ + ${FETCHCMD_wget} "$1" || \ wget "$1" || \ ftp "$1" </dev/null || \ exit 1
@@ -40,4 +45,4 @@ unzip -p $DRIVER1 "$DL_INT2" >$DRIVER2 perl parse_symbol_fw $DRIVER2 spectrum_fw.h symbol_sp24t_prim_fw \ symbol_sp24t_sec_fw -rm -f $DRIVER1 $DRIVER2 +rm -f $DRIVER1 $DRIVER2
--
Martyn Welch (Principal Software Engineer) | Registered in England and GE Intelligent Platforms | Wales (3828642) at 100 T +44(0)127322748 | Barbirolli Square, Manchester, E [email protected] | M2 3AB VAT:GB 927559189
Quoted 8 lines · Martyn Welch
Spectrum-fw runs a script which uses curl, wget or ftp to pull an archive rather than the archive being a part of the
SRC_URI. Whilst it would probably be preferable to pull this as part of theSRC_URI(incidentally, if it was, the script wouldn't need to be modified), the "&" in the archive name has foiled my attempts at doing that.This patch modifies the script to at least use the "
FETCHCMD_wget" variable which can be provided to help when accessing through a proxy.
How about the recipe in Poky for this (meta/packages/orinoco/spectrum-fw.bb)? I think all these problems were addressed there.
Cheers,
Richard
Quoted 8 lines · Richard Purdie
Quoted 6 lines · Martyn Welch
Spectrum-fw runs a script which uses curl, wget or ftp to pull an archive rather than the archive being a part of the
SRC_URI. Whilst it would probably be preferable to pull this as part of theSRC_URI(incidentally, if it was, the script wouldn't need to be modified), the "&" in the archive name has foiled my attempts at doing that.
Quoted 8 lines
Quoted 3 lines
This patch modifies the script to at least use the "
FETCHCMD_wget" variable which can be provided to help when accessing through a proxy.How about the recipe in Poky for this (meta/packages/orinoco/spectrum-fw.bb)? I think all these problems were addressed there.
I tried exactly that first, wget keeps trying to download:
"ftp://symstore.longisland.com/Symstore/services_download/wirless_prod/MC"
not:
"ftp://symstore.longisland.com/Symstore/services_download/wirless_prod/MC&DriverOnlyInstallers.zip"
Has Bitbake been patched up in poky to handle "&" differently?
Martyn
Signature · 4 lines
Martyn Welch (Principal Software Engineer) | Registered in England and GE Intelligent Platforms | Wales (3828642) at 100 T +44(0)127322748 | Barbirolli Square, Manchester, E [email protected] | M2 3AB VAT:GB 927559189
Quoted 7 lines · Martyn Welch
Quoted 4 lines · Richard Purdie
How about the recipe in Poky for this (meta/packages/orinoco/spectrum-fw.bb)? I think all these problems were addressed there.
I tried exactly that first, wget keeps trying to download:
Quoted 7 lines
"ftp://symstore.longisland.com/Symstore/services_download/wirless_prod/MC"
not:
"ftp://symstore.longisland.com/Symstore/services_download/wirless_prod/MC&DriverOnlyInstallers.zip"
Has Bitbake been patched up in poky to handle "&" differently?
Ah, I remember this now. It is not a bitbake bug put a base.bbclass bug as something somewhere has incorrect quoting. Its been fixed in Poky but probably should be pushed into OE too. If you find the commit where I last touched the spectrum-fw driver you'll find the core class change too I suspect. It'd be good to get synced up on that.
Cheers,
Richard
Dnia piątek, 12 marca 2010 o 20:56:05 Richard Purdie napisał(a):
Quoted 5 lines
Ah, I remember this now. It is not a bitbake bug put a base.bbclass bug as something somewhere has incorrect quoting. Its been fixed in Poky but probably should be pushed into OE too. If you find the commit where I last touched the spectrum-fw driver you'll find the core class change too I suspect. It'd be good to get synced up on that.
Attached is that changeset. I will look at it tomorrow if someone will not merge it before.
Regards,
Signature · 3 lines
JID: [email protected] Website: http://marcin.juszkiewicz.com.pl/ LinkedIn: http://www.linkedin.com/in/marcinjuszkiewicz
From b8ff2b6cc3fd50420dda19eaf78943bad64aad3b Mon Sep 17 00:00:00 2001
From: Richard Purdie <[email protected]>
Date: Thu, 23 Oct 2008 21:08:42 +0100
Subject: [PATCH] base.bbclass/bitbake.conf: Fix some string quoting to handle more unusual URLs
--- meta/classes/base.bbclass | 2 +- meta/conf/bitbake.conf | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
meta/classes/base.bbclass +1 -1
@@ -641,7 +641,7 @@ def oe_unpack_file(file, data, url = None): (type, host, path, user, pswd, parm) = bb.decodeurl(url) if 'dos' in parm: cmd = '%s -a' % cmd - cmd = '%s %s' % (cmd, file) + cmd = "%s '%s'" % (cmd, file) elif os.path.isdir(file): filesdir = os.path.realpath(bb.data.getVar("FILESDIR", data, 1)) destdir = "."
meta/conf/bitbake.conf +2 -2
@@ -476,12 +476,12 @@ FETCHCMD_bzr = "/usr/bin/env bzr" FETCHCMD_hg = "/usr/bin/env hg" FETCHCOMMAND = "ERROR, this must be a BitBake bug" -FETCHCOMMAND_wget = "/usr/bin/env wget -t 5 --passive-ftp -P ${DL_DIR} ${URI}" +FETCHCOMMAND_wget = "/usr/bin/env wget -t 5 --passive-ftp -P ${DL_DIR} '${URI}'" FETCHCOMMAND_cvs = "/usr/bin/env cvs '-d${CVSROOT}' co ${CVSCOOPTS} ${CVSMODULE}" FETCHCOMMAND_svn = "/usr/bin/env svn co ${SVNCOOPTS} ${SVNROOT} ${SVNMODULE}" CHECKCOMMAND_wget = "/usr/bin/env wget --spider -t 5 --passive-ftp -P ${DL_DIR} ${URI}" RESUMECOMMAND = "ERROR, this must be a BitBake bug" -RESUMECOMMAND_wget = "/usr/bin/env wget -c -t 5 --passive-ftp -P ${DL_DIR} ${URI}" +RESUMECOMMAND_wget = "/usr/bin/env wget -c -t 5 --passive-ftp -P ${DL_DIR} '${URI}'" UPDATECOMMAND = "ERROR, this must be a BitBake bug" UPDATECOMMAND_cvs = "/usr/bin/env cvs -d${CVSROOT} update -d -P ${CVSCOOPTS}" UPDATECOMMAND_svn = "/usr/bin/env svn update ${SVNCOOPTS}"
Signature · 1 line
1.7.0
Dnia niedziela, 14 marca 2010 o 21:09:29 Marcin Juszkiewicz napisał(a):
Quoted 9 lines
Dnia piątek, 12 marca 2010 o 20:56:05 Richard Purdie napisał(a):
Quoted 5 lines
Ah, I remember this now. It is not a bitbake bug put a base.bbclass bug as something somewhere has incorrect quoting. Its been fixed in Poky but probably should be pushed into OE too. If you find the commit where I last touched the spectrum-fw driver you'll find the core class change too I suspect. It'd be good to get synced up on that.
Attached is that changeset. I will look at it tomorrow if someone will not merge it before.
Merged this, fixed distribute sources class, merged spectrum-fw from Poky.
Regards,
Signature · 3 lines
JID: [email protected] Website: http://marcin.juszkiewicz.com.pl/ LinkedIn: http://www.linkedin.com/in/marcinjuszkiewicz