From nobody Sat Apr 29 07:10:53 2023 X-Original-To: stable@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 4Q7gcK1zjsz48bJp for ; Sat, 29 Apr 2023 07:10:57 +0000 (UTC) (envelope-from SRS0=25Fu=AU=quip.cz=000.fbsd@elsa.codelab.cz) Received: from elsa.codelab.cz (elsa.codelab.cz [94.124.105.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q7gcJ6ts8z3CTj for ; Sat, 29 Apr 2023 07:10:56 +0000 (UTC) (envelope-from SRS0=25Fu=AU=quip.cz=000.fbsd@elsa.codelab.cz) Authentication-Results: mx1.freebsd.org; none Received: from elsa.codelab.cz (localhost [127.0.0.1]) by elsa.codelab.cz (Postfix) with ESMTP id 47794D78B7; Sat, 29 Apr 2023 09:10:55 +0200 (CEST) Received: from [192.168.145.50] (ip-89-177-27-225.bb.vodafone.cz [89.177.27.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by elsa.codelab.cz (Postfix) with ESMTPSA id 8AFDAD789B; Sat, 29 Apr 2023 09:10:54 +0200 (CEST) Message-ID: Date: Sat, 29 Apr 2023 09:10:53 +0200 List-Id: Production branch of FreeBSD source code List-Archive: https://lists.freebsd.org/archives/freebsd-stable List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-stable@freebsd.org X-BeenThere: freebsd-stable@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1 Subject: Re: etcupdate created empty files = system unbootable To: Tomoaki AOKI , stable@freebsd.org References: <312ae63f-4fab-e194-c603-a85fd11f6edd@quip.cz> <20230429110501.36caefa3ba65b7e75bec1c2a@dec.sakura.ne.jp> Content-Language: cs-Cestina, en-US From: Miroslav Lachman <000.fbsd@quip.cz> In-Reply-To: <20230429110501.36caefa3ba65b7e75bec1c2a@dec.sakura.ne.jp> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4Q7gcJ6ts8z3CTj X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:42000, ipnet:94.124.104.0/21, country:CZ] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N 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