Hello community,

here is the log from the commit of package ignition for openSUSE:Factory 
checked in at 2019-11-15 00:38:35
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ignition (Old)
 and      /work/SRC/openSUSE:Factory/.ignition.new.26869 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ignition"

Fri Nov 15 00:38:35 2019 rev:6 rq:748742 version:2.0.1+git20191106.809f44a

Changes:
--------
--- /work/SRC/openSUSE:Factory/ignition/ignition.changes        2019-10-02 
14:55:58.975272654 +0200
+++ /work/SRC/openSUSE:Factory/.ignition.new.26869/ignition.changes     
2019-11-15 00:38:36.711696442 +0100
@@ -1,0 +2,20 @@
+Thu Nov 07 17:45:13 UTC 2019 - ku...@suse.de
+
+- Update to version 2.0.1+git20191106.809f44a:
+  * Add test cases for file system mount options
+  * Add translator for Filesystem struct
+  * Document file system mount options
+  * Implement file system mount options
+  * providers: add initial zVM hypervisor support
+  * travis: test on arm, use new ubuntu, cleanup
+  * config/v3_1_exp/types: validate http(s) proxies
+  * tests: remove unused stub for id
+  * distro: turn on SELinux by default
+  * Add filesystem mount options to schema
+  * files/passwd: don't shell out to id
+  * files/passwd: clean up repetitive code
+  * providers/aliyun: Add aliyun
+  * release-checklist: mention mantle cl branch for 0.x.y releases
+  * config/v3*: don't warn on unset mode if appending
+
+-------------------------------------------------------------------

Old:
----
  ignition-2.0.1+git20190925.641ec6a.tar.xz

New:
----
  ignition-2.0.1+git20191106.809f44a.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ ignition.spec ++++++
--- /var/tmp/diff_new_pack.4RBtbz/_old  2019-11-15 00:38:37.175696407 +0100
+++ /var/tmp/diff_new_pack.4RBtbz/_new  2019-11-15 00:38:37.175696407 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           ignition
-Version:        2.0.1+git20190925.641ec6a
+Version:        2.0.1+git20191106.809f44a
 Release:        0
 Summary:        First boot installer and configuration tool
 License:        Apache-2.0

++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.4RBtbz/_old  2019-11-15 00:38:37.219696403 +0100
+++ /var/tmp/diff_new_pack.4RBtbz/_new  2019-11-15 00:38:37.223696403 +0100
@@ -1,6 +1,6 @@
 <servicedata>
   <service name="tar_scm">
     <param name="url">git://github.com/coreos/ignition.git</param>
-    <param 
name="changesrevision">641ec6a44062f956bf1d46cf10824032a1996590</param>
+    <param 
name="changesrevision">809f44aed2102b489ef19ad9631eb55fb9f84539</param>
  </service>
 </servicedata>
\ No newline at end of file

++++++ ignition-2.0.1+git20190925.641ec6a.tar.xz -> 
ignition-2.0.1+git20191106.809f44a.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/ignition-2.0.1+git20190925.641ec6a/.github/ISSUE_TEMPLATE/release-checklist.md
 
new/ignition-2.0.1+git20191106.809f44a/.github/ISSUE_TEMPLATE/release-checklist.md
--- 
old/ignition-2.0.1+git20190925.641ec6a/.github/ISSUE_TEMPLATE/release-checklist.md
  2019-09-25 21:37:39.000000000 +0200
+++ 
new/ignition-2.0.1+git20191106.809f44a/.github/ISSUE_TEMPLATE/release-checklist.md
  2019-11-07 00:18:03.000000000 +0100
@@ -14,7 +14,7 @@
 
  - [ ] Create a draft release on Github and upload all the release artifacts 
and their signatures. Copy and paste the release notes from NEWS here as well.
  - [ ] Publish the release
