Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package minio-client for openSUSE:Factory 
checked in at 2024-08-03 20:07:09
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/minio-client (Old)
 and      /work/SRC/openSUSE:Factory/.minio-client.new.7232 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "minio-client"

Sat Aug  3 20:07:09 2024 rev:92 rq:1191426 version:20240731T155833Z

Changes:
--------
--- /work/SRC/openSUSE:Factory/minio-client/minio-client.changes        
2024-07-28 17:20:30.234336023 +0200
+++ /work/SRC/openSUSE:Factory/.minio-client.new.7232/minio-client.changes      
2024-08-03 20:07:29.542335766 +0200
@@ -1,0 +2,8 @@
+Sat Aug 03 07:58:55 UTC 2024 - opensuse_buildserv...@ojkastl.de
+
+- Update to version 20240731T155833Z:
+  * Rework `mc idp ldap accesskey list` to use new API endpoint
+    (#4946)
+  * #4988 fixed prometheus metrics usage message (#5000)
+
+-------------------------------------------------------------------

Old:
----
  mc-20240726T130844Z.obscpio

New:
----
  mc-20240731T155833Z.obscpio

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

Other differences:
------------------
++++++ minio-client.spec ++++++
--- /var/tmp/diff_new_pack.zQ3mKK/_old  2024-08-03 20:07:30.374369949 +0200
+++ /var/tmp/diff_new_pack.zQ3mKK/_new  2024-08-03 20:07:30.374369949 +0200
@@ -22,7 +22,7 @@
 %define binary_name minio-client
 
 Name:           minio-client
-Version:        20240726T130844Z
+Version:        20240731T155833Z
 Release:        0
 Summary:        Client for MinIO
 License:        AGPL-3.0-only

++++++ _service ++++++
--- /var/tmp/diff_new_pack.zQ3mKK/_old  2024-08-03 20:07:30.410371428 +0200
+++ /var/tmp/diff_new_pack.zQ3mKK/_new  2024-08-03 20:07:30.414371593 +0200
@@ -5,7 +5,7 @@
     <param name="exclude">.git</param>
     <param name="changesgenerate">enable</param>
     <param name="versionformat">@PARENT_TAG@</param>
-    <param name="revision">RELEASE.2024-07-26T13-08-44Z</param>
+    <param name="revision">RELEASE.2024-07-31T15-58-33Z</param>
     <param name="match-tag">RELEASE.*</param>
     <param 
name="versionrewrite-pattern">RELEASE\.(.*)-(.*)-(.*)-(.*)-(.*)</param>
     <param name="versionrewrite-replacement">\1\2\3\4\5</param>
@@ -19,7 +19,7 @@
     <param name="compression">gz</param>
   </service>
   <service name="go_modules" mode="manual">
-    <param name="archive">mc-20240726T130844Z.obscpio</param>
+    <param name="archive">mc-20240731T155833Z.obscpio</param>
   </service>
 </services>
 

++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.zQ3mKK/_old  2024-08-03 20:07:30.438372579 +0200
+++ /var/tmp/diff_new_pack.zQ3mKK/_new  2024-08-03 20:07:30.442372743 +0200
@@ -1,6 +1,6 @@
 <servicedata>
 <service name="tar_scm">
                 <param name="url">https://github.com/minio/mc</param>
-              <param 
name="changesrevision">8ad22bb69435c831b6a16d4cb03c248145929d95</param></service></servicedata>
+              <param 
name="changesrevision">f0d2ad47084cf1fbda8f955e9c6f4ee5d9c1daec</param></service></servicedata>
 (No newline at EOF)
 

++++++ mc-20240726T130844Z.obscpio -> mc-20240731T155833Z.obscpio ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/mc-20240726T130844Z/cmd/admin-prometheus-metrics-v3.go 
new/mc-20240731T155833Z/cmd/admin-prometheus-metrics-v3.go
--- old/mc-20240726T130844Z/cmd/admin-prometheus-metrics-v3.go  2024-07-26 
15:08:44.000000000 +0200
+++ new/mc-20240731T155833Z/cmd/admin-prometheus-metrics-v3.go  2024-07-31 
17:58:33.000000000 +0200
@@ -32,7 +32,7 @@
        metricsV3Flags = []cli.Flag{
                cli.StringFlag{
                        Name:  "bucket",
-                       Usage: "bucket name to list metrics for. only 
applicable with api version v3 for metric type 'bucket'",
+                       Usage: "bucket name to list metrics for. only 
applicable with api version v3 for metric type 'api, replication'",
                },
        }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mc-20240726T130844Z/cmd/idp-ldap-accesskey-list.go 
new/mc-20240731T155833Z/cmd/idp-ldap-accesskey-list.go
--- old/mc-20240726T130844Z/cmd/idp-ldap-accesskey-list.go      2024-07-26 
15:08:44.000000000 +0200
+++ new/mc-20240731T155833Z/cmd/idp-ldap-accesskey-list.go      2024-07-31 
17:58:33.000000000 +0200
@@ -41,6 +41,14 @@
                Name:  "svcacc-only",
                Usage: "only list service account access keys",
        },
