Rename to Arkanium
This commit is contained in:
parent
14f6f930c1
commit
c3d03747a5
8 changed files with 193 additions and 188 deletions
|
@ -8,7 +8,7 @@
|
|||
# Print manual if no parameters provided or invalid amount of parameters is provided
|
||||
if [[ ! -n $1 || -n $2 ]]; then
|
||||
cat <<- END
|
||||
Usage: bttrfs-build [variant]
|
||||
Usage: arkanium-build [variant]
|
||||
Variants:
|
||||
archlinux Plain Arch Linux TTY image
|
||||
arkanelinux Arkane Linux GNOME image
|
||||
|
@ -16,7 +16,7 @@ if [[ ! -n $1 || -n $2 ]]; then
|
|||
|
||||
Variants are loaded based on their directory names, the ones listed here
|
||||
are included by default. For information on the exact configuration of
|
||||
these variants or to create your own see /etc/bttrfs/variants.
|
||||
these variants or to create your own see /etc/arkanium/variants.
|
||||
END
|
||||
exit 0
|
||||
fi
|
||||
|
@ -24,9 +24,9 @@ fi
|
|||
## Set common variables
|
||||
#
|
||||
declare -r workdir='/var/tmp/rootfs'
|
||||
declare -r configs_dir='./bttrfs/'
|
||||
declare -r configs_dir='./arkanium/'
|
||||
declare -r variant="$configs_dir/variants/$1"
|
||||
declare -r type=$(cat $variant/type)
|
||||
declare -r type=$(cat .arkanium-build.d/$variant/type)
|
||||
declare -r output_target="$(pwd)/"
|
||||
|
||||
## Common functions
|
||||
|
@ -42,7 +42,7 @@ cleanup_and_quit () {
|
|||
btrfs property set -ts $workdir/var ro false
|
||||
|
||||
# Remove temporary btrfs volumes
|
||||
[[ ! -n $BTTRFS_NO_CLEANUP ]] && btrfs subvolume delete $workdir/etc \
|
||||
[[ ! -n $arkanium_NO_CLEANUP ]] && btrfs subvolume delete $workdir/etc \
|
||||
$workdir/var \
|
||||
$workdir 2> /dev/null
|
||||
|
||||
|
@ -70,7 +70,7 @@ for prog in btrfs pacstrap; do
|
|||
done
|
||||
|
||||
# Check if requested variant exists
|
||||
[[ ! -d $variant ]] &&
|
||||
[[ ! -d arkanium-build.d/$variant ]] &&
|
||||
printf '\e[1;31m<#>\e[0m\e[1m The requested variant does not exist\e[0m\n' &&
|
||||
exit 1
|
||||
|
||||
|
@ -80,13 +80,13 @@ done
|
|||
if [[ $type == 'archlinux' ]]; then
|
||||
|
||||
# Ensure base.list exists, if not error and quit
|
||||
[[ ! -e $variant/base.list ]] &&
|
||||
printf "\e[1;31m<#>\e[0m\e[1m The required file 'base.list' is not preset in $(readlink -m $variant)\e[0m\n" &&
|
||||
[[ ! -e arkanium-build.d/$variant/base.list ]] &&
|
||||
printf "\e[1;31m<#>\e[0m\e[1m The required file 'base.list' is not preset in arkanium-build.d/$(readlink -m $variant)\e[0m\n" &&
|
||||
exit 1
|
||||
|
||||
# Check if optional packages.list file exists, if not notify and continue
|
||||
[[ ! -e $variant/packages.list ]] &&
|
||||
printf "\e[1;34m-->\e[0m\e[1m The optional file 'packages.list' is not preset in $(readlink -m $variant), running without it\e[0m\n" &&
|
||||
[[ ! -e arkanium-build.d/$variant/packages.list ]] &&
|
||||
printf "\e[1;34m-->\e[0m\e[1m The optional file 'packages.list' is not preset in arkanium-build.d/$(readlink -m $variant), running without it\e[0m\n" &&
|
||||
skip_secondary_package_installation=1
|
||||
|
||||
printf '\e[1;34m-->\e[0m\e[1m Started Arch linux image build\e[0m\n'
|
||||
|
@ -98,22 +98,36 @@ if [[ $type == 'archlinux' ]]; then
|
|||
btrfs subvolume create $workdir/var || cleanup_and_quit "Failed to create btrfs subvolume $(readlink -m $workdir/var)"
|
||||
|
||||
# Read base package list and install base system
|
||||
readarray base_packages < $variant/base.list
|
||||
readarray base_packages < arkanium-build.d/$variant/base.list
|
||||
printf "\e[1;34m-->\e[0m\e[1m Installing base packages\e[0m\n"
|
||||
pacstrap $workdir ${base_packages[*]} || cleanup_and_quit 'Failed to install secondary package list'
|
||||
|
||||
# Read package list and install secondary system components, skip if not used
|
||||
if [[ ! -n skip_secondary_package_installation ]]; then
|
||||
printf '\e[1;34m-->\e[0m\e[1m Installing secondary packages...\e[0m\n'
|
||||
readarray packages < $variant/packages.list
|
||||
readarray packages < arkanium-build.d/$variant/packages.list
|
||||
arch-chroot $workdir pacman -S --noconfirm ${packages[*]} || cleanup_and_quit 'Failed to install base packages'
|
||||
fi
|
||||
|
||||
# If rootfs directory exists in variant copy it to the temporary subvolume
|
||||
if [[ -d $variant/rootfs ]]; then
|
||||
cp -rv $variant/rootfs/* $workdir/
|
||||
# If overlay directory exists in variant copy it to the temporary subvolume
|
||||
if [[ -d arkanium-build.d/$variant/overlay ]]; then
|
||||
cp -rv arkanium-build.d/$variant/overlay/* $workdir/
|
||||
fi
|
||||
|
||||
# Enable systemd services if requested
|
||||
if [[ -e arkanium-build.d/$variant/systemd.services ]]; then
|
||||
|
||||
readarray services < "arkanium-build.d/$variant/systemd.services"
|
||||
|
||||
for service in services; do
|
||||
arch-chroot $workdir systemctl enable $service
|
||||
done
|
||||
|
||||
fi
|
||||
|
||||
# Clear pacman cache
|
||||
arch-chroot $workdir pacman --noconfirm -Scc
|
||||
|
||||
# Remove subvolumes created by systemd
|
||||
[[ -d $workdir/var/lib/portables ]] &&
|
||||
printf "\e[1;34m-->\e[0m\e[1m Removing systemd subvolume var/lib/portables\e[0m\n" &&
|
6
arkanium-build.d/arkanelinux/base.list
Normal file
6
arkanium-build.d/arkanelinux/base.list
Normal file
|
@ -0,0 +1,6 @@
|
|||
base
|
||||
linux
|
||||
linux-firmware
|
||||
amd-ucode
|
||||
intel-ucode
|
||||
arkane-keyring
|
92
arkanium-build.d/arkanelinux/package.list
Normal file
92
arkanium-build.d/arkanelinux/package.list
Normal file
|
@ -0,0 +1,92 @@
|
|||
amberol
|
||||
apparmor
|
||||
arch-install-scripts
|
||||
arkane-application-cleaner
|
||||
arkane-wallpapers
|
||||
baobab
|
||||
bluez
|
||||
bluez-cups
|
||||
bluez-plugins
|
||||
bluez-utils
|
||||
btrfs-progs
|
||||
celluloid
|
||||
cheese
|
||||
cups
|
||||
cups-pdf
|
||||
dosfstools
|
||||
evince
|
||||
f2fs-tools
|
||||
firefox
|
||||
firefox-tweaks-arkane
|
||||
flatpak
|
||||
gdm
|
||||
gnome-backgrounds
|
||||
gnome-boxes
|
||||
gnome-calculator
|
||||
gnome-calendar
|
||||
gnome-characters
|
||||
gnome-clocks
|
||||
gnome-connections
|
||||
gnome-console
|
||||
gnome-console
|
||||
gnome-contacts
|
||||
gnome-control-center
|
||||
gnome-disk-utility
|
||||
gnome-firmware
|
||||
gnome-font-viewer
|
||||
gnome-logs
|
||||
gnome-maps
|
||||
gnome-photos
|
||||
gnome-screenshot
|
||||
gnome-shell
|
||||
gnome-software
|
||||
gnome-sound-recorder
|
||||
gnome-system-monitor
|
||||
gnome-text-editor
|
||||
gnome-weather
|
||||
gst-plugin-pipewire
|
||||
gst-plugins-base
|
||||
gst-plugins-good
|
||||
ibus-typing-booster
|
||||
libva-mesa-driver
|
||||
loupe
|
||||
man-db
|
||||
mesa
|
||||
mesa-tweaks-arkane
|
||||
mesa-vdpau
|
||||
mkinitcpio
|
||||
mkinitcpio-archiso
|
||||
nautilus
|
||||
neovim
|
||||
networkmanager
|
||||
noto-fonts
|
||||
noto-fonts-cjk
|
||||
noto-fonts-emoji
|
||||
openssh
|
||||
pacman-contrib
|
||||
pipewire
|
||||
pipewire-alsa
|
||||
pipewire-audio
|
||||
pipewire-jack
|
||||
pipewire-pulse
|
||||
plymouth
|
||||
power-profiles-daemon
|
||||
pv
|
||||
qemu-guest-agent
|
||||
simple-scan
|
||||
skel-arkane
|
||||
sof-firmware
|
||||
spice-vdagent
|
||||
sudo
|
||||
switcheroo-control
|
||||
terminus-font
|
||||
vulkan-intel
|
||||
vulkan-mesa-layers
|
||||
vulkan-radeon
|
||||
wireplumber
|
||||
xdg-desktop-portal-gnome
|
||||
xdg-user-dirs
|
||||
zsh
|
||||
zsh-autosuggestions
|
||||
zsh-completions
|
||||
zsh-syntax-highlighting
|
8
arkanium-build.d/arkanelinux/systemd.services
Normal file
8
arkanium-build.d/arkanelinux/systemd.services
Normal file
|
@ -0,0 +1,8 @@
|
|||
NetworkManager.service
|
||||
apparmor.service
|
||||
bluetooth.service
|
||||
cups.service
|
||||
fstrim.timer
|
||||
gdm.service
|
||||
paccache.timer
|
||||
systemd-boot-update.service
|
|
@ -8,12 +8,12 @@
|
|||
# Print manual if no parameters provided or invalid amount of parameters is provided
|
||||
if [[ ! -n $1 || -n $2 ]]; then
|
||||
cat <<- END
|
||||
Usage: bttrfs-deploy <action> [target]
|
||||
Usage: arkanium-deploy <action> [target]
|
||||
Actions:
|
||||
update Check for updates, optionally provide a target, if no target provided it defaults to primary
|
||||
deploy Deploy a new or update an existing deployment
|
||||
init Initialize bttrfs on a new system
|
||||
teardown Remove all bttrfs-deploy related files and folders
|
||||
init Initialize Arkanium on a new system
|
||||
teardown Remove all Arkanium-deploy related files and folders
|
||||
get-available List available packages in repo
|
||||
END
|
||||
exit 0
|
||||
|
@ -21,10 +21,10 @@ fi
|
|||
|
||||
## Set common variables
|
||||
#
|
||||
declare -r bttrfs_dir='/bttrfs/'
|
||||
declare -r bttrfs_deployment_dir="$bttrfs_dir/deployments"
|
||||
declare -r arkanium_dir='/arkanium/'
|
||||
declare -r arkanium_deployment_dir="$arkanium_dir/deployments"
|
||||
# FIXME: Automatically filter trailing /
|
||||
declare -r repo_url='https://repo.arkanelinux.org/bttrfs-test'
|
||||
declare -r repo_url='https://repo.arkanelinux.org/arkanium-test'
|
||||
declare -r repo_default_image='arkanelinux'
|
||||
declare -r os_name='arkane'
|
||||
|
||||
|
@ -38,7 +38,7 @@ cleanup_and_quit () {
|
|||
|
||||
# Remove temporary btrfs volumes
|
||||
# ONLY IF CUSTOM DEFINED?
|
||||
#[[ ! -n $BTTRFS_NO_CLEANUP || ! -n $subvol_created ]] &&
|
||||
#[[ ! -n $arkanium_NO_CLEANUP || ! -n $subvol_created ]] &&
|
||||
# btrfs subvolume delete $workdir 2> /dev/null
|
||||
|
||||
# Quit program if argument provided to function
|
||||
|
@ -66,41 +66,41 @@ done
|
|||
|
||||
## Core functions
|
||||
#
|
||||
# Initialize the system for bttrfs
|
||||
# Initialize the system for arkanium
|
||||
init () {
|
||||
|
||||
# Ensure systemd-boot is installed before continuing, for it is the only thing we support
|
||||
bootctl is-installed || cleanup_and_quit 'systemd-boot seems to not be installed'
|
||||
|
||||
printf '\e[1;34m-->\e[0m\e[1m Initializing bttrfs\e[0m\n'
|
||||
printf '\e[1;34m-->\e[0m\e[1m Initializing arkanium\e[0m\n'
|
||||
|
||||
[[ -d $bttrfs_dir ]] && cleanup_and_quit "$bttrfs_dir already exists"
|
||||
[[ -d $arkanium_dir ]] && cleanup_and_quit "$arkanium_dir already exists"
|
||||
|
||||
# Create the /bttrfs subvolume
|
||||
printf "\e[1;34m-->\e[0m\e[1m Creating $(readlink -m $bttrfs_dir) subvolume\e[0m\n"
|
||||
btrfs subvolume create $bttrfs_dir || cleanup_and_quit "Failed to create btrfs subvolume"
|
||||
# Create the /arkanium subvolume
|
||||
printf "\e[1;34m-->\e[0m\e[1m Creating $(readlink -m $arkanium_dir) subvolume\e[0m\n"
|
||||
btrfs subvolume create $arkanium_dir || cleanup_and_quit "Failed to create btrfs subvolume"
|
||||
|
||||
# Create directory structure
|
||||
printf "\e[1;34m-->\e[0m\e[1m Creating directory structure\e[0m\n"
|
||||
mkdir -pv $(readlink -m $bttrfs_dir/deployments) \
|
||||
$(readlink -m $bttrfs_dir/deployments/primary_a) \
|
||||
$(readlink -m $bttrfs_dir/deployments/primary_b) \
|
||||
$(readlink -m $bttrfs_dir/data) \
|
||||
$(readlink -m $bttrfs_dir/cache) \
|
||||
$(readlink -m $bttrfs_dir/shared) ||
|
||||
cleanup_and_quit "Failed to create /bttrfs and related directories"
|
||||
mkdir -pv $(readlink -m $arkanium_dir/deployments) \
|
||||
$(readlink -m $arkanium_dir/deployments/primary_a) \
|
||||
$(readlink -m $arkanium_dir/deployments/primary_b) \
|
||||
$(readlink -m $arkanium_dir/data) \
|
||||
$(readlink -m $arkanium_dir/cache) \
|
||||
$(readlink -m $arkanium_dir/shared) ||
|
||||
cleanup_and_quit "Failed to create /arkanium and related directories"
|
||||
|
||||
# Add home shared subvolume and make writable
|
||||
btrfs subvolume create $(readlink -m ${bttrfs_dir}/shared/home) || cleanup_and_quit "Failed to create home subvolume"
|
||||
btrfs property set -f -ts $(readlink -m ${bttrfs_dir}/shared/home)
|
||||
btrfs subvolume create $(readlink -m ${arkanium_dir}/shared/home) || cleanup_and_quit "Failed to create home subvolume"
|
||||
btrfs property set -f -ts $(readlink -m ${arkanium_dir}/shared/home)
|
||||
|
||||
# Write default config file
|
||||
printf "\e[1;34m-->\e[0m\e[1m Adding default config file\e[0m\n"
|
||||
cat <<- END > $bttrfs_dir/config
|
||||
cat <<- END > $arkanium_dir/config
|
||||
# Primary filesystem operating system
|
||||
primary_os='${repo_default_image}'
|
||||
|
||||
# Write /bttrfs/overlay overlay to root or etc
|
||||
# Write /arkanium/overlay overlay to root or etc
|
||||
enable_overlay=0
|
||||
|
||||
# Do not install additional packages defined customize
|
||||
|
@ -116,7 +116,7 @@ init () {
|
|||
initrd /amd-ucode.img
|
||||
initrd /intel-ucode.img
|
||||
initrd /initramfs-linux.img
|
||||
options root="LABEL=arkane_root" rootflags=subvol=bttrfs/deployments/primary_a/rootfs rw
|
||||
options root="LABEL=arkane_root" rootflags=subvol=arkanium/deployments/primary_a/rootfs rw
|
||||
END
|
||||
|
||||
cat <<- END > /boot/loader/entries/${os_name}-primary-b.conf
|
||||
|
@ -125,7 +125,7 @@ init () {
|
|||
initrd /amd-ucode.img
|
||||
initrd /intel-ucode.img
|
||||
initrd /initramfs-linux.img
|
||||
options root="LABEL=arkane_root" rootflags=subvol=bttrfs/deployments/primary_b/rootfs rw
|
||||
options root="LABEL=arkane_root" rootflags=subvol=arkanium/deployments/primary_b/rootfs rw
|
||||
END
|
||||
|
||||
exit 0
|
||||
|
@ -135,12 +135,12 @@ init () {
|
|||
teardown () {
|
||||
|
||||
cat <<- END
|
||||
WARNING: Removing bttrfs may leave your system in an unbootable state and you
|
||||
WARNING: Removing arkanium may leave your system in an unbootable state and you
|
||||
may have to manually reconfigure your bootloader etc.. Only proceed if you know
|
||||
what you are doing!
|
||||
|
||||
The following changes will be made to your system;
|
||||
- All subvolumes under $bttrfs_dir will be deleted
|
||||
- All subvolumes under $arkanium_dir will be deleted
|
||||
|
||||
END
|
||||
|
||||
|
@ -149,23 +149,23 @@ teardown () {
|
|||
|
||||
if [[ $input_confirm == 'I KNOW WHAT I AM DOING' ]]; then
|
||||
|
||||
printf '\e[1;34m-->\e[0m\e[1m Tearing down bttrfs\e[0m\n'
|
||||
printf '\e[1;34m-->\e[0m\e[1m Tearing down arkanium\e[0m\n'
|
||||
|
||||
# Quit with error if $bttrfs_dir does not exist
|
||||
if [[ ! -d $bttrfs_dir ]]; then
|
||||
printf "\e[1;31m<#>\e[0m $(readlink -m $bttrfs_dir) does not exist, there is nothing to tear down"
|
||||
# Quit with error if $arkanium_dir does not exist
|
||||
if [[ ! -d $arkanium_dir ]]; then
|
||||
printf "\e[1;31m<#>\e[0m $(readlink -m $arkanium_dir) does not exist, there is nothing to tear down"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Remove all nested subvolumes in $bttrfs_dir
|
||||
for volume in $(btrfs subvolume list $bttrfs_dir | grep -oE '[^ ]+$'); do
|
||||
btrfs property set -f -ts $(readlink -m $bttrfs_dir/$volume) ro false
|
||||
btrfs subvolume delete $(readlink -m $bttrfs_dir/$volume)
|
||||
# Remove all nested subvolumes in $arkanium_dir
|
||||
for volume in $(btrfs subvolume list $arkanium_dir | grep -oE '[^ ]+$'); do
|
||||
btrfs property set -f -ts $(readlink -m $arkanium_dir/$volume) ro false
|
||||
btrfs subvolume delete $(readlink -m $arkanium_dir/$volume)
|
||||
done
|
||||
|
||||
# Remove $bttrfs_dir itself
|
||||
btrfs property set -f -ts $(readlink -m $bttrfs_dir) ro false
|
||||
btrfs subvolume delete $(readlink -m $bttrfs_dir)
|
||||
# Remove $arkanium_dir itself
|
||||
btrfs property set -f -ts $(readlink -m $arkanium_dir) ro false
|
||||
btrfs subvolume delete $(readlink -m $arkanium_dir)
|
||||
|
||||
# Remove bootloader files
|
||||
rm -v /boot/loader/entries/${os_name}-*
|
||||
|
@ -190,7 +190,7 @@ get_available () {
|
|||
deploy () {
|
||||
|
||||
# Load defaults from config file
|
||||
source $bttrfs_dir/config
|
||||
source $arkanium_dir/config
|
||||
|
||||
# target and version are optional, if not defined default to primary latest
|
||||
[[ -n $2 ]] && declare -r deploy_target=$2 || declare -r deploy_target="$primary_os"
|
||||
|
@ -207,20 +207,20 @@ deploy () {
|
|||
data[2]=${data[2]//[$'\t\r\n']}
|
||||
|
||||
# Check if requested version is already downloaded
|
||||
if [[ -e $(readlink -m $bttrfs_dir/cache/${data[0]}.tar.${data[1]}) ]]; then
|
||||
if [[ -e $(readlink -m $arkanium_dir/cache/${data[0]}.tar.${data[1]}) ]]; then
|
||||
|
||||
printf "\e[1;34m-->\e[0m\e[1m ${data[0]} already in cache, skipping download\e[0m\n"
|
||||
|
||||
else
|
||||
|
||||
# Download the tarball
|
||||
wget -P $(readlink -m $bttrfs_dir/cache/) "${repo_url}/${repo_default_image}/${data[0]}.tar.${data[1]}" ||
|
||||
wget -P $(readlink -m $arkanium_dir/cache/) "${repo_url}/${repo_default_image}/${data[0]}.tar.${data[1]}" ||
|
||||
(printf "\e[1;31m<#>\e[0m Failed to download tarball\e[0m\n"; exit 1)
|
||||
|
||||
fi
|
||||
|
||||
printf "\e[1;34m-->\e[0m\e[1m Validating integrity\e[0m\n"
|
||||
sha1sum "$(readlink -m ${bttrfs_dir}/cache/${data[0]}.tar.${data[1]})" |
|
||||
sha1sum "$(readlink -m ${arkanium_dir}/cache/${data[0]}.tar.${data[1]})" |
|
||||
grep "${data[3]}" ||
|
||||
cleanup_and_quit "Checksum does not match repo file, got $chksum\e[0m\n"
|
||||
|
||||
|
@ -229,52 +229,52 @@ deploy () {
|
|||
#
|
||||
# Extract the root image if not yet extracted
|
||||
printf "\e[1;34m-->\e[0m\e[1m Writing root\e[0m\n"
|
||||
[[ ! -e $(readlink -m ${bttrfs_dir}/cache/${data[0]}.img) ]] &&
|
||||
tar -xf $(readlink -m ${bttrfs_dir}/cache/${data[0]}.tar.${data[1]}) -C $(readlink -m ${bttrfs_dir}/cache/) "${data[0]}.img" ||
|
||||
[[ ! -e $(readlink -m ${arkanium_dir}/cache/${data[0]}.img) ]] &&
|
||||
tar -xf $(readlink -m ${arkanium_dir}/cache/${data[0]}.tar.${data[1]}) -C $(readlink -m ${arkanium_dir}/cache/) "${data[0]}.img" ||
|
||||
cleanup_and_quit 'Failed to extract root'
|
||||
|
||||
# Write the root image
|
||||
btrfs receive -f $(readlink -m ${bttrfs_dir}/cache/${data[0]}.img) $(readlink -m ${bttrfs_dir}/deployments/primary_a/) ||
|
||||
btrfs receive -f $(readlink -m ${arkanium_dir}/cache/${data[0]}.img) $(readlink -m ${arkanium_dir}/deployments/primary_a/) ||
|
||||
cleanup_and_quit 'Failed to receive root'
|
||||
|
||||
# Cleanup root image
|
||||
rm $(readlink -m ${bttrfs_dir}/cache/${data[0]}.img)
|
||||
rm $(readlink -m ${arkanium_dir}/cache/${data[0]}.img)
|
||||
|
||||
# Ensure /var exists for mounting
|
||||
mkdir $(readlink -m ${bttrfs_dir}/)
|
||||
mkdir $(readlink -m ${arkanium_dir}/)
|
||||
|
||||
# Extract the etc image if not yet extracted
|
||||
printf "\e[1;34m-->\e[0m\e[1m Writing etc\e[0m\n"
|
||||
[[ ! -e $(readlink -m ${bttrfs_dir}/cache/${data[0]}-etc.img) ]] &&
|
||||
tar -xf $(readlink -m ${bttrfs_dir}/cache/${data[0]}.tar.${data[1]}) -C $(readlink -m ${bttrfs_dir}/cache/) "${data[0]}-etc.img" ||
|
||||
[[ ! -e $(readlink -m ${arkanium_dir}/cache/${data[0]}-etc.img) ]] &&
|
||||
tar -xf $(readlink -m ${arkanium_dir}/cache/${data[0]}.tar.${data[1]}) -C $(readlink -m ${arkanium_dir}/cache/) "${data[0]}-etc.img" ||
|
||||
cleanup_and_quit 'failed to extract etc'
|
||||
|
||||
# Write the etc image, we have to unlock rootfs temporarily to do this
|
||||
btrfs property set -f -ts $(readlink -m ${bttrfs_dir}/deployments/primary_a/rootfs) ro false ||
|
||||
btrfs property set -f -ts $(readlink -m ${arkanium_dir}/deployments/primary_a/rootfs) ro false ||
|
||||
cleanup_and_quit 'Failed to unlock root to write etc'
|
||||
btrfs receive -f $(readlink -m ${bttrfs_dir}/cache/${data[0]}-etc.img) $(readlink -m ${bttrfs_dir}/deployments/primary_a/rootfs/) ||
|
||||
btrfs receive -f $(readlink -m ${arkanium_dir}/cache/${data[0]}-etc.img) $(readlink -m ${arkanium_dir}/deployments/primary_a/rootfs/) ||
|
||||
cleanup_and_quit 'Failed to receive etc'
|
||||
btrfs property set -f -ts $(readlink -m ${bttrfs_dir}/deployments/primary_a/rootfs) ro true ||
|
||||
btrfs property set -f -ts $(readlink -m ${arkanium_dir}/deployments/primary_a/rootfs) ro true ||
|
||||
cleanup_and_quit 'Failed to lock root'
|
||||
|
||||
# Cleanup etc image
|
||||
rm $(readlink -m ${bttrfs_dir}/cache/${data[0]}-etc.img)
|
||||
rm $(readlink -m ${arkanium_dir}/cache/${data[0]}-etc.img)
|
||||
|
||||
# Overlay customizations to etc
|
||||
# TODO: overlay here if enabled in config file
|
||||
|
||||
# Extract the var image if not yet extracted
|
||||
printf "\e[1;34m-->\e[0m\e[1m Writing var\e[0m\n"
|
||||
[[ ! -e $(readlink -m ${bttrfs_dir}/cache/${data[0]}-var.img) ]] &&
|
||||
tar -xf $(readlink -m ${bttrfs_dir}/cache/${data[0]}.tar.${data[1]}) -C $(readlink -m ${bttrfs_dir}/cache/) "${data[0]}-var.img" ||
|
||||
[[ ! -e $(readlink -m ${arkanium_dir}/cache/${data[0]}-var.img) ]] &&
|
||||
tar -xf $(readlink -m ${arkanium_dir}/cache/${data[0]}.tar.${data[1]}) -C $(readlink -m ${arkanium_dir}/cache/) "${data[0]}-var.img" ||
|
||||
cleanup_and_quit 'failed to extract etc'
|
||||
|
||||
# Write the var image
|
||||
btrfs receive -f $(readlink -m ${bttrfs_dir}/cache/${data[0]}-var.img) $(readlink -m ${bttrfs_dir}/shared/) ||
|
||||
btrfs receive -f $(readlink -m ${arkanium_dir}/cache/${data[0]}-var.img) $(readlink -m ${arkanium_dir}/shared/) ||
|
||||
cleanup_and_quit 'Failed to receive var'
|
||||
|
||||
# Make var writable
|
||||
btrfs property set -f -ts $(readlink -m ${bttrfs_dir}/shared/var) ro false ||
|
||||
btrfs property set -f -ts $(readlink -m ${arkanium_dir}/shared/var) ro false ||
|
||||
cleanup_and_quit 'Failed to unlock var'
|
||||
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
base
|
|
@ -1,114 +0,0 @@
|
|||
#
|
||||
# /etc/pacman.conf
|
||||
#
|
||||
# See the pacman.conf(5) manpage for option and repository directives
|
||||
|
||||
#
|
||||
# GENERAL OPTIONS
|
||||
#
|
||||
[options]
|
||||
# The following paths are commented out with their default values listed.
|
||||
# If you wish to use different paths, uncomment and update the paths.
|
||||
#RootDir = /
|
||||
#DBPath = /var/lib/pacman/
|
||||
#CacheDir = /var/cache/pacman/pkg/
|
||||
#LogFile = /var/log/pacman.log
|
||||
#GPGDir = /etc/pacman.d/gnupg/
|
||||
#HookDir = /etc/pacman.d/hooks/
|
||||
HoldPkg = pacman glibc
|
||||
#XferCommand = /usr/bin/curl -L -C - -f -o %o %u
|
||||
#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
|
||||
#CleanMethod = KeepInstalled
|
||||
Architecture = auto
|
||||
|
||||
# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup
|
||||
#IgnorePkg =
|
||||
#IgnoreGroup =
|
||||
|
||||
#NoUpgrade =
|
||||
#NoExtract =
|
||||
|
||||
# Misc options
|
||||
#UseSyslog
|
||||
Color
|
||||
#NoProgressBar
|
||||
# We cannot check disk space from within a chroot environment
|
||||
#CheckSpace
|
||||
#VerbosePkgLists
|
||||
ParallelDownloads = 5
|
||||
ILoveCandy
|
||||
|
||||
# By default, pacman accepts packages signed by keys that its local keyring
|
||||
# trusts (see pacman-key and its man page), as well as unsigned packages.
|
||||
SigLevel = Required DatabaseOptional
|
||||
LocalFileSigLevel = Optional
|
||||
#RemoteFileSigLevel = Required
|
||||
|
||||
# NOTE: You must run `pacman-key --init` before first using pacman; the local
|
||||
# keyring can then be populated with the keys of all official Arch Linux
|
||||
# packagers with `pacman-key --populate archlinux`.
|
||||
|
||||
#
|
||||
# REPOSITORIES
|
||||
# - can be defined here or included from another file
|
||||
# - pacman will search repositories in the order defined here
|
||||
# - local/custom mirrors can be added here or in separate files
|
||||
# - repositories listed first will take precedence when packages
|
||||
# have identical names, regardless of version number
|
||||
# - URLs will have $repo replaced by the name of the current repo
|
||||
# - URLs will have $arch replaced by the name of the architecture
|
||||
#
|
||||
# Repository entries are of the format:
|
||||
# [repo-name]
|
||||
# Server = ServerName
|
||||
# Include = IncludePath
|
||||
#
|
||||
# The header [repo-name] is crucial - it must be present and
|
||||
# uncommented to enable the repo.
|
||||
#
|
||||
|
||||
# The testing repositories are disabled by default. To enable, uncomment the
|
||||
# repo name header and Include lines. You can add preferred servers immediately
|
||||
# after the header, and they will be used before the default mirrors.
|
||||
|
||||
[arkane]
|
||||
Server = https://repo.arkanelinux.org/$repo/os/$arch
|
||||
|
||||
[arkane-core]
|
||||
Server = https://repo.arkanelinux.org/$repo/os/$arch
|
||||
|
||||
[arkane-extra]
|
||||
Server = https://repo.arkanelinux.org/$repo/os/$arch
|
||||
|
||||
[arkane-cauldron]
|
||||
Server = https://repo.arkanelinux.org/$repo/os/$arch
|
||||
|
||||
[core]
|
||||
Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
[extra]
|
||||
Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
#[testing]
|
||||
#Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
#[community-testing]
|
||||
#Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
#[community]
|
||||
#Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
# If you want to run 32 bit applications on your x86_64 system,
|
||||
# enable the multilib repositories as required here.
|
||||
|
||||
#[multilib-testing]
|
||||
#Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
[multilib]
|
||||
Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
# An example of a custom package repository. See the pacman manpage for
|
||||
# tips on creating your own repositories.
|
||||
#[custom]
|
||||
#SigLevel = Optional TrustAll
|
||||
#Server = file:///home/custompkgs
|
Loading…
Add table
Add a link
Reference in a new issue