bin/76362: sys directory link points to wrong location
Scot Hetzel
swhetzel at gmail.com
Mon Jan 17 09:50:22 PST 2005
>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 at 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:
More information about the freebsd-bugs
mailing list