Skip to content

Commit 559ada5

Browse files
dmitshurgopherbot
authored andcommitted
env/linux-x86-sid: add a Python 3 dependency
Needed for LUCI, and not implicitly installed. Though it turned out that the python3 package on sid gets Python 3.13, and the latest swarming bot version wasn't compatible with it, so use the python3.12 package for now. Drop the 'mkdir --mode=0700 /run/sshd' call, SSH still works without it and so it doesn't seem to be needed anymore. Keeping it can result in a different error: Step 6/9 : RUN mkdir --mode=0700 /run/sshd ---> Running in 47cf43748881 mkdir: cannot create directory '/run/sshd': File exists The command '/bin/sh -c mkdir --mode=0700 /run/sshd' returned a non-zero code: 1 Install nano for minimal interactive debugging convenience while here. For golang/go#61112. Change-Id: I9ce538a9fe47d25988bddf879802ebe806b7eaff Reviewed-on: https://go-review.googlesource.com/c/build/+/665016 LUCI-TryBot-Result: Go LUCI <[email protected]> Auto-Submit: Dmitri Shuralyov <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]> Reviewed-by: Michael Pratt <[email protected]>
1 parent 1efec10 commit 559ada5

File tree

3 files changed

+28
-2
lines changed

3 files changed

+28
-2
lines changed

env/linux-x86-bookworm/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ ENV DEBIAN_FRONTEND noninteractive
5252
# lsof: misc basic tool
5353
# make: used for setting up benchmarks in the x/benchmark builders
5454
# mercurial: mercurial VCS supported by cmd/go
55+
# nano: for interactive debugging convenience
5556
# netbase: for net package tests, issue 42750
5657
# patch: used for building some benchmarks
5758
# procps: misc basic tool

env/linux-x86-bullseye/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ ENV DEBIAN_FRONTEND noninteractive
2626
# lsof: misc basic tool
2727
# make: used for setting up benchmarks in the x/benchmark builders
2828
# mercurial: mercurial VCS supported by cmd/go
29+
# nano: for interactive debugging convenience
2930
# netbase: for net package tests, issue 42750
3031
# patch: used for building some benchmarks
3132
# procps: misc basic tool

env/linux-x86-sid/Dockerfile

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ ENV DEBIAN_FRONTEND noninteractive
1818
# libgles2-mesa-dev libopenal-dev fonts-droid-fallback: required by x/mobile repo
1919
# upx: executable compressor, needed to test for go binaries compatibility
2020
# qemu-user: QEMU (machine emulator and virtualizer) user-space emulation
21+
# python3.12: for bootstrapswarm
22+
# nano: for interactive debugging convenience
2123
RUN apt-get update && apt-get install -y \
2224
--no-install-recommends \
2325
libcrypt1 \
@@ -44,10 +46,32 @@ RUN apt-get update && apt-get install -y \
4446
make \
4547
sudo \
4648
iproute2 \
49+
python3.12 \
50+
nano \
4751
&& rm -rf /var/lib/apt/lists/*
4852

49-
# Otherwise we get "Missing privilege separation directory: /run/sshd" ...
50-
RUN mkdir --mode=0700 /run/sshd
53+
# bootstrapswarming requires a 'python3' binary in PATH, so add one that points to the python3.12 installed above.
54+
#
55+
# Note: python3.12 is installed because python3 gets python 3.13, and as of 2025-04-16 swarming bot wasn't compatible
56+
# with it due to reliance on a deprecated 'pipes' module:
57+
#
58+
# 2025-04-16 00:10:05.187 E: Failed to run start_bot
59+
# Traceback (most recent call last):
60+
# File "/home/swarming/.swarming/swarming_bot.1.zip/__main__.py", line 324, in main
61+
# return fn(args)
62+
# File "/home/swarming/.swarming/swarming_bot.1.zip/__main__.py", line 194, in CMDstart_bot
63+
# from bot_code import bot_main
64+
# File "/home/swarming/.swarming/swarming_bot.1.zip/bot_code/bot_main.py", line 47, in <module>
65+
# from api import bot
66+
# File "/home/swarming/.swarming/swarming_bot.1.zip/api/bot.py", line 20, in <module>
67+
# from api import os_utilities
68+
# File "/home/swarming/.swarming/swarming_bot.1.zip/api/os_utilities.py", line 24, in <module>
69+
# import pipes
70+
# ModuleNotFoundError: No module named 'pipes'
71+
#
72+
# Once swarming bot is updated to be compatible with the latest python3 version, this can be removed
73+
# and the python3 package can be installed.
74+
RUN ln -s /usr/bin/python3.12 /usr/local/bin/python3
5175

5276
RUN mkdir -p /go1.4-amd64 \
5377
&& ( \

0 commit comments

Comments
 (0)