kerberos installworld woes, continued

Ed Maste emaste at freebsd.org
Fri Apr 11 18:10:06 UTC 2014


I recently ran into a reproducible kerberos-related installworld
failure in one of my trees.  The install fails at:

cmp -s krb5_asn1.hx krb5_asn1.h 2> /dev/null || cp krb5_asn1.hx krb5_asn1.h
cp: not found

Ian Lepore mentioned encountering this in 2012 on freebsd-embedded,
and think there have been other reports elsewhere.

My case was caused by having a newer krb5_asn1.hx file in the source
tree, but with the same content as the krb5_asn1.h copy.  This can
happen fairly easily with git, when switching between and rebasing
various branches.

During the buildworld the cmp returns true, so the .h file isn't
copied over.  Then at installworld the cmp test fails as cmp is not in
the temporary path.  The cp is invoked, which fails as it is also not
in the path.

If r262209 fixes the underlying concurrency issue we should be able to
drop the cmp completely -- any concerns with this change:

diff --git a/kerberos5/lib/libasn1/
Makefile b/kerberos5/lib/libasn1/Makefile
index b0f969a..dc1de5c 100644
--- a/kerberos5/lib/libasn1/Makefile
+++ b/kerberos5/lib/libasn1/Makefile
@@ -112,10 +112,10 @@ ${GEN_KX509}: kx509.asn1
 .SUFFIXES: .h .c .x .hx

 .x.c:
-       cmp -s ${.IMPSRC} ${.TARGET} 2> /dev/null || cp ${.IMPSRC} ${.TARGET}
+       cp ${.IMPSRC} ${.TARGET}

 .hx.h:
-       cmp -s ${.IMPSRC} ${.TARGET} 2> /dev/null || cp ${.IMPSRC} ${.TARGET}
+       cp ${.IMPSRC} ${.TARGET}

 .include <bsd.lib.mk>


More information about the freebsd-hackers mailing list