Tarantool development patches archive
 help / color / mirror / Atom feed
From: Sergey Bronnikov via Tarantool-patches <tarantool-patches@dev.tarantool.org>
To: Alexander Turenko <alexander.turenko@tarantool.org>,
	Sergey Kaplun <skaplun@tarantool.org>
Cc: tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [PATCH 1/2] ci: use sudo to install packages if not root
Date: Fri, 2 Oct 2026 16:18:36 +0300	[thread overview]
Message-ID: <a7a7ec87-8ba9-459b-afb7-051e0275542d@tarantool.org> (raw)
In-Reply-To: <8b3a9c3bc1cae8b15954e8925fba9d751a4f051d.1790815412.git.alexander.turenko@tarantool.org>

Hi, Alexander!

thanks for the patch! LGTM

Sergey

On 10/1/26 04:06, Alexander Turenko wrote:
> The setup-linux and setup-debuggers actions call `apt` without `sudo`,
> which works on our self-hosted runners: the jobs run there as root. The
> next commit moves the ARM64 jobs to GitHub-hosted runners, where the
> steps run as the runner's regular user, so we have to call `sudo` there.
>
> If the current user is already `root`, `sudo` is not called: this way we
> don't depend on its presence when we don't need it.
>
> Drafted by an LLM, conducted and corrected by the commit author.
> ---
>   .github/actions/setup-debuggers/action.yml | 6 ++++--
>   .github/actions/setup-linux/action.yml     | 6 ++++--
>   2 files changed, 8 insertions(+), 4 deletions(-)
>
> diff --git a/.github/actions/setup-debuggers/action.yml b/.github/actions/setup-debuggers/action.yml
> index c34d4502..e2ac09db 100644
> --- a/.github/actions/setup-debuggers/action.yml
> +++ b/.github/actions/setup-debuggers/action.yml
> @@ -7,6 +7,8 @@ runs:
>         uses: ./.github/actions/setup-linux
>       - name: Install dependencies for the tests
>         run: |
> -        apt -y update
> -        apt install -y python3 gdb lldb
> +        # GitHub-hosted runners run the steps as a regular user.
> +        SUDO=$([ "$(id -u)" = 0 ] || echo sudo)
> +        ${SUDO} apt -y update
> +        ${SUDO} apt install -y python3 gdb lldb
>         shell: bash
> diff --git a/.github/actions/setup-linux/action.yml b/.github/actions/setup-linux/action.yml
> index f0171b83..8f13940a 100644
> --- a/.github/actions/setup-linux/action.yml
> +++ b/.github/actions/setup-linux/action.yml
> @@ -14,6 +14,8 @@ runs:
>         shell: bash
>       - name: Install build and test dependencies
>         run: |
> -        apt -y update
> -        apt -y install cmake gcc make ninja-build perl
> +        # GitHub-hosted runners run the steps as a regular user.
> +        SUDO=$([ "$(id -u)" = 0 ] || echo sudo)
> +        ${SUDO} apt -y update
> +        ${SUDO} apt -y install cmake gcc make ninja-build perl
>         shell: bash

  reply	other threads:[~2026-10-02 13:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-01  1:06 [Tarantool-patches] [PATCH 0/2] Use GitHub-hosted runners for Linux/ARM64 jobs Alexander Turenko via Tarantool-patches
2026-10-01  1:06 ` [Tarantool-patches] [PATCH 1/2] ci: use sudo to install packages if not root Alexander Turenko via Tarantool-patches
2026-10-02 13:18   ` Sergey Bronnikov via Tarantool-patches [this message]
2026-10-01  1:06 ` [Tarantool-patches] [PATCH 2/2] ci: run ARM64 jobs on GitHub-hosted runners Alexander Turenko via Tarantool-patches
2026-10-02 13:24   ` Sergey Bronnikov via Tarantool-patches

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a7a7ec87-8ba9-459b-afb7-051e0275542d@tarantool.org \
    --to=tarantool-patches@dev.tarantool.org \
    --cc=alexander.turenko@tarantool.org \
    --cc=sergeyb@tarantool.org \
    --cc=skaplun@tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH 1/2] ci: use sudo to install packages if not root' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox