From 3f264a66b9fbab5c893b5a7ce9ffb18e28ffba50 Mon Sep 17 00:00:00 2001 From: grialion <48643945+grialion@users.noreply.github.com> Date: Wed, 9 Jul 2025 23:07:32 +0200 Subject: [PATCH 1/3] fix(util.h): use standard system header Use standard sys/time.h instead of libc specific header bits/types/... for musl compatibility --- include/util.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/util.h b/include/util.h index b45fd53..3f2d80a 100644 --- a/include/util.h +++ b/include/util.h @@ -1,11 +1,11 @@ #ifndef UTILH_ #define UTILH_ -#include #include #include #include #include +#include #include #include "keys.h" From cd5a3ede529b03c184c86d067d2596a15a0794c0 Mon Sep 17 00:00:00 2001 From: grialion <48643945+grialion@users.noreply.github.com> Date: Wed, 9 Jul 2025 23:14:36 +0200 Subject: [PATCH 2/3] fix(auth.c): use POSIX pid_t Use standard pid_t type instead of libc specific __pid_t type. --- src/auth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/auth.c b/src/auth.c index d686cd1..1c06836 100644 --- a/src/auth.c +++ b/src/auth.c @@ -245,7 +245,7 @@ bool launch(char* user, char* passwd, struct session session, void (*cb)(void), perror("execl error"); (void)fputs("failure calling session\n", stderr); } else { - __pid_t child_pid = (__pid_t)pid; + pid_t child_pid = (pid_t)pid; waitpid(child_pid, NULL, 0); pam_setcred(pamh, PAM_DELETE_CRED); From 663b882f340c950cf0afdc373518d1d127be8c94 Mon Sep 17 00:00:00 2001 From: javalsai Date: Thu, 10 Jul 2025 21:26:36 +0200 Subject: [PATCH 3/3] ci(feat): add x86_64 musl builds --- .github/workflows/build.yml | 37 ++++++++++++++++++++++++++++++++++--- 1 file changed, 34 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 915d06c..3b550e4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -67,7 +67,8 @@ jobs: apt-get update && \ apt-get install -y make gcc libpam0g-dev run: ARCH=aarch64 GITHUB_STEP_SUMMARY=gss.out GITHUB_OUTPUT=go.out assets/github_scripts/build.sh - - run: set +e; cat gss.out >>"$GITHUB_STEP_SUMMARY"; cat go.out >>"$GITHUB_OUTPUT" + - if: always() + run: set +e; cat gss.out >>"$GITHUB_STEP_SUMMARY"; cat go.out >>"$GITHUB_OUTPUT" - uses: actions/upload-artifact@v4 with: @@ -94,7 +95,8 @@ jobs: apt-get update && \ apt-get install -y make gcc libpam0g-dev run: ARCH=armv7 GITHUB_STEP_SUMMARY=gss.out GITHUB_OUTPUT=go.out assets/github_scripts/build.sh - - run: set +e; cat gss.out >>"$GITHUB_STEP_SUMMARY"; cat go.out >>"$GITHUB_OUTPUT" + - if: always() + run: set +e; cat gss.out >>"$GITHUB_STEP_SUMMARY"; cat go.out >>"$GITHUB_OUTPUT" - uses: actions/upload-artifact@v4 with: @@ -121,10 +123,39 @@ jobs: apt-get update && \ apt-get install -y make gcc libpam0g-dev run: ARCH=riscv64 GITHUB_STEP_SUMMARY=gss.out GITHUB_OUTPUT=go.out assets/github_scripts/build.sh - - run: set +e; cat gss.out >>"$GITHUB_STEP_SUMMARY"; cat go.out >>"$GITHUB_OUTPUT" + - if: always() + run: set +e; cat gss.out >>"$GITHUB_STEP_SUMMARY"; cat go.out >>"$GITHUB_OUTPUT" - uses: actions/upload-artifact@v4 with: name: build-riscv64 path: lidm-riscv64 retention-days: 1 + + build-linux-amd64-musl: + name: amd64-musl + runs-on: ubuntu-24.04 + permissions: write-all + steps: + - uses: actions/checkout@v4 + + - name: Run in Musl Container + uses: addnab/docker-run-action@v3 + with: + image: ghcr.io/void-linux/void-musl-full + options: -v ${{ github.workspace }}:/workspace + run: | + cd /workspace + + xbps-install -Sy + xbps-install -y git pam-devel make gcc bash git + + ARCH=amd64-musl GITHUB_STEP_SUMMARY=gss.out GITHUB_OUTPUT=go.out assets/github_scripts/build.sh + - if: always() + run: set +e; cat gss.out >>"$GITHUB_STEP_SUMMARY"; cat go.out >>"$GITHUB_OUTPUT" + + - uses: actions/upload-artifact@v4 + with: + name: build-amd64-musl + path: lidm-amd64-musl + retention-days: 1