Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
62788cf
build(deps): bump github.com/containernetworking/plugins
dependabot[bot] Jan 17, 2023
63402ae
Merge pull request #1247 from sylabs/dependabot/go_modules/main/githu…
dtrudg Jan 17, 2023
c9a861d
build(deps): bump github.com/sigstore/sigstore from 1.5.0 to 1.5.1
dependabot[bot] Jan 18, 2023
f5090b9
Merge pull request #1251 from sylabs/dependabot/go_modules/main/githu…
dtrudg Jan 18, 2023
63bac44
Merge pull request #1245 from sylabs/dependabot/go_modules/main/githu…
dtrudg Jan 18, 2023
7a4f452
build(deps): bump github.com/sylabs/scs-build-client from 0.7.5 to 0.7.6
dependabot[bot] Jan 19, 2023
c2325bc
Merge pull request #1254 from sylabs/dependabot/go_modules/main/githu…
dtrudg Jan 19, 2023
e794cad
build(deps): bump github.com/docker/docker
dependabot[bot] Jan 20, 2023
94098c5
Merge pull request #1257 from sylabs/dependabot/go_modules/main/githu…
dtrudg Jan 23, 2023
643af48
build(deps): bump github.com/fatih/color from 1.13.0 to 1.14.0
dependabot[bot] Jan 23, 2023
203a730
Merge pull request #1260 from sylabs/dependabot/go_modules/main/githu…
dtrudg Jan 23, 2023
f79cf01
build(deps): bump github.com/fatih/color from 1.14.0 to 1.14.1
dependabot[bot] Jan 24, 2023
3d62997
Merge pull request #1266 from sylabs/dependabot/go_modules/main/githu…
dtrudg Jan 24, 2023
acb8006
build(deps): bump github.com/containers/image/v5 from 5.23.1 to 5.24.0
dependabot[bot] Jan 24, 2023
08a8d68
Merge pull request #1267 from sylabs/dependabot/go_modules/main/githu…
dtrudg Jan 24, 2023
3107ac0
build(deps): bump github.com/containers/common from 0.50.1 to 0.51.0
dependabot[bot] Jan 25, 2023
1c24005
chore: fix lint, LICENSE_DEPENDENCIES.md
dtrudg Jan 25, 2023
f9040c0
Merge pull request #1271 from sylabs/dependabot/go_modules/main/githu…
dtrudg Jan 25, 2023
b67928d
fix: ensure proot flow doesn't override --remote build
dtrudg Jan 27, 2023
abf0be9
Merge pull request #1274 from dtrudg/issue1273
dtrudg Jan 27, 2023
f55b647
build(deps): bump github.com/containerd/containerd from 1.6.15 to 1.6.16
dependabot[bot] Jan 30, 2023
fba06ee
Merge pull request #1275 from sylabs/dependabot/go_modules/main/githu…
dtrudg Jan 30, 2023
f6a2396
fix: avoid readonly warnings with --env-file
dtrudg Jan 27, 2023
104493f
Merge pull request #1278 from dtrudg/issue1263
dtrudg Jan 30, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# SingularityCE Changelog

## Changes Since Last Release

### Bug Fixes

- Avoid UID / GID readonly var warnings with `--env-file`.

## 3.11.0 Release Candidate 1 \[2023-01-11\]

*This is the first release candidate for the upcoming Singularity 3.11.0
Expand Down
156 changes: 156 additions & 0 deletions LICENSE_DEPENDENCIES.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ The dependencies and their licenses are as follows:

**License URL:** <https://github.com/Netflix/go-expect/blob/master/LICENSE>

## github.com/container-orchestrated-devices/container-device-interface

**License:** Apache-2.0

**License URL:** <https://github.com/container-orchestrated-devices/container-device-interface/blob/master/LICENSE>

## github.com/containerd/containerd

**License:** Apache-2.0
Expand Down Expand Up @@ -77,6 +83,12 @@ The dependencies and their licenses are as follows:

