Repository: appc/spec
Pull request #639 (2016-07-13 10:17:47)

schema: add ppc64le/ppc64 as valid linux archs
This adds labeling for the two endian variants of ppc64:
`ppc64le` for little-endian and `ppc64` for big-endian.

These explicitly correspond to `uname -m` on Linux systems.

s-urbaniak: lgtm
glevand: Two wrongs don't make a right, so I would say use ppc64 and ppc64le.
lucab: For reference, this is how they are labeled in other places:
 * Debian: ppc64, ppc64el
 * GOARCH: ppc64, ppc64le
 * uname -m: ppc64, ppc64le

Bikeshedding level, may need a tie-breaker. @jonboulle?
jonboulle: I think we should go with @glevand 's suggestion/`uname -m` in this case; we do want to be consistent with external sources where appropriate (and arguably `ppc64`/`ppc64el` is consistent with appc's `aarch64`/`aarch64_be` anyway - one "normal", one with endianness specifically called out). We went with the weird arm7 labels at the recommendation of ARM engineers.

Patch:
diff --git a/examples/image.json b/examples/image.json
index 45cbb32..0311d0d 100644
--- a/examples/image.json
+++ b/examples/image.json
@@ -128,10 +128,6 @@
         {
             "name": "homepage",
             "value": "https://example.com"
-        },
-        {
-            "name": "appc.io/executor/supports-systemd-notify",
-            "value": "false"
         }
     ]
 }
diff --git a/schema/types/labels.go b/schema/types/labels.go
index ebd2bb1..167ce66 100644
--- a/schema/types/labels.go
+++ b/schema/types/labels.go
@@ -21,7 +21,7 @@ import (
 )
 
 var ValidOSArch = map[string][]string{
-	"linux":   {"amd64", "i386", "aarch64", "aarch64_be", "armv6l", "armv7l", "armv7b"},
+	"linux":   {"amd64", "i386", "aarch64", "aarch64_be", "armv6l", "armv7l", "armv7b", "ppc64", "ppc64le"},
 	"freebsd": {"amd64", "i386", "arm"},
 	"darwin":  {"x86_64", "i386"},
 }
diff --git a/spec/aci.md b/spec/aci.md
index b996cc5..6c06f4e 100644
--- a/spec/aci.md
+++ b/spec/aci.md
@@ -211,10 +211,6 @@ JSON Schema for the Image Manifest (app image manifest, ACI manifest), conformin
         {
             "name": "homepage",
             "value": "https://example.com"
-        },
-        {
-            "name": "appc.io/executor/supports-systemd-notify",
-            "value": false
         }
     ]
 }
@@ -254,7 +250,6 @@ JSON Schema for the Image Manifest (app image manifest, ACI manifest), conformin
     * **authors** contact details of the people or organization responsible for the image (freeform string)
     * **homepage** URL to find more information on the image (string, must be a URL with scheme HTTP or HTTPS)
     * **documentation** URL to get documentation on the image (string, must be a URL with scheme HTTP or HTTPS)
-    * **appc.io/executor/supports-systemd-notify** (boolean, optional, defaults to "false" if unset) if set to true, the application SHOULD use the sd\_notify mechanism to signal when it is ready. Also it SHOULD be able to detect if the executor had not set up the sd\_notify mechanism and skip the notification without error ([sd_notify()](https://www.freedesktop.org/software/systemd/man/sd_notify.html) from libsystemd does that automatically).
 
 #### Dependency Matching
 


Test patch:
diff --git a/schema/types/annotations_test.go b/schema/types/annotations_test.go
index 01b38f8..358fd18 100644
--- a/schema/types/annotations_test.go
+++ b/schema/types/annotations_test.go
@@ -79,12 +79,6 @@ func TestAnnotationsAssertValid(t *testing.T) {
 			},
 			false,
 		},
-		{
-			[]Annotation{
-				makeAnno("appc.io/executor/supports-systemd-notify", "false"),
-			},
-			false,
-		},
 		// empty is OK
 		{
 			[]Annotation{},
diff --git a/schema/types/labels_test.go b/schema/types/labels_test.go
index 9759d88..db40cba 100644
--- a/schema/types/labels_test.go
+++ b/schema/types/labels_test.go
@@ -61,6 +61,26 @@ func TestLabels(t *testing.T) {
 			`[{"name": "os", "value": "linux"}, {"name": "arch", "value": "armv7b"}]`,
 			"",
 		},
+		{
+			`[{"name": "os", "value": "linux"}, {"name": "arch", "value": "ppc64le"}]`,
+			"",
+		},
+		{
+			`[{"name": "os", "value": "linux"}, {"name": "arch", "value": "ppc64l"}]`,
+			`bad arch "ppc64l" for linux`,
+		},
+		{
+			`[{"name": "os", "value": "linux"}, {"name": "arch", "value": "ppc64"}]`,
+			"",
+		},
+		{
+			`[{"name": "os", "value": "linux"}, {"name": "arch", "value": "ppc64b"}]`,
+			`bad arch "ppc64b" for linux`,
+		},
+		{
+			`[{"name": "os", "value": "linux"}, {"name": "arch", "value": "ppc64be"}]`,
+			`bad arch "ppc64be" for linux`,
+		},
 		{
 			`[{"name": "os", "value": "freebsd"}, {"name": "arch", "value": "amd64"}]`,
 			"",