Skip to content

Commit 43aab19

Browse files
author
github-actions
committed
Merge branch 'main' into cras
2 parents dc63250 + 01fbe29 commit 43aab19

File tree

94 files changed

+338
-519
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

94 files changed

+338
-519
lines changed

LICENSE_DEPENDENCIES.md

Lines changed: 2 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -1040,7 +1040,7 @@ SOFTWARE.
10401040
```
10411041

10421042

1043-
## github.com/ccoveille/go-safecast
1043+
## github.com/ccoveille/go-safecast/v2
10441044

10451045
**License:** MIT
10461046

@@ -1162,37 +1162,7 @@ SOFTWARE.
11621162
```
11631163

11641164

1165-
## github.com/clipperhouse/stringish
1166-
1167-
**License:** MIT
1168-
1169-
```
1170-
MIT License
1171-
1172-
Copyright (c) 2025 Matt Sherman
1173-
1174-
Permission is hereby granted, free of charge, to any person obtaining a copy
1175-
of this software and associated documentation files (the "Software"), to deal
1176-
in the Software without restriction, including without limitation the rights
1177-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1178-
copies of the Software, and to permit persons to whom the Software is
1179-
furnished to do so, subject to the following conditions:
1180-
1181-
The above copyright notice and this permission notice shall be included in all
1182-
copies or substantial portions of the Software.
1183-
1184-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1185-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1186-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1187-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1188-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1189-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1190-
SOFTWARE.
1191-
1192-
```
1193-
1194-
1195-
## github.com/clipperhouse/uax29/v2
1165+
## github.com/clipperhouse/uax29/v2/graphemes
11961166

11971167
**License:** MIT
11981168

