Merge "rest/test/goroutines: Fix flaky goroutines test."
diff --git a/cmd/gclogs/gclogs.go b/cmd/gclogs/gclogs.go
index 144752e..76c5d05 100644
--- a/cmd/gclogs/gclogs.go
+++ b/cmd/gclogs/gclogs.go
@@ -3,7 +3,7 @@
 // license that can be found in the LICENSE file.
 
 // The following enables go generate to generate the doc.go file.
-//go:generate go run $V23_ROOT/release/go/src/v.io/x/lib/cmdline/testdata/gendoc.go . -help
+//go:generate go run $JIRI_ROOT/release/go/src/v.io/x/lib/cmdline/testdata/gendoc.go . -help
 
 package main
 
diff --git a/cmd/mounttable/impl.go b/cmd/mounttable/impl.go
index 4aa0dbc..f3b4974 100644
--- a/cmd/mounttable/impl.go
+++ b/cmd/mounttable/impl.go
@@ -3,7 +3,7 @@
 // license that can be found in the LICENSE file.
 
 // The following enables go generate to generate the doc.go file.
-//go:generate go run $V23_ROOT/release/go/src/v.io/x/lib/cmdline/testdata/gendoc.go .
+//go:generate go run $JIRI_ROOT/release/go/src/v.io/x/lib/cmdline/testdata/gendoc.go .
 
 package main
 
diff --git a/cmd/namespace/impl.go b/cmd/namespace/impl.go
index ca17f5c..2622b89 100644
--- a/cmd/namespace/impl.go
+++ b/cmd/namespace/impl.go
@@ -3,7 +3,7 @@
 // license that can be found in the LICENSE file.
 
 // The following enables go generate to generate the doc.go file.
-//go:generate go run $V23_ROOT/release/go/src/v.io/x/lib/cmdline/testdata/gendoc.go .
+//go:generate go run $JIRI_ROOT/release/go/src/v.io/x/lib/cmdline/testdata/gendoc.go .
 
 package main
 
diff --git a/cmd/principal/main.go b/cmd/principal/main.go
index 0c259be..26f5c8f 100644
--- a/cmd/principal/main.go
+++ b/cmd/principal/main.go
@@ -3,7 +3,7 @@
 // license that can be found in the LICENSE file.
 
 // The following enables go generate to generate the doc.go file.
-//go:generate go run $V23_ROOT/release/go/src/v.io/x/lib/cmdline/testdata/gendoc.go .
+//go:generate go run $JIRI_ROOT/release/go/src/v.io/x/lib/cmdline/testdata/gendoc.go .
 
 package main
 
