-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
64 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|