Skip to content

Commit 5aa9c04

Browse files
authored
fix live-build resolv.conf (#3035)
* fix live-build resolv.conf * improved debuggability
1 parent 6f1900f commit 5aa9c04

File tree

18 files changed

+69
-31
lines changed

18 files changed

+69
-31
lines changed

Makefile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,10 @@ ALL_TARGETS := $(STARTD_SRC) $(ENVIRONMENT_FILE) $(GIT_HASH_FILE) $(VERSION_FILE
3030
echo cargo-deps/aarch64-unknown-linux-musl/release/pi-beep; \
3131
fi) \
3232
$(shell /bin/bash -c 'if [[ "${ENVIRONMENT}" =~ (^|-)unstable($$|-) ]]; then \
33-
echo cargo-deps/$(ARCH)-unknown-linux-musl/release/tokio-console; \
3433
echo cargo-deps/$(ARCH)-unknown-linux-musl/release/flamegraph; \
34+
fi') \
35+
$(shell /bin/bash -c 'if [[ "${ENVIRONMENT}" =~ (^|-)console($$|-) ]]; then \
36+
echo cargo-deps/$(ARCH)-unknown-linux-musl/release/tokio-console; \
3537
fi')
3638
REBUILD_TYPES = 1
3739

@@ -139,9 +141,11 @@ install: $(ALL_TARGETS)
139141
$(call ln,/usr/bin/startbox,$(DESTDIR)/usr/bin/start-cli)
140142
if [ "$(PLATFORM)" = "raspberrypi" ]; then $(call cp,cargo-deps/aarch64-unknown-linux-musl/release/pi-beep,$(DESTDIR)/usr/bin/pi-beep); fi
141143
if /bin/bash -c '[[ "${ENVIRONMENT}" =~ (^|-)unstable($$|-) ]]'; then \
142-
$(call cp,cargo-deps/$(ARCH)-unknown-linux-musl/release/tokio-console,$(DESTDIR)/usr/bin/tokio-console); \
143144
$(call cp,cargo-deps/$(ARCH)-unknown-linux-musl/release/flamegraph,$(DESTDIR)/usr/bin/flamegraph); \
144145
fi
146+
if /bin/bash -c '[[ "${ENVIRONMENT}" =~ (^|-)console($$|-) ]]'; then \
147+
$(call cp,cargo-deps/$(ARCH)-unknown-linux-musl/release/tokio-console,$(DESTDIR)/usr/bin/tokio-console); \
148+
fi
145149
$(call cp,cargo-deps/$(ARCH)-unknown-linux-musl/release/startos-backup-fs,$(DESTDIR)/usr/bin/startos-backup-fs)
146150
$(call ln,/usr/bin/startos-backup-fs,$(DESTDIR)/usr/sbin/mount.backup-fs)
147151

core/Cargo.lock

Lines changed: 25 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

core/build-cli.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ if [ -n "$FEATURES" ]; then
4646
fi
4747

4848
RUSTFLAGS=""
49-
if [[ "${ENVIRONMENT:-}" =~ (^|-)unstable($|-) ]]; then
49+
if [[ "${ENVIRONMENT:-}" =~ (^|-)console($|-) ]]; then
5050
RUSTFLAGS="--cfg tokio_unstable"
5151
fi
5252

core/build-containerbox.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ cd ..
2222
FEATURES="$(echo $ENVIRONMENT | sed 's/-/,/g')"
2323
RUSTFLAGS=""
2424

25-
if [[ "${ENVIRONMENT}" =~ (^|-)unstable($|-) ]]; then
25+
if [[ "${ENVIRONMENT}" =~ (^|-)console($|-) ]]; then
2626
RUSTFLAGS="--cfg tokio_unstable"
2727
fi
2828

core/build-registrybox.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ cd ..
2222
FEATURES="$(echo $ENVIRONMENT | sed 's/-/,/g')"
2323
RUSTFLAGS=""
2424

25-
if [[ "${ENVIRONMENT}" =~ (^|-)unstable($|-) ]]; then
25+
if [[ "${ENVIRONMENT}" =~ (^|-)console($|-) ]]; then
2626
RUSTFLAGS="--cfg tokio_unstable"
2727
fi
2828

core/build-startbox.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ cd ..
2727
FEATURES="$(echo $ENVIRONMENT | sed 's/-/,/g')"
2828
RUSTFLAGS=""
2929

30-
if [[ "${ENVIRONMENT}" =~ (^|-)unstable($|-) ]]; then
30+
if [[ "${ENVIRONMENT}" =~ (^|-)console($|-) ]]; then
3131
RUSTFLAGS="--cfg tokio_unstable"
3232
fi
3333

core/build-ts.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ cd ..
2222
FEATURES="$(echo $ENVIRONMENT | sed 's/-/,/g')"
2323
RUSTFLAGS=""
2424

25-
if [[ "${ENVIRONMENT}" =~ (^|-)unstable($|-) ]]; then
25+
if [[ "${ENVIRONMENT}" =~ (^|-)console($|-) ]]; then
2626
RUSTFLAGS="--cfg tokio_unstable"
2727
fi
2828

core/build-tunnelbox.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ cd ..
2222
FEATURES="$(echo $ENVIRONMENT | sed 's/-/,/g')"
2323
RUSTFLAGS=""
2424

25-
if [[ "${ENVIRONMENT}" =~ (^|-)unstable($|-) ]]; then
25+
if [[ "${ENVIRONMENT}" =~ (^|-)console($|-) ]]; then
2626
RUSTFLAGS="--cfg tokio_unstable"
2727
fi
2828

core/run-tests.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ cd ..
2222
FEATURES="$(echo $ENVIRONMENT | sed 's/-/,/g')"
2323
RUSTFLAGS=""
2424

25-
if [[ "${ENVIRONMENT}" =~ (^|-)unstable($|-) ]]; then
25+
if [[ "${ENVIRONMENT}" =~ (^|-)console($|-) ]]; then
2626
RUSTFLAGS="--cfg tokio_unstable"
2727
fi
2828

core/startos/Cargo.toml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,14 @@ cli-registry = []
4848
cli-startd = []
4949
cli-tunnel = []
5050
default = ["cli", "startd", "registry", "cli-container", "tunnel"]
51-
dev = []
51+
dev = ["backtrace-on-stack-overflow"]
5252
docker = []
5353
registry = []
5454
startd = ["mail-send"]
5555
test = []
5656
tunnel = []
57-
unstable = ["console-subscriber", "tokio/tracing"]
57+
console = ["console-subscriber", "tokio/tracing"]
58+
unstable = ["backtrace-on-stack-overflow"]
5859

5960
[dependencies]
6061
arti-client = { version = "0.33", features = [
@@ -82,6 +83,7 @@ async-trait = "0.1.74"
8283
axum = { version = "0.8.4", features = ["ws"] }
8384
barrage = "0.2.3"
8485
backhand = "0.21.0"
86+
backtrace-on-stack-overflow = { version = "0.3.0", optional = true }
8587
base32 = "0.5.0"
8688
base64 = "0.22.1"
8789
base64ct = "1.6.0"

0 commit comments

Comments
 (0)