Skip to content

Commit

Permalink
Manjaro Linux: based on Arch Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
takano32 committed Jul 11, 2023
1 parent c68de79 commit 1987028
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
almalinux, amazonlinux,
centos, centos8, fedora, mageia,
opensuse, oraclelinux, rockylinux,
archlinux, gentoo] # void-linux
archlinux, gentoo, manjarolinux] # void-linux
# redhat, cbl-mariner, chimeralinux
uses: takano32/build-kernel/.github/workflows/build.yml@master
with:
Expand Down
6 changes: 6 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,4 +114,10 @@ services:
dockerfile: ./cbl-mariner/Dockerfile
ports:
- 8019:8000
manjarolinux:
build:
context: .
dockerfile: ./manjarolinux/Dockerfile
ports:
- 8020:8000

23 changes: 23 additions & 0 deletions manjarolinux/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
FROM manjarolinux/base:latest
LABEL maintainer "TAKANO Mitsuhiro <[email protected]>"

RUN pacman-db-upgrade
RUN pacman -Syyu --noconfirm

RUN pacman -Syy --noconfirm git
RUN pacman -Syy --noconfirm asp base-devel
RUN pacman -Syy --noconfirm pacman-contrib
RUN pacman -Scc

RUN useradd takano32
RUN mkdir /build-kernel
RUN mkdir /home/takano32
RUN chown -R takano32.takano32 /build-kernel /home/takano32
RUN echo "takano32 ALL=(ALL:ALL) NOPASSWD: ALL" > /etc/sudoers.d/takano32
ENV SUDO="sudo -u takano32"

COPY ./manjarolinux/entrypoint.sh /
RUN chmod 755 /entrypoint.sh
EXPOSE 8000
ENTRYPOINT ["/entrypoint.sh"]

34 changes: 34 additions & 0 deletions manjarolinux/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/bin/bash
set -eux

BUILD_DIR=/build-kernel/build
SUDO="sudo -u takano32"

mkdir -p $BUILD_DIR
chown -R takano32:takano32 $BUILD_DIR
cd $BUILD_DIR
$SUDO asp update linux
$SUDO asp export linux

cd $BUILD_DIR/linux
$SUDO updpkgsums && yes | $SUDO makepkg -seo
$SUDO git config --global http.version HTTP/1.1
$SUDO git config --global http.postBuffer 524288000
while :; do $SUDO makepkg -o --skippgpcheck && break || sleep 5; done

# `makepkg` in `$BUILD_DIR/linux`
JOBS=$(getconf _NPROCESSORS_ONLN)
JOBS=$(expr "$JOBS" + "$JOBS")
MAKEFLAGS="-j$(JOBS)"
$SUDO bash -c "MAKEFLAGS=$MAKEFLAGS makepkg --skippgpcheck"

cd $BUILD_DIR
mv linux/src/archlinux-linux/Documentation/output ../htmldocs
mkdir /build-kernel/zst-pkg
mv linux/*.zst ../zst-pkg
cd ..

if ! "$CI"; then
python3 -m http.server
fi

0 comments on commit 1987028

Please sign in to comment.