Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 6220fb3

Browse files
Add dropbear
1 parent 6efc93d commit 6220fb3

File tree

4 files changed

+33
-3
lines changed

4 files changed

+33
-3
lines changed

‎Dockerfile.dropbear-2020.81

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
ARG MUSL_TARGET=x86_64-linux-musl
2+
FROM zlib-1.2.11-${MUSL_TARGET} AS zlib
3+
FROM musl-cross-make-$MUSL_TARGET
4+
ARG MUSL_TARGET
5+
6+
COPY --from=zlib /output /output
7+
8+
WORKDIR /build
9+
RUN download https://github.com/mkj/dropbear/archive/refs/tags/DROPBEAR_2020.81.tar.gz source.tar.gz c7cfc687088daca392b780f4af87d92ec1803f062c4c984f02062adc41b8147f && tar xf source.tar.gz
10+
RUN export PATH=/build/cross/bin:$PATH && \
11+
cd dropbear-* && \
12+
autoconf && \
13+
autoheader && \
14+
export CC="${MUSL_TARGET}-gcc" && \
15+
export CFLAGS="-frandom-seed=pulse" && \
16+
./configure --host=$($CC -dumpmachine) --enable-static --disable-syslog --with-zlib=/output --prefix=/output && \
17+
make -j$(nproc) PROGRAMS="dropbearkey dbclient dropbear" && \
18+
make install && \
19+
${MUSL_TARGET}-strip /output/bin/dbclient && \
20+
${MUSL_TARGET}-strip /output/bin/dropbearkey && \
21+
${MUSL_TARGET}-strip /output/sbin/dropbear
22+
23+
CMD bash

‎Dockerfile.git-2.33.0

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export BEFORE_INSTALL=$(find /output/bin/ -type f | xargs) && \
3333
make install && \
3434
rm -- ${BEFORE_INSTALL} && \
3535
${MUSL_TARGET}-strip /output/bin/* || true && \
36-
${MUSL_TARGET}-strip /output/libexec/* || true && \
36+
${MUSL_TARGET}-strip /output/libexec/git-core/* || true && \
3737
tar -z -c -f /output/full.tar.gz -C /output --transform 's,^,git/,' bin libexec
3838

3939
CMD bash

‎Makefile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ MUSL_TARGET ?= x86_64-linux-musl
33
DOCKER_BUILD = docker build --build-arg MUSL_TARGET=$(MUSL_TARGET) -f Dockerfile.$@ -t $@-$(MUSL_TARGET) .
44
GRABBY_HANDS = docker run --rm --mount type=bind,source=$(shell pwd)/output/$(MUSL_TARGET),target=/grabby $@-$(MUSL_TARGET) install -g $(shell id -g) -o $(shell id -u)
55

6-
all: busybox-1.33.1 curl-7.79.1 loggedfs-0.9 nmap-7.90 openssl-1.1.1k socat-1.7.4.1 tcpdump-4.99.1
6+
all: busybox-1.33.1 curl-7.79.1 dropbear-2020.81 loggedfs-0.9 nmap-7.90 openssl-1.1.1k socat-1.7.4.1 tcpdump-4.99.1
77

88
check:
99
@echo "These binaries are not built properly:"
@@ -61,6 +61,12 @@ openssl-1.1.1k: musl-cross-make
6161

6262
## Tools
6363

64+
dropbear-2020.81: zlib-1.2.11
65+
$(DOCKER_BUILD)
66+
$(GRABBY_HANDS) /output/bin/dbclient /grabby/dbclient-2020.81
67+
$(GRABBY_HANDS) /output/bin/dropbearkey /grabby/dropbearkey-2020.81
68+
$(GRABBY_HANDS) /output/sbin/dropbear /grabby/$@
69+
6470
socat-1.7.4.1: readline-8.1 openssl-1.1.1k
6571
$(DOCKER_BUILD)
6672
$(GRABBY_HANDS) /output/bin/socat /grabby/$@

‎README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ You can build individual binaries by specifying the recipe name as an argument t
1717

1818
* `busybox-1.33.1`
1919
* `curl-7.79.1`
20-
* `git-2.33.0` (git binary needs to be renamed to `git` to work)
20+
* `dropbear-2020.81` (`dropbear`, `dropbearclient` and `dropbearkey`)
21+
* `git-2.33.0` (`git-...` binary needs to be renamed to just `git` to work)
2122
* `loggedfs-0.9`
2223
* `nmap-7.90`
2324
* `openssl-0.9.8zh` (insecure, not for general use)

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /