Skip to content

Commit

Permalink
Merge pull request #27 from bobuhiro11/fix_busybox
Browse files Browse the repository at this point in the history
Bump Go version to 1.22.6 to build sshd binary.
  • Loading branch information
bobuhiro11 authored Aug 13, 2024
2 parents beae5be + 1e12948 commit bad3728
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 6 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
*.o
*.ko
*.order
!go.mod
Module.symvers
busybox-*
linux-*
Expand Down
5 changes: 2 additions & 3 deletions busybox/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,8 @@ root.img: .config busybox.tar.bz2 inittab passwd rcS sshd
sshd:/bin/sshd \

sshd: sshd.go
sudo docker run --rm -v $(CWD):/tmp buildenv-busybox \
/bin/bash -c "cd /tmp; \
go get github.com/kr/pty golang.org/x/crypto/ssh; \
sudo docker run --rm -v $(CWD):/tmp/build buildenv-busybox \
/bin/bash -c "cd /tmp/build; \
go build -a -ldflags '-extldflags \"-static\"' sshd.go"

busybox.tar.bz2:
Expand Down
10 changes: 10 additions & 0 deletions busybox/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module bobuhiro11.net/busybox

go 1.22.6

require (
github.com/creack/pty v1.1.7 // indirect
github.com/kr/pty v1.1.8 // indirect
golang.org/x/crypto v0.26.0 // indirect
golang.org/x/sys v0.23.0 // indirect
)
8 changes: 8 additions & 0 deletions busybox/go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
github.com/creack/pty v1.1.7 h1:6pwm8kMQKCmgUg0ZHTm5+/YvRK0s3THD/28+T6/kk4A=
github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY=
github.com/kr/pty v1.1.8 h1:AkaSdXYQOWeaO3neb8EM634ahkXXe3jYbVh/F9lq+GI=
github.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw=
golang.org/x/crypto v0.26.0 h1:RrRspgV4mU+YwB4FYnuBoKsUapNIL5cohGAmSH3azsw=
golang.org/x/crypto v0.26.0/go.mod h1:GY7jblb9wI+FOo5y8/S2oY4zWP07AkOJ4+jxCqdqn54=
golang.org/x/sys v0.23.0 h1:YfKFowiIMvtgl1UERQoTPPToxltDeZfbj4H7dVUCwmM=
golang.org/x/sys v0.23.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
6 changes: 3 additions & 3 deletions centos6.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ RUN sed -i "s|#baseurl=|baseurl=|g" /etc/yum.repos.d/CentOS-Base.repo \
RUN yum install -y gcc perl glibc-static kernel kernel-devel \
autoconf zlib-devel zlib-static openssl-static openssl-devel curl

RUN curl -OL https://go.dev/dl/go1.17.6.linux-amd64.tar.gz \
&& tar -C $GO_INST_DIR -xzf go1.17.6.linux-amd64.tar.gz \
&& rm go1.17.6.linux-amd64.tar.gz
RUN curl -OL https://go.dev/dl/go1.22.6.linux-amd64.tar.gz \
&& tar -C $GO_INST_DIR -xzf go1.22.6.linux-amd64.tar.gz \
&& rm go1.22.6.linux-amd64.tar.gz
4 changes: 4 additions & 0 deletions centos7.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
FROM ghcr.io/pandemonium1986/centos7:latest

RUN sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-* && \
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-* && \
yum -y update && yum clean all

RUN yum install -y gcc perl glibc-static make flex bison kernel-devel \
kernel elfutils-libelf-devel openssl

0 comments on commit bad3728

Please sign in to comment.