bitbake: fetch2: fix handling of `\` in file:// SRC_URI
PATCH 1/2 bitbake: fetch2: fix handling of `\` in file:// SRC_URI
From: Leif Middelschulte <[email protected]>
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)
--- bitbake/lib/bb/fetch2/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
bitbake/lib/bb/fetch2/__init__.py +1 -1
@@ -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
Signature · 1 line
2.31.1
PATCH 2/2 Use the label provided when formating a dos partition
From: jbouchard <[email protected]>
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)
--- scripts/lib/wic/plugins/source/bootimg-pcbios.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
scripts/lib/wic/plugins/source/bootimg-pcbios.py +4 -2
@@ -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)
Signature · 1 line
2.31.1
Quoted 10 lines · Andrei Gherzan
From: Leif Middelschulte <[email protected]>
Using backslashes in file:// URIs was broken.
Either the resolver would fail or the subsequentcpcommand. 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: [email protected]
I tried applying this patch, but found that it caused errors on the autobuilder:
https://errors.yoctoproject.org/Errors/Build/129189/
Steve
Quoted 25 lines
Signed-off-by Leif Middelschulte <[email protected]>Signed-off-by Richard Purdie <[email protected]>--- bitbake/lib/bb/fetch2/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)bitbake/lib/bb/fetch2/__init__.py +1
-2@@ -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
Quoted 10 lines · Steve Sakoman
Quoted 9 lines · Andrei Gherzan
From: Leif Middelschulte <[email protected]>
Using backslashes in file:// URIs was broken.
Either the resolver would fail or the subsequentcpcommand. Try to avoid this by putting the filenames into quotes.Fixes https://bugzilla.yoctoproject.org/show_bug.cgi?id=8161
Quoted 8 lines
Quoted 1 line
(Bitbake rev:
aa857fa2e9cf3b0e43a9049b04ec4b0b3c779b11)Patches for bitbake should be sent to: [email protected]
I tried applying this patch, but found that it caused errors on the autobuilder:
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
Quoted 17 lines · Richard Purdie
Quoted 16 lines · Steve Sakoman
Quoted 10 lines · Andrei Gherzan
From: Leif Middelschulte <[email protected]>
Using backslashes in file:// URIs was broken.
Either the resolver would fail or the subsequentcpcommand. 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: [email protected]
I tried applying this patch, but found that it caused errors on the autobuilder:
Quoted 7 lines
Quoted 2 lines
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
A message that is not in the archive (sent off-list or not yet received): [email protected]
Hey,
Quoted 21 lines · Andrei Gherzan
Quoted 20 lines · Richard Purdie
Quoted 18 lines · Steve Sakoman
Quoted 10 lines · Andrei Gherzan
From: Leif Middelschulte <[email protected]>
Using backslashes in file:// URIs was broken.
Either the resolver would fail or the subsequentcpcommand. 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: [email protected]
I tried applying this patch, but found that it caused errors on the autobuilder:
Quoted 7 lines
Quoted 4 lines
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
Quoted 29 lines · Andrei Gherzan
Hey,
Quoted 26 lines · Andrei Gherzan
Quoted 24 lines · Richard Purdie
Quoted 10 lines · Steve Sakoman
Quoted 9 lines · Andrei Gherzan
From: Leif Middelschulte <[email protected]>
Using backslashes in file:// URIs was broken.
Either the resolver would fail or the subsequentcpcommand. Try to avoid this by putting the filenames into quotes.Fixes https://bugzilla.yoctoproject.org/show_bug.cgi?id=8161
Quoted 8 lines
Quoted 1 line
(Bitbake rev:
aa857fa2e9cf3b0e43a9049b04ec4b0b3c779b11)Patches for bitbake should be sent to: [email protected]
I tried applying this patch, but found that it caused errors on the autobuilder:
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 :/.
Quoted 4 lines
Quoted 2 lines
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