Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 8 May 2020 09:12:19 -0700
From:      Bryan Drewery <bdrewery@FreeBSD.org>
To:        Mathieu Arnold <mat@freebsd.org>
Cc:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org, "Conrad E. Meyer" <cem@freebsd.org>
Subject:   Re: svn commit: r533459 - head/Mk/Scripts
Message-ID:  <7e3ab456-f695-efc9-0635-9150ba37c884@FreeBSD.org>
In-Reply-To: <20200506144056.rtx2oygw73qq7rsw@aching.in.mat.cc>
References:  <202004301448.03UEmMwc053196@repo.freebsd.org> <276aef88-4619-b4b7-ee92-44999b5c787d@FreeBSD.org> <20200506144056.rtx2oygw73qq7rsw@aching.in.mat.cc>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--AXXFOtSc1r9SspwrBVWeLP7vslfjTp6ce
Content-Type: multipart/mixed; boundary="YEtUVY1sQDykcv0hPPUc5WBWuno7mxDSi"

--YEtUVY1sQDykcv0hPPUc5WBWuno7mxDSi
Content-Type: text/plain; charset=windows-1252
Content-Language: en-US
Content-Transfer-Encoding: quoted-printable

On 5/6/20 7:40 AM, Mathieu Arnold wrote:
> On Mon, May 04, 2020 at 10:49:34AM -0700, Bryan Drewery wrote:
>> On 4/30/2020 7:48 AM, Mathieu Arnold wrote:
>>> Author: mat
>>> Date: Thu Apr 30 14:48:22 2020
>>> New Revision: 533459
>>> URL: https://svnweb.freebsd.org/changeset/ports/533459
>>>
>>> Log:
>>>   When one patch fails, continue with appling patches.
>>>  =20
>>>   This makes the process of make patch, fix fallout, make makepatch m=
uch
>>>   easier as only one iteration is required.
>>>  =20
>>>   While there, refactor things around, and streamline messages passed=

>>>   between functions.
>>>  =20
>>>   PR:		244626
>>>   Reported by:	cem
>>>
>>
>> Will this fail between stages? If a files/patch-* patch fails it shoul=
d
>> not move on to extra patches as then makepatch / diffing will be wrong=
=2E
>> Even patch-* can lead to being wrong when considering local (not in
>> ports tree) patches.
>>
>> I don't think this is good default behavior.
>=20
> No, it will try to apply all patches, and report all the failures.
>=20
> I am not sure where you are getting at.
>=20
> If you run `make patch; make makepatch` the usage would have been broke=
n
> before and still is.
>=20
> If you run `make patch makepatch`, the usage does not change, if
> patching fails, it does not go into makepatch target, and if patching i=
s
> ok, then makepatch runs and updates your patches.
>=20

Not all patches are made with makepatch which is why I referenced
'diffing'. By 'stages' I mean exactly everything in 'make patch'.

Multiple files in files/ can and do affect the same files in the work
directory. Just applying 2 broken patches with 'make patch' now would be
incredibly confusing and make it difficult to fix each of those patch fil=
es.

A simple example is security/openssh-portable with these 3 files:
  files/patch-servconf.c
  files/extra-patch-hpn
  files/extra-patch-version-addendum

All modify servconf.c. All can fail to apply. Once they do fail it is
impossible to work out the problem and fix any of the patches.

