diff mbox series

[08/12] ci: make Perforce binaries executable for all users

Message ID 22f86f8ccb9f3fb7f98ff57ddd09724fc9e44628.1712235356.git.ps@pks.im (mailing list archive)
State Superseded
Headers show
Series t: exercise Git/JGit reftable compatibility | expand

Commit Message

Patrick Steinhardt April 4, 2024, 1:25 p.m. UTC
The Perforce binaries are only made executable for the current user. On
GitLab CI though we execute tests as a different user than "root", and
thus these binaries may not be executable by that test user.

Fix the setup so that we set the executable bits for all users.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
---
 ci/install-dependencies.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Josh Steadmon April 5, 2024, 8:01 p.m. UTC | #1
On 2024.04.04 15:25, Patrick Steinhardt wrote:
> The Perforce binaries are only made executable for the current user. On
> GitLab CI though we execute tests as a different user than "root", and
> thus these binaries may not be executable by that test user.
> 
> Fix the setup so that we set the executable bits for all users.
> 
> Signed-off-by: Patrick Steinhardt <ps@pks.im>
> ---
>  ci/install-dependencies.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/ci/install-dependencies.sh b/ci/install-dependencies.sh
> index f4eb125fd2..068c478025 100755
> --- a/ci/install-dependencies.sh
> +++ b/ci/install-dependencies.sh
> @@ -47,7 +47,7 @@ ubuntu-*)
>  	mkdir --parents "$CUSTOM_PATH"
>  	wget --quiet --directory-prefix="$CUSTOM_PATH" \
>  		"$P4WHENCE/bin.linux26x86_64/p4d" "$P4WHENCE/bin.linux26x86_64/p4"
> -	chmod u+x "$CUSTOM_PATH/p4d" "$CUSTOM_PATH/p4"
> +	chmod a+x "$CUSTOM_PATH/p4d" "$CUSTOM_PATH/p4"
>  
>  	wget --quiet "$LFSWHENCE/git-lfs-linux-amd64-$LINUX_GIT_LFS_VERSION.tar.gz"
>  	tar -xzf "git-lfs-linux-amd64-$LINUX_GIT_LFS_VERSION.tar.gz" -C "$CUSTOM_PATH" --strip-components=1 "git-lfs-$LINUX_GIT_LFS_VERSION/git-lfs"
> -- 
> 2.44.GIT
> 

Do we break CI in patch 6 and 7 until we get this fix? Perhaps we should
just squash this into patch 6?
Patrick Steinhardt April 8, 2024, 5:48 a.m. UTC | #2
On Fri, Apr 05, 2024 at 01:01:52PM -0700, Josh Steadmon wrote:
> On 2024.04.04 15:25, Patrick Steinhardt wrote:
> > The Perforce binaries are only made executable for the current user. On
> > GitLab CI though we execute tests as a different user than "root", and
> > thus these binaries may not be executable by that test user.
> > 
> > Fix the setup so that we set the executable bits for all users.
> > 
> > Signed-off-by: Patrick Steinhardt <ps@pks.im>
> > ---
> >  ci/install-dependencies.sh | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/ci/install-dependencies.sh b/ci/install-dependencies.sh
> > index f4eb125fd2..068c478025 100755
> > --- a/ci/install-dependencies.sh
> > +++ b/ci/install-dependencies.sh
> > @@ -47,7 +47,7 @@ ubuntu-*)
> >  	mkdir --parents "$CUSTOM_PATH"
> >  	wget --quiet --directory-prefix="$CUSTOM_PATH" \
> >  		"$P4WHENCE/bin.linux26x86_64/p4d" "$P4WHENCE/bin.linux26x86_64/p4"
> > -	chmod u+x "$CUSTOM_PATH/p4d" "$CUSTOM_PATH/p4"
> > +	chmod a+x "$CUSTOM_PATH/p4d" "$CUSTOM_PATH/p4"
> >  
> >  	wget --quiet "$LFSWHENCE/git-lfs-linux-amd64-$LINUX_GIT_LFS_VERSION.tar.gz"
> >  	tar -xzf "git-lfs-linux-amd64-$LINUX_GIT_LFS_VERSION.tar.gz" -C "$CUSTOM_PATH" --strip-components=1 "git-lfs-$LINUX_GIT_LFS_VERSION/git-lfs"
> > -- 
> > 2.44.GIT
> > 
> 
> Do we break CI in patch 6 and 7 until we get this fix? Perhaps we should
> just squash this into patch 6?

No, this was broken before already as we had the same "chmod u+x" even
without this patch series. This doesn't lead to a broken CI system
though as Perforce is an optional dependency. Instead it causes us to
skip all Perforce tests because we won't be able to look up these
binaries via PATH.

I'll try to clarify the commit message.

Patrick
diff mbox series

Patch

diff --git a/ci/install-dependencies.sh b/ci/install-dependencies.sh
index f4eb125fd2..068c478025 100755
--- a/ci/install-dependencies.sh
+++ b/ci/install-dependencies.sh
@@ -47,7 +47,7 @@  ubuntu-*)
 	mkdir --parents "$CUSTOM_PATH"
 	wget --quiet --directory-prefix="$CUSTOM_PATH" \
 		"$P4WHENCE/bin.linux26x86_64/p4d" "$P4WHENCE/bin.linux26x86_64/p4"
-	chmod u+x "$CUSTOM_PATH/p4d" "$CUSTOM_PATH/p4"
+	chmod a+x "$CUSTOM_PATH/p4d" "$CUSTOM_PATH/p4"
 
 	wget --quiet "$LFSWHENCE/git-lfs-linux-amd64-$LINUX_GIT_LFS_VERSION.tar.gz"
 	tar -xzf "git-lfs-linux-amd64-$LINUX_GIT_LFS_VERSION.tar.gz" -C "$CUSTOM_PATH" --strip-components=1 "git-lfs-$LINUX_GIT_LFS_VERSION/git-lfs"