**License URL:** <https://github.com/coreos/go-systemd/blob/master/v22/dbus/LICENSE>

## github.com/cyberphone/json-canonicalization/go/src/webpki.org/jsoncanonicalizer

**License:** Apache-2.0

**License URL:** <https://github.com/cyberphone/json-canonicalization/blob/master/go/src/webpki.org/jsoncanonicalizer/LICENSE>

## github.com/docker/cli/cli/config

**License:** Apache-2.0
Expand Down Expand Up @@ -119,6 +131,66 @@ The dependencies and their licenses are as follows:

**License URL:** <https://github.com/docker/libtrust/blob/master/LICENSE>

## github.com/go-openapi/analysis

**License:** Apache-2.0

**License URL:** <https://github.com/go-openapi/analysis/blob/master/LICENSE>

## github.com/go-openapi/errors

**License:** Apache-2.0

**License URL:** <https://github.com/go-openapi/errors/blob/master/LICENSE>

## github.com/go-openapi/jsonpointer

**License:** Apache-2.0

**License URL:** <https://github.com/go-openapi/jsonpointer/blob/master/LICENSE>

## github.com/go-openapi/jsonreference

**License:** Apache-2.0

**License URL:** <https://github.com/go-openapi/jsonreference/blob/master/LICENSE>

## github.com/go-openapi/loads

**License:** Apache-2.0

**License URL:** <https://github.com/go-openapi/loads/blob/master/LICENSE>

## github.com/go-openapi/runtime

**License:** Apache-2.0

**License URL:** <https://github.com/go-openapi/runtime/blob/master/LICENSE>

## github.com/go-openapi/spec

**License:** Apache-2.0

**License URL:** <https://github.com/go-openapi/spec/blob/master/LICENSE>

## github.com/go-openapi/strfmt

**License:** Apache-2.0

**License URL:** <https://github.com/go-openapi/strfmt/blob/master/LICENSE>

## github.com/go-openapi/swag

**License:** Apache-2.0

**License URL:** <https://github.com/go-openapi/swag/blob/master/LICENSE>

## github.com/go-openapi/validate

**License:** Apache-2.0

**License URL:** <https://github.com/go-openapi/validate/blob/master/LICENSE>

## github.com/google/go-containerregistry/pkg/name

**License:** Apache-2.0
Expand Down Expand Up @@ -179,6 +251,12 @@ The dependencies and their licenses are as follows:

**License URL:** <https://github.com/modern-go/reflect2/blob/master/LICENSE>

## github.com/oklog/ulid

**License:** Apache-2.0

**License URL:** <https://github.com/oklog/ulid/blob/master/LICENSE>

## github.com/opencontainers/go-digest

**License:** Apache-2.0
Expand All @@ -203,6 +281,12 @@ The dependencies and their licenses are as follows:

**License URL:** <https://github.com/opencontainers/runtime-spec/blob/master/specs-go/LICENSE>

## github.com/opencontainers/runtime-tools

**License:** Apache-2.0

**License URL:** <https://github.com/opencontainers/runtime-tools/blob/master/LICENSE>

## github.com/opencontainers/selinux

**License:** Apache-2.0
Expand Down Expand Up @@ -263,6 +347,18 @@ The dependencies and their licenses are as follows:

**License URL:** <https://github.com/safchain/ethtool/blob/master/LICENSE>

## github.com/sigstore/fulcio/pkg/certificate

**License:** Apache-2.0

**License URL:** <https://github.com/sigstore/fulcio/blob/master/pkg/certificate/LICENSE>

## github.com/sigstore/rekor/pkg/generated/models

**License:** Apache-2.0

**License URL:** <https://github.com/sigstore/rekor/blob/master/pkg/generated/models/LICENSE>

## github.com/sigstore/sigstore/pkg

**License:** Apache-2.0
Expand Down Expand Up @@ -299,6 +395,30 @@ The dependencies and their licenses are as follows:

