Skip to content
This repository was archived by the owner on Sep 26, 2025. It is now read-only.

Commit c7f6055

Browse files
authored
chore(setup): Add support for generating musl debs (vectordotdev#5458)
1 parent dff5939 commit c7f6055

7 files changed

Lines changed: 76 additions & 20 deletions

File tree

‎.github/workflows/nightly.yml‎

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ jobs:
3232
with:
3333
name: vector-${{ env.VECTOR_VERSION }}-1-musl.x86_64.rpm
3434
path: "./target/artifacts/vector-${{ env.VECTOR_VERSION }}-1-musl.x86_64.rpm"
35+
- uses: actions/upload-artifact@v1
36+
with:
37+
name: vector-${{ env.VECTOR_VERSION }}-musl-amd64.deb
38+
path: "./target/artifacts/vector-${{ env.VECTOR_VERSION }}-musl-amd64.deb"
3539

3640
build-x86_64-unknown-linux-gnu-packages:
3741
runs-on: ubuntu-latest
@@ -321,6 +325,10 @@ jobs:
321325
with:
322326
name: vector-${{ env.VECTOR_VERSION }}-1-musl.x86_64.rpm
323327
path: target/artifacts
328+
- uses: actions/download-artifact@v2
329+
with:
330+
name: vector-${{ env.VECTOR_VERSION }}-musl-amd64.deb
331+
path: target/artifacts
324332
- uses: actions/download-artifact@v2
325333
with:
326334
name: vector-${{ env.VECTOR_VERSION }}-1.aarch64.rpm
@@ -363,6 +371,10 @@ jobs:
363371
with:
364372
name: vector-${{ env.VECTOR_VERSION }}-1-musl.x86_64.rpm
365373
path: target/artifacts
374+
- uses: actions/download-artifact@v2
375+
with:
376+
name: vector-${{ env.VECTOR_VERSION }}-musl-amd64.deb
377+
path: target/artifacts
366378
- uses: actions/download-artifact@v2
367379
with:
368380
name: vector-${{ env.VECTOR_VERSION }}-1.aarch64.rpm
@@ -436,6 +448,19 @@ jobs:
436448
release: "any-version"
437449
republish: "true"
438450
file: "target/artifacts/vector-${{ env.VECTOR_VERSION }}-1-musl.x86_64.rpm"
451+
- name: Push amd64 musl deb
452+
id: push-deb-amd64-musl
453+
uses: cloudsmith-io/action@master
454+
with:
455+
api-key: ${{ secrets.CLOUDSMITH_API_KEY }}
456+
command: "push"
457+
format: "deb"
458+
owner: "timber"
459+
repo: "vector-nightly"
460+
distro: "any-distro"
461+
release: "any-version"
462+
republish: "true"
463+
file: "target/artifacts/vector-${{ env.VECTOR_VERSION }}-musl-amd64.deb"
439464
- name: Push aarch64 RPM
440465
id: push-rpm-aarch64
441466
uses: cloudsmith-io/action@master

‎.github/workflows/release.yml‎

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ jobs:
3333
with:
3434
name: vector-${{ env.VECTOR_VERSION }}-1-musl.x86_64.rpm
3535
path: "./target/artifacts/vector-${{ env.VECTOR_VERSION }}-1-musl.x86_64.rpm"
36+
- uses: actions/upload-artifact@v1
37+
with:
38+
name: vector-${{ env.VECTOR_VERSION }}-musl-amd64.deb
39+
path: "./target/artifacts/vector-${{ env.VECTOR_VERSION }}-musl-amd64.deb"
3640

3741
build-x86_64-unknown-linux-gnu-packages:
3842
runs-on: ubuntu-latest
@@ -322,6 +326,10 @@ jobs:
322326
with:
323327
name: vector-${{ env.VECTOR_VERSION }}-1-musl.x86_64.rpm
324328
path: target/artifacts
329+
- uses: actions/download-artifact@v2
330+
with:
331+
name: vector-${{ env.VECTOR_VERSION }}-musl-amd64.deb
332+
path: target/artifacts
325333
- uses: actions/download-artifact@v2
326334
with:
327335
name: vector-${{ env.VECTOR_VERSION }}-1.aarch64.rpm
@@ -396,6 +404,10 @@ jobs:
396404
with:
397405
name: vector-${{ env.VECTOR_VERSION }}-1-musl.x86_64.rpm
398406
path: target/artifacts
407+
- uses: actions/download-artifact@v2
408+
with:
409+
name: vector-${{ env.VECTOR_VERSION }}-musl-amd64.deb
410+
path: target/artifacts
399411
- uses: actions/download-artifact@v2
400412
with:
401413
name: vector-${{ env.VECTOR_VERSION }}-1.aarch64.rpm
@@ -461,6 +473,10 @@ jobs:
461473
with:
462474
name: vector-${{ env.VECTOR_VERSION }}-1-musl.x86_64.rpm
463475
path: target/artifacts
476+
- uses: actions/download-artifact@v2
477+
with:
478+
name: vector-${{ env.VECTOR_VERSION }}-musl-amd64.deb
479+
path: target/artifacts
464480
- uses: actions/download-artifact@v2
465481
with:
466482
name: vector-${{ env.VECTOR_VERSION }}-1.aarch64.rpm
@@ -534,6 +550,19 @@ jobs:
534550
release: "any-version"
535551
republish: "true"
536552
file: "target/artifacts/vector-${{ env.VECTOR_VERSION }}-1-musl.x86_64.rpm"
553+
- name: Push amd64 musl deb
554+
id: push-deb-amd64-musl
555+
uses: cloudsmith-io/action@master
556+
with:
557+
api-key: ${{ secrets.CLOUDSMITH_API_KEY }}
558+
command: "push"
559+
format: "deb"
560+
owner: "timber"
561+
repo: "vector"
562+
distro: "any-distro"
563+
release: "any-version"
564+
republish: "true"
565+
file: "target/artifacts/vector-${{ env.VECTOR_VERSION }}-musl-amd64.deb"
537566
- name: Push aarch64 RPM
538567
id: push-rpm-aarch64
539568
uses: cloudsmith-io/action@master

‎Cargo.lock‎

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

‎Cargo.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ getset = "0.1.1"
177177
lru = "0.6.1"
178178
bloom = "0.3.2"
179179
pulsar = { version = "1.0.0", default-features = false, features = ["tokio-runtime"], optional = true }
180-
cidr-utils = "0.4.2"
180+
cidr-utils = "0.5.0"
181181
pin-project = "1.0.1"
182182
nats = { version = "0.8.6", optional = true }
183183
k8s-openapi = { version = "0.9", features = ["v1_16"], optional = true }

‎Makefile‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -992,7 +992,7 @@ package: build ## Build the Vector archive
992992
package-x86_64-unknown-linux-gnu-all: package-x86_64-unknown-linux-gnu package-deb-x86_64-unknown-linux-gnu package-rpm-x86_64-unknown-linux-gnu # Build all x86_64 GNU packages
993993

994994
.PHONY: package-x86_64-unknown-linux-musl-all
995-
package-x86_64-unknown-linux-musl-all: package-x86_64-unknown-linux-musl package-rpm-x86_64-unknown-linux-musl # Build all x86_64 MUSL packages
995+
package-x86_64-unknown-linux-musl-all: package-x86_64-unknown-linux-musl package-rpm-x86_64-unknown-linux-musl package-deb-x86_64-unknown-linux-musl # Build all x86_64 MUSL packages
996996

997997
.PHONY: package-aarch64-unknown-linux-musl-all
998998
package-aarch64-unknown-linux-musl-all: package-aarch64-unknown-linux-musl package-deb-aarch64 package-rpm-aarch64 # Build all aarch64 MUSL packages

‎deny.toml‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,8 @@ ignore = [
2626
# can be removed after next release of time
2727
# https://github.com/time-rs/time/commit/8b2734351a5cd05a9bd3315f1af76c28b5852fec
2828
"RUSTSEC-2020-0056",
29+
# ordered_flat - can be removed when heim next releases their beta branch
30+
"RUSTSEC-2020-0082",
31+
# lucet-runtime-internals - we'll need to upgrade here
32+
"RUSTSEC-2020-0004",
2933
]

‎scripts/package-deb.sh‎

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,22 @@ cat LICENSE NOTICE > "$PROJECT_ROOT/target/debian-license.txt"
7373

7474
cargo deb --target "$TARGET" --deb-version "$PACKAGE_VERSION" --no-build --no-strip
7575

76+
# If the TARGET is musl populate the TYPE variable
77+
if [ "${TARGET}" = "x86_64-unknown-linux-musl" ]; then
78+
TYPE="musl"
79+
else
80+
TYPE=""
81+
fi
82+
7683
# Rename the resulting .deb file to use - instead of _ since this
7784
# is consistent with our package naming scheme.
7885
for file in target/"${TARGET}"/debian/*.deb; do
7986
base=$(basename "${file}")
8087
nbase=${base//_/-}
81-
mv "${file}" target/"${TARGET}"/debian/"${nbase}";
88+
if [ "${TYPE}" = 'musl' ]; then
89+
nbase=${nbase//amd64.deb/musl-amd64.deb}
90+
fi
91+
mv "${file}" target/"${TARGET}"/debian/"${nbase}";
8292
done
8393

8494
#

0 commit comments

Comments
 (0)