Module Name: src Committed By: tls Date: Sun Aug 10 07:03:07 UTC 2014
Modified Files: src/etc [tls-earlyentropy]: Makefile Makefile.params daily locate.conf rc rc.conf rc.subr services Log Message: Rebase. To generate a diff of this commit: cvs rdiff -u -r1.412 -r1.412.2.1 src/etc/Makefile cvs rdiff -u -r1.11 -r1.11.2.1 src/etc/Makefile.params cvs rdiff -u -r1.90 -r1.90.2.1 src/etc/daily cvs rdiff -u -r1.1 -r1.1.76.1 src/etc/locate.conf cvs rdiff -u -r1.166 -r1.166.20.1 src/etc/rc cvs rdiff -u -r1.96 -r1.96.78.1 src/etc/rc.conf cvs rdiff -u -r1.92 -r1.92.8.1 src/etc/rc.subr cvs rdiff -u -r1.97 -r1.97.8.1 src/etc/services Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/etc/Makefile diff -u src/etc/Makefile:1.412 src/etc/Makefile:1.412.2.1 --- src/etc/Makefile:1.412 Mon Jan 27 21:37:17 2014 +++ src/etc/Makefile Sun Aug 10 07:03:06 2014 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.412 2014/01/27 21:37:17 apb Exp $ +# $NetBSD: Makefile,v 1.412.2.1 2014/08/10 07:03:06 tls Exp $ # from: @(#)Makefile 8.7 (Berkeley) 5/25/95 # Environment variables without default values: @@ -47,6 +47,8 @@ CKSUM?= ${TOOL_CKSUM} MAKESUMS= MAKE=${MAKE:Q} CKSUM=${CKSUM:Q} ${HOST_SH} ${NETBSDSRCDIR}/distrib/sets/makesums DISTRIBVER!= ${HOST_SH} ${NETBSDSRCDIR}/sys/conf/osrelease.sh +GZIP_FLAGS= -9 ${GZIP_N_FLAG} + # Flags for creating ISO CDROM image # mkisofs is expected to be in $PATH, install via pkgsrc/sysutils/cdrtools # Note: At least mkisofs 2.0 should be used. @@ -193,9 +195,20 @@ etc-release: .EXEC .MAKE echo ; \ cat ${NETBSDSRCDIR}/sys/conf/copyright; \ echo ; \ - echo "Build settings:"; \ + echo "Build information:"; \ printf "%20s %s\n" "Build date" "$$(date -u)"; \ printf "%20s %s\n" "Built by" "$${USER-root}@$$(hostname)"; \ + if [ -n "${BUILDID}" ]; then \ + printf "%20s %s\n" "Build ID" "${BUILDID}" ; \ + fi ; \ + if [ -n "${BUILDINFO}" ]; then \ + echo ; \ + info="$$(printf "%b" ${BUILDINFO:Q})" ; \ + printf "%s\n" "$${info}" \ + | ${TOOL_SED} -e 's/^/ /' ; \ + fi ; \ + echo ; \ + echo "Build settings:"; \ echo ; \ ${PRINT_PARAMS} ; \ ) >${.OBJDIR}/${.TARGET} @@ -402,7 +415,7 @@ release snapshot: .PHONY .MAKE check_DES # Note: At least mkisofs 2.0 should be used. # CDROM_NAME_ADD?= -CDROM_IMAGE?=${RELEASEDIR}/iso/NetBSD-${DISTRIBVER}-${MACHINE}.iso +CDROM_IMAGE?=${RELEASEDIR}/images/NetBSD-${DISTRIBVER}-${MACHINE}.iso CDROM.dir= ${.OBJDIR}/cdrom.dir CDROM.pathlist= ${.OBJDIR}/cdrom.pathlist @@ -410,7 +423,7 @@ iso-image: .if ${MKISOFS} != true do-iso-image: .PHONY check_DESTDIR check_RELEASEDIR iso-image-md-post - ${MAKESUMS} -t ${RELEASEDIR}/iso/ '*.iso' + ${MAKESUMS} -t ${RELEASEDIR}/images/ '*.iso' @echo "iso-image created as: ${CDROM_IMAGE}" .else do-iso-image: @@ -426,12 +439,14 @@ iso-image-setup: .PHONY check_RELEASEDIR .endfor echo "${MACHINE}/=${RELEASEDIR}/${RELEASEMACHINEDIR}/" >> ${CDROM.pathlist} mkdir -p ${CDROM.dir} - mkdir -p ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/cdrom + +check_imagedir: + mkdir -p ${RELEASEDIR}/images # iso-image-mi -- # Create the image after the MD operations have completed. # -iso-image-mi: .PHONY check_DESTDIR check_RELEASEDIR iso-image-md-pre +iso-image-mi: .PHONY check_DESTDIR check_RELEASEDIR iso-image-md-pre check_imagedir @if ! ${MKISOFS} --version; then \ echo "install pkgsrc/sysutils/cdrtools and run 'make iso-image'." ; \ false; \ @@ -558,7 +573,7 @@ build_kernels: .PHONY build_kernels: kern-${configfile} kern-${configfile}: .PHONY .MAKE cd ${KERNCONFDIR} && ${TOOL_CONFIG} -s ${KERNSRCDIR} \ - -b ${KERNOBJDIR}/${configfile:C/.*\///} ${configfile} + -U DEBUG -b ${KERNOBJDIR}/${configfile:C/.*\///} ${configfile} .if ${MKUPDATE} == "no" cd ${KERNOBJDIR}/${configfile:C/.*\///} && ${MAKE} distclean .endif @@ -580,7 +595,7 @@ kernset-${configfile}: .PHONY build_kern kerndir=${KERNOBJDIR}/${configfile:C/.*\///}; \ kernsuffixes="${KERNEL_SUFFIXES:S/^/./}"; \ kern_tgz=${RELEASEDIR}/${RELEASEMACHINEDIR}/binary/sets/kern-${configfile}.tgz; \ - pax_cmd="COMPRESS_PROGRAM=${TOOL_GZIP:Q} GZIP=-9n ${TOOL_PAX} -O -zw -M -N ${NETBSDSRCDIR}/etc -f $${kern_tgz}"; \ + pax_cmd="GZIP=${GZIP_FLAGS:Q} ${TOOL_PAX} --use-compress-program ${TOOL_GZIP:Q} -O -w -M -N ${NETBSDSRCDIR}/etc -f $${kern_tgz}"; \ cd $${kerndir} && { \ kernels=; newest=; \ for kernel in $${kernlist}; do \ @@ -625,8 +640,8 @@ releasekern-${configfile}: .PHONY build_ knl_gz="${RELEASEDIR}/${RELEASEMACHINEDIR}/binary/kernel/$${kernel}-${configfile:C/.*\///}$${s}.gz"; \ [ $${knl_gz} -nt $${ks} ] && continue; \ rm -f $${knl_gz}; \ - echo "${TOOL_GZIP} -nc -9 < $${kerndir}/$${ks} > $${knl_gz}"; \ - ${TOOL_GZIP} -nc -9 < $${ks} > $${knl_gz}; \ + echo "${TOOL_GZIP} ${GZIP_FLAGS} -c < $${kerndir}/$${ks} > $${knl_gz}"; \ + ${TOOL_GZIP} ${GZIP_FLAGS} -c < $${ks} > $${knl_gz}; \ done; \ done; \ } Index: src/etc/Makefile.params diff -u src/etc/Makefile.params:1.11 src/etc/Makefile.params:1.11.2.1 --- src/etc/Makefile.params:1.11 Tue Mar 25 09:52:55 2014 +++ src/etc/Makefile.params Sun Aug 10 07:03:06 2014 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.params,v 1.11 2014/03/25 09:52:55 ozaki-r Exp $ +# $NetBSD: Makefile.params,v 1.11.2.1 2014/08/10 07:03:06 tls Exp $ # # Makefile fragment for printing build parameters. # @@ -37,7 +37,7 @@ .include <bsd.own.mk> # for some variables -RELEASEVARS= BSDOBJDIR BSDSRCDIR BUILDID BUILDSEED \ +RELEASEVARS= BSDOBJDIR BSDSRCDIR BUILDID BUILDINFO BUILDSEED \ DESTDIR DISTRIBVER EXTERNAL_TOOLCHAIN HAVE_GCC HAVE_GDB \ HAVE_LLVM HAVE_PCC INSTALLWORLDDIR \ KERNARCHDIR KERNCONFDIR KERNOBJDIR KERNSRCDIR \ Index: src/etc/daily diff -u src/etc/daily:1.90 src/etc/daily:1.90.2.1 --- src/etc/daily:1.90 Sun Sep 8 08:19:40 2013 +++ src/etc/daily Sun Aug 10 07:03:06 2014 @@ -1,6 +1,6 @@ #!/bin/sh - # -# $NetBSD: daily,v 1.90 2013/09/08 08:19:40 prlw1 Exp $ +# $NetBSD: daily,v 1.90.2.1 2014/08/10 07:03:06 tls Exp $ # @(#)daily 8.2 (Berkeley) 1/25/94 # @@ -248,7 +248,7 @@ fi if checkyesno run_fsck; then echo "" - echo "Checking filesystems:" + echo "Checking file systems:" fsck -n -f ${run_fsck_flags} | grep -v '^\*\* Phase' fi Index: src/etc/locate.conf diff -u src/etc/locate.conf:1.1 src/etc/locate.conf:1.1.76.1 --- src/etc/locate.conf:1.1 Fri Feb 6 15:24:25 2004 +++ src/etc/locate.conf Sun Aug 10 07:03:06 2014 @@ -1,11 +1,11 @@ -# $NetBSD: locate.conf,v 1.1 2004/02/06 15:24:25 itohy Exp $ +# $NetBSD: locate.conf,v 1.1.76.1 2014/08/10 07:03:06 tls Exp $ # # This file is read by /usr/libexec/locate.updatedb when building locate(1) # database. # # argument description default # searchpath <paths> search path / -# ignorefs <fs types> ignore filesystems of the types !local cd9660 +# ignorefs <fs types> ignore file systems of the types !local cd9660 # Setting <fs types> to "none" fdesc kernfs # disables it (search everything). procfs # Prepending ! negates the meaning Index: src/etc/rc diff -u src/etc/rc:1.166 src/etc/rc:1.166.20.1 --- src/etc/rc:1.166 Thu Aug 11 22:52:47 2011 +++ src/etc/rc Sun Aug 10 07:03:06 2014 @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: rc,v 1.166 2011/08/11 22:52:47 apb Exp $ +# $NetBSD: rc,v 1.166.20.1 2014/08/10 07:03:06 tls Exp $ # # rc -- # Run the scripts in /etc/rc.d with rcorder, and log output @@ -84,6 +84,7 @@ rc_real_work() # with redirected output. # _rc_postprocessor_fd=9 ; export _rc_postprocessor_fd + _rc_pid=$$ ; export _rc_pid eval "exec ${_rc_postprocessor_fd}>&1" # Print a metadata line when we exit @@ -119,6 +120,24 @@ rc_real_work() kill -0 $RC_PID >/dev/null 2>&1 || RC_PID=$$ # + # As long as process $RC_PID is still running, send a "nop" + # metadata message to the postprocessor every few seconds. + # This should help flush partial lines that may appear when + # rc.d scripts that are NOT marked with "KEYWORD: interactive" + # nevertheless attempt to print prompts and wait for input. + # + ( + # First detach from tty, to avoid intercepting SIGINFO. + eval "exec ${_rc_original_stdout_fd}<&-" + eval "exec ${_rc_original_stderr_fd}<&-" + exec </dev/null >/dev/null 2>&1 + while kill -0 $RC_PID ; do + print_rc_metadata "nop" + sleep 3 + done + ) & + + # # Get a list of all rc.d scripts, and use rcorder to choose # what order to execute them. # @@ -277,16 +296,20 @@ rc_postprocess_metadata() case "$keyword" in start) - # $args contains a date/time + # Marks the start of the entire /etc/rc script. + # $args contains a date/time. rc_log_message "[$0 starting at $args]" if ! $rc_silent; then printf "%s\n" "$args" fi ;; cmd-name) + # Marks the start of a child script (usually one of + # the /etc/rc.d/* scripts). rc_log_message "[running $1]" ;; cmd-status) + # Marks the end of a child script. # $1 is a command name, $2 is the command's exit status. # If the command failed, report it, and add it to a list. if [ "$2" != 0 ]; then @@ -307,13 +330,21 @@ rc_postprocess_metadata() ;; nop) # Do nothing. + # This has the side effect of flushing partial lines, + # and the echo() and printf() functions in rc.subr take + # advantage of this. ;; note) + # Unlike most metadata messages, which should be used + # only by /etc/rc and rc.subr, the "note" message may be + # used directly by /etc.rc.d/* and similar scripts. + # It adds a note to the log file, without displaying + # it to stdout. rc_log_message "[NOTE: $args]" ;; end) - # - # If any scripts (or other commands) failed, report them. + # Marks the end of processing, after the last child script. + # If any child scripts (or other commands) failed, report them. # if [ -n "$rc_failures" ]; then rc_log_message "[failures]" @@ -330,11 +361,15 @@ rc_postprocess_metadata() printf "%s\n" "$args" ;; exit) + # Marks an exit from the rc_real_work() function. + # This may be a normal or abnormal exit. + # rc_log_message "[$0 exiting with status $1]" exit $1 ;; interrupted) - # $args is a human-readable message + # Marks an interrupt trapped by the rc_real_work() function. + # $args is a human-readable message. rc_log_message "$args" printf "%s\n" "$args" ;; Index: src/etc/rc.conf diff -u src/etc/rc.conf:1.96 src/etc/rc.conf:1.96.78.1 --- src/etc/rc.conf:1.96 Sat Oct 14 17:01:29 2000 +++ src/etc/rc.conf Sun Aug 10 07:03:06 2014 @@ -1,6 +1,6 @@ -# $NetBSD: rc.conf,v 1.96 2000/10/14 17:01:29 wiz Exp $ +# $NetBSD: rc.conf,v 1.96.78.1 2014/08/10 07:03:06 tls Exp $ # -# see rc.conf(5) for more information. +# See rc.conf(5) for more information. # # Use program=YES to enable program, NO to disable it. program_flags are # passed to the program on the command line. @@ -17,5 +17,5 @@ fi # rc_configured=NO -# Add local overrides below +# Add local overrides below. # Index: src/etc/rc.subr diff -u src/etc/rc.subr:1.92 src/etc/rc.subr:1.92.8.1 --- src/etc/rc.subr:1.92 Mon Dec 17 18:17:27 2012 +++ src/etc/rc.subr Sun Aug 10 07:03:06 2014 @@ -1,4 +1,4 @@ -# $NetBSD: rc.subr,v 1.92 2012/12/17 18:17:27 apb Exp $ +# $NetBSD: rc.subr,v 1.92.8.1 2014/08/10 07:03:06 tls Exp $ # # Copyright (c) 1997-2011 The NetBSD Foundation, Inc. # All rights reserved. @@ -112,7 +112,7 @@ stop_boot() # # mount_critical_filesystems type -# Go through the list of critical filesystems as provided in +# Go through the list of critical file systems as provided in # the rc.conf(5) variable $critical_filesystems_${type}, checking # each one to see if it is mounted, and if it is not, mounting it. # It's not an error if file systems prefixed with "OPTIONAL:" @@ -786,6 +786,35 @@ $command $rc_flags $command_args" } # +# _have_rc_postprocessor +# Test whether the current script is running in a context that +# was invoked from /etc/rc with a postprocessor. +# +# If the test fails, some variables may be unset to make +# such tests more efficient in future. +# +_have_rc_postprocessor() +{ + # Cheap tests that fd and pid are set, fd is writable. + [ -n "${_rc_postprocessor_fd}" ] || return 1 + [ -n "${_rc_pid}" ] || return 1 + eval ": >&${_rc_postprocessor_fd}" 2>/dev/null || return 1 + + # More expensive test that pid is running. + # Unset _rc_pid if this fails. + kill -0 "${_rc_pid}" 2>/dev/null \ + || { unset _rc_pid; return 1; } + + # More expensive test that pid appears to be + # a shell running an rc script. + # Unset _rc_pid if this fails. + expr "$(ps -p "${_rc_pid}" -o command=)" : ".*sh .*/rc.*" >/dev/null \ + || { unset _rc_pid; return 1; } + + return 0 +} + +# # run_rc_script file arg # Start the script `file' with `arg', and correctly handle the # return value from the script. If `file' ends with `.sh', it's @@ -794,9 +823,8 @@ $command $rc_flags $command_args" # executable run as a child process. # # If `file' contains "KEYWORD: interactive" and if we are -# running inside /etc/rc with postprocessing (as signified by -# _rc_postprocessor_fd being defined) then the script's stdout -# and stderr are redirected to $_rc_original_stdout_fd and +# running inside /etc/rc with postprocessing, then the script's +# stdout and stderr are redirected to $_rc_original_stdout_fd and # $_rc_original_stderr_fd, so the output will be displayed on the # console but not intercepted by /etc/rc's postprocessor. # @@ -816,7 +844,7 @@ run_rc_script() eval unset ${_arg}_cmd ${_arg}_precmd ${_arg}_postcmd _must_redirect=false - if [ -n "${_rc_postprocessor_fd}" ] \ + if _have_rc_postprocessor \ && _has_rcorder_keyword interactive $_file then _must_redirect=true @@ -1047,7 +1075,7 @@ handle_fsck_error() echo "File system still has errors; re-run fsck manually!" ;; 4) # Root modified - echo "Root filesystem was modified, rebooting ..." + echo "Root file system was modified, rebooting ..." reboot -n echo "Reboot failed; help!" ;; @@ -1114,7 +1142,7 @@ print_rc_metadata() # _rc_postprocessor fd, if defined, is the fd to which we must # print, prefixing the output with $_rc_metadata_prefix. # - if [ -n "$_rc_postprocessor_fd" ]; then + if _have_rc_postprocessor; then command printf "%s%s\n" "$rc_metadata_prefix" "$1" \ >&${_rc_postprocessor_fd} fi @@ -1154,10 +1182,11 @@ _flush_rc_output() # print_rc_normal() { - # If _rc_postprocessor_fd is defined, then it is the fd - # to which we must print; otherwise print to stdout. + # print to stdout or _rc_postprocessor_fd, depending on + # whether not we have an rc postprocessor. # - local fd="${_rc_postprocessor_fd:-1}" + local fd=1 + _have_rc_postprocessor && fd="${_rc_postprocessor_fd}" case "$1" in "-n") command printf "%s" "$2" >&${fd} @@ -1186,7 +1215,7 @@ print_rc_normal() # no_rc_postprocess() { - if [ -n "${_rc_postprocessor_fd}" ]; then + if _have_rc_postprocessor; then "$@" >&${_rc_original_stdout_fd} 2>&${_rc_original_stderr_fd} else "$@" Index: src/etc/services diff -u src/etc/services:1.97 src/etc/services:1.97.8.1 --- src/etc/services:1.97 Thu Mar 21 17:45:03 2013 +++ src/etc/services Sun Aug 10 07:03:06 2014 @@ -1,4 +1,4 @@ -# $NetBSD: services,v 1.97 2013/03/21 17:45:03 christos Exp $ +# $NetBSD: services,v 1.97.8.1 2014/08/10 07:03:06 tls Exp $ # See also: services(5), http://www.sethwklein.net/projects/iana-etc/ # # Last Updated @@ -19742,7 +19742,7 @@ chat 531/udp uucpd 540/tcp uucpd 540/udp rdist 541/tcp rdistd -rfs_server 556/tcp rfs # Brunhoff remote filesystem +rfs_server 556/tcp rfs # Brunhoff remote file system smtps 465/tcp # smtp protocol over TLS/SSL smtps 465/udp # smtp protocol over TLS/SSL kdc 750/tcp kerberos4