**License URL:** <https://github.com/vishvananda/netns/blob/master/LICENSE>

## github.com/xeipuuv/gojsonpointer

**License:** Apache-2.0

**License URL:** <https://github.com/xeipuuv/gojsonpointer/blob/master/LICENSE-APACHE-2.0.txt>

## github.com/xeipuuv/gojsonreference

**License:** Apache-2.0

**License URL:** <https://github.com/xeipuuv/gojsonreference/blob/master/LICENSE-APACHE-2.0.txt>

## github.com/xeipuuv/gojsonschema

**License:** Apache-2.0

**License URL:** <https://github.com/xeipuuv/gojsonschema/blob/master/LICENSE-APACHE-2.0.txt>

## go.mongodb.org/mongo-driver

**License:** Apache-2.0

**Project URL:** <https://go.mongodb.org/mongo-driver>

## google.golang.org/genproto/googleapis/rpc/status

**License:** Apache-2.0
Expand Down Expand Up @@ -389,6 +509,12 @@ The dependencies and their licenses are as follows:

**License URL:** <https://github.com/cyphar/filepath-securejoin/blob/master/LICENSE>

## github.com/fsnotify/fsnotify

**License:** BSD-3-Clause

**License URL:** <https://github.com/fsnotify/fsnotify/blob/master/LICENSE>

## github.com/gogo/protobuf/proto

**License:** BSD-3-Clause
Expand Down Expand Up @@ -593,6 +719,12 @@ The dependencies and their licenses are as follows:

**License URL:** <https://github.com/apex/log/blob/master/LICENSE>

## github.com/asaskevich/govalidator

**License:** MIT

**License URL:** <https://github.com/asaskevich/govalidator/blob/master/LICENSE>

## github.com/beorn7/perks/quantile

**License:** MIT
Expand Down Expand Up @@ -671,6 +803,12 @@ The dependencies and their licenses are as follows:

**License URL:** <https://github.com/go-log/log/blob/master/LICENSE>

## github.com/josharian/intern

**License:** MIT

**License URL:** <https://github.com/josharian/intern/blob/master/license.md>

## github.com/json-iterator/go

**License:** MIT
Expand All @@ -695,6 +833,12 @@ The dependencies and their licenses are as follows:

**License URL:** <https://github.com/kr/pty/blob/master/LICENSE>

## github.com/mailru/easyjson

**License:** MIT

**License URL:** <https://github.com/mailru/easyjson/blob/master/LICENSE>

## github.com/mattn/go-colorable

**License:** MIT
Expand All @@ -713,6 +857,12 @@ The dependencies and their licenses are as follows:

**License URL:** <https://github.com/mattn/go-runewidth/blob/master/LICENSE>

## github.com/mitchellh/mapstructure

**License:** MIT

**License URL:** <https://github.com/mitchellh/mapstructure/blob/master/LICENSE>

## github.com/morikuni/aec

**License:** MIT
Expand Down Expand Up @@ -773,6 +923,12 @@ The dependencies and their licenses are as follows:

**Project URL:** <https://gopkg.in/yaml.v3>

## sigs.k8s.io/yaml

**License:** MIT

**Project URL:** <https://sigs.k8s.io/yaml>

## github.com/gosimple/slug

