Date: Wed, 2 Mar 2022 13:50:10 +0100 (CET) From: Ronald Klop <ronald-lists@klop.ws> To: Aristedes Maniatis <ari@ish.com.au> Cc: freebsd-ports@FreeBSD.org Subject: Re: pkgs contain non URL safe characters Message-ID: <1280484425.1.1646225410328@mailrelay> In-Reply-To: <73971ae1-ea72-311b-bd53-0532aa6cdbd0@ish.com.au> References: <e4f8bec4-e2c7-154c-0e49-109718782725@ish.com.au> <e0aea756-b7c3-b9bf-9dc7-b34c91399b31@ish.com.au> <e4f364c7-a2ef-7b03-77af-2d8dd8299b80@klop.ws> <378a27ca-dbfe-d6f4-45f6-2ff90265874e@ish.com.au> <ad3f17b6-d946-fbb6-493b-4899c985bff6@klop.ws> <73971ae1-ea72-311b-bd53-0532aa6cdbd0@ish.com.au>
next in thread | previous in thread | raw e-mail | index | archive | help
------=_Part_0_103299140.1646225405257 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable =20 Van: Aristedes Maniatis <ari@ish.com.au> Datum: woensdag, 2 maart 2022 04:03 Aan: Ronald Klop <ronald-lists@klop.ws>, freebsd-ports@FreeBSD.org Onderwerp: Re: pkgs contain non URL safe characters >=20 >=20 > On 1/3/2022 10:57pm, Ronald Klop wrote: > > > > You could try the untested patch below as "compatibility fix", but I'm = > not sure if that will not break other valid URLs passed to fetch/pkg. > > Apparently pkg embeds libfetch statically: > https://github.com/freebsd= /pkg/tree/master/external/libfetch . > > This patch is against the FreeBSD base. > > > > diff --git a/lib/libfetch/fetch.c b/lib/libfetch/fetch.c > > index 82a3c5e451a..496425cea47 100644 > > --- a/lib/libfetch/fetch.c > > +++ b/lib/libfetch/fetch.c > > @@ -451,7 +451,7 @@ fetchParseURL(const char *URL) > > } > > u->doc =3D doc; > > while (*p !=3D '\0') { > > - if (!isspace((unsigned char)*p)) { > > + if (!isspace((unsigned char)*p) && *p !=3D '+')= { > > *doc++ =3D *p++; > > } else { > > *doc++ =3D '%'; > > >=20 > Thanks for that. I think there are both static and normal versions of pkg= . The static binary is at pkg-static for bootstrapping a system which might= be missing libraries. >=20 > Since I don't want to be patching the system libs on all our servers, I t= hink I'll keep my poudriere hook hack for now. >=20 >=20 > If the openjdk port maintainers are on this list, please consider removin= g the + from the package names. An underscore might do equally well. >=20 >=20 > Thanks for your help and insight. >=20 > Ari > =20 >=20 >=20 >=20 Hi, I improved the patch which would make libfetch more compatible with broken = servers like your example. It is currently in https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D2622= 83 . I have no idea when the maintainer of libfetch has time for this. His = first reaction in private mail was that it looked ok. If that patch is acce= pted in base it will be needed for the https://github.com/freebsd/pkg maint= ainer to update the copy of libfetch in pkg (and release a new version) bef= ore you can use it. So even if all signs go green eventually, you can hold on to your poudriere= hook hack for a while. =F0=9F=98=89 Regards, Ronald. =20 ------=_Part_0_103299140.1646225405257 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable <html><head></head><body> <p><strong>Van:</strong> Aristedes Maniatis <ari@ish.com.au><br /> <strong>Datum:</strong> woensdag, 2 maart 2022 04:03<br /> <strong>Aan:</strong> Ronald Klop <ronald-lists@klop.ws>, freebsd-por= ts@FreeBSD.org<br /> <strong>Onderwerp:</strong> Re: pkgs contain non URL safe characters</p> <blockquote style=3D"padding-right: 0px; padding-left: 5px; margin-left: 5p= x; border-left: #000000 2px solid; margin-right: 0px"> <div class=3D"MessageRFC822Viewer" id=3D"P"> <div class=3D"TextPlainViewer" id=3D"P.P"><br /> On 1/3/2022 10:57pm, Ronald Klop wrote:<br /> ><br /> > You could try the untested patch below as "compatibility fix"= ;, but I'm > not sure if that will not break other valid URLs passed to = fetch/pkg.<br /> > Apparently pkg embeds libfetch statically: > <a href=3D"https://git= hub.com/freebsd/pkg/tree/master/external/libfetch">https://github.com/freeb= sd/pkg/tree/master/external/libfetch</a> .<br /> > This patch is against the FreeBSD base.<br /> ><br /> > diff --git a/lib/libfetch/fetch.c b/lib/libfetch/fetch.c<br /> > index 82a3c5e451a..496425cea47 100644<br /> > --- a/lib/libfetch/fetch.c<br /> > +++ b/lib/libfetch/fetch.c<br /> > @@ -451,7 +451,7 @@ fetchParseURL(const char *URL)<br /> > &nbs= p; }<br /> > &nbs= p; u->doc =3D doc;<br /> > &nbs= p; while (*p !=3D '\0') {<br /> > - &nb= sp; if (!isspac= e((unsigned char)*p)) {<br /> > + &nb= sp; if (!isspac= e((unsigned char)*p) && *p !=3D '+') {<br /> > &nbs= p; &= nbsp; *doc++ =3D *p++;<br /> > &nbs= p; } else= {<br /> > &nbs= p; &= nbsp; *doc++ =3D '%';<br /> ><br /> <br /> Thanks for that. I think there are both static and normal versions of pkg. = The static binary is at pkg-static for bootstrapping a system which might b= e missing libraries.<br /> <br /> Since I don't want to be patching the system libs on all our servers, I thi= nk I'll keep my poudriere hook hack for now.<br /> <br /> <br /> If the openjdk port maintainers are on this list, please consider removing = the + from the package names. An underscore might do equally well.<br /> <br /> <br /> Thanks for your help and insight.<br /> <br /> Ari<br /> </div> <hr /></div> </blockquote> <br /> <br /> Hi,<br /> <br /> I improved the patch which would make libfetch more compatible with broken = servers like your example.<br /> It is currently in https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D2622= 83 . I have no idea when the maintainer of libfetch has time for this. His = first reaction in private mail was that it looked ok. If that patch is acce= pted in base it will be needed for the https://github.com/freebsd/pkg maint= ainer to update the copy of libfetch in pkg (and release a new version) bef= ore you can use it.<br /> So even if all signs go green eventually, you can hold on to your poudriere= hook hack for a while. =F0=9F=98=89<br /> <br /> Regards,<br /> Ronald.<br /> <br /> </body></html> ------=_Part_0_103299140.1646225405257--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1280484425.1.1646225410328>