On 29/04/2023 04:05, Tomoaki AOKI wrote:
On Thu, 27 Apr 2023 11:21:06 +0200
Miroslav Lachman <[email protected]> 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