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-09-23 15:20:06 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/minio-client (Old) and /work/SRC/openSUSE:Factory/.minio-client.new.29891 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "minio-client" Mon Sep 23 15:20:06 2024 rev:96 rq:1202369 version:20240916T174314Z Changes: -------- --- /work/SRC/openSUSE:Factory/minio-client/minio-client.changes 2024-09-15 12:41:53.838288695 +0200 +++ /work/SRC/openSUSE:Factory/.minio-client.new.29891/minio-client.changes 2024-09-23 15:21:05.462627815 +0200 @@ -1,0 +2,10 @@ +Sat Sep 21 16:18:19 UTC 2024 - opensuse_buildserv...@ojkastl.de + +- Update to version 20240916T174314Z: + * iam export:designate zip file name (#4995) + * mirror:Add the printing of event time (#4953) + * alias: `mc alias list` command outputs the alias information + specified by MC_CONFIG_ENV_FILE (#5028) + * idp-ldap: Fix create-with-login command (#5036) + +------------------------------------------------------------------- Old: ---- minio-client-20240909T075310Z.obscpio New: ---- minio-client-20240916T174314Z.obscpio ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ minio-client.spec ++++++ --- /var/tmp/diff_new_pack.CL4Jbv/_old 2024-09-23 15:21:07.042693344 +0200 +++ /var/tmp/diff_new_pack.CL4Jbv/_new 2024-09-23 15:21:07.042693344 +0200 @@ -19,7 +19,7 @@ %define __arch_install_post export NO_BRP_STRIP_DEBUG=true Name: minio-client -Version: 20240909T075310Z +Version: 20240916T174314Z Release: 0 Summary: Client for MinIO License: AGPL-3.0-only ++++++ _service ++++++ --- /var/tmp/diff_new_pack.CL4Jbv/_old 2024-09-23 15:21:07.082695003 +0200 +++ /var/tmp/diff_new_pack.CL4Jbv/_new 2024-09-23 15:21:07.086695168 +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-09-09T07-53-10Z</param> + <param name="revision">RELEASE.2024-09-16T17-43-14Z</param> <param name="match-tag">RELEASE.*</param> <param name="versionrewrite-pattern">RELEASE\.(.*)-(.*)-(.*)-(.*)-(.*)</param> <param name="versionrewrite-replacement">\1\2\3\4\5</param> ++++++ _servicedata ++++++ --- /var/tmp/diff_new_pack.CL4Jbv/_old 2024-09-23 15:21:07.114696330 +0200 +++ /var/tmp/diff_new_pack.CL4Jbv/_new 2024-09-23 15:21:07.118696496 +0200 @@ -1,6 +1,6 @@ <servicedata> <service name="tar_scm"> <param name="url">https://github.com/minio/mc</param> - <param name="changesrevision">04c5116c9bdf8b762acc54b5500a9a276a5ec05a</param></service></servicedata> + <param name="changesrevision">11ebe952ea30e426e564f66e78d178465ae7c432</param></service></servicedata> (No newline at EOF) ++++++ minio-client-20240909T075310Z.obscpio -> minio-client-20240916T174314Z.obscpio ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/minio-client-20240909T075310Z/cmd/admin-cluster-iam-export.go new/minio-client-20240916T174314Z/cmd/admin-cluster-iam-export.go --- old/minio-client-20240909T075310Z/cmd/admin-cluster-iam-export.go 2024-09-09 09:53:10.000000000 +0200 +++ new/minio-client-20240916T174314Z/cmd/admin-cluster-iam-export.go 2024-09-16 19:43:14.000000000 +0200 @@ -32,13 +32,23 @@ "github.com/minio/pkg/v3/console" ) +// iam export specific flags. +var ( + iamExportFlags = []cli.Flag{ + cli.StringFlag{ + Name: "output,o", + Usage: "output iam export to a custom file path", + }, + } +) + var adminClusterIAMExportCmd = cli.Command{ Name: "export", Usage: "exports IAM info to zipped file", Action: mainClusterIAMExport, OnUsageError: onUsageError, Before: setGlobalsFromContext, - Flags: globalFlags, + Flags: append(iamExportFlags, globalFlags...), HideHelpCommand: true, CustomHelpTemplate: `NAME: {{.HelpName}} - {{.Usage}} @@ -52,6 +62,9 @@ EXAMPLES: 1. Download all IAM metadata for cluster into zip file. {{.Prompt}} {{.HelpName}} myminio + + 2. Download all IAM metadata to a custom file. + {{.Prompt}} {{.HelpName}} myminio --output /tmp/myminio-iam.zip `, } @@ -97,6 +110,9 @@ tmpFile.Close() downloadPath := fmt.Sprintf("%s-iam-info.%s", aliasedURL, ext) + if ctx.String("output") != "" { + downloadPath = ctx.String("output") + } fi, e := os.Stat(downloadPath) if e == nil && !fi.IsDir() { e = moveFile(downloadPath, downloadPath+"."+time.Now().Format(dateTimeFormatFilename)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/minio-client-20240909T075310Z/cmd/alias-list.go new/minio-client-20240916T174314Z/cmd/alias-list.go --- old/minio-client-20240909T075310Z/cmd/alias-list.go 2024-09-09 09:53:10.000000000 +0200 +++ new/minio-client-20240916T174314Z/cmd/alias-list.go 2024-09-16 19:43:14.000000000 +0200 @@ -19,11 +19,14 @@ import ( "fmt" + "os" "sort" + "strings" - "github.com/fatih/color" "github.com/minio/cli" "github.com/minio/pkg/v3/console" + + "github.com/fatih/color" ) var aliasListCmd = cli.Command{ @@ -75,6 +78,7 @@ console.SetColor("SecretKey", color.New(color.FgCyan)) console.SetColor("API", color.New(color.FgBlue)) console.SetColor("Path", color.New(color.FgCyan)) + console.SetColor("Src", color.New(color.FgCyan)) alias := cleanAlias(ctx.Args().Get(0)) @@ -115,51 +119,65 @@ func (d byAlias) Swap(i, j int) { d[i], d[j] = d[j], d[i] } func (d byAlias) Less(i, j int) bool { return d[i].Alias < d[j].Alias } +func buildAliasMessage(alias string, deprecated bool, aliasCfg *aliasConfigV10) aliasMessage { + aliasMsg := aliasMessage{ + prettyPrint: false, + Alias: alias, + URL: aliasCfg.URL, + AccessKey: aliasCfg.AccessKey, + SecretKey: aliasCfg.SecretKey, + API: aliasCfg.API, + Src: aliasCfg.Src, + } + + if deprecated { + aliasMsg.Lookup = aliasCfg.Path + } else { + aliasMsg.Path = aliasCfg.Path + } + return aliasMsg +} + // listAliases - list one or all aliases func listAliases(alias string, deprecated bool) (aliases []aliasMessage) { - conf, err := loadMcConfig() - fatalIf(err.Trace(globalMCConfigVersion), "Unable to load config version `"+globalMCConfigVersion+"`.") - // If specific alias is requested, look for it and print. if alias != "" { - if v, ok := conf.Aliases[alias]; ok { - aliasMsg := aliasMessage{ - prettyPrint: false, - Alias: alias, - URL: v.URL, - AccessKey: v.AccessKey, - SecretKey: v.SecretKey, - API: v.API, - } - - if deprecated { - aliasMsg.Lookup = v.Path - } else { - aliasMsg.Path = v.Path - } - - return []aliasMessage{aliasMsg} + aliasCfg := mustGetHostConfig(alias) + if aliasCfg != nil { + return []aliasMessage{buildAliasMessage(alias, deprecated, aliasCfg)} } + fatalIf(errInvalidAliasedURL(alias), "No such alias `"+alias+"` found.") } - for k, v := range conf.Aliases { - aliasMsg := aliasMessage{ - prettyPrint: true, - Alias: k, - URL: v.URL, - AccessKey: v.AccessKey, - SecretKey: v.SecretKey, - API: v.API, - } - - if deprecated { - aliasMsg.Lookup = v.Path - } else { - aliasMsg.Path = v.Path + // list alias from the environment variable. + for _, envLine := range os.Environ() { + pair := strings.SplitN(envLine, "=", 2) + if len(pair) != 2 { + continue + } + if len(strings.TrimPrefix(pair[0], mcEnvHostPrefix)) != 0 { + aliasCfg, _ := expandAliasFromEnv(pair[1]) + if aliasCfg == nil { + continue + } + alias := strings.ReplaceAll(pair[0], mcEnvHostPrefix, "") + aliases = append(aliases, buildAliasMessage(alias, deprecated, aliasCfg)) } + } - aliases = append(aliases, aliasMsg) + // list alias from the customized configuration. + for s, aliasCfg := range aliasToConfigMap { + aliases = append(aliases, buildAliasMessage(s, deprecated, aliasCfg)) + } + + // list alias from the default configuration. + conf, err := loadMcConfig() + fatalIf(err.Trace(globalMCConfigVersion), "Unable to load config version `"+globalMCConfigVersion+"`.") + + for k, v := range conf.Aliases { + v.Src = mustGetMcConfigPath() + aliases = append(aliases, buildAliasMessage(k, deprecated, &v)) } // Sort by alias names lexically. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/minio-client-20240909T075310Z/cmd/alias-main.go new/minio-client-20240916T174314Z/cmd/alias-main.go --- old/minio-client-20240909T075310Z/cmd/alias-main.go 2024-09-09 09:53:10.000000000 +0200 +++ new/minio-client-20240916T174314Z/cmd/alias-main.go 2024-09-16 19:43:14.000000000 +0200 @@ -73,6 +73,7 @@ SecretKey string `json:"secretKey,omitempty"` API string `json:"api,omitempty"` Path string `json:"path,omitempty"` + Src string `json:"src,omitempty"` // Deprecated field, replaced by Path Lookup string `json:"lookup,omitempty"` } @@ -91,13 +92,14 @@ Row{"SecretKey", "SecretKey"}, Row{"API", "API"}, Row{"Path", "Path"}, + Row{"Src", "Src"}, ) // Handle deprecated lookup path := h.Path if path == "" { path = h.Lookup } - return t.buildRecord(h.Alias, h.URL, h.AccessKey, h.SecretKey, h.API, path) + return t.buildRecord(h.Alias, h.URL, h.AccessKey, h.SecretKey, h.API, path, h.Src) case "remove": return console.Colorize("AliasMessage", "Removed `"+h.Alias+"` successfully.") case "add": // add is deprecated diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/minio-client-20240909T075310Z/cmd/config-v10.go new/minio-client-20240916T174314Z/cmd/config-v10.go --- old/minio-client-20240909T075310Z/cmd/config-v10.go 2024-09-09 09:53:10.000000000 +0200 +++ new/minio-client-20240916T174314Z/cmd/config-v10.go 2024-09-16 19:43:14.000000000 +0200 @@ -46,6 +46,7 @@ Path string `json:"path"` License string `json:"license,omitempty"` APIKey string `json:"apiKey,omitempty"` + Src string `json:"src,omitempty"` } // configV10 config version. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/minio-client-20240909T075310Z/cmd/config.go new/minio-client-20240916T174314Z/cmd/config.go --- old/minio-client-20240909T075310Z/cmd/config.go 2024-09-09 09:53:10.000000000 +0200 +++ new/minio-client-20240916T174314Z/cmd/config.go 2024-09-16 19:43:14.000000000 +0200 @@ -185,6 +185,7 @@ // if host is exact return quickly. if _, ok := mcCfg.Aliases[alias]; ok { hostCfg := mcCfg.Aliases[alias] + hostCfg.Src = mustGetMcConfigPath() return &hostCfg, nil } @@ -194,14 +195,17 @@ // mustGetHostConfig retrieves host specific configuration such as access keys, signature type. func mustGetHostConfig(alias string) *aliasConfigV10 { - aliasCfg, _ := getAliasConfig(alias) + // look for it in the environment variable first. + aliasCfg, _ := expandAliasFromEnv(env.Get(mcEnvHostPrefix+alias, "")) + // If alias is not found, - // look for it in the environment variable. + // look for it in the customized configuration. if aliasCfg == nil { - aliasCfg, _ = expandAliasFromEnv(env.Get(mcEnvHostPrefix+alias, "")) + aliasCfg = aliasToConfigMap[alias] } + if aliasCfg == nil { - aliasCfg = aliasToConfigMap[alias] + aliasCfg, _ = getAliasConfig(alias) } return aliasCfg } @@ -286,6 +290,7 @@ if err != nil { return err.Trace(envLine) } + aliasConfig.Src = envConfigFile aliasToConfigMap[alias] = aliasConfig } if e := scanner.Err(); e != nil { @@ -306,6 +311,7 @@ AccessKey: accessKey, SecretKey: secretKey, SessionToken: sessionToken, + Src: "env", }, nil } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/minio-client-20240909T075310Z/cmd/idp-ldap-accesskey-create-with-login.go new/minio-client-20240916T174314Z/cmd/idp-ldap-accesskey-create-with-login.go --- old/minio-client-20240909T075310Z/cmd/idp-ldap-accesskey-create-with-login.go 2024-09-09 09:53:10.000000000 +0200 +++ new/minio-client-20240916T174314Z/cmd/idp-ldap-accesskey-create-with-login.go 2024-09-16 19:43:14.000000000 +0200 @@ -90,6 +90,9 @@ func loginLDAPAccesskey(ctx *cli.Context) (*madmin.AdminClient, madmin.AddServiceAccountReq) { urlStr := ctx.Args().First() + u, e := url.Parse(urlStr) + fatalIf(probe.NewError(e), "unable to parse server URL") + console.SetColor(cred, color.New(color.FgYellow, color.Italic)) reader := bufio.NewReader(os.Stdin) @@ -107,8 +110,8 @@ stsCreds, e := credentials.NewLDAPIdentity(urlStr, username, password) fatalIf(probe.NewError(e), "unable to initialize LDAP identity") - u, e := url.Parse(urlStr) - fatalIf(probe.NewError(e), "unable to parse server URL") + tempCreds, e := stsCreds.Get() + fatalIf(probe.NewError(e), "unable to create a temporary account from LDAP identity") client, e := madmin.NewWithOptions(u.Host, &madmin.Options{ Creds: stsCreds, @@ -116,5 +119,5 @@ }) fatalIf(probe.NewError(e), "unable to initialize admin connection") - return client, accessKeyCreateOpts(ctx, username) + return client, accessKeyCreateOpts(ctx, tempCreds.AccessKeyID) } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/minio-client-20240909T075310Z/cmd/mirror-main.go new/minio-client-20240916T174314Z/cmd/mirror-main.go --- old/minio-client-20240909T075310Z/cmd/mirror-main.go 2024-09-09 09:53:10.000000000 +0200 +++ new/minio-client-20240916T174314Z/cmd/mirror-main.go 2024-09-16 19:43:14.000000000 +0200 @@ -29,6 +29,8 @@ "sync" "time" + "github.com/dustin/go-humanize" + "github.com/fatih/color" "github.com/minio/cli" json "github.com/minio/colorjson" @@ -277,17 +279,31 @@ // mirrorMessage container for file mirror messages type mirrorMessage struct { - Status string `json:"status"` - Source string `json:"source"` - Target string `json:"target"` - Size int64 `json:"size"` - TotalCount int64 `json:"totalCount"` - TotalSize int64 `json:"totalSize"` + Status string `json:"status"` + Source string `json:"source"` + Target string `json:"target"` + Size int64 `json:"size"` + TotalCount int64 `json:"totalCount"` + TotalSize int64 `json:"totalSize"` + EventTime string `json:"eventTime"` + EventType notification.EventType `json:"eventType"` } // String colorized mirror message func (m mirrorMessage) String() string { - return console.Colorize("Mirror", fmt.Sprintf("`%s` -> `%s`", m.Source, m.Target)) + var msg string + if m.EventTime != "" { + msg = console.Colorize("Time", fmt.Sprintf("[%s] ", m.EventTime)) + } + if m.EventType == notification.ObjectRemovedDelete { + return msg + "Removed " + console.Colorize("Removed", fmt.Sprintf("`%s`", m.Target)) + } + if m.EventTime == "" { + return console.Colorize("Mirror", fmt.Sprintf("`%s` -> `%s`", m.Source, m.Target)) + } + msg += console.Colorize("Size", fmt.Sprintf("%6s ", humanize.IBytes(uint64(m.Size)))) + msg += console.Colorize("Mirror", fmt.Sprintf("`%s` -> `%s`", m.Source, m.Target)) + return msg } // JSON jsonified mirror message @@ -345,7 +361,7 @@ } // doRemove - removes files on target. -func (mj *mirrorJob) doRemove(ctx context.Context, sURLs URLs) URLs { +func (mj *mirrorJob) doRemove(ctx context.Context, sURLs URLs, event EventInfo) URLs { if mj.opts.isFake { return sURLs.WithError(nil) } @@ -375,13 +391,21 @@ } return sURLs.WithError(result.Err) } + targetPath := filepath.ToSlash(filepath.Join(sURLs.TargetAlias, sURLs.TargetContent.URL.Path)) + mj.status.PrintMsg(mirrorMessage{ + Target: targetPath, + TotalCount: sURLs.TotalCount, + TotalSize: sURLs.TotalSize, + EventTime: event.Time, + EventType: event.Type, + }) } return sURLs.WithError(nil) } // doMirror - Mirror an object to multiple destination. URLs status contains a copy of sURLs and error if any. -func (mj *mirrorJob) doMirrorWatch(ctx context.Context, targetPath string, tgtSSE encrypt.ServerSide, sURLs URLs) URLs { +func (mj *mirrorJob) doMirrorWatch(ctx context.Context, targetPath string, tgtSSE encrypt.ServerSide, sURLs URLs, event EventInfo) URLs { shouldQueue := false if !mj.opts.isOverwrite && !mj.opts.activeActive { targetClient, err := newClient(targetPath) @@ -405,7 +429,7 @@ mj.status.AddCounts(1) sURLs.TotalSize = mj.status.Get() sURLs.TotalCount = mj.status.GetCounts() - return mj.doMirror(ctx, sURLs) + return mj.doMirror(ctx, sURLs, event) } return sURLs.WithError(probe.NewError(ObjectAlreadyExists{})) } @@ -428,7 +452,7 @@ } // doMirror - Mirror an object to multiple destination. URLs status contains a copy of sURLs and error if any. -func (mj *mirrorJob) doMirror(ctx context.Context, sURLs URLs) URLs { +func (mj *mirrorJob) doMirror(ctx context.Context, sURLs URLs, event EventInfo) URLs { if sURLs.Error != nil { // Erroneous sURLs passed. return sURLs.WithError(sURLs.Error.Trace()) } @@ -481,6 +505,8 @@ Size: length, TotalCount: sURLs.TotalCount, TotalSize: sURLs.TotalSize, + EventTime: event.Time, + EventType: event.Type, }) } sURLs.MD5 = mj.opts.md5 @@ -589,10 +615,6 @@ if sURLs.SourceContent != nil { mirrorTotalUploadedBytes.Add(float64(sURLs.SourceContent.Size)) - } else if sURLs.TargetContent != nil { - // Construct user facing message and path. - targetPath := filepath.ToSlash(filepath.Join(sURLs.TargetAlias, sURLs.TargetContent.URL.Path)) - mj.status.PrintMsg(rmMessage{Key: targetPath}) } } @@ -687,7 +709,7 @@ continue } mj.parallel.queueTask(func() URLs { - return mj.doMirrorWatch(ctx, targetPath, tgtSSE, mirrorURL) + return mj.doMirrorWatch(ctx, targetPath, tgtSSE, mirrorURL, event) }, mirrorURL.SourceContent.Size) } else if event.Type == notification.ObjectRemovedDelete { if targetAlias != "" && strings.Contains(event.UserAgent, uaMirrorAppName+":"+targetAlias) { @@ -707,7 +729,7 @@ mirrorURL.TotalSize = mj.status.Get() if mirrorURL.TargetContent != nil && (mj.opts.isRemove || mj.opts.activeActive) { mj.parallel.queueTask(func() URLs { - return mj.doRemove(ctx, mirrorURL) + return mj.doRemove(ctx, mirrorURL, event) }, 0) } } else if event.Type == notification.BucketCreatedAll { @@ -807,11 +829,11 @@ if sURLs.SourceContent != nil { mj.parallel.queueTask(func() URLs { - return mj.doMirror(ctx, sURLs) + return mj.doMirror(ctx, sURLs, EventInfo{}) }, sURLs.SourceContent.Size) } else if sURLs.TargetContent != nil && mj.opts.isRemove { mj.parallel.queueTask(func() URLs { - return mj.doRemove(ctx, sURLs) + return mj.doRemove(ctx, sURLs, EventInfo{}) }, 0) } case <-ctx.Done(): ++++++ minio-client.obsinfo ++++++ --- /var/tmp/diff_new_pack.CL4Jbv/_old 2024-09-23 15:21:07.406708440 +0200 +++ /var/tmp/diff_new_pack.CL4Jbv/_new 2024-09-23 15:21:07.410708606 +0200 @@ -1,5 +1,5 @@ name: minio-client -version: 20240909T075310Z -mtime: 1725868390 -commit: 04c5116c9bdf8b762acc54b5500a9a276a5ec05a +version: 20240916T174314Z +mtime: 1726508594 +commit: 11ebe952ea30e426e564f66e78d178465ae7c432 ++++++ vendor.tar.gz ++++++ /work/SRC/openSUSE:Factory/minio-client/vendor.tar.gz /work/SRC/openSUSE:Factory/.minio-client.new.29891/vendor.tar.gz differ: char 5, line 1