aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDag-Erling Smørgrav <des@FreeBSD.org>2026-06-05 15:53:25 +0000
committerDag-Erling Smørgrav <des@FreeBSD.org>2026-06-05 15:53:25 +0000
commitddf6fad0295aa92af5eed2a4b2fa0bd02f47d94d (patch)
treeceb7f80538b5cd25b37a99c15a5250f9ee88db8c
parentc606eb37135d3e9cfea4d34c147699e0713dd5d2 (diff)
etcupdate: Make nobuild the default
The common case for etcupdate is to run it after building and installing the world, in which case we already have an object directory to draw on. Add a -b option to turn nobuild off (opposite of -B), and turn nobuild on by default. MFC after: 1 week Reviewed by: jhb, emaste Differential Revision: https://reviews.freebsd.org/D57306
-rw-r--r--usr.sbin/etcupdate/etcupdate.830
-rwxr-xr-xusr.sbin/etcupdate/etcupdate.sh7
2 files changed, 22 insertions, 15 deletions
diff --git a/usr.sbin/etcupdate/etcupdate.8 b/usr.sbin/etcupdate/etcupdate.8
index 6216722fc81f..9c070dae4ecb 100644
--- a/usr.sbin/etcupdate/etcupdate.8
+++ b/usr.sbin/etcupdate/etcupdate.8
@@ -23,7 +23,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd April 30, 2026
+.Dd May 27, 2026
.Dt ETCUPDATE 8
.Os
.Sh NAME
@@ -31,7 +31,8 @@
.Nd "manage updates to system files not updated by installworld"
.Sh SYNOPSIS
.Nm
-.Op Fl npBFN
+.Op Fl npFN
+.Op Fl B | Fl b
.Op Fl d Ar workdir
.Op Fl r | Fl s Ar source | Fl t Ar tarball
.Op Fl A Ar patterns
@@ -42,7 +43,8 @@
.Op Fl m Ar make
.Nm
.Cm build
-.Op Fl BN
+.Op Fl N
+.Op Fl B | Fl b
.Op Fl d Ar workdir
.Op Fl s Ar source
.Op Fl L Ar logfile
@@ -58,7 +60,8 @@
.Op Fl L Ar logfile
.Nm
.Cm extract
-.Op Fl BN
+.Op Fl N
+.Op Fl B | Fl b
.Op Fl d Ar workdir
.Op Fl s Ar source | Fl t Ar tarball
.Op Fl D Ar destdir
@@ -388,15 +391,16 @@ variable or the
option will not be installed.
.It Fl B
Do not build generated files in a private object tree.
-Instead,
-reuse the generated files from a previously built object tree that matches
-the source tree.
-This can be useful to avoid gratuitous conflicts in
-.Xr sendmail 8
-configuration
-files when bootstrapping.
-It can also be useful for building a tarball that matches a specific
-world build.
+Instead, reuse the generated files from a previously built object tree
+that matches the source tree.
+This is the default.
+.It Fl b
+Build generated files in a private object tree before trying to
+compare anything.
+This is necessary in the uncommon case where
+.Nm
+is not run after a
+.Cm buildworld .
.It Fl D Ar destdir
Specify an alternate destination directory as the target of a merge.
This is analogous to the
diff --git a/usr.sbin/etcupdate/etcupdate.sh b/usr.sbin/etcupdate/etcupdate.sh
index 77fd400a624b..404ad434da00 100755
--- a/usr.sbin/etcupdate/etcupdate.sh
+++ b/usr.sbin/etcupdate/etcupdate.sh
@@ -1780,12 +1780,15 @@ rerun=
always=
dryrun=
ignore=
-nobuild=
+nobuild=YES
preworld=
noroot=
difflistonly=
-while getopts "d:lm:nprs:t:A:BD:FI:L:M:N" option; do
+while getopts "bd:lm:nprs:t:A:BD:FI:L:M:N" option; do
case "$option" in
+ b)
+ nobuild=
+ ;;
d)
WORKDIR=$OPTARG
;;