Skip to content

[1.4] *: libpathrs cherry-picks#5167

Merged
kolyshkin merged 6 commits intoopencontainers:release-1.4from
cyphar:1.4-libpathrs-cherry-pick
Mar 12, 2026
Merged

[1.4] *: libpathrs cherry-picks#5167
kolyshkin merged 6 commits intoopencontainers:release-1.4from
cyphar:1.4-libpathrs-cherry-pick

Conversation

@cyphar
Copy link
Copy Markdown
Member

@cyphar cyphar commented Mar 12, 2026

This is a partial cherry-pick of some patches in #5103 in order to make future cherry-picks a little easier as well as adding documentation about the opt-in libpathrs build tag.

cyphar added 6 commits March 12, 2026 19:00
Debian 13 (trixie) was released a few months ago and it's probably
prudent to just upgrade. This is also necessary to get access to riscv64
repositories when we build libpathrs for inclusion in our runc binaries.

Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
(cherry picked from commit 6b757b6)
Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
The intention of commit 531e29e ("script/lib.sh: set GOARM=5 for
armel, GOARM=6 for armhf") was to properly support older ARM platforms
with our release builds.

However, we have never been able to support ARMv6 for our builds because
we use the Debian compiler to build the libseccomp we statically compile
into our binaries and (as per the now-deleted comment itself) Debian
treats armhf as being ARMv7 so the final binaries we produced were
always only ever compatible with ARMv7+.

This was a bit of an oddity before but when building libpathrs for
releases we will need to use Rust which makes the target more explicit
(and while it does support armhf, we are using the Debian-packaged Rust
cross-compiler and thus are in the same dilemma with what Debian
considers "armhf" to be).

All-in-all, it's better to just bite the bullet and just follow Debian
here properly.

Fixes: 531e29e ("script/lib.sh: set GOARM=5 for armel, GOARM=6 for armhf")
Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
(cherry picked from commit 51ae8de)
Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
In a future patch this will contain other cdylibs so it deserves a
slightly more general name.

Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
(cherry picked from commit 8292574)
Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
This name is far more descriptive.

Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
(cherry picked from commit b1a9047)
Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
Ever since v0.6.0 of github.com/cyphar/filepath-securejoin, pathrs-lite
has been able to transparently switch to using libpathrs as the backend
for safe path resolution (at compile-time, using a build tag). Note that
because build-tags apply globally, this allows for us to easily opt
pure-Go dependencies into all using libpathrs as well for our binaries.

In a future patch this will likely be enabled by default, but document
that this is an option for downstreams that want to opt-in to using
libpathrs.

Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
(cherry picked from commit ab6f75d)
Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
This includes a few fixes for 32-bit builds.

Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
(cherry picked from commit b58e342)
Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
@cyphar cyphar added this to the 1.4.1 milestone Mar 12, 2026
@cyphar cyphar mentioned this pull request Mar 12, 2026
@cyphar cyphar added the backport/1.4-pr A backport PR to release-1.4 label Mar 12, 2026
Copy link
Copy Markdown
Member

@rata rata left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

I don't have an opinion if this should be in 1.4.1 or 1.4.2, I'm fine either way. I'd just like to get 1.4.1 and 1.5.0-rc.1 out ASAP :)

If this is just to simplify cherry-picks, I think even if we merge it after 1.4.1, the branch will have it and cherry-picks will simple anyways.

@cyphar
Copy link
Copy Markdown
Member Author

cyphar commented Mar 12, 2026

Good point, I should make a milestone for 1.4.2...

@cyphar cyphar modified the milestones: 1.4.1, 1.4.2 Mar 12, 2026
Unfortunately, this has effectively always been broken (because we
cross-compile `libseccomp` within a Debian container and statically link to
it) and so we are now officially matching [the Debian definition of `armhf`][debian-armhf]
(that is, ARMv7). (#5103)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
(that is, ARMv7). (#5103)
(that is, ARMv7). (#5167, #5103)

Copy link
Copy Markdown
Contributor

@kolyshkin kolyshkin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM except for a single changelog nit. Can make it into 1.4.1 I guess.

@kolyshkin
Copy link
Copy Markdown
Contributor

Merging this as is.

@kolyshkin kolyshkin merged commit 1a6e2e6 into opencontainers:release-1.4 Mar 12, 2026
41 checks passed
@kolyshkin kolyshkin modified the milestones: 1.4.2, 1.4.1 Mar 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport/1.4-pr A backport PR to release-1.4

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants