refactor(os): Install paru-bin instead of paru (#21)
We straight up install paru-bi via its PKGBUILD from AUR, we skip the additional step we used to do where we first installed paru from its GitHub project. This saves time and most importantly scarce RAM that Rust otherwise needs during paru compilation. On systems with little RAM (as in 4 GiB) paru's compilation process would sometimes fail when /etc/makepkg.conf when its MAKEFLAGS was set to use many cores e.g. via "-j$(nproc --ignore 1)". Without the manual paru compilation step we now don't need the ability anymore to --replace-conflicting packages.
This commit is contained in:
parent
1b94e7e3b8
commit
1bc09b7f8b
@ -320,7 +320,7 @@ After installation you're going to want to at least touch these points in your n
|
||||
- Unless you had a settings file or exported shell env vars per [Passwords](#passwords) you're going to want to change passwords now:
|
||||
- ZFS: The password for all datasets underneath `zpool` is `password`.
|
||||
- Local `root` account: The local `root` account's password is `password`.
|
||||
- Arch User Repository (AUR) helper: We installed [paru](https://github.com/Morganamilo/paru) as our AUR helper, we installed from GitHub via `makepkg -si` then replaced it with its [paru-bin](https://aur.archlinux.org/packages/paru-bin) version from AUR.
|
||||
- Arch User Repository (AUR) helper: We installed [paru](https://github.com/Morganamilo/paru) as our AUR helper, we installed from AUR as [paru-bin](https://aur.archlinux.org/packages/paru-bin).
|
||||
- In `/etc/systemd/network/50-wired.network` instead of a DHCP-based network config you can get a static one. The DHCP-based one for reference looks like:
|
||||
```
|
||||
...
|
||||
|
50
setup.sh
50
setup.sh
@ -903,56 +903,17 @@ function get_aur_helper () {
|
||||
usermod --append --groups 'wheel' 'build'
|
||||
printf -- '%s\n' '%wheel ALL=(ALL:ALL) NOPASSWD: ALL' > '/etc/sudoers.d/10-wheel-group-no-passwd-prompt'
|
||||
pushd /tmp
|
||||
git clone 'https://aur.archlinux.org/paru.git'
|
||||
chown -R 'build:' 'paru'
|
||||
pushd 'paru'
|
||||
git clone https://aur.archlinux.org/paru-bin.git
|
||||
chown -R 'build:' 'paru-bin'
|
||||
pushd 'paru-bin'
|
||||
sudo --user 'build' makepkg -si --noconfirm
|
||||
popd
|
||||
rm -rf 'paru'
|
||||
rm -rf 'paru-bin'
|
||||
popd
|
||||
}
|
||||
|
||||
function paru_install () {
|
||||
declare -a paru_install_packages
|
||||
[[ "${1}" ]] && while :; do
|
||||
case "${1}" in
|
||||
-[[:alnum:]]*)
|
||||
>&3 printf -- '%s\n' \
|
||||
'Short-form argument '"'${1}'"' not supported for function '"'${FUNCNAME[0]}()'"'. Only known accepted argument' \
|
||||
'is '"'"'--replace-conflicting'"'"' without a value given. Exiting ...'
|
||||
exit 77
|
||||
;;
|
||||
--replace-conflicting)
|
||||
pacman_force_yes='true'
|
||||
shift
|
||||
continue
|
||||
;;
|
||||
--*)
|
||||
>&3 printf -- '%s\n' \
|
||||
'Long-form argument '"'${1}'"' not supported for function '"'${FUNCNAME[0]}()'"'. Only known accepted argument' \
|
||||
'is '"'"'--replace-conflicting'"'"' without a value given. Exiting ...'
|
||||
exit 77
|
||||
;;
|
||||
'')
|
||||
# All arguments processed
|
||||
break
|
||||
;;
|
||||
*)
|
||||
paru_install_packages+=("${1}")
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
done || {
|
||||
>&3 printf -- '%s\n' \
|
||||
'No argument '"'${1}'"' given for function '"'${FUNCNAME[0]}'"'. Exiting ...'
|
||||
exit 77
|
||||
}
|
||||
if [[ "${pacman_force_yes}" ]]; then
|
||||
yes 'y' | sudo --user 'build' paru -S "${paru_install_packages[@]}"
|
||||
unset -v pacman_force_yes
|
||||
else
|
||||
sudo --user 'build' paru -S --noconfirm "${paru_install_packages[@]}"
|
||||
fi
|
||||
sudo --user build paru -S --noconfirm "${@}"
|
||||
}
|
||||
|
||||
function configure_syslinux () {
|
||||
@ -1214,7 +1175,6 @@ function install_os_in_chroot () {
|
||||
unleash_makepkg #2.5
|
||||
add_motd_getting_started_msg #2.6
|
||||
get_aur_helper #2.7
|
||||
paru_install --replace-conflicting 'paru-bin'
|
||||
paru_install 'zfs-dkms' 'zfs-utils' 'jq'
|
||||
hwclock --systohc
|
||||
mkinitcpio -P
|
||||
|
Loading…
x
Reference in New Issue
Block a user