Date: Sat, 29 Apr 2023 09:10:53 +0200 From: Miroslav Lachman <000.fbsd@quip.cz> To: Tomoaki AOKI <junchoon@dec.sakura.ne.jp>, stable@freebsd.org Subject: Re: etcupdate created empty files = system unbootable Message-ID: <ffb3419a-974a-2008-868f-500dd23ec32e@quip.cz> In-Reply-To: <20230429110501.36caefa3ba65b7e75bec1c2a@dec.sakura.ne.jp> References: <312ae63f-4fab-e194-c603-a85fd11f6edd@quip.cz> <20230429110501.36caefa3ba65b7e75bec1c2a@dec.sakura.ne.jp>
next in thread | previous in thread | raw e-mail | index | archive | help
On 29/04/2023 04:05, Tomoaki AOKI wrote: > On Thu, 27 Apr 2023 11:21:06 +0200 > Miroslav Lachman <000.fbsd@quip.cz> wrote: [..] >> Question number 1: How etcupdate can go so horribly wrong to put empty >> files in /etc/ and make system unbootable? >> >> Question number 2: What's the right way to fix this with etcupdate now? >> >> # etcupdate >> Failed to build new tree. >> >> I don't know if I am alone but I definitely have more problems with >> etcupdate in a few years of usage instead on mergemaster. I don't >> remember so many errors, unhandled automatic updates or syntax errors in >> important files with mergmeaster in about 15 years. >> >> Kind regards >> Miroslav Lachman > > Just a hint to Question number 2. > > /usr/sbin/etcupdate is a sh script, not a binary file. > And error message "Failed to build new tree." is at line 255 > (in function extract_tree()). > > This is emitted when function build_tree() failed. > It could happen on some situation, but maybe likely happen when > working directory of etcupdate (/var/db/etcupdate by default) > is out of space, or missingly ran etcupdate with non-root user. "Failed to build new tree." was my error - /usr/src and /usr/obj was not mounted after partial rescue boot. [1] But even if src and obj was mounted and etcupdate does not complain anymore I was not able to fix files in /etc/ by etcupdate. So the question remains - is it even possible to fix broken /etc/ with etcupdate? I tried it with clean /var/db/etcupdate too but without success. Only mergemaster fixed it. [1] printed error message is not useful at all but log file has the hint: # cat /var/db/etcupdate/log >>> update command: rerun= tarball= preworld= >>> Building tree at /var/db/etcupdate/etcupdate-2IsVQLL with make -DNO_FILEMON make: don''t know how to make distrib-dirs. Stop make: stopped in /usr/src Kind regards Miroslav Lachman
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ffb3419a-974a-2008-868f-500dd23ec32e>