smalltown -> metropolis

This pass removes all mentions of Smalltown, both from code and comments,
and replaces them with appropriate new terminology.

Test Plan: Refactor, covered by CI.

X-Origin-Diff: phab/D674
GitOrigin-RevId: 04a94d44ef07d46f7821530da5614daefe16d7ea
diff --git a/metropolis/node/build/def.bzl b/metropolis/node/build/def.bzl
index e2885e5..19074c2 100644
--- a/metropolis/node/build/def.bzl
+++ b/metropolis/node/build/def.bzl
@@ -50,7 +50,7 @@
     ],
 )
 
-def _smalltown_initramfs_impl(ctx):
+def _node_initramfs_impl(ctx):
     """
     Generate an lz4-compressed initramfs based on a label/file list.
     """
@@ -197,10 +197,10 @@
 
     return [DefaultInfo(files = depset([initramfs]))]
 
-smalltown_initramfs = rule(
-    implementation = _smalltown_initramfs_impl,
+node_initramfs = rule(
+    implementation = _node_initramfs_impl,
     doc = """
-        Build a Smalltown initramfs. The initramfs will contain a basic /dev directory and all the files specified by the
+        Build a node initramfs. The initramfs will contain a basic /dev directory and all the files specified by the
         `files` attribute. Executable files will have their permissions set to 0755, non-executable files will have
         their permissions set to 0444. All parent directories will be created with 0755 permissions.
     """,
diff --git a/metropolis/node/build/genosrelease/main.go b/metropolis/node/build/genosrelease/main.go
index 2344f19..e19876e 100644
--- a/metropolis/node/build/genosrelease/main.go
+++ b/metropolis/node/build/genosrelease/main.go
@@ -53,7 +53,7 @@
 		statusVars[parts[0]] = parts[1]
 	}
 
-	smalltownVersion, ok := statusVars[*flagStampVar]
+	version, ok := statusVars[*flagStampVar]
 	if !ok {
 		fmt.Printf("%v key not set in bazel workspace status file\n", *flagStampVar)
 		os.Exit(1)
@@ -62,9 +62,9 @@
 	osReleaseVars := map[string]string{
 		"NAME":        *flagName,
 		"ID":          *flagID,
-		"VERSION":     smalltownVersion,
-		"VERSION_ID":  smalltownVersion,
-		"PRETTY_NAME": *flagName + " " + smalltownVersion,
+		"VERSION":     version,
+		"VERSION_ID":  version,
+		"PRETTY_NAME": *flagName + " " + version,
 	}
 	osReleaseContent, err := godotenv.Marshal(osReleaseVars)
 	if err != nil {
diff --git a/metropolis/node/build/mkimage/main.go b/metropolis/node/build/mkimage/main.go
index 9f49f0a..94b2ecb 100644
--- a/metropolis/node/build/mkimage/main.go
+++ b/metropolis/node/build/mkimage/main.go
@@ -16,8 +16,9 @@
 
 package main
 
-// mkimage is a tool to generate a Smalltown disk image containing the given EFI payload, and optionally, a given external
-// initramfs image and enrolment credentials.
+// mkimage is a tool to generate a Metropolis node disk image containing the
+// given EFI payload, and optionally, a given external initramfs image and
+// enrolment credentials.
 
 import (
 	"flag"
@@ -32,7 +33,7 @@
 	"github.com/diskfs/go-diskfs/partition/gpt"
 )
 
-var SmalltownDataPartition gpt.Type = gpt.Type("9eeec464-6885-414a-b278-4305c51f7966")
+var NodeDataPartition gpt.Type = gpt.Type("9eeec464-6885-414a-b278-4305c51f7966")
 
 var (
 	flagEFI                  string
@@ -79,8 +80,8 @@
 				End:   mibToSectors(flagESPPartitionSize) - 1,
 			},
 			{
-				Type:  SmalltownDataPartition,
-				Name:  "SIGNOS-DATA",
+				Type:  NodeDataPartition,
+				Name:  "METROPOLIS-NODE-DATA",
 				Start: mibToSectors(flagESPPartitionSize),
 				End:   mibToSectors(flagESPPartitionSize+flagDataPartitionSize) - 1,
 			},
@@ -96,7 +97,7 @@
 	}
 
 	// Create EFI partition structure.
-	for _, dir := range []string{"/EFI", "/EFI/BOOT", "/EFI/smalltown"} {
+	for _, dir := range []string{"/EFI", "/EFI/BOOT", "/EFI/metropolis"} {
 		if err := fs.Mkdir(dir); err != nil {
 			log.Fatalf("Mkdir(%q): %v", dir, err)
 		}
@@ -105,11 +106,11 @@
 	put(fs, flagEFI, "/EFI/BOOT/BOOTX64.EFI")
 
 	if flagInitramfs != "" {
-		put(fs, flagInitramfs, "/EFI/smalltown/initramfs.cpio.lz4")
+		put(fs, flagInitramfs, "/EFI/metropolis/initramfs.cpio.lz4")
 	}
 
 	if flagEnrolmentCredentials != "" {
-		put(fs, flagEnrolmentCredentials, "/EFI/smalltown/enrolment.pb")
+		put(fs, flagEnrolmentCredentials, "/EFI/metropolis/enrolment.pb")
 	}
 
 	if err := diskImg.File.Close(); err != nil {