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 2023-11-01 22:10:43 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/minio-client (Old) and /work/SRC/openSUSE:Factory/.minio-client.new.17445 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "minio-client" Wed Nov 1 22:10:43 2023 rev:53 rq:1121606 version:20231030T184332Z Changes: -------- --- /work/SRC/openSUSE:Factory/minio-client/minio-client.changes 2023-10-25 18:05:07.627093113 +0200 +++ /work/SRC/openSUSE:Factory/.minio-client.new.17445/minio-client.changes 2023-11-01 22:11:18.334612684 +0100 @@ -1,0 +2,13 @@ +Wed Nov 01 12:24:49 UTC 2023 - ka...@b1-systems.de + +- Update to version 20231030T184332Z: + * upgrade madmin-go/v3 (#4738) + * Removing un-used variables and fixing an error condition + (#4737) + * upgrade madmin-go/v3 (#4735) + * Add `idp ldap accesskey` (#4686) + * Bump google.golang.org/grpc from 1.58.0 to 1.58.3 (#4731) + * add top locks owner as well (#4733) + * update container base image to ubi9 (#4730) + +------------------------------------------------------------------- Old: ---- mc-20231024T214222Z.obscpio New: ---- mc-20231030T184332Z.obscpio ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ minio-client.spec ++++++ --- /var/tmp/diff_new_pack.tbOmzJ/_old 2023-11-01 22:11:18.922634467 +0100 +++ /var/tmp/diff_new_pack.tbOmzJ/_new 2023-11-01 22:11:18.922634467 +0100 @@ -22,7 +22,7 @@ %define binary_name minio-client Name: minio-client -Version: 20231024T214222Z +Version: 20231030T184332Z Release: 0 Summary: Client for MinIO License: AGPL-3.0-only ++++++ _service ++++++ --- /var/tmp/diff_new_pack.tbOmzJ/_old 2023-11-01 22:11:18.950635504 +0100 +++ /var/tmp/diff_new_pack.tbOmzJ/_new 2023-11-01 22:11:18.954635653 +0100 @@ -5,7 +5,7 @@ <param name="exclude">.git</param> <param name="changesgenerate">enable</param> <param name="versionformat">@PARENT_TAG@</param> - <param name="revision">RELEASE.2023-10-24T21-42-22Z</param> + <param name="revision">RELEASE.2023-10-30T18-43-32Z</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-20231024T214222Z.obscpio</param> + <param name="archive">mc-20231030T184332Z.obscpio</param> </service> </services> ++++++ _servicedata ++++++ --- /var/tmp/diff_new_pack.tbOmzJ/_old 2023-11-01 22:11:18.974636394 +0100 +++ /var/tmp/diff_new_pack.tbOmzJ/_new 2023-11-01 22:11:18.974636394 +0100 @@ -1,6 +1,6 @@ <servicedata> <service name="tar_scm"> <param name="url">https://github.com/minio/mc</param> - <param name="changesrevision">75e722216a2269b39316494a66e1bfa182c0403e</param></service></servicedata> + <param name="changesrevision">9f2fb2b6a9f86684cbea0628c5926dafcff7de28</param></service></servicedata> (No newline at EOF) ++++++ mc-20231024T214222Z.obscpio -> mc-20231030T184332Z.obscpio ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mc-20231024T214222Z/.gitignore new/mc-20231030T184332Z/.gitignore --- old/mc-20231024T214222Z/.gitignore 2023-10-24 23:42:22.000000000 +0200 +++ new/mc-20231030T184332Z/.gitignore 2023-10-30 19:43:32.000000000 +0100 @@ -13,4 +13,5 @@ .idea/ mc.RELEASE* mc.gz -.DS_Store \ No newline at end of file +.DS_Store +.vscode/ \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mc-20231024T214222Z/CREDITS new/mc-20231030T184332Z/CREDITS --- old/mc-20231024T214222Z/CREDITS 2023-10-24 23:42:22.000000000 +0200 +++ new/mc-20231030T184332Z/CREDITS 2023-10-30 19:43:32.000000000 +0100 @@ -58,6 +58,60 @@ ================================================================ +github.com/VividCortex/ewma +https://github.com/VividCortex/ewma +---------------------------------------------------------------- +The MIT License + +Copyright (c) 2013 VividCortex + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +================================================================ + +github.com/acarl005/stripansi +https://github.com/acarl005/stripansi +---------------------------------------------------------------- +MIT License + +Copyright (c) 2018 Andrew Carlson + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +================================================================ + github.com/aymanbagabas/go-osc52/v2 https://github.com/aymanbagabas/go-osc52/v2 ---------------------------------------------------------------- @@ -8065,6 +8119,214 @@ ================================================================ +github.com/safchain/ethtool +https://github.com/safchain/ethtool +---------------------------------------------------------------- + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + 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. + + +================================================================ + github.com/secure-io/sio-go https://github.com/secure-io/sio-go ---------------------------------------------------------------- @@ -9284,6 +9546,36 @@ ================================================================ +github.com/vbauerster/mpb/v8 +https://github.com/vbauerster/mpb/v8 +---------------------------------------------------------------- +This is free and unencumbered software released into the public domain. + +Anyone is free to copy, modify, publish, use, compile, sell, or +distribute this software, either in source code form or as a compiled +binary, for any purpose, commercial or non-commercial, and by any +means. + +In jurisdictions that recognize copyright laws, the author or authors +of this software dedicate any and all copyright interest in the +software to the public domain. We make this dedication for the benefit +of the public at large and to the detriment of our heirs and +successors. We intend this dedication to be an overt act of +relinquishment in perpetuity of all present and future rights to this +software under copyright law. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +For more information, please refer to <http://unlicense.org/> + +================================================================ + github.com/yusufpapurcu/wmi https://github.com/yusufpapurcu/wmi ---------------------------------------------------------------- @@ -11595,32 +11887,3 @@ ================================================================ -github.com/vbauerster/mpb -https://github.com/vbauerster/mpb ----------------------------------------------------------------- -This is free and unencumbered software released into the public domain. - -Anyone is free to copy, modify, publish, use, compile, sell, or -distribute this software, either in source code form or as a compiled -binary, for any purpose, commercial or non-commercial, and by any -means. - -In jurisdictions that recognize copyright laws, the author or authors -of this software dedicate any and all copyright interest in the -software to the public domain. We make this dedication for the benefit -of the public at large and to the detriment of our heirs and -successors. We intend this dedication to be an overt act of -relinquishment in perpetuity of all present and future rights to this -software under copyright law. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR -OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - -For more information, please refer to <http://unlicense.org/> - -================================================================ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mc-20231024T214222Z/Dockerfile.hotfix new/mc-20231030T184332Z/Dockerfile.hotfix --- old/mc-20231024T214222Z/Dockerfile.hotfix 2023-10-24 23:42:22.000000000 +0200 +++ new/mc-20231030T184332Z/Dockerfile.hotfix 2023-10-30 19:43:32.000000000 +0100 @@ -1,8 +1,8 @@ -FROM --platform=linux/amd64 registry.access.redhat.com/ubi8/ubi-minimal:8.8 as build +FROM --platform=linux/amd64 registry.access.redhat.com/ubi9/ubi-minimal:9.2 as build RUN microdnf update --nodocs && microdnf install ca-certificates --nodocs && microdnf clean all -FROM registry.access.redhat.com/ubi8/ubi-micro:8.8 +FROM registry.access.redhat.com/ubi9/ubi-micro:9.2 ARG TARGETARCH ARG RELEASE diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mc-20231024T214222Z/Dockerfile.release new/mc-20231030T184332Z/Dockerfile.release --- old/mc-20231024T214222Z/Dockerfile.release 2023-10-24 23:42:22.000000000 +0200 +++ new/mc-20231030T184332Z/Dockerfile.release 2023-10-30 19:43:32.000000000 +0100 @@ -1,8 +1,8 @@ -FROM --platform=linux/amd64 registry.access.redhat.com/ubi8/ubi-minimal:8.8 as build +FROM --platform=linux/amd64 registry.access.redhat.com/ubi9/ubi-minimal:9.2 as build RUN microdnf update --nodocs && microdnf install ca-certificates --nodocs && microdnf clean all -FROM registry.access.redhat.com/ubi8/ubi-micro:8.8 +FROM registry.access.redhat.com/ubi9/ubi-micro:9.2 ARG TARGETARCH ARG RELEASE diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mc-20231024T214222Z/Dockerfile.release.fips new/mc-20231030T184332Z/Dockerfile.release.fips --- old/mc-20231024T214222Z/Dockerfile.release.fips 2023-10-24 23:42:22.000000000 +0200 +++ new/mc-20231030T184332Z/Dockerfile.release.fips 2023-10-30 19:43:32.000000000 +0100 @@ -1,8 +1,8 @@ -FROM --platform=linux/amd64 registry.access.redhat.com/ubi8/ubi-minimal:8.8 as build +FROM --platform=linux/amd64 registry.access.redhat.com/ubi9/ubi-minimal:9.2 as build RUN microdnf update --nodocs && microdnf install ca-certificates --nodocs && microdnf clean all -FROM registry.access.redhat.com/ubi8/ubi-micro:8.8 +FROM registry.access.redhat.com/ubi9/ubi-micro:9.2 ARG TARGETARCH ARG RELEASE diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mc-20231024T214222Z/cmd/admin-replicate-add.go new/mc-20231030T184332Z/cmd/admin-replicate-add.go --- old/mc-20231024T214222Z/cmd/admin-replicate-add.go 2023-10-24 23:42:22.000000000 +0200 +++ new/mc-20231030T184332Z/cmd/admin-replicate-add.go 2023-10-30 19:43:32.000000000 +0100 @@ -106,7 +106,7 @@ }) } - res, e := client.SiteReplicationAdd(globalContext, ps) + res, e := client.SiteReplicationAdd(globalContext, ps, madmin.SRAddOptions{}) fatalIf(probe.NewError(e).Trace(args...), "Unable to add sites for replication") printMsg(successMessage(res)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mc-20231024T214222Z/cmd/admin-replicate-update.go new/mc-20231030T184332Z/cmd/admin-replicate-update.go --- old/mc-20231024T214222Z/cmd/admin-replicate-update.go 2023-10-24 23:42:22.000000000 +0200 +++ new/mc-20231030T184332Z/cmd/admin-replicate-update.go 2023-10-30 19:43:32.000000000 +0100 @@ -180,7 +180,7 @@ Endpoint: ep, SyncState: madmin.SyncStatus(syncState), DefaultBandwidth: bwDefaults, - }) + }, madmin.SREditOptions{}) fatalIf(probe.NewError(e).Trace(args...), "Unable to edit cluster replication site endpoint") printMsg(updateSuccessMessage(res)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mc-20231024T214222Z/cmd/auto-complete.go new/mc-20231030T184332Z/cmd/auto-complete.go --- old/mc-20231024T214222Z/cmd/auto-complete.go 2023-10-24 23:42:22.000000000 +0200 +++ new/mc-20231030T184332Z/cmd/auto-complete.go 2023-10-30 19:43:32.000000000 +0100 @@ -381,6 +381,11 @@ "/idp/ldap/policy/attach": aliasCompleter, "/idp/ldap/policy/detach": aliasCompleter, + "/idp/ldap/accesskey/create": aliasCompleter, + "/idp/ldap/accesskey/list": aliasCompleter, + "/idp/ldap/accesskey/remove": aliasCompleter, + "/idp/ldap/accesskey/info": aliasCompleter, + "/admin/policy/info": aliasCompleter, "/admin/policy/update": aliasCompleter, "/admin/policy/add": aliasCompleter, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mc-20231024T214222Z/cmd/client-fs.go new/mc-20231030T184332Z/cmd/client-fs.go --- old/mc-20231024T214222Z/cmd/client-fs.go 2023-10-24 23:42:22.000000000 +0200 +++ new/mc-20231030T184332Z/cmd/client-fs.go 2023-10-30 19:43:32.000000000 +0100 @@ -881,7 +881,7 @@ switch fst.Mode().IsDir() { case true: files, e := readDir(fpath) - if err != nil { + if e != nil { contentCh <- &ClientContent{Err: probe.NewError(e)} return } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mc-20231024T214222Z/cmd/cp-url.go new/mc-20231030T184332Z/cmd/cp-url.go --- old/mc-20231024T214222Z/cmd/cp-url.go 2023-10-24 23:42:22.000000000 +0200 +++ new/mc-20231030T184332Z/cmd/cp-url.go 2023-10-30 19:43:32.000000000 +0100 @@ -285,7 +285,7 @@ } }(ctx, cc, o) - go func(ctx context.Context, cc copyURLsContent, o prepareCopyURLsOpts) { + go func() { defer close(copyURLsCh) filter := make(map[string]struct{}) for cpURLs := range copyURLsFilterCh { @@ -301,7 +301,7 @@ copyURLsCh <- cpURLs } } - }(ctx, cc, o) + }() return copyURLsCh } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mc-20231024T214222Z/cmd/idp-ldap-accesskey-info.go new/mc-20231030T184332Z/cmd/idp-ldap-accesskey-info.go --- old/mc-20231024T214222Z/cmd/idp-ldap-accesskey-info.go 1970-01-01 01:00:00.000000000 +0100 +++ new/mc-20231030T184332Z/cmd/idp-ldap-accesskey-info.go 2023-10-30 19:43:32.000000000 +0100 @@ -0,0 +1,162 @@ +// Copyright (c) 2015-2023 MinIO, Inc. +// +// This file is part of MinIO Object Storage stack +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. + +package cmd + +import ( + "strings" + "time" + + "github.com/charmbracelet/lipgloss" + humanize "github.com/dustin/go-humanize" + "github.com/minio/cli" + json "github.com/minio/colorjson" + "github.com/minio/mc/pkg/probe" + "github.com/minio/pkg/v2/console" +) + +var idpLdapAccesskeyInfoCmd = cli.Command{ + Name: "info", + Usage: "info about given access key pairs for LDAP", + Action: mainIDPLdapAccesskeyInfo, + Before: setGlobalsFromContext, + Flags: globalFlags, + OnUsageError: onUsageError, + CustomHelpTemplate: `NAME: + {{.HelpName}} - {{.Usage}} + +USAGE: + {{.HelpName}} [FLAGS] TARGET ACCESSKEY [ACCESSKEY...] + +FLAGS: + {{range .VisibleFlags}}{{.}} + {{end}} +EXAMPLES: + 1. Get info for the access key "testkey" + {{.Prompt}} {{.HelpName}} local/ testkey + 2. Get info for the access keys "testkey" and "testkey2" + {{.Prompt}} {{.HelpName}} local/ testkey testkey2 + `, +} + +type ldapAccesskeyMessage struct { + op string + Status string `json:"status"` + AccessKey string `json:"accessKey"` + SecretKey string `json:"secretKey,omitempty"` + ParentUser string `json:"parentUser,omitempty"` + AccountStatus string `json:"accountStatus,omitempty"` + ImpliedPolicy bool `json:"impliedPolicy,omitempty"` + Policy json.RawMessage `json:"policy,omitempty"` + Name string `json:"name,omitempty"` + Description string `json:"description,omitempty"` + Expiration *time.Time `json:"expiration,omitempty"` +} + +func (m ldapAccesskeyMessage) String() string { + switch m.op { + case "info": + expirationStr := "NONE" + if m.Expiration != nil && !m.Expiration.IsZero() && !m.Expiration.Equal(timeSentinel) { + expirationStr = humanize.Time(*m.Expiration) + } + policyStr := "embedded" + if m.ImpliedPolicy { + policyStr = "implied" + } + + labelStyle := lipgloss.NewStyle().Foreground(lipgloss.Color("#04B575")) // green + o := strings.Builder{} + + o.WriteString(iFmt(0, "%s %s\n", labelStyle.Render("Access Key:"), m.AccessKey)) + o.WriteString(iFmt(0, "%s %s\n", labelStyle.Render("Parent User:"), m.ParentUser)) + o.WriteString(iFmt(0, "%s %s\n", labelStyle.Render("Policy:"), policyStr)) + if m.Name != "" { + o.WriteString(iFmt(0, "%s %s\n", labelStyle.Render("Name:"), m.Name)) + } + if m.Description != "" { + o.WriteString(iFmt(0, "%s %s\n", labelStyle.Render("Description:"), m.Description)) + } + o.WriteString(iFmt(0, "%s %s\n\n", labelStyle.Render("Expiration:"), expirationStr)) + + return o.String() + + case "create": + expirationStr := "NONE" + if m.Expiration != nil && !m.Expiration.IsZero() && !m.Expiration.Equal(timeSentinel) { + expirationStr = m.Expiration.String() + } + + labelStyle := lipgloss.NewStyle().Foreground(lipgloss.Color("#04B575")) // green + o := strings.Builder{} + + o.WriteString(iFmt(0, "%s %s\n", labelStyle.Render("User DN: "), m.ParentUser)) + o.WriteString(iFmt(0, "%s %s\n", labelStyle.Render("Access Key:"), m.AccessKey)) + o.WriteString(iFmt(0, "%s %s\n", labelStyle.Render("Secret Key:"), m.SecretKey)) + o.WriteString(iFmt(0, "%s %s\n\n", labelStyle.Render("Expiration:"), expirationStr)) + + return o.String() + case "remove": + return console.Colorize("RemoveAccessKey", "Successfully removed access key `"+m.AccessKey+"`.") + } + return "" +} + +func (m ldapAccesskeyMessage) JSON() string { + jsonMessageBytes, e := json.MarshalIndent(m, "", " ") + fatalIf(probe.NewError(e), "Unable to marshal into JSON.") + + return string(jsonMessageBytes) +} + +func mainIDPLdapAccesskeyInfo(ctx *cli.Context) error { + if len(ctx.Args()) < 2 { + showCommandHelpAndExit(ctx, 1) // last argument is exit code + } + + args := ctx.Args() + aliasedURL := args.Get(0) + accessKeys := args.Tail() + + // Create a new MinIO Admin Client + client, err := newAdminClient(aliasedURL) + fatalIf(err, "Unable to initialize admin connection.") + + for _, accessKey := range accessKeys { + res, e := client.InfoServiceAccount(globalContext, accessKey) + if e != nil { + errorIf(probe.NewError(e), "Unable to retrieve access key "+accessKey+" info.") + } else { + m := ldapAccesskeyMessage{ + op: "info", + AccessKey: accessKey, + Status: "success", + ParentUser: res.ParentUser, + AccountStatus: res.AccountStatus, + ImpliedPolicy: res.ImpliedPolicy, + Policy: json.RawMessage(res.Policy), + Name: res.Name, + Description: res.Description, + Expiration: res.Expiration, + } + + printMsg(m) + } + } + + return nil +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mc-20231024T214222Z/cmd/idp-ldap-accesskey-list.go new/mc-20231030T184332Z/cmd/idp-ldap-accesskey-list.go --- old/mc-20231024T214222Z/cmd/idp-ldap-accesskey-list.go 1970-01-01 01:00:00.000000000 +0100 +++ new/mc-20231030T184332Z/cmd/idp-ldap-accesskey-list.go 2023-10-30 19:43:32.000000000 +0100 @@ -0,0 +1,222 @@ +// Copyright (c) 2015-2023 MinIO, Inc. +// +// This file is part of MinIO Object Storage stack +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. + +package cmd + +import ( + "errors" + "strings" + + "github.com/charmbracelet/lipgloss" + "github.com/minio/cli" + json "github.com/minio/colorjson" + "github.com/minio/madmin-go/v3" + "github.com/minio/mc/pkg/probe" +) + +var idpLdapAccesskeyListFlags = []cli.Flag{ + cli.BoolFlag{ + Name: "users-only", + Usage: "only list user DNs", + }, + cli.BoolFlag{ + Name: "temp-only", + Usage: "only list temporary access keys", + }, + cli.BoolFlag{ + Name: "permanent-only", + Usage: "only list permanent access keys/service accounts", + }, +} + +var idpLdapAccesskeyListCmd = cli.Command{ + Name: "list", + ShortName: "ls", + Usage: "list access key pairs for LDAP", + Action: mainIDPLdapAccesskeyList, + Before: setGlobalsFromContext, + Flags: append(idpLdapAccesskeyListFlags, globalFlags...), + OnUsageError: onUsageError, + CustomHelpTemplate: `NAME: + {{.HelpName}} - {{.Usage}} + +USAGE: + {{.HelpName}} [FLAGS] TARGET [DN...] + +FLAGS: + {{range .VisibleFlags}}{{.}} + {{end}} +EXAMPLES: + 1. Get list of all users and associated access keys in local server (if admin) + {{.Prompt}} {{.HelpName}} local/ + 2. Get list of users in local server (if admin) + {{.Prompt}} {{.HelpName}} local/ --users + 3. Get list of all users and associated temporary access keys in play server (if admin) + {{.Prompt}} {{.HelpName}} play/ --temp-only + 4. Get list of access keys associated with user 'bobfisher' + {{.Prompt}} {{.HelpName}} play/ uid=bobfisher,dc=min,dc=io + 5. Get list of access keys associated with users 'bobfisher' and 'cody3' + {{.Prompt}} {{.HelpName}} play/ uid=bobfisher,dc=min,dc=io uid=cody3,dc=min,dc=io + 6. Get authenticated user and associated access keys in local server (if not admin) + {{.Prompt}} {{.HelpName}} local/ + `, +} + +type ldapUsersList struct { + Status string `json:"status"` + Result ldapUserAccessKeys `json:"result"` +} + +type ldapUserAccessKeys struct { + DN string `json:"dn"` + TempAccessKeys []madmin.ServiceAccountInfo `json:"tempAccessKeys,omitempty"` + PermanentAccessKeys []madmin.ServiceAccountInfo `json:"permanentAccessKeys,omitempty"` +} + +func (m ldapUsersList) String() string { + labelStyle := lipgloss.NewStyle().Foreground(lipgloss.Color("#04B575")) + o := strings.Builder{} + + u := m.Result + o.WriteString(iFmt(0, "%s\n", labelStyle.Render("DN "+u.DN))) + if len(u.TempAccessKeys) > 0 { + o.WriteString(iFmt(2, "%s\n", labelStyle.Render("Temporary Access Keys:"))) + for _, k := range u.TempAccessKeys { + o.WriteString(iFmt(4, "%s\n", k.AccessKey)) + } + } + if len(u.PermanentAccessKeys) > 0 { + o.WriteString(iFmt(2, "%s\n", labelStyle.Render("Permanent Access Keys:"))) + for _, k := range u.PermanentAccessKeys { + o.WriteString(iFmt(4, "%s\n", k.AccessKey)) + } + } + o.WriteString("\n") + + return o.String() +} + +func (m ldapUsersList) JSON() string { + jsonMessageBytes, e := json.MarshalIndent(m, "", " ") + fatalIf(probe.NewError(e), "Unable to marshal into JSON.") + + return string(jsonMessageBytes) +} + +func mainIDPLdapAccesskeyList(ctx *cli.Context) error { + if len(ctx.Args()) == 0 { + showCommandHelpAndExit(ctx, 1) // last argument is exit code + } + + usersOnly := ctx.Bool("users-only") + tempOnly := ctx.Bool("temp-only") + permanentOnly := ctx.Bool("permanent-only") + + 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.") + } + + args := ctx.Args() + aliasedURL := args.Get(0) + userArg := args.Tail() + + // 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 { + // Check existence of each user + if _, e = client.GetUserInfo(globalContext, user); e != nil { + errorIf(probe.NewError(e), "User '"+user+"' invalid") + } else { + users[user] = madmin.UserInfo{} + } + } + } + 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.") + } + } + + for dn := range users { + if !usersOnly { + accessKeys, _ := client.ListServiceAccounts(globalContext, dn) + + var tempAccessKeys []madmin.ServiceAccountInfo + var permanentAccessKeys []madmin.ServiceAccountInfo + + for _, accessKey := range accessKeys.Accounts { + if accessKey.Expiration.Unix() == 0 { + permanentAccessKeys = append(permanentAccessKeys, accessKey) + } else { + tempAccessKeys = append(tempAccessKeys, accessKey) + } + } + + // 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 + } + + userAccessKeys := ldapUserAccessKeys{DN: dn} + if !tempOnly { + userAccessKeys.PermanentAccessKeys = permanentAccessKeys + } + if !permanentOnly { + userAccessKeys.TempAccessKeys = tempAccessKeys + } + + m := ldapUsersList{ + Status: "success", + Result: userAccessKeys, + } + printMsg(m) + + } else { + // 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 + } + + m := ldapUsersList{ + Status: "success", + Result: ldapUserAccessKeys{DN: dn}, + } + printMsg(m) + } + } + + return nil +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mc-20231024T214222Z/cmd/idp-ldap-accesskey-remove.go new/mc-20231030T184332Z/cmd/idp-ldap-accesskey-remove.go --- old/mc-20231024T214222Z/cmd/idp-ldap-accesskey-remove.go 1970-01-01 01:00:00.000000000 +0100 +++ new/mc-20231030T184332Z/cmd/idp-ldap-accesskey-remove.go 2023-10-30 19:43:32.000000000 +0100 @@ -0,0 +1,77 @@ +// Copyright (c) 2015-2023 MinIO, Inc. +// +// This file is part of MinIO Object Storage stack +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. + +package cmd + +import ( + "github.com/fatih/color" + "github.com/minio/cli" + "github.com/minio/mc/pkg/probe" + "github.com/minio/pkg/v2/console" +) + +var idpLdapAccesskeyRemoveCmd = cli.Command{ + Name: "remove", + ShortName: "rm", + Usage: "delete access key pairs for LDAP", + Action: mainIDPLdapAccesskeyRemove, + Before: setGlobalsFromContext, + Flags: globalFlags, + OnUsageError: onUsageError, + CustomHelpTemplate: `NAME: + {{.HelpName}} - {{.Usage}} + +USAGE: + {{.HelpName}} [FLAGS] TARGET ACCESSKEY + +FLAGS: + {{range .VisibleFlags}}{{.}} + {{end}} +EXAMPLES: + 1. Remove the access key "testkey" from local server + {{.Prompt}} {{.HelpName}} local/ testkey + `, +} + +func mainIDPLdapAccesskeyRemove(ctx *cli.Context) error { + if len(ctx.Args()) != 2 { + showCommandHelpAndExit(ctx, 1) // last argument is exit code + } + + console.SetColor("RemoveAccessKey", color.New(color.FgGreen)) + + args := ctx.Args() + aliasedURL := args.Get(0) + accessKey := args.Get(1) + + // Create a new MinIO Admin Client + client, err := newAdminClient(aliasedURL) + fatalIf(err, "Unable to initialize admin connection.") + + e := client.DeleteServiceAccount(globalContext, accessKey) + fatalIf(probe.NewError(e), "Unable to remove service account.") + + m := ldapAccesskeyMessage{ + op: "remove", + Status: "success", + AccessKey: accessKey, + } + + printMsg(m) + + return nil +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mc-20231024T214222Z/cmd/idp-ldap-accesskey.go new/mc-20231030T184332Z/cmd/idp-ldap-accesskey.go --- old/mc-20231024T214222Z/cmd/idp-ldap-accesskey.go 1970-01-01 01:00:00.000000000 +0100 +++ new/mc-20231030T184332Z/cmd/idp-ldap-accesskey.go 2023-10-30 19:43:32.000000000 +0100 @@ -0,0 +1,41 @@ +// Copyright (c) 2015-2023 MinIO, Inc. +// +// This file is part of MinIO Object Storage stack +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. + +package cmd + +import "github.com/minio/cli" + +var idpLdapAccesskeySubcommands = []cli.Command{ + idpLdapAccesskeyListCmd, + idpLdapAccesskeyRemoveCmd, + idpLdapAccesskeyInfoCmd, +} + +var idpLdapAccesskeyCmd = cli.Command{ + Name: "accesskey", + Usage: "manage LDAP access key pairs", + Action: mainIDPLDAPAccesskey, + Before: setGlobalsFromContext, + Flags: globalFlags, + Subcommands: idpLdapAccesskeySubcommands, + HideHelpCommand: true, +} + +func mainIDPLDAPAccesskey(ctx *cli.Context) error { + commandNotFound(ctx, idpLdapAccesskeySubcommands) + return nil +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mc-20231024T214222Z/cmd/idp-ldap.go new/mc-20231030T184332Z/cmd/idp-ldap.go --- old/mc-20231024T214222Z/cmd/idp-ldap.go 2023-10-24 23:42:22.000000000 +0200 +++ new/mc-20231030T184332Z/cmd/idp-ldap.go 2023-10-30 19:43:32.000000000 +0100 @@ -29,6 +29,7 @@ idpLdapEnableCmd, idpLdapDisableCmd, idpLdapPolicyCmd, + idpLdapAccesskeyCmd, } idpLdapCmd = cli.Command{ Name: "ldap", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mc-20231024T214222Z/cmd/support-diag.go new/mc-20231030T184332Z/cmd/support-diag.go --- old/mc-20231024T214222Z/cmd/support-diag.go 2023-10-24 23:42:22.000000000 +0200 +++ new/mc-20231030T184332Z/cmd/support-diag.go 2023-10-30 19:43:32.000000000 +0100 @@ -326,7 +326,8 @@ } // Fetch info of all servers (cluster or single server) - resp, version, e := client.ServerHealthInfo(cont, *opts, ctx.Duration("deadline")) + // TODO: allow configurable "anonymize" inputs + resp, version, e := client.ServerHealthInfo(cont, *opts, ctx.Duration("deadline"), "standard") if e != nil { cancel() return nil, "", e diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mc-20231024T214222Z/cmd/support-top-locks.go new/mc-20231030T184332Z/cmd/support-top-locks.go --- old/mc-20231024T214222Z/cmd/support-top-locks.go 2023-10-24 23:42:22.000000000 +0200 +++ new/mc-20231030T184332Z/cmd/support-top-locks.go 2023-10-30 19:43:32.000000000 +0100 @@ -18,9 +18,9 @@ package cmd import ( - "fmt" "time" + humanize "github.com/dustin/go-humanize" "github.com/fatih/color" "github.com/minio/cli" json "github.com/minio/colorjson" @@ -31,12 +31,13 @@ var supportTopLocksFlag = []cli.Flag{ cli.BoolFlag{ - Name: "stale", - Usage: "list stale locks ask", + Name: "stale", + Usage: "list all stale locks", + Hidden: true, }, cli.IntFlag{ Name: "count", - Usage: "number of top locks", + Usage: "list N number of locks", Hidden: true, Value: 10, }, @@ -44,7 +45,7 @@ var supportTopLocksCmd = cli.Command{ Name: "locks", - Usage: "get a list of the 10 oldest locks on a MinIO cluster.", + Usage: "list all active locks on a MinIO cluster", Before: setGlobalsFromContext, Action: mainSupportTopLocks, OnUsageError: onUsageError, @@ -59,7 +60,7 @@ {{range .VisibleFlags}}{{.}} {{end}} EXAMPLES: - 1. Get a list of the 10 oldest locks on a MinIO cluster. + 1. List oldest locks on a MinIO cluster. {{.Prompt}} {{.HelpName}} myminio/ `, } @@ -70,27 +71,8 @@ Lock madmin.LockEntry `json:"locks"` } -func getLockDuration(duration time.Duration) (string, string) { - hours := int(duration.Hours()) - minutes := int(duration.Minutes()) % 60 - seconds := int(duration.Seconds()) % 60 - if hours == 0 { - if minutes == 0 { - return "Lock", fmt.Sprint(seconds, " seconds") - } - return "Lock", fmt.Sprint(minutes, " minutes") - } - return "StaleLock", fmt.Sprint(hours, " hours") -} - // String colorized oldest locks message. func (u lockMessage) String() string { - const ( - timeFieldMaxLen = 20 - resourceFieldMaxLen = -1 - typeFieldMaxLen = 6 - ) - elapsed := u.Lock.Elapsed // elapsed can be zero with older MinIO versions, // so this code is deprecated and can be removed later. @@ -98,12 +80,18 @@ elapsed = time.Now().UTC().Sub(u.Lock.Timestamp) } - lockState, timeDiff := getLockDuration(elapsed) + stale := u.Lock.Quorum > len(u.Lock.ServerList) + lockState := "Lock" + if stale { + lockState = "StaleLock" + } + return console.Colorize(lockState, newPrettyTable(" ", - Field{"Time", timeFieldMaxLen}, + Field{"Since", timeFieldMaxLen}, Field{"Type", typeFieldMaxLen}, + Field{"Owner", timeFieldMaxLen}, Field{"Resource", resourceFieldMaxLen}, - ).buildRow(timeDiff, u.Lock.Type, u.Lock.Resource)) + ).buildRow(humanize.Time(time.Now().UTC().Add(-elapsed)), u.Lock.Type, u.Lock.Owner, u.Lock.Resource)) } // JSON jsonified top oldest locks message. @@ -118,7 +106,8 @@ Owner string `json:"owner"` // Owner UUID indicates server owns the lock. ID string `json:"id"` // UID to uniquely identify request of client. // Represents quorum number of servers required to hold this lock, used to look for stale locks. - Quorum int `json:"quorum"` + Quorum int `json:"quorum"` + Stale bool // Represents if the lock is stale. } le := lockEntry{ @@ -131,6 +120,7 @@ Owner: u.Lock.Owner, ID: u.Lock.ID, Quorum: u.Lock.Quorum, + Stale: u.Lock.Quorum > len(u.Lock.ServerList), } statusJSONBytes, e := json.MarshalIndent(le, "", " ") fatalIf(probe.NewError(e), "Unable to marshal into JSON.") @@ -152,6 +142,10 @@ alias, _ := url2Alias(aliasedURL) validateClusterRegistered(alias, false) + console.SetColor("StaleLock", color.New(color.FgRed, color.Bold)) + console.SetColor("Lock", color.New(color.FgBlue, color.Bold)) + console.SetColor("Headers", color.New(color.FgGreen, color.Bold)) + // Create a new MinIO Admin Client client, err := newAdminClient(aliasedURL) fatalIf(err, "Unable to initialize admin connection.") @@ -163,24 +157,24 @@ }) fatalIf(probe.NewError(e), "Unable to get server locks list.") - console.SetColor("StaleLock", color.New(color.FgRed, color.Bold)) - console.SetColor("Lock", color.New(color.FgBlue, color.Bold)) - console.SetColor("Headers", color.New(color.FgGreen, color.Bold)) - // Print printLocks(entries) return nil } +const ( + timeFieldMaxLen = 20 + typeFieldMaxLen = 6 + resourceFieldMaxLen = 150 +) + func printHeaders() { - timeFieldMaxLen := 20 - resourceFieldMaxLen := -1 - typeFieldMaxLen := 6 console.Println(console.Colorize("Headers", newPrettyTable(" ", - Field{"Time", timeFieldMaxLen}, + Field{"Since", timeFieldMaxLen}, Field{"Type", typeFieldMaxLen}, + Field{"Owner", timeFieldMaxLen}, Field{"Resource", resourceFieldMaxLen}, - ).buildRow("Time", "Type", "Resource"))) + ).buildRow("Since", "Type", "Owner", "Resource"))) } // Prints oldest locks. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mc-20231024T214222Z/cmd/tofu.go new/mc-20231030T184332Z/cmd/tofu.go --- old/mc-20231024T214222Z/cmd/tofu.go 2023-10-24 23:42:22.000000000 +0200 +++ new/mc-20231030T184332Z/cmd/tofu.go 2023-10-30 19:43:32.000000000 +0100 @@ -102,7 +102,7 @@ return nil, nil } - if te != nil && !strings.Contains(te.Error(), "certificate signed by unknown authority") && + if !strings.Contains(te.Error(), "certificate signed by unknown authority") && !strings.Contains(te.Error(), "certificate is not trusted") /* darwin specific error message */ { return nil, probe.NewError(te) } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mc-20231024T214222Z/go.mod new/mc-20231030T184332Z/go.mod --- old/mc-20231024T214222Z/go.mod 2023-10-24 23:42:22.000000000 +0200 +++ new/mc-20231030T184332Z/go.mod 2023-10-30 19:43:32.000000000 +0100 @@ -46,7 +46,7 @@ github.com/gdamore/tcell/v2 v2.6.0 github.com/golang-jwt/jwt/v4 v4.5.0 github.com/juju/ratelimit v1.0.2 - github.com/minio/madmin-go/v3 v3.0.21 + github.com/minio/madmin-go/v3 v3.0.29 github.com/minio/pkg/v2 v2.0.2 github.com/muesli/reflow v0.3.0 github.com/navidys/tvxwidgets v0.3.0 @@ -65,6 +65,7 @@ github.com/kr/pretty v0.3.1 // indirect github.com/minio/mux v1.9.0 // indirect github.com/rogpeppe/go-internal v1.10.0 // indirect + github.com/safchain/ethtool v0.3.0 // indirect github.com/shoenig/go-m1cpu v0.1.6 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20230913181813-007df8e322eb // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20230913181813-007df8e322eb // indirect @@ -125,7 +126,7 @@ golang.org/x/sync v0.3.0 // indirect golang.org/x/sys v0.13.0 google.golang.org/genproto v0.0.0-20230913181813-007df8e322eb // indirect - google.golang.org/grpc v1.58.0 // indirect + google.golang.org/grpc v1.58.3 // indirect google.golang.org/protobuf v1.31.0 // indirect gopkg.in/ini.v1 v1.67.0 // indirect ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mc-20231024T214222Z/go.sum new/mc-20231030T184332Z/go.sum --- old/mc-20231024T214222Z/go.sum 2023-10-24 23:42:22.000000000 +0200 +++ new/mc-20231030T184332Z/go.sum 2023-10-30 19:43:32.000000000 +0100 @@ -140,8 +140,8 @@ github.com/minio/colorjson v1.0.6/go.mod h1:LUXwS5ZGNb6Eh9f+t+3uJiowD3XsIWtsvTriUBeqgYs= github.com/minio/filepath v1.0.0 h1:fvkJu1+6X+ECRA6G3+JJETj4QeAYO9sV43I79H8ubDY= github.com/minio/filepath v1.0.0/go.mod h1:/nRZA2ldl5z6jT9/KQuvZcQlxZIMQoFFQPvEXx9T/Bw= -github.com/minio/madmin-go/v3 v3.0.21 h1:54LroTtjkn60nvDMBHmCEMGcFQ3k3Yel74RaEu9n2cY= -github.com/minio/madmin-go/v3 v3.0.21/go.mod h1:B2EgtEGrfWx+AkXv+OAcS6IHwoIJcd1p75QfDPSPd6Q= +github.com/minio/madmin-go/v3 v3.0.29 h1:3bNLArtxIFud5wyb5/DnF5DGLBvcSJyzCA44EclX1Ow= +github.com/minio/madmin-go/v3 v3.0.29/go.mod h1:4QN2NftLSV7MdlT50dkrenOMmNVHluxTvlqJou3hte8= github.com/minio/md5-simd v1.1.2 h1:Gdi1DZK69+ZVMoNHRXJyNcxrMA4dSxoYHZSQbirFg34= github.com/minio/md5-simd v1.1.2/go.mod h1:MzdKDxYpY2BT9XQFocsiZf/NKVtR7nkE4RoEpN+20RM= github.com/minio/minio-go/v7 v7.0.63 h1:GbZ2oCvaUdgT5640WJOpyDhhDxvknAJU2/T3yurwcbQ= @@ -212,6 +212,8 @@ github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/rs/xid v1.5.0 h1:mKX4bl4iPYJtEIxp6CYiUuLQ/8DYMoz0PUdtGgMFRVc= github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= +github.com/safchain/ethtool v0.3.0 h1:gimQJpsI6sc1yIqP/y8GYgiXn/NjgvpM0RNoWLVVmP0= +github.com/safchain/ethtool v0.3.0/go.mod h1:SA9BwrgyAqNo7M+uaL6IYbxpm5wk3L7Mm6ocLW+CJUs= github.com/secure-io/sio-go v0.3.1 h1:dNvY9awjabXTYGsTF1PiCySl9Ltofk9GA3VdWlo7rRc= github.com/secure-io/sio-go v0.3.1/go.mod h1:+xbkjDzPjwh4Axd07pRKSNriS9SCiYksWnZqdnfpQxs= github.com/shirou/gopsutil/v3 v3.23.8 h1:xnATPiybo6GgdRoC4YoGnxXZFRc3dqQTGi73oLvvBrE= @@ -360,8 +362,8 @@ google.golang.org/genproto/googleapis/api v0.0.0-20230913181813-007df8e322eb/go.mod h1:KjSP20unUpOx5kyQUFa7k4OJg0qeJ7DEZflGDu2p6Bk= google.golang.org/genproto/googleapis/rpc v0.0.0-20230913181813-007df8e322eb h1:Isk1sSH7bovx8Rti2wZK0UZF6oraBDK74uoyLEEVFN0= google.golang.org/genproto/googleapis/rpc v0.0.0-20230913181813-007df8e322eb/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= -google.golang.org/grpc v1.58.0 h1:32JY8YpPMSR45K+c3o6b8VL73V+rR8k+DeMIr4vRH8o= -google.golang.org/grpc v1.58.0/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= +google.golang.org/grpc v1.58.3 h1:BjnpXut1btbtgN/6sp+brB2Kbm2LjNXnidYujAVbSoQ= +google.golang.org/grpc v1.58.3/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= ++++++ mc.obsinfo ++++++ --- /var/tmp/diff_new_pack.tbOmzJ/_old 2023-11-01 22:11:19.262647063 +0100 +++ /var/tmp/diff_new_pack.tbOmzJ/_new 2023-11-01 22:11:19.262647063 +0100 @@ -1,5 +1,5 @@ name: mc -version: 20231024T214222Z -mtime: 1698183742 -commit: 75e722216a2269b39316494a66e1bfa182c0403e +version: 20231030T184332Z +mtime: 1698691412 +commit: 9f2fb2b6a9f86684cbea0628c5926dafcff7de28 ++++++ vendor.tar.gz ++++++ /work/SRC/openSUSE:Factory/minio-client/vendor.tar.gz /work/SRC/openSUSE:Factory/.minio-client.new.17445/vendor.tar.gz differ: char 5, line 1