Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package apptainer for openSUSE:Factory 
checked in at 2022-05-19 22:49:09
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/apptainer (Old)
 and      /work/SRC/openSUSE:Factory/.apptainer.new.1538 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "apptainer"

Thu May 19 22:49:09 2022 rev:2 rq:977939 version:1.0.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/apptainer/apptainer.changes      2022-03-22 
19:41:10.915151699 +0100
+++ /work/SRC/openSUSE:Factory/.apptainer.new.1538/apptainer.changes    
2022-05-19 22:49:18.578334092 +0200
@@ -1,0 +2,12 @@
+Wed May 18 12:07:59 UTC 2022 - Dominique Leuenberger <[email protected]>
+
+- Update to version 1.0.2:
+  + Fixed `FATAL` error thrown by user configuration migration code
+    that caused users with inaccessible home directories to be
+    unable to use `apptainer` commands.
+  + Do not truncate environment variables with commas.
+  + Use HEAD request when checking digest of remote OCI image
+    sources, with GET as a fall-back. Greatly reduces Apptainer's
+    impact on Docker Hub API limits.
+
+-------------------------------------------------------------------

Old:
----
  apptainer-1.0.1.tar.gz

New:
----
  apptainer-1.0.2.tar.gz

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

Other differences:
------------------
++++++ apptainer.spec ++++++
--- /var/tmp/diff_new_pack.7miejY/_old  2022-05-19 22:49:19.482335250 +0200
+++ /var/tmp/diff_new_pack.7miejY/_new  2022-05-19 22:49:19.486335255 +0200
@@ -25,7 +25,7 @@
 License:        BSD-3-Clause-LBNL
 Group:          Productivity/Clustering/Computing
 Name:           apptainer
-Version:        1.0.1
+Version:        1.0.2
 Release:        0
 # https://spdx.org/licenses/BSD-3-Clause-LBNL.html
 URL:            https://apptainer.org

++++++ apptainer-1.0.1.tar.gz -> apptainer-1.0.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/apptainer-1.0.1/.github/workflows/ci.yml 
new/apptainer-1.0.2/.github/workflows/ci.yml
--- old/apptainer-1.0.1/.github/workflows/ci.yml        2022-03-16 
13:16:03.000000000 +0100
+++ new/apptainer-1.0.2/.github/workflows/ci.yml        2022-05-10 
00:10:52.000000000 +0200
@@ -50,6 +50,7 @@
 
       - name: Build Apptainer
         run: |
+          git config --global --add safe.directory $(pwd)
           ./mconfig -v -p /usr/local
           make -C ./builddir all
 
@@ -66,6 +67,7 @@
 
       - name: Build Apptainer
         run: |
