All of lore.kernel.org
 help / color / mirror / Atom feed
* [dunfell][PATCH 1/2] bitbake: fetch2: fix handling of `\` in file:// SRC_URI
@ 2021-08-23 13:52 Andrei Gherzan
  2021-08-23 13:52 ` [dunfell][PATCH 2/2] Use the label provided when formating a dos partition Andrei Gherzan
  2021-08-24 14:20 ` [OE-core] [dunfell][PATCH 1/2] bitbake: fetch2: fix handling of `\` in file:// SRC_URI Steve Sakoman
  0 siblings, 2 replies; 7+ messages in thread
From: Andrei Gherzan @ 2021-08-23 13:52 UTC (permalink / raw)
  To: openembedded-core; +Cc: andrei, Leif Middelschulte, Richard Purdie

From: Leif Middelschulte <leif.middelschulte@klsmartin.com>

Using backslashes in file:// URIs was broken.
Either the resolver would fail or the subsequent `cp` command.
Try to avoid this by putting the filenames into quotes.

Fixes https://bugzilla.yoctoproject.org/show_bug.cgi?id=8161

(Bitbake rev: aa857fa2e9cf3b0e43a9049b04ec4b0b3c779b11)

Signed-off-by: Leif Middelschulte <leif.middelschulte@klsmartin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 bitbake/lib/bb/fetch2/__init__.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py
index dc99914cd9..ece07f611c 100644
--- a/bitbake/lib/bb/fetch2/__init__.py
+++ b/bitbake/lib/bb/fetch2/__init__.py
@@ -1525,7 +1525,7 @@ class FetchMethod(object):
                     if urlpath.find("/") != -1:
                         destdir = urlpath.rsplit("/", 1)[0] + '/'
                         bb.utils.mkdirhier("%s/%s" % (unpackdir, destdir))
-                cmd = 'cp -fpPRH %s %s' % (file, destdir)
+                cmd = 'cp -fpPRH "%s" "%s"' % (file, destdir)
 
         if not cmd:
             return
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [dunfell][PATCH 2/2] Use the label provided when formating a dos partition
  2021-08-23 13:52 [dunfell][PATCH 1/2] bitbake: fetch2: fix handling of `\` in file:// SRC_URI Andrei Gherzan
@ 2021-08-23 13:52 ` Andrei Gherzan
  2021-08-24 14:20 ` [OE-core] [dunfell][PATCH 1/2] bitbake: fetch2: fix handling of `\` in file:// SRC_URI Steve Sakoman
  1 sibling, 0 replies; 7+ messages in thread
From: Andrei Gherzan @ 2021-08-23 13:52 UTC (permalink / raw)
  To: openembedded-core; +Cc: andrei, jbouchard, Alexandre Belloni, Richard Purdie

From: jbouchard <jeanbouch418@gmail.com>

Previously the bootimg-pcbios wic plugin was not respecting
the --label option provided from the wks file. The plugin
was setting the label to 'boot'. With this fix, the --label
option is use. If no option are specified, then the default
is 'boot'.

(From OE-Core rev: 0fd7a73c1bd2486b7a022f0f69bbcb2e0d9cb141)

Signed-off-by: jbouchard <jeanbouch418@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 scripts/lib/wic/plugins/source/bootimg-pcbios.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/scripts/lib/wic/plugins/source/bootimg-pcbios.py b/scripts/lib/wic/plugins/source/bootimg-pcbios.py
index f2639e7004..32e47f1831 100644
--- a/scripts/lib/wic/plugins/source/bootimg-pcbios.py
+++ b/scripts/lib/wic/plugins/source/bootimg-pcbios.py
@@ -186,8 +186,10 @@ class BootimgPcbiosPlugin(SourcePlugin):
         # dosfs image, created by mkdosfs
         bootimg = "%s/boot%s.img" % (cr_workdir, part.lineno)
 
-        dosfs_cmd = "mkdosfs -n boot -i %s -S 512 -C %s %d" % \
-                    (part.fsuuid, bootimg, blocks)
+        label = part.label if part.label else "boot"
+
+        dosfs_cmd = "mkdosfs -n %s -i %s -S 512 -C %s %d" % \
+                    (label, part.fsuuid, bootimg, blocks)
         exec_native_cmd(dosfs_cmd, native_sysroot)
 
         mcopy_cmd = "mcopy -i %s -s %s/* ::/" % (bootimg, hdddir)
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [OE-core] [dunfell][PATCH 1/2] bitbake: fetch2: fix handling of `\` in file:// SRC_URI
  2021-08-23 13:52 [dunfell][PATCH 1/2] bitbake: fetch2: fix handling of `\` in file:// SRC_URI Andrei Gherzan
  2021-08-23 13:52 ` [dunfell][PATCH 2/2] Use the label provided when formating a dos partition Andrei Gherzan
