Faulty symlink /etc/termcap
Bertram Scharpf
lists at bertram-scharpf.de
Sun Mar 26 11:36:40 UTC 2017
On Friday, 24. Mar 2017, 13:59:24 +0100, Bertram Scharpf wrote:
> # ls -l /etc/termcap
> lrwxr-xr-x 1 root wheel 23 28 Feb. 2014 /etc/termcap -> /usr/share/misc/termcap
>
> First: Shouldn't this rather link down the hierarchy?
>
> lrwxr-xr-x 1 root wheel 23 28 Feb. 2014 /etc/termcap -> ../usr/share/misc/termcap
>
> Second: I detected that, when I do a
>
> # cd /usr/src
> # mkdir /usr/jail/myjail
> # make DESTDIR=/usr/jail/myjail distribution
>
> there will be a "/usr/jail/myjail/etc/termcap" but no
> "/usr/jail/myjail/usr/share/misc/termcap".
>
> The only reason why the link is not broken is because it
> links outside the jail.
I'm posting the proposed patch below.
I will not write a problem report as long as I have an
unanswered one from December 2015.
Bertram
________________________________________________________________
diff --git a/etc/Makefile b/etc/Makefile
index fe518d283d..2468bec89e 100644
--- a/etc/Makefile
+++ b/etc/Makefile
@@ -223,6 +223,9 @@ distribution:
${BIN2} ${DESTDIR}/etc; \
${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 \
master.passwd nsmb.conf opieaccess ${DESTDIR}/etc;
+ ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
+ ${.CURDIR}/../share/termcap/termcap \
+ ${DESTDIR}/usr/share/misc
.if ${MK_BSNMP} != "no"
cd ${.CURDIR}; \
${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 \
diff --git a/share/termcap/Makefile b/share/termcap/Makefile
index 6cb2ab752f..44726cfb33 100644
--- a/share/termcap/Makefile
+++ b/share/termcap/Makefile
@@ -7,7 +7,7 @@
#
MAN= termcap.5
-FILES= termcap termcap.db
+FILES= termcap.db
FILESDIR= ${BINDIR}/misc
CLEANFILES+= termcap.db
@@ -24,6 +24,6 @@ termcap.db: termcap
cap_mkdb ${CAP_MKDB_ENDIAN} -f ${.TARGET:R} ${.ALLSRC}
etc-termcap:
- ${INSTALL_SYMLINK} ${BINDIR}/misc/termcap ${DESTDIR}/etc/termcap
+ ${INSTALL_RSYMLINK} ${BINDIR}/misc/termcap ${DESTDIR}/etc/termcap
.include <bsd.prog.mk>
________________________________________________________________
--
Bertram Scharpf
Stuttgart, Deutschland/Germany
http://www.bertram-scharpf.de
More information about the freebsd-questions
mailing list