* [PATCH] Allow spectrum fw to build behind a proxy
@ 2010-03-10 10:31 Martyn Welch
2010-03-11 21:01 ` Richard Purdie
0 siblings, 1 reply; 6+ messages in thread
From: Martyn Welch @ 2010-03-10 10:31 UTC (permalink / raw)
To: openembedded-devel
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.
Signed-off-by: Martyn Welch <martyn.welch@ge.com>
---
recipes/orinoco/spectrum-fw.bb | 1 +
recipes/orinoco/spectrum-fw/get_symbol_fw | 9 +++++++--
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/recipes/orinoco/spectrum-fw.bb b/recipes/orinoco/spectrum-fw.bb
index cedb0e3..0128115 100644
--- a/recipes/orinoco/spectrum-fw.bb
+++ b/recipes/orinoco/spectrum-fw.bb
@@ -8,6 +8,7 @@ SRC_URI = "file://get_symbol_fw \
S = "${WORKDIR}"
do_configure() {
+ export FETCHCMD_wget="${FETCHCMD_wget}";
./get_symbol_fw
}
diff --git a/recipes/orinoco/spectrum-fw/get_symbol_fw b/recipes/orinoco/spectrum-fw/get_symbol_fw
index e7b0bf2..b15a60c 100755
--- a/recipes/orinoco/spectrum-fw/get_symbol_fw
+++ b/recipes/orinoco/spectrum-fw/get_symbol_fw
@@ -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
\ No newline at end of file
+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 martyn.welch@ge.com | M2 3AB VAT:GB 927559189
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] Allow spectrum fw to build behind a proxy
2010-03-10 10:31 [PATCH] Allow spectrum fw to build behind a proxy Martyn Welch
@ 2010-03-11 21:01 ` Richard Purdie
2010-03-12 9:00 ` Martyn Welch
0 siblings, 1 reply; 6+ messages in thread
From: Richard Purdie @ 2010-03-11 21:01 UTC (permalink / raw)
To: Martyn Welch; +Cc: openembedded-devel
On Wed, 2010-03-10 at 10:31 +0000, Martyn Welch wrote:
> 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.
How about the recipe in Poky for this
(meta/packages/orinoco/spectrum-fw.bb)? I think all these problems were
addressed there.
Cheers,
Richard
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Allow spectrum fw to build behind a proxy
2010-03-11 21:01 ` Richard Purdie
@ 2010-03-12 9:00 ` Martyn Welch
2010-03-12 19:56 ` Richard Purdie
0 siblings, 1 reply; 6+ messages in thread
From: Martyn Welch @ 2010-03-12 9:00 UTC (permalink / raw)
To: Richard Purdie; +Cc: openembedded-devel
Richard Purdie wrote:
> On Wed, 2010-03-10 at 10:31 +0000, Martyn Welch wrote:
>
>> 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.
>>
>
> 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
--
Martyn Welch (Principal Software Engineer) | Registered in England and
GE Intelligent Platforms | Wales (3828642) at 100
T +44(0)127322748 | Barbirolli Square, Manchester,
E martyn.welch@ge.com | M2 3AB VAT:GB 927559189
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Allow spectrum fw to build behind a proxy
2010-03-12 9:00 ` Martyn Welch
@ 2010-03-12 19:56 ` Richard Purdie
2010-03-14 20:09 ` Marcin Juszkiewicz
0 siblings, 1 reply; 6+ messages in thread
From: Richard Purdie @ 2010-03-12 19:56 UTC (permalink / raw)
To: Martyn Welch; +Cc: openembedded-devel
On Fri, 2010-03-12 at 09:00 +0000, Martyn Welch wrote:
> Richard Purdie wrote:
> > 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?
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Allow spectrum fw to build behind a proxy
2010-03-12 19:56 ` Richard Purdie
@ 2010-03-14 20:09 ` Marcin Juszkiewicz
2010-03-15 7:10 ` Marcin Juszkiewicz
0 siblings, 1 reply; 6+ messages in thread
From: Marcin Juszkiewicz @ 2010-03-14 20:09 UTC (permalink / raw)
To: openembedded-devel
[-- Attachment #1: Type: Text/Plain, Size: 666 bytes --]
Dnia piątek, 12 marca 2010 o 20:56:05 Richard Purdie napisał(a):
> 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,
--
JID: hrw@jabber.org
Website: http://marcin.juszkiewicz.com.pl/
LinkedIn: http://www.linkedin.com/in/marcinjuszkiewicz
[-- Attachment #2: 0001-base.bbclass-bitbake.conf-Fix-some-string-quoting-to.patch --]
[-- Type: text/x-patch, Size: 2061 bytes --]
From b8ff2b6cc3fd50420dda19eaf78943bad64aad3b Mon Sep 17 00:00:00 2001
From: Richard Purdie <rpurdie@rpsys.net>
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(-)
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index d67579d..c6e19c1 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -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 = "."
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index a7ab50b..6919649 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -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}"
--
1.7.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] Allow spectrum fw to build behind a proxy
2010-03-14 20:09 ` Marcin Juszkiewicz
@ 2010-03-15 7:10 ` Marcin Juszkiewicz
0 siblings, 0 replies; 6+ messages in thread
From: Marcin Juszkiewicz @ 2010-03-15 7:10 UTC (permalink / raw)
To: openembedded-devel
Dnia niedziela, 14 marca 2010 o 21:09:29 Marcin Juszkiewicz napisał(a):
> Dnia piątek, 12 marca 2010 o 20:56:05 Richard Purdie napisał(a):
> > 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,
--
JID: hrw@jabber.org
Website: http://marcin.juszkiewicz.com.pl/
LinkedIn: http://www.linkedin.com/in/marcinjuszkiewicz
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2010-03-15 7:14 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-10 10:31 [PATCH] Allow spectrum fw to build behind a proxy Martyn Welch
2010-03-11 21:01 ` Richard Purdie
2010-03-12 9:00 ` Martyn Welch
2010-03-12 19:56 ` Richard Purdie
2010-03-14 20:09 ` Marcin Juszkiewicz
2010-03-15 7:10 ` Marcin Juszkiewicz
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.