From 5597d10b13a3d411101b0212189738f9290d71a4 Mon Sep 17 00:00:00 2001 From: Fijxu Date: Sat, 23 Mar 2024 15:50:14 -0300 Subject: [PATCH] Update Image users --- .forgejo/workflows/ci.yml | 13 +++++++------ linux-clang-format/Dockerfile | 4 ++-- linux-fresh/Dockerfile | 18 +++++++++--------- linux-mingw/Dockerfile | 12 ++++++------ 4 files changed, 24 insertions(+), 23 deletions(-) diff --git a/.forgejo/workflows/ci.yml b/.forgejo/workflows/ci.yml index 91e91eb..5626f9e 100644 --- a/.forgejo/workflows/ci.yml +++ b/.forgejo/workflows/ci.yml @@ -1,9 +1,10 @@ name: 'Suyu Docker Image CI' + on: - # workflow_dispatch: - # inputs: {} - # schedule: - # - cron: '0 7 * * 0' + # workflow_dispatch: + # inputs: {} + schedule: + - cron: '0 7 * * 0' push: branches: ["dev"] pull_request: @@ -21,14 +22,14 @@ jobs: - uses: https://github.com/actions/checkout@v2 - uses: https://github.com/docker/setup-buildx-action@v1 name: Setup Docker BuildX system - - name: Login to the Suyu Package Registry + - name: Login to Docker Container Registry uses: https://github.com/docker/login-action@v1 if: (github.ref == 'refs/heads/dev') && (github.repository == 'suyu/build-environments') with: username: ${{ secrets.USERNAME }} password: ${{ secrets.TOKEN }} - uses: https://github.com/docker/build-push-action@v2 - name: Build image + name: Build images with: push: ${{ (github.ref == 'refs/heads/dev') && (github.repository == 'suyu/build-environments') }} context: ${{ matrix.image }} diff --git a/linux-clang-format/Dockerfile b/linux-clang-format/Dockerfile index f7f30a4..f86a4ca 100644 --- a/linux-clang-format/Dockerfile +++ b/linux-clang-format/Dockerfile @@ -1,7 +1,7 @@ FROM ubuntu:20.04 LABEL maintainer="suyu" -# Create a user account yuzu (UID 1027) that the container will run as -RUN useradd -m -u 1027 -s /bin/bash yuzu && \ +# Create a user account suyu (UID 1027) that the container will run as +RUN useradd -m -u 1027 -s /bin/bash suyu && \ apt-get update && apt-get -y full-upgrade && \ apt-get install -y git gpg-agent wget && \ wget https://apt.llvm.org/llvm-snapshot.gpg.key && apt-key add ./llvm-snapshot.gpg.key && \ diff --git a/linux-fresh/Dockerfile b/linux-fresh/Dockerfile index 9931b90..61dd0d0 100644 --- a/linux-fresh/Dockerfile +++ b/linux-fresh/Dockerfile @@ -11,8 +11,8 @@ ENV QT_PKG_VER=515 ENV QT_VER=5.15.2 ENV UBUNTU_VER=focal -# Create a user account yuzu (UID 1027) that the container will run as -RUN useradd -m -u 1027 -s /bin/bash yuzu && \ +# Create a user account suyu (UID 1027) that the container will run as +RUN useradd -m -u 1027 -s /bin/bash suyu && \ apt-get update && \ apt-get full-upgrade -y && \ apt-get install --no-install-recommends -y \ @@ -23,7 +23,7 @@ RUN useradd -m -u 1027 -s /bin/bash yuzu && \ unzip \ wget \ xz-utils \ -# yuzu build requirements +# suyu build requirements build-essential \ ccache \ git \ @@ -104,7 +104,7 @@ RUN cd /tmp && \ cp -rv cmake-${CMAKE_VER}-linux-x86_64/* /usr && \ rm -rf cmake-* -# Install Boost from yuzu-emu/ext-linux-bin +# Install Boost from suyu/ext-linux-bin RUN cd /tmp && \ wget --no-verbose https://git.suyu.dev/suyu/ext-linux-bin/raw/main/boost/boost-${BOOST_VER}.tar.xz && \ tar xvf boost-${BOOST_VER}.tar.xz && \ @@ -112,7 +112,7 @@ RUN cd /tmp && \ cp -rv boost-${BOOST_VER}/usr / && \ rm -rf boost* -# Install GCC from yuzu-emu/ext-linux-bin +# Install GCC from suyu/ext-linux-bin RUN cd /tmp && \ wget --no-verbose \ https://git.suyu.dev/suyu/ext-linux-bin/raw/main/gcc/gcc-${GCC_VER}-ubuntu.tar.xz.aa \ @@ -131,7 +131,7 @@ RUN cd /tmp && \ ln -sv /usr/local/lib/gcc/x86_64-pc-linux-gnu/${GCC_VER} /usr/lib/gcc/x86_64-linux-gnu/${GCC_VER} && \ cp -rv /usr/local/include/c++/${GCC_VER}/x86_64-pc-linux-gnu/* /usr/local/include/c++/${GCC_VER}/ -# Install GNU binutils from yuzu-emu/ext-linux-bin +# Install GNU binutils from suyu/ext-linux-bin RUN cd /tmp && \ wget --no-verbose \ https://git.suyu.dev/suyu/ext-linux-bin/raw/main/binutils/binutils-${GNU_BIN_VER}-${UBUNTU_VER}.tar.xz && \ @@ -149,11 +149,11 @@ RUN patch /opt/qt515/include/QtConcurrent/qtconcurrentthreadengine.h /opt/qt515/ rm /opt/qt515/qtconcurrentthreadengine.patch # Tell CMake to use vcpkg when looking for packages -ENV VCPKG_TOOLCHAIN_FILE=/home/yuzu/vcpkg/scripts/buildsystems/vcpkg.cmake +ENV VCPKG_TOOLCHAIN_FILE=/home/suyu/vcpkg/scripts/buildsystems/vcpkg.cmake USER 1027 -# Install vcpkg and required dependencies for yuzu -RUN cd /home/yuzu &&\ +# Install vcpkg and required dependencies for suyu +RUN cd /home/suyu &&\ git clone --depth 1 https://github.com/Microsoft/vcpkg.git &&\ cd vcpkg &&\ ./bootstrap-vcpkg.sh &&\ diff --git a/linux-mingw/Dockerfile b/linux-mingw/Dockerfile index 349b9c5..f18133f 100644 --- a/linux-mingw/Dockerfile +++ b/linux-mingw/Dockerfile @@ -4,7 +4,7 @@ LABEL maintainer="suyu" # Add mingw-repo "ownstuff" is a AUR with an up to date mingw64 # Runs pacman -Syu twice in order to work around pacman issues where the first run only updates the # current distro packages, and the second run actually pulls the updates from the repos. -RUN useradd -m -u 1027 -s /bin/bash yuzu && mkdir -p /tmp/pkgs && \ +RUN useradd -m -u 1027 -s /bin/bash suyu && mkdir -p /tmp/pkgs && \ echo "[ownstuff]" >> /etc/pacman.conf && \ echo "SigLevel = Optional TrustAll" >> /etc/pacman.conf && \ echo "Server = https://martchus.no-ip.biz/repo/arch/ownstuff/os/\$arch" >> /etc/pacman.conf && \ @@ -20,7 +20,7 @@ RUN useradd -m -u 1027 -s /bin/bash yuzu && mkdir -p /tmp/pkgs && \ wget \ git \ glslang \ -# TODO: Remove python-pip after a reasonable amount of time has passed to let yuzu PRs rebase its scripts +# TODO: Remove python-pip after a reasonable amount of time has passed to let suyu PRs rebase its scripts python-pefile \ python-pip \ python \ @@ -48,7 +48,7 @@ RUN useradd -m -u 1027 -s /bin/bash yuzu && mkdir -p /tmp/pkgs && \ pacman -Scc --noconfirm && \ rm -rf /usr/share/man/ /tmp/* /var/tmp/ /usr/{i686-w64-mingw32,lib32} /usr/lib/gcc/i686-w64-mingw32 -# Install Boost from yuzu-emu/ext-linux-bin +# Install Boost from suyu/ext-linux-bin RUN wget --no-verbose \ https://git.suyu.dev/suyu/ext-linux-bin/raw/main/mingw/mingw-w64-boost-1.79.0-1-any.pkg.tar.zst && \ pacman -U --noconfirm mingw-w64-boost-1.79.0-1-any.pkg.tar.zst && \ @@ -56,8 +56,8 @@ RUN wget --no-verbose \ # Compatibility with the old Ubuntu MingW image RUN ln -s /usr/x86_64-w64-mingw32/lib/qt /usr/x86_64-w64-mingw32/lib/qt5 -# Give yuzu user sudo access for AUR usage -RUN echo "yuzu ALL=(ALL:ALL) NOPASSWD: ALL" >> /etc/sudoers +# Give suyu user sudo access for AUR usage +RUN echo "suyu ALL=(ALL:ALL) NOPASSWD: ALL" >> /etc/sudoers USER 1027 @@ -88,5 +88,5 @@ RUN \ makepkg -si --noconfirm --noprogressbar --nocheck && \ # cleanup cd && rm -rf mingw-* && \ - sudo sed -i 's/yuzu/#yuzu/g' /etc/sudoers + sudo sed -i 's/suyu/#suyu/g' /etc/sudoers