From nobody Sat Dec 4 02:09:42 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 AF54A18B98C5 for ; Sat, 4 Dec 2021 02:09:54 +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 4J5Y6p2GJ4z3slm for ; Sat, 4 Dec 2021 02:09:53 +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 1B429hZt096960; Sat, 4 Dec 2021 11:09:44 +0900 (JST) (envelope-from junchoon@dec.sakura.ne.jp) Date: Sat, 4 Dec 2021 11:09:42 +0900 From: Tomoaki AOKI To: freebsd-current@freebsd.org Cc: jbtakk@iherebuywisely.com Subject: Re: Make etcupdate bootstrap requirement due to previous mergemaster usage more clear in handbook Message-Id: <20211204110942.11553b693b165364f3ab31c0@dec.sakura.ne.jp> In-Reply-To: References: <56a60a9b-3d7f-b29e-6074-71078f4b0fe6@quip.cz> 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: 4J5Y6p2GJ4z3slm 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 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. It would be because the same trees are used for dry-run and actual run. (Not looked into the code. Just a thought.) Maybe using dedicated trees (older one is copied from actual current one, building current tree on dedicated place and delete them every time the dry-run finishes) for dry-run would fix. And copying /etc to some temporary place and applying changes to it, copy back to /etc may be help for your issue, I think. -- Tomoaki AOKI