@@ -36104,64 +36074,6 @@ limitations under the License.
3610436074
```
3610536075

3610636076

36107-
## gotest.tools
36108-
36109-
**License:** Apache-2.0
36110-
36111-
```
36112-
Copyright 2018 gotest.tools authors
36113-
36114-
Licensed under the Apache License, Version 2.0 (the "License");
36115-
you may not use this file except in compliance with the License.
36116-
You may obtain a copy of the License at
36117-
36118-
http://www.apache.org/licenses/LICENSE-2.0
36119-
36120-
Unless required by applicable law or agreed to in writing, software
36121-
distributed under the License is distributed on an "AS IS" BASIS,
36122-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
36123-
See the License for the specific language governing permissions and
36124-
limitations under the License.
36125-
36126-
```
36127-
36128-
36129-
## gotest.tools/internal/difflib
36130-
36131-
**License:** BSD-3-Clause
36132-
36133-
```
36134-
Copyright (c) 2013, Patrick Mezard
36135-
All rights reserved.
36136-
36137-
Redistribution and use in source and binary forms, with or without
36138-
modification, are permitted provided that the following conditions are
36139-
met:
36140-
36141-
Redistributions of source code must retain the above copyright
36142-
notice, this list of conditions and the following disclaimer.
36143-
Redistributions in binary form must reproduce the above copyright
36144-
notice, this list of conditions and the following disclaimer in the
36145-
documentation and/or other materials provided with the distribution.
36146-
The names of its contributors may not be used to endorse or promote
36147-
products derived from this software without specific prior written
36148-
permission.
36149-
36150-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
36151-
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
36152-
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
36153-
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
36154-
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
36155-
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
36156-
TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
36157-
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
36158-
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
36159-
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
36160-
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36161-
36162-
```
36163-
36164-
3616536077
## gotest.tools/v3
3616636078

3616736079
**License:** Apache-2.0

cmd/internal/cli/build_linux.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import (
1818
"strings"
1919
"syscall"
2020

21-
"github.com/ccoveille/go-safecast"
21+
"github.com/ccoveille/go-safecast/v2"
2222
"github.com/google/go-containerregistry/pkg/authn"
2323
"github.com/spf13/cobra"
2424
keyclient "github.com/sylabs/scs-key-client/client"

cmd/internal/cli/cgroups.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212
"strings"
1313
"time"
1414

15-
"github.com/ccoveille/go-safecast"
15+
"github.com/ccoveille/go-safecast/v2"
1616
"github.com/docker/go-units"
1717
"github.com/shopspring/decimal"
1818
"github.com/sylabs/singularity/v4/internal/pkg/cgroups"

cmd/internal/cli/inspect.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) 2018-2025, Sylabs Inc. All rights reserved.
1+
// Copyright (c) 2018-2026, Sylabs Inc. All rights reserved.
22
// Copyright (c) Contributors to the Apptainer project, established as
33
// Apptainer a Series of LF Projects LLC.
44
// This software is licensed under a 3-clause BSD license. Please consult the
@@ -381,8 +381,8 @@ func (c *command) getMetadata() (*inspect.Metadata, error) {
381381
}
382382
sectionStr := strings.TrimSpace(string(section))
383383

384-
if strings.HasPrefix(sectionStr, sectionDelim) {
385-
sectionStr = strings.TrimSpace(strings.TrimPrefix(sectionStr, sectionDelim))
384+
if after, ok := strings.CutPrefix(sectionStr, sectionDelim); ok {
385+
sectionStr = strings.TrimSpace(after)
386386
parts := strings.SplitN(sectionStr, ":", 2)
387387
if len(parts) < 1 {
388388
return nil, fmt.Errorf("badly formatted content, can't recover: %v", parts)

cmd/internal/cli/singularity_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) 2018-2022, Sylabs Inc. All rights reserved.
1+
// Copyright (c) 2018-2026, Sylabs Inc. All rights reserved.
22
// This software is licensed under a 3-clause BSD license. Please consult the
33
// LICENSE.md file distributed with the sources of this project regarding your
44
// rights to use or distribute this software.
@@ -14,7 +14,7 @@ import (
1414
func TestCreateConfDir(t *testing.T) {
1515
// create a random name for a directory
1616
bytes := make([]byte, 8)
17-
for i := 0; i < 8; i++ {
17+
for i := range 8 {
1818
//#nosec G404
1919
bytes[i] = byte(65 + rand.Intn(25))
2020
}

e2e/actions/oci.go

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) 2022-2025, Sylabs Inc. All rights reserved.
1+
// Copyright (c) 2022-2026, Sylabs Inc. All rights reserved.
22
// This software is licensed under a 3-clause BSD license. Please consult the
33
// LICENSE.md file distributed with the sources of this project regarding your
44
// rights to use or distribute this software.
@@ -953,7 +953,8 @@ func (c actionTests) actionOciCdi(t *testing.T) {
953953

954954
// Generate the command to be executed in the container
955955
// Start by printing all environment variables, to test using e2e.ContainMatch conditions later
956-
execCmd := "/usr/bin/env"
956+
var execCmd strings.Builder
957+
execCmd.WriteString("/usr/bin/env")
957958

958959
// Add commands to test the presence of mapped devices.
959960
for _, d := range tt.DeviceNodes {
@@ -962,13 +963,13 @@ func (c actionTests) actionOciCdi(t *testing.T) {
962963
case "c":
963964
testFlag = "-c"
964965
}
965-
execCmd += fmt.Sprintf(" && test %s %s", testFlag, d.Path)
966+
execCmd.WriteString(fmt.Sprintf(" && test %s %s", testFlag, d.Path))
966967
}
967968

968969
// Add commands to test the presence, and functioning, of mounts.
969970
for i, m := range tt.Mounts {
970971
// Add a separate teststring echo statement for each mount
971-
execCmd += fmt.Sprintf(" && echo %s > %s/testfile_%d", testfileStrings[i], m.ContainerPath, i)
972+
execCmd.WriteString(fmt.Sprintf(" && echo %s > %s/testfile_%d", testfileStrings[i], m.ContainerPath, i))
972973
}
973974

974975
// Create a postRun function to check that the testfiles written to the container mounts made their way to the right host temporary directories
@@ -1005,7 +1006,7 @@ func (c actionTests) actionOciCdi(t *testing.T) {
10051006
"--cdi-dirs",
10061007
stws.jsonsDir,
10071008
imageRef,
1008-
"/bin/sh", "-c", execCmd),
1009+
"/bin/sh", "-c", execCmd.String()),
10091010
e2e.WithProfile(profile),
10101011
e2e.ExpectExit(tt.wantExit, envExpects...),
10111012
e2e.PostRun(tt.postRun),
@@ -1136,7 +1137,7 @@ func (c actionTests) actionOciOverlay(t *testing.T) {
11361137
})
11371138

11381139
// Create a few writable overlay subdirs under testDir
1139-
for i := 0; i < 3; i++ {
1140+
for i := range 3 {
11401141
dirName := fmt.Sprintf("my_rw_ol_dir%d", i)
11411142
fullPath := filepath.Join(testDir, dirName)
11421143
dirs.MkdirOrFatal(t, fullPath, 0o755)
@@ -1151,7 +1152,7 @@ func (c actionTests) actionOciOverlay(t *testing.T) {
11511152
}
11521153

11531154
// Create a few read-only overlay subdirs under testDir
1154-
for i := 0; i < 3; i++ {
1155+
for i := range 3 {
11551156
dirName := fmt.Sprintf("my_ro_ol_dir%d", i)
11561157
fullPath := filepath.Join(testDir, dirName)
11571158
dirs.MkdirOrFatal(t, fullPath, 0o755)
@@ -1165,13 +1166,13 @@ func (c actionTests) actionOciOverlay(t *testing.T) {
11651166
})
11661167
if err = os.WriteFile(
11671168
filepath.Join(upperPath, fmt.Sprintf("testfile.%d", i)),
1168-
[]byte(fmt.Sprintf("test_string_%d\n", i)),
1169+
fmt.Appendf(nil, "test_string_%d\n", i),
11691170
0o644); err != nil {
11701171
t.Fatal(err)
11711172
}
11721173
if err = os.WriteFile(
11731174
filepath.Join(upperPath, "maskable_testfile"),
1174-
[]byte(fmt.Sprintf("maskable_string_%d\n", i)),
1175+
fmt.Appendf(nil, "maskable_string_%d\n", i),
11751176
0o644); err != nil {
11761177
t.Fatal(err)
11771178
}

e2e/docker/docker.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ import (
3232
"github.com/sylabs/singularity/v4/internal/pkg/test/tool/tmpl"
3333
"github.com/sylabs/singularity/v4/internal/pkg/util/fs"
3434
"golang.org/x/sys/unix"
35-
"gotest.tools/assert"
35+
"gotest.tools/v3/assert"
3636
)
3737

3838
type ctx struct {

e2e/env/regressions.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) 2020-2025, Sylabs Inc. All rights reserved.
1+
// Copyright (c) 2020-2026, Sylabs Inc. All rights reserved.
22
// This software is licensed under a 3-clause BSD license. Please consult the
33
// LICENSE.md file distributed with the sources of this project regarding your
44
// rights to use or distribute this software.
@@ -73,7 +73,7 @@ func (c ctx) issue5057(t *testing.T) {
7373
maxChunkSize := uint64(buildcfg.MAX_CHUNK_SIZE)
7474

7575
big := make([]byte, maxChunkSize)
76-
for i := uint64(0); i < maxChunkSize; i++ {
76+
for i := range maxChunkSize {
7777
big[i] = 'A'
7878
}
7979
bigEnv := make([]string, buildcfg.MAX_ENGINE_CONFIG_CHUNK)

e2e/instance/instance.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ func (c *ctx) testCreateManyInstances(t *testing.T) {
147147
const n = 10
148148

149149
// Start n instances.
150-
for i := 0; i < n; i++ {
150+
for i := range n {
151151
port := instanceStartPort + i
152152
instanceName := "echo" + strconv.Itoa(i+1)
153153

e2e/internal/e2e/docker.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Copyright (c) 2020, Control Command Inc. All rights reserved.
2-
// Copyright (c) 2019-2022, Sylabs Inc. All rights reserved.
2+
// Copyright (c) 2019-2026, Sylabs Inc. All rights reserved.
33
// Copyright (c) Contributors to the Apptainer project, established as
44
// Apptainer a Series of LF Projects LLC.
55
// This software is licensed under a 3-clause BSD license. Please consult the
@@ -169,7 +169,7 @@ func StartRegistry(t *testing.T, env TestEnv) string {
169169

170170
addr := net.JoinHostPort("localhost", port)
171171

172-
for i := 0; i < 30; i++ {
172+
for range 30 {
173173
resp, err := http.Get(fmt.Sprintf("http://%s/", addr))
174174
resp.Body.Close()
175175
if err != nil || resp.StatusCode != 200 {

0 commit comments

Comments
 (0)