Skip to content

Commit 9eefa4b

Browse files
authored
Merge pull request #170 from sylabs/dependabot/go_modules/release-3.8/github.com/sylabs/sif-1.5.1
build(deps): bump github.com/sylabs/sif from 1.5.0 to 1.5.1
2 parents c50b077 + b8a3b31 commit 9eefa4b

File tree

4 files changed

+15
-5
lines changed

4 files changed

+15
-5
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ require (
4848
github.com/sylabs/scs-build-client v0.1.6
4949
github.com/sylabs/scs-key-client v0.6.2
5050
github.com/sylabs/scs-library-client v1.0.5
51-
github.com/sylabs/sif v1.5.0
51+
github.com/sylabs/sif v1.5.1
5252
github.com/urfave/cli v1.22.5 // indirect
5353
github.com/vbauerster/mpb/v4 v4.12.2
5454
github.com/vbauerster/mpb/v6 v6.0.4

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -859,8 +859,8 @@ github.com/sylabs/scs-key-client v0.6.2 h1:PTdmkE50rFMrSty9usl8wnzaW+JPK0rjXF4cd
859859
github.com/sylabs/scs-key-client v0.6.2/go.mod h1:WoTk47nNRrk0uLfblxUFekxDIIVPY4l2/9evME5fgX0=
860860
github.com/sylabs/scs-library-client v1.0.5 h1:u8ueCIQaa38/B0axtKUzdWSQ6uLXL9HvLQGNkB69Oe0=
861861
github.com/sylabs/scs-library-client v1.0.5/go.mod h1:ufza0uq4ohT7Fk2Y7vm+uRyMm7gRA+Fde1nxyhGfhTk=
862-
github.com/sylabs/sif v1.5.0 h1:7jTKPcv9Y+HkoAw1nYXssFDtnkSrmUUIYWLBOR0GqUs=
863-
github.com/sylabs/sif v1.5.0/go.mod h1:7XfhyQDbVIQki/GftRt77khhBvYTOCzPMMI62ZT4Ya8=
862+
github.com/sylabs/sif v1.5.1 h1:DtnvtQY/NABQx2H7PlCij57L+67fTuG7d2MQJpbeeO8=
863+
github.com/sylabs/sif v1.5.1/go.mod h1:7XfhyQDbVIQki/GftRt77khhBvYTOCzPMMI62ZT4Ya8=
864864
github.com/syndtr/gocapability v0.0.0-20170704070218-db04d3cc01c8/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww=
865865
github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww=
866866
github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635 h1:kdXcSzyDtseVEc4yCz2qF8ZrQvIDBJLl4S1c3GCXmoI=

internal/app/singularity/plugin_compile_linux.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,10 +313,15 @@ func makeSIF(sourceDir, sifPath string) error {
313313
os.RemoveAll(sifPath)
314314

315315
// create sif file
316-
if _, err := sif.CreateContainer(plCreateInfo); err != nil {
316+
f, err := sif.CreateContainer(plCreateInfo)
317+
if err != nil {
317318
return fmt.Errorf("while creating sif file: %s", err)
318319
}
319320

321+
if err := f.UnloadContainer(); err != nil {
322+
return fmt.Errorf("while unloading sif file: %w", err)
323+
}
324+
320325
return nil
321326
}
322327

internal/pkg/build/assemblers/sif.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,10 +157,15 @@ func createSIF(path string, b *types.Bundle, squashfile string, encOpts *encrypt
157157
os.RemoveAll(path)
158158

159159
// test container creation with two partition input descriptors
160-
if _, err := sif.CreateContainer(cinfo); err != nil {
160+
f, err := sif.CreateContainer(cinfo)
161+
if err != nil {
161162
return fmt.Errorf("while creating container: %s", err)
162163
}
163164

165+
if err := f.UnloadContainer(); err != nil {
166+
return fmt.Errorf("while unloading container: %w", err)
167+
}
168+
164169
// chown the sif file to the calling user
165170
if uid, gid, ok := changeOwner(); ok {
166171
if err := os.Chown(path, uid, gid); err != nil {

0 commit comments

Comments
 (0)