From owner-svn-src-user@FreeBSD.ORG Wed Oct 2 17:22:28 2013 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id C3E68DD6; Wed, 2 Oct 2013 17:22:28 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A1C6E2A6E; Wed, 2 Oct 2013 17:22:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r92HMSL3034760; Wed, 2 Oct 2013 17:22:28 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r92HMSUK034754; Wed, 2 Oct 2013 17:22:28 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201310021722.r92HMSUK034754@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Wed, 2 Oct 2013 17:22:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r255995 - user/des/tinderbox X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Oct 2013 17:22:28 -0000 Author: des Date: Wed Oct 2 17:22:27 2013 New Revision: 255995 URL: http://svnweb.freebsd.org/changeset/base/255995 Log: Remove support for cvs and cvsup. Modified: user/des/tinderbox/tinderbox.1 user/des/tinderbox/tinderbox.pl Modified: user/des/tinderbox/tinderbox.1 ============================================================================== --- user/des/tinderbox/tinderbox.1 Wed Oct 2 17:21:28 2013 (r255994) +++ user/des/tinderbox/tinderbox.1 Wed Oct 2 17:22:27 2013 (r255995) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 29, 2013 +.Dd October 2, 2013 .Dt TINDERBOX 1 .Os .Sh NAME @@ -54,14 +54,10 @@ The default value is whatever the host s reports. .It Fl -branch Ns = Ns Ar BRANCH The branch to check out from -.Xr svn 1 , -.Xr cvs 1 -or -.Xr cvsup 1 +.Xr svn 1 when updating the source tree. The default is to check out HEAD. -When using -.Xr svn 1 , +For historical compatibility, .Xr cvs 1 Ns -style branch names are translated to .Xr svn 1 @@ -73,15 +69,6 @@ and .Dv RELENG_9_1 becomes .Pa releng/9.1 . -.It Fl -cvsup Ns = Ns Ar NAME -The name of the -.Xr cvsup 1 -server from which to update the source tree -.Cm update -command is specified. -The default is to use -.Xr cvs 1 -instead. .It Fl -destdir Ns = Ns Ar DIR The directory (aka .Dv DESTDIR ) @@ -134,14 +121,6 @@ for more information), regardless of whe .Cm patch command was specified. The default is to not apply any patches. -.It Fl -repository Ns = Ns Ar DIR -The location of the -.Xr cvs 1 -repository from which to update the source tree if the -.Cm update -command is specified. -The default is -.Pa /home/ncvs . .It Fl -sandbox Ns = Ns Ar DIR The location of the sandbox in which the builds are to take place. This directory should reside on a reasonably fast disk with at least @@ -166,6 +145,9 @@ or commands. .It Fl -svnbase Ns = Ns Ar URL The URL to the base of the Subversion repository. +The default is +.\" There does not seem to be an mdoc macro for URLs; use Pa instead. +.Pa svn://svn.freebsd.org/base . .It Fl -timeout Ns = Ns Ar NUM The maximum wall-time duration of the run, in seconds. The default is to continue until all targets are completed. @@ -214,7 +196,7 @@ Delete the installation tree at the star Delete the release chroot tree at the start of each job. .It Cm update Update the sources using -.Xr cvs 1 . +.Xr svn 1 . This is highly recommended, for obvious reasons, if the .Cm clean command is specified. @@ -332,10 +314,6 @@ The following additional variables are s .Bl -tag -width 18n .It CHROOTDIR .Va $SANDBOX/root -.It CVSROOT -As specified with the -.Fl -repository -option. .It RELEASETAG .Va -rBRANCH if @@ -369,9 +347,9 @@ if a patch was specified. .Pp None of these variables may be overridden by command-line arguments. .Sh SEE ALSO -.Xr cvs 1 , .Xr make 1 , .Xr patch 1 , +.Xr svn 1 , .Xr tbmaster 1 , .Xr build 7 , .Xr release 7 Modified: user/des/tinderbox/tinderbox.pl ============================================================================== --- user/des/tinderbox/tinderbox.pl Wed Oct 2 17:21:28 2013 (r255994) +++ user/des/tinderbox/tinderbox.pl Wed Oct 2 17:22:27 2013 (r255995) @@ -33,13 +33,12 @@ use Fcntl qw(:DEFAULT :flock); use POSIX; use Getopt::Long; -my $VERSION = "2.12"; +my $VERSION = "2.20"; my $COPYRIGHT = "Copyright (c) 2003-2013 Dag-Erling Smørgrav. " . "All rights reserved."; my $arch; # Target architecture my $branch; # CVS branch to check out -my $cvsup; # Name of CVSup server my $destdir; # Destination directory my $jobs; # Number of paralell jobs my $hostname; # Name of the host running the tinderbox @@ -47,7 +46,6 @@ my $logfile; # Path to log file my $machine; # Target machine my $objdir; # Location of object tree my $patch; # Patch to apply before building -my $repository; # Location of CVS repository my $sandbox; # Location of sandbox my $srcdir; # Location of source tree my $svnbase; # Subversion base URL @@ -80,17 +78,6 @@ my $starttime; my $unamecmd = '/usr/bin/uname'; -my @cvscmds = ( - '/usr/bin/cvs', - '/usr/local/bin/cvs', -); - -my @cvsupcmds = ( - '/usr/bin/csup', - '/usr/local/bin/csup', - '/usr/local/bin/cvsup' -); - my @svncmds = ( '/usr/bin/svn', '/usr/local/bin/svn', @@ -386,15 +373,13 @@ Options: Parameters: --arch=ARCH Target architecture (e.g. i386) - --branch=BRANCH CVS branch to check out - --cvsup CVSup server + --branch=BRANCH Source branch to check out --destdir=DIR Destination directory when installing --jobs=NUM Maximum number of paralell jobs --hostname=NAME Name of the host running the tinderbox --logfile=FILE Path to log file --machine=MACHINE Target machine (e.g. pc98) --patch=PATCH Patch to apply before building - --repository=DIR Location of CVS repository --sandbox=DIR Location of sandbox --svnbase=URL Subversion base URL --timeout=SECONDS Maximum allowed build time @@ -432,15 +417,14 @@ MAIN:{ chomp($hostname); $branch = "HEAD"; $jobs = 0; - $repository = "/home/ncvs"; $sandbox = "/tmp/tinderbox"; + $svnbase = "svn://svn.freebsd.org/base"; $timeout = 0; # Get options GetOptions( "arch=s" => \$arch, "branch=s" => \$branch, - "cvsup=s" => \$cvsup, "destdir=s" => \$destdir, "jobs=i" => \$jobs, "hostname=s" => \$hostname, @@ -448,7 +432,6 @@ MAIN:{ "machine=s" => \$machine, "objdir=s" => \$objdir, "patch=s" => \$patch, - "repository=s" => \$repository, "sandbox=s" => \$sandbox, "srcdir=s" => \$srcdir, "svnbase=s" => \$svnbase, @@ -614,55 +597,8 @@ MAIN:{ warning("sleeping $delay s and retrying..."); sleep($delay); } - } elsif (defined($cvsup)) { - logstage("cvsupping the source tree"); - open(my $fh, ">", "$sandbox/supfile") - or error("$sandbox/supfile: $!"); - print($fh "*default base=$sandbox\n"); - print($fh "*default prefix=$sandbox\n"); - print($fh "*default delete use-rel-suffix\n"); - print($fh "src-all release=cvs"); - if ($branch eq 'HEAD') { - print($fh " tag=."); - } else { - print($fh " tag=$branch"); - } - print($fh "\n"); - close($fh); - my @cvsupargs = ( - "-z", - "-r 3", - "-g", - "-L", ($verbose ? 1 : 0), - "-h", - split(' ', $cvsup), - "$sandbox/supfile" - ); - my $cvsupcmd = [grep({ -x } @cvsupcmds)]->[0] - or error("unable to locate cvsup / csup binary"); - spawn($cvsupcmd, @cvsupargs) - or error("unable to cvsup the source tree"); } else { - logstage("checking out the source tree from $repository"); - cd("$sandbox"); - my @cvsargs = ( - "-f", - "-R", - $verbose ? "-q" : "-Q", - "-d$repository", - ); - if (-d $srcdir) { - push(@cvsargs, "update", "-Pd"); - } else { - push(@cvsargs, "checkout", "-P"); - }; - push(@cvsargs, ($branch eq 'HEAD') ? "-A" : "-r$branch") - if defined($branch); - push(@cvsargs, "src"); - my $cvscmd = [grep({ -x } @cvscmds)]->[0] - or error("unable to locate cvs binary"); - spawn($cvscmd, @cvsargs) - or error("unable to check out the source tree"); + error("no svn base URL defined"); } } @@ -849,7 +785,6 @@ MAIN:{ # Build a release if requested if ($cmds{'release'}) { $ENV{'CHROOTDIR'} = "$sandbox/root"; - $ENV{'CVSROOT'} = $repository; $ENV{'RELEASETAG'} = $branch if $branch ne 'HEAD'; $ENV{'WORLD_FLAGS'} = $ENV{'KERNEL_FLAGS'} = From owner-svn-src-user@FreeBSD.ORG Wed Oct 2 18:22:43 2013 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 802D9EBF; Wed, 2 Oct 2013 18:22:43 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5E7672F02; Wed, 2 Oct 2013 18:22:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r92IMhCb092445; Wed, 2 Oct 2013 18:22:43 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r92IMhj6092441; Wed, 2 Oct 2013 18:22:43 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201310021822.r92IMhj6092441@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Wed, 2 Oct 2013 18:22:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r255999 - user/des/tinderbox X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Oct 2013 18:22:43 -0000 Author: des Date: Wed Oct 2 18:22:42 2013 New Revision: 255999 URL: http://svnweb.freebsd.org/changeset/base/255999 Log: Improve the logic used to determine the default value of the HOSTNAME configuration variable. Introduce an NCPU configuration variable and implement similar logic as for the HOSTNAME configuration variable. Change the configuration variable substitution syntax from %%FOO%% to ${FOO}. The old syntax is still supported for backward compatibility, but is not used internally and is deemphasized in the documentation. Introduce support for using environment variables in configuration files. This requires a fair amount of validation and untainting. Clean up the man page, especially the list of configuration variables, and provide more detailed explanations of some of the darker corners of the code as well as advice about tuning JOBS and NCPU. Modified: user/des/tinderbox/tbmaster.1 user/des/tinderbox/tbmaster.pl Modified: user/des/tinderbox/tbmaster.1 ============================================================================== --- user/des/tinderbox/tbmaster.1 Wed Oct 2 18:12:18 2013 (r255998) +++ user/des/tinderbox/tbmaster.1 Wed Oct 2 18:22:42 2013 (r255999) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 23, 2013 +.Dd October 2, 2013 .Dt TBMASTER 1 .Os .Sh NAME @@ -66,17 +66,30 @@ Dumps the configuration and exits withou The directory where configuration files are located. The default value is .Pa $HOME/etc . -.It Fl l Ar FILE +.It Fl h Ar HOSTNAME , Fl -hostname Ns = Ns Ar HOSTNAME +The name of the host running the tinderbox, used in logs and reports. +Can be overridden by the +.Va HOSTNAME +configuration variable. +The default value is that reported by +.Xr uname 1 . +.It Fl l Ar FILE , Fl -lockfile Ns = Ns Ar FILE The name of a file to lock upon startup. If the lock is already held by another process, .Nm will terminate immediately rather than block. -.It Fl n Ar ncpu -The number of concurrent jobs to run. -The default value is the number of CPUs in the machine, or 1 if that +.It Fl n Ar NUMBER , Fl -ncpu Ns = Ns Ar NUMBER +The maximum number of concurrent builds to run. +Can be overridden by the +.Va NCPU +configuration variable. +The default value is the number of cores in the machine, or 1 if that number could not be determined. +See the +.Sx Concurrency +section for additional information. .El -.Ss Configuration +.Ss Configuration files The .Nm script uses named configurations located in individual files named for @@ -96,14 +109,15 @@ and .Pa site.rc before and after the actual configuration file, respectively; thus, they can be used to specify default values shared by multiple -configurations. +configurations and to override the values set in the individual +configuration files. .Pp -The configuration consists of a list of single- or multiple-value -variable assignments: +Each configuration file consists of a list of single- or +multiple-value variable assignments: .Bl -tag .It Va single_variable = Ar value -.It Va multi_variable = Ar value1 , Ar value2 , ... -.It Va multi_variable += Ar value3 , ... +.It Va multi_variable = Ar value1 Op , Ar value2 ... +.It Va multi_variable += Ar value3 Op , Ar value4 ... .El .Pp Whitespace around the equal sign and around the commas separating @@ -112,23 +126,40 @@ multiple values is optional. Blank lines are ignored, as is anything following a hash sign .Pq Sq # . .Pp -Additionally, the +Additionally, .Cm include -statement can be used to include one configuration in another: +statements can be used to include one configuration in another: .Bl -tag .It Cm include Ar otherconfig .El +.Ss Configuration variables +Below is a list of the configuration variables +.Nm +recognizes and their semantics. +.Pp +Note that many of these variables are passed on as command-line +arguments to +.Xr tinderbox 1 , +which may provide its own default values for variables which are left +undefined by +.Nm . .Pp -The following configuration variables are defined: +Some variables are read-only and are provided so that other variables +may include them. +For instance, a common idiom is to derive +.Va OBJDIR +from a combination of +.Va BRANCH , +.Va ARCH +and +.Va MACHINE . .Bl -tag -width 12n .It ARCH -.Pq Vt single +.Pq Vt single, read-only The architecture currently being built for. -Read-only. .It BRANCH -.Pq Vt single +.Pq Vt single, read-only The branch currently being built. -Read-only. .It BRANCHES .Pq Vt multiple A list of source branches to build. @@ -160,12 +191,6 @@ No default value. .Pq Vt single A terse comment describing the setup. No default value. -.It CVSUP -.Pq Vt single -The name of the -.Xr cvsup 1 -server to use. -No default value. .It ENV .Pq Vt multiple A list of environment variables to pass to the @@ -176,43 +201,42 @@ by an equal sign .Pq Sq = . No default value. .It HOME -.Pq Vt single +.Pq Vt single, read-only The current user's home directory, as specified by the .Ev HOME environment variable. Note that it will not be defined unless it passes some simple sanity checks. -Read-only. .It HOSTNAME .Pq Vt single The name of the host running the tinderbox. -This defaults to the name reported by the -.Fl n -option of the -.Xr uname 1 -command, and is only used for cosmetic purposes. .It JOBS The maximum number of concurrent .Xr make 1 -jobs to run. +processes to run within each build. No default value. +See the +.Sx Concurrency +section for additional information. .It LOGDIR .Pq Vt single The location of the log directory. The default value is -.Pa %%SANDBOX%%/logs . +.Pa ${SANDBOX}/logs . .It MACHINE -.Pq Vt single +.Pq Vt single, read-only The machine currently being built for. -Read-only. +.It NCPU +.Pq Vt single +The maximum number of concurrent builds to run. +No default value. +See the +.Sx Concurrency +section for additional information. .It OBJDIR .Pq Vt single The object directory. -There is no default value; see the -.Xr tinderbox 1 -script's -.Fl -objdir -option for details. +No default value. .It OPTIONS .Pq Vt multiple A list of additional options to pass to the @@ -241,19 +265,13 @@ The default value is .Pq Vt multiple The addresses to which failure reports should be mailed. The default value is -.Dq %%SENDER%% . +.Dq ${SENDER} . .Pp To avoid unintentional spamming, .Nm will strip recipients in the .Li freebsd.org domain from this list unless the correct magic sauce is used. -.It REPOSITORY -.Pq Vt single -The location of the -.Xr cvs 1 -repository. -No default value. .It SANDBOX .Pq Vt single The location of the sandbox directory. @@ -267,11 +285,7 @@ No default value. .It SRCDIR .Pq Vt single The source directory. -There is no default value; see the -.Xr tinderbox 1 -script's -.Fl -srcdir -option for details. +No default value. .Pp Normally, a separate directory within the sandbox will be used for each build. @@ -288,10 +302,11 @@ targets. .Pq Vt single The subject to use on failure reports. The default value is -.Dq Tinderbox failure on %%arch%%/%%machine%% . +.Dq Tinderbox failure on ${arch}/${machine} . .It SVNBASE .Pq Vt single The URL to the base of the Subversion repository. +No default value. .It TARGETS .Pq Vt multiple A list of targets (commands) to pass to the @@ -310,7 +325,7 @@ The location of the .Xr tinderbox 1 script. The default value is -.Dq %%HOME%%/bin/tinderbox . +.Dq ${HOME}/bin/tinderbox . .It URLBASE .Pq Vt single If defined, a URL constructed by appending the file name of the full @@ -324,26 +339,32 @@ immediately before use: .Bl -bullet .It If a single-value variable contains substrings of the form -.Va %%VAR%% +.Va ${VAR} or -.Va %%var%% , +.Va ${var} , those substrings are replaced with the values of the corresponding variables, after recursive substitution. The difference between the first and the second form is that the latter is converted to lower-case before use. For instance, -.Dq %%BRANCH%% +.Dq ${BRANCH} might expand to .Dq RELENG_4 while -.Dq %%branch%% +.Dq ${branch} would expand to .Dq releng_4 . .It +If a single-value varaible contains substrings of the form +.Va $ENV{VAR} , +those substrings are replaced with the values of the corresponding +environment variables. +Use this with care. +.It If an element of a multiple-value variable is of the form -.Va %%VAR%% +.Va ${VAR} or -.Va %%var%% +.Va ${var} and the corresponding variable is a multiple-value variable, recursive substitution is first performed on that variable, and the resulting values are included individually in the result. @@ -351,8 +372,53 @@ values are included individually in the Otherwise, elements of multiple-value variables are expanded individually according to the same rules as single-value variables. .El +.Pp +For backward compatibility with earlier versions, the forms +.Va %%VAR%% +and +.Va %%var%% +may be used instead of +.Va ${VAR} +and +.Va ${var} . +.Ss Concurrency +On multiprocessor machines, performance can generally be improved by +running multiple builds in parallel, up to a certain limit. +By default, +.Nm +will run one build for each processor core in the system. +This can be overridden with the +.Fl -ncpu +command-line option and the +.Va NCPU +configuration variable, the latter taking precedence. +.Pp +In addition, each build may run multiple +.Xr make 1 +processes in parallel, up to the number specified by the +.Va JOBS +configuration variable. +.Pp +The total number of parallel +.Xr make 1 +processes will vary, but can be as high as the product of of +.Va NCPU +and +.Va JOBS. +As a result of processor, memory and filesystem contention, an +excessively large value can have a significant negative impact on +performance. +.Pp +As a rule of thumb, +.Va NCPU +should not exceed one build per gigabyte of physical memory in the +system, and the +.Va NCPU +x +.Va JOBS +product should not exceed the number of processor cores in the system +by a large amount. .Sh SEE ALSO -.Xr perl 1 , .Xr tinderbox 1 .Sh AUTHORS .Nm Modified: user/des/tinderbox/tbmaster.pl ============================================================================== --- user/des/tinderbox/tbmaster.pl Wed Oct 2 18:12:18 2013 (r255998) +++ user/des/tinderbox/tbmaster.pl Wed Oct 2 18:22:42 2013 (r255999) @@ -34,7 +34,7 @@ use POSIX; use Getopt::Long; use Storable qw(dclone); -my $VERSION = "2.11"; +my $VERSION = "2.20"; my $COPYRIGHT = "Copyright (c) 2003-2013 Dag-Erling Smørgrav. " . "All rights reserved."; @@ -46,6 +46,7 @@ my $dump; # Dump configuration and exi my $etcdir; # Configuration directory my $lockfile; # Lock file name my $lock; # Lock file descriptor +my $hostname; # Hostname my $ncpu; # Number of CPUs my %platforms; # Specific platforms to build @@ -54,27 +55,30 @@ my %INITIAL_CONFIG = ( 'CFLAGS' => '', 'COPTFLAGS' => '', 'COMMENT' => '', - 'CVSUP' => '', 'ENV' => [ ], 'HOSTNAME' => '', 'JOBS' => '', - 'LOGDIR' => '%%SANDBOX%%/logs', + 'LOGDIR' => '${SANDBOX}/logs', + 'NCPU' => '', 'OBJDIR' => '', 'OPTIONS' => [ ], 'PATCH' => '', 'PLATFORMS' => [ 'i386' ], - 'RECIPIENT' => [ '%%SENDER%%' ], - 'REPOSITORY'=> '', + 'RECIPIENT' => [ '${SENDER}' ], 'SANDBOX' => '/tmp/tinderbox', 'SENDER' => '', 'SRCDIR' => '', - 'SUBJECT' => 'Tinderbox failure on %%arch%%/%%machine%%', + 'SUBJECT' => 'Tinderbox failure on ${arch}/${machine}', 'SVNBASE' => '', 'TARGETS' => [ 'update', 'world' ], 'TIMEOUT' => '', - 'TINDERBOX' => '%%HOME%%/bin/tinderbox', + 'TINDERBOX' => '${HOME}/bin/tinderbox', 'URLBASE' => '', ); +my %NUMERIC_OPTIONS = map { $_ => 1 } qw(JOBS NCPU TIMEOUT); +my %PATHNAME_OPTIONS = + map { $_ => 1 } qw(LOGDIR OBJDIR PATCH SANDBOX SRCDIR TINDERBOX); +my %WORD_OPTIONS = map { $_ => 1 } qw(PLATFORMS TARGETS); my %CONFIG; # @@ -122,18 +126,45 @@ sub expand($) { if (ref($elem)) { # prepend to queue for further processing unshift(@elements, @{$elem}); - } elsif ($elem =~ m/^\%\%(\w+)\%\%$/) { + } elsif ($elem =~ m/^\%\%(\w+)\%\%$/ || $elem =~ m/^\%\{(\w+)\}$/) { # prepend to queue for further processing # note - can expand to a list unshift(@elements, expand($1)); } else { + $elem =~ s/\$ENV\{(\w+)\}/$ENV{$1}/g; $elem =~ s/\%\%(\w+)\%\%/expand($1)/eg; + $elem =~ s/\$\{(\w+)\}/expand($1)/eg; push(@expanded, $elem); } } + + # Upper / lower case if ($key !~ m/[A-Z]/) { @expanded = map { lc($_) } @expanded; } + + # Validate and untaint expanded value(s) + if ($NUMERIC_OPTIONS{uc($key)}) { + @expanded = map { + m/^(\d+|)$/ + or die("invalid value for numeric variable $key: $_\n"); + $1 + } @expanded; + } elsif ($PATHNAME_OPTIONS{uc($key)}) { + @expanded = map { + m@^((?:/+[\w.-]+)+/*|)$@ + or die("invalid value for pathname variable $key: $_\n"); + $1 + } @expanded; + } elsif ($WORD_OPTIONS{uc($key)}) { + @expanded = map { + m/^([\w.-]+|)$/ + or die("invalid value for word variable $key: $_\n"); + $1 + } @expanded; + } + + # Verify single / multiple and return result if (ref($value)) { return @expanded; } elsif (@expanded != 1) { @@ -158,7 +189,7 @@ sub readconf($); sub readconf($) { my $fn = shift; - open(my $fh, "<", $fn) + open(my $fh, '<', $fn) or return undef; my $line = ""; my $n = 0; @@ -227,7 +258,7 @@ sub history($$$) { $history .= $success ? "OK\n" : "FAIL\n"; my $fn = expand('LOGDIR') . "/history"; - if (open(my $fh, ">>", $fn)) { + if (open(my $fh, '>>', $1)) { print($fh $history); close($fh); } else { @@ -254,7 +285,7 @@ sub report($$$$) { return; } - if (open(my $pipe, "|-", "/usr/sbin/sendmail", "-i", "-t", "-f$sender")) { + if (open(my $pipe, '|-', qw(/usr/sbin/sendmail -i -t -f), $sender)) { print($pipe "Sender: $sender\n"); print($pipe "From: $sender\n"); print($pipe "To: $recipient\n"); @@ -288,18 +319,22 @@ sub tinderbox($$$) { # Open log files: one for the full log and one for the summary my $logdir = expand('LOGDIR'); - my $logfile = "tinderbox-$config-$branch-$arch-$machine"; + if (!-d $logdir) { + die("nonexistent log directory: $logdir\n"); + } + my $logname = "tinderbox-$config-$branch-$arch-$machine"; + my $logbase = "$logdir/$logname"; my $full; - if (!open($full, ">", "$logdir/$logfile.full.$$")) { - warn("$logdir/$logfile.full.$$: $!\n"); + if (!open($full, '>', "$logbase.full.$$")) { + warn("$logbase.full.$$: $!\n"); return undef; } select($full); $| = 1; select(STDOUT); my $brief; - if (!open($brief, ">", "$logdir/$logfile.brief.$$")) { - warn("$logdir/$logfile.brief.$$: $!\n"); + if (!open($brief, '>', "$logbase.brief.$$")) { + warn("$logbase.brief.$$: $!\n"); return undef; } select($brief); @@ -310,9 +345,9 @@ sub tinderbox($$$) { my ($rpipe, $wpipe); if (!pipe($rpipe, $wpipe)) { warn("pipe(): $!\n"); - unlink("$logdir/$logfile.brief.$$"); + unlink("$logbase.brief.$$"); close($brief); - unlink("$logdir/$logfile.full.$$"); + unlink("$logbase.full.$$"); close($full); return undef; } @@ -327,8 +362,6 @@ sub tinderbox($$$) { if ($CONFIG{'OBJDIR'}); push(@args, "--arch=$arch"); push(@args, "--machine=$machine"); - push(@args, "--cvsup=" . expand('CVSUP')) - if ($CONFIG{'CVSUP'}); push(@args, "--repository=" . expand('REPOSITORY')) if ($CONFIG{'REPOSITORY'}); push(@args, "--branch=$branch"); @@ -349,15 +382,15 @@ sub tinderbox($$$) { my $pid = fork(); if (!defined($pid)) { warn("fork(): $!\n"); - unlink("$logdir/$logfile.brief.$$"); + unlink("$logbase.brief.$$"); close($brief); - unlink("$logdir/$logfile.full.$$"); + unlink("$logbase.full.$$"); close($full); return undef; } elsif ($pid == 0) { close($rpipe); - open(STDOUT, ">&", $wpipe); - open(STDERR, ">&", $wpipe); + open(STDOUT, '>&', $wpipe); + open(STDERR, '>&', $wpipe); $| = 1; exec(expand('TINDERBOX'), @args); die("exec(): $!\n"); @@ -440,13 +473,13 @@ sub tinderbox($$$) { my $recipient = join(', ', @recipients); my $subject = expand('SUBJECT'); if ($CONFIG{'URLBASE'}) { - $summary .= "\n\n" . expand('URLBASE') . "$logfile.full"; + $summary .= "\n\n" . expand('URLBASE') . "$logname.full"; } report($sender, $recipient, $subject, $summary); } - rename("$logdir/$logfile.full.$$", "$logdir/$logfile.full"); - rename("$logdir/$logfile.brief.$$", "$logdir/$logfile.brief"); + rename("$logbase.full.$$", "$logbase.full"); + rename("$logbase.brief.$$", "$logbase.brief"); } # @@ -547,6 +580,7 @@ sub tbmaster($) { die("Where is the tinderbox script?\n"); } + # Check stop file my $stopfile = expand('SANDBOX') . "/stop"; my @jobs; foreach my $branch (expand('BRANCHES')) { @@ -559,12 +593,15 @@ sub tbmaster($) { } } + # Main loop: start as many concurrent jobs as permitted, then keep + # starting new jobs as soon as existing jobs terminate, until all + # jobs have terminated and there are none left in the queue. $0 = "tbmaster [$config]: supervisor"; my %children; my $done = 0; while (@jobs || keys(%children)) { # start more children if we can - while (@jobs && keys(%children) < $ncpu) { + while (@jobs && keys(%children) < expand('NCPU')) { my ($branch, $arch, $machine) = @{shift(@jobs)}; if (-e $stopfile || -e "$stopfile.$branch" || -e "$stopfile.$arch" || -e "$stopfile.$arch.$machine") { @@ -600,30 +637,33 @@ sub tbmaster($) { } # +# Read the input from a command +# +sub slurp(@) { + my @cmdline = @_; + + if (open(my $pipe, '-|', @cmdline)) { + local $/; + my $input = <$pipe>; + close($pipe); + return $input; + } + return undef; +} + +# # Main # MAIN:{ # Set defaults $ENV{'TZ'} = "UTC"; $ENV{'PATH'} = "/usr/bin:/usr/sbin:/bin:/sbin"; - $INITIAL_CONFIG{'HOSTNAME'} = `/usr/bin/uname -n`; - if ($INITIAL_CONFIG{'HOSTNAME'} =~ m/^([0-9a-z-]+(?:\.[0-9a-z-]+)*)$/) { - $INITIAL_CONFIG{'HOSTNAME'} = $1; - } else { - $INITIAL_CONFIG{'HOSTNAME'} = 'unknown'; - } if ($ENV{'HOME'} =~ m/^((?:\/[\w\.-]+)+)\/*$/) { $INITIAL_CONFIG{'HOME'} = realpath($1); $etcdir = "$1/etc"; $ENV{'PATH'} = "$1/bin:$ENV{'PATH'}" if (-d "$1/bin"); } - $ncpu = `/sbin/sysctl -n hw.ncpu`; - if ($ncpu =~ m/^\s*(\d+)\s*$/) { - $ncpu = int($1); - } else { - $ncpu = 1; - } # Get options {Getopt::Long::Configure("auto_abbrev", "bundling");} @@ -632,10 +672,12 @@ MAIN:{ "c|config=s" => \@configs, "d|dump" => \$dump, "e|etcdir=s" => \$etcdir, + "h|hostname=s" => \$hostname, "l|lockfile=s" => \$lockfile, "n|ncpu=i" => \$ncpu, ) or usage(); + # Subsequent arguments are platforms to build foreach (@ARGV) { if (m/^(\w+(?:\/\w+)?)$/) { $platforms{$1} = 1; @@ -644,11 +686,34 @@ MAIN:{ } } + # Get / check hostname + if (!$hostname) { + $hostname = slurp(qw(/usr/bin/uname -n)); + } + if ($hostname && + $hostname =~ m/^\s*([a-z][0-9a-z-]+(?:\.[a-z][0-9a-z-]+)*)\s*$/s) { + $hostname = $1; + } else { + $hostname = 'unknown'; + } + $INITIAL_CONFIG{'HOSTNAME'} = $hostname; + + # Get / check number of CPUs + if (!$ncpu) { + $ncpu = slurp(qw(/sbin/sysctl -n hw.ncpu)); + } + if ($ncpu && $ncpu =~ m/^\s*(\d+)\s*$/s) { + $ncpu = int($1); + } else { + $ncpu = 1; + } + $INITIAL_CONFIG{'NCPU'} = $ncpu; + # Check options if (@configs) { @configs = split(/,/, join(',', @configs)); } else { - $configs[0] = `/usr/bin/uname -n`; + $configs[0] = $hostname; chomp($configs[0]); $configs[0] =~ s/^(\w+)(\..*)?/$1/; } @@ -672,7 +737,7 @@ MAIN:{ die("invalid lockfile\n"); } $lockfile = $1; - $lock = open_locked($lockfile, ">", 0600) + $lock = open_locked($lockfile, '>', 0600) or die("unable to acquire lock on $lockfile\n"); # Lock will be released upon termination. } From owner-svn-src-user@FreeBSD.ORG Wed Oct 2 18:23:49 2013 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 341C0FAF; Wed, 2 Oct 2013 18:23:49 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 203002F0A; Wed, 2 Oct 2013 18:23:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r92INmAa093316; Wed, 2 Oct 2013 18:23:48 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r92INlXR093288; Wed, 2 Oct 2013 18:23:47 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201310021823.r92INlXR093288@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Wed, 2 Oct 2013 18:23:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r256000 - user/des/tinderbox/etc X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Oct 2013 18:23:49 -0000 Author: des Date: Wed Oct 2 18:23:46 2013 New Revision: 256000 URL: http://svnweb.freebsd.org/changeset/base/256000 Log: Switch from %%FOO%% syntax to ${FOO} syntax. Modified: user/des/tinderbox/etc/default.rc user/des/tinderbox/etc/freebsd7-build.rc user/des/tinderbox/etc/freebsd7-update.rc user/des/tinderbox/etc/freebsd8-build.rc user/des/tinderbox/etc/freebsd8-update.rc user/des/tinderbox/etc/freebsd9-build.rc user/des/tinderbox/etc/freebsd9-update.rc user/des/tinderbox/etc/head-build.rc user/des/tinderbox/etc/head-update.rc Modified: user/des/tinderbox/etc/default.rc ============================================================================== --- user/des/tinderbox/etc/default.rc Wed Oct 2 18:22:42 2013 (r255999) +++ user/des/tinderbox/etc/default.rc Wed Oct 2 18:23:46 2013 (r256000) @@ -4,10 +4,10 @@ # $FreeBSD$ # -comment = %%branch%% tinderbox +comment = ${branch} tinderbox # Paths -sandbox = %%HOME%% +sandbox = ${HOME} # Tinderbox options options = --verbose @@ -16,6 +16,6 @@ targets = precleanobj, update, world, l # Reporting sender = FreeBSD Tinderbox -recipient = %%SENDER%% -subject = [%%COMMENT%%] failure on %%arch%%/%%machine%% +recipient = ${SENDER} +subject = [${COMMENT}] failure on ${arch}/${machine} urlbase = http://tinderbox.des.no/ Modified: user/des/tinderbox/etc/freebsd7-build.rc ============================================================================== --- user/des/tinderbox/etc/freebsd7-build.rc Wed Oct 2 18:22:42 2013 (r255999) +++ user/des/tinderbox/etc/freebsd7-build.rc Wed Oct 2 18:23:46 2013 (r256000) @@ -7,5 +7,5 @@ branches = RELENG_7 platforms = amd64, i386, i386/pc98, ia64, powerpc, sparc64 targets = precleanobj, version, world, lint, kernels, postcleanobj -srcdir = %%SANDBOX%%/%%BRANCH%%/src -recipient += , <%%arch%%@freebsd.org> +srcdir = ${SANDBOX}/${BRANCH}/src +recipient += , <${arch}@freebsd.org> Modified: user/des/tinderbox/etc/freebsd7-update.rc ============================================================================== --- user/des/tinderbox/etc/freebsd7-update.rc Wed Oct 2 18:22:42 2013 (r255999) +++ user/des/tinderbox/etc/freebsd7-update.rc Wed Oct 2 18:23:46 2013 (r256000) @@ -6,7 +6,7 @@ branches = RELENG_7 platforms = none -srcdir = %%SANDBOX%%/%%BRANCH%%/src +srcdir = ${SANDBOX}/${BRANCH}/src targets = update, version recipient += -subject = [%%COMMENT%%] source tree update failure +subject = [${COMMENT}] source tree update failure Modified: user/des/tinderbox/etc/freebsd8-build.rc ============================================================================== --- user/des/tinderbox/etc/freebsd8-build.rc Wed Oct 2 18:22:42 2013 (r255999) +++ user/des/tinderbox/etc/freebsd8-build.rc Wed Oct 2 18:23:46 2013 (r256000) @@ -7,5 +7,5 @@ branches = RELENG_8 platforms = amd64, arm, i386, i386/pc98, ia64, mips, powerpc, sparc64 targets = precleanobj, version, world, lint, kernels, postcleanobj -srcdir = %%SANDBOX%%/%%BRANCH%%/src -recipient += , <%%arch%%@freebsd.org> +srcdir = ${SANDBOX}/${BRANCH}/src +recipient += , <${arch}@freebsd.org> Modified: user/des/tinderbox/etc/freebsd8-update.rc ============================================================================== --- user/des/tinderbox/etc/freebsd8-update.rc Wed Oct 2 18:22:42 2013 (r255999) +++ user/des/tinderbox/etc/freebsd8-update.rc Wed Oct 2 18:23:46 2013 (r256000) @@ -6,7 +6,7 @@ branches = RELENG_8 platforms = none -srcdir = %%SANDBOX%%/%%BRANCH%%/src +srcdir = ${SANDBOX}/${BRANCH}/src targets = update, version recipient += -subject = [%%COMMENT%%] source tree update failure +subject = [${COMMENT}] source tree update failure Modified: user/des/tinderbox/etc/freebsd9-build.rc ============================================================================== --- user/des/tinderbox/etc/freebsd9-build.rc Wed Oct 2 18:22:42 2013 (r255999) +++ user/des/tinderbox/etc/freebsd9-build.rc Wed Oct 2 18:23:46 2013 (r256000) @@ -7,5 +7,5 @@ branches = RELENG_9, RELENG_9_2 platforms = amd64, arm, i386, i386/pc98, ia64, mips, powerpc, powerpc64/powerpc, sparc64 targets = precleanobj, version, world, lint, kernels, postcleanobj -srcdir = %%SANDBOX%%/%%BRANCH%%/src -recipient += , <%%arch%%@freebsd.org> +srcdir = ${SANDBOX}/${BRANCH}/src +recipient += , <${arch}@freebsd.org> Modified: user/des/tinderbox/etc/freebsd9-update.rc ============================================================================== --- user/des/tinderbox/etc/freebsd9-update.rc Wed Oct 2 18:22:42 2013 (r255999) +++ user/des/tinderbox/etc/freebsd9-update.rc Wed Oct 2 18:23:46 2013 (r256000) @@ -6,7 +6,7 @@ branches = RELENG_9, RELENG_9_2 platforms = none -srcdir = %%SANDBOX%%/%%BRANCH%%/src +srcdir = ${SANDBOX}/${BRANCH}/src targets = update, version recipient += -subject = [%%COMMENT%%] source tree update failure +subject = [${COMMENT}] source tree update failure Modified: user/des/tinderbox/etc/head-build.rc ============================================================================== --- user/des/tinderbox/etc/head-build.rc Wed Oct 2 18:22:42 2013 (r255999) +++ user/des/tinderbox/etc/head-build.rc Wed Oct 2 18:23:46 2013 (r256000) @@ -7,5 +7,5 @@ branches = HEAD platforms = amd64, arm, armv6/arm, i386, i386/pc98, ia64, mips, mips64/mips, powerpc, powerpc64/powerpc, sparc64 targets = precleanobj, version, world, lint, kernels, postcleanobj -srcdir = %%SANDBOX%%/%%BRANCH%%/src -recipient += , <%%arch%%@freebsd.org> +srcdir = ${SANDBOX}/${BRANCH}/src +recipient += , <${arch}@freebsd.org> Modified: user/des/tinderbox/etc/head-update.rc ============================================================================== --- user/des/tinderbox/etc/head-update.rc Wed Oct 2 18:22:42 2013 (r255999) +++ user/des/tinderbox/etc/head-update.rc Wed Oct 2 18:23:46 2013 (r256000) @@ -6,7 +6,7 @@ branches = HEAD platforms = none -srcdir = %%SANDBOX%%/%%BRANCH%%/src +srcdir = ${SANDBOX}/${BRANCH}/src targets = update, version recipient += -subject = [%%COMMENT%%] source tree update failure +subject = [${COMMENT}] source tree update failure From owner-svn-src-user@FreeBSD.ORG Thu Oct 3 10:11:53 2013 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 62EE4D05; Thu, 3 Oct 2013 10:11:53 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 374BD24E2; Thu, 3 Oct 2013 10:11:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r93ABrLF077892; Thu, 3 Oct 2013 10:11:53 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r93ABqDo077891; Thu, 3 Oct 2013 10:11:52 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201310031011.r93ABqDo077891@svn.freebsd.org> From: Gleb Smirnoff Date: Thu, 3 Oct 2013 10:11:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r256016 - user/glebius X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Oct 2013 10:11:53 -0000 Author: glebius Date: Thu Oct 3 10:11:52 2013 New Revision: 256016 URL: http://svnweb.freebsd.org/changeset/base/256016 Log: Create my repospace. Added: user/glebius/ From owner-svn-src-user@FreeBSD.ORG Thu Oct 3 10:17:08 2013 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id A5E85223; Thu, 3 Oct 2013 10:17:08 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 926C12536; Thu, 3 Oct 2013 10:17:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r93AH83U079547; Thu, 3 Oct 2013 10:17:08 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r93AH8Ga079545; Thu, 3 Oct 2013 10:17:08 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201310031017.r93AH8Ga079545@svn.freebsd.org> From: Gleb Smirnoff Date: Thu, 3 Oct 2013 10:17:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r256017 - in user/glebius/course: . 01.intro 01.intro/img X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Oct 2013 10:17:08 -0000 Author: glebius Date: Thu Oct 3 10:17:07 2013 New Revision: 256017 URL: http://svnweb.freebsd.org/changeset/base/256017 Log: Start the OS course with a lame lame introduction lection. Added: user/glebius/course/ user/glebius/course/01.intro/ user/glebius/course/01.intro/Makefile (contents, props changed) user/glebius/course/01.intro/img/ user/glebius/course/01.intro/img/FreeBSD_logo.png (contents, props changed) user/glebius/course/01.intro/img/apple.png (contents, props changed) user/glebius/course/01.intro/img/book_absolute.jpg (contents, props changed) user/glebius/course/01.intro/img/book_drivers.jpg (contents, props changed) user/glebius/course/01.intro/img/book_mcckusick.jpg (contents, props changed) user/glebius/course/01.intro/img/book_rootkits.jpg (contents, props changed) user/glebius/course/01.intro/img/book_unix.jpg (contents, props changed) user/glebius/course/01.intro/img/book_unp.jpg (contents, props changed) user/glebius/course/01.intro/img/emc.png (contents, props changed) user/glebius/course/01.intro/img/isilon.png (contents, props changed) user/glebius/course/01.intro/img/juniper.png (contents, props changed) user/glebius/course/01.intro/img/netapp.png (contents, props changed) user/glebius/course/01.intro/img/netflix.png (contents, props changed) user/glebius/course/01.intro/img/pie.png (contents, props changed) user/glebius/course/01.intro/img/rambler.png (contents, props changed) user/glebius/course/01.intro/img/yahoo.png (contents, props changed) user/glebius/course/01.intro/img/yandex.png (contents, props changed) user/glebius/course/01.intro/lection.tex Added: user/glebius/course/01.intro/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/glebius/course/01.intro/Makefile Thu Oct 3 10:17:07 2013 (r256017) @@ -0,0 +1,13 @@ +NAME?= lection + +TMP= $(NAME).aux $(NAME).log $(NAME).nav $(NAME).out $(NAME).snm \ + $(NAME).toc $(NAME).vrb + +.MAIN: $(NAME).pdf + +.SUFFIXES: .pdf .tex +.tex.pdf: + pdflatex -file-line-error -halt-on-error ${.IMPSRC} + +clean: + rm -f -- $(TMP) texput.log Added: user/glebius/course/01.intro/img/FreeBSD_logo.png ============================================================================== Binary file. No diff available. Added: user/glebius/course/01.intro/img/apple.png ============================================================================== Binary file. No diff available. Added: user/glebius/course/01.intro/img/book_absolute.jpg ============================================================================== Binary file. No diff available. Added: user/glebius/course/01.intro/img/book_drivers.jpg ============================================================================== Binary file. No diff available. Added: user/glebius/course/01.intro/img/book_mcckusick.jpg ============================================================================== Binary file. No diff available. Added: user/glebius/course/01.intro/img/book_rootkits.jpg ============================================================================== Binary file. No diff available. Added: user/glebius/course/01.intro/img/book_unix.jpg ============================================================================== Binary file. No diff available. Added: user/glebius/course/01.intro/img/book_unp.jpg ============================================================================== Binary file. No diff available. Added: user/glebius/course/01.intro/img/emc.png ============================================================================== Binary file. No diff available. Added: user/glebius/course/01.intro/img/isilon.png ============================================================================== Binary file. No diff available. Added: user/glebius/course/01.intro/img/juniper.png ============================================================================== Binary file. No diff available. Added: user/glebius/course/01.intro/img/netapp.png ============================================================================== Binary file. No diff available. Added: user/glebius/course/01.intro/img/netflix.png ============================================================================== Binary file. No diff available. Added: user/glebius/course/01.intro/img/pie.png ============================================================================== Binary file. No diff available. Added: user/glebius/course/01.intro/img/rambler.png ============================================================================== Binary file. No diff available. Added: user/glebius/course/01.intro/img/yahoo.png ============================================================================== Binary file. No diff available. Added: user/glebius/course/01.intro/img/yandex.png ============================================================================== Binary file. No diff available. Added: user/glebius/course/01.intro/lection.tex ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/glebius/course/01.intro/lection.tex Thu Oct 3 10:17:07 2013 (r256017) @@ -0,0 +1,334 @@ +\documentclass{beamer} + +\usepackage[utf8]{inputenc} +\usepackage[russian]{babel} +\usepackage{tikz} +\usepackage{adjustbox} +\usepackage{url} +\usepackage{array} + +\usetikzlibrary{positioning} + +\title{Design and Implementation\\ +\includegraphics[height=2cm]{img/FreeBSD_logo.png} +} +\author{ } + +\begin{document} + +\begin{frame} +\titlepage +\end{frame} + + + +\begin{frame} +\frametitle{Where did we come from?} +\begin{figure} +\begin{tikzpicture}[ + balloon/.style = { draw, minimum size=6mm, rounded corners=3mm, + very thick,draw=black!50, top color=white, + bottom color=black!20, font=\ttfamily, + align=center }, + abovestr/.style = { midway, sloped, above, scale=0.6 }] + + \node[name=freebsd, balloon]{FreeBSD 1, {\scriptsize 1993}}; + \node[name=net2, balloon, above right=1cm and -1.6cm of freebsd]{4.3BSD Net2}; + \node[name=bsd, balloon, left=of net2]{BSD}; + \node[name=unix, balloon, left=of bsd]{UNIX}; + \node[name=bsd386, balloon, right=of net2]{386/BSD}; + \node[name=dots, balloon, below=of freebsd]{\ldots}; + \node[name=freebsd10, balloon, below=2cm of dots]{ FreeBSD 10, + {\scriptsize 2013}}; + \node[name=others, balloon, below right=0.5cm and 1.5cm of freebsd, text width=1.5cm] + {NetBSD OpenBSD KAME}; + \node[name=solaris, balloon, below left=0.5cm and 1cm of freebsd, text width=2.5cm] + {OpenSolaris Illumos}; + + \draw [->] (unix) -- (bsd) node [abovestr] { 80-th }; + \draw [->] (bsd) -- (net2) node [abovestr] { 1991 }; + \draw [->] (net2) -- (bsd386) node [abovestr] { 1992 }; + \draw [->] (bsd386) -- (freebsd); + \draw [->] (freebsd) -- (dots); + \draw [->] (dots) -- (freebsd10) node [name=arr, pos=0.8] {}; + \draw [->] (others) -- (arr.center); + \draw [->] (solaris) -- (arr.center); +\end{tikzpicture} +\end{figure} +\end{frame} + + + +\begin{frame} +\frametitle{Where it runs?} +\begin{center} +\begin{tabular}{ c c c } +\includegraphics[width=3cm]{img/yahoo.png} & +\includegraphics[width=3cm]{img/yandex.png} & +\includegraphics[width=3cm]{img/rambler.png} \\ +\includegraphics[width=3cm]{img/juniper.png} & +\includegraphics[width=3cm]{img/isilon.png} & +\includegraphics[width=3cm]{img/netapp.png} \\ +\includegraphics[width=3cm]{img/emc.png} & +\includegraphics[width=3cm]{img/apple.png} & +\includegraphics[width=3cm]{img/netflix.png} \\ +\end{tabular} +\end{center} +\end{frame} + + + + +\begin{frame} +\frametitle{Where it runs?} +\begin{center} +\includegraphics[width=11cm]{img/pie.png} +\end{center} +\end{frame} + + + +\begin{frame} +\frametitle{FreeBSD developers} +\begin{figure} +\begin{tikzpicture}[ + foo/.style = { draw, circle }] + + \draw (0,0) circle[x radius=5.5cm, y radius=3.5cm]; + \draw (0,-2.5) node {contributors (thousands of 'em)}; + \draw (0,1) circle[x radius=4cm, y radius=2.5cm]; + \draw (0,-0.5) node {committers (\~{}400)}; + \draw (0,1) node[foo]{core (9)}; + \draw (-2,1) node[foo]{doceng}; + \draw (2,1) node[foo]{portmgr}; + \draw (-1,2) node[foo]{releng}; + \draw (1,2) node[foo]{secteam}; + \draw (-3.2,-1) node[foo]{vendors}; +\end{tikzpicture} +\end{figure} +\end{frame} + + + +\begin{frame} +\frametitle{Development workflow} +\begin{figure} +\begin{tikzpicture}[ + balloon/.style = { draw, minimum size=6mm, rounded corners=3mm, + very thick,draw=black!50, top color=white, + bottom color=black!20, font=\ttfamily, + align=center }, + abovestr/.style = { midway, sloped, above }] + + \draw (0,0) node[name=dots, balloon]{\ldots}; + \draw (1,0) node[name=br9]{}; + \draw [fill] (node cs:name=br9) circle[radius=0.1cm]; + \draw (3,0) node[name=br10]{}; + \draw [fill] (node cs:name=br10) circle[radius=0.1cm]; + \node[name=current, balloon, right=7cm of dots]{FreeBSD CURRENT}; + \draw [->] (dots) -- (current) node [name=head, abovestr] {head}; + + \node[name=st10, balloon, below left=1cm and 0.1 cm of current.center] + {FreeBSD 10-STABLE}; + \draw [->] (br10) .. controls +(down:1cm) and +(left:1cm) .. + node[above,sloped] {stable/10} (st10.west); + + \node[name=br90, below left=3cm and 0.5cm of br10.center]{}; + \draw [fill] (node cs:name=br90) circle[radius=0.1cm]; + \draw [->] (br9) .. controls +(down:2cm) and +(left:2cm) .. + node[below,sloped] {stable/9} (br90); + \node[name=br91, right=of br90]{}; + \draw [fill] (node cs:name=br91) circle[radius=0.1cm]; + \node[name=br92, right=of br91]{}; + \draw [fill] (node cs:name=br92) circle[radius=0.1cm]; + \node[name=st9, balloon, right=of br92] {FreeBSD 9-STABLE}; + \draw [->] (br90) -- (st9.west); + \node[name=r90, balloon, below right=1cm and 0 cm of br90]{9.0-RELEASE}; + \draw [->] (br90.center) -- (r90); + \node[name=r91, balloon, right=0.2cm of r90]{9.1-RELEASE}; + \draw [->] (br91) -- (r91); + \node[name=r92, balloon, right=0.2cm of r91]{9.2-RELEASE}; + \draw [->] (br92) -- (r92); +\end{tikzpicture} +\end{figure} +\end{frame} + + + +% OS #1 +\begin{frame} +\frametitle{What an OS actually is?} +\begin{figure} +\begin{tikzpicture}[font=\Large, node distance = 0.1 cm, + block/.style = { rectangle, draw=black, thick, fill=white, + inner xsep=0.5cm} ] + + \node [name=loader, block] { loader }; + \node [name=kernel, block, + minimum height=1.5cm, minimum width=11cm, below=of loader] { kernel }; + \node [name=drivers, block, text centered, + minimum height=1.3cm, right=2cm of kernel.center] + { drivers }; + \node [name=userland, block, minimum height=5cm, minimum width=11cm, + below=of kernel] {}; + \node [below=of kernel] { userland }; +\end{tikzpicture} +\end{figure} +\end{frame} + +% OS #2 +\begin{frame} +\frametitle{What an OS actually is?} +\begin{figure} +\begin{tikzpicture}[font=\Large, node distance = 0.1 cm, + block/.style = { rectangle, draw=black, thick, fill=white, + inner xsep=0.5cm} ] + + \node [name=loader, block] { loader }; + \node [name=kernel, block, + minimum height=1.5cm, minimum width=11cm, below=of loader] { kernel }; + \node [name=drivers, block, text centered, + minimum height=1.3cm, right=2cm of kernel.center] + { drivers }; + \node [name=userland, block, minimum height=5cm, minimum width=11cm, + below=of kernel] {}; + \node [below=of kernel] { userland }; + \node [name=sysutil, block, minimum height=1.5cm, minimum width=5cm, + above left=0.1cm and 0.1cm of userland.center] { system utilities }; +\end{tikzpicture} +\end{figure} +\end{frame} + +% OS #3 +\begin{frame} +\frametitle{What an OS actually is?} +\begin{figure} +\begin{tikzpicture}[font=\Large, node distance = 0.1 cm, + block/.style = { rectangle, draw=black, thick, fill=white, + inner xsep=0.5cm} ] + + \node [name=loader, block] { loader }; + \node [name=kernel, block, + minimum height=1.5cm, minimum width=11cm, below=of loader] { kernel }; + \node [name=drivers, block, text centered, + minimum height=1.3cm, right=2cm of kernel.center] + { drivers }; + \node [name=userland, block, minimum height=5cm, minimum width=11cm, + below=of kernel] {}; + \node [below=of kernel] { userland }; + \node [name=sysutil, block, minimum height=1.5cm, minimum width=5cm, + above left=0.1cm and 0.1cm of userland.center] { system utilities }; + \node [name=env, block, minimum height=1.5cm, minimum width=5cm, + above right=0.1cm and 0.1cm of userland.center] { POSIX environment }; +\end{tikzpicture} +\end{figure} +\end{frame} + +% OS #4 +\begin{frame} +\frametitle{What an OS actually is?} +\begin{figure} +\begin{tikzpicture}[font=\Large, node distance = 0.1 cm, + block/.style = { rectangle, draw=black, thick, fill=white, + inner xsep=0.5cm} ] + + \node [name=loader, block] { loader }; + \node [name=kernel, block, + minimum height=1.5cm, minimum width=11cm, below=of loader] { kernel }; + \node [name=drivers, block, text centered, + minimum height=1.3cm, right=2cm of kernel.center] + { drivers }; + \node [name=userland, block, minimum height=5cm, minimum width=11cm, + below=of kernel] {}; + \node [below=of kernel] { userland }; + \node [name=sysutil, block, minimum height=1.5cm, minimum width=5cm, + above left=0.1cm and 0.1cm of userland.center] { system utilities }; + \node [name=env, block, minimum height=1.5cm, minimum width=5cm, + above right=0.1cm and 0.1cm of userland.center] { POSIX environment }; + \node [name=gui, block, minimum height=1.5cm, minimum width=5cm, + below left=0.1cm and 0.1cm of userland.center] { GUI }; + \node [name=pkg, block, minimum height=1.5cm, minimum width=5cm, + below right=0.1cm and 0.1cm of userland.center] { packaging system }; +\end{tikzpicture} +\end{figure} +\end{frame} + +% OS #5 +\begin{frame} +\frametitle{What an OS actually is?} +\begin{figure} +\begin{tikzpicture}[font=\Large, node distance = 0.1 cm, + block/.style = { rectangle, draw=black, thick, fill=white, + inner xsep=0.5cm} ] + + \node [name=loader, block] { loader }; + \node [name=kernel, block, + minimum height=1.5cm, minimum width=11cm, below=of loader] { kernel }; + \node [name=drivers, block, text centered, + minimum height=1.3cm, right=2cm of kernel.center] + { drivers }; + \node [name=userland, block, minimum height=5cm, minimum width=11cm, + below=of kernel] {}; + \node [below=of kernel] { userland }; + \node [name=sysutil, block, minimum height=1.5cm, minimum width=5cm, + above left=0.1cm and 0.1cm of userland.center] { system utilities }; + \node [name=env, block, minimum height=1.5cm, minimum width=5cm, + above right=0.1cm and 0.1cm of userland.center] { POSIX environment }; + \node [name=pkg, block, minimum height=1.5cm, minimum width=2.5cm, + text width=2cm, text centered, + below left=0.1cm and 0.1cm of userland.center] { packaging system }; + \node [name=gui, block, minimum height=1.5cm, + left=of pkg] { GUI }; + \node [name=installer, block, minimum height=1.5cm, minimum width=2.5cm, + below right=0.1cm and 0.1cm of userland.center] { installer }; + \node [name=doc, block, minimum height=1.5cm, minimum width=2.5cm, + below right=0.1cm and 2.6cm of userland.center] { docs }; +\end{tikzpicture} +\end{figure} +\end{frame} + + + +\begin{frame} +\frametitle{Recommended literature} +\center\includegraphics[height=3cm]{img/book_mcckusick.jpg}\\ +The Design and Implementation of the FreeBSD Operating System, +\textit{Marshall Kirk McKusick, George V. Neville-Neil}, 2004 \\ +\end{frame} + +\begin{frame} +\frametitle{Recommended literature} +\begin{center} +\begin{tabular}{ p{3cm} p{6cm} } +\includegraphics[height=3cm]{img/book_unix.jpg} & +UNIX Network Programming, +\textit{W. Richard Stevens}, 2003 \\ +\includegraphics[height=3cm]{img/book_unp.jpg} & +Advanced Programming in the UNIX Environment, +\textit{W. Richard Stevens, Stephen A. Rago}, 2013 +\end{tabular} +\end{center} +\end{frame} + +\begin{frame} +\frametitle{Recommended literature} +\begin{center} +\begin{tabular}{ p{3cm} p{6cm} } +\includegraphics[height=3cm]{img/book_drivers.jpg} & +FreeBSD Device Drivers: A Guide for the Intrepid, +\textit{Kong, Joseph}, 2012 \\ +\includegraphics[height=3cm]{img/book_rootkits.jpg} & +Designing BSD Rootkits: An Introduction to Kernel Hacking, +\textit{Kong, Joseph}, 2009 \\ +\end{tabular} +\end{center} +\end{frame} + +\begin{frame} +\frametitle{Recommended literature} +\center\includegraphics[height=3cm]{img/book_absolute.jpg} +Absolute FreeBSD: The Complete Guide to FreeBSD, +\textit{Lucas, Michael W.}, 2009 \\ +\end{frame} + +\end{document} From owner-svn-src-user@FreeBSD.ORG Thu Oct 3 11:26:20 2013 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 600AD716; Thu, 3 Oct 2013 11:26:20 +0000 (UTC) (envelope-from pho@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 45CF62AD2; Thu, 3 Oct 2013 11:26:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r93BQKjX016192; Thu, 3 Oct 2013 11:26:20 GMT (envelope-from pho@svn.freebsd.org) Received: (from pho@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r93BQKBd016191; Thu, 3 Oct 2013 11:26:20 GMT (envelope-from pho@svn.freebsd.org) Message-Id: <201310031126.r93BQKBd016191@svn.freebsd.org> From: Peter Holm Date: Thu, 3 Oct 2013 11:26:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r256018 - user/pho/stress2/misc X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Oct 2013 11:26:20 -0000 Author: pho Date: Thu Oct 3 11:26:19 2013 New Revision: 256018 URL: http://svnweb.freebsd.org/changeset/base/256018 Log: Added regression test. Sponsored by: EMC / Isilon storage division Added: user/pho/stress2/misc/sigxcpu.sh (contents, props changed) Added: user/pho/stress2/misc/sigxcpu.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/pho/stress2/misc/sigxcpu.sh Thu Oct 3 11:26:19 2013 (r256018) @@ -0,0 +1,154 @@ +#!/bin/sh + +# +# Copyright (c) 2013 EMC Corp. +# 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 AND CONTRIBUTORS ``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 OR CONTRIBUTORS 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. +# +# $FreeBSD$ +# + +[ `id -u ` -ne 0 ] && echo "Must be root!" && exit 1 + +# "panic: softdep_deallocate_dependencies: dangling deps" seen: +# http://people.freebsd.org/~pho/stress/log/sigxcpu7.txt + +. ../default.cfg + +here=`pwd` +cd /tmp +sed '1,/^EOF/d' < $here/$0 > sigxcpu.c +cc -o sigxcpu -Wall -Wextra sigxcpu.c +rm -f sigxcpu.c +cd $here + +mount | grep $mntpoint | grep -q /dev/md && umount -f $mntpoint +mdconfig -l | grep -q md$mdstart && mdconfig -d -u $mdstart + +mdconfig -a -t swap -s 4g -u $mdstart || exit 1 +bsdlabel -w md$mdstart auto + +newfs -U md${mdstart}$part > /dev/null + +mount /dev/md${mdstart}$part $mntpoint +chmod 777 $mntpoint + +export runRUNTIME=4m +export RUNDIR=$mntpoint/stressX +set `df -ik /mnt | tail -1 | awk '{print $4,$7}'` +export KBLOCKS=$(($1 / 4)) +export INODES=$(($2 / 4)) + +su $testuser -c 'ulimit -t 3; cd ..; ./run.sh marcus.cfg' > /dev/null & +sleep 2 +for i in `jot 10`; do + /tmp/sigxcpu $mntpoint +done +kill $! +../tools/killall.sh +../tools/killall.sh + +while mount | grep $mntpoint | grep -q /dev/md; do + umount $mntpoint || sleep 1 +done +mdconfig -d -u $mdstart +rm -f /tmp/sigxcpu +exit +EOF +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +static void +hand(int i __unused) { /* handler */ + _exit(1); +} + +int +test(char *path) +{ + + FTS *fts; + FTSENT *p; + int ftsoptions; + char *args[2]; + + ftsoptions = FTS_PHYSICAL; + args[0] = path; + args[1] = 0; + + if ((fts = fts_open(args, ftsoptions, NULL)) == NULL) + err(1, "fts_open"); + + while ((p = fts_read(fts)) != NULL) { + switch (p->fts_info) { + case FTS_F: /* Ignore. */ + break; + case FTS_D: /* Ignore. */ + break; + case FTS_DP: + break; + case FTS_DC: /* Ignore. */ + break; + case FTS_SL: /* Ignore. */ + break; + case FTS_DNR: /* Warn, continue. */ + case FTS_ERR: + case FTS_NS: + case FTS_DEFAULT: + break; + default: + printf("%s: default, %d\n", getprogname(), p->fts_info); + break; + } + } + + if (errno != 0 && errno != ENOENT) + err(1, "fts_read"); + if (fts_close(fts) == -1) + err(1, "fts_close()"); + + return (0); +} + +int +main(int argc, char **argv) +{ + int i; + + if (argc != 2) + errx(1, "Usage: %s ", argv[0]); + signal(SIGALRM, hand); + alarm(20); + for (i = 0; i < 100; i++) + test(argv[1]); + + return (0); +} From owner-svn-src-user@FreeBSD.ORG Thu Oct 3 12:28:51 2013 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id CE106827; Thu, 3 Oct 2013 12:28:51 +0000 (UTC) (envelope-from pho@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id AE56B2FCE; Thu, 3 Oct 2013 12:28:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r93CSple048300; Thu, 3 Oct 2013 12:28:51 GMT (envelope-from pho@svn.freebsd.org) Received: (from pho@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r93CSptK048299; Thu, 3 Oct 2013 12:28:51 GMT (envelope-from pho@svn.freebsd.org) Message-Id: <201310031228.r93CSptK048299@svn.freebsd.org> From: Peter Holm Date: Thu, 3 Oct 2013 12:28:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r256021 - user/pho/stress2/misc X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Oct 2013 12:28:51 -0000 Author: pho Date: Thu Oct 3 12:28:51 2013 New Revision: 256021 URL: http://svnweb.freebsd.org/changeset/base/256021 Log: Added regression test. Sponsored by: EMC / Isilon storage division Added: user/pho/stress2/misc/flock_open_close.sh (contents, props changed) Added: user/pho/stress2/misc/flock_open_close.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/pho/stress2/misc/flock_open_close.sh Thu Oct 3 12:28:51 2013 (r256021) @@ -0,0 +1,166 @@ +#!/bin/sh + +# +# Copyright (c) 2012 Peter Holm +# 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 AND CONTRIBUTORS ``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 OR CONTRIBUTORS 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. +# +# $FreeBSD$ +# +# Demonstrate that close() of an flock'd file is not atomic. +# Fails with "flock_open_close: execv(/mnt/test): Text file busy" + +# Test scenario by: jhb + +[ `id -u ` -ne 0 ] && echo "Must be root!" && exit 1 + +. ../default.cfg + +odir=`pwd` +cd /tmp +sed '1,/^EOF/d' < $odir/$0 > flock_open_close.c +rm -f /tmp/flock_open_close +cc -o flock_open_close -Wall -Wextra -O2 -g flock_open_close.c -lpthread || exit 1 +rm -f flock_open_close.c + +mount | grep $mntpoint | grep -q /dev/md && umount -f $mntpoint +mdconfig -l | grep -q md$mdstart && mdconfig -d -u $mdstart + +mdconfig -a -t swap -s 1g -u $mdstart || exit 1 +bsdlabel -w md$mdstart auto +newfs -U md${mdstart}$part > /dev/null +mount /dev/md${mdstart}$part $mntpoint +chmod 777 $mntpoint + +cp /bin/test $mntpoint +chown $testuser $mntpoint/test +chmod +w $mntpoint/test + +su $testuser -c "/tmp/flock_open_close $mntpoint/test" & +while kill -0 $! 2>/dev/null; do + mksnap_ffs $mntpoint $mntpoint/.snap/snap + sleep 2 + rm -f $mntpoint/.snap/snap + sleep 1 +done +wait + +for i in `jot 10`; do + mount | grep -q md${mdstart}$part && \ + umount $mntpoint && mdconfig -d -u $mdstart && break + sleep 2 +done +if mount | grep -q md${mdstart}$part; then + fstat $mntpoint + echo "umount $mntpoint failed" + exit 1 +fi +rm -f /tmp/flock_open_close +exit +EOF + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +static void +usage(void) +{ + fprintf(stderr, "Usage: flock_close_race [args]\n"); + exit(1); +} + +static void +child(const char *binary) +{ + int fd; + + /* Exit as soon as our parent exits. */ + while (getppid() != 1) { + fd = open(binary, O_RDWR | O_EXLOCK); + if (fd < 0) { + /* + * This may get ETXTBSY since exit() will + * close its open fd's (thus releasing the + * lock), before it releases the vmspace (and + * mapping of the binary). + */ + if (errno == ETXTBSY) + continue; + err(1, "can't open %s", binary); + } + close(fd); + } + exit(0); +} + +static void +exec_child(char **av) +{ + int fd; + + fd = open(av[0], O_RDONLY | O_SHLOCK); + execv(av[0], av); + /* "flock_open_close: execv(/mnt/test): Text file busy" seen */ + err(127, "execv(%s)", av[0]); +} + +int +main(int ac, char **av) +{ + struct stat sb; + pid_t pid; + int i, status; + + if (ac < 2) + usage(); + if (stat(av[1], &sb) != 0) + err(1, "stat(%s)", av[1]); + if (!S_ISREG(sb.st_mode)) + errx(1, "%s not an executable", av[1]); + + pid = fork(); + if (pid < 0) + err(1, "fork"); + if (pid == 0) + child(av[1]); + for (i = 0; i < 200000; i++) { + pid = fork(); + if (pid < 0) + err(1, "vfork"); + if (pid == 0) + exec_child(av + 1); + wait(&status); + if (WIFEXITED(status) && WEXITSTATUS(status) == 127) { + fprintf(stderr, "FAIL\n"); + break; + } + } + return (0); +} From owner-svn-src-user@FreeBSD.ORG Fri Oct 4 09:02:03 2013 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 92735D1E; Fri, 4 Oct 2013 09:02:03 +0000 (UTC) (envelope-from pho@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7F9A22F7F; Fri, 4 Oct 2013 09:02:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r94923kG006151; Fri, 4 Oct 2013 09:02:03 GMT (envelope-from pho@svn.freebsd.org) Received: (from pho@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r949237n006150; Fri, 4 Oct 2013 09:02:03 GMT (envelope-from pho@svn.freebsd.org) Message-Id: <201310040902.r949237n006150@svn.freebsd.org> From: Peter Holm Date: Fri, 4 Oct 2013 09:02:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r256044 - user/pho/stress2/misc X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Oct 2013 09:02:03 -0000 Author: pho Date: Fri Oct 4 09:02:02 2013 New Revision: 256044 URL: http://svnweb.freebsd.org/changeset/base/256044 Log: Added a regression test. Sponsored by: EMC / Isilon storage division Added: user/pho/stress2/misc/setuid.sh (contents, props changed) Added: user/pho/stress2/misc/setuid.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/pho/stress2/misc/setuid.sh Fri Oct 4 09:02:02 2013 (r256044) @@ -0,0 +1,118 @@ +#!/bin/sh + +# +# Copyright (c) 2013 EMC Corp. +# 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 AND CONTRIBUTORS ``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 OR CONTRIBUTORS 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. +# +# $FreeBSD$ +# + +# Regression test for r218019: "panic: oof, we didn't get our fd" + +[ `id -u ` -ne 0 ] && echo "Must be root!" && exit 1 + +. ../default.cfg + +odir=`pwd` +cd /tmp +sed '1,/^EOF/d' < $odir/$0 > setuid.c +rm -f /tmp/setuid +cc -o setuid -Wall -Wextra -O2 -g setuid.c -static || exit 1 +rm -f setuid.c + +mount | grep $mntpoint | grep -q /dev/md && umount -f $mntpoint +mdconfig -l | grep -q md$mdstart && mdconfig -d -u $mdstart + +mdconfig -a -t swap -s 2g -u $mdstart || exit 1 +bsdlabel -w md$mdstart auto +newfs -U md${mdstart}$part > /dev/null +mount /dev/md${mdstart}$part $mntpoint +chmod 777 $mntpoint +mkdir $mntpoint/root + +cp /tmp/setuid $mntpoint/root/nop +chown nobody:nobody $mntpoint/root/nop +chmod 4755 $mntpoint/root/nop + +chmod 777 $mntpoint/root + +echo "Expect Abort trap" +./setuid $mntpoint/root 1 +./setuid $mntpoint/root 2 +./setuid $mntpoint/root 3 +./setuid $mntpoint/root 4 +./setuid $mntpoint/root 5 +./setuid $mntpoint/root 6 +./setuid $mntpoint/root 7 + +while mount | grep "on $mntpoint " | grep -q /dev/md; do + umount $mntpoint || sleep 1 +done +rm -f /tmp/setuid /tmp/nop +exit +EOF +#include +#include +#include +#include +#include +#include + +int +main(int argc, char **argv) +{ + char *av[3]; + int fd; + + if (argc == 1) + return (0); + + if (chroot(argv[1]) != 0) + err(1, "chroot(%s)", argv[1]); + fd = atoi(argv[2]); + + if (fd & 1) { + fprintf(stderr, "Close fd 0 "); + close(0); + } + if (fd & 2) { + fprintf(stderr, "Close fd 1 "); + close(1); + } + if (fd & 4) { + fprintf(stderr, "Close fd 2\n"); + close(2); + } else + fprintf(stderr, "\n"); + + if (chdir("/") != 0) + err(1, "chdir"); + av[0] = "nop"; + av[1] = "nop"; + av[3] = 0; + if (execve(av[0], av, NULL) == -1) + err(1, "execve"); + + return (0); +} From owner-svn-src-user@FreeBSD.ORG Fri Oct 4 11:16:49 2013 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 0591B15A; Fri, 4 Oct 2013 11:16:49 +0000 (UTC) (envelope-from pho@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E6BDF2654; Fri, 4 Oct 2013 11:16:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r94BGmdu082197; Fri, 4 Oct 2013 11:16:48 GMT (envelope-from pho@svn.freebsd.org) Received: (from pho@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r94BGmGv082196; Fri, 4 Oct 2013 11:16:48 GMT (envelope-from pho@svn.freebsd.org) Message-Id: <201310041116.r94BGmGv082196@svn.freebsd.org> From: Peter Holm Date: Fri, 4 Oct 2013 11:16:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r256047 - user/pho/stress2/misc X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Oct 2013 11:16:49 -0000 Author: pho Date: Fri Oct 4 11:16:48 2013 New Revision: 256047 URL: http://svnweb.freebsd.org/changeset/base/256047 Log: Make sure mount point exists. Sponsored by: EMC / Isilon storage division Modified: user/pho/stress2/misc/fdescfs.sh Modified: user/pho/stress2/misc/fdescfs.sh ============================================================================== --- user/pho/stress2/misc/fdescfs.sh Fri Oct 4 11:11:51 2013 (r256046) +++ user/pho/stress2/misc/fdescfs.sh Fri Oct 4 11:16:48 2013 (r256047) @@ -41,6 +41,7 @@ D=$diskimage if [ $# -eq 0 ]; then # start the parallel tests for i in `jot $mounts`; do + [ -d ${mntpoint}$i ] || mkdir -p ${mntpoint}$i ./$0 $i & ./$0 find & done From owner-svn-src-user@FreeBSD.ORG Fri Oct 4 13:27:19 2013 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id EC358A91; Fri, 4 Oct 2013 13:27:19 +0000 (UTC) (envelope-from pho@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C0E712D08; Fri, 4 Oct 2013 13:27:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r94DRJE0067473; Fri, 4 Oct 2013 13:27:19 GMT (envelope-from pho@svn.freebsd.org) Received: (from pho@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r94DRJwq067472; Fri, 4 Oct 2013 13:27:19 GMT (envelope-from pho@svn.freebsd.org) Message-Id: <201310041327.r94DRJwq067472@svn.freebsd.org> From: Peter Holm Date: Fri, 4 Oct 2013 13:27:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r256049 - user/pho/stress2/misc X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Oct 2013 13:27:20 -0000 Author: pho Date: Fri Oct 4 13:27:19 2013 New Revision: 256049 URL: http://svnweb.freebsd.org/changeset/base/256049 Log: Added regression test for r234131. Sponsored by: EMC / Isilon storage division Added: user/pho/stress2/misc/dup2.sh (contents, props changed) Added: user/pho/stress2/misc/dup2.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/pho/stress2/misc/dup2.sh Fri Oct 4 13:27:19 2013 (r256049) @@ -0,0 +1,71 @@ +#!/bin/sh + +# +# Copyright (c) 2013 EMC Corp. +# 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 AND CONTRIBUTORS ``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 OR CONTRIBUTORS 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. +# +# $FreeBSD$ +# + +# Regression test for r234131. + +dir=/tmp +odir=`pwd` +cd $dir +sed '1,/^EOF/d' < $odir/$0 > $dir/dup2.c +cc -o dup2 -Wall -Wextra dup2.c || exit 1 +rm -f dup2.c +cd $odir + +/tmp/dup2 || echo FAIL + +rm -f /tmp/dup2 +exit + +EOF +#include +#include +#include +#include + +int +main(void) +{ + int error, fd2, i; + + error = 0; + for (i = 0; i < 10000; i++) { + fd2 = arc4random() % 1000000; + if (dup2(1, fd2) != 0) { + if (errno != EBADF) { + warn("dup2(2, %d)", fd2); + error = 1; + break; + } + } else + close(fd2); + } + + return (error); +} From owner-svn-src-user@FreeBSD.ORG Sat Oct 5 16:21:01 2013 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id C4C11EE7; Sat, 5 Oct 2013 16:21:01 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 997B229C9; Sat, 5 Oct 2013 16:21:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r95GL19U093993; Sat, 5 Oct 2013 16:21:01 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r95GL1eo093992; Sat, 5 Oct 2013 16:21:01 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201310051621.r95GL1eo093992@svn.freebsd.org> From: Alan Cox Date: Sat, 5 Oct 2013 16:21:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r256064 - user/alc/cachefree X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Oct 2013 16:21:01 -0000 Author: alc Date: Sat Oct 5 16:21:01 2013 New Revision: 256064 URL: http://svnweb.freebsd.org/changeset/base/256064 Log: An experimental branch for evaluating a kernel without PG_CACHE. Added: - copied from r256063, head/ Directory Properties: user/alc/cachefree/ (props changed) From owner-svn-src-user@FreeBSD.ORG Sat Oct 5 18:41:28 2013 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id A0F3B8B0; Sat, 5 Oct 2013 18:41:28 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8E7532FC6; Sat, 5 Oct 2013 18:41:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r95IfSJA068115; Sat, 5 Oct 2013 18:41:28 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r95IfStg068113; Sat, 5 Oct 2013 18:41:28 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201310051841.r95IfStg068113@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Sat, 5 Oct 2013 18:41:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r256067 - user/des/tinderbox/etc X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Oct 2013 18:41:28 -0000 Author: des Date: Sat Oct 5 18:41:27 2013 New Revision: 256067 URL: http://svnweb.freebsd.org/changeset/base/256067 Log: No need to build 9.2 now that it's been released. Modified: user/des/tinderbox/etc/freebsd9-build.rc user/des/tinderbox/etc/freebsd9-update.rc Modified: user/des/tinderbox/etc/freebsd9-build.rc ============================================================================== --- user/des/tinderbox/etc/freebsd9-build.rc Sat Oct 5 18:07:24 2013 (r256066) +++ user/des/tinderbox/etc/freebsd9-build.rc Sat Oct 5 18:41:27 2013 (r256067) @@ -4,7 +4,7 @@ # $FreeBSD$ # -branches = RELENG_9, RELENG_9_2 +branches = RELENG_9 platforms = amd64, arm, i386, i386/pc98, ia64, mips, powerpc, powerpc64/powerpc, sparc64 targets = precleanobj, version, world, lint, kernels, postcleanobj srcdir = ${SANDBOX}/${BRANCH}/src Modified: user/des/tinderbox/etc/freebsd9-update.rc ============================================================================== --- user/des/tinderbox/etc/freebsd9-update.rc Sat Oct 5 18:07:24 2013 (r256066) +++ user/des/tinderbox/etc/freebsd9-update.rc Sat Oct 5 18:41:27 2013 (r256067) @@ -4,7 +4,7 @@ # $FreeBSD$ # -branches = RELENG_9, RELENG_9_2 +branches = RELENG_9 platforms = none srcdir = ${SANDBOX}/${BRANCH}/src targets = update, version From owner-svn-src-user@FreeBSD.ORG Sat Oct 5 19:29:49 2013 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 584A148F; Sat, 5 Oct 2013 19:29:49 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 42EC22198; Sat, 5 Oct 2013 19:29:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r95JTncP091576; Sat, 5 Oct 2013 19:29:49 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r95JTnmE091575; Sat, 5 Oct 2013 19:29:49 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201310051929.r95JTnmE091575@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Sat, 5 Oct 2013 19:29:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r256070 - user/des/tinderbox X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Oct 2013 19:29:49 -0000 Author: des Date: Sat Oct 5 19:29:48 2013 New Revision: 256070 URL: http://svnweb.freebsd.org/changeset/base/256070 Log: Hack the WORD_OPTIONS validation so strings like i386/pc98 are seen as valid words. Modified: user/des/tinderbox/tbmaster.pl Modified: user/des/tinderbox/tbmaster.pl ============================================================================== --- user/des/tinderbox/tbmaster.pl Sat Oct 5 19:17:56 2013 (r256069) +++ user/des/tinderbox/tbmaster.pl Sat Oct 5 19:29:48 2013 (r256070) @@ -158,7 +158,9 @@ sub expand($) { } @expanded; } elsif ($WORD_OPTIONS{uc($key)}) { @expanded = map { - m/^([\w.-]+|)$/ + # hack - support not only "word" but also "word/word" so + # platform designations will pass the test. + m@^([\w.-]+(?:/[\w.-]+)?|)$@ or die("invalid value for word variable $key: $_\n"); $1 } @expanded;