Synchronize on NetBSD-CVS (2013/12/1 12:00:00 UTC)

- Fix for possible unset uid/gid in toproto
 - Fix for default mtree style
 - Update libelf
 - Importing libexecinfo
 - Resynchronize GCC, mpc, gmp, mpfr
 - build.sh: Replace params with show-params.
     This has been done as the make target has been renamed in the same
     way, while a new target named params has been added. This new
     target generates a file containing all the parameters, instead of
     printing it on the console.
 - Update test48 with new etc/services (Fix by Ben Gras <ben@minix3.org)
     get getservbyport() out of the inner loop

Change-Id: Ie6ad5226fa2621ff9f0dee8782ea48f9443d2091
This commit is contained in:
2014-07-28 17:05:06 +02:00
parent ff10274392
commit 84d9c625bf
4655 changed files with 379308 additions and 151050 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
# $NetBSD: Makefile.bootcd,v 1.20 2012/08/17 16:57:59 riz Exp $
# $NetBSD: Makefile.bootcd,v 1.22 2013/01/29 19:48:41 christos Exp $
#
# Makefile snipped to create a CD/DVD ISO
#
+3 -2
View File
@@ -1,4 +1,4 @@
# $NetBSD: Makefile.image,v 1.31 2009/04/03 22:36:35 perry Exp $
# $NetBSD: Makefile.image,v 1.32 2013/05/24 21:34:19 christos Exp $
#
# Makefile snippet to build a tree from the provided lists,
# and make an ffs file system image from that tree
@@ -82,12 +82,13 @@ CLEANFILES+= ${WORKSPEC} ${WORKSPEC}.tmp
.endif # ! target (${WORKSPEC}) # }
.if defined(IMAGE) # {
IMGMAKEFSOPTIONS?= -o bsize=4096,fsize=512
${IMAGE}: ${WORKBUILT}
[ "${.OODATE}" = ${WORKBUILT} -a -f ${IMAGE} -a ! ${IMAGE} -ot ${WORKBUILT} ] || { \
${_MKSHMSG_CREATE} ${.CURDIR:T}/${.TARGET}; \
rm -f ${.TARGET} ${.TARGET}.tmp; \
${TOOL_MAKEFS} -t ffs -B ${IMAGEENDIAN} -s ${IMAGESIZE} -F ${WORKSPEC} \
-N ${NETBSDSRCDIR}/etc -o bsize=4096,fsize=512 \
-N ${NETBSDSRCDIR}/etc ${IMGMAKEFSOPTIONS} \
-o optimization=space,minfree=0 \
${MAKEFS_FLAGS} ${.TARGET}.tmp ${WORKDIR} \
&& mv -f ${.TARGET}.tmp ${.TARGET}; \
+10 -2
View File
@@ -1,4 +1,4 @@
# $NetBSD: Makefile.mdset,v 1.35 2011/01/01 16:56:18 jym Exp $
# $NetBSD: Makefile.mdset,v 1.38 2013/08/15 12:39:28 joerg Exp $
#
# Makefile snippet to ${TOOL_MDSETIMAGE} file system images into kernels
#
@@ -69,7 +69,12 @@ _MAKEFILE_MDSET_=1
.include <bsd.kernobj.mk>
# The default is to build for all MDSETTARGETS
ALL_KERNELS?= +
.for _K _I _F in ${MDSETTARGETS} # {
.for currentsel in ${ALL_KERNELS} # {
.if ${currentsel} == "+" || ${_K} == ${currentsel}
_KERNEL:=${_K} # (work around obscure issue in make(1))
.if (${_KERNEL:M*/*} != "")
@@ -148,7 +153,7 @@ ${_KERNEL.${_K}.${_F}}: .NOTMAIN ${_KERNNAME.${_K}.${_F}} ${_I}
${NM} ${.TARGET}.tmp | gzip -9n > ${.TARGET}.symbols.gz
.endif
.if !defined(MDSET_NOSTRIP.${_FILENAME}) && !defined(MDSET_NOSTRIP)
${STRIP} -R .comment -R .ident ${.TARGET}.tmp
${STRIP} -R .eh_frame -R .eh_frame_hdr -R .comment -R .ident ${.TARGET}.tmp
.endif
@mv ${.TARGET}.tmp ${.TARGET}
.if defined(MDSET_POST.${_FILENAME}) || defined(MDSET_POST)
@@ -166,6 +171,8 @@ ${_KERNEL.${_K}.${_F}}.gz: ${_KERNEL.${_K}.${_F}}
gzip -9nc ${.ALLSRC} > ${.TARGET}
.endif # }
.endif
.endfor # }
.endfor # }
CLEANFILES+= ${KERNELS} ${KERNELSYMS}
@@ -174,6 +181,7 @@ realall: ${KERNELS}
.if defined(MDSET_RELEASEDIR)
release:: check_RELEASEDIR .WAIT ${KERNELS}
test -z "${KERNELS}" || \
${RELEASE_INSTALL} ${KERNELS} ${KERNELSYMS} \
${RELEASEDIR}/${RELEASEMACHINEDIR}/${MDSET_RELEASEDIR}
.endif
+56
View File
@@ -0,0 +1,56 @@
# $NetBSD: Makefile.minirootkmod,v 1.1 2012/10/16 08:19:36 apb Exp $
#
# Makefile snippet to build a miniroot kernel module (e.g. miniroot.kmod)
#
# Required variables:
# NETBSDSRCDIR top level of src tree (set by <bsd.own.mk>)
#
# Optional variables:
# MINIROOT Basename of the kernel module to be created.
# ".kmod" will be appended to get the file name.
# [default: miniroot]
# RAMDISK Basename of the ramdisk to be embedded in the
# kernel module. This is used as both a directory
# name (${.CURDIR}/../ramdisks/${RAMDISK}) and
# as a file name within the .OBJDIR of that
# directory (${RAMDISK}.fs). [default: ramdisk]
#
MINIROOT?= miniroot
RAMDISK?= ramdisk
.include <bsd.own.mk>
.include "${.PARSEDIR}/Makefile.distrib"
MKMAN= no
PROG= ${MINIROOT}.kmod
# SRCMOD is a skeleton version of miniroot.kmod, without an embedded ramdisk.
# It should already have been created by "make install" in
# .../sys/modules/miniroot, and its name includes literal "miniroot",
# not variable ${MINIROOT}.
#
# DSTMOD is a copy of SRCMOD that is modified to include an embedded ramdisk.
# It will be created by rules in this Makefile.
#
# RAMDISKFS is the ramdisk image to be included inside DSTMOD. It should
# already have been created by the Makefile in RAMDISKSRCDIR.
#
SRCMOD= ${DESTDIR}/stand/${MACHINE}/${MODULEVER}/modules/miniroot/miniroot.kmod
DSTMOD= ${.OBJDIR}/${MINIROOT}.kmod
RAMDISKSRCDIR= ${.CURDIR}/../ramdisks/${RAMDISK}
RAMDISKOBJDIR!= cd ${RAMDISKSRCDIR} && ${PRINTOBJDIR}
RAMDISKFS= ${RAMDISKOBJDIR}/${RAMDISK}.fs
${MINIROOT}.kmod: ${RAMDISKFS} ${SRCMOD}
${OBJCOPY} --add-section miniroot=${RAMDISKFS} \
--set-section-flags miniroot=alloc,contents,load,data \
${SRCMOD} ${DSTMOD}.tmp
gzip -9nc < ${DSTMOD}.tmp > ${DSTMOD}
rm -f ${DSTMOD}.tmp
.include <bsd.prog.mk>
release: ${PROG}
${HOST_INSTALL_FILE} -m ${BINMODE} ${PROG} \
${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/miniroot/
@@ -1,4 +1,4 @@
# $NetBSD: Makefile.installimage,v 1.3 2012/04/22 07:23:42 tsutsui Exp $
# $NetBSD: Makefile.installimage,v 1.4 2012/11/03 14:25:32 tsutsui Exp $
#
# Common Makefile to create a bootable installation image for USB flash etc.
#
@@ -8,6 +8,11 @@
# INSTIMGBASE
# Basename of the liveimage
#
# Optional variables:
# INSTIMAGEMB
# target image size in MB
# (if empty default IMAGEMB in Makefile.bootimage is used)
#
# See Makefile.bootimage for other variables.
#
@@ -21,6 +26,9 @@ check_INSTIMGBASE: .PHONY .NOTMAIN
.endif
.endif
.if defined(INSTIMAGEMB)
IMAGEMB= ${INSTIMAGEMB}
.endif
SWAPMB= 0 # no swap
OMIT_SWAPIMG= yes # nothing to write
+10 -1
View File
@@ -1,4 +1,4 @@
# $NetBSD: Makefile.liveimage,v 1.2 2012/01/22 16:50:00 tsutsui Exp $
# $NetBSD: Makefile.liveimage,v 1.3 2012/11/03 14:25:32 tsutsui Exp $
#
# Common Makefile to create a bootable FS image for USB flash or emulators
#
@@ -8,6 +8,11 @@
# LIVEIMGBASE
# Basename of the liveimage
#
# Optional variables:
# LIVEIMAGEMB
# target image size in MB
# (if empty default IMAGEMB in Makefile.bootimage is used)
#
# See Makefile.bootimage for other variables.
#
@@ -21,6 +26,10 @@ check_LIVEIMGBASE: .PHONY .NOTMAIN
.endif
.endif
.if defined(LIVEIMAGEMB)
IMAGEMB= ${LIVEIMAGEMB}
.endif
IMGBASE= ${LIVEIMGBASE}
.include "${NETBSDSRCDIR}/distrib/common/bootimage/Makefile.bootimage"
+1 -1
View File
@@ -1,4 +1,4 @@
/dev/@@BOOTDISK@@a / ffs rw,log 1 1
/dev/@@BOOTDISK@@a / ffs rw 1 1
/dev/@@BOOTDISK@@b none none sw 0 0
ptyfs /dev/pts ptyfs rw 0 0
kernfs /kern kernfs rw,noauto 0 0
+1 -1
View File
@@ -1,2 +1,2 @@
/dev/@@BOOTDISK@@a / ffs rw,log 1 1
/dev/@@BOOTDISK@@a / ffs rw 1 1
tmpfs /tmp tmpfs rw 0 0
+60
View File
@@ -0,0 +1,60 @@
# $NetBSD: cgdroot.rc,v 1.1 2013/07/15 00:25:38 khorben Exp $
#
# Copyright (c) 2013 Pierre Pronchery <khorben@defora.org>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PATH=/sbin:/usr/sbin:/bin:/usr/bin
export PATH
TERM=wsvt25
export TERM
HOME=/
export HOME
BLOCKSIZE=1k
export BLOCKSIZE
EDITOR=ed
export EDITOR
umask 022
mount -o ro /dev/wd0a /etc/cgd
if [ $? -ne 0 ]; then
echo "Could not mount the boot partition" 1>&2
exit 2
fi
/sbin/wsconsctl -d -w splash.enable=0 > /dev/null 2>&1
cgdconfig -C
if [ $? -ne 0 ]; then
echo "Could not decrypt the encrypted volume" 1>&2
umount /etc/cgd
exit 2
fi
mount -o ro /dev/cgd0a /altroot
if [ $? -ne 0 ]; then
echo "Could not mount the root partition" 1>&2
cgdconfig -U
umount /etc/cgd
exit 2
fi
umount /etc/cgd
/sbin/wsconsctl -d -w splash.enable=1 > /dev/null 2>&1
sysctl -w init.root=/altroot
+10
View File
@@ -0,0 +1,10 @@
# $NetBSD: list.cgdroot,v 1.1 2013/07/15 00:25:38 khorben Exp $
#
# list file (c.f. parselist.awk) for cgd full-disk encryption.
#
PROG sbin/cgdconfig
PROG sbin/wsconsctl
LIBS -lcrypto
COPY ${NETBSDSRCDIR}/distrib/common/cgdroot.rc etc/rc
+8
View File
@@ -0,0 +1,8 @@
# $NetBSD: mtree.cgdroot,v 1.1 2013/07/15 00:25:38 khorben Exp $
/set type=dir uname=root gname=wheel mode=0755
.
./altroot
./etc
./etc/cgd mode=0700