commit 7dc4d7e62976775deed3f765f74bb0d2527dce87 Author: Valentin Boettcher Date: Sun Mar 1 22:01:20 2020 +0100 init diff --git a/docker-setup.sh b/docker-setup.sh new file mode 100644 index 0000000..162de43 --- /dev/null +++ b/docker-setup.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +docker run \ + -i \ + --rm --privileged=true \ + --name archiso \ + --mount type=bind,source="$(pwd)",target=/archiso \ + archlinux:latest bash < ./in_docker.sh diff --git a/in_docker.sh b/in_docker.sh new file mode 100644 index 0000000..0ab9d9d --- /dev/null +++ b/in_docker.sh @@ -0,0 +1,28 @@ +#!/bin/sh + + +# install the basics +pacman --noconfirm -Syu +pacman --noconfirm -S archiso sudo git base-devel bash + +# add a user for makepkg +useradd -m archiso + +# make him sudoer +cat >> /etc/sudoers < /etc/sudo.conf + +# more dependencies +cd /tmp +su archiso +git clone https://aur.archlinux.org/libscrypt.git +cd libscrypt +makepkg -si --noconfirm + +# make the bacon +cd /archiso +bash make_iso.sh diff --git a/make_iso.sh b/make_iso.sh new file mode 100644 index 0000000..8ab925a --- /dev/null +++ b/make_iso.sh @@ -0,0 +1,89 @@ +#!/bin/bash +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" +cd $DIR + +ARCH=x86_64 +REPO_DIR=$DIR/repo/$ARCH +REPO=$REPO_DIR/repo.db.tar.gz +PACKAGE_DIR=$DIR/packages +WORKDIR=$DIR/archlive/ + +echo "Init Workdir" +echo "============" + +echo "Removing $WORKDIR" +sudo rm -rf $WORKDIR +cp -r /usr/share/archiso/configs/releng/ $WORKDIR + +# echo "Setting up mkinitcpio.conf" +# sed -i 's/\(HOOKS=(.*\))/\1 bcachefs)/' $WORKDIR/mkinitcpio.conf +# cat >> $WORKDIR/mkinitcpio.conf <> $WORKDIR/packages.x86_64 <> $WORKDIR/pacman.conf <