From: Ben Gras Date: Tue, 7 Jun 2011 15:23:23 +0000 (+0000) Subject: prepare for netbsd libc/headers X-Git-Tag: v3.2.0~546 X-Git-Url: http://zhaoyanbai.com/repos/doc/mandoc_char.7.html?a=commitdiff_plain;h=d490669430a5a717bca5201771c7c92ac253568e;p=minix.git prepare for netbsd libc/headers . mtree entries for /usr/netbsd . install(1) fix for relative symlinks by Antoine Leca --- diff --git a/commands/install/install.c b/commands/install/install.c index e65671045..50f990fee 100644 --- a/commands/install/install.c +++ b/commands/install/install.c @@ -226,10 +226,21 @@ void copylink(char *source, char *dest, int mode, int owner, int group) # define hdr ((struct exec *) buf) pid_t pid = 0; int status = 0; + char *p; /* Source must exist as a plain file, dest may exist as a plain file. */ - - if (stat(source, &sst) < 0) { report(source); return; } + if (make_symlink && source[0] != '/' + && (p = strrchr(dest, '/')) != NULL ) { + /* creating a relative symlink; compute real target */ + strlcpy(buf, dest, sizeof(buf)); + if (p - dest + 1 >= (int)sizeof(buf)) + p = dest + sizeof(buf) - 2; + buf[p - dest + 1] = '\0'; + strlcat(buf, source, sizeof(buf)); + r = stat(buf, &sst); + } else + r = stat(source, &sst); + if (r < 0) { report(source); return; } if (mode == -1) { mode= sst.st_mode & 07777; diff --git a/docs/UPDATING b/docs/UPDATING index e44dfeba9..a1eb1ef2f 100644 --- a/docs/UPDATING +++ b/docs/UPDATING @@ -1,3 +1,4 @@ + 20110228: (Next release bumped to MINIX 3.2.0.) ELF support in the base system. /usr/lib libraries @@ -7,6 +8,12 @@ To start producing ELF, please see: http://wiki.minix3.org/en/UsersGuide/ELFSwitch + To create the /usr/netbsd hierarchy: + # cd /usr/src + # umount /proc + # make etcfiles + # mount -e -t procfs none /proc + 20110225: Create ddekit include dirs: mkdir -p /usr/include/ddekit/minix diff --git a/etc/Makefile b/etc/Makefile index 9a65a6530..f709d1023 100644 --- a/etc/Makefile +++ b/etc/Makefile @@ -4,7 +4,8 @@ USRETC=/usr/etc/ FILES1=fstab group hostname.file inet.conf motd.install mtab passwd profile \ protocols rc services termcap ttytab utmp rc.cd binary_sizes \ binary_sizes.big binary_sizes.xxl syslog.conf rc.daemons.dist \ - rs.inet rs.single make.conf system.conf + rs.inet rs.single make.conf system.conf ttys + FILES2=shadow FILES3=daily dhcptags.conf rc USRFILES=Makefile diff --git a/etc/mtree/minix.tree b/etc/mtree/minix.tree index 277bd4094..67ed6a662 100644 --- a/etc/mtree/minix.tree +++ b/etc/mtree/minix.tree @@ -54,6 +54,22 @@ 755 root operator /usr/man/man8 755 root operator /usr/man/man9 755 root operator /usr/mdec +755 root operator /usr/netbsd +755 root operator /usr/netbsd/include +755 root operator /usr/netbsd/include/i386 +755 root operator /usr/netbsd/include/arpa +755 root operator /usr/netbsd/include/compat +755 root operator /usr/netbsd/include/compat/machine +755 root operator /usr/netbsd/include/ddekit +755 root operator /usr/netbsd/include/ddekit/minix +755 root operator /usr/netbsd/include/minix +755 root operator /usr/netbsd/include/net +755 root operator /usr/netbsd/include/net/gen +755 root operator /usr/netbsd/include/protocols +755 root operator /usr/netbsd/include/rpcsvc +755 root operator /usr/netbsd/include/ssp +755 root operator /usr/netbsd/include/sys +755 root operator /usr/netbsd/lib 700 root operator /usr/preserve 755 root operator /usr/run 755 root operator /usr/share diff --git a/etc/ttys b/etc/ttys new file mode 100755 index 000000000..83ee4b48b --- /dev/null +++ b/etc/ttys @@ -0,0 +1,44 @@ +# +# from: @(#)ttys 5.1 (Berkeley) 4/17/89 +# +# name getty type status comments +# +console getty minix on secure +ttyc1 getty minix on secure +ttyc2 getty minix on secure +ttyc3 getty minix on secure +tty00 "" unknown off secure +tty01 "" unknown off secure + +ttyp0 "" network off +ttyp1 "" network off +ttyp2 "" network off +ttyp3 "" network off +ttyp4 "" network off +ttyp5 "" network off +ttyp6 "" network off +ttyp7 "" network off +ttyp8 "" network off +ttyp9 "" network off +ttypa "" network off +ttypb "" network off +ttypc "" network off +ttypd "" network off +ttype "" network off +ttypf "" network off +ttyq0 "" network off +ttyq1 "" network off +ttyq2 "" network off +ttyq3 "" network off +ttyq4 "" network off +ttyq5 "" network off +ttyq6 "" network off +ttyq7 "" network off +ttyq8 "" network off +ttyq9 "" network off +ttyqa "" network off +ttyqb "" network off +ttyqc "" network off +ttyqd "" network off +ttyqe "" network off +ttyqf "" network off