[Buildroot] [PATCH] package/pkg-generic.mk: add missing quotes

Arnout Vandecappelle arnout at rnout.be
Fri May 16 16:41:44 UTC 2025


  Hi Simon,

  Raising this thread from the dead...

On 20/11/2024 12:22, Simon Richter via buildroot wrote:
> Hi Yann, hi Vincent,
> 
> Am 20.11.24 um 09:38 schrieb yann.morin at orange.com:
>> Simon, All,

[snip]
>> Indeed, having `&` in a filename is really asking for trouble all along
>> the way! :-/ As this is a downloaded file, have you tried URL-escaping
>> the `&` with '%26' instead? If it works, that would give a one-off
>> solution for your case, but maybe we need to handle that in a generic
>> way (somehow)...
> I tried to encode the URL (thanks @Vincent), but Azure doesn't like it:
> 400 The value for one of the HTTP headers is not in the correct format.

  Have you tried simply adding quotes in the .mk file? So

     <PKG>_SOURCE = '<FILE>?foo&bar&baz&blah'


  Regards,
  Arnout

> Our current solution is to abuse <PKG>_DL_OPTS as we don't need the
> variable (with our packages to be loaded via Azure). We have our
> own download script (a customized copy of support/download/wget):
> 
>      <while getopts>
>      shift $((OPTIND-1))
>      sas="$1”
>      shift
>      url=${url#*+*+} # remove the 'azcopy+' before 'https://...'
>      _wget() {
>          echo ${WGET} “${@}”
>          eval ${WGET} “${@}”
>      }
>      _wget -O “‘${output}’” “‘${url}/${filename}${sas}’”
> 
> 
> In my opinion this is more of a hack than a solution.
> 
> Do you have any ideas on how we could solve this properly (so that
> we can bring it upstream)?
> 
> 
> Thanks and regards,
> Simon
> 
> 
>> Regards,
>> Yann E. MORIN.
>>
>>>           if test ! -e $($(PKG)_DL_DIR)/`basename $$p` ; then \
>>>               $(call MESSAGE,"Downloading") ; \
>>>               break ; \
>>> -- 
>>> 2.47.0
>>>
>>> _______________________________________________
>>> buildroot mailing list
>>> buildroot at buildroot.org
>>> https://lists.buildroot.org/mailman/listinfo/buildroot
> _______________________________________________
> buildroot mailing list
> buildroot at buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot



More information about the buildroot mailing list