From 6f3e554a9481614cbda3c12d41c59a7f4f12f196 Mon Sep 17 00:00:00 2001 From: Tonis Tiigi Date: Tue, 18 Mar 2025 10:48:34 -0700 Subject: [PATCH] copy: support for linux X mode Signed-off-by: Tonis Tiigi --- copy/copy_unix_test.go | 2 ++ go.mod | 2 +- go.sum | 4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/copy/copy_unix_test.go b/copy/copy_unix_test.go index 071fa0a4..0585950f 100644 --- a/copy/copy_unix_test.go +++ b/copy/copy_unix_test.go @@ -124,6 +124,8 @@ func TestCopyModeTextFormat(t *testing.T) { {"remove execute for all", "a-x", 0644, 0644, 0640, 0600}, {"remove others and add execute for group", "o-rwx,g+x", 0650, 0750, 0750, 0710}, {"capital X (apply execute only if directory)", "a+X", 0644, 0755, 0751, 0711}, + {"capital u-go X (apply execute only if directory)", "u=rwX,go=rX", 0644, 0755, 0755, 0755}, + {"capital u-go X (apply execute only if directory)", "u=rX,go=r", 0444, 0544, 0544, 0544}, {"remove execute and add write for user", "u-x,u+w", 0644, 0655, 0650, 0600}, {"add execute for user and others", "u+x,o+x", 0745, 0755, 0751, 0701}, {"add write and read for group and others", "g+rw,o+rw", 0666, 0777, 0776, 0766}, diff --git a/go.mod b/go.mod index f7865811..4265dfbc 100644 --- a/go.mod +++ b/go.mod @@ -10,7 +10,7 @@ require ( github.com/pkg/errors v0.9.1 github.com/planetscale/vtprotobuf v0.6.0 github.com/stretchr/testify v1.8.4 - github.com/tonistiigi/dchapes-mode v0.0.0-20241001053921-ca0759fec205 + github.com/tonistiigi/dchapes-mode v0.0.0-20250318174251-73d941a28323 golang.org/x/sync v0.1.0 golang.org/x/sys v0.11.0 google.golang.org/protobuf v1.31.0 diff --git a/go.sum b/go.sum index b4edbafe..207e72bf 100644 --- a/go.sum +++ b/go.sum @@ -28,8 +28,8 @@ github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/tonistiigi/dchapes-mode v0.0.0-20241001053921-ca0759fec205 h1:eUk79E1w8yMtXeHSzjKorxuC8qJOnyXQnLaJehxpJaI= -github.com/tonistiigi/dchapes-mode v0.0.0-20241001053921-ca0759fec205/go.mod h1:3Iuxbr0P7D3zUzBMAZB+ois3h/et0shEz0qApgHYGpY= +github.com/tonistiigi/dchapes-mode v0.0.0-20250318174251-73d941a28323 h1:r0p7fK56l8WPequOaR3i9LBqfPtEdXIQbUTzT55iqT4= +github.com/tonistiigi/dchapes-mode v0.0.0-20250318174251-73d941a28323/go.mod h1:3Iuxbr0P7D3zUzBMAZB+ois3h/et0shEz0qApgHYGpY= golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=