Skip to content

Commit 9b65e0a

Browse files
authored
Merge pull request #2 from bleggett/bleggett/mkfs
Add static `mkfs` util
2 parents 4daa83e + 8ab2f3c commit 9b65e0a

File tree

2 files changed

+23
-2
lines changed

2 files changed

+23
-2
lines changed

.github/workflows/nightly.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
name: nightly
22
on:
33
workflow_dispatch:
4-
schedule:
5-
- cron: "0 10 * * *"
64
permissions:
75
contents: read
86
packages: write
@@ -15,6 +13,7 @@ jobs:
1513
matrix:
1614
component:
1715
- squashfs-tools
16+
- mkfs
1817
name: oci build ${{ matrix.component }}
1918
steps:
2019
- uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1

Containerfile.mkfs

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
FROM alpine:latest AS build
2+
WORKDIR /usr/src
3+
4+
# build dependencies
5+
RUN apk update && apk add build-base linux-headers autoconf gettext-dev automake flex bison libtool git
6+
7+
ARG REPO=https://git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git
8+
9+
RUN E2FS_LATEST_VER=$(git -c 'versionsort.suffix=-' \
10+
ls-remote --exit-code --refs --sort='version:refname' --tags $REPO '*.*.*' \
11+
| tail -n 1 \
12+
| cut -d '/' -f 3) && \
13+
git clone https://git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git --branch $E2FS_LATEST_VER
14+
15+
ENV CFLAGS="-O2 -Wall -static"
16+
ENV LDFLAGS="--static"
17+
WORKDIR /usr/src/e2fsprogs
18+
RUN mkdir build
19+
RUN cd build && ../configure && make -j`nproc`
20+
21+
FROM scratch AS final
22+
COPY --from=build /usr/src/e2fsprogs/build/misc/mke2fs /mkfs.ext4

0 commit comments

Comments
 (0)