@ 2021-08-24 14:20 ` Steve Sakoman
  2021-08-24 14:24   ` Richard Purdie
  1 sibling, 1 reply; 7+ messages in thread
From: Steve Sakoman @ 2021-08-24 14:20 UTC (permalink / raw)
  To: Andrei Gherzan
  Cc: Patches and discussions about the oe-core layer,
	Leif Middelschulte, Richard Purdie

On Mon, Aug 23, 2021 at 3:53 AM Andrei Gherzan <andrei@gherzan.com> wrote:
>
> From: Leif Middelschulte <leif.middelschulte@klsmartin.com>
>
> Using backslashes in file:// URIs was broken.
> Either the resolver would fail or the subsequent `cp` command.
> Try to avoid this by putting the filenames into quotes.
>
> Fixes https://bugzilla.yoctoproject.org/show_bug.cgi?id=8161
>
> (Bitbake rev: aa857fa2e9cf3b0e43a9049b04ec4b0b3c779b11)

Patches for bitbake should be sent to: bitbake-devel@lists.openembedded.org

I tried applying this patch, but found that it caused errors on the autobuilder:

https://errors.yoctoproject.org/Errors/Build/129189/

Steve

> Signed-off-by: Leif Middelschulte <leif.middelschulte@klsmartin.com>
> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
> ---
>  bitbake/lib/bb/fetch2/__init__.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py
> index dc99914cd9..ece07f611c 100644
> --- a/bitbake/lib/bb/fetch2/__init__.py
> +++ b/bitbake/lib/bb/fetch2/__init__.py
> @@ -1525,7 +1525,7 @@ class FetchMethod(object):
>                      if urlpath.find("/") != -1:
>                          destdir = urlpath.rsplit("/", 1)[0] + '/'
>                          bb.utils.mkdirhier("%s/%s" % (unpackdir, destdir))
> -                cmd = 'cp -fpPRH %s %s' % (file, destdir)
> +                cmd = 'cp -fpPRH "%s" "%s"' % (file, destdir)
>
>          if not cmd:
>              return
> --
> 2.31.1
>
>
> 
>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [OE-core] [dunfell][PATCH 1/2] bitbake: fetch2: fix handling of `\` in file:// SRC_URI
  2021-08-24 14:20 ` [OE-core] [dunfell][PATCH 1/2] bitbake: fetch2: fix handling of `\` in file:// SRC_URI Steve Sakoman
@ 2021-08-24 14:24   ` Richard Purdie
  2021-08-24 15:25     ` Andrei Gherzan
       [not found]     ` <169E47906AF45A5C.6361@lists.openembedded.org>
  0 siblings, 2 replies; 7+ messages in thread
From: Richard Purdie @ 2021-08-24 14:24 UTC (permalink / raw)
  To: Steve Sakoman, Andrei Gherzan
  Cc: Patches and discussions about the oe-core layer, Leif Middelschulte