+          git config --global --add safe.directory $(pwd)
           ./mconfig -v -p /usr/local
           make -C ./builddir all
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/apptainer-1.0.1/CHANGELOG.md 
new/apptainer-1.0.2/CHANGELOG.md
--- old/apptainer-1.0.1/CHANGELOG.md    2022-03-16 13:16:03.000000000 +0100
+++ new/apptainer-1.0.2/CHANGELOG.md    2022-05-10 00:10:52.000000000 +0200
@@ -5,6 +5,18 @@
 and re-branded as Apptainer.
 For older changes see the [archived Singularity change 
log](https://github.com/apptainer/singularity/blob/release-3.8/CHANGELOG.md).
 
+## v1.0.2 - \[2022-05-09\]
+
+### Bug fixes
+
+- Fixed `FATAL` error thrown by user configuration migration code that caused
+  users with inaccessible home directories to be unable to use `apptainer`
+  commands.
+- The Debian package now conflicts with the singularity-container package.
+- Do not truncate environment variables with commas.
+- Use HEAD request when checking digest of remote OCI image sources, with GET 
as
+  a fall-back. Greatly reduces Apptainer's impact on Docker Hub API limits.
+
 ## v1.0.1 - \[2022-03-15\]
 
 ### Bug fixes
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/apptainer-1.0.1/CONTRIBUTORS.md 
new/apptainer-1.0.2/CONTRIBUTORS.md
--- old/apptainer-1.0.1/CONTRIBUTORS.md 2022-03-16 13:16:03.000000000 +0100
+++ new/apptainer-1.0.2/CONTRIBUTORS.md 2022-05-10 00:10:52.000000000 +0200
@@ -80,7 +80,7 @@
 - Tim Wright <[email protected]>
 - Tru Huynh <[email protected]>
 - Tyson Whitehead <[email protected]>
-- Vanessa Sochat <[email protected]>
+- Vanessa Sochat <[email protected]>
 - Westley Kurtzer <[email protected]>, <[email protected]>
 - Yannick Cote <[email protected]>, <[email protected]>
 - Yaroslav Halchenko <[email protected]>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/apptainer-1.0.1/INSTALL.md 
new/apptainer-1.0.2/INSTALL.md
--- old/apptainer-1.0.1/INSTALL.md      2022-03-16 13:16:03.000000000 +0100
+++ new/apptainer-1.0.2/INSTALL.md      2022-05-10 00:10:52.000000000 +0200
@@ -131,7 +131,7 @@
 for example:
 
 ```sh
-git checkout v1.0.1
+git checkout v1.0.2
 ```
 
 ## Compiling Apptainer
@@ -201,7 +201,7 @@
 <!-- markdownlint-disable MD013 -->
 
 ```sh
-VERSION=1.0.1  # this is the apptainer version, change as you need
+VERSION=1.0.2  # this is the apptainer version, change as you need
 # Fetch the source
 wget 
https://github.com/apptainer/apptainer/releases/download/v${VERSION}/apptainer-${VERSION}.tar.gz
 # Build the rpm from the source tar.gz
@@ -223,7 +223,7 @@
 <!-- markdownlint-disable MD013 -->
 
 ```sh
-VERSION=1.0.1  # this is the latest apptainer version, change as you need
+VERSION=1.0.2  # this is the latest apptainer version, change as you need
 ./mconfig
 make -C builddir rpm
 sudo rpm -ivh ~/rpmbuild/RPMS/x86_64/apptainer-$(echo $VERSION|tr - 
\~)*.x86_64.rpm 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/apptainer-1.0.1/cmd/internal/cli/action_flags.go 
new/apptainer-1.0.2/cmd/internal/cli/action_flags.go
--- old/apptainer-1.0.1/cmd/internal/cli/action_flags.go        2022-03-16 
13:16:03.000000000 +0100
+++ new/apptainer-1.0.2/cmd/internal/cli/action_flags.go        2022-05-10 
00:10:52.000000000 +0200
@@ -37,7 +37,7 @@
        VMIP             string
        ContainLibsPath  []string
        FuseMount        []string
-       ApptainerEnv     []string
+       ApptainerEnv     map[string]string
        ApptainerEnvFile string
        NoMount          []string
        DMTCPLaunch      string
@@ -624,7 +624,7 @@
 var actionEnvFlag = cmdline.Flag{
        ID:           "actionEnvFlag",
        Value:        &ApptainerEnv,
-       DefaultValue: []string{},
+       DefaultValue: map[string]string{},
        Name:         "env",
        Usage:        "pass environment variable to contained process",
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/apptainer-1.0.1/cmd/internal/cli/actions_linux.go 
new/apptainer-1.0.2/cmd/internal/cli/actions_linux.go
--- old/apptainer-1.0.1/cmd/internal/cli/actions_linux.go       2022-03-16 
13:16:03.000000000 +0100
+++ new/apptainer-1.0.2/cmd/internal/cli/actions_linux.go       2022-05-10 
00:10:52.000000000 +0200
@@ -585,18 +585,34 @@
                // --env variables will take precedence over variables
                // defined by the environment file
                sylog.Debugf("Setting environment variables from file %s", 
ApptainerEnvFile)
-               ApptainerEnv = append(envvars, ApptainerEnv...)
+
+               // Update ApptainerEnv with those from file
+               for _, envar := range envvars {
+                       e := strings.SplitN(envar, "=", 2)
+                       if len(e) != 2 {
+                               sylog.Warningf("Ignore environment variable %q: 
'=' is missing", envar)
+                               continue
+                       }
+
+                       // Ensure we don't overwrite --env variables with 
environment file
+                       if _, ok := ApptainerEnv[e[0]]; ok {
+                               sylog.Warningf("Ignore environment variable %s 
from %s: override from --env", e[0], ApptainerEnvFile)
+                       } else {
+                               ApptainerEnv[e[0]] = e[1]
+                       }
+               }
        }
 
        // process --env and --env-file variables for injection
        // into the environment by prefixing them with APPTAINERENV_
-       for _, envvar := range ApptainerEnv {
-               e := strings.SplitN(envvar, "=", 2)
-               if len(e) != 2 {
-                       sylog.Warningf("Ignore environment variable %q: '=' is 
missing", envvar)
+       for envName, envValue := range ApptainerEnv {
+
+               // We can allow envValue to be empty (explicit set to empty) 
but not name!
+               if envName == "" {
+                       sylog.Warningf("Ignore environment variable %s=%s: 
variable name missing", envName, envValue)
                        continue
                }
-               os.Setenv(env.ApptainerEnvPrefix+e[0], e[1])
+               os.Setenv("APPTAINERENV_"+envName, envValue)
        }
 
        // Copy and cache environment
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/apptainer-1.0.1/cmd/internal/cli/apptainer.go 
new/apptainer-1.0.2/cmd/internal/cli/apptainer.go
--- old/apptainer-1.0.1/cmd/internal/cli/apptainer.go   2022-03-16 
13:16:03.000000000 +0100
+++ new/apptainer-1.0.2/cmd/internal/cli/apptainer.go   2022-05-10 
00:10:52.000000000 +0200
@@ -280,7 +280,8 @@
 func handleConfDir(confDir, legacyConfigDir string) {
        ok, err := fs.PathExists(confDir)
        if err != nil {
-               sylog.Fatalf("Failed to retrieve information for %s: %s", 
confDir, err)
+               sylog.Warningf("Unable to retrieve information for %s: %s", 
confDir, err)
+               return
        }
 
        // apptainer user config directory exists, run perm check and return
@@ -288,7 +289,8 @@
                sylog.Debugf("%s already exists. Not creating.", confDir)
                fi, err := os.Stat(confDir)
                if err != nil {
-                       sylog.Fatalf("Failed to retrieve information for %s: 
%s", confDir, err)
+                       sylog.Warningf("Unable to retrieve information for %s: 
%s", confDir, err)
+                       return
                }
                if fi.Mode().Perm() != 0o700 {
                        sylog.Debugf("Enforce permission 0700 on %s", confDir)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/apptainer-1.0.1/dist/debian/control 
new/apptainer-1.0.2/dist/debian/control
--- old/apptainer-1.0.1/dist/debian/control     2022-03-16 13:16:03.000000000 
+0100
+++ new/apptainer-1.0.2/dist/debian/control     2022-05-10 00:10:52.000000000 
+0200
@@ -27,6 +27,7 @@
 Package: apptainer
 Architecture: any
 Depends: ${misc:Depends}, ${shlibs:Depends}, squashfs-tools
+Conflicts: singularity-container
 Description: container platform focused on supporting "Mobility of Compute"
  Mobility of Compute encapsulates the development to compute model
  where developers can work in an environment of their choosing and
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/apptainer-1.0.1/e2e/env/env.go 
new/apptainer-1.0.2/e2e/env/env.go
--- old/apptainer-1.0.1/e2e/env/env.go  2022-03-16 13:16:03.000000000 +0100
+++ new/apptainer-1.0.2/e2e/env/env.go  2022-05-10 00:10:52.000000000 +0200
@@ -2,7 +2,7 @@
 //   Apptainer a Series of LF Projects LLC.
 //   For website terms of use, trademark policy, privacy policy and other
 //   project policies see https://lfprojects.org/policies
-// Copyright (c) 2019-2020, Sylabs Inc. All rights reserved.
+// Copyright (c) 2019-2022, Sylabs Inc. All rights reserved.
 // This software is licensed under a 3-clause BSD license. Please consult the
 // LICENSE.md file distributed with the sources of this project regarding your
 // rights to use or distribute this software.
@@ -50,6 +50,9 @@
        // Overwrite the path with this one.
        overwrittenPath := "/usr/bin:/bin"
 
+       // A path with a trailing comma
+       trailingCommaPath := "/usr/bin:/bin,"
+
        tests := []struct {
                name  string
                image string
@@ -104,6 +107,12 @@
                        path:  overwrittenPath,
                        env:   []string{"APPTAINERENV_PATH=" + overwrittenPath},
                },
+               {
+                       name:  "OverwriteTrailingCommaPath",
+                       image: defaultImage,
+                       path:  trailingCommaPath,
+                       env:   []string{"APPTAINERENV_PATH=" + 
trailingCommaPath},
+               },
        }
 
        for _, tt := range tests {
@@ -294,6 +303,13 @@
                        matchVal: apptainerLibs,
                },
                {
+                       name:     "TestCustomTrailingCommaPath",
+                       image:    c.env.ImagePath,
+                       envOpt:   []string{"LD_LIBRARY_PATH=/foo,"},
+                       matchEnv: "LD_LIBRARY_PATH",
+                       matchVal: "/foo,:" + apptainerLibs,
+               },
+               {
                        name:     "TestCustomLdLibraryPath",
                        image:    c.env.ImagePath,
                        envOpt:   []string{"LD_LIBRARY_PATH=/foo"},
@@ -410,6 +426,13 @@
                        matchEnv: "LD_LIBRARY_PATH",
                        matchVal: "/foo:" + apptainerLibs,
                },
+               {
+                       name:     "CustomTrailingCommaPath",
+                       image:    c.env.ImagePath,
+                       envFile:  "LD_LIBRARY_PATH=/foo,",
+                       matchEnv: "LD_LIBRARY_PATH",
+                       matchVal: "/foo,:" + apptainerLibs,
+               },
        }
 
        for _, tt := range tests {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/apptainer-1.0.1/internal/app/apptainer/testdata/keys/private.asc 
new/apptainer-1.0.2/internal/app/apptainer/testdata/keys/private.asc
--- old/apptainer-1.0.1/internal/app/apptainer/testdata/keys/private.asc        
2022-03-16 13:16:03.000000000 +0100
+++ new/apptainer-1.0.2/internal/app/apptainer/testdata/keys/private.asc        
2022-05-10 00:10:52.000000000 +0200
@@ -1,4 +1,5 @@
 -----BEGIN PGP PRIVATE KEY BLOCK-----
+Version: GnuPG v2.0.22 (GNU/Linux)
 
 lQOYBF6nUPABCACmd6vggtFfkZvYHJRv/u2UfazFL78oLhD05UpqEaS90ripzPN9
 G30IF6WqxQHxia0nV/IqJ9Tjozs0nIaK761y69gCYbac27e1r6Pf4uCoTfOWeGVZ
@@ -19,39 +20,39 @@
 1es1dK4jk2oBwHUBMLOz+ZVkPvnrXSkD/2xo+U441tM1+w+9njSsS4huaobqKgvx
 OKy4PpWh25IjOd3ODdrKpLeR5DHdtvl0b2ph1tOTgnOrDF3lCQ9y50f46JDY+Usm
 /0hV9Vg7bXS6hpW36M+StuxbxNFoIcJOaStkWnOaysKQQfQ7qKu1v3yXu5woGlmM
-q8fAGOQ9zkOhStS0GVVuaXQgVGVzdCA8dW5pdEB0ZXN0LmNvbT6JAVQEEwEIAD4W
-IQQSBFyMCxAE0FjeS+2iDCfuf/e6hAUCXqdQ8AIbAwUJA8JnAAULCQgHAgYVCgkI
-CwIEFgIDAQIeAQIXgAAKCRCiDCfuf/e6hCl+CACALh9bNfdpmyvq8cm1/wayb9f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
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/apptainer-1.0.1/internal/pkg/build/oci/oci.go 
new/apptainer-1.0.2/internal/pkg/build/oci/oci.go
--- old/apptainer-1.0.1/internal/pkg/build/oci/oci.go   2022-03-16 
13:16:03.000000000 +0100
+++ new/apptainer-1.0.2/internal/pkg/build/oci/oci.go   2022-05-10 
00:10:52.000000000 +0200
@@ -20,11 +20,11 @@
        "github.com/apptainer/apptainer/internal/pkg/cache"
        "github.com/apptainer/apptainer/pkg/sylog"
        "github.com/containers/image/v5/copy"
+       "github.com/containers/image/v5/docker"
        "github.com/containers/image/v5/oci/layout"
        "github.com/containers/image/v5/signature"
        "github.com/containers/image/v5/transports"
        "github.com/containers/image/v5/types"
-       "github.com/pkg/errors"
 )
 
 // ImageReference wraps containers/image ImageReference type
@@ -42,7 +42,7 @@
        // Our cache dir is an OCI directory. We are using this as a 'blob pool'
        // storing all incoming containers under unique tags, which are a hash 
of
        // their source URI.
-       cacheTag, err := calculateRefHash(ctx, src, sys)
+       cacheTag, err := getRefDigest(ctx, src, sys)
        if err != nil {
                return nil, err
        }
@@ -112,24 +112,37 @@
        return transport.ParseReference(split[1])
 }
 
-// ImageSHA calculates the SHA of a uri's manifest
-func ImageSHA(ctx context.Context, uri string, sys *types.SystemContext) 
(string, error) {
+// ImageDigest obtains the digest of a uri's manifest
+func ImageDigest(ctx context.Context, uri string, sys *types.SystemContext) 
(string, error) {
        ref, err := parseURI(uri)
        if err != nil {
                return "", fmt.Errorf("unable to parse image name %v: %v", uri, 
err)
        }
 
-       return calculateRefHash(ctx, ref, sys)
+       return getRefDigest(ctx, ref, sys)
 }
 
-func calculateRefHash(ctx context.Context, ref types.ImageReference, sys 
*types.SystemContext) (hash string, err error) {
+// getRefDigest obtains the manifest digest for a ref.
+func getRefDigest(ctx context.Context, ref types.ImageReference, sys 
*types.SystemContext) (digest string, err error) {
+       // Handle docker references specially, using a HEAD request to ensure 
we don't hit API limits
+       if ref.Transport().Name() == "docker" {
+               digest, err := getDockerRefDigest(ctx, ref, sys)
+               if err == nil {
+                       return digest, err
+               }
+               // Need to have a fallback path, as the Docker-Content-Digest 
header is
+               // not required in oci-distribution-spec.
+               sylog.Debugf("Falling back to GetManifest digest: %s", err)
+       }
+
+       // Otherwise get the manifest and calculate sha256 over it
        source, err := ref.NewImageSource(ctx, sys)
        if err != nil {
                return "", err
        }
        defer func() {
                if closeErr := source.Close(); closeErr != nil {
-                       err = errors.Wrapf(err, " (src: %v)", closeErr)
+                       err = fmt.Errorf("%w (src: %v)", err, closeErr)
                }
        }()
 
@@ -137,7 +150,18 @@
        if err != nil {
                return "", err
        }
+       digest = fmt.Sprintf("%x", sha256.Sum256(man))
+       sylog.Debugf("GetManifest digest for %s is %s", 
transports.ImageName(ref), digest)
+       return digest, nil
+}
 
-       hash = fmt.Sprintf("%x", sha256.Sum256(man))
-       return hash, nil
+// getDockerRefDigest obtains the manifest digest for a docker ref.
+func getDockerRefDigest(ctx context.Context, ref types.ImageReference, sys 
*types.SystemContext) (digest string, err error) {
+       d, err := docker.GetDigest(ctx, sys, ref)
+       if err != nil {
+               return "", err
+       }
+       digest = d.Encoded()
+       sylog.Debugf("docker.GetDigest digest for %s is %s", 
transports.ImageName(ref), digest)
+       return digest, nil
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/apptainer-1.0.1/internal/pkg/build/oci/oci_test.go 
new/apptainer-1.0.2/internal/pkg/build/oci/oci_test.go
--- old/apptainer-1.0.1/internal/pkg/build/oci/oci_test.go      2022-03-16 
13:16:03.000000000 +0100
+++ new/apptainer-1.0.2/internal/pkg/build/oci/oci_test.go      2022-05-10 
00:10:52.000000000 +0200
@@ -362,7 +362,7 @@
 
                testName = "ImageSHA - " + tt.name
                t.Run(testName, func(t *testing.T) {
-                       _, err := ImageSHA(context.Background(), tt.uri, tt.ctx)
+                       _, err := ImageDigest(context.Background(), tt.uri, 
tt.ctx)
                        if tt.shouldPass == true && err != nil {
                                t.Fatal("test expected to succeeded but failed")
                        }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/apptainer-1.0.1/internal/pkg/client/oci/pull.go 
new/apptainer-1.0.2/internal/pkg/client/oci/pull.go
--- old/apptainer-1.0.1/internal/pkg/client/oci/pull.go 2022-03-16 
13:16:03.000000000 +0100
+++ new/apptainer-1.0.2/internal/pkg/client/oci/pull.go 2022-05-10 
00:10:52.000000000 +0200
@@ -43,7 +43,7 @@
                sysCtx.DockerInsecureSkipTLSVerify = 
ocitypes.NewOptionalBool(true)
        }
 
-       hash, err := oci.ImageSHA(ctx, pullFrom, sysCtx)
+       hash, err := oci.ImageDigest(ctx, pullFrom, sysCtx)
        if err != nil {
                return "", fmt.Errorf("failed to get checksum for %s: %s", 
pullFrom, err)
        }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/apptainer-1.0.1/internal/pkg/syecl/testdata/keys/private.asc 
new/apptainer-1.0.2/internal/pkg/syecl/testdata/keys/private.asc
--- old/apptainer-1.0.1/internal/pkg/syecl/testdata/keys/private.asc    
2022-03-16 13:16:03.000000000 +0100
+++ new/apptainer-1.0.2/internal/pkg/syecl/testdata/keys/private.asc    
2022-05-10 00:10:52.000000000 +0200
@@ -1,4 +1,5 @@
 -----BEGIN PGP PRIVATE KEY BLOCK-----
+Version: GnuPG v2.0.22 (GNU/Linux)
 
 lQOYBF6nUPABCACmd6vggtFfkZvYHJRv/u2UfazFL78oLhD05UpqEaS90ripzPN9
 G30IF6WqxQHxia0nV/IqJ9Tjozs0nIaK761y69gCYbac27e1r6Pf4uCoTfOWeGVZ
@@ -19,39 +20,39 @@
 1es1dK4jk2oBwHUBMLOz+ZVkPvnrXSkD/2xo+U441tM1+w+9njSsS4huaobqKgvx
 OKy4PpWh25IjOd3ODdrKpLeR5DHdtvl0b2ph1tOTgnOrDF3l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WgtWGIAO/PJHUEZ
+7KFlSe2Dh/p02s9+rU6fo8FsMRDXO34ttZLs6mTltFl9hsRO4BJr6JXEvWVPqRiF
+h1FguCrOoR15kS/FCKTSVVgg9OyTYql184vKmq266//lrPSH200/7f1drhwQo7Rr
+nee5dPNefAsruppLqAt6XyI7k7NBl4XCXP4TA8sSbrtnArlxV1Z+F5/ozBMHk8Oz
+wVlDXpW5DRXuRs8+F0z9qSsfBg8RNELESuys0UR+KKNa
+=gDqC
 -----END PGP PRIVATE KEY BLOCK-----
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/apptainer-1.0.1/pkg/cmdline/flag.go 
new/apptainer-1.0.2/pkg/cmdline/flag.go
--- old/apptainer-1.0.1/pkg/cmdline/flag.go     2022-03-16 13:16:03.000000000 
+0100
+++ new/apptainer-1.0.2/pkg/cmdline/flag.go     2022-05-10 00:10:52.000000000 
+0200
@@ -84,6 +84,8 @@
        switch t := flag.DefaultValue.(type) {
        case string:
                m.registerStringVar(flag, cmds)
+       case map[string]string:
+               m.registerStringMapVar(flag, cmds)
        case []string:
                m.registerStringSliceVar(flag, cmds)
        case StringArray:
@@ -134,6 +136,19 @@
                }
                m.setFlagOptions(flag, c)
        }
+       return nil
+}
+
+// registerStringArrayCommas uses StringToStringVarP, a variant to allow 
commas (and a map of string/string)
+func (m *flagManager) registerStringMapVar(flag *Flag, cmds []*cobra.Command) 
error {
+       for _, c := range cmds {
+               if flag.ShortHand != "" {
+                       
c.Flags().StringToStringVarP(flag.Value.(*map[string]string), flag.Name, 
flag.ShortHand, flag.DefaultValue.(map[string]string), flag.Usage)
+               } else {
+                       
c.Flags().StringToStringVar(flag.Value.(*map[string]string), flag.Name, 
flag.DefaultValue.(map[string]string), flag.Usage)
+               }
+               m.setFlagOptions(flag, c)
+       }
        return nil
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/apptainer-1.0.1/pkg/cmdline/flag_test.go 
new/apptainer-1.0.2/pkg/cmdline/flag_test.go
--- old/apptainer-1.0.1/pkg/cmdline/flag_test.go        2022-03-16 
13:16:03.000000000 +0100
+++ new/apptainer-1.0.2/pkg/cmdline/flag_test.go        2022-05-10 
00:10:52.000000000 +0200
@@ -23,14 +23,17 @@
        testStringSlice []string
        testInt         int
        testUint32      uint32
+       testStringMap   map[string]string
 )
 
 var ttData = []struct {
-       desc            string
-       flag            *Flag
-       cmd             *cobra.Command
-       envValue        string
-       matchValue      string
+       desc       string
+       flag       *Flag
+       cmd        *cobra.Command
+       envValue   string
+       matchValue string
+       // Alternative match to accommodate random map ordering
+       altMatchValue   string
        expectedFailure bool
 }{
        {
@@ -156,6 +159,21 @@
                cmd: parentCmd,
        },
        {
+               desc: "string map flag",
+               flag: &Flag{
+                       ID:           "testStringMapFlag",
+                       Value:        &testStringMap,
+                       DefaultValue: testStringMap,
+                       Name:         "string-map",
+                       Usage:        "a string map flag",
+                       EnvKeys:      []string{"STRING_MAP"},
+               },
+               cmd:           parentCmd,
+               envValue:      "key1=arg1,key2=arg2",
+               matchValue:    "[key1=arg1,key2=arg2]",
+               altMatchValue: "[key2=arg2,key1=arg1]",
+       },
+       {
                desc: "int flag",
                flag: &Flag{
                        ID:           "testIntFlag",
@@ -249,7 +267,9 @@
                }
                if d.envValue != "" {
                        v := d.cmd.Flags().Lookup(d.flag.Name).Value.String()
-                       if v != d.matchValue {
+                       // We allow matching against an optional altMatchValue, 
so that we can accommodate
+                       // the string forms of both orderings of maps with 2 
keys.
+                       if v != d.matchValue && (d.altMatchValue == "" || v != 
d.altMatchValue) {
                                t.Errorf("unexpected value for %s, returned %s 
instead of %s", d.desc, v, d.matchValue)
                        }
                }

++++++ vendor.tar.gz ++++++
/work/SRC/openSUSE:Factory/apptainer/vendor.tar.gz 
/work/SRC/openSUSE:Factory/.apptainer.new.1538/vendor.tar.gz differ: char 5, 
line 1

Reply via email to