Merge pull request #61 from javalsai/musl-build

build: preparations for musl
This commit is contained in:
2025-07-16 13:55:18 +02:00
committed by GitHub
3 changed files with 36 additions and 5 deletions

View File

@@ -67,7 +67,8 @@ jobs:
apt-get update && \ apt-get update && \
apt-get install -y make gcc libpam0g-dev 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: 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 - uses: actions/upload-artifact@v4
with: with:
@@ -94,7 +95,8 @@ jobs:
apt-get update && \ apt-get update && \
apt-get install -y make gcc libpam0g-dev 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: 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 - uses: actions/upload-artifact@v4
with: with:
@@ -121,10 +123,39 @@ jobs:
apt-get update && \ apt-get update && \
apt-get install -y make gcc libpam0g-dev 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: 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 - uses: actions/upload-artifact@v4
with: with:
name: build-riscv64 name: build-riscv64
path: lidm-riscv64 path: lidm-riscv64
retention-days: 1 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

View File

@@ -1,11 +1,11 @@
#ifndef UTILH_ #ifndef UTILH_
#define UTILH_ #define UTILH_
#include <bits/types/struct_timeval.h>
#include <stdbool.h> #include <stdbool.h>
#include <stddef.h> #include <stddef.h>
#include <stdint.h> #include <stdint.h>
#include <stdio.h> #include <stdio.h>
#include <sys/time.h>
#include <sys/types.h> #include <sys/types.h>
#include "keys.h" #include "keys.h"

View File

@@ -245,7 +245,7 @@ bool launch(char* user, char* passwd, struct session session, void (*cb)(void),
perror("execl error"); perror("execl error");
(void)fputs("failure calling session\n", stderr); (void)fputs("failure calling session\n", stderr);
} else { } else {
__pid_t child_pid = (__pid_t)pid; pid_t child_pid = (pid_t)pid;
waitpid(child_pid, NULL, 0); waitpid(child_pid, NULL, 0);
pam_setcred(pamh, PAM_DELETE_CRED); pam_setcred(pamh, PAM_DELETE_CRED);