From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gnu.wildebeest.org (gnu.wildebeest.org [45.83.234.184]) by sourceware.org (Postfix) with ESMTPS id 4B3E33857BAD for ; Sat, 18 Jun 2022 20:11:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 4B3E33857BAD Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=klomp.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=klomp.org Received: from reform (deer0x09.wildebeest.org [172.31.17.139]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by gnu.wildebeest.org (Postfix) with ESMTPSA id 3C429302FB88; Sat, 18 Jun 2022 22:11:42 +0200 (CEST) Received: by reform (Postfix, from userid 1000) id 678E72E81645; Sat, 18 Jun 2022 22:11:41 +0200 (CEST) Date: Sat, 18 Jun 2022 22:11:41 +0200 From: Mark Wielaard To: Martin =?utf-8?B?TGnFoWth?= Cc: buildbot@sourceware.org Subject: Re: [RFC,PATCH] containers: extract bb-start.sh to a file and reuse it Message-ID: References: <90c38f7f-0244-fc5d-85a5-8adab72023a9@suse.cz> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="4RfKMq0bEI4Edift" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <90c38f7f-0244-fc5d-85a5-8adab72023a9@suse.cz> X-Spam-Status: No, score=-11.5 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: buildbot@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "The https://builder.sourceware.org/ buildbot" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Jun 2022 20:11:48 -0000 --4RfKMq0bEI4Edift Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit 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 --4RfKMq0bEI4Edift Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="0001-Containerfiles-Just-RUN-wget-chmod-don-t-also-COPY-b.patch" >From 35bafdb6c93177ca33ef99b394b0207b14334da9 Mon Sep 17 00:00:00 2001 From: Mark Wielaard 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 --4RfKMq0bEI4Edift--