> =3D=3D=3D>  Applying extra patch /root/svn/ports/security/openssh-porta=
ble/files/extra-patch-hpn with -p2
> 1 out of 6 hunks failed--saving rejects to servconf.c.rej
> =3D=3D=3D>  FAILED Applying extra patch /root/svn/ports/security/openss=
h-portable/files/extra-patch-hpn with -p2
> =3D=3D=3D>  Applying extra patch /root/svn/ports/security/openssh-porta=
ble/files/extra-patch-version-addendum
> 1 out of 1 hunks failed--saving rejects to servconf.c.rej
> =3D=3D=3D>  FAILED Applying extra patch /root/svn/ports/security/openss=
h-portable/files/extra-patch-version-addendum
> =3D=3D=3D>  Applying FreeBSD patches for openssh-portable-8.2.p1_1,1
> 1 out of 4 hunks failed--saving rejects to servconf.c.rej
> =3D=3D=3D=3D> FAILED Applying FreeBSD patch patch-servconf.c
> =3D=3D=3D> Cleanly applied FreeBSD patch(es)  patch-auth.c patch-auth2.=
c patch-configure.ac patch-readconf.c patch-regress__test-exec.sh patch-s=
erverloop.c patch-session.c patch-ssh-agent.1 patch-ssh-agent.c patch-ssh=
=2Ec patch-ssh_config patch-ssh_config.5 patch-sshconnect.c patch-sshd.8 =
patch-sshd.c patch-sshd_config patch-sshd_config.5
> =3D=3D=3D> FAILED to apply cleanly FreeBSD patch(es)  patch-servconf.c
> =3D=3D> SOME PATCHES FAILED TO APPLY CLEANLY.

> # ls -al work-default/openssh-8.2p1/servconf.c*
> -rw-r--r--  1 root  wheel  88639 May  8 09:09 work-default/openssh-8.2p=
1/servconf.c
> -rw-r--r--  1 root  wheel  88498 May  8 09:09 work-default/openssh-8.2p=
1/servconf.c.orig
> -rw-r--r--  1 root  wheel    294 May  8 09:09 work-default/openssh-8.2p=
1/servconf.c.rej
> -rw-r--r--  1 root  wheel    130 May  8 09:09 work-default/openssh-8.2p=
1/servconf.c.rej.orig


> # cat work-default/openssh-8.2p1/servconf.c.rej
> @@ -344,7 +349,7 @@
>         if (options->print_lastlog =3D=3D -1)
>                 options->print_lastlog =3D 1;
>         >x11_forwarding =3D=3D -1)
> -               options->x11_forwarding =3D 0;
> +               options->x11_forwarding =3D 1;
>         if (options->x11_display_offset =3D=3D -1)
>                 options->x11_display_offset =3D 10;
>         if (options->x11_use_localhost =3D=3D -1)

Where do I even start to deal with fixing those 3 patches? It's not
clear which patch even owns that .rej file. And now the file is tainted
with chunks from 3 different patches so it is impossible to create
proper patches again.

=46rom what I've heard and seen this cannot be default. Clearly all of th=
e
impacted cases were not understood before it was committed. Please
revert or change the default.

--=20
Regards,
Bryan Drewery


--YEtUVY1sQDykcv0hPPUc5WBWuno7mxDSi--

--AXXFOtSc1r9SspwrBVWeLP7vslfjTp6ce
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEE+Rc8ssOq6npcih8JNddxu25Gl88FAl61hOcACgkQNddxu25G
l8/Y7wgArpSO+5yJTbggY6D04Vo7ZR0H+EFCKBE5EixbyBJrUBjE5TyI2eF7mCVw
xgOFecLoBB2Sbw6yOlBIS6YmpP11+Ia8thuLUiXxYZX6rrow56lloUxXlNwPr3zT
9lN+yUZs5xjhRRAZOWVK6B4nosMhB7TLwRejVwjoVkY6MJgugJBAY9Opj7xuLVT6
TiS2O4zSzt/vjLmKG3UTd6LkHWl/ERdPj5R/qrbmWzQOGvrNMgX7h2h7UkBwJ2EM
vMjo3kP6lRAd6WmnvtGLMDb9q4QUlNvZMoWD7BiJkX6cBb3Q9OpwtMALqyT4O/Er
bYcm7FIJI4hau5cPXOr0ayuypo6USg==
=sLP0
-----END PGP SIGNATURE-----

--AXXFOtSc1r9SspwrBVWeLP7vslfjTp6ce--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7e3ab456-f695-efc9-0635-9150ba37c884>