diff --git a/cmd/principal/principal_v23_test.go b/cmd/principal/principal_v23_test.go
index 6186649..96ef69b 100644
--- a/cmd/principal/principal_v23_test.go
+++ b/cmd/principal/principal_v23_test.go
@@ -543,7 +543,7 @@
 func V23TestForkWithoutVDLPATH(t *v23tests.T) {
 	var (
 		parent = t.NewTempDir("")
-		bin    = t.BuildGoPkg("v.io/x/ref/cmd/principal").WithEnv("V23_ROOT=''", "VDLPATH=''")
+		bin    = t.BuildGoPkg("v.io/x/ref/cmd/principal").WithEnv("JIRI_ROOT=''", "VDLPATH=''")
 	)
 	if err := bin.Start("create", parent, "parent").Wait(os.Stdout, os.Stderr); err != nil {
 		t.Fatalf("create %q failed: %v", parent, err)
diff --git a/cmd/sb51/doc.go b/cmd/sb51/doc.go
index 6c0f10b..f3163b2 100644
--- a/cmd/sb51/doc.go
+++ b/cmd/sb51/doc.go
@@ -20,11 +20,11 @@
 //     v23 go install v.io/x/ref/cmd/sb51
 //
 // To run client:
-//     $V23_ROOT/release/go/bin/sb51 sh <appname> <dbname>
+//     $JIRI_ROOT/release/go/bin/sb51 sh <appname> <dbname>
 //
 // Sample run (assuming a syncbase service is mounted at '/:8101/syncbase',
 // otherwise specify using -service flag):
-//     > $V23_ROOT/release/go/bin/sb51 sh -create-missing -make-demo -format=csv demoapp demodb
+//     > $JIRI_ROOT/release/go/bin/sb51 sh -create-missing -make-demo -format=csv demoapp demodb
 //     ? select v.Name, v.Address.State from DemoCustomers where Type(v) = "Customer";
 //     v.Name,v.Address.State
 //     John Smith,CA
diff --git a/cmd/servicerunner/main.go b/cmd/servicerunner/main.go
index a761f1a..ab99f42 100644
--- a/cmd/servicerunner/main.go
+++ b/cmd/servicerunner/main.go
@@ -10,7 +10,7 @@
 // go:generate comment, since generate also needs to be run with -tags=wspr,
 // which is troublesome for presubmit tests.
 //
-// cd $V23_ROOT/release/go/src && go run v.io/x/lib/cmdline/testdata/gendoc.go -tags=wspr v.io/x/ref/cmd/servicerunner -help
+// cd $JIRI_ROOT/release/go/src && go run v.io/x/lib/cmdline/testdata/gendoc.go -tags=wspr v.io/x/ref/cmd/servicerunner -help
 
 package main
 
diff --git a/cmd/uniqueid/main.go b/cmd/uniqueid/main.go
index bd98c32..a57d5e2 100644
--- a/cmd/uniqueid/main.go
+++ b/cmd/uniqueid/main.go
@@ -3,7 +3,7 @@
 // license that can be found in the LICENSE file.
 
 // The following enables go generate to generate the doc.go file.
-//go:generate go run $V23_ROOT/release/go/src/v.io/x/lib/cmdline/testdata/gendoc.go .
+//go:generate go run $JIRI_ROOT/release/go/src/v.io/x/lib/cmdline/testdata/gendoc.go .
 
 package main
 
diff --git a/cmd/vdl/builtin_vdlroot_support.go b/cmd/vdl/builtin_vdlroot_support.go
index 57e0cfa..66ea2b7 100644
--- a/cmd/vdl/builtin_vdlroot_support.go
+++ b/cmd/vdl/builtin_vdlroot_support.go
@@ -60,7 +60,7 @@
 }
 
 // maybeExtractBuiltinVdlroot checks to see if VDLROOT is set or can be
-// determined from V23_ROOT. If not, the builtin root VDL definitions are
+// determined from JIRI_ROOT. If not, the builtin root VDL definitions are
 // extracted to a new temporary directory and the VDLROOT environment variable
 // is set. cleanupFunc should be called unconditionally (even if there is
 // a non-empty set of errors returned).
diff --git a/cmd/vdl/doc.go b/cmd/vdl/doc.go
index 7daef03..afc068a 100644
--- a/cmd/vdl/doc.go
+++ b/cmd/vdl/doc.go
@@ -27,7 +27,7 @@
 
 The vdl flags are:
  -builtin_vdlroot=false
-   If V23_ROOT and VDLROOT are not set, use built-in VDL definitions for core
+   If JIRI_ROOT and VDLROOT are not set, use built-in VDL definitions for core
    types
  -exts=.vdl
    Comma-separated list of valid VDL file name extensions.
@@ -277,8 +277,8 @@
 
 Setting VDLROOT is optional.
 
-If VDLROOT is empty, we try to construct it out of the V23_ROOT environment
-variable.  It is an error if both VDLROOT and V23_ROOT are empty.
+If VDLROOT is empty, we try to construct it out of the JIRI_ROOT environment
+variable.  It is an error if both VDLROOT and JIRI_ROOT are empty.
 
 Vdl vdl.config
 
diff --git a/cmd/vdl/main.go b/cmd/vdl/main.go
index 0749c07..2525986 100644
--- a/cmd/vdl/main.go
+++ b/cmd/vdl/main.go
@@ -3,7 +3,7 @@
 // license that can be found in the LICENSE file.
 
 // The following enables go generate to generate the doc.go file.
-//go:generate go run $V23_ROOT/release/go/src/v.io/x/lib/cmdline/testdata/gendoc.go .
+//go:generate go run $JIRI_ROOT/release/go/src/v.io/x/lib/cmdline/testdata/gendoc.go .
 
 package main
 
@@ -168,8 +168,8 @@
 
 Setting VDLROOT is optional.
 
-If VDLROOT is empty, we try to construct it out of the V23_ROOT environment
-variable.  It is an error if both VDLROOT and V23_ROOT are empty.
+If VDLROOT is empty, we try to construct it out of the JIRI_ROOT environment
+variable.  It is an error if both VDLROOT and JIRI_ROOT are empty.
 `,
 }
 
@@ -396,7 +396,7 @@
 	cmdVDL.Flags.StringVar(&flagExts, "exts", ".vdl", "Comma-separated list of valid VDL file name extensions.")
 	cmdVDL.Flags.StringVar(&flagVDLConfig, "vdl.config", "vdl.config", "Basename of the optional per-package config file.")
 	cmdVDL.Flags.BoolVar(&flagIgnoreUnknown, "ignore_unknown", false, "Ignore unknown packages provided on the command line.")
-	cmdVDL.Flags.BoolVar(&flagBuiltinVdlroot, "builtin_vdlroot", false, "If V23_ROOT and VDLROOT are not set, use built-in VDL definitions for core types")
+	cmdVDL.Flags.BoolVar(&flagBuiltinVdlroot, "builtin_vdlroot", false, "If JIRI_ROOT and VDLROOT are not set, use built-in VDL definitions for core types")
 
 	// Options for compile.
 	cmdCompile.Flags.BoolVar(&optCompileStatus, "status", true, "Show package names while we compile")
diff --git a/cmd/vdl/make_builtin_vdlroot.go b/cmd/vdl/make_builtin_vdlroot.go
index 1377fd2..ae1e55d 100644
--- a/cmd/vdl/make_builtin_vdlroot.go
+++ b/cmd/vdl/make_builtin_vdlroot.go
@@ -99,9 +99,9 @@
 // writeVdlrootData creates a gzip'd tar file containing all of the VDL files
 // in vdlroot. The data is encoded as base64. Does not close out.
 func writeVdlrootData(out io.Writer) error {
-	v23root := os.Getenv("V23_ROOT")
+	v23root := os.Getenv("JIRI_ROOT")
 	if v23root == "" {
-		return fmt.Errorf("V23_ROOT is not set")
+		return fmt.Errorf("JIRI_ROOT is not set")
 	}
 	vdlroot := filepath.Join(v23root, "release", "go", "src", "v.io", "v23", "vdlroot")
 	wrapWriter := &wrapWriter{
diff --git a/cmd/vdl/vdl_test.go b/cmd/vdl/vdl_test.go
index 99f5c5a..5248f5e 100644
--- a/cmd/vdl/vdl_test.go
+++ b/cmd/vdl/vdl_test.go
@@ -70,7 +70,7 @@
 }
 
 // Asserts that the VDL command can run to completion without VDLROOT or
-// V23_ROOT being set.
+// JIRI_ROOT being set.
 func TestVDLGeneratorWithNoVDLRoot(t *testing.T) {
 	testEnv := v23tests.New(t)
 	defer testEnv.Cleanup()
@@ -79,7 +79,7 @@
 	outDir := testEnv.NewTempDir("")
 	outOpt := fmt.Sprintf("--go-out-dir=%s", outDir)
 	env := envvar.SliceToMap(os.Environ())
-	env["V23_ROOT"] = ""
+	env["JIRI_ROOT"] = ""
 	env["VDLROOT"] = ""
 	vdlBin.WithEnv(envvar.MapToSlice(env)...).Run("-v", "--builtin_vdlroot", "generate", "--lang=go", outOpt, testDir)
 	verifyOutput(t, outDir)
diff --git a/cmd/vom/vom.go b/cmd/vom/vom.go
index e14a0bd..7896f6e 100644
--- a/cmd/vom/vom.go
+++ b/cmd/vom/vom.go
@@ -3,7 +3,7 @@
 // license that can be found in the LICENSE file.
 
 // The following enables go generate to generate the doc.go file.
-//go:generate go run $V23_ROOT/release/go/src/v.io/x/lib/cmdline/testdata/gendoc.go .
+//go:generate go run $JIRI_ROOT/release/go/src/v.io/x/lib/cmdline/testdata/gendoc.go .
 
 package main
 
diff --git a/cmd/vomtestgen/generate.go b/cmd/vomtestgen/generate.go
index 19e4ac7..d780d1c 100644
--- a/cmd/vomtestgen/generate.go
+++ b/cmd/vomtestgen/generate.go
@@ -3,7 +3,7 @@
 // license that can be found in the LICENSE file.
 
 // The following enables go generate to generate the doc.go file.
-//go:generate go run $V23_ROOT/release/go/src/v.io/x/lib/cmdline/testdata/gendoc.go . -help
+//go:generate go run $JIRI_ROOT/release/go/src/v.io/x/lib/cmdline/testdata/gendoc.go . -help
 
 package main
 
diff --git a/cmd/vrpc/vrpc.go b/cmd/vrpc/vrpc.go
index e0f35e0..0372309 100644
--- a/cmd/vrpc/vrpc.go
+++ b/cmd/vrpc/vrpc.go
@@ -3,7 +3,7 @@
 // license that can be found in the LICENSE file.
 
 // The following enables go generate to generate the doc.go file.
-//go:generate go run $V23_ROOT/release/go/src/v.io/x/lib/cmdline/testdata/gendoc.go .
+//go:generate go run $JIRI_ROOT/release/go/src/v.io/x/lib/cmdline/testdata/gendoc.go .
 
 package main
 
diff --git a/cmd/vrun/vrun.go b/cmd/vrun/vrun.go
index 8d06d39..9c706ab 100644
--- a/cmd/vrun/vrun.go
+++ b/cmd/vrun/vrun.go
@@ -3,7 +3,7 @@
 // license that can be found in the LICENSE file.
 
 // The following enables go generate to generate the doc.go file.
-//go:generate go run $V23_ROOT/release/go/src/v.io/x/lib/cmdline/testdata/gendoc.go . -help
+//go:generate go run $JIRI_ROOT/release/go/src/v.io/x/lib/cmdline/testdata/gendoc.go . -help
 
 package main
 
diff --git a/examples/rps/rpsbot/main.go b/examples/rps/rpsbot/main.go
index 547f0bc..6552489 100644
--- a/examples/rps/rpsbot/main.go
+++ b/examples/rps/rpsbot/main.go
@@ -3,7 +3,7 @@
 // license that can be found in the LICENSE file.
 
 // The following enables go generate to generate the doc.go file.
-//go:generate go run $V23_ROOT/release/go/src/v.io/x/lib/cmdline/testdata/gendoc.go . -help
+//go:generate go run $JIRI_ROOT/release/go/src/v.io/x/lib/cmdline/testdata/gendoc.go . -help
 
 package main
 
diff --git a/examples/rps/rpsplayer/main.go b/examples/rps/rpsplayer/main.go
index eaf033d..e5923a2 100644
--- a/examples/rps/rpsplayer/main.go
+++ b/examples/rps/rpsplayer/main.go
@@ -3,7 +3,7 @@
 // license that can be found in the LICENSE file.
 
 // The following enables go generate to generate the doc.go file.
-//go:generate go run $V23_ROOT/release/go/src/v.io/x/lib/cmdline/testdata/gendoc.go . -help
+//go:generate go run $JIRI_ROOT/release/go/src/v.io/x/lib/cmdline/testdata/gendoc.go . -help
 
 package main
 
diff --git a/examples/rps/rpsscorekeeper/main.go b/examples/rps/rpsscorekeeper/main.go
index 1a03bad..8ffbb8e 100644
--- a/examples/rps/rpsscorekeeper/main.go
+++ b/examples/rps/rpsscorekeeper/main.go
@@ -3,7 +3,7 @@
 // license that can be found in the LICENSE file.
 
 // The following enables go generate to generate the doc.go file.
-//go:generate go run $V23_ROOT/release/go/src/v.io/x/lib/cmdline/testdata/gendoc.go . -help
+//go:generate go run $JIRI_ROOT/release/go/src/v.io/x/lib/cmdline/testdata/gendoc.go . -help
 
 package main
 
diff --git a/examples/tunnel/tunneld/main.go b/examples/tunnel/tunneld/main.go
index c33de73..167f86d 100644
--- a/examples/tunnel/tunneld/main.go
+++ b/examples/tunnel/tunneld/main.go
@@ -3,7 +3,7 @@
 // license that can be found in the LICENSE file.
 
 // The following enables go generate to generate the doc.go file.
-//go:generate go run $V23_ROOT/release/go/src/v.io/x/lib/cmdline/testdata/gendoc.go . -help
+//go:generate go run $JIRI_ROOT/release/go/src/v.io/x/lib/cmdline/testdata/gendoc.go . -help
 
 package main
 
diff --git a/examples/tunnel/vsh/main.go b/examples/tunnel/vsh/main.go
index 55a0c44..8148b51 100644
--- a/examples/tunnel/vsh/main.go
+++ b/examples/tunnel/vsh/main.go
@@ -3,7 +3,7 @@
 // license that can be found in the LICENSE file.
 
 // The following enables go generate to generate the doc.go file.
-//go:generate go run $V23_ROOT/release/go/src/v.io/x/lib/cmdline/testdata/gendoc.go . -help
+//go:generate go run $JIRI_ROOT/release/go/src/v.io/x/lib/cmdline/testdata/gendoc.go . -help
 
 package main
 
diff --git a/lib/vdl/build/build.go b/lib/vdl/build/build.go
index 0d6bea5..76f3470 100644
--- a/lib/vdl/build/build.go
+++ b/lib/vdl/build/build.go
@@ -257,7 +257,7 @@
 }
 
 // SrcDirs returns a list of package root source directories, based on the
-// VDLPATH, VDLROOT and V23_ROOT environment variables.
+// VDLPATH, VDLROOT and JIRI_ROOT environment variables.
 //
 // VDLPATH is a list of directories separated by filepath.ListSeparator;
 // e.g. the separator is ":" on UNIX, and ";" on Windows.  Each VDLPATH
@@ -266,8 +266,8 @@
 //
 // VDLROOT is a single directory specifying the location of the standard vdl
 // packages.  It has the same requirements as VDLPATH components.  If VDLROOT is
-// empty, we use V23_ROOT to construct the VDLROOT.  An error is reported if
-// neither VDLROOT nor V23_ROOT is specified.
+// empty, we use JIRI_ROOT to construct the VDLROOT.  An error is reported if
+// neither VDLROOT nor JIRI_ROOT is specified.
 func SrcDirs(errs *vdlutil.Errors) []string {
 	var srcDirs []string
 	if root := VdlRootDir(errs); root != "" {
@@ -277,19 +277,19 @@
 }
 
 // VdlRootDir returns the VDL root directory, based on the VDLPATH, VDLROOT and
-// V23_ROOT environment variables.
+// JIRI_ROOT environment variables.
 //
 // VDLROOT is a single directory specifying the location of the standard vdl
 // packages.  It has the same requirements as VDLPATH components.  If VDLROOT is
-// empty, we use V23_ROOT to construct the VDLROOT.  An error is reported if
-// neither VDLROOT nor V23_ROOT is specified.
+// empty, we use JIRI_ROOT to construct the VDLROOT.  An error is reported if
+// neither VDLROOT nor JIRI_ROOT is specified.
 func VdlRootDir(errs *vdlutil.Errors) string {
 	vdlroot := os.Getenv("VDLROOT")
 	if vdlroot == "" {
-		// Try to construct VDLROOT out of V23_ROOT.
-		vroot := os.Getenv("V23_ROOT")
+		// Try to construct VDLROOT out of JIRI_ROOT.
+		vroot := os.Getenv("JIRI_ROOT")
 		if vroot == "" {
-			errs.Error("Either VDLROOT or V23_ROOT must be set")
+			errs.Error("Either VDLROOT or JIRI_ROOT must be set")
 			return ""
 		}
 		vdlroot = filepath.Join(vroot, "release", "go", "src", "v.io", "v23", "vdlroot")
diff --git a/lib/vdl/build/build_test.go b/lib/vdl/build/build_test.go
index 38773a1..617b08a 100644
--- a/lib/vdl/build/build_test.go
+++ b/lib/vdl/build/build_test.go
@@ -53,8 +53,8 @@
 }
 
 func setVanadiumRoot(t *testing.T, root string) bool {
-	if err := os.Setenv("V23_ROOT", root); err != nil {
-		t.Errorf("Setenv(V23_ROOT, %q) failed: %v", root, err)
+	if err := os.Setenv("JIRI_ROOT", root); err != nil {
+		t.Errorf("Setenv(JIRI_ROOT, %q) failed: %v", root, err)
 		return false
 	}
 	return true
@@ -75,12 +75,12 @@
 		Want         []string
 		ErrRE        string
 	}{
-		{"", "", nil, "Either VDLROOT or V23_ROOT must be set"},
+		{"", "", nil, "Either VDLROOT or JIRI_ROOT must be set"},
 		{"/a", "", []string{"/a"}, ""},
 		{"/a/b/c", "", []string{"/a/b/c"}, ""},
 		{"", "/v23", []string{"/v23/release/go/src/v.io/v23/vdlroot"}, ""},
 		{"", "/a/b/c", []string{"/a/b/c/release/go/src/v.io/v23/vdlroot"}, ""},
-		// If both VDLROOT and V23_ROOT are specified, VDLROOT takes precedence.
+		// If both VDLROOT and JIRI_ROOT are specified, VDLROOT takes precedence.
 		{"/a", "/v23", []string{"/a"}, ""},
 		{"/a/b/c", "/x/y/z", []string{"/a/b/c"}, ""},
 	}
diff --git a/runtime/internal/rpc/benchmark/benchmark/main.go b/runtime/internal/rpc/benchmark/benchmark/main.go
index 15bf193..4078121 100644
--- a/runtime/internal/rpc/benchmark/benchmark/main.go
+++ b/runtime/internal/rpc/benchmark/benchmark/main.go
@@ -3,7 +3,7 @@
 // license that can be found in the LICENSE file.
 
 // The following enables go generate to generate the doc.go file.
-//go:generate go run $V23_ROOT/release/go/src/v.io/x/lib/cmdline/testdata/gendoc.go . -help
+//go:generate go run $JIRI_ROOT/release/go/src/v.io/x/lib/cmdline/testdata/gendoc.go . -help
 
 package main
 
diff --git a/runtime/internal/rpc/benchmark/benchmarkd/main.go b/runtime/internal/rpc/benchmark/benchmarkd/main.go
index 69679af..8f4e44b 100644
--- a/runtime/internal/rpc/benchmark/benchmarkd/main.go
+++ b/runtime/internal/rpc/benchmark/benchmarkd/main.go
@@ -3,7 +3,7 @@
 // license that can be found in the LICENSE file.
 
 // The following enables go generate to generate the doc.go file.
-//go:generate go run $V23_ROOT/release/go/src/v.io/x/lib/cmdline/testdata/gendoc.go . -help
+//go:generate go run $JIRI_ROOT/release/go/src/v.io/x/lib/cmdline/testdata/gendoc.go . -help
 
 package main
 
diff --git a/runtime/internal/rpc/stress/mtstress/main.go b/runtime/internal/rpc/stress/mtstress/main.go
index e2d3b3a..46ca097 100644
--- a/runtime/internal/rpc/stress/mtstress/main.go
+++ b/runtime/internal/rpc/stress/mtstress/main.go
@@ -3,7 +3,7 @@
 // license that can be found in the LICENSE file.
 
 // The following enables go generate to generate the doc.go file.
-//go:generate go run $V23_ROOT/release/go/src/v.io/x/lib/cmdline/testdata/gendoc.go .
+//go:generate go run $JIRI_ROOT/release/go/src/v.io/x/lib/cmdline/testdata/gendoc.go .
 
 package main
 
diff --git a/runtime/internal/rpc/stress/stress/main.go b/runtime/internal/rpc/stress/stress/main.go
index 03d3950..c27ecd8 100644
--- a/runtime/internal/rpc/stress/stress/main.go
+++ b/runtime/internal/rpc/stress/stress/main.go
@@ -3,7 +3,7 @@
 // license that can be found in the LICENSE file.
 
 // The following enables go generate to generate the doc.go file.
-//go:generate go run $V23_ROOT/release/go/src/v.io/x/lib/cmdline/testdata/gendoc.go .
+//go:generate go run $JIRI_ROOT/release/go/src/v.io/x/lib/cmdline/testdata/gendoc.go .
 
 package main
 
diff --git a/runtime/internal/rpc/stress/stressd/main.go b/runtime/internal/rpc/stress/stressd/main.go
index e6c21fa..5575038 100644
--- a/runtime/internal/rpc/stress/stressd/main.go
+++ b/runtime/internal/rpc/stress/stressd/main.go
@@ -3,7 +3,7 @@
 // license that can be found in the LICENSE file.
 
 // The following enables go generate to generate the doc.go file.
-//go:generate go run $V23_ROOT/release/go/src/v.io/x/lib/cmdline/testdata/gendoc.go . -help
+//go:generate go run $JIRI_ROOT/release/go/src/v.io/x/lib/cmdline/testdata/gendoc.go . -help
 
 package main
 
diff --git a/services/agent/agentd/main.go b/services/agent/agentd/main.go
index dd7a657..071cf69 100644
--- a/services/agent/agentd/main.go
+++ b/services/agent/agentd/main.go
@@ -3,7 +3,7 @@
 // license that can be found in the LICENSE file.
 
 // The following enables go generate to generate the doc.go file.
-//go:generate go run $V23_ROOT/release/go/src/v.io/x/lib/cmdline/testdata/gendoc.go . -help
+//go:generate go run $JIRI_ROOT/release/go/src/v.io/x/lib/cmdline/testdata/gendoc.go . -help
 
 package main
 
diff --git a/services/agent/internal/pingpong/main.go b/services/agent/internal/pingpong/main.go
index d233602..f367d20 100644
--- a/services/agent/internal/pingpong/main.go
+++ b/services/agent/internal/pingpong/main.go
@@ -3,7 +3,7 @@
 // license that can be found in the LICENSE file.
 
 // The following enables go generate to generate the doc.go file.
-//go:generate go run $V23_ROOT/release/go/src/v.io/x/lib/cmdline/testdata/gendoc.go . -help
+//go:generate go run $JIRI_ROOT/release/go/src/v.io/x/lib/cmdline/testdata/gendoc.go . -help
 
 package main
 
diff --git a/services/agent/internal/test_principal/main.go b/services/agent/internal/test_principal/main.go
index 09e03d8..b4a35f7 100644
--- a/services/agent/internal/test_principal/main.go
+++ b/services/agent/internal/test_principal/main.go
@@ -3,7 +3,7 @@
 // license that can be found in the LICENSE file.
 
 // The following enables go generate to generate the doc.go file.
-//go:generate go run $V23_ROOT/release/go/src/v.io/x/lib/cmdline/testdata/gendoc.go . -help
+//go:generate go run $JIRI_ROOT/release/go/src/v.io/x/lib/cmdline/testdata/gendoc.go . -help
 
 package main
 
diff --git a/services/agent/vbecome/vbecome.go b/services/agent/vbecome/vbecome.go
index 1b91eb2..479a1a1 100644
--- a/services/agent/vbecome/vbecome.go
+++ b/services/agent/vbecome/vbecome.go
@@ -3,7 +3,7 @@
 // license that can be found in the LICENSE file.
 
 // The following enables go generate to generate the doc.go file.
-//go:generate go run $V23_ROOT/release/go/src/v.io/x/lib/cmdline/testdata/gendoc.go . -help
+//go:generate go run $JIRI_ROOT/release/go/src/v.io/x/lib/cmdline/testdata/gendoc.go . -help
 
 package main
 
diff --git a/services/application/application/impl.go b/services/application/application/impl.go
index b420b3a..a3768a4 100644
--- a/services/application/application/impl.go
+++ b/services/application/application/impl.go
@@ -3,7 +3,7 @@
 // license that can be found in the LICENSE file.
 
 // The following enables go generate to generate the doc.go file.
-//go:generate go run $V23_ROOT/release/go/src/v.io/x/lib/cmdline/testdata/gendoc.go .
+//go:generate go run $JIRI_ROOT/release/go/src/v.io/x/lib/cmdline/testdata/gendoc.go .
 
 package main
 
diff --git a/services/application/applicationd/main.go b/services/application/applicationd/main.go
index 0471c12..d3f9e70 100644
--- a/services/application/applicationd/main.go
+++ b/services/application/applicationd/main.go
@@ -3,7 +3,7 @@
 // license that can be found in the LICENSE file.
 
 // The following enables go generate to generate the doc.go file.
-//go:generate go run $V23_ROOT/release/go/src/v.io/x/lib/cmdline/testdata/gendoc.go . -help
+//go:generate go run $JIRI_ROOT/release/go/src/v.io/x/lib/cmdline/testdata/gendoc.go . -help
 
 package main
 
diff --git a/services/binary/binary/impl.go b/services/binary/binary/impl.go
index 342eb2d..f43461b 100644
--- a/services/binary/binary/impl.go
+++ b/services/binary/binary/impl.go
@@ -3,7 +3,7 @@
 // license that can be found in the LICENSE file.
 
 // The following enables go generate to generate the doc.go file.
-//go:generate go run $V23_ROOT/release/go/src/v.io/x/lib/cmdline/testdata/gendoc.go .
+//go:generate go run $JIRI_ROOT/release/go/src/v.io/x/lib/cmdline/testdata/gendoc.go .
 
 package main
 
diff --git a/services/binary/binaryd/main.go b/services/binary/binaryd/main.go
index 8c5cae0..48903c7 100644
--- a/services/binary/binaryd/main.go
+++ b/services/binary/binaryd/main.go
@@ -3,7 +3,7 @@
 // license that can be found in the LICENSE file.
 
 // The following enables go generate to generate the doc.go file.
-//go:generate go run $V23_ROOT/release/go/src/v.io/x/lib/cmdline/testdata/gendoc.go . -help
+//go:generate go run $JIRI_ROOT/release/go/src/v.io/x/lib/cmdline/testdata/gendoc.go . -help
 
 package main
 
diff --git a/services/binary/tidy/impl.go b/services/binary/tidy/impl.go
index 1f17f80..858221b 100644
--- a/services/binary/tidy/impl.go
+++ b/services/binary/tidy/impl.go
@@ -3,7 +3,7 @@
 // license that can be found in the LICENSE file.
 
 // The following enables go generate to generate the doc.go file.
-//go:generate go run $V23_ROOT/release/go/src/v.io/x/lib/cmdline/testdata/gendoc.go .
+//go:generate go run $JIRI_ROOT/release/go/src/v.io/x/lib/cmdline/testdata/gendoc.go .
 
 package main
 
diff --git a/services/build/build/impl.go b/services/build/build/impl.go
index abe2639..7a91928 100644
--- a/services/build/build/impl.go
+++ b/services/build/build/impl.go
@@ -3,7 +3,7 @@
 // license that can be found in the LICENSE file.
 
 // The following enables go generate to generate the doc.go file.
-//go:generate go run $V23_ROOT/release/go/src/v.io/x/lib/cmdline/testdata/gendoc.go .
+//go:generate go run $JIRI_ROOT/release/go/src/v.io/x/lib/cmdline/testdata/gendoc.go .
 
 package main
 
diff --git a/services/build/buildd/impl_test.go b/services/build/buildd/impl_test.go
index 5cf973d..ef9091b 100644
--- a/services/build/buildd/impl_test.go
+++ b/services/build/buildd/impl_test.go
@@ -24,9 +24,9 @@
 // findGoBinary returns the path to the given Go binary and
 // the GOROOT environment variable to use.
 func findGoBinary(t *testing.T, name string) (bin, goroot string) {
-	root := os.Getenv("V23_ROOT")
+	root := os.Getenv("JIRI_ROOT")
 	if root == "" {
-		t.Fatalf("V23_ROOT is not set")
+		t.Fatalf("JIRI_ROOT is not set")
 	}
 	envroot := filepath.Join(root, "environment", "go", runtime.GOOS, runtime.GOARCH, "go")
 	envbin := filepath.Join(envroot, "bin", name)
diff --git a/services/build/buildd/main.go b/services/build/buildd/main.go
index d6bfd92..42ba270 100644
--- a/services/build/buildd/main.go
+++ b/services/build/buildd/main.go
@@ -3,7 +3,7 @@
 // license that can be found in the LICENSE file.
 
 // The following enables go generate to generate the doc.go file.
-//go:generate go run $V23_ROOT/release/go/src/v.io/x/lib/cmdline/testdata/gendoc.go . -help
+//go:generate go run $JIRI_ROOT/release/go/src/v.io/x/lib/cmdline/testdata/gendoc.go . -help
 
 package main
 
diff --git a/services/debug/debug/impl.go b/services/debug/debug/impl.go
index 8ee18a6..846fbed 100644
--- a/services/debug/debug/impl.go
+++ b/services/debug/debug/impl.go
@@ -3,7 +3,7 @@
 // license that can be found in the LICENSE file.
 
 // The following enables go generate to generate the doc.go file.
-//go:generate go run $V23_ROOT/release/go/src/v.io/x/lib/cmdline/testdata/gendoc.go .
+//go:generate go run $JIRI_ROOT/release/go/src/v.io/x/lib/cmdline/testdata/gendoc.go .
 
 package main
 
diff --git a/services/device/claimable/main.go b/services/device/claimable/main.go
index e0d4b4e..3b79b2c 100644
--- a/services/device/claimable/main.go
+++ b/services/device/claimable/main.go
@@ -3,7 +3,7 @@
 // license that can be found in the LICENSE file.
 
 // The following enables go generate to generate the doc.go file.
-//go:generate go run $V23_ROOT/release/go/src/v.io/x/lib/cmdline/testdata/gendoc.go . -help
+//go:generate go run $JIRI_ROOT/release/go/src/v.io/x/lib/cmdline/testdata/gendoc.go . -help
 
 package main
 
diff --git a/services/device/device/doc.go b/services/device/device/doc.go
index 28adc68..c99bdb6 100644
--- a/services/device/device/doc.go
+++ b/services/device/device/doc.go
@@ -423,7 +423,7 @@
 Device publish
 
 Publishes the given application(s) to the binary and application servers. The
-binaries should be in $V23_ROOT/release/go/bin/[<GOOS>_<GOARCH>] by default (can
+binaries should be in $JIRI_ROOT/release/go/bin/[<GOOS>_<GOARCH>] by default (can
 be overrriden with --from). By default the binary name is used as the name of
 the application envelope, and as the title in the envelope. However,
 <envelope-name> and <title> can be specified explicitly using :<envelope-name>
@@ -444,7 +444,7 @@
    Name of binary service.
  -from=
    Location of binaries to be published.  Defaults to
-   $V23_ROOT/release/go/bin/[<GOOS>_<GOARCH>]
+   $JIRI_ROOT/release/go/bin/[<GOOS>_<GOARCH>]
  -goarch=<runtime.GOARCH>
    GOARCH for application.  The default is the value of runtime.GOARCH.
  -goos=<runtime.GOOS>
diff --git a/services/device/device/publish.go b/services/device/device/publish.go
index 378db47..25a2a94 100644
--- a/services/device/device/publish.go
+++ b/services/device/device/publish.go
@@ -37,7 +37,7 @@
 	Short:  "Publish the given application(s).",
 	Long: `
 Publishes the given application(s) to the binary and application servers.
-The binaries should be in $V23_ROOT/release/go/bin/[<GOOS>_<GOARCH>] by default (can be overrriden with --from).
+The binaries should be in $JIRI_ROOT/release/go/bin/[<GOOS>_<GOARCH>] by default (can be overrriden with --from).
 By default the binary name is used as the name of the application envelope, and as the
 title in the envelope. However, <envelope-name> and <title> can be specified explicitly
 using :<envelope-name> and @<title>.
@@ -61,7 +61,7 @@
 	cmdPublish.Flags.StringVar(&readBlessings, "readers", "dev.v.io", "If non-empty, comma-separated blessing patterns to add to Read and Resolve AccessList.")
 	cmdPublish.Flags.BoolVar(&addPublisher, "add-publisher", true, "If true, add a publisher blessing to the application envelope")
 	cmdPublish.Flags.DurationVar(&minValidPublisherDuration, "publisher-min-validity", 30*time.Hour, "Publisher blessings that are valid for less than this amount of time are considered invalid")
-	cmdPublish.Flags.StringVar(&fromFlag, "from", "", "Location of binaries to be published.  Defaults to $V23_ROOT/release/go/bin/[<GOOS>_<GOARCH>]")
+	cmdPublish.Flags.StringVar(&fromFlag, "from", "", "Location of binaries to be published.  Defaults to $JIRI_ROOT/release/go/bin/[<GOOS>_<GOARCH>]")
 }
 
 func setAccessLists(ctx *context.T, env *cmdline.Env, von string) error {
@@ -201,9 +201,9 @@
 	binaries := args
 	binPath := fromFlag
 	if binPath == "" {
-		vroot := env.Vars["V23_ROOT"]
+		vroot := env.Vars["JIRI_ROOT"]
 		if vroot == "" {
-			return env.UsageErrorf("publish: $V23_ROOT environment variable should be set")
+			return env.UsageErrorf("publish: $JIRI_ROOT environment variable should be set")
 		}
 		binPath = filepath.Join(vroot, "release/go/bin")
 		if goosFlag != runtime.GOOS || goarchFlag != runtime.GOARCH {
diff --git a/services/device/device/root.go b/services/device/device/root.go
index 6caa02e..c17140d 100644
--- a/services/device/device/root.go
+++ b/services/device/device/root.go
@@ -3,7 +3,7 @@
 // license that can be found in the LICENSE file.
 
 // The following enables go generate to generate the doc.go file.
-//go:generate go run $V23_ROOT/release/go/src/v.io/x/lib/cmdline/testdata/gendoc.go .
+//go:generate go run $JIRI_ROOT/release/go/src/v.io/x/lib/cmdline/testdata/gendoc.go .
 
 package main
 
diff --git a/services/device/deviced/main.go b/services/device/deviced/main.go
index 59b6f37..7177ab4 100644
--- a/services/device/deviced/main.go
+++ b/services/device/deviced/main.go
@@ -3,7 +3,7 @@
 // license that can be found in the LICENSE file.
 
 // The following enables go generate to generate the doc.go file.
-//go:generate go run $V23_ROOT/release/go/src/v.io/x/lib/cmdline/testdata/gendoc.go .
+//go:generate go run $JIRI_ROOT/release/go/src/v.io/x/lib/cmdline/testdata/gendoc.go .
 
 package main
 
diff --git a/services/device/devicex b/services/device/devicex
index e288dbe..bbda7cc 100755
--- a/services/device/devicex
+++ b/services/device/devicex
@@ -131,7 +131,7 @@
 # Fetches binaries needed by device manager installation.
 # Globals:
 #   BIN_NAMES
-#   V23_ROOT
+#   JIRI_ROOT
 # Arguments:
 #   destination for binaries
 #   source of binaries
@@ -149,11 +149,11 @@
 
   # If source is not specified, try to look for it in the repository.
   if [[ -z "${BIN_SOURCE}" ]]; then
-    if [[ -z "${V23_ROOT}" ]]; then
+    if [[ -z "${JIRI_ROOT}" ]]; then
       echo 'ERROR: binary source not specified and no local repository available'
       exit 1
     fi
-    local -r REPO_BIN_DIR="${V23_ROOT}/release/go/bin"
+    local -r REPO_BIN_DIR="${JIRI_ROOT}/release/go/bin"
     echo "Fetching binaries:${bin_names_str} from build repository: ${REPO_BIN_DIR} ..."
     for bin_name in "${BIN_NAMES[@]}"; do
       copy_binary "${bin_name}" "${REPO_BIN_DIR}" "${BIN_INSTALL}"
diff --git a/services/device/dmrun/dmrun.go b/services/device/dmrun/dmrun.go
index d722b58..80268db 100644
--- a/services/device/dmrun/dmrun.go
+++ b/services/device/dmrun/dmrun.go
@@ -308,11 +308,11 @@
 	fmt.Println("Launched app.")
 	fmt.Println("-------------")
 	fmt.Println("See its status:")
-	fmt.Printf("\t${V23_ROOT}/release/go/bin/device status %s\n", instanceName)
+	fmt.Printf("\t${JIRI_ROOT}/release/go/bin/device status %s\n", instanceName)
 	fmt.Println("See the logs:")
-	fmt.Printf("\t${V23_ROOT}/release/go/bin/debug glob %s/logs/*\n", instanceName)
+	fmt.Printf("\t${JIRI_ROOT}/release/go/bin/debug glob %s/logs/*\n", instanceName)
 	fmt.Println("Dump e.g. the INFO log:")
-	fmt.Printf("\t${V23_ROOT}/release/go/bin/debug logs read %s/logs/app.INFO\n", instanceName)
+	fmt.Printf("\t${JIRI_ROOT}/release/go/bin/debug logs read %s/logs/app.INFO\n", instanceName)
 	fmt.Println("Clean up by deleting the VM instance:")
 	fmt.Printf("\t%s\n", vm.DeleteCommandForUser())
 }
diff --git a/services/groups/groups/main.go b/services/groups/groups/main.go
index 3200264..2c0213a 100644
--- a/services/groups/groups/main.go
+++ b/services/groups/groups/main.go
@@ -3,7 +3,7 @@
 // license that can be found in the LICENSE file.
 
 // The following enables go generate to generate the doc.go file.
-//go:generate go run $V23_ROOT/release/go/src/v.io/x/lib/cmdline/testdata/gendoc.go .
+//go:generate go run $JIRI_ROOT/release/go/src/v.io/x/lib/cmdline/testdata/gendoc.go .
 
 package main
 
diff --git a/services/identity/identityd/main.go b/services/identity/identityd/main.go
index 415b382..e152695 100644
--- a/services/identity/identityd/main.go
+++ b/services/identity/identityd/main.go
@@ -3,7 +3,7 @@
 // license that can be found in the LICENSE file.
 
 // The following enables go generate to generate the doc.go file.
-//go:generate go run $V23_ROOT/release/go/src/v.io/x/lib/cmdline/testdata/gendoc.go . -help
+//go:generate go run $JIRI_ROOT/release/go/src/v.io/x/lib/cmdline/testdata/gendoc.go . -help
 
 package main
 
diff --git a/services/identity/internal/identityd_test/main.go b/services/identity/internal/identityd_test/main.go
index d014291..fd25562 100644
--- a/services/identity/internal/identityd_test/main.go
+++ b/services/identity/internal/identityd_test/main.go
@@ -3,7 +3,7 @@
 // license that can be found in the LICENSE file.
 
 // The following enables go generate to generate the doc.go file.
-//go:generate go run $V23_ROOT/release/go/src/v.io/x/lib/cmdline/testdata/gendoc.go . -help
+//go:generate go run $JIRI_ROOT/release/go/src/v.io/x/lib/cmdline/testdata/gendoc.go . -help
 
 package main
 
diff --git a/services/mounttable/mounttabled/mounttable.go b/services/mounttable/mounttabled/mounttable.go
index 72b8cef..910d649 100644
--- a/services/mounttable/mounttabled/mounttable.go
+++ b/services/mounttable/mounttabled/mounttable.go
@@ -3,7 +3,7 @@
 // license that can be found in the LICENSE file.
 
 // The following enables go generate to generate the doc.go file.
-//go:generate go run $V23_ROOT/release/go/src/v.io/x/lib/cmdline/testdata/gendoc.go . -help
+//go:generate go run $JIRI_ROOT/release/go/src/v.io/x/lib/cmdline/testdata/gendoc.go . -help
 
 package main
 
diff --git a/services/profile/profile/impl.go b/services/profile/profile/impl.go
index ea27f27..3fbdcf4 100644
--- a/services/profile/profile/impl.go
+++ b/services/profile/profile/impl.go
@@ -3,7 +3,7 @@
 // license that can be found in the LICENSE file.
 
 // The following enables go generate to generate the doc.go file.
-//go:generate go run $V23_ROOT/release/go/src/v.io/x/lib/cmdline/testdata/gendoc.go .
+//go:generate go run $JIRI_ROOT/release/go/src/v.io/x/lib/cmdline/testdata/gendoc.go .
 
 package main
 
diff --git a/services/profile/profiled/main.go b/services/profile/profiled/main.go
index 6b51f64..24888aa 100644
--- a/services/profile/profiled/main.go
+++ b/services/profile/profiled/main.go
@@ -3,7 +3,7 @@
 // license that can be found in the LICENSE file.
 
 // The following enables go generate to generate the doc.go file.
-//go:generate go run $V23_ROOT/release/go/src/v.io/x/lib/cmdline/testdata/gendoc.go . -help
+//go:generate go run $JIRI_ROOT/release/go/src/v.io/x/lib/cmdline/testdata/gendoc.go . -help
 
 package main
 
diff --git a/services/proxy/proxyd/main.go b/services/proxy/proxyd/main.go
index 7b5488f..ec2a368 100644
--- a/services/proxy/proxyd/main.go
+++ b/services/proxy/proxyd/main.go
@@ -3,7 +3,7 @@
 // license that can be found in the LICENSE file.
 
 // The following enables go generate to generate the doc.go file.
-//go:generate go run $V23_ROOT/release/go/src/v.io/x/lib/cmdline/testdata/gendoc.go . -help
+//go:generate go run $JIRI_ROOT/release/go/src/v.io/x/lib/cmdline/testdata/gendoc.go . -help
 
 package main
 
diff --git a/services/role/roled/main.go b/services/role/roled/main.go
index 4f77cc9..301c682 100644
--- a/services/role/roled/main.go
+++ b/services/role/roled/main.go
@@ -3,7 +3,7 @@
 // license that can be found in the LICENSE file.
 
 // The following enables go generate to generate the doc.go file.
-//go:generate go run $V23_ROOT/release/go/src/v.io/x/lib/cmdline/testdata/gendoc.go . -help
+//go:generate go run $JIRI_ROOT/release/go/src/v.io/x/lib/cmdline/testdata/gendoc.go . -help
 
 package main
 
diff --git a/services/syncbase/syncbased/mojo_main.go b/services/syncbase/syncbased/mojo_main.go
index 968ec35..a37acca 100644
--- a/services/syncbase/syncbased/mojo_main.go
+++ b/services/syncbase/syncbased/mojo_main.go
@@ -7,7 +7,7 @@
 package main
 
 // To build:
-// cd $V23_ROOT/experimental/projects/ether
+// cd $JIRI_ROOT/experimental/projects/ether
 // make gen/mojo/syncbased.mojo
 
 import (
diff --git a/services/wspr/wsprd/main.go b/services/wspr/wsprd/main.go
index dbc135f..fa76437 100644
--- a/services/wspr/wsprd/main.go
+++ b/services/wspr/wsprd/main.go
@@ -11,7 +11,7 @@
 // go:generate comment, since generate also needs to be run with -tags=wspr,
 // which is troublesome for presubmit tests.
 //
-// cd $V23_ROOT/release/go/src && go run v.io/x/lib/cmdline/testdata/gendoc.go -tags=wspr v.io/x/ref/services/wspr/wsprd -help
+// cd $JIRI_ROOT/release/go/src && go run v.io/x/lib/cmdline/testdata/gendoc.go -tags=wspr v.io/x/ref/services/wspr/wsprd -help
 
 package main
 
diff --git a/test/hello/helloclient/helloclient.go b/test/hello/helloclient/helloclient.go
index c5c931a..eb0614b 100644
--- a/test/hello/helloclient/helloclient.go
+++ b/test/hello/helloclient/helloclient.go
@@ -3,7 +3,7 @@
 // license that can be found in the LICENSE file.
 
 // The following enables go generate to generate the doc.go file.
-//go:generate go run $V23_ROOT/release/go/src/v.io/x/lib/cmdline/testdata/gendoc.go . -help
+//go:generate go run $JIRI_ROOT/release/go/src/v.io/x/lib/cmdline/testdata/gendoc.go . -help
 
 package main
 
diff --git a/test/hello/helloserver/helloserver.go b/test/hello/helloserver/helloserver.go
index f9977a1..e487ca8 100644
--- a/test/hello/helloserver/helloserver.go
+++ b/test/hello/helloserver/helloserver.go
@@ -3,7 +3,7 @@
 // license that can be found in the LICENSE file.
 
 // The following enables go generate to generate the doc.go file.
-//go:generate go run $V23_ROOT/release/go/src/v.io/x/lib/cmdline/testdata/gendoc.go . -help
+//go:generate go run $JIRI_ROOT/release/go/src/v.io/x/lib/cmdline/testdata/gendoc.go . -help
 
 package main