From 246a0eb471fb76fdc666b708a0281f43f81685d0 Mon Sep 17 00:00:00 2001 From: actualben Date: Wed, 1 Nov 2023 13:55:55 +0100 Subject: [PATCH] v1.13.6 -> v1.14.3 --- wimlib-imagex/Dockerfile | 40 ++++++++++++---------- wimlib-imagex/patches/musl-renameat2.patch | 19 ++++++++++ 2 files changed, 41 insertions(+), 18 deletions(-) create mode 100644 wimlib-imagex/patches/musl-renameat2.patch diff --git a/wimlib-imagex/Dockerfile b/wimlib-imagex/Dockerfile index 8e2454e..c9f3602 100644 --- a/wimlib-imagex/Dockerfile +++ b/wimlib-imagex/Dockerfile @@ -1,50 +1,54 @@ -FROM alpine:3.13 as builder +FROM alpine:edge as builder # for updates, see: https://wimlib.net/downloads/index.html -ARG TAG="v1.13.6" +ARG TAG="v1.14.3" -RUN set -x \ - && apk add --no-cache \ +RUN set -eux; \ + apk add --no-cache \ autoconf \ automake \ file \ - fuse-dev \ + fuse3-dev \ gcc \ git \ libtool \ libxml2-dev \ + linux-headers \ make \ musl-dev \ ntfs-3g-dev \ openssl-dev \ pkgconf \ - && true + ; + WORKDIR /build +RUN git clone "git://wimlib.net/wimlib" /build -RUN set -x \ - && git clone "git://wimlib.net/wimlib" . \ - && ( [ -z "$TAG" ] || git checkout "tags/${TAG}" -b "$TAG" ) \ - && ./bootstrap \ - && ( ./configure --prefix=/usr --disable-dependency-tracking || ( cat "config.log"; false ) ) \ - && make install +COPY patch /patch/ +RUN set -eux; \ + ( [ -z "$TAG" ] || git checkout "tags/${TAG}" -b "$TAG" ); \ + find /patch -type f -print | xargs -r -t -n 1 git apply; \ + ./bootstrap; \ + ( ./configure --prefix=/usr --disable-dependency-tracking || ( cat "config.log"; false ) ); \ + make install FROM alpine:edge LABEL maintainer="Backplane BV " -RUN set -x \ - && apk add --no-cache \ - fuse \ +RUN set -eux; \ + apk add --no-cache \ + fuse3 \ libxml2 \ ntfs-3g \ xz-libs \ - && true + ; COPY --from=builder /usr/bin/wimlib-imagex /usr/bin/mkwinpeimg /usr/bin/ COPY --from=builder /usr/lib/libwim.so.?? /usr/lib/ -RUN set -x \ - && for name in \ +RUN set -eux; \ + for name in \ wimappend \ wimapply \ wimcapture \ diff --git a/wimlib-imagex/patches/musl-renameat2.patch b/wimlib-imagex/patches/musl-renameat2.patch new file mode 100644 index 0000000..bcc0778 --- /dev/null +++ b/wimlib-imagex/patches/musl-renameat2.patch @@ -0,0 +1,19 @@ +diff --git a/src/mount_image.c b/src/mount_image.c +index 4702d60d..0ee04742 100644 +--- a/src/mount_image.c ++++ b/src/mount_image.c +@@ -33,6 +33,14 @@ + + #ifdef WITH_FUSE + ++/* musl libc support */ ++#ifndef RENAME_NOREPLACE ++ #define RENAME_NOREPLACE 0x1 ++#endif ++#ifndef RENAME_EXCHANGE ++ #define RENAME_EXCHANGE 0x2 ++#endif ++ + #ifdef _WIN32 + # error "FUSE mount not supported on Windows! Please configure --without-fuse" + #endif