Skip to content

Commit

Permalink
all the build process is using the root account
Browse files Browse the repository at this point in the history
  • Loading branch information
Evangelospro committed Aug 4, 2023
1 parent a1be481 commit 0a9716a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 11 deletions.
15 changes: 5 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,13 @@ RUN echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen
# Install necessary packages
RUN paru -Syu git github-cli go archiso pacman-contrib binutils make gcc pkg-config fakeroot sudo zip base-devel rustup --needed --noconfirm

# Create a builder user so makepkg doesn't run as root
RUN useradd builder -ms /bin/bash -G wheel
# Allow the builder user to run sudo without a password
RUN echo '%wheel ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
# Become the builder
USER builder
WORKDIR /home/builder

# Set up Rust
RUN rustup install stable
RUN rustup default stable

COPY --chown=builder:builder ./iso /home/builder/iso
# replace "exit $E_ROOT" with "#exit $E_ROOT" in /usr/bin/makepkg
RUN sed -i 's/exit $E_ROOT/#exit $E_ROOT/g' /usr/bin/makepkg

COPY ./iso /root/iso

ENTRYPOINT ["/home/builder/iso/build.sh"]
ENTRYPOINT ["/root/iso/build.sh"]
3 changes: 3 additions & 0 deletions iso/aur.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ if [ "$1" == "enable" ]; then
# echo "unhandled url type"
continue
fi
# if [ "$CLONE_URL" == "https://aur.archlinux.org/jaq.git" ]; then
# build $CLONE_URL $PKG_PATH
# fi
build $CLONE_URL $PKG_PATH
done < "$iso_dir/all_packages.x86_64"

Expand Down
2 changes: 1 addition & 1 deletion iso/build.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

cd /home/builder/iso
cd /root/iso
ls -lasih

# Build ISO and rename to match BUILD_DATE
Expand Down

0 comments on commit 0a9716a

Please sign in to comment.