From e4f99b5c95b8f49434452edff82e73547c7a8252 Mon Sep 17 00:00:00 2001 From: Aleksa Sarai Date: Fri, 3 Oct 2025 16:24:18 +1000 Subject: [PATCH] libcontainer: remove deprecated package "userns" This package was marked deprecated in commit 9b60a93cf33c ("libcontainer/userns: migrate to github.com/moby/sys/userns"), which was included in runc 1.2. Users have thus had a year to migrate to github.com/moby/sys/userns and it's okay for us to remove this wrapper package. Signed-off-by: Aleksa Sarai --- CHANGELOG.md | 4 ++++ libcontainer/userns/userns_deprecated.go | 15 --------------- 2 files changed, 4 insertions(+), 15 deletions(-) delete mode 100644 libcontainer/userns/userns_deprecated.go diff --git a/CHANGELOG.md b/CHANGELOG.md index eb5cae31a..1aeb57e38 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### libcontainer API +- The deprecated `libcontainer/userns` package has been removed; use + `github.com/moby/sys/userns` instead. + ## [1.4.0-rc.1] - 2025-09-05 > おめェもボスになったんだろぉ? diff --git a/libcontainer/userns/userns_deprecated.go b/libcontainer/userns/userns_deprecated.go deleted file mode 100644 index 4d328d0f2..000000000 --- a/libcontainer/userns/userns_deprecated.go +++ /dev/null @@ -1,15 +0,0 @@ -// Package userns provides tools for dealing with user namespaces. -// -// Deprecated: use github.com/moby/sys/userns -package userns - -import "github.com/moby/sys/userns" - -// RunningInUserNS detects whether we are currently running in a Linux -// user namespace and memoizes the result. It returns false on non-Linux -// platforms. -// -// Deprecated: use [userns.RunningInUserNS]. -func RunningInUserNS() bool { - return userns.RunningInUserNS() -}