From nobody Sun Nov 06 09:04:45 2022 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 4N4pNJ73kdz4gfB7 for ; Sun, 6 Nov 2022 09:05:04 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic317-22.consmr.mail.gq1.yahoo.com (sonic317-22.consmr.mail.gq1.yahoo.com [98.137.66.148]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 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 4N4pNH4GJtz3p0s for ; Sun, 6 Nov 2022 09:05:03 +0000 (UTC) (envelope-from marklmi@yahoo.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1667725501; bh=f6a9Ld8g+zeC52CX+wkdrkAWAvOh7iMViUCdYv3l/JE=; h=From:Subject:Date:To:References:From:Subject:Reply-To; b=eh5WgmKb1mCfcI3ucqIi1K+nimWDAmkJDVaqSEkxgvAgiryYwTziQyQe1Av/TcP1UAUGxwFc0J1mhQJ+RpPfid8/Ml9/4BTWBp1l/vmiYrCkyGAO36X3/5abRml70YaaGm89tJQ/rH83UU0spNDYhL58yi7yGFJvUkpzN2vqmJTW7mbJQymYitLTjdTyRXJDcHHBwrvNmxqHDqEHokQ2OPu08WfQlzhj2jrNQPxn7L8fO5h2cj1rQhQPc5/VxXnG8mPzJpep+px4BS55zpf0DDoPHpGn208I1DioXmQP4iZY4FVhV29FqhS/d9Ka5ZvaDoQzus3V9RjPh2Mw240J1g== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1667725501; bh=gmfBx/xcP2H1mlWD7hvXhoRgcUr1X34dnWXJGjG9f+Y=; h=X-Sonic-MF:From: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4KgfnSdcKkvBy7mau6ikw xfJeo4QVRmLL3qeq6EqVUgwf6SIQWa_zYakXdFCnKyHskY_oh9e.E8QbFgLatzjoFu5muYq0WGhm sX3cS2.QexEsfBORnq0u7cE97wbkz0n1oRgpW0Ig0WIcMUfhn2pW_CM08Y3KZrkSzEJqB7ObelC8 d2Cm5hXRokkcKJoAfOppfP.lhBp2GoPpZFxUaznR9qTxCbvLvW2iqVn83_t7qpp.Lq7jftUOOiy0 WEESLAsJmXGhigScokHBSSFiVEpNt3I49s0T4kA35I5o3FZSTsAfKq69etdD9QupcXWgcwEptGVd wbm8YBPhqWzG4fvILqHEcsGxmsCSnzas8VwJqocIaIp_e5gi73HQ6GFrKaujzel5ZBBDbPQfaBvA m1Y336Ohn02TAThP8VndC.oh02KsC5o0Y1apEX.Zz4MSMDjb1QiuKfdhrp0QegKZcwoMtLMMeLG4 YI_KQRJvPEAUmflC.Xw0uzPjUXQ3ip86tlFIxQDP3yH93kLPOqZbZJHfVO.9cnYM6PpNJeCjptmO y784- X-Sonic-MF: Received: from sonic.gate.mail.ne1.yahoo.com by sonic317.consmr.mail.gq1.yahoo.com with HTTP; Sun, 6 Nov 2022 09:05:01 +0000 Received: by hermes--production-bf1-5878955b5f-f7np2 (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 7846ea7e39dbb75bffabd075f7a9bc3d; Sun, 06 Nov 2022 09:04:58 +0000 (UTC) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable 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 (Mac OS X Mail 16.0 \(3731.200.110.1.12\)) Subject: RE: Seeking an idiot's guide to etcupdate/mergemaster Message-Id: Date: Sun, 6 Nov 2022 01:04:45 -0800 To: bob prohaska , freebsd-current X-Mailer: Apple Mail (2.3731.200.110.1.12) References: X-Rspamd-Queue-Id: 4N4pNH4GJtz3p0s X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=yahoo.com header.s=s2048 header.b=eh5WgmKb; dmarc=pass (policy=reject) header.from=yahoo.com; spf=pass (mx1.freebsd.org: domain of marklmi@yahoo.com designates 98.137.66.148 as permitted sender) smtp.mailfrom=marklmi@yahoo.com X-Spamd-Result: default: False [-3.50 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.998]; MV_CASE(0.50)[]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; MIME_GOOD(-0.10)[text/plain]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_TLS_LAST(0.00)[]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; RCVD_IN_DNSWL_NONE(0.00)[98.137.66.148:from]; TO_DN_ALL(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; FREEMAIL_FROM(0.00)[yahoo.com]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US]; DKIM_TRACE(0.00)[yahoo.com:+]; FROM_EQ_ENVFROM(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; MIME_TRACE(0.00)[0:+]; MLMMJ_DEST(0.00)[freebsd-current@freebsd.org] X-ThisMailContainsUnwantedMimeParts: N bob prohaska wrote on Date: Sun, 06 Nov 2022 03:12:04 UTC : > On Mon, Oct 24, 2022 at 08:32:17PM -0700, Mark Millard wrote: > >=20 > > Your /etc/rc.d/ldconfig script seems to have not been updated > > by use of etcupdate or mergemaster or other such. (How much > > else is also out of date? How much of what you have for /etc/ > > and the like goes back to 2022-Jan-07 or before?) > > >=20 > Alas, that is too true. The system was set up on July 2, 2020 > and I've never managed to make sense of either mergemaster nor > etcupdate. Far as I could tell it didn't matter, the host ran > correctly, until now. >=20 > It's been transplanted to a new hard drive, which allows the > installation of a ports tree. Ports don't install because of > the stale /etc/rc.d/ldconfig file. >=20 > Since no changes have been made to /etc/ apart from /etc/rc.conf > is it possible to simply let mergemaster or etcupdate install > the latest defaults? I have looked at the manpage for etcupdate > and didn't recognize any straightforward way to simply accept > all updates. This particular system is expendable, so I'd be > glad to try things that might not work well, or at all.=20 >=20 > Apologies if I'm being dumb (probably guilty) or lazy (definitely > guilty). The barrage of questions generated by etcupdate and > mergemaster is simply overwhelming. And, I suspect, largely=20 > unnecessary. =20 [We will see if this helps or not . . .] Before worrying about the actual updates, I'd start by just establishing a set of default files to look at. There are 2 contexts overall: A) The source commit vintage for the live system vs. B) The source commit vintage for the update to be installed at some point At this point I'm only dealing with (A). Is your /usr/src/ the proper content for (A)? (B)? Something else? If you do not have a /usr/src/ that is the proper content for (A), then you need to create a directory tree that does contain such a source tree, such as via using git or other such to establish the source tree. I'll refer to: /usr/livesrc/=20 The command: # etcupdate extras -s /usr/livesrc will create: /var/db/etcupdate/current/ There you can look at the various default file contents. More than /etc/ material will be present, for example: /var/db/etcupdate/current/.cshrc /var/db/etcupdate/current/.profile /var/db/etcupdate/current/COPYRIGHT /var/db/etcupdate/current/root/.cshrc /var/db/etcupdate/current/root/.k5login /var/db/etcupdate/current/root/.login /var/db/etcupdate/current/root/.profile /var/db/etcupdate/current/root/.shrc /var/db/etcupdate/current/usr/share/nls/POSIX /var/db/etcupdate/current/usr/share/nls/en_US.US_ASCII /var/db/etcupdate/current/var/crash/minfree Some files that you create or edit might not show up under current/ at all. ( /etc/fstab and /etc/rc.conf would be examples. ) You might not want to look at all the mismatches. But you might want to look at the output of something like: # find -s /var/db/etcupdate/current/ -print | more to see if it reminds you of any files that you do want preserve a copy of the old content of for reference. An example might be: /etc/sysctl.conf There could be others. I'd expect that the following sort of command sequence would mostly replace the live system's files with the defaults (presumes done as root to be sure that files are replaceable): # cd /var/db/etcupdate/current/ # cp -aRx . / However, there might be questions about hard links and softlinks in the from-side or the to-side and how things end up with such involved (after the cp -aRx completes). Note that you may have more build installs around that you might need to be sure that they track, such as directories for chroot use. This can get into using command line options that indicate context so that each context gets its own tracking. It should also change things, like /var/db/etcupdate/current/ to have a path prefix involved: /PATHPREFIX/var/db/etcupdate/current/ As for updates, I have scripts that do something like: # #PRIOR source update and buildworld buildkernel ACTIVITY HERE. # etcupdate . . . -p # etcupdate . . . resolve -p # make . . . installkernel . . . # make . . . installworld . . . # etcupdate # etcupdate resolve # make . . . delete-old check-old -DBATCH_DELETE_OLD_FILES Note: delete-old-libs may need to be in its own time frame, after one is sure that those libraraies are no longer in use so that the delete will not break anything. # etcupdate status # etcupdate resolve However, being paranoid, I use a script that runs each etcupdate command with a context specified. An example is: env __MAKE_CONF=3D"/usr/home/root/src.configs/make.conf" \ SRCCONF=3D"/dev/null" = SRC_ENV_CONF=3D"/usr/home/root/src.configs/src.conf.CA72-nodbg-clang.aarch= 64-host" \ MAKEOBJDIRPREFIX=3D"/tmp/usr/obj/BUILDs/main-CA72-nodbg-clang" \ etcupdate $* -s /usr/main-src -M TARGET_ARCH=3Daarch64 Note the $* which is where the command line arguments to the script would go. Similarly for my make commands: kldload -n filemon && \ cd /usr/main-src && \ mkdir -p /usr/obj/BUILDs/main-CA72-nodbg-clang/sys-typescripts && \ env __MAKE_CONF=3D"/usr/home/root/src.configs/make.conf" \ SRCCONF=3D"/dev/null" = SRC_ENV_CONF=3D"/usr/home/root/src.configs/src.conf.CA72-nodbg-clang.aarch= 64-host" \ MAKEOBJDIRPREFIX=3D"/usr/obj/BUILDs/main-CA72-nodbg-clang" \ WITH_META_MODE=3Dyes \ make $* Part of this is that I've got far more than just one environment that I build/install. Thus parts of my context do not make for simple examples. (I'll not get into why I have /tmp in the front of the MAKEOBJDIRPREFIX for etcupdate --but not for make .) =3D=3D=3D Mark Millard marklmi at yahoo.com