From nobody Thu Jun 15 17:57:26 2023 X-Original-To: freebsd-current@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 4Qhqkw1wfnz4ddPn for ; Thu, 15 Jun 2023 17:57:44 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (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-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Qhqkw1CqYz4cgX; Thu, 15 Jun 2023 17:57:44 +0000 (UTC) (envelope-from dim@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1686851864; 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=fEsmDZxnLEMpcIlDvchbkUMTNeyA3Ce+ebSwNUwdPnk=; b=Fb3jgAMy9lV/kNeD1En4NMkV4SYozkZ5Lz4GEFP594IPsbKjXnwhYXbHCTy6ee6XHnFzgv cGmUN2CDc552aU7LtNDwkSWBwgGra/C5L9lroNGS42l3MEZCzqKTaFwp61u9VwiUtanc2U Cb+tXn9m6V5eoL5QcJZm+tDr9vtXnTM/3npY8/4xfIkfg+0I7KREq6+e9h4KHA3KlflL1t HPVuOHCgZAmHxDDC+MZR+LOPfVYBvqG0Ua2jyHMXaGKoL/dti5iROE2J2VIUB3IEqXwKRm KQ35IC7gznd6YJ0kYV3Eb2fC25dlqukVeRJaCBmClpsoOKU5X61Zeje4qGQNbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1686851864; 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=fEsmDZxnLEMpcIlDvchbkUMTNeyA3Ce+ebSwNUwdPnk=; b=j97/BuHEy5xGK+5i6+8JNXojdrPgfJtoa0xgtq8lSW38r0GaxdEXRt2A6dkODQnqVhc4G4 /IHzyTciiLhMfeU58K/SVcXPMd9yaPh2YYrJxWgZw4/va2txdv5r/ALqwJznClbUvsT4FS bs/3fNa6FnldvkdXwQxLmmLbs/Pb8JPBYruHxm0l9hkl/ghgaX2yHvH7/Menui49IgfX66 +d01IX+G3zyNbrAQ5EiESOwHePyNVG2+W3/QHMZCiZYnucFQ+0XT9Rsjr81yAVdIH4GCN6 JHgDq3HYXqlBtZZZXrgAI5vGp3WCvsNls8SLDjtfywnBGAnpMB1/6Wvhj82jGQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1686851864; a=rsa-sha256; cv=none; b=TeYIPMLOdO0AJVNY1j0Ei39EyL9DRRz92+iQqEA5e4o1QQSVcPx270E/NQwQxRYMwUbcKd y0O++sn+hds2NH+mxMV5kPgkX8Dadyu+0ZX8j57LEitP/LA4BYz4yxosAjSVEBSDGTF+Vv vx04WNJiAYIB7dfJ9q2VTGS5ElXSyoTxOb44Sho/RmGgCqVMsdeO1C/98lxqWs+DRPhEFj H9J3Wqf6czNJW4tfYhST8GjjY8e9CUF6//TI/kyoaqy9S9+v38SAVh7/1e5dqwgdYPYQLG spMoRGdbWF8mWgX40r/EZ0YUqO0kzRG2bIfJshjKrJu4oaPXMX7IP/QhsYI0RQ== Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) (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-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "tensor.andric.com", Issuer "R3" (verified OK)) (Authenticated sender: dim) by smtp.freebsd.org (Postfix) with ESMTPSA id 4Qhqkv6ffJzx5j; Thu, 15 Jun 2023 17:57:43 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from smtpclient.apple (longrow-wifi.home.andric.com [192.168.0.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id B4374634BF; Thu, 15 Jun 2023 19:57:42 +0200 (CEST) Content-Type: multipart/signed; boundary="Apple-Mail=_D0991D83-38F2-4E98-8888-AA0FBB75B04B"; protocol="application/pgp-signature"; micalg=pgp-sha1 List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.600.7\)) Subject: Re: Using etcupdate resolve, was Re: Surprise null root password From: Dimitry Andric In-Reply-To: Date: Thu, 15 Jun 2023 19:57:26 +0200 Cc: Current FreeBSD Message-Id: <97A6FA2D-73D4-41F7-83E2-EB2BD3D6C962@FreeBSD.org> References: <8721FE04-3769-473C-BAAD-EB0A4FCFA1D7.ref@yahoo.com> <8721FE04-3769-473C-BAAD-EB0A4FCFA1D7@yahoo.com> To: bob prohaska X-Mailer: Apple Mail (2.3731.600.7) X-ThisMailContainsUnwantedMimeParts: N --Apple-Mail=_D0991D83-38F2-4E98-8888-AA0FBB75B04B Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On 15 Jun 2023, at 19:26, bob prohaska wrote: >=20 > Here's an example of the puzzles faced when using etcupdate > that have so far proved baffling: >=20 > On running etcupdate resolve, the system reports >=20 > Resolving conflict in '/etc/mtree/BSD.tests.dist': > Select: (p) postpone, (df) diff-full, (e) edit, > (h) help for more options: df > --- /etc/mtree/BSD.tests.dist 2023-05-29 08:29:48.174762000 -0700 > +++ /var/db/etcupdate/conflicts/etc/mtree/BSD.tests.dist 2023-06-13 = 22:55:04.284491000 -0700 > @@ -442,6 +442,16 @@ > .. > ifconfig > .. > +<<<<<<< yours > +||||||| original > + md5 > + .. > +=3D=3D=3D=3D=3D=3D=3D > + ipfw > + .. > + md5 > + .. > +>>>>>>> new > mdconfig > .. > nvmecontrol > Select: (p) postpone, (df) diff-full, (e) edit, > (h) help for more options: e Apparently etcupdate has concluded that you have modified BSD.tests.dist from its original version. If you know for sure that you never modified that file, it is easier to simply accept the "upstream" changes, by typing "tf" (for "theirs-full") in the Select: prompt. NOTE: NEVER do that for /etc/master.passwd and other important files in /etc, at least not without backing them up! In any case, like other three-way merging tools, it tries to piece = together three parts: 1) the version of the file you actually have on disk 2) the old version from upstream 3) the new version from upstream The 1) part is displayed from "<<<<<<<" onwards, the 2) part is displayed from "|||||||" onwards, and the 3) part is displayed from "=3D=3D=3D=3D=3D=3D=3D" until the final ">>>>>>>". As long as 1) and 2) are exactly equal, etcupdate can simply apply the diff between 2) and 3) without any problems, and you don't have to do anything However, once you start editing 1), it can not always automatically apply the diff between 2) and 3), specifically when you have edited the part(s) affected by that diff. In that case, it shows the type of prompt you listed above. Typically, a human has to look at the 'yours' (1), 'original' (2) and 'new' (3) sections, and figure out what the result should be. For example, in the above case, it seems that you deleted the "md5" and ".." lines from the BSD.tests.dist file, and since the update tries to add new "ipfw" and ".." lines just above that, it does not know what to do. If you intentionally got rid of the "md5' and ".." lines, you can remove those from the 'new' section, and leave only the 'new' section. Resulting in: .. ifconfig .. ipfw .. mdconfig .. nvmecontrol And then this particular conflict has been resolved. If you use git a lot, you get *very* familiar with this process. :-) There are also lots of third-party tools to help you graphically resolve these so-called three-way merges, see for example = . -Dimitry --Apple-Mail=_D0991D83-38F2-4E98-8888-AA0FBB75B04B Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.2 iF0EARECAB0WIQR6tGLSzjX8bUI5T82wXqMKLiCWowUCZItRBgAKCRCwXqMKLiCW o4ASAKD0gPFjhl4V6iat4VSRiO3fEIc/ogCeKVgAPnMj/j+zURMZVCp9Ed9aTMM= =1ex4 -----END PGP SIGNATURE----- --Apple-Mail=_D0991D83-38F2-4E98-8888-AA0FBB75B04B--