Bug 15882 - az fetcher not working as expected when using AZ_SAS, i need to prepend it with a ?
Summary: az fetcher not working as expected when using AZ_SAS, i need to prepend it wi...
Status: RESOLVED FIXED
Alias: None
Product: BitBake
Classification: Build System, Metadata & Runtime
Component: bitbake (show other bugs)
Version: 5.0.9
Hardware: x86 arm64
: Medium normal
Target Milestone: 5.3
Assignee: Robbin Van Damme
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2025-05-28 15:06 UTC by Robbin Van Damme
Modified: 2025-06-04 14:34 UTC (History)
4 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robbin Van Damme 2025-05-28 15:06:41 UTC
According to the docs we need to put our sas toking inside the AZ_SAS variable and add the use to the SRC_URI.

That does not work since in the lib/bb/fetch2/az.py the sas token gets appended to the url without a "?" in between to separate the query parameters from the url.


        if az_sas:
            azuri = '%s%s%s%s' % ('https://', ud.host, ud.path, az_sas)



This results in something like:


https://some_app.zipsp=r&st=date&se=date&spr=https&sv=date&sr=c&sig=some_sig' 

but it should be

https://some_app.zip?sp=r&st=date&se=date&spr=https&sv=date&sr=c&sig=some_sig' 



Code could be something like:


        if az_sas:
            azuri = '%s%s%s?%s' % ('https://', ud.host, ud.path, az_sas)

For now i just added the ? as prefix to the AZ_SAS inside my recipe.

Kind regards,

Robbin
Comment 1 Randy MacLeod 2025-05-29 14:44:53 UTC
Patch sent to list but it needs a commit message and signed-of-by line.
Comment 2 Richard Purdie 2025-06-04 14:34:14 UTC
In the end we've added a warning if the ? is missing:

https://git.yoctoproject.org/poky/commit/?id=a2f77bbe0fd564e0b95df15c27f2c6a3b15c7be7

Thanks for the patch Robbin.