From owner-freebsd-bugs@FreeBSD.ORG Mon Jan 17 17:50:22 2005 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 20E3216A4CE for ; Mon, 17 Jan 2005 17:50:22 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id E416743D58 for ; Mon, 17 Jan 2005 17:50:21 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.1/8.13.1) with ESMTP id j0HHoL2T027608 for ; Mon, 17 Jan 2005 17:50:21 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.1/8.13.1/Submit) id j0HHoLGM027607; Mon, 17 Jan 2005 17:50:21 GMT (envelope-from gnats) Resent-Date: Mon, 17 Jan 2005 17:50:21 GMT Resent-Message-Id: <200501171750.j0HHoLGM027607@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Scot Hetzel Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 02DBB16A4CE for ; Mon, 17 Jan 2005 17:46:28 +0000 (GMT) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.195]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5876943D48 for ; Mon, 17 Jan 2005 17:46:27 +0000 (GMT) (envelope-from swhetzel@gmail.com) Received: by wproxy.gmail.com with SMTP id 58so105315wri for ; Mon, 17 Jan 2005 09:46:27 -0800 (PST) Received: by 10.54.46.10 with SMTP id t10mr184184wrt; Mon, 17 Jan 2005 09:46:26 -0800 (PST) Received: by 10.54.29.4 with HTTP; Mon, 17 Jan 2005 09:46:26 -0800 (PST) Message-Id: <790a9fff05011709468bffc19@mail.gmail.com> Date: Mon, 17 Jan 2005 11:46:26 -0600 From: Scot Hetzel To: FreeBSD-gnats-submit@FreeBSD.org Subject: bin/76362: sys directory link points to wrong location X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Scot Hetzel List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Jan 2005 17:50:22 -0000 >Number: 76362 >Category: bin >Synopsis: sys directory link points to wrong location >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Mon Jan 17 17:50:21 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Scot W. Hetzel >Release: FreeBSD 5.3-STABLE i386 >Organization: >Environment: System: FreeBSD bsd5x.hetzel.org 5.3-STABLE FreeBSD 5.3-STABLE #5: Fri Jan 14 07:29:32 CST 2005 root@bsd5x.hetzel.org:/usr/obj/usr/src/5x/sys/GENERIC i386 >Description: I have my source tree setup so that I have 3 branches checked out under /usr/src. I then have /sys linked to /usr/src/5x/sys on the 5-STABLE system as shown below: #ls -l / /usr/src /: total 67 : lrwxr-xr-x 1 root wheel 14 Jan 9 13:53 sys -> usr/src/5x/sys : /usr/src: total 97416 drwxrwxr-x 2 root operator 512 Jan 15 15:35 .snap drwxr-xr-x 23 root wheel 1024 Jan 15 16:52 4x drwxr-xr-x 22 root wheel 1024 Jan 15 16:49 5x drwxr-xr-x 22 root wheel 1024 Jan 15 16:49 6x lrwxrwxrwx 1 root wheel 4 Dec 5 01:52 sys -> /sys The problem is that when I perform a make installkernel in /usr/src/5x, the /sys link is reset to /usr/src/sys. I then have to remove this link and change it back to /usr/src/5x/sys, otherwise when I try to build a port that requires the kernel sources, it will fail. >How-To-Repeat: Set up your /usr/src as shown above, then do a make installkernel >Fix: Apply the following patch to -CURRENT, and then MFC to 5-STABLE and 4-STABLE after a few days. Index: etc/Makefile =================================================================== RCS file: /home/ncvs/src/etc/Makefile,v retrieving revision 1.337 diff -u -r1.337 Makefile --- etc/Makefile 21 Dec 2004 10:15:59 -0000 1.337 +++ etc/Makefile 15 Jan 2005 23:19:22 -0000 @@ -5,6 +5,12 @@ SUBDIR= sendmail .endif +.if !defined(RELEASEDIR) +SYSDIR= ${.CURDIR:S/^\///:S/etc//}sys +.else +SYSDIR= usr/src/sys +.endif + BIN1= amd.map apmd.conf auth.conf \ crontab csh.cshrc csh.login csh.logout devd.conf devfs.conf \ dhclient.conf disktab fbtab ftpusers gettytab group \ @@ -200,7 +206,7 @@ .if !defined(NO_SENDMAIL) mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.sendmail.dist -p ${DESTDIR}/ .endif - cd ${DESTDIR}/; rm -f ${DESTDIR}/sys; ln -s usr/src/sys sys + cd ${DESTDIR}/; rm -f ${DESTDIR}/sys; ln -s ${SYSDIR} sys cd ${DESTDIR}/usr/share/man/en.ISO8859-1; ln -sf ../man* . cd ${DESTDIR}/usr/share/man; \ set - `grep "^[a-zA-Z]" ${.CURDIR}/man.alias`; \ >Release-Note: >Audit-Trail: >Unformatted: