created extra script for building tarball
parent
7e53ce7768
commit
78b4e437fc
@ -1,6 +1,8 @@
|
||||
*.iso
|
||||
*.tar.gz
|
||||
sysroot/
|
||||
sysroot.*
|
||||
crystal/pacman.conf
|
||||
crystal/airootfs/etc/pacman.conf
|
||||
repo/
|
||||
repo/
|
||||
chrooted.sh
|
@ -0,0 +1,59 @@
|
||||
#!/usr/bin/env bash
|
||||
rm -fv *.iso
|
||||
|
||||
if [[ "$1" == "" ]]; then
|
||||
WORKDIR=$(mktemp -d)
|
||||
else
|
||||
WORKDIR="$1"
|
||||
if [[ ! -d "$WORKDIR" ]]; then
|
||||
mkdir -p "$WORKDIR"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ "$2" == "testing" ]]; then
|
||||
cp pacman.testing crystal/pacman.conf
|
||||
else
|
||||
cp pacman.def crystal/pacman.conf
|
||||
fi
|
||||
|
||||
if [[ -f aur-pkgs ]]; then
|
||||
if [[ ! -d repo ]]; then
|
||||
mkdir repo
|
||||
mkdir temp
|
||||
for pkg in "$(cat aur-pkgs)"; do
|
||||
pushd temp
|
||||
git clone https://aur.archlinux.org/$pkg.git
|
||||
pushd $pkg
|
||||
makepkg -sf --skippgpcheck
|
||||
cp *.pkg.tar.zst ../../repo/.
|
||||
popd
|
||||
popd
|
||||
done
|
||||
rm -rf temp/
|
||||
pushd repo
|
||||
repo-add aur.db.tar.gz *.pkg.tar.*
|
||||
MP=$(pwd)
|
||||
popd
|
||||
|
||||
echo >> crystal/packages.x86_64
|
||||
for pkg in "$(cat aur-pkgs)"; do
|
||||
echo "${pkg}" >> crystal/packages.x86_64
|
||||
done
|
||||
|
||||
fi
|
||||
|
||||
echo "[aur]" >> crystal/pacman.conf
|
||||
echo "SigLevel = Never" >> crystal/pacman.conf
|
||||
echo "Server = file://${MP}" >> crystal/pacman.conf
|
||||
|
||||
fi
|
||||
|
||||
# idk if this would've happened automatically?
|
||||
cp crystal/pacman.conf crystal/airootfs/etc/.
|
||||
cp crystal/packages.x86_64 crystal/airootfs/etc/packages.x86_64
|
||||
cp /etc/pacman.d/mirrorlist crystal/airootfs/etc/pacman.d/.
|
||||
echo "Built on $(date +"%D @ %T EST")" > crystal/airootfs/etc/buildstamp
|
||||
cp chrooted-bootstrp.sh chrooted.sh
|
||||
time sudo ./mkarchiso -m bootstrap -v -w $WORKDIR -o . crystal
|
||||
sudo rm -rf $WORKDIR
|
||||
sudo chown $USER:$USER *.iso
|
@ -0,0 +1,33 @@
|
||||
#!/bin/bash
|
||||
|
||||
# This file is run via mkarchiso while chrooted as the new system
|
||||
echo "chrooted in the new system, running as $(whoami)"
|
||||
|
||||
echo "CrystalLive" > /etc/hostname
|
||||
echo "sudo reflector --verbose --latest 5 --sort rate --save /etc/pacman.d/mirrorlist" >> /usr/bin/mirrorsetup
|
||||
chmod +x /usr/bin/mirrorsetup
|
||||
|
||||
# We don't add crystal until here so that our packages which change
|
||||
# /etc/skel have been installed already
|
||||
useradd -m crystal
|
||||
usermod -p $(echo "crystal" | openssl passwd -6 -stdin) crystal
|
||||
usermod -p $(echo "crystal" | openssl passwd -6 -stdin) root
|
||||
chsh -s /usr/bin/zsh crystal
|
||||
|
||||
cat >> /home/crystal/.zshrc << EOF
|
||||
PROMPT="%n@%m %~ %# "
|
||||
alias paste="nc termbin.com 9999"
|
||||
clear
|
||||
pfetch
|
||||
EOF
|
||||
|
||||
echo "zsh" > /home/crystal/.bashrc
|
||||
|
||||
chown -R crystal:crystal /home/crystal/
|
||||
systemctl enable NetworkManager
|
||||
|
||||
# i'm tired ok
|
||||
echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen
|
||||
locale-gen
|
||||
echo "LANG=en_US.UTF-8" > /etc/locale.conf
|
||||
echo "Configured the system. Exiting chroot."
|
@ -1 +1 @@
|
||||
Built on 10/22/21 @ 19:15:37 EST
|
||||
Built on 10/22/21 @ 20:50:17 EST
|
||||
|
Loading…
Reference in New Issue