Skip to content

Commit 670f2cb

Browse files
authored
Merge pull request #5333 from cyphar/1.4-libpathrs-0.2.5-5291
[1.4] deps: update to libpathrs v0.2.5
2 parents 37e03f8 + e650692 commit 670f2cb

17 files changed

Lines changed: 183 additions & 68 deletions

File tree

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## [Unreleased 1.4.z]
88

9+
### Added ###
10+
- `runc version` and `runc features` now provide version information about
11+
libpathrs when runc is built with the `libpathrs` build tag. (#5291, #5328)
12+
13+
### Changed ###
14+
- For users making use of the `libpathrs` build tag, runc now depends on
15+
[libpathrs v0.2.5] or later, and attempting to build with older versions will
16+
cause compilation errors. (#5291, #5333)
17+
18+
[libpathrs v0.2.5]: https://github.com/cyphar/libpathrs/releases/tag/v0.2.5
19+
20+
921
## [1.4.3] - 2026-06-13
1022

1123
> The best way to irritate him is to feed his grandmother to the Ravenous

features.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,10 @@ var featuresCommand = cli.Command{
9393
feat.Annotations[runcfeatures.AnnotationLibseccompVersion] = fmt.Sprintf("%d.%d.%d", major, minor, patch)
9494
}
9595

96+
if v := pathrsVersionString(); v != "" {
97+
feat.Annotations[runcfeatures.AnnotationLibpathrsVersion] = v
98+
}
99+
96100
enc := json.NewEncoder(context.App.Writer)
97101
enc.SetIndent("", " ")
98102
return enc.Encode(feat)

features_libpathrs.go

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
//go:build libpathrs
2+
3+
package main
4+
5+
import (
6+
"cyphar.com/go-pathrs"
7+
)
8+
9+
func pathrsVersionString() string {
10+
info, err := pathrs.LibraryVersion()
11+
if err != nil {
12+
panic(err) // should never happen
13+
}
14+
return info.VersionString
15+
}

features_pathrslite.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
//go:build !libpathrs
2+
3+
package main
4+
5+
func pathrsVersionString() string {
6+
return ""
7+
}

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@ module github.com/opencontainers/runc
33
go 1.24.0
44

55
require (
6+
cyphar.com/go-pathrs v0.2.5
67
github.com/checkpoint-restore/go-criu/v7 v7.2.0
78
github.com/containerd/console v1.0.5
89
github.com/coreos/go-systemd/v22 v22.7.0
9-
github.com/cyphar/filepath-securejoin v0.6.1
10+
github.com/cyphar/filepath-securejoin v0.7.0
1011
github.com/docker/go-units v0.5.0
1112
github.com/godbus/dbus/v5 v5.1.0
1213
github.com/moby/sys/capability v0.4.0
@@ -28,7 +29,6 @@ require (
2829
)
2930

3031
require (
31-
cyphar.com/go-pathrs v0.2.4 // indirect
3232
github.com/cilium/ebpf v0.17.3 // indirect
3333
github.com/cpuguy83/go-md2man/v2 v2.0.7 // indirect
3434
github.com/russross/blackfriday/v2 v2.1.0 // indirect

go.sum

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
cyphar.com/go-pathrs v0.2.4 h1:iD/mge36swa1UFKdINkr1Frkpp6wZsy3YYEildj9cLY=
2-
cyphar.com/go-pathrs v0.2.4/go.mod h1:y8f1EMG7r+hCuFf/rXsKqMJrJAUoADZGNh5/vZPKcGc=
1+
cyphar.com/go-pathrs v0.2.5 h1:SnX9FBvnoyn3lUs1dkMgZ52bAETpirNu3FTRh5HlRik=
2+
cyphar.com/go-pathrs v0.2.5/go.mod h1:y8f1EMG7r+hCuFf/rXsKqMJrJAUoADZGNh5/vZPKcGc=
33
github.com/BurntSushi/toml v1.5.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho=
44
github.com/checkpoint-restore/go-criu/v7 v7.2.0 h1:qGiWA4App1gGlEfIJ68WR9jbezV9J7yZdjzglezcqKo=
55
github.com/checkpoint-restore/go-criu/v7 v7.2.0/go.mod h1:u0LCWLg0w4yqqu14aXhiB4YD3a1qd8EcCEg7vda5dwo=
@@ -11,8 +11,8 @@ github.com/coreos/go-systemd/v22 v22.7.0 h1:LAEzFkke61DFROc7zNLX/WA2i5J8gYqe0rSj
1111
github.com/coreos/go-systemd/v22 v22.7.0/go.mod h1:xNUYtjHu2EDXbsxz1i41wouACIwT7Ybq9o0BQhMwD0w=
1212
github.com/cpuguy83/go-md2man/v2 v2.0.7 h1:zbFlGlXEAKlwXpmvle3d8Oe3YnkKIK4xSRTd3sHPnBo=
1313
github.com/cpuguy83/go-md2man/v2 v2.0.7/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g=
14-
github.com/cyphar/filepath-securejoin v0.6.1 h1:5CeZ1jPXEiYt3+Z6zqprSAgSWiggmpVyciv8syjIpVE=
15-
github.com/cyphar/filepath-securejoin v0.6.1/go.mod h1:A8hd4EnAeyujCJRrICiOWqjS1AX0a9kM5XL+NwKoYSc=
14+
github.com/cyphar/filepath-securejoin v0.7.0 h1:s0Y3ITPy6sQn5xt54DuYvTF8hu134ooYLUb58DX/HjE=
15+
github.com/cyphar/filepath-securejoin v0.7.0/go.mod h1:ymLGms/u3BYaviIiuKFnUx8EkQEZeK6cInNoAPJA3o4=
1616
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
1717
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
1818
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=

main.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ func printVersion(c *cli.Context) {
4848
if major+minor+micro > 0 {
4949
fmt.Fprintf(w, "libseccomp: %d.%d.%d\n", major, minor, micro)
5050
}
51+
52+
if v := pathrsVersionString(); v != "" {
53+
fmt.Fprintf(w, "libpathrs: %s\n", v)
54+
}
5155
}
5256

5357
const (

types/features/features.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,7 @@ const (
2222
// AnnotationLibseccompVersion is the version of libseccomp, e.g., "2.5.1".
2323
// Note that the runtime MAY support seccomp even when this annotation is not present.
2424
AnnotationLibseccompVersion = "io.github.seccomp.libseccomp.version"
25+
26+
// AnnotationLibpathrsVersion is the runtime version of libpathrs.
27+
AnnotationLibpathrsVersion = "com.cyphar.pathrs.libpathrs.version"
2528
)

vendor/cyphar.com/go-pathrs/handle_linux.go

Lines changed: 5 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/cyphar.com/go-pathrs/internal/libpathrs/libpathrs_linux.go

Lines changed: 52 additions & 24 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)