- - [ ] Vendor the new Ignition version in 
[mantle](https://github.com/coreos/mantle)
+ - [ ] Vendor the new Ignition version in 
[mantle](https://github.com/coreos/mantle) (backporting to the `cl` branch if a 
new 0.x.y release is being cut)
 
 For 0.x.y releases:
  - [ ] [Sync the 
docs](https://jenkins-container-linux.apps.ci.centos.org/job/os/job/sync-docs/build)
 using `ignition` for `PROJECT` and the version `X.Y.Z` (not `vX.Y.Z`) for 
`RELEASE`.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ignition-2.0.1+git20190925.641ec6a/.travis.yml 
new/ignition-2.0.1+git20191106.809f44a/.travis.yml
--- old/ignition-2.0.1+git20190925.641ec6a/.travis.yml  2019-09-25 
21:37:39.000000000 +0200
+++ new/ignition-2.0.1+git20191106.809f44a/.travis.yml  2019-11-07 
00:18:03.000000000 +0100
@@ -1,61 +1,21 @@
-sudo: required
-dist: trusty
-
+dist: bionic
 language: go
-go_import_path: github.com/coreos/ignition
+go_import_path: github.com/coreos/ignition/v2
 
 go:
-  - "1.11"
-  - "1.12"
+  - "1.11.x"
+  - "1.13.x"
+
+arch:
+  - arm64
+  - amd64
 
-env:
-  matrix:
-   - TARGET=amd64
-   - TARGET=arm64 GIMME_ARCH=arm64 GIMME_CGO_ENABLED=1
+install: skip
 
 addons:
   apt:
     packages:
-    # install cross compilers for cgo support.
-    - gcc-aarch64-linux-gnu
-    - libc6-dev-arm64-cross
     - libblkid-dev
 
-install:
-  # since libblkid-dev:arm64 cannot be installed, spoof it
-  -     if [ "${TARGET}" == "arm64" ]; then
-                echo "void blkid_new_probe_from_filename(void) {}"          >> 
stub.c;
-                echo "void blkid_do_probe(void) {}"                         >> 
stub.c;
-                echo "void blkid_probe_has_value(void) {}"                  >> 
stub.c;
-                echo "void blkid_probe_lookup_value(void) {}"               >> 
stub.c;
-                echo "void blkid_free_probe(void) {}"                       >> 
stub.c;
-                echo "void blkid_probe_get_partitions(void) {}"             >> 
stub.c;
-                echo "void blkid_partlist_get_table(void) {}"               >> 
stub.c;
-                echo "void blkid_partlist_get_partition(void) {}"           >> 
stub.c;
-                echo "void blkid_partlist_numof_partitions(void) {}"        >> 
stub.c;
-                echo "void blkid_partition_get_name(void) {}"               >> 
stub.c;
-                echo "void blkid_partition_get_uuid(void) {}"               >> 
stub.c;
-                echo "void blkid_partition_get_type_string(void) {}"        >> 
stub.c;
-                echo "void blkid_partition_get_start(void) {}"              >> 
stub.c;
-                echo "void blkid_partition_get_size(void) {}"               >> 
stub.c;
-                echo "void blkid_partition_get_partno(void) {}"             >> 
stub.c;
-                echo "void blkid_parttable_get_type(void) {}"               >> 
stub.c;
-                echo "void blkid_probe_get_topology (void) {}"              >> 
stub.c;
-                echo "void blkid_topology_get_logical_sector_size(void) {}" >> 
stub.c;
-                aarch64-linux-gnu-gcc-4.8 -c -o stub.o stub.c;
-                aarch64-linux-gnu-gcc-ar-4.8 cq libblkid.a stub.o;
-        fi
-
 script:
-  -     if [ "${TARGET}" == "amd64" ]; then
-                GOARCH="${TARGET}" ./test;
-        elif [ "${TARGET}" == "arm64" ]; then
-                export CGO_LDFLAGS="-L ${PWD}";
-                GOARCH="${TARGET}" ./build && file "bin/${TARGET}/ignition" | 
egrep 'aarch64';
-        fi
-  -     if [ "${TARGET}" == "amd64" ]; then
-                GOARCH="${TARGET}" ./build_blackbox_tests;
-        elif [ "${TARGET}" == "arm64" ]; then
-                export CGO_LDFLAGS="-L ${PWD}";
-                GOARCH="${TARGET}" ./build_blackbox_tests && file "tests.test" 
| egrep 'aarch64';
-        fi
+  - ./test;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/ignition-2.0.1+git20190925.641ec6a/config/shared/errors/errors.go 
new/ignition-2.0.1+git20191106.809f44a/config/shared/errors/errors.go
--- old/ignition-2.0.1+git20190925.641ec6a/config/shared/errors/errors.go       
2019-09-25 21:37:39.000000000 +0200
+++ new/ignition-2.0.1+git20191106.809f44a/config/shared/errors/errors.go       
2019-11-07 00:18:03.000000000 +0100
@@ -68,6 +68,8 @@
        ErrZeroesWithShouldNotExist  = errors.New("shouldExist is false for a 
partition and other partition(s) has start or size 0")
        ErrNeedLabelOrNumber         = errors.New("a partition number >= 1 or a 
label must be specified")
        ErrDuplicateLabels           = errors.New("cannot use the same 
partition label twice")
+       ErrInvalidProxy              = errors.New("proxies must be http(s)")
+       ErrInsecureProxy             = errors.New("insecure plaintext HTTP 
proxy specified for HTTPS resources")
 
        // Systemd section errors
        ErrInvalidSystemdExt       = errors.New("invalid systemd unit 
extension")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/ignition-2.0.1+git20190925.641ec6a/config/v3_0/types/file.go 
new/ignition-2.0.1+git20191106.809f44a/config/v3_0/types/file.go
--- old/ignition-2.0.1+git20190925.641ec6a/config/v3_0/types/file.go    
2019-09-25 21:37:39.000000000 +0200
+++ new/ignition-2.0.1+git20191106.809f44a/config/v3_0/types/file.go    
2019-11-07 00:18:03.000000000 +0100
@@ -24,7 +24,7 @@
 func (f File) Validate(c path.ContextPath) (r report.Report) {
        r.Merge(f.Node.Validate(c))
        r.AddOnError(c.Append("mode"), validateMode(f.Mode))
-       if f.Mode == nil {
+       if f.Mode == nil && f.Contents.Source != nil {
                r.AddOnWarn(c.Append("mode"), errors.ErrFilePermissionsUnset)
        }
        r.AddOnError(c.Append("overwrite"), f.validateOverwrite())
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/ignition-2.0.1+git20190925.641ec6a/config/v3_1_experimental/schema/ignition.json
 
new/ignition-2.0.1+git20191106.809f44a/config/v3_1_experimental/schema/ignition.json
--- 
old/ignition-2.0.1+git20190925.641ec6a/config/v3_1_experimental/schema/ignition.json
        2019-09-25 21:37:39.000000000 +0200
+++ 
new/ignition-2.0.1+git20191106.809f44a/config/v3_1_experimental/schema/ignition.json
        2019-11-07 00:18:03.000000000 +0100
@@ -244,6 +244,12 @@
                 "type": "string"
               }
             },
+            "mountOptions": {
+              "type": "array",
+              "items": {
+                "type": "string"
+              }
+            },
             "wipeFilesystem": {
               "type": ["boolean", "null"]
             },
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/ignition-2.0.1+git20190925.641ec6a/config/v3_1_experimental/translate/translate.go
 
new/ignition-2.0.1+git20191106.809f44a/config/v3_1_experimental/translate/translate.go
--- 
old/ignition-2.0.1+git20190925.641ec6a/config/v3_1_experimental/translate/translate.go
      2019-09-25 21:37:39.000000000 +0200
+++ 
new/ignition-2.0.1+git20191106.809f44a/config/v3_1_experimental/translate/translate.go
      2019-11-07 00:18:03.000000000 +0100
@@ -20,6 +20,19 @@
        "github.com/coreos/ignition/v2/config/v3_1_experimental/types"
 )
 
+func translateFilesystem(old old_types.Filesystem) (ret types.Filesystem) {
+       // use a new translator so we don't recurse infintitely
+       tr := translate.NewTranslator()
+       tr.Translate(&old.Device, &ret.Device)
+       tr.Translate(&old.Format, &ret.Format)
+       tr.Translate(&old.Label, &ret.Label)
+       tr.Translate(&old.Options, &ret.Options)
+       tr.Translate(&old.Path, &ret.Path)
+       tr.Translate(&old.UUID, &ret.UUID)
+       tr.Translate(&old.WipeFilesystem, &ret.WipeFilesystem)
+       return
+}
+
 func translateIgnition(old old_types.Ignition) (ret types.Ignition) {
        // use a new translator so we don't recurse infintitely
        tr := translate.NewTranslator()
@@ -33,6 +46,7 @@
 func Translate(old old_types.Config) (ret types.Config) {
        tr := translate.NewTranslator()
        tr.AddCustomTranslator(translateIgnition)
+       tr.AddCustomTranslator(translateFilesystem)
        tr.Translate(&old, &ret)
        return
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/ignition-2.0.1+git20190925.641ec6a/config/v3_1_experimental/types/file.go 
new/ignition-2.0.1+git20191106.809f44a/config/v3_1_experimental/types/file.go
--- 
old/ignition-2.0.1+git20190925.641ec6a/config/v3_1_experimental/types/file.go   
    2019-09-25 21:37:39.000000000 +0200
+++ 
new/ignition-2.0.1+git20191106.809f44a/config/v3_1_experimental/types/file.go   
    2019-11-07 00:18:03.000000000 +0100
@@ -24,7 +24,7 @@
 func (f File) Validate(c path.ContextPath) (r report.Report) {
        r.Merge(f.Node.Validate(c))
        r.AddOnError(c.Append("mode"), validateMode(f.Mode))
-       if f.Mode == nil {
+       if f.Mode == nil && f.Contents.Source != nil {
                r.AddOnWarn(c.Append("mode"), errors.ErrFilePermissionsUnset)
        }
        r.AddOnError(c.Append("overwrite"), f.validateOverwrite())
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/ignition-2.0.1+git20190925.641ec6a/config/v3_1_experimental/types/filesystem.go
 
new/ignition-2.0.1+git20191106.809f44a/config/v3_1_experimental/types/filesystem.go
--- 
old/ignition-2.0.1+git20190925.641ec6a/config/v3_1_experimental/types/filesystem.go
 2019-09-25 21:37:39.000000000 +0200
+++ 
new/ignition-2.0.1+git20191106.809f44a/config/v3_1_experimental/types/filesystem.go
 2019-11-07 00:18:03.000000000 +0100
@@ -28,7 +28,8 @@
 
 func (f Filesystem) IgnoreDuplicates() map[string]struct{} {
        return map[string]struct{}{
-               "Options": {},
+               "Options":      {},
+               "MountOptions": {},
        }
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/ignition-2.0.1+git20190925.641ec6a/config/v3_1_experimental/types/proxy.go 
new/ignition-2.0.1+git20191106.809f44a/config/v3_1_experimental/types/proxy.go
--- 
old/ignition-2.0.1+git20190925.641ec6a/config/v3_1_experimental/types/proxy.go  
    1970-01-01 01:00:00.000000000 +0100
+++ 
new/ignition-2.0.1+git20191106.809f44a/config/v3_1_experimental/types/proxy.go  
    2019-11-07 00:18:03.000000000 +0100
@@ -0,0 +1,49 @@
+// Copyright 2019 Red Hat, Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package types
+
+import (
+       "net/url"
+
+       "github.com/coreos/ignition/v2/config/shared/errors"
+
+       "github.com/coreos/vcontext/path"
+       "github.com/coreos/vcontext/report"
+)
+
+func (p Proxy) Validate(c path.ContextPath) (r report.Report) {
+       validateProxyURL(p.HTTPProxy, c.Append("httpProxy"), &r, true)
+       validateProxyURL(p.HTTPSProxy, c.Append("httpsProxy"), &r, false)
+       return
+}
+
+func validateProxyURL(s *string, p path.ContextPath, r *report.Report, httpOk 
bool) {
+       if s == nil {
+               return
+       }
+       u, err := url.Parse(*s)
+       if err != nil {
+               r.AddOnError(p, errors.ErrInvalidUrl)
+               return
+       }
+
+       if u.Scheme != "https" && u.Scheme != "http" {
+               r.AddOnError(p, errors.ErrInvalidProxy)
+               return
+       }
+       if u.Scheme == "http" && !httpOk {
+               r.AddOnWarn(p, errors.ErrInsecureProxy)
+       }
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/ignition-2.0.1+git20190925.641ec6a/config/v3_1_experimental/types/proxy_test.go
 
new/ignition-2.0.1+git20191106.809f44a/config/v3_1_experimental/types/proxy_test.go
--- 
old/ignition-2.0.1+git20190925.641ec6a/config/v3_1_experimental/types/proxy_test.go
 1970-01-01 01:00:00.000000000 +0100
+++ 
new/ignition-2.0.1+git20191106.809f44a/config/v3_1_experimental/types/proxy_test.go
 2019-11-07 00:18:03.000000000 +0100
@@ -0,0 +1,112 @@
+// Copyright 2019 Red Hat, Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package types
+
+import (
+       "reflect"
+       "testing"
+
+       "github.com/coreos/ignition/v2/config/shared/errors"
+       "github.com/coreos/ignition/v2/config/util"
+
+       "github.com/coreos/vcontext/path"
+       "github.com/coreos/vcontext/report"
+)
+
+func TestValidateProxyURL(t *testing.T) {
+       tests := []struct {
+               in     *string
+               httpOk bool
+               out    report.Entry
+       }{
+               {
+                       nil,
+                       false,
+                       report.Entry{},
+               },
+               {
+                       nil,
+                       true,
+                       report.Entry{},
+               },
+               {
+                       util.StrToPtr("https://example.com";),
+                       false,
+                       report.Entry{},
+               },
+               {
+                       util.StrToPtr("https://example.com";),
+                       true,
+                       report.Entry{},
+               },
+               {
+                       util.StrToPtr("http://example.com";),
+                       false,
+                       report.Entry{
+                               Kind:    report.Warn,
+                               Message: errors.ErrInsecureProxy.Error(),
+                       },
+               },
+               {
+                       util.StrToPtr("http://example.com";),
+                       true,
+                       report.Entry{},
+               },
+               {
+                       util.StrToPtr("ftp://example.com";),
+                       false,
+                       report.Entry{
+                               Kind:    report.Error,
+                               Message: errors.ErrInvalidProxy.Error(),
+                       },
+               },
+               {
+                       util.StrToPtr("ftp://example.com";),
+                       true,
+                       report.Entry{
+                               Kind:    report.Error,
+                               Message: errors.ErrInvalidProxy.Error(),
+                       },
+               },
+               {
+                       util.StrToPtr("http://[::1]a";),
+                       false,
+                       report.Entry{
+                               Kind:    report.Error,
+                               Message: errors.ErrInvalidUrl.Error(),
+                       },
+               },
+               {
+                       util.StrToPtr("http://[::1]a";),
+                       true,
+                       report.Entry{
+                               Kind:    report.Error,
+                               Message: errors.ErrInvalidUrl.Error(),
+                       },
+               },
+       }
+
+       for i, test := range tests {
+               r := report.Report{}
+               validateProxyURL(test.in, path.New(""), &r, test.httpOk)
+               e := report.Entry{}
+               if len(r.Entries) > 0 {
+                       e = r.Entries[0]
+               }
+               if !reflect.DeepEqual(test.out, e) {
+                       t.Errorf("#%d: bad error: want %v, got %v", i, 
test.out, e)
+               }
+       }
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/ignition-2.0.1+git20190925.641ec6a/config/v3_1_experimental/types/schema.go 
new/ignition-2.0.1+git20191106.809f44a/config/v3_1_experimental/types/schema.go
--- 
old/ignition-2.0.1+git20190925.641ec6a/config/v3_1_experimental/types/schema.go 
    2019-09-25 21:37:39.000000000 +0200
+++ 
new/ignition-2.0.1+git20191106.809f44a/config/v3_1_experimental/types/schema.go 
    2019-11-07 00:18:03.000000000 +0100
@@ -62,6 +62,7 @@
        Device         string             `json:"device"`
        Format         *string            `json:"format,omitempty"`
        Label          *string            `json:"label,omitempty"`
+       MountOptions   []MountOption      `json:"mountOptions,omitempty"`
        Options        []FilesystemOption `json:"options,omitempty"`
        Path           *string            `json:"path,omitempty"`
        UUID           *string            `json:"uuid,omitempty"`
@@ -95,6 +96,8 @@
        Target string `json:"target"`
 }
 
+type MountOption string
+
 type NoProxyItem string
 
 type Node struct {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/ignition-2.0.1+git20190925.641ec6a/doc/configuration-v3_1-experimental.md 
new/ignition-2.0.1+git20191106.809f44a/doc/configuration-v3_1-experimental.md
--- 
old/ignition-2.0.1+git20190925.641ec6a/doc/configuration-v3_1-experimental.md   
    2019-09-25 21:37:39.000000000 +0200
+++ 
new/ignition-2.0.1+git20191106.809f44a/doc/configuration-v3_1-experimental.md   
    2019-11-07 00:18:03.000000000 +0100
@@ -55,6 +55,7 @@
     * **_label_** (string): the label of the filesystem.
     * **_uuid_** (string): the uuid of the filesystem.
     * **_options_** (list of strings): any additional options to be passed to 
the format-specific mkfs utility.
+    * **_mountOptions_** (list of strings): any special options to be passed 
to the mount command.
   * **_files_** (list of objects): the list of files to be written. Every 
file, directory and link must have a unique `path`.
     * **path** (string): the absolute path to the file.
     * **_overwrite_** (boolean): whether to delete preexisting nodes at the 
path. `source` must be specified if `overwrite` is true. Defaults to false.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/ignition-2.0.1+git20190925.641ec6a/doc/supported-platforms.md 
new/ignition-2.0.1+git20191106.809f44a/doc/supported-platforms.md
--- old/ignition-2.0.1+git20190925.641ec6a/doc/supported-platforms.md   
2019-09-25 21:37:39.000000000 +0200
+++ new/ignition-2.0.1+git20191106.809f44a/doc/supported-platforms.md   
2019-11-07 00:18:03.000000000 +0100
@@ -10,6 +10,7 @@
 * [Packet] - Ignition will read its configuration from the instance userdata. 
SSH keys are handled by coreos-metadata.
 * [QEMU] - Ignition will read its configuration from the 
'opt/com.coreos/config' key on the QEMU Firmware Configuration Device 
(available in QEMU 2.4.0 and higher).
 * [DigitalOcean] - Ignition will read its configuration from the droplet 
userdata. SSH keys and network configuration are handled by coreos-metadata.
+* [zVM] - Ignition will read its configuration from the reader device 
directly. The vmur program is necessary, which requires the vmcp and vmur 
kernel module as prerequisite, and the corresponding z/VM virtual unit record 
devices (in most cases 000c as reader, 000d as punch) must be set online.
 
 Ignition is under active development so expect this list to expand in the 
coming months.
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/ignition-2.0.1+git20190925.641ec6a/internal/distro/distro.go 
new/ignition-2.0.1+git20191106.809f44a/internal/distro/distro.go
--- old/ignition-2.0.1+git20190925.641ec6a/internal/distro/distro.go    
2019-09-25 21:37:39.000000000 +0200
+++ new/ignition-2.0.1+git20191106.809f44a/internal/distro/distro.go    
2019-11-07 00:18:03.000000000 +0100
@@ -33,12 +33,11 @@
        systemConfigDir = "/usr/lib/ignition"
 
        // Helper programs
-       chrootCmd   = "chroot"
        groupaddCmd = "groupadd"
-       idCmd       = "id"
        mdadmCmd    = "mdadm"
        mountCmd    = "mount"
        sgdiskCmd   = "sgdisk"
+       modprobeCmd = "modprobe"
        udevadmCmd  = "udevadm"
        usermodCmd  = "usermod"
        useraddCmd  = "useradd"
@@ -54,8 +53,13 @@
        vfatMkfsCmd  = "mkfs.vfat"
        xfsMkfsCmd   = "mkfs.xfs"
 
+       //zVM programs
+       vmurCmd      = "vmur"
+       chccwdevCmd  = "chccwdev"
+       cioIgnoreCmd = "cio_ignore"
+
        // Flags
-       selinuxRelabel  = "false"
+       selinuxRelabel  = "true"
        blackboxTesting = "false"
        // writeAuthorizedKeysFragment indicates whether to write SSH keys
        // specified in the Ignition config as a fragment to
@@ -71,12 +75,11 @@
 func KernelCmdlinePath() string { return kernelCmdlinePath }
 func SystemConfigDir() string   { return fromEnv("SYSTEM_CONFIG_DIR", 
systemConfigDir) }
 
-func ChrootCmd() string     { return chrootCmd }
 func GroupaddCmd() string   { return groupaddCmd }
-func IdCmd() string         { return idCmd }
 func MdadmCmd() string      { return mdadmCmd }
 func MountCmd() string      { return mountCmd }
 func SgdiskCmd() string     { return sgdiskCmd }
+func ModprobeCmd() string   { return modprobeCmd }
 func UdevadmCmd() string    { return udevadmCmd }
 func UsermodCmd() string    { return usermodCmd }
 func UseraddCmd() string    { return useraddCmd }
@@ -88,7 +91,11 @@
 func VfatMkfsCmd() string  { return vfatMkfsCmd }
 func XfsMkfsCmd() string   { return xfsMkfsCmd }
 
-func SelinuxRelabel() bool  { return bakedStringToBool(selinuxRelabel) }
+func VmurCmd() string      { return vmurCmd }
+func ChccwdevCmd() string  { return chccwdevCmd }
+func CioIgnoreCmd() string { return cioIgnoreCmd }
+
+func SelinuxRelabel() bool  { return bakedStringToBool(selinuxRelabel) && 
!BlackboxTesting() }
 func BlackboxTesting() bool { return bakedStringToBool(blackboxTesting) }
 func WriteAuthorizedKeysFragment() bool {
        return bakedStringToBool(fromEnv("WRITE_AUTHORIZED_KEYS_FRAGMENT", 
writeAuthorizedKeysFragment))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/ignition-2.0.1+git20190925.641ec6a/internal/exec/stages/mount/mount.go 
new/ignition-2.0.1+git20191106.809f44a/internal/exec/stages/mount/mount.go
--- old/ignition-2.0.1+git20190925.641ec6a/internal/exec/stages/mount/mount.go  
2019-09-25 21:37:39.000000000 +0200
+++ new/ignition-2.0.1+git20191106.809f44a/internal/exec/stages/mount/mount.go  
2019-11-07 00:18:03.000000000 +0100
@@ -21,11 +21,13 @@
 import (
        "fmt"
        "os"
+       "os/exec"
        "path/filepath"
        "sort"
-       "syscall"
+       "strings"
 
        "github.com/coreos/ignition/v2/config/v3_1_experimental/types"
+       "github.com/coreos/ignition/v2/internal/distro"
        "github.com/coreos/ignition/v2/internal/exec/stages"
        "github.com/coreos/ignition/v2/internal/exec/util"
        "github.com/coreos/ignition/v2/internal/log"
@@ -117,10 +119,20 @@
                return err
        }
 
-       if err := s.Logger.LogOp(func() error { return syscall.Mount(fs.Device, 
path, *fs.Format, 0, "") },
-               "mounting %q at %q with type %q", fs.Device, path, *fs.Format,
+       args := translateOptionSliceToString(fs.MountOptions, ",")
+       cmd := exec.Command(distro.MountCmd(), "-o", args, "-t", *fs.Format, 
fs.Device, path)
+       if _, err := s.Logger.LogCmd(cmd,
+               "mounting %q at %q with type %q and options %q", fs.Device, 
path, *fs.Format, args,
        ); err != nil {
                return err
        }
        return nil
 }
+
+func translateOptionSliceToString(opts []types.MountOption, separator string) 
string {
+       mountOpts := make([]string, len(opts))
+       for i, o := range opts {
+               mountOpts[i] = string(o)
+       }
+       return strings.Join(mountOpts, separator)
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/ignition-2.0.1+git20190925.641ec6a/internal/exec/util/passwd.go 
new/ignition-2.0.1+git20191106.809f44a/internal/exec/util/passwd.go
--- old/ignition-2.0.1+git20190925.641ec6a/internal/exec/util/passwd.go 
2019-09-25 21:37:39.000000000 +0200
+++ new/ignition-2.0.1+git20191106.809f44a/internal/exec/util/passwd.go 
2019-11-07 00:18:03.000000000 +0100
@@ -26,9 +26,22 @@
        "github.com/coreos/ignition/v2/config/v3_1_experimental/types"
        "github.com/coreos/ignition/v2/internal/as_user"
        "github.com/coreos/ignition/v2/internal/distro"
-       "github.com/coreos/ignition/v2/internal/log"
 )
 
+func appendIfTrue(args []string, test *bool, newargs string) []string {
+       if test != nil && *test {
+               return append(args, newargs)
+       }
+       return args
+}
+
+func appendIfStringSet(args []string, arg string, str *string) []string {
+       if str != nil && *str != "" {
+               return append(args, arg, *str)
+       }
+       return args
+}
+
 // EnsureUser ensures that the user exists as described. If the user does not
 // yet exist, they will be created, otherwise the existing user will be
 // modified.
@@ -49,9 +62,7 @@
        } else {
                cmd = distro.UseraddCmd()
 
-               if c.HomeDir != nil && *c.HomeDir != "" {
-                       args = append(args, "--home-dir", *c.HomeDir)
-               }
+               args = appendIfStringSet(args, "--home-dir", c.HomeDir)
 
                if c.NoCreateHome != nil && *c.NoCreateHome {
                        args = append(args, "--no-create-home")
@@ -59,17 +70,9 @@
                        args = append(args, "--create-home")
                }
 
-               if c.NoUserGroup != nil && *c.NoUserGroup {
-                       args = append(args, "--no-user-group")
-               }
-
-               if c.System != nil && *c.System {
-                       args = append(args, "--system")
-               }
-
-               if c.NoLogInit != nil && *c.NoLogInit {
-                       args = append(args, "--no-log-init")
-               }
+               args = appendIfTrue(args, c.NoUserGroup, "--no-user-group")
+               args = appendIfTrue(args, c.System, "--system")
+               args = appendIfTrue(args, c.NoLogInit, "--no-log-init")
        }
 
        if c.PasswordHash != nil {
@@ -89,21 +92,14 @@
                        strconv.FormatUint(uint64(*c.UID), 10))
        }
 
-       if c.Gecos != nil && *c.Gecos != "" {
-               args = append(args, "--comment", *c.Gecos)
-       }
-
-       if c.PrimaryGroup != nil && *c.PrimaryGroup != "" {
-               args = append(args, "--gid", *c.PrimaryGroup)
-       }
+       args = appendIfStringSet(args, "--comment", c.Gecos)
+       args = appendIfStringSet(args, "--gid", c.PrimaryGroup)
 
        if len(c.Groups) > 0 {
                args = append(args, "--groups", 
strings.Join(translateV2_1PasswdUserGroupSliceToStringSlice(c.Groups), ","))
        }
 
-       if c.Shell != nil && *c.Shell != "" {
-               args = append(args, "--shell", *c.Shell)
-       }
+       args = appendIfStringSet(args, "--shell", c.Shell)
 
        args = append(args, c.Name)
 
@@ -114,18 +110,11 @@
 
 // CheckIfUserExists will return Info log when user is empty
 func (u Util) CheckIfUserExists(c types.PasswdUser) (bool, error) {
-       code := -1
-       cmd := exec.Command(distro.ChrootCmd(), u.DestDir, distro.IdCmd(), 
c.Name)
-       stdout, err := cmd.CombinedOutput()
+       _, err := u.userLookup(c.Name)
+       if _, ok := err.(user.UnknownUserError); ok {
+               return false, nil
+       }
        if err != nil {
-               if exitErr, ok := err.(*exec.ExitError); ok {
-                       code = exitErr.Sys().(syscall.WaitStatus).ExitStatus()
-               }
-               if code == 1 {
-                       u.Info("checking if user \"%s\" exists: %s", c.Name, 
fmt.Errorf("[Attention] %v: Cmd: %s Stdout: %s", err, log.QuotedCmd(cmd), 
stdout))
-                       return false, nil
-               }
-               u.Logger.Info("error encountered (%T): %v", err, err)
                return false, err
        }
        return true, nil
@@ -240,9 +229,7 @@
                args = append(args, "--password", "*")
        }
 
-       if g.System != nil && *g.System {
-               args = append(args, "--system")
-       }
+       args = appendIfTrue(args, g.System, "--system")
 
        args = append(args, g.Name)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/ignition-2.0.1+git20190925.641ec6a/internal/exec/util/user_group_lookup.c 
new/ignition-2.0.1+git20191106.809f44a/internal/exec/util/user_group_lookup.c
--- 
old/ignition-2.0.1+git20190925.641ec6a/internal/exec/util/user_group_lookup.c   
    2019-09-25 21:37:39.000000000 +0200
+++ 
new/ignition-2.0.1+git20191106.809f44a/internal/exec/util/user_group_lookup.c   
    2019-11-07 00:18:03.000000000 +0100
@@ -62,10 +62,16 @@
                goto out_err;
        }
 
-       if(getpwnam_r(ctxt->name, &p, buf, sizeof(buf), &pptr) != 0 || !pptr) {
+       if(getpwnam_r(ctxt->name, &p, buf, sizeof(buf), &pptr) != 0) {
                goto out_err;
        }
 
+       if (!pptr) {
+               // successfully found nothing
+               ctxt->res->name = NULL;
+               return 0;
+       }
+
        if(!(ctxt->res->name = strdup(p.pw_name))) {
                goto out_err;
        }
@@ -98,10 +104,16 @@
                goto out_err;
        }
 
-       if(getgrnam_r(ctxt->name, &g, buf, sizeof(buf), &gptr) != 0 || !gptr) {
+       if(getgrnam_r(ctxt->name, &g, buf, sizeof(buf), &gptr) != 0) {
                goto out_err;
        }
 
+       if (!gptr) {
+               // successfully found nothing
+               ctxt->res->name = NULL;
+               return 0;
+       }
+
        if(!(ctxt->res->name = strdup(g.gr_name))) {
                goto out_err;
        }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/ignition-2.0.1+git20190925.641ec6a/internal/exec/util/user_group_lookup.go 
new/ignition-2.0.1+git20191106.809f44a/internal/exec/util/user_group_lookup.go
--- 
old/ignition-2.0.1+git20190925.641ec6a/internal/exec/util/user_group_lookup.go  
    2019-09-25 21:37:39.000000000 +0200
+++ 
new/ignition-2.0.1+git20191106.809f44a/internal/exec/util/user_group_lookup.go  
    2019-11-07 00:18:03.000000000 +0100
@@ -37,7 +37,7 @@
        }
 
        if res.name == nil {
-               return nil, fmt.Errorf("user %q not found", name)
+               return nil, user.UnknownUserError(fmt.Sprintf("user %q not 
found", name))
        }
 
        homedir, err := u.JoinPath(C.GoString(res.home))
@@ -67,7 +67,7 @@
        }
 
        if res.name == nil {
-               return nil, fmt.Errorf("user %q not found", name)
+               return nil, user.UnknownGroupError(fmt.Sprintf("group %q not 
found", name))
        }
 
        grp := &user.Group{
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/ignition-2.0.1+git20190925.641ec6a/internal/platform/platform.go 
new/ignition-2.0.1+git20191106.809f44a/internal/platform/platform.go
--- old/ignition-2.0.1+git20190925.641ec6a/internal/platform/platform.go        
2019-09-25 21:37:39.000000000 +0200
+++ new/ignition-2.0.1+git20191106.809f44a/internal/platform/platform.go        
2019-11-07 00:18:03.000000000 +0100
@@ -19,6 +19,7 @@
 
        "github.com/coreos/ignition/v2/internal/log"
        "github.com/coreos/ignition/v2/internal/providers"
+       "github.com/coreos/ignition/v2/internal/providers/aliyun"
        "github.com/coreos/ignition/v2/internal/providers/aws"
        "github.com/coreos/ignition/v2/internal/providers/azure"
        "github.com/coreos/ignition/v2/internal/providers/cloudstack"
@@ -31,6 +32,7 @@
        "github.com/coreos/ignition/v2/internal/providers/qemu"
        "github.com/coreos/ignition/v2/internal/providers/virtualbox"
        "github.com/coreos/ignition/v2/internal/providers/vmware"
+       "github.com/coreos/ignition/v2/internal/providers/zvm"
        "github.com/coreos/ignition/v2/internal/registry"
        "github.com/coreos/ignition/v2/internal/resource"
 )
@@ -74,6 +76,10 @@
 
 func init() {
        configs.Register(Config{
+               name:  "aliyun",
+               fetch: aliyun.FetchConfig,
+       })
+       configs.Register(Config{
                name:  "azure",
                fetch: azure.FetchConfig,
        })
@@ -127,6 +133,10 @@
                name:  "metal",
                fetch: noop.FetchConfig,
        })
+       configs.Register(Config{
+               name:  "zvm",
+               fetch: zvm.FetchConfig,
+       })
 }
 
 func Get(name string) (config Config, ok bool) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/ignition-2.0.1+git20190925.641ec6a/internal/providers/aliyun/aliyun.go 
new/ignition-2.0.1+git20191106.809f44a/internal/providers/aliyun/aliyun.go
--- old/ignition-2.0.1+git20190925.641ec6a/internal/providers/aliyun/aliyun.go  
1970-01-01 01:00:00.000000000 +0100
+++ new/ignition-2.0.1+git20191106.809f44a/internal/providers/aliyun/aliyun.go  
2019-11-07 00:18:03.000000000 +0100
@@ -0,0 +1,47 @@
+// Copyright 2019 Red Hat
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// The aliyun provider fetches a remote configuration from the
+// aliyun user-data metadata service URL.
+
+package aliyun
+
+import (
+       "net/url"
+
+       "github.com/coreos/ignition/v2/config/v3_1_experimental/types"
+       "github.com/coreos/ignition/v2/internal/providers/util"
+       "github.com/coreos/ignition/v2/internal/resource"
+
+       "github.com/coreos/vcontext/report"
+)
+
+var (
+       userdataUrl = url.URL{
+               Scheme: "http",
+               Host:   "100.100.100.200",
+               Path:   "latest/user-data",
+       }
+)
+
+func FetchConfig(f *resource.Fetcher) (types.Config, report.Report, error) {
+       data, err := f.FetchToBuffer(userdataUrl, resource.FetchOptions{
+               Headers: resource.ConfigHeaders,
+       })
+       if err != nil && err != resource.ErrNotFound {
+               return types.Config{}, report.Report{}, err
+       }
+
+       return util.ParseConfig(f.Logger, data)
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/ignition-2.0.1+git20190925.641ec6a/internal/providers/zvm/zvm.go 
new/ignition-2.0.1+git20191106.809f44a/internal/providers/zvm/zvm.go
--- old/ignition-2.0.1+git20190925.641ec6a/internal/providers/zvm/zvm.go        
1970-01-01 01:00:00.000000000 +0100
+++ new/ignition-2.0.1+git20191106.809f44a/internal/providers/zvm/zvm.go        
2019-11-07 00:18:03.000000000 +0100
@@ -0,0 +1,109 @@
+// Copyright 2019 Red Hat, Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// The zVM provider fetches a local configuration from the virtual unit
+// record devices.
+
+package zvm
+
+import (
+       "bytes"
+       "fmt"
+       "io/ioutil"
+       "os/exec"
+       "strings"
+
+       "github.com/coreos/ignition/v2/config/shared/errors"
+       "github.com/coreos/ignition/v2/config/v3_1_experimental/types"
+       "github.com/coreos/ignition/v2/internal/distro"
+       "github.com/coreos/ignition/v2/internal/log"
+       "github.com/coreos/ignition/v2/internal/providers/util"
+       "github.com/coreos/ignition/v2/internal/resource"
+       "github.com/coreos/vcontext/report"
+)
+
+const readerDevice string = "000c"
+
+func FetchConfig(f *resource.Fetcher) (types.Config, report.Report, error) {
+       // Fetch config files directly from reader device.
+       _, err := f.Logger.LogCmd(exec.Command(distro.ModprobeCmd(), "vmur"), 
"Loading zVM control program module")
+       if err != nil {
+               f.Logger.Err("Couldn't install vmur module: %v", err)
+               errors := fmt.Errorf("Couldn't install vmur module: %v", err)
+               return types.Config{}, report.Report{}, errors
+       }
+       // Online the reader device.
+       logger := f.Logger
+       err = onlineDevice(logger)
+       if err != nil {
+               return types.Config{}, report.Report{}, err
+       }
+       // Read files from the z/VM reader queue.
+       readerInfo, err := exec.Command(distro.VmurCmd(), "li").CombinedOutput()
+       if err != nil {
+               f.Logger.Err("Can not get reader device: %v", err)
+               errors := fmt.Errorf("Can not get reader device: %v", err)
+               return types.Config{}, report.Report{}, errors
+       }
+       for _, records := range strings.Split(string(readerInfo), "\n") {
+               record := strings.Fields(records)
+               // The records format: ORIGINID FILE CLASSA CLASSB RECORDS CPY 
HOLD DATE TIME NAME TYPE DIST
+               if len(record) <= 1 {
+                       break
+               }
+               if len(record) < 11 {
+                       continue
+               }
+               spoolid := record[1]
+               ftype := record[10]
+               file := record[9] + "." + ftype
+               // Receive the spool file.
+               if ftype == "ign" {
+                       _, err := 
f.Logger.LogCmd(exec.Command(distro.VmurCmd(), "re", "-f", spoolid, file), 
"Receive the spool file")
+                       if err != nil {
+                               return types.Config{}, report.Report{}, err
+                       }
+                       f.Logger.Info("using config file at %q", file)
+                       rawConfig, err := ioutil.ReadFile(file)
+                       if err != nil {
+                               f.Logger.Err("Couldn't read config from 
configFile %q: %v", file, err)
+                               break
+                       }
+                       jsonConfig := bytes.Trim(rawConfig, string(byte(0)))
+                       return util.ParseConfig(f.Logger, jsonConfig)
+               }
+       }
+       return types.Config{}, report.Report{}, errors.ErrEmpty
+}
+
+func onlineDevice(logger *log.Logger) error {
+       _, err := logger.LogCmd(exec.Command(distro.ChccwdevCmd(), "-e", 
readerDevice), "Brings a Linux device online")
+       if err != nil {
+               // If online failed, expose the device firstly.
+               _, err = logger.LogCmd(exec.Command(distro.CioIgnoreCmd(), 
"-r", readerDevice), "Expose reader device")
+               if err != nil {
+                       logger.Err("Couldn't expose reader device %q: %v", 
readerDevice, err)
+                       errors := fmt.Errorf("Couldn't expose reader device %q: 
%v", readerDevice, err)
+                       return errors
+               }
+               _, err = logger.LogCmd(exec.Command(distro.ChccwdevCmd(), "-e", 
readerDevice), "Brings a Linux device online")
+               if err != nil {
+                       logger.Err("Couldn't online reader device")
+                       errors := fmt.Errorf("Couldn't online reader device")
+                       return errors
+               }
+       }
+       _, err = logger.LogCmd(exec.Command(distro.UdevadmCmd(), "settle"), 
"Settle udev device")
+       return err
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ignition-2.0.1+git20190925.641ec6a/test 
new/ignition-2.0.1+git20191106.809f44a/test
--- old/ignition-2.0.1+git20190925.641ec6a/test 2019-09-25 21:37:39.000000000 
+0200
+++ new/ignition-2.0.1+git20191106.809f44a/test 2019-11-07 00:18:03.000000000 
+0100
@@ -57,7 +57,11 @@
 go vet $PKG_VET
 
 echo "Running tests..."
-go test -timeout 60s -cover $@ ${PKG} --race
+if [ "$GOARCH" == amd64 ]; then
+       go test -timeout 60s -cover $@ ${PKG} --race
+else
+       go test -timeout 60s -cover $@ ${PKG}
+fi
 
 # Disable this until we have spec 3.0.0 stablized and the docs updated
 echo "Checking docs..."
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/ignition-2.0.1+git20190925.641ec6a/tests/filesystem.go 
new/ignition-2.0.1+git20191106.809f44a/tests/filesystem.go
--- old/ignition-2.0.1+git20190925.641ec6a/tests/filesystem.go  2019-09-25 
21:37:39.000000000 +0200
+++ new/ignition-2.0.1+git20191106.809f44a/tests/filesystem.go  2019-11-07 
00:18:03.000000000 +0100
@@ -80,13 +80,8 @@
        }
 
        // TODO: use the architecture, not hardcode amd64
-       // copy to mountPath/usr/bin/id as it's used by Ignition via a chroot 
to the mountPath
-       _, err := run(ctx, "cp", "bin/amd64/id-stub", filepath.Join(mountPath, 
"usr", "bin", "id"))
-       if err != nil {
-               return err
-       }
        // TODO: needed for user_group_lookup.c
-       _, err = run(ctx, "cp", "/lib64/libnss_files.so.2", 
filepath.Join(mountPath, "usr", "lib64"))
+       _, err := run(ctx, "cp", "/lib64/libnss_files.so.2", 
filepath.Join(mountPath, "usr", "lib64"))
        return err
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/ignition-2.0.1+git20190925.641ec6a/tests/negative/filesystems/mount_filesystem.go
 
new/ignition-2.0.1+git20191106.809f44a/tests/negative/filesystems/mount_filesystem.go
--- 
old/ignition-2.0.1+git20190925.641ec6a/tests/negative/filesystems/mount_filesystem.go
       1970-01-01 01:00:00.000000000 +0100
+++ 
new/ignition-2.0.1+git20191106.809f44a/tests/negative/filesystems/mount_filesystem.go
       2019-11-07 00:18:03.000000000 +0100
@@ -0,0 +1,61 @@
+// Copyright 2019 Red Hat
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package filesystems
+
+import (
+       "github.com/coreos/ignition/v2/tests/register"
+       "github.com/coreos/ignition/v2/tests/types"
+)
+
+func init() {
+       register.Register(register.NegativeTest, MountWithInvalidOptions())
+}
+
+func MountWithInvalidOptions() types.Test {
+       name := "filesystem.mount.invalidoptions"
+       in := types.GetBaseDisk()
+       out := types.GetBaseDisk()
+       mntDevices := []types.MntDevice{
+               {
+                       Label:        "OEM",
+                       Substitution: "$DEVICE",
+               },
+       }
+       config := `{
+               "ignition": {"version": "$version"},
+               "storage": {
+                       "filesystems": [
+                       {
+                               "path": "/tmp0",
+                               "device": "$DEVICE",
+                               "wipeFilesystem": false,
+                               "format": "ext4",
+                               "mountOptions": [
+                                       "doesnotexist"
+                               ]
+                       }]
+               }
+       }`
+       configMinVersion := "3.1.0-experimental"
+
+       return types.Test{
+               Name:             name,
+               In:               in,
+               Out:              out,
+               MntDevices:       mntDevices,
+               Config:           config,
+               ConfigMinVersion: configMinVersion,
+       }
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/ignition-2.0.1+git20190925.641ec6a/tests/positive/filesystems/mount_filesystem.go
 
new/ignition-2.0.1+git20191106.809f44a/tests/positive/filesystems/mount_filesystem.go
--- 
old/ignition-2.0.1+git20190925.641ec6a/tests/positive/filesystems/mount_filesystem.go
       1970-01-01 01:00:00.000000000 +0100
+++ 
new/ignition-2.0.1+git20191106.809f44a/tests/positive/filesystems/mount_filesystem.go
       2019-11-07 00:18:03.000000000 +0100
@@ -0,0 +1,64 @@
+// Copyright 2019 Red Hat
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package filesystems
+
+import (
+       "github.com/coreos/ignition/v2/tests/register"
+       "github.com/coreos/ignition/v2/tests/types"
+)
+
+func init() {
+       register.Register(register.PositiveTest, MountFilesystemWithOptions())
+}
+
+func MountFilesystemWithOptions() types.Test {
+       name := "filesystem.mount.options"
+       in := types.GetBaseDisk()
+       out := types.GetBaseDisk()
+       mntDevices := []types.MntDevice{
+               {
+                       Label:        "OEM",
+                       Substitution: "$DEVICE",
+               },
+       }
+       config := `{
+               "ignition": {"version": "$version"},
+               "storage": {
+                       "filesystems": [
+                       {
+                               "path": "/tmp0",
+                               "device": "$DEVICE",
+                               "wipeFilesystem": false,
+                               "format": "btrfs",
+                               "mountOptions": [
+                                       "noexec",
+                                       "subvolid=5"
+                               ]
+                       }]
+               }
+       }`
+       in[0].Partitions.GetPartition("OEM").FilesystemType = "btrfs"
+       out[0].Partitions.GetPartition("OEM").FilesystemType = "btrfs"
+       configMinVersion := "3.1.0-experimental"
+
+       return types.Test{
+               Name:             name,
+               In:               in,
+               Out:              out,
+               MntDevices:       mntDevices,
+               Config:           config,
+               ConfigMinVersion: configMinVersion,
+       }
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/ignition-2.0.1+git20190925.641ec6a/tests/stubs/id-stub/main.go 
new/ignition-2.0.1+git20191106.809f44a/tests/stubs/id-stub/main.go
--- old/ignition-2.0.1+git20190925.641ec6a/tests/stubs/id-stub/main.go  
2019-09-25 21:37:39.000000000 +0200
+++ new/ignition-2.0.1+git20191106.809f44a/tests/stubs/id-stub/main.go  
1970-01-01 01:00:00.000000000 +0100
@@ -1,61 +0,0 @@
-// Copyright 2018 CoreOS, Inc.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package main
-
-import (
-       "fmt"
-       "io/ioutil"
-       "os"
-       "strings"
-)
-
-func main() {
-       if len(os.Args) != 2 {
-               fmt.Printf("id called incorrectly\n")
-               os.Exit(1)
-       }
-       fmt.Printf("id called for user %s\n", os.Args[1])
-
-       // id accepts both usernames and UIDs, so attempt a lookup for both. If
-       // either lookup doesn't return an error, exit cleanly.
-
-       passwdContents, err := ioutil.ReadFile("/etc/passwd")
-       if err != nil {
-               fmt.Printf("couldn't open /etc/passwd: %v\n", err)
-               os.Exit(1)
-       }
-       passwdLines := strings.Split(string(passwdContents), "\n")
-       for i, l := range passwdLines {
-               if i == len(passwdLines)-1 {
-                       // The last line is empty
-                       break
-               }
-               tokens := strings.Split(l, ":")
-               if len(tokens) != 7 {
-                       fmt.Printf("scanned incorrect number of items: %d\n", 
len(tokens))
-                       os.Exit(1)
-               }
-               currUser := tokens[0]
-               currUid := tokens[2]
-               if currUser == os.Args[1] {
-                       os.Exit(0)
-               }
-               if currUid == os.Args[1] {
-                       os.Exit(0)
-               }
-       }
-
-       os.Exit(1)
-}


Reply via email to