[persistent-storage] Fix partially broken allowlist mechanism

For real this time. fxr/262164 fixed it for almost everything but I
forgot to update the fuchsia_component template with the same fix.

Also renames the "whitelist" to an "allowlist", adds the log_listener
component that I missed adding to that list initially, and deletes other
stale (already migrated) entries from the list.

Change-Id: Ifa91d3ddbe0b6f05042bc7147dc77180af5dc660
diff --git a/build/BUILD.gn b/build/BUILD.gn
index 1d9cbf5..c934697 100644
--- a/build/BUILD.gn
+++ b/build/BUILD.gn
@@ -3,7 +3,7 @@
 # found in the LICENSE file.
 #
 
-group("deprecated_global_persistent_storage_whitelist") {
+group("deprecated_global_persistent_storage_allowlist") {
   #  ________  _________  ________  ________
   # |\   ____\|\___   ___\\   __  \|\   __  \
   # \ \  \___|\|___ \  \_\ \  \|\  \ \  \|\  \
@@ -12,7 +12,7 @@
   #     ____\_\  \   \ \__\ \ \_______\ \__\
   #    |\_________\   \|__|  \|_______|\|__|
   #    \|_________|
-  # This is a whitelist of packages that have components manifests that include
+  # This is an allowlist of packages that have components manifests that include
   # the "deprecated-global-persistent-storage" feature. Do not add to this
   # list. Use "isolated-persistent-storage" instead.
   visibility = [
@@ -25,17 +25,13 @@
     "//garnet/bin/auth:account_manager",
     "//garnet/bin/auth:token_manager_factory",
     "//garnet/bin/device_settings:device_settings_manager",
-    "//garnet/bin/guest/pkg/biscotti_guest/bin:biscotti",
     "//garnet/bin/insntrace:insntrace",
+    "//garnet/bin/log_listener:log_listener_component",
     "//garnet/bin/media:audio_core",
     "//garnet/bin/media/camera_manager:camera_manager_cpp",
-    "//garnet/bin/netcfg:netcfg",
     "//garnet/bin/timezone:timezone",
     "//garnet/bin/trace:trace",
-    "//garnet/bin/wlan/wlancfg:wlancfg",
     "//garnet/go/src/amber:amber",
     "//peridot/bin/basemgr:basemgr",
-    "//peridot/bin/voila:voila",
-    "//topaz/app/dashboard:dashboard",
   ]
 }
diff --git a/build/package.gni b/build/package.gni
index 9d133ea..045e408 100644
--- a/build/package.gni
+++ b/build/package.gni
@@ -517,7 +517,7 @@
             extra_schemas = [
               {
                 schema = "//build/cmx/block_deprecated_global_persistent_storage.json"
-                error_msg = "The 'deprecated-global-persistent-storage' feature is deprecated and guarded by a whitelist. Use 'isolated-persistent-storage' instead."
+                error_msg = "The 'deprecated-global-persistent-storage' feature is deprecated and guarded by an allowlist. Use 'isolated-persistent-storage' instead."
               },
             ]
           }
@@ -821,11 +821,11 @@
         data_deps = pkg.data_deps
         public_deps = pkg.public_deps
 
-        # Add the dep on the whitelist here rather than in pkg.deps earlier so that we can whitelist
+        # Add the dep on the allowlist here rather than in pkg.deps earlier so that we can allow
         # specific targets by the package target's name using visibility.
         # TODO(bryanhenry,CF-28): Remove along with deprecated-global-persistent-storage feature
         if (defined(pkg.deprecated_global_persistent_storage)) {
-          deps += [ "${pkg.deprecated_global_persistent_storage}:deprecated_global_persistent_storage_whitelist" ]
+          deps += [ "${pkg.deprecated_global_persistent_storage}:deprecated_global_persistent_storage_allowlist" ]
         }
       }
     }
diff --git a/build/package/component.gni b/build/package/component.gni
index 02dbf5d..11650fd3 100644
--- a/build/package/component.gni
+++ b/build/package/component.gni
@@ -155,7 +155,7 @@
             {
               schema =
                   "//build/cmx/block_deprecated_global_persistent_storage.json"
-              error_msg = "The 'deprecated-global-persistent-storage' feature is deprecated and guarded by a whitelist. Use 'isolated-persistent-storage' instead."
+              error_msg = "The 'deprecated-global-persistent-storage' feature is deprecated and guarded by an allowlist. Use 'isolated-persistent-storage' instead."
             },
           ]
         }
@@ -240,15 +240,13 @@
       response_file_contents = manifest_args
       deps = component.deps
       public_deps = component.public_deps
-    }
 
-    # This dep is added at the end so that only this target depends on the
-    # visibility whitelist, which lets us whitelist specific targets instead of
-    # whole paths. If we did it above this dep would also get added to targets
-    # above that use 'pkg.deps' as their own deps.
-    # TODO(bryanhenry,CF-28): Remove along with deprecated-global-persistent-storage feature
-    if (defined(component.deprecated_global_persistent_storage)) {
-      component.deps += [ "${component.deprecated_global_persistent_storage}:deprecated_global_persistent_storage_whitelist" ]
+      # Add the dep on the allowlist here rather than in pkg.deps earlier so that we can allow
+      # specific targets by the package target's name using visibility.
+      # TODO(bryanhenry,CF-28): Remove along with deprecated-global-persistent-storage feature
+      if (defined(component.deprecated_global_persistent_storage)) {
+        deps += [ "${component.deprecated_global_persistent_storage}:deprecated_global_persistent_storage_allowlist" ]
+      }
     }
   } else {
     group(target_name) {
diff --git a/garnet/bin/guest/pkg/biscotti_guest/bin/BUILD.gn b/garnet/bin/guest/pkg/biscotti_guest/bin/BUILD.gn
index cb521d509..9f0680d 100644
--- a/garnet/bin/guest/pkg/biscotti_guest/bin/BUILD.gn
+++ b/garnet/bin/guest/pkg/biscotti_guest/bin/BUILD.gn
@@ -104,7 +104,6 @@
 }
 
 package("biscotti") {
-  deprecated_global_persistent_storage = "//build"
   deps = [
     ":bin",
   ]
diff --git a/garnet/bin/netcfg/BUILD.gn b/garnet/bin/netcfg/BUILD.gn
index 5bf0405..809deda 100644
--- a/garnet/bin/netcfg/BUILD.gn
+++ b/garnet/bin/netcfg/BUILD.gn
@@ -47,7 +47,6 @@
 }
 
 package("netcfg") {
-  deprecated_global_persistent_storage = "//build"
   deps = [
     ":bin",
   ]
diff --git a/peridot/bin/voila/BUILD.gn b/peridot/bin/voila/BUILD.gn
index c78d8f1..6705721 100644
--- a/peridot/bin/voila/BUILD.gn
+++ b/peridot/bin/voila/BUILD.gn
@@ -44,7 +44,6 @@
 }
 
 package("voila") {
-  deprecated_global_persistent_storage = "//build"
   deps = [
     ":bin",
   ]