Skip to content

Commit

Permalink
Install pacman into /usr/local
Browse files Browse the repository at this point in the history
Not that it would make anything better...
  • Loading branch information
eht16 committed Oct 27, 2022
1 parent 9727d95 commit fa386a7
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions builders/Dockerfile.mingw64
Expand Up @@ -15,7 +15,7 @@ ENV PACMAN_VERSION=6.0.1
ENV PACMAN_SHA256="0db61456e56aa49e260e891c0b025be210319e62b15521f29d3e93b00d3bf731"
ENV MSYS2_KEYRING_PKG="msys2-keyring-1~20220623-1-any.pkg.tar.zst"
ENV MSYS2_KEYRING_PKG_SHA256="3508c7fca2f8b9722139666459eb8716f2413fd6daaf997abf0df41d7f285dc9"
ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/pacman/lib/x86_64-linux-gnu
ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/x86_64-linux-gnu

RUN set -ex && \
apt-get update && \
Expand All @@ -31,7 +31,7 @@ RUN set -ex && \
tar xf pacman-${PACMAN_VERSION}.tar.xz && \
cd /pacman-${PACMAN_VERSION} && \
meson \
--prefix /usr/local/pacman \
--prefix /usr/local \
--sysconfdir=/windows/etc \
--localstatedir=/windows/var \
--buildtype release \
Expand All @@ -43,18 +43,17 @@ RUN set -ex && \
-Di18n=false \
build && \
ninja -C build && \
ninja -C build install && \
ln -s /usr/local/pacman/bin/* /usr/local/bin/
ninja -C build install

COPY mingw64/etc/ /windows/etc/

# setup pacman-key
RUN set -ex && \
# download MSYS2 keyring
mkdir -p /usr/local/pacman/share/pacman/keyrings/ && \
mkdir -p /usr/local/share/pacman/keyrings/ && \
wget --no-verbose "https://repo.msys2.org/msys/x86_64/${MSYS2_KEYRING_PKG}" && \
echo "${MSYS2_KEYRING_PKG_SHA256} *${MSYS2_KEYRING_PKG}" | sha256sum --check --strict - && \
tar -x -C /usr/local/pacman/share/pacman/keyrings/ -f "${MSYS2_KEYRING_PKG}" --strip-components 4 usr && \
tar -x -C /usr/local/share/pacman/keyrings/ -f "${MSYS2_KEYRING_PKG}" --strip-components 4 usr && \
# initialize keyring
pacman-key --init && \
pacman-key --populate msys2
Expand Down Expand Up @@ -96,13 +95,12 @@ RUN set -ex && \

# copy pacman and scripts
COPY --from=build-pacman /windows /windows
COPY --from=build-pacman /usr/local/pacman /usr/local/pacman
COPY --from=build-pacman /usr/local /usr/local
COPY mingw64/bin/ /usr/local/bin/
RUN ln -s /usr/local/pacman/bin/* /usr/local/bin/ && \
mkdir /build
RUN mkdir /build

WORKDIR /build
ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/pacman/lib/x86_64-linux-gnu
ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/x86_64-linux-gnu

# start wine to initially create config directory
RUN /usr/local/bin/mingw-w64-i686-wine hostname.exe && \
Expand Down

0 comments on commit fa386a7

Please sign in to comment.