From owner-freebsd-questions@freebsd.org Sun Mar 26 11:36:40 2017 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C1813D1EEDD for ; Sun, 26 Mar 2017 11:36:40 +0000 (UTC) (envelope-from lists@bertram-scharpf.de) Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "mout.kundenserver.de", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3FB8513DC for ; Sun, 26 Mar 2017 11:36:39 +0000 (UTC) (envelope-from lists@bertram-scharpf.de) Received: from becker.bs.l ([85.180.9.11]) by mrelayeu.kundenserver.de (mreue003 [212.227.15.129]) with ESMTPSA (Nemesis) id 0Ld1ZU-1cRX650vVw-00i8kI for ; Sun, 26 Mar 2017 13:36:37 +0200 Received: from bsch by becker.bs.l with local (Exim 4.89 (FreeBSD)) (envelope-from ) id 1cs6TM-0001zP-QM for freebsd-questions@freebsd.org; Sun, 26 Mar 2017 13:36:36 +0200 Date: Sun, 26 Mar 2017 13:36:36 +0200 From: Bertram Scharpf To: freebsd-questions@freebsd.org Subject: Re: Faulty symlink /etc/termcap Message-ID: <20170326113636.GA7495@becker.bs.l> Reply-To: Bertram Scharpf Mail-Followup-To: freebsd-questions@freebsd.org References: <20170324125924.GA14363@becker.bs.l> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20170324125924.GA14363@becker.bs.l> User-Agent: Mutt/1.8.0 (2017-02-23) Sender: Bertram Scharpf X-Provags-ID: V03:K0:MebB6AIccJGTlB3kD+STxEd9orq4I/U06b5i6O8D5S+m9wPgoAo OX5apUYv05P3BAYXbSTuyr5RJwm/A1a7FguAMN5noK1OIrIwWztWJVIrsGKZXxYZA2xUD0G 3bnlCrtoWgkeOsppgc6GBHBNnQ42L56OEYqLpa0DxiH0L6Xk7X0crDzRTT//41QaazENCw+ Ptr1NOOOt/9v5Cq6pxLyg== X-UI-Out-Filterresults: notjunk:1;V01:K0:gW9NK4HDQOA=:YmShs0M+Ue5/JA+R45CQjL xRjDBffnccQMLWp0jk0iGeHdt060BijMq/9qqm8D7TIGOmD4Boe8BrFqMKcWZN1Jzg/oJZWM4 PGTJo4Zi1pelkgybAZdXLRny1KtpmFGWIAH4rcUIcIGOq4ETSctvDw5vj54yyoYrUh16isJpE RKEnrAWnSoVf7/UsVijVFTKTiFPKQgc0E3doCmIVk0xVds9KX+hV0WXmBm56g4Zv0GP7CSgTz N5jI9daSoZwnQs0G0GtONiYEayYbz0h2fPfYfbq3+5ZgfUufFeTTq5DzXBT5z3MxrbA1F7w7S h9ea2vaBwoYevQA1iViHY11SW4hkxtxK3DZ2N2RZmG/fUWMY4Fd/NeRqTNdjy24ZhGd+QIFH4 zshztUbVP08LoDMJ9MLt0NBYXTXNaY/lkmbmRU/Jq8efMtbM/0HqmBC/LN+EsbJH3/2WndyJ/ 6Ku8pJZm6y13dum/RiiIZZSzSEZeP18kY2IL6DkFeoiioE5kCXtl2SPgOKQIg8zM/VXKDHUrb UtC1wPqKKBAz4kxxwzgbY3EAqRgyOaZU3rf+U+r1XE1koR/1Ho7ech0CJneFdu26OG9WRYpgv YwquYHJ668PJfXG9Uge8y8IhFkhmAjbzpGjovjtT87PaK5pgnXYm8eq6orf5N6UjEVern7dyB +Ky9TfuXttlQvGXd1dCcXU8qvtemJVMIaNByyR5Ye9qJi9NjUKhivfJaEEGcptZurLIw= X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Mar 2017 11:36:40 -0000 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 ________________________________________________________________ -- Bertram Scharpf Stuttgart, Deutschland/Germany http://www.bertram-scharpf.de