On Tue, 2021-08-24 at 04:20 -1000, Steve Sakoman wrote:
> On Mon, Aug 23, 2021 at 3:53 AM Andrei Gherzan <andrei@gherzan.com> wrote:
> > 
> > From: Leif Middelschulte <leif.middelschulte@klsmartin.com>
> > 
> > Using backslashes in file:// URIs was broken.
> > Either the resolver would fail or the subsequent `cp` command.
> > Try to avoid this by putting the filenames into quotes.
> > 
> > Fixes https://bugzilla.yoctoproject.org/show_bug.cgi?id=8161
> > 
> > (Bitbake rev: aa857fa2e9cf3b0e43a9049b04ec4b0b3c779b11)
> 
> Patches for bitbake should be sent to: bitbake-devel@lists.openembedded.org
> 
> I tried applying this patch, but found that it caused errors on the autobuilder:
> 
> https://errors.yoctoproject.org/Errors/Build/129189/
> 

We dropped wildcard support in master but that is still present in dunfell. That
means we can't quote things as we are relying on expansion of the wildcards for
some SRC_URIs. This could be difficult to fix with the compatibility constraints
of an older release funfortunately :/.

Cheers,

Richard


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [OE-core] [dunfell][PATCH 1/2] bitbake: fetch2: fix handling of `\` in file:// SRC_URI
  2021-08-24 14:24   ` Richard Purdie
@ 2021-08-24 15:25     ` Andrei Gherzan
       [not found]     ` <169E47906AF45A5C.6361@lists.openembedded.org>
  1 sibling, 0 replies; 7+ messages in thread
From: Andrei Gherzan @ 2021-08-24 15:25 UTC (permalink / raw)
  To: Richard Purdie, Steve Sakoman; +Cc: openembedded, Leif Middelschulte

On Tue, 24 Aug 2021, at 15:24, Richard Purdie wrote:
> On Tue, 2021-08-24 at 04:20 -1000, Steve Sakoman wrote:
> > On Mon, Aug 23, 2021 at 3:53 AM Andrei Gherzan <andrei@gherzan.com> wrote:
> > > 
> > > From: Leif Middelschulte <leif.middelschulte@klsmartin.com>
> > > 
> > > Using backslashes in file:// URIs was broken.
> > > Either the resolver would fail or the subsequent `cp` command.
> > > Try to avoid this by putting the filenames into quotes.
> > > 
> > > Fixes https://bugzilla.yoctoproject.org/show_bug.cgi?id=8161
> > > 
> > > (Bitbake rev: aa857fa2e9cf3b0e43a9049b04ec4b0b3c779b11)
> > 
> > Patches for bitbake should be sent to: bitbake-devel@lists.openembedded.org
> > 
> > I tried applying this patch, but found that it caused errors on the autobuilder:
> > 
> > https://errors.yoctoproject.org/Errors/Build/129189/
> > 
> 
> We dropped wildcard support in master but that is still present in dunfell. That
> means we can't quote things as we are relying on expansion of the wildcards for
> some SRC_URIs. This could be difficult to fix with the compatibility constraints
> of an older release funfortunately :/.

Got it now. That's going to be painful indeed. I can't think of an easy way out of this either.

Andrei

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [OE-core] [dunfell][PATCH 1/2] bitbake: fetch2: fix handling of `\` in file:// SRC_URI
       [not found]     ` <169E47906AF45A5C.6361@lists.openembedded.org>
@ 2021-08-31 12:45       ` Andrei Gherzan
  2021-08-31 13:03         ` Richard Purdie
  0 siblings, 1 reply; 7+ messages in thread
From: Andrei Gherzan @ 2021-08-31 12:45 UTC (permalink / raw)
  To: openembedded

Hey,

On Tue, 24 Aug 2021, at 16:25, Andrei Gherzan wrote:
> On Tue, 24 Aug 2021, at 15:24, Richard Purdie wrote:
> > On Tue, 2021-08-24 at 04:20 -1000, Steve Sakoman wrote:
> > > On Mon, Aug 23, 2021 at 3:53 AM Andrei Gherzan <andrei@gherzan.com> wrote:
> > > > 
> > > > From: Leif Middelschulte <leif.middelschulte@klsmartin.com>
> > > > 
> > > > Using backslashes in file:// URIs was broken.
> > > > Either the resolver would fail or the subsequent `cp` command.
> > > > Try to avoid this by putting the filenames into quotes.
> > > > 
> > > > Fixes https://bugzilla.yoctoproject.org/show_bug.cgi?id=8161
> > > > 
> > > > (Bitbake rev: aa857fa2e9cf3b0e43a9049b04ec4b0b3c779b11)
> > > 
> > > Patches for bitbake should be sent to: bitbake-devel@lists.openembedded.org
> > > 
> > > I tried applying this patch, but found that it caused errors on the autobuilder:
> > > 
> > > https://errors.yoctoproject.org/Errors/Build/129189/
> > > 
> > 
> > We dropped wildcard support in master but that is still present in dunfell. That
> > means we can't quote things as we are relying on expansion of the wildcards for
> > some SRC_URIs. This could be difficult to fix with the compatibility constraints
> > of an older release funfortunately :/.
> 
> Got it now. That's going to be painful indeed. I can't think of an easy 
> way out of this either.