+       cli.BoolFlag{
+               Name:  "self",
+               Usage: "list access keys for the authenticated user",
+       },
+       cli.BoolFlag{
+               Name:  "all",
+               Usage: "list all access keys for all LDAP users",
+       },
 }
 
 var idpLdapAccesskeyListCmd = cli.Command{
@@ -95,7 +103,7 @@
        labelStyle := lipgloss.NewStyle().Foreground(lipgloss.Color("#04B575"))
        o := strings.Builder{}
 
-       o.WriteString(iFmt(0, "%s\n", labelStyle.Render("DN "+m.DN)))
+       o.WriteString(iFmt(0, "%s %s\n", labelStyle.Render("DN:"), m.DN))
        if len(m.STSKeys) > 0 {
                o.WriteString(iFmt(2, "%s\n", labelStyle.Render("STS Access 
Keys:")))
                for _, k := range m.STSKeys {
@@ -108,7 +116,6 @@
                        o.WriteString(iFmt(4, "%s\n", k.AccessKey))
                }
        }
-       o.WriteString("\n")
 
        return o.String()
 }
@@ -126,73 +133,65 @@
        }
 
        usersOnly := ctx.Bool("users-only")
-       tempOnly := ctx.Bool("sts-only")
-       permanentOnly := ctx.Bool("svcacc-only")
-       listType := ""
-
-       if (usersOnly && permanentOnly) || (usersOnly && tempOnly) || 
(permanentOnly && tempOnly) {
-               e := errors.New("only one of --users-only, --temp-only, or 
--permanent-only can be specified")
-               fatalIf(probe.NewError(e), "Invalid flags.")
-       }
-       if tempOnly {
-               listType = "sts-only"
-       } else if permanentOnly {
-               listType = "svcacc-only"
-       }
+       stsOnly := ctx.Bool("temp-only")
+       svcaccOnly := ctx.Bool("svcacc-only")
+       selfFlag := ctx.Bool("self")
+       allFlag := ctx.Bool("all")
 
        args := ctx.Args()
        aliasedURL := args.Get(0)
-       userArg := args.Tail()
+       users := args.Tail()
+
+       var e error
+       if (usersOnly && svcaccOnly) || (usersOnly && stsOnly) || (svcaccOnly 
&& stsOnly) {
+               e = errors.New("only one of --users-only, --temp-only, or 
--permanent-only can be specified")
+       } else if selfFlag && allFlag {
+               e = errors.New("only one of --self or --all can be specified")
+       } else if (selfFlag || allFlag) && len(users) > 0 {
+               e = errors.New("user DNs cannot be specified with --self or 
--all")
+       }
+       fatalIf(probe.NewError(e), "Invalid flags.")
+
+       // If no users/self/all flags are specified, tentatively assume --all
+       // If access is denied on tentativeAll, retry with self
+       // This is to maintain compatibility with the previous behavior
+       tentativeAll := false
+       if !selfFlag && !allFlag && len(users) == 0 {
+               tentativeAll = true
+               allFlag = true
+       }
+
+       var listType string
+       switch {
+       case usersOnly:
+               listType = madmin.AccessKeyListUsersOnly
+       case stsOnly:
+               listType = madmin.AccessKeyListSTSOnly
+       case svcaccOnly:
+               listType = madmin.AccessKeyListSvcaccOnly
+       default:
+               listType = madmin.AccessKeyListAll
+       }
 
        // Create a new MinIO Admin Client
        client, err := newAdminClient(aliasedURL)
        fatalIf(err, "Unable to initialize admin connection.")
 
-       var e error
-       var users map[string]madmin.UserInfo
-
-       // If no users given, attempt to list all users
-       if len(userArg) == 0 {
-               users, e = client.ListUsers(globalContext)
-       } else {
-               users = make(map[string]madmin.UserInfo)
-               for _, user := range userArg {
-                       users[user] = madmin.UserInfo{}
-               }
-       }
+       accessKeysMap, e := client.ListAccessKeysLDAPBulk(globalContext, users, 
listType, allFlag)
        if e != nil {
-               if e.Error() == "Access Denied." {
-                       // If user does not have ListUsers permission, only get 
current user's access keys
-                       users = make(map[string]madmin.UserInfo)
-                       users[""] = madmin.UserInfo{}
-               } else {
-                       fatalIf(probe.NewError(e), "Unable to retrieve users.")
+               if e.Error() == "Access Denied." && tentativeAll {
+                       // retry with self
+                       accessKeysMap, e = 
client.ListAccessKeysLDAPBulk(globalContext, users, listType, false)
                }
+               fatalIf(probe.NewError(e), "Unable to list access keys.")
        }
 
-       for dn := range users {
-               // if dn is blank, it means we are listing the current user's 
access keys
-               if dn == "" {
-                       name, e := client.AccountInfo(globalContext, 
madmin.AccountOpts{})
-                       fatalIf(probe.NewError(e), "Unable to retrieve account 
name.")
-                       dn = name.AccountName
-               }
-
+       for dn, accessKeys := range accessKeysMap {
                m := ldapUsersList{
-                       Status: "success",
-                       DN:     dn,
-               }
-
-               // Get access keys if not listing users only
-               if !usersOnly {
-                       accessKeys, e := 
client.ListAccessKeysLDAP(globalContext, dn, listType)
-                       if e != nil {
-                               errorIf(probe.NewError(e), "Unable to retrieve 
access keys for user '"+dn+"'.")
-                               continue
-                       }
-
-                       m.STSKeys = accessKeys.STSKeys
-                       m.ServiceAccounts = accessKeys.ServiceAccounts
+                       Status:          "success",
+                       DN:              dn,
+                       ServiceAccounts: accessKeys.ServiceAccounts,
+                       STSKeys:         accessKeys.STSKeys,
                }
                printMsg(m)
        }

++++++ mc.obsinfo ++++++
--- /var/tmp/diff_new_pack.zQ3mKK/_old  2024-08-03 20:07:30.698383260 +0200
+++ /var/tmp/diff_new_pack.zQ3mKK/_new  2024-08-03 20:07:30.702383425 +0200
@@ -1,5 +1,5 @@
 name: mc
-version: 20240726T130844Z
-mtime: 1721999324
-commit: 8ad22bb69435c831b6a16d4cb03c248145929d95
+version: 20240731T155833Z
+mtime: 1722441513
+commit: f0d2ad47084cf1fbda8f955e9c6f4ee5d9c1daec
 

++++++ vendor.tar.gz ++++++
/work/SRC/openSUSE:Factory/minio-client/vendor.tar.gz 
/work/SRC/openSUSE:Factory/.minio-client.new.7232/vendor.tar.gz differ: char 5, 
line 1

Reply via email to