aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Johnston <markj@FreeBSD.org>2025-08-19 13:02:00 +0000
committerMark Johnston <markj@FreeBSD.org>2025-08-19 13:20:16 +0000
commit5105e1ebecc784dcf8101ec6f3c79b27c43b004b (patch)
tree1ea9e9c4f11f01e6686b6055627ddf313b8aaaba
parent6f41c1fc39d9fa9db989a7b4f325c3ab85b8fb45 (diff)
krb5: Fix the installed compile_et
We now build compile_et from krb5/util/compile_et. The compile_et make target runs compile_et.sh through a preprocessor that does some substitution on the script, in particular it defines the directory where compile_et can find et_h.awk and et_c.awk. We build compile_et as a bootstrap tool since it's used to build krb5. It also gets installed by installworld, presumably because we did that with Heimdal Kerberos too and there's some chance that third-party projects are using it. There are two problems, both fixed by this patch: First, we don't actually install those awk scripts anywhere, so /usr/sbin/compile_et isn't usable on an installed system. Let's simply install them to /usr/share/et, which is where upstream puts them. Second, compile_et is a bootstrap tool and gets installed into WORLDTMP during the bootstrap phase of the build. At that point we preprocess it to set the directory where it can find those awk scripts. That directory is currently set with `KRB5_ETDIR?= ${DESTDIR}/usr/share/et`, but DESTDIR points into the object directory, so this value is bogus. Since all build-time invocations of compile_et explicitly specify the script directory with the -d option, let's just update the path to point to the installed script directory. In particular, avoid fixing DESTDIR in the script, since we don't do that generally. PR: 288929 Reviewed by: ivy, cy Sponsored by: The FreeBSD Foundation Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D52004
-rw-r--r--etc/mtree/BSD.usr.dist2
-rw-r--r--krb5/Makefile.inc2
-rw-r--r--krb5/util/et/Makefile9
3 files changed, 11 insertions, 2 deletions
diff --git a/etc/mtree/BSD.usr.dist b/etc/mtree/BSD.usr.dist
index 68977a6b8282..ffdd82ae9911 100644
--- a/etc/mtree/BSD.usr.dist
+++ b/etc/mtree/BSD.usr.dist
@@ -267,6 +267,8 @@
..
dtrace
..
+ et
+ ..
examples
BSD_daemon
..
diff --git a/krb5/Makefile.inc b/krb5/Makefile.inc
index cd54f7a0eff6..6db4e8d964aa 100644
--- a/krb5/Makefile.inc
+++ b/krb5/Makefile.inc
@@ -14,7 +14,7 @@ KRB5_VERSION= 1.22-final
# MIT KRB5 uses KRB5_DIR. Heimdal uses KRB5DIR.
KRB5_SRCTOP= ${SRCTOP}/krb5
KRB5_DIR= ${SRCTOP}/crypto/krb5/src
-KRB5_ETDIR?= ${DESTDIR}/usr/share/et
+KRB5_ETDIR?= /usr/share/et
KRB5_SRCLIBDIR= ${KRB5_DIR}/lib
KRB5_OBJTOP= ${OBJTOP}/krb5
diff --git a/krb5/util/et/Makefile b/krb5/util/et/Makefile
index 6eceb253c3b0..0d474efa1e8e 100644
--- a/krb5/util/et/Makefile
+++ b/krb5/util/et/Makefile
@@ -20,7 +20,6 @@ INCSDIR=${INCLUDEDIR}
LIBADD= krb5support
VERSION_MAP= ${.CURDIR}/version.map
-
SRCS= com_err.c \
error_message.c \
et_name.c \
@@ -38,6 +37,14 @@ CFLAGS+=-I${KRB5_DIR}/util/et \
-I${.CURDIR:H:H}/include \
-I${.OBJDIR}
+FILESGROUPS= ETSCRIPTS
+
+ETSCRIPTS= et_c.awk \
+ et_h.awk
+
+ETSCRIPTSDIR= ${KRB5_ETDIR}
+ETSCRIPTSMODE= 0444
+
.include <bsd.lib.mk>
.SUFFIXES: .h .c .et .ct .man .3