From nobody Wed Mar 2 12:50:10 2022 X-Original-To: freebsd-ports@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 51D0119E10ED for ; Wed, 2 Mar 2022 12:50:14 +0000 (UTC) (envelope-from SRS0=arEV=TN=klop.ws=ronald-lists@realworks.nl) Received: from smtp-relay-int.realworks.nl (smtp-relay-int.realworks.nl [194.109.157.24]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4K7v911fnPz4tvt for ; Wed, 2 Mar 2022 12:50:13 +0000 (UTC) (envelope-from SRS0=arEV=TN=klop.ws=ronald-lists@realworks.nl) Date: Wed, 2 Mar 2022 13:50:10 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=klop.ws; s=rw2; t=1646225410; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=sfr9ACPebu27lJLQWPXzriKDebhfwTnVYTjLKPhXJU8=; b=mG22OhVhOWTtsvjvvGUAmmhilUe4oUziZPuBKmhDcncXN8JtQxTGe2R0Zjm+s3l+SjGiIi SVmWClu0DyB0MrxPhyRrjLdBv8NhHMba0V71COwFdGqYhHD9hGYhkqqRAL5hf3RMC97ziA ZUBDFxhaE4LJGTcS6lgNMx39fck0+AXynbzoiBRKwehd3O3c/V054etdzrtW5ozA7DFz8q QC6fvMWiJlaI4+s7d1lRZes4hZEPOb1pS7vfT+FtFqfhtEGykdXO4PTa4csRcphzNkGqyO lL+yDjjITXWLxZAInoeT6l9eoab0elW/Nd41Xpd/spdWGa8a7GCzxHt1GURN/Q== From: Ronald Klop To: Aristedes Maniatis Cc: freebsd-ports@FreeBSD.org Message-ID: <1280484425.1.1646225410328@mailrelay> In-Reply-To: <73971ae1-ea72-311b-bd53-0532aa6cdbd0@ish.com.au> References: <378a27ca-dbfe-d6f4-45f6-2ff90265874e@ish.com.au> <73971ae1-ea72-311b-bd53-0532aa6cdbd0@ish.com.au> Subject: Re: pkgs contain non URL safe characters List-Id: Porting software to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-ports List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-ports@freebsd.org X-BeenThere: freebsd-ports@freebsd.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_0_103299140.1646225405257" X-Mailer: Realworks (599.193.27dd2eb) Importance: Normal X-Priority: 3 (Normal) X-Rspamd-Queue-Id: 4K7v911fnPz4tvt X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=klop.ws header.s=rw2 header.b=mG22OhVh; dmarc=pass (policy=quarantine) header.from=klop.ws; spf=pass (mx1.freebsd.org: domain of "SRS0=arEV=TN=klop.ws=ronald-lists@realworks.nl" designates 194.109.157.24 as permitted sender) smtp.mailfrom="SRS0=arEV=TN=klop.ws=ronald-lists@realworks.nl" X-Spamd-Result: default: False [-3.08 / 15.00]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:194.109.157.0/24]; DKIM_TRACE(0.00)[klop.ws:+]; RCPT_COUNT_TWO(0.00)[2]; HAS_X_PRIO_THREE(0.00)[3]; NEURAL_HAM_SHORT(-1.00)[-0.999]; DMARC_POLICY_ALLOW(-0.50)[klop.ws,quarantine]; FORGED_SENDER(0.30)[ronald-lists@klop.ws,SRS0=arEV=TN=klop.ws=ronald-lists@realworks.nl]; RCVD_COUNT_ZERO(0.00)[0]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:3265, ipnet:194.109.0.0/16, country:NL]; FROM_NEQ_ENVFROM(0.00)[ronald-lists@klop.ws,SRS0=arEV=TN=klop.ws=ronald-lists@realworks.nl]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.89)[-0.885]; R_DKIM_ALLOW(-0.20)[klop.ws:s=rw2]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MLMMJ_DEST(0.00)[freebsd-ports]; MID_RHS_NOT_FQDN(0.50)[] X-ThisMailContainsUnwantedMimeParts: N ------=_Part_0_103299140.1646225405257 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable =20 Van: Aristedes Maniatis Datum: woensdag, 2 maart 2022 04:03 Aan: Ronald Klop , 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  

Van: Aristedes Maniatis <ari@ish.com.au>
Datum: woensdag, 2 maart 2022 04:03
Aan: Ronald Klop <ronald-lists@klop.ws>, freebsd-por= ts@FreeBSD.org
Onderwerp: Re: pkgs contain non URL safe characters


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/freeb= sd/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)
>            &nbs= p;    }
>            &nbs= p;    u->doc =3D doc;
>            &nbs= p;    while (*p !=3D '\0') {
> -           &nb= sp;           if (!isspac= e((unsigned char)*p)) {
> +           &nb= sp;           if (!isspac= e((unsigned char)*p) && *p !=3D '+') {
>            &nbs= p;            &= nbsp;       *doc++ =3D *p++;
>            &nbs= p;            } else= {
>            &nbs= p;            &= nbsp;       *doc++ =3D '%';
>

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.

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.


If the openjdk port maintainers are on this list, please consider removing = the + from the package names. An underscore might do equally well.


Thanks for your help and insight.

Ari
 



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.

  ------=_Part_0_103299140.1646225405257--