From: "Brennan Coslett" <brennan.coslett@bluerivertech.com>
To: bitbake-devel@lists.openembedded.org
Subject: Re: URL encoding/decoding bug with files like "serialgetty@.service" or "sshd@.service" with archiver.bbclass #poky #bitbake #kirkstone
Date: Thu, 26 Sep 2024 07:57:38 -0700 [thread overview]
Message-ID: <29158.1727362658714839430@lists.openembedded.org> (raw)
In-Reply-To: <CANNYZj_3XLABQZLYvRuQu+PnQ52gDRS8pXgQDS-SBfp8g9o=sA@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2398 bytes --]
I think the bug is in `bb.fetch.decodeurl`, I just noticed it because of the archiver.
@Alex if that means it should still move over to the oe-core list, let me know and I can do that.
Steps to replicate:
1. Checkout poky master (just replicated with 8634e46b4040b6008410b6d77fecb5cbaec7e90e)
2. source oe-init-build-env
3. append the following to the auto-generated local.conf:
+ require conf/distro/include/init-manager-systemd.inc
+ INHERIT += "archiver"
+ ARCHIVER_MODE[src] = "original"
4. Run "bitbake systemd-serialgetty", the source dir will be created but it wont contain anything:
brennan.coslett@lpgt-bcosl001:~/missing-source/poky/build$ ls tmp/deploy/sources/x86_64-poky-linux/systemd-serialgetty-1.0-r0/
brennan.coslett@lpgt-bcosl001:~/missing-source/poky/build$
I think something in the regex inside the `decodeurl` function in `bitbake/lib/bb/fetch2/__init__.py` needs to change to stop it from
parsing out `<name>@` in `<name>@.service` into the `user` field or maybe it needs additional logic inside that function when its a
local file to put the parsed out `user` group back into the `location` group? This appears to fix it but i'm not sure if this is actually valid,
if it is I can submit it as an actual patch. I think there should probably be a corresponding addition of a fetch test around these types of
files?
diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py
index ddee4400bb..2ea834416b 100644
--- a/bitbake/lib/bb/fetch2/__init__.py
+++ b/bitbake/lib/bb/fetch2/__init__.py
@@ -369,6 +369,11 @@ def decodeurl(url):
path = location[locidx:]
elif type.lower() == 'file':
host = ""
+ # parsing out a user doesn't make sense for
+ # local files?
+ if user:
+ location = "%s@%s" % (user, location)
+ user = None
path = location
else:
host = location
I was able to see the `serialgetty@.service` file in the output folder:
brennan.coslett@lpgt-bcosl001:~/missing-source/poky/build$ bitbake systemd-serialgetty
...
NOTE: Tasks Summary: Attempted 969 tasks of which 871 didn't need to be rerun and all succeeded.
Summary: There was 1 WARNING message.
brennan.coslett@lpgt-bcosl001:~/missing-source/poky/build$ ls tmp/deploy/sources/x86_64-poky-linux/systemd-serialgetty-1.0-r0/
serial-getty@.service
Thanks,
Brennan Coslett
[-- Attachment #2: Type: text/html, Size: 3150 bytes --]
next prev parent reply other threads:[~2024-09-26 14:57 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-25 21:37 URL encoding/decoding bug with files like "serialgetty@.service" or "sshd@.service" with archiver.bbclass #bitbake #kirkstone #poky Brennan Coslett
2024-09-26 9:47 ` [bitbake-devel] " Alexander Kanavin
2024-09-26 14:57 ` Brennan Coslett [this message]
2024-09-26 15:03 ` [bitbake-devel] URL encoding/decoding bug with files like "serialgetty@.service" or "sshd@.service" with archiver.bbclass #poky #bitbake #kirkstone Alexander Kanavin
2024-09-26 15:31 ` Brennan Coslett
2024-09-27 10:53 ` Alexander Kanavin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=29158.1727362658714839430@lists.openembedded.org \
--to=brennan.coslett@bluerivertech.com \
--cc=bitbake-devel@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.