Can you guys think of a way forward with this? Or shall we just drop it and consider it unsupported?

Andrei

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [OE-core] [dunfell][PATCH 1/2] bitbake: fetch2: fix handling of `\` in file:// SRC_URI
  2021-08-31 12:45       ` Andrei Gherzan
@ 2021-08-31 13:03         ` Richard Purdie
  0 siblings, 0 replies; 7+ messages in thread
From: Richard Purdie @ 2021-08-31 13:03 UTC (permalink / raw)
  To: Andrei Gherzan, openembedded

On Tue, 2021-08-31 at 13:45 +0100, Andrei Gherzan wrote:
> Hey,
> 
> On Tue, 24 Aug 2021, at 16:25, Andrei Gherzan wrote:
> > On Tue, 24 Aug 2021, at 15:24, Richard Purdie wrote:
> > > On Tue, 2021-08-24 at 04:20 -1000, Steve Sakoman wrote:
> > > > On Mon, Aug 23, 2021 at 3:53 AM Andrei Gherzan <andrei@gherzan.com> wrote:
> > > > > 
> > > > > From: Leif Middelschulte <leif.middelschulte@klsmartin.com>
> > > > > 
> > > > > Using backslashes in file:// URIs was broken.
> > > > > Either the resolver would fail or the subsequent `cp` command.
> > > > > Try to avoid this by putting the filenames into quotes.
> > > > > 
> > > > > Fixes https://bugzilla.yoctoproject.org/show_bug.cgi?id=8161
> > > > > 
> > > > > (Bitbake rev: aa857fa2e9cf3b0e43a9049b04ec4b0b3c779b11)
> > > > 
> > > > Patches for bitbake should be sent to: bitbake-devel@lists.openembedded.org
> > > > 
> > > > I tried applying this patch, but found that it caused errors on the autobuilder:
> > > > 
> > > > https://errors.yoctoproject.org/Errors/Build/129189/
> > > > 
> > > 
> > > We dropped wildcard support in master but that is still present in dunfell. That
> > > means we can't quote things as we are relying on expansion of the wildcards for
> > > some SRC_URIs. This could be difficult to fix with the compatibility constraints
> > > of an older release funfortunately :/.
> > 
> > Got it now. That's going to be painful indeed. I can't think of an easy 
> > way out of this either.
> 
> Can you guys think of a way forward with this? Or shall we just drop it and consider it unsupported?

The only idea I had was to see if wildcards were in the name and only quote it
if not. I'm not sure we ever have had backslashes working though so it has
always been unsupported until the fix in master afaict.

Cheers,

Richard


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-08-31 13:03 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-23 13:52 [dunfell][PATCH 1/2] bitbake: fetch2: fix handling of `\` in file:// SRC_URI Andrei Gherzan
2021-08-23 13:52 ` [dunfell][PATCH 2/2] Use the label provided when formating a dos partition Andrei Gherzan
2021-08-24 14:20 ` [OE-core] [dunfell][PATCH 1/2] bitbake: fetch2: fix handling of `\` in file:// SRC_URI Steve Sakoman
2021-08-24 14:24   ` Richard Purdie
2021-08-24 15:25     ` Andrei Gherzan
     [not found]     ` <169E47906AF45A5C.6361@lists.openembedded.org>
2021-08-31 12:45       ` Andrei Gherzan
2021-08-31 13:03         ` Richard Purdie

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.