public inbox for buildbot@sourceware.org
 help / color / mirror / Atom feed
From: Mark Wielaard <mark@klomp.org>
To: "Martin Liška" <mliska@suse.cz>
Cc: buildbot@sourceware.org
Subject: Re: [RFC,PATCH] containers: extract bb-start.sh to a file and reuse it
Date: Sat, 18 Jun 2022 22:11:41 +0200	[thread overview]
Message-ID: <Yq4xfSTSLr5Hwybr@wildebeest.org> (raw)
In-Reply-To: <90c38f7f-0244-fc5d-85a5-8adab72023a9@suse.cz>

[-- Attachment #1: Type: text/plain, Size: 901 bytes --]

Hi Martin,

On Sat, Jun 18, 2022 at 08:35:06PM +0200, Martin Liška wrote:
> > I like this. But we cannot simply COPY in the bb-start.sh file.
> > Because it isn't available on the container host. The
> > DockerLatentWorker only sents the Container file. But we could fetch
> > it from the git repo using:
> > 
> > RUN wget -O /home/builder/bb-start.sh \
> >     'https://sourceware.org/git/?p=builder.git;a=blob_plain;f=builder/containers/bb-start.sh' \
> >     && chmod 755 /home/builder/bb-start.sh
> 
> Good, I've done that and pushed to main.
> 
> However, I see an error now:
> https://builder.sourceware.org/buildbot/#/builders/97/builds/248
> 
> Can you please check buildbot master log files in order to investigate what's wrong?

The issue was that there were now both a RUN wget && chmod and a COPY
in the Container files. Removing the COPY seems to have made it work again.

Cheers,

Mark

[-- Attachment #2: 0001-Containerfiles-Just-RUN-wget-chmod-don-t-also-COPY-b.patch --]
[-- Type: text/x-diff, Size: 3985 bytes --]

From 35bafdb6c93177ca33ef99b394b0207b14334da9 Mon Sep 17 00:00:00 2001
From: Mark Wielaard <mark@klomp.org>
Date: Sat, 18 Jun 2022 21:32:25 +0200
Subject: [PATCH] Containerfiles: Just RUN wget && chmod, don't also COPY
 bb-start.sh

---
 builder/containers/Containerfile-debian-stable       | 3 ++-
 builder/containers/Containerfile-fedora-latest       | 3 ++-
 builder/containers/Containerfile-opensuse-leap       | 3 ++-
 builder/containers/Containerfile-opensuse-tumbleweed | 3 ++-
 4 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/builder/containers/Containerfile-debian-stable b/builder/containers/Containerfile-debian-stable
index 6776c3b..d69f725 100644
--- a/builder/containers/Containerfile-debian-stable
+++ b/builder/containers/Containerfile-debian-stable
@@ -22,13 +22,14 @@ RUN apt-get update && \
 # Setup user with same id as host user id.
 RUN adduser --home /home/builder --uid 1001 builder
 
+# Set image specific environment variables used by bb-start.sh
 ENV IMAGE_NAME=debian-stable
 ENV CCACHE_LIBDIR=/usr/lib/ccache
 
+# Put bb-start.sh script in homedir and make it executable
 RUN wget -O /home/builder/bb-start.sh \
     'https://sourceware.org/git/?p=builder.git;a=blob_plain;f=builder/containers/bb-start.sh' \
     && chmod 755 /home/builder/bb-start.sh
-COPY bb-start.sh /home/builder/bb-start.sh
 
 # And now run the script
 USER builder
diff --git a/builder/containers/Containerfile-fedora-latest b/builder/containers/Containerfile-fedora-latest
index 556a959..057f27d 100644
--- a/builder/containers/Containerfile-fedora-latest
+++ b/builder/containers/Containerfile-fedora-latest
@@ -19,13 +19,14 @@ RUN dnf upgrade -y && \
 # Setup user with same id as host user id.
 RUN adduser -u 1001 -U -d /home/builder -m builder
 
+# Set image specific environment variables used by bb-start.sh
 ENV IMAGE_NAME=fedora-latest
 ENV CCACHE_LIBDIR=/usr/lib64/ccache
 
+# Put bb-start.sh script in homedir and make it executable
 RUN wget -O /home/builder/bb-start.sh \
     'https://sourceware.org/git/?p=builder.git;a=blob_plain;f=builder/containers/bb-start.sh' \
     && chmod 755 /home/builder/bb-start.sh
-COPY bb-start.sh /home/builder/bb-start.sh
 
 # And now run the script
 USER builder
diff --git a/builder/containers/Containerfile-opensuse-leap b/builder/containers/Containerfile-opensuse-leap
index 4e88f8c..6299e9b 100644
--- a/builder/containers/Containerfile-opensuse-leap
+++ b/builder/containers/Containerfile-opensuse-leap
@@ -25,13 +25,14 @@ RUN pip install buildbot-worker
 # Setup user with same id as host user id.
 RUN useradd -u 1001 -U -d /home/builder -m builder
 
+# Set image specific environment variables used by bb-start.sh
 ENV IMAGE_NAME=opensuse-leap
 ENV CCACHE_LIBDIR=/usr/lib64/ccache
 
+# Put bb-start.sh script in homedir and make it executable
 RUN wget -O /home/builder/bb-start.sh \
     'https://sourceware.org/git/?p=builder.git;a=blob_plain;f=builder/containers/bb-start.sh' \
     && chmod 755 /home/builder/bb-start.sh
-COPY bb-start.sh /home/builder/bb-start.sh
 
 # And now run the script
 USER builder
diff --git a/builder/containers/Containerfile-opensuse-tumbleweed b/builder/containers/Containerfile-opensuse-tumbleweed
index 002291a..d574767 100644
--- a/builder/containers/Containerfile-opensuse-tumbleweed
+++ b/builder/containers/Containerfile-opensuse-tumbleweed
@@ -21,13 +21,14 @@ RUN pip install buildbot-worker
 # Setup user with same id as host user id.
 RUN useradd -u 1001 -U -d /home/builder -m builder
 
+# Set image specific environment variables used by bb-start.sh
 ENV IMAGE_NAME=opensuse-tumbleweed
 ENV CCACHE_LIBDIR=/usr/lib64/ccache
 
+# Put bb-start.sh script in homedir and make it executable
 RUN wget -O /home/builder/bb-start.sh \
     'https://sourceware.org/git/?p=builder.git;a=blob_plain;f=builder/containers/bb-start.sh' \
     && chmod 755 /home/builder/bb-start.sh
-COPY bb-start.sh /home/builder/bb-start.sh
 
 # And now run the script
 USER builder
-- 
2.30.2


  parent reply	other threads:[~2022-06-18 20:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-17  9:17 Martin Liška
2022-06-18 15:47 ` Mark Wielaard
2022-06-18 18:35   ` Martin Liška
2022-06-18 18:38     ` Martin Liška
2022-06-18 20:11     ` Mark Wielaard [this message]
2022-06-19  7:12       ` Martin Liška

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=Yq4xfSTSLr5Hwybr@wildebeest.org \
    --to=mark@klomp.org \
    --cc=buildbot@sourceware.org \
    --cc=mliska@suse.cz \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).