**License:** MPL-2.0
Expand Down
5 changes: 4 additions & 1 deletion cmd/internal/cli/build_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,10 @@ func runBuild(cmd *cobra.Command, args []string) {
dest := args[0]
spec := args[1]

if syscall.Getuid() != 0 && !buildArgs.fakeroot && fs.IsFile(spec) && !isImage(spec) {
// Non-remote build with def file as source
rootNeeded := !buildArgs.remote && fs.IsFile(spec) && !isImage(spec)

if rootNeeded && syscall.Getuid() != 0 && !buildArgs.fakeroot {
prootPath, err := bin.FindBin("proot")
if err != nil {
sylog.Fatalf("--remote, --fakeroot, or the proot command are required to build this source as a non-root user")
Expand Down
3 changes: 2 additions & 1 deletion e2e/env/env.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2019-2022, Sylabs Inc. All rights reserved.
// Copyright (c) 2019-2023, Sylabs Inc. All rights reserved.
// This software is licensed under a 3-clause BSD license. Please consult the
// LICENSE.md file distributed with the sources of this project regarding your
// rights to use or distribute this software.
Expand Down Expand Up @@ -640,6 +640,7 @@ func E2ETests(env e2e.TestEnv) testhelper.Tests {
"issue 5057": c.issue5057, // https://github.com/sylabs/hpcng/issues/5057
"issue 5426": c.issue5426, // https://github.com/sylabs/hpcng/issues/5426
"issue 43": c.issue43, // https://github.com/sylabs/singularity/issues/43
"issue 1263": c.issue1263, // https://github.com/sylabs/singularity/issues/1263
//
// --oci mode
//
Expand Down
28 changes: 27 additions & 1 deletion e2e/env/regressions.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2020-2022, Sylabs Inc. All rights reserved.
// Copyright (c) 2020-2023, Sylabs Inc. All rights reserved.
// This software is licensed under a 3-clause BSD license. Please consult the
// LICENSE.md file distributed with the sources of this project regarding your
// rights to use or distribute this software.
Expand Down Expand Up @@ -122,3 +122,29 @@ func (c ctx) issue43(t *testing.T) {
),
)
}

// https://github.com/sylabs/singularity/issues/1263
// With --env-file we should avoid any override of UID / GID that are set readonly by bash.
func (c ctx) issue1263(t *testing.T) {
e2e.EnsureImage(t, c.env)

// An empty env file is sufficient, as UID/GID come from the mvdan.cc/sh evaluation of it.
envFile, err := e2e.WriteTempFile(c.env.TestDir, "env-file", "")
if err != nil {
t.Fatal(err)
}
t.Cleanup(func() {
os.Remove(envFile)
})

c.env.RunSingularity(
t,
e2e.WithProfile(e2e.UserProfile),
e2e.WithCommand("exec"),
e2e.WithArgs("--env-file", envFile, c.env.ImagePath, "/bin/true"),
e2e.ExpectExit(
0,
e2e.ExpectError(e2e.UnwantedContainMatch, "readonly variable"),
),
)
}
1 change: 1 addition & 0 deletions e2e/imgbuild/imgbuild.go
Original file line number Diff line number Diff line change
Expand Up @@ -1624,5 +1624,6 @@ func E2ETests(env e2e.TestEnv) testhelper.Tests {
"issue 5435": c.issue5435, // https://github.com/hpcng/singularity/issues/5435
"issue 5668": c.issue5668, // https://github.com/hpcng/singularity/issues/5435
"issue 5690": c.issue5690, // https://github.com/hpcng/singularity/issues/5690
"issue 1273": c.issue1273, // https://github.com/sylabs/singularity/issues/1273
}
}
19 changes: 19 additions & 0 deletions e2e/imgbuild/regressions.go
Original file line number Diff line number Diff line change
Expand Up @@ -445,3 +445,22 @@ From: {{ .From }}
e2e.ExpectExit(0),
)
}

// Ensure a `--remote` build request fails (not-authorized) and proot flow is not invoked.
func (c *imgBuildTests) issue1273(t *testing.T) {
image := filepath.Join(c.env.TestDir, "issue_1273.sif")

c.env.RunSingularity(
t,
e2e.WithProfile(e2e.UserProfile),
e2e.WithCommand("build"),
e2e.WithArgs("--remote", image, "testdata/proot_alpine.def"),
e2e.PostRun(func(t *testing.T) {
os.Remove(image)
}),
e2e.ExpectExit(
255,
e2e.ExpectError(e2e.UnwantedContainMatch, "proot"),
),
)
}
Loading