wget2
I have been using YP/OE for the longest time with Fedora. I most recently upgraded my build system to FC40. FC40 replaces wget with wget2. FTP support was removed from wget2 for good reasons.
YP versions before Scarthgap used the flag --passive-ftp by default even if the protocol used was not ftp. Since wget2 does not support ftp it also does not support (or ignore, for that matter) this option. It fails. From Scarthgap on the --passive-ftp is only added if the protocol is indeed ftp or ftps.
So far so good. However, there is another subtle issue with wget2: it does not like relative path components in paths provided with the -P option. It normalizes paths if there's one and only one relative path component at the beginning of the path:
* -P ./downloads works
* -P ../downloads works
* -P ../../downloads does not work (Internal error: Unexpected relative path: '../..')
* -P ./../downloads does not work (Internal error: Unexpected relative
path: './..')
* -P /home/user/downloads/../downloads does not work (Internal error:
Unexpected relative path: '/home/user/downloads/..')
I am commonly using DL_DIR = "${TOPDIR}/../../downloads" to set a shared download directory for different projects. Of course I could replace the relative path with an absolute one.
The culprit is the function mkdir_path in utils.c which attempts to create the path components to download the files to. This would make sense when wget2 needs to download a directory structure from a server but technically it should only create the path components relative to -P.
Of course, this is not the right mailing list to complain about wget2. I have submitted a ticket: https://gitlab.com/gnuwget/wget2/-/issues/667. However, it might be of interest to the YP community since other distros might have already or might be in the future moving to wget2.
A Bitbake solution would be to normalize the path in the fetcher.
Thanks,
Rudi
Quoted 32 lines · Rudolf J Streif via lists.openembedded.org
I have been using YP/OE for the longest time with Fedora. I most recently upgraded my build system to FC40. FC40 replaces wget with wget2. FTP support was removed from wget2 for good reasons.
even if the protocol used was not ftp. Since wget2 does not support ftp it also does not support (or ignore, for that matter) this option. It fails. From Scarthgap on the --passive-ftp is only added if the protocol is indeed ftp or ftps.
So far so good. However, there is another subtle issue with wget2: it does not like relative path components in paths provided with the -P option. It normalizes paths if there's one and only one relative path component at the beginning of the path:
* -P ./downloads works
* -P ../downloads works
* -P ../../downloads does not work (Internal error: Unexpected relative path: '../..')
* -P ./../downloads does not work (Internal error: Unexpected relative path: './..')
* -P/home/user/downloads/../downloadsdoes not work (Internal
error: Unexpected relative path: '/home/user/downloads/..')
I am commonly usingDL_DIR= "${TOPDIR}/../../downloads" to set a shared download directory for different projects. Of course I could replace the relative path with an absolute one.
The culprit is the functionmkdir_pathinutils.cwhich attempts to create the path components to download the files to. This would make sense when wget2 needs to download a directory structure from a server but technically it should only create the path components relative to -P.
Quoted 8 lines
Of course, this is not the right mailing list to complain about wget2. I have submitted a ticket:
https://gitlab.com/gnuwget/wget2/-/issues/667. However, it might be of interest to the YP community since other distros might have already or might be in the future moving to wget2.
A Bitbake solution would be to normalize the path in the fetcher.
Thanks for sharing, this should stop anyone else trying to track down this problem! It does sound a pain to get to the bottom of.
I'd accept a patch to bitbake to resolve the path names to work around this problem as I suspect more people are going to start running into this. Did you happen to have such a patch?
Cheers,
Richard
Quoted 44 lines · Richard Purdie
Quoted 33 lines · Rudolf J Streif via lists.openembedded.org
I have been using YP/OE for the longest time with Fedora. I most
recently upgraded my build system to FC40. FC40 replaces wget with wget2. FTP support was removed from wget2 for good reasons.even if the protocol used was not ftp. Since wget2 does not support ftp it also does not support (or ignore, for that matter) this option. It fails. From Scarthgap on the --passive-ftp is only added if the protocol is indeed ftp or ftps.
So far so good. However, there is another subtle issue with wget2: it does not like relative path components in paths provided with the -P option. It normalizes paths if there's one and only one relative path component at the beginning of the path:
* -P ./downloads works
* -P ../downloads works
* -P ../../downloads does not work (Internal error: Unexpected
relative path: '../..')
* -P ./../downloads does not work (Internal error: Unexpected
relative path: './..')
* -P/home/user/downloads/../downloadsdoes not work (Internal
error: Unexpected relative path: '/home/user/downloads/..')I am commonly using
DL_DIR= "${TOPDIR}/../../downloads" to set a shared download directory for different projects. Of course I could replace the relative path with an absolute one.The culprit is the function
mkdir_pathinutils.cwhich attempts to create the path components to download the files to. This would make sense when wget2 needs to download a directory structure from a server but technically it should only create the path components relative to -P.Quoted 7 lines
Of course, this is not the right mailing list to complain about wget2. I have submitted a ticket:
https://gitlab.com/gnuwget/wget2/-/issues/667. However, it might be of interest to the YP community since other distros might have already or might be in the future moving to wget2.A Bitbake solution would be to normalize the path in the fetcher.
Thanks for sharing, this should stop anyone else trying to track down this problem! It does sound a pain to get to the bottom of.
Quoted 8 lines
I'd accept a patch to bitbake to resolve the path names to work around this problem as I suspect more people are going to start running into this. Did you happen to have such a patch?
Cheers,
Richard
Thank you, Richard. I submitted a patch. Please let me know if acceptable.
Cheers,
Rudi
Quoted 1 line
Quoted 10 lines · Rudolf J Streif
Quoted 10 lines
Thanks for sharing, this should stop anyone else trying to track down
this problem! It does sound a pain to get to the bottom of.I'd accept a patch to bitbake to resolve the path names to work around
this problem as I suspect more people are going to start running into
this. Did you happen to have such a patch?
Quoted 6 lines
Quoted 4 lines
Cheers,
Richard
Thank you, Richard. I submitted a patch. Please let me know if acceptable.
It looked good me and passed testing so it has merged, thanks.
Cheers,
Richard