From nobody Wed Dec 08 21:55:54 2021 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 8D16518C28D5 for ; Wed, 8 Dec 2021 21:56:05 +0000 (UTC) (envelope-from junchoon@dec.sakura.ne.jp) Received: from www121.sakura.ne.jp (www121.sakura.ne.jp [153.125.133.21]) (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 4J8WFd1D3Dz3w1r; Wed, 8 Dec 2021 21:56:04 +0000 (UTC) (envelope-from junchoon@dec.sakura.ne.jp) Received: from kalamity.joker.local (123-48-130-181.area1b.commufa.jp [123.48.130.181]) (authenticated bits=0) by www121.sakura.ne.jp (8.16.1/8.16.1/[SAKURA-WEB]/20201212) with ESMTPA id 1B8Ltsvo023423; Thu, 9 Dec 2021 06:55:55 +0900 (JST) (envelope-from junchoon@dec.sakura.ne.jp) Date: Thu, 9 Dec 2021 06:55:54 +0900 From: Tomoaki AOKI To: freebsd-current@freebsd.org Cc: John Baldwin , jbtakk@iherebuywisely.com, Stefan Esser Subject: Re: Make etcupdate bootstrap requirement due to previous mergemaster usage more clear in handbook Message-Id: <20211209065554.7fd8a79b48f97608b07d8343@dec.sakura.ne.jp> In-Reply-To: <98af77aa-628d-5fce-7618-36b1edaa405b@FreeBSD.org> References: <56a60a9b-3d7f-b29e-6074-71078f4b0fe6@quip.cz> <20211204110942.11553b693b165364f3ab31c0@dec.sakura.ne.jp> <98af77aa-628d-5fce-7618-36b1edaa405b@FreeBSD.org> Organization: Junchoon corps X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; amd64-portbld-freebsd13.0) 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 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4J8WFd1D3Dz3w1r X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: N On Wed, 8 Dec 2021 09:11:05 -0800 John Baldwin wrote: > On 12/3/21 6:09 PM, Tomoaki AOKI wrote: > > On Fri, 03 Dec 2021 05:54:37 -0800 (PST) > > "Jeffrey Bouquet" wrote: > > > >> > >> > >> On Fri, 3 Dec 2021 13:58:39 +0100, Miroslav Lachman <000.fbsd@quip.cz> wrote: > >> > >>> On 03/12/2021 12:52, Yetoo Happy wrote: > >>> > >>> [...] > >>> > >>>> Quick Start* and follow the instructions and get to step > >>>> 7 and may think that even though etcupdate is different from mergemaster > >>>> from the last time they used the handbook they have faith that following > >>>> the instructions won't brick their system. This user will instead find that > >>>> faith in general is just a very complex facade for the pain and suffering > >>>> of not following *24.5.6.1 Merging Configuration Files* because the user > >>>> doesn't know that step exists or relevant to the current step and ends up > >>>> unknowingly having etcupdate append "<<<< yours ... >>>>> new" to the top > >>>> of the user's very important configuration files that they didn't expect > >>>> the program to actually modify that way when they resolved differences nor > >>>> could they predict easily because the diff format is so unintuitive and > >>>> different from mergemaster. Now unable to login or boot into single user > >>>> mode because redirections instead of the actual configuration is parsed the > >>>> user goes to the handbook to find out what might have happened and scrolls > >>>> down to find *24.5.6.1 Merging Configuration Files* is under *24.5.6. > >>> > >>> [...] > >>> > >>> That's why I think etcupdate is not so intuitive as tool like this > >>> should be and etcupdate is extremely dangerous because it intentionally > >>> breaks syntax of files vital to have system up and running. > >>> If anything goes wrong with mergemaster automatic process then your have > >>> configuration not updated which is almost always fine to boot the system > >>> and fix it. But after etcupdate? Much worse... > >>> > >>> I maintain about 30 machines for 2 decades and had problems with > >>> etcupdate many times. I had ti use mergemaster as fall back many times. > >>> Mainly because of etcupdate said "Reference tree to diff against > >>> unavailable" or "No previous tree to compare against, a sane comparison > >>> is not possible.". And sometimes because etcupdate cannot automatically > >>> update many files in /etc/rc.d and manual merging of a lot of files with > >>> "<<<< ==== >>>>" is realy painful while with mergemaster only simple > >>> keyboard shortcuts will solve it. > >>> All of this must be very stressful for beginners. > >>> > >>> So beside the update of documentation I really would like to see some > >>> changes to etcupdate workflow where files are modified in temporary > >>> location and moved to destination only if they do not contain any syntax > >>> breaking changes like <<<<, ====, >>>>. > >>> > >>> Kind regards > >>> Miroslav Lachman > >> > >> > >> Agree. I fell back to mergemaster this Nov on 13-stable when the /var files > >> pertaining to etcupdate were all missing current /etc data, and no study of > >> man etcupdate was clear enough to rectify such a scenario, and suspect my > >> initial use of etcupdate will or may require a planned reinstall, not having > >> had to do so since Jan 2004 iirc, [ vs failed hard disk migrations ] and > >> I am just hoping mergemaster stays in /usr/src and updated > >> for system changes, even if moved to 'tools' or > >> something, since its use seems intuitive and much less of a black box. > >> Also, /usr/src/UPDATING still at the bottom emphasizes mergemaster still. > >> > > > > Not sure it's fixed or not (tooo dangerous to try...), -n (dry-run) > > option of etcupdate is now quite harmful. Maybe by any commit done in > > this april on main (MFC'ed to stable/13 in june). > > > > *I got busy manually checking and applying changes to /etc, and > > forgot to file PR. > > > > Doing `etcupdate -n` itself runs OK, but following `etcupdate -B` does > > NOT do anything, hence nothing is actually updated. > > The only workaround I have is NOT to try dry-run. > > Humm. > > > It would be because the same trees are used for dry-run and actual run. > > (Not looked into the code. Just a thought.) > > So the new changes always build a temporary tree (vs trying to build > /var/db/etupdate/current in place). For -n it should be that it just > doesn't change /var/db/etcupdate/current at the end, but if it did the > move anyway that would explain the bug you are seeing. That does indeed > look broken. Please file a PR as a reminder for me to fix it. > > -- > John Baldwin > Done. https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=260281 -- Tomoaki AOKI