Compare commits
7 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
63137eb046 | ||
![]() |
92ec5eb194 | ||
![]() |
f8e07c66c1 | ||
![]() |
2130eea235 | ||
![]() |
58fc4bbe45 | ||
![]() |
591ae02d55 | ||
![]() |
6311233f73 |
@@ -24,8 +24,6 @@ prepare_build(){
|
|||||||
|
|
||||||
load_profile "${profile}"
|
load_profile "${profile}"
|
||||||
|
|
||||||
netgroups=${netgroups_url}/netgroups-${initsys}.yaml
|
|
||||||
|
|
||||||
local pacman_conf pac_file="pacman-default.conf"
|
local pacman_conf pac_file="pacman-default.conf"
|
||||||
|
|
||||||
case "${stablility}" in
|
case "${stablility}" in
|
||||||
@@ -53,8 +51,6 @@ show_profile(){
|
|||||||
if ${verbose};then
|
if ${verbose};then
|
||||||
msg2 "autologin: %s" "${autologin}"
|
msg2 "autologin: %s" "${autologin}"
|
||||||
|
|
||||||
msg2 "netgroups: %s" "${netgroups}"
|
|
||||||
|
|
||||||
msg2 "hostname: %s" "${hostname}"
|
msg2 "hostname: %s" "${hostname}"
|
||||||
msg2 "username: %s" "${username}"
|
msg2 "username: %s" "${username}"
|
||||||
msg2 "password: %s" "${password}"
|
msg2 "password: %s" "${password}"
|
||||||
@@ -72,7 +68,6 @@ display_settings(){
|
|||||||
msg "OPTIONS:"
|
msg "OPTIONS:"
|
||||||
msg2 "profile: %s" "${profile}"
|
msg2 "profile: %s" "${profile}"
|
||||||
msg2 "initsys: %s" "${initsys}"
|
msg2 "initsys: %s" "${initsys}"
|
||||||
msg2 "kernel: %s" "${kernel}"
|
|
||||||
[[ -n ${gpgkey} ]] && msg2 "gpgkey: %s" "${gpgkey}"
|
[[ -n ${gpgkey} ]] && msg2 "gpgkey: %s" "${gpgkey}"
|
||||||
msg2 "stablility: %s" "${stablility}"
|
msg2 "stablility: %s" "${stablility}"
|
||||||
|
|
||||||
@@ -146,8 +141,6 @@ usage() {
|
|||||||
echo " [default: ${chroots_iso}]"
|
echo " [default: ${chroots_iso}]"
|
||||||
echo ' -t <dir> Target directory'
|
echo ' -t <dir> Target directory'
|
||||||
echo " [default: ${iso_pool}]"
|
echo " [default: ${iso_pool}]"
|
||||||
echo ' -k <name> Kernel to use'
|
|
||||||
echo " [default: ${kernel}]"
|
|
||||||
echo ' -i <name> Init system to use'
|
echo ' -i <name> Init system to use'
|
||||||
echo " [default: ${initsys}]"
|
echo " [default: ${initsys}]"
|
||||||
echo ' -g <key> The gpg key for sfs signing'
|
echo ' -g <key> The gpg key for sfs signing'
|
||||||
@@ -167,14 +160,13 @@ usage() {
|
|||||||
|
|
||||||
orig_argv=("$0" "$@")
|
orig_argv=("$0" "$@")
|
||||||
|
|
||||||
opts='p:r:t:k:i:g:czxmvqh'
|
opts='p:r:t:i:g:czxmvqh'
|
||||||
|
|
||||||
while getopts "${opts}" arg; do
|
while getopts "${opts}" arg; do
|
||||||
case "${arg}" in
|
case "${arg}" in
|
||||||
p) profile="$OPTARG" ;;
|
p) profile="$OPTARG" ;;
|
||||||
r) chroots_iso="$OPTARG" ;;
|
r) chroots_iso="$OPTARG" ;;
|
||||||
t) iso_pool="$OPTARG" ;;
|
t) iso_pool="$OPTARG" ;;
|
||||||
k) kernel="$OPTARG" ;;
|
|
||||||
i) initsys="$OPTARG" ;;
|
i) initsys="$OPTARG" ;;
|
||||||
g) gpgkey="$OPTARG" ;;
|
g) gpgkey="$OPTARG" ;;
|
||||||
c) clean_first=false ;;
|
c) clean_first=false ;;
|
||||||
|
@@ -235,8 +235,8 @@ download_sources() {
|
|||||||
|
|
||||||
local builddir
|
local builddir
|
||||||
builddir="$(mktemp -d)"
|
builddir="$(mktemp -d)"
|
||||||
chmod 1777 "$builddir"
|
# chmod 1777 "$builddir"
|
||||||
# chown "$makepkg_user:$makepkg_user" "$builddir"
|
chown "$makepkg_user:$makepkg_user" "$builddir"
|
||||||
|
|
||||||
# Ensure sources are downloaded
|
# Ensure sources are downloaded
|
||||||
sudo -u "$makepkg_user" --preserve-env=GNUPGHOME \
|
sudo -u "$makepkg_user" --preserve-env=GNUPGHOME \
|
||||||
|
@@ -35,9 +35,6 @@
|
|||||||
# unset defaults to given value
|
# unset defaults to given value
|
||||||
# kernel="linux"
|
# kernel="linux"
|
||||||
|
|
||||||
# custom additional kernel args
|
|
||||||
# kernel_args=""
|
|
||||||
|
|
||||||
# gpg key; leave empty or commented to skip sfs signing
|
# gpg key; leave empty or commented to skip sfs signing
|
||||||
# gpgkey=""
|
# gpgkey=""
|
||||||
|
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
#!/hint/bash
|
||||||
#
|
#
|
||||||
# /etc/makepkg.conf
|
# /etc/makepkg.conf
|
||||||
#
|
#
|
||||||
@@ -8,9 +9,10 @@
|
|||||||
#
|
#
|
||||||
#-- The download utilities that makepkg should use to acquire sources
|
#-- The download utilities that makepkg should use to acquire sources
|
||||||
# Format: 'protocol::agent'
|
# Format: 'protocol::agent'
|
||||||
DLAGENTS=('ftp::/usr/bin/curl -fC - --ftp-pasv --retry 3 --retry-delay 3 -o %o %u'
|
DLAGENTS=('file::/usr/bin/curl -gqC - -o %o %u'
|
||||||
'http::/usr/bin/curl -fLC - --retry 3 --retry-delay 3 -o %o %u'
|
'ftp::/usr/bin/curl -gqfC - --ftp-pasv --retry 3 --retry-delay 3 -o %o %u'
|
||||||
'https::/usr/bin/curl -fLC - --retry 3 --retry-delay 3 -o %o %u'
|
'http::/usr/bin/curl -gqb "" -fLC - --retry 3 --retry-delay 3 -o %o %u'
|
||||||
|
'https::/usr/bin/curl -gqb "" -fLC - --retry 3 --retry-delay 3 -o %o %u'
|
||||||
'rsync::/usr/bin/rsync --no-motd -z %u %o'
|
'rsync::/usr/bin/rsync --no-motd -z %u %o'
|
||||||
'scp::/usr/bin/scp -C %u %o')
|
'scp::/usr/bin/scp -C %u %o')
|
||||||
|
|
||||||
@@ -34,8 +36,6 @@ CARCH="x86_64"
|
|||||||
CHOST="x86_64-pc-linux-gnu"
|
CHOST="x86_64-pc-linux-gnu"
|
||||||
|
|
||||||
#-- Compiler and Linker Flags
|
#-- Compiler and Linker Flags
|
||||||
# -march (or -mcpu) builds exclusively for an architecture
|
|
||||||
# -mtune optimizes for an architecture, but builds for whole processor family
|
|
||||||
CPPFLAGS="-D_FORTIFY_SOURCE=2"
|
CPPFLAGS="-D_FORTIFY_SOURCE=2"
|
||||||
CFLAGS="-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt"
|
CFLAGS="-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt"
|
||||||
CXXFLAGS="-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt"
|
CXXFLAGS="-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt"
|
||||||
@@ -50,7 +50,7 @@ DEBUG_CXXFLAGS="-g -fvar-tracking-assignments"
|
|||||||
# BUILD ENVIRONMENT
|
# BUILD ENVIRONMENT
|
||||||
#########################################################################
|
#########################################################################
|
||||||
#
|
#
|
||||||
# Defaults: BUILDENV=(!distcc color !ccache check !sign)
|
# Defaults: BUILDENV=(!distcc !color !ccache check !sign)
|
||||||
# A negated environment option will do the opposite of the comments below.
|
# A negated environment option will do the opposite of the comments below.
|
||||||
#
|
#
|
||||||
#-- distcc: Use the Distributed C/C++/ObjC compiler
|
#-- distcc: Use the Distributed C/C++/ObjC compiler
|
||||||
@@ -73,7 +73,7 @@ BUILDENV=(!distcc color !ccache check !sign)
|
|||||||
# These are default values for the options=() settings
|
# These are default values for the options=() settings
|
||||||
#########################################################################
|
#########################################################################
|
||||||
#
|
#
|
||||||
# Default: OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge !optipng !upx !debug)
|
# Default: OPTIONS=(!strip docs libtool staticlibs emptydirs !zipman !purge !debug)
|
||||||
# A negated option will do the opposite of the comments below.
|
# A negated option will do the opposite of the comments below.
|
||||||
#
|
#
|
||||||
#-- strip: Strip symbols from binaries/libraries
|
#-- strip: Strip symbols from binaries/libraries
|
||||||
@@ -83,11 +83,9 @@ BUILDENV=(!distcc color !ccache check !sign)
|
|||||||
#-- emptydirs: Leave empty directories in packages
|
#-- emptydirs: Leave empty directories in packages
|
||||||
#-- zipman: Compress manual (man and info) pages in MAN_DIRS with gzip
|
#-- zipman: Compress manual (man and info) pages in MAN_DIRS with gzip
|
||||||
#-- purge: Remove files specified by PURGE_TARGETS
|
#-- purge: Remove files specified by PURGE_TARGETS
|
||||||
#-- upx: Compress binary executable files using UPX
|
|
||||||
#-- optipng: Optimize PNG images with optipng
|
|
||||||
#-- debug: Add debugging flags as specified in DEBUG_* variables
|
#-- debug: Add debugging flags as specified in DEBUG_* variables
|
||||||
#
|
#
|
||||||
OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge !optipng !upx !debug)
|
OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge !debug)
|
||||||
|
|
||||||
#-- File integrity checks to use. Valid: md5, sha1, sha256, sha384, sha512
|
#-- File integrity checks to use. Valid: md5, sha1, sha256, sha384, sha512
|
||||||
INTEGRITY_CHECK=(md5)
|
INTEGRITY_CHECK=(md5)
|
||||||
@@ -103,6 +101,8 @@ MAN_DIRS=({usr{,/local}{,/share},opt/*}/{man,info})
|
|||||||
DOC_DIRS=(usr/{,local/}{,share/}{doc,gtk-doc} opt/*/{doc,gtk-doc})
|
DOC_DIRS=(usr/{,local/}{,share/}{doc,gtk-doc} opt/*/{doc,gtk-doc})
|
||||||
#-- Files to be removed from all packages (if purge is specified)
|
#-- Files to be removed from all packages (if purge is specified)
|
||||||
PURGE_TARGETS=(usr/{,share}/info/dir .packlist *.pod)
|
PURGE_TARGETS=(usr/{,share}/info/dir .packlist *.pod)
|
||||||
|
#-- Directory to store source code in for debug packages
|
||||||
|
DBGSRCDIR="/usr/src/debug"
|
||||||
|
|
||||||
#########################################################################
|
#########################################################################
|
||||||
# PACKAGE OUTPUT
|
# PACKAGE OUTPUT
|
||||||
@@ -143,5 +143,3 @@ COMPRESSZ=(compress -c -f)
|
|||||||
#
|
#
|
||||||
PKGEXT='.pkg.tar.xz'
|
PKGEXT='.pkg.tar.xz'
|
||||||
SRCEXT='.src.tar.gz'
|
SRCEXT='.src.tar.gz'
|
||||||
|
|
||||||
# vim: set ft=sh ts=2 sw=2 et:
|
|
||||||
|
@@ -7,16 +7,6 @@ build() {
|
|||||||
add_module "via-agp"
|
add_module "via-agp"
|
||||||
add_module "sis-agp"
|
add_module "sis-agp"
|
||||||
add_module "intel-agp"
|
add_module "intel-agp"
|
||||||
|
|
||||||
if [[ $(uname -m) == i686 ]]; then
|
|
||||||
add_module "amd64-agp"
|
|
||||||
add_module "ati-agp"
|
|
||||||
add_module "sworks-agp"
|
|
||||||
add_module "ali-agp"
|
|
||||||
add_module "amd-k7-agp"
|
|
||||||
add_module "nvidia-agp"
|
|
||||||
add_module "efficeon-agp"
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
help() {
|
help() {
|
||||||
|
@@ -19,7 +19,7 @@ prepare_initcpio(){
|
|||||||
|
|
||||||
prepare_initramfs(){
|
prepare_initramfs(){
|
||||||
local mnt="$1"
|
local mnt="$1"
|
||||||
cp ${DATADIR}/mkinitcpio.conf $mnt/etc/mkinitcpio-${iso_name}.conf
|
cp ${DATADIR}/mkinitcpio.conf $mnt/etc/mkinitcpio-artix.conf
|
||||||
if [[ -n ${gpgkey} ]]; then
|
if [[ -n ${gpgkey} ]]; then
|
||||||
user_run "gpg --export ${gpgkey} >${AT_USERCONFDIR}/gpgkey"
|
user_run "gpg --export ${gpgkey} >${AT_USERCONFDIR}/gpgkey"
|
||||||
exec 17<>${AT_USERCONFDIR}/gpgkey
|
exec 17<>${AT_USERCONFDIR}/gpgkey
|
||||||
@@ -27,7 +27,7 @@ prepare_initramfs(){
|
|||||||
local _kernel=$(cat $mnt/usr/lib/modules/*/version)
|
local _kernel=$(cat $mnt/usr/lib/modules/*/version)
|
||||||
ARTIX_GNUPG_FD=${gpgkey:+17} chroot-run $mnt \
|
ARTIX_GNUPG_FD=${gpgkey:+17} chroot-run $mnt \
|
||||||
/usr/bin/mkinitcpio -k ${_kernel} \
|
/usr/bin/mkinitcpio -k ${_kernel} \
|
||||||
-c /etc/mkinitcpio-${iso_name}.conf \
|
-c /etc/mkinitcpio-artix.conf \
|
||||||
-g /boot/initramfs.img
|
-g /boot/initramfs.img
|
||||||
|
|
||||||
if [[ -n ${gpgkey} ]]; then
|
if [[ -n ${gpgkey} ]]; then
|
||||||
@@ -47,13 +47,8 @@ prepare_boot_extras(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
configure_grub(){
|
configure_grub(){
|
||||||
local conf="$1"
|
local conf="$1/boot/grub/kernels.cfg"
|
||||||
|
sed -e "s|@iso_label@|${iso_label}|" -i $conf
|
||||||
sed -e "s|@arch@|${target_arch}|g" \
|
|
||||||
-e "s|@iso_label@|${iso_label}|" \
|
|
||||||
-e "s|@iso_name@|${iso_name}|g" \
|
|
||||||
-e "s|@kernel_args@|${kernel_args}|g" \
|
|
||||||
-i $conf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
prepare_grub(){
|
prepare_grub(){
|
||||||
@@ -72,16 +67,8 @@ prepare_grub(){
|
|||||||
|
|
||||||
cat ${grub}/${platform}/cdboot.img ${grub}/${platform}/${img} > ${grub}/${platform}/eltorito.img
|
cat ${grub}/${platform}/cdboot.img ${grub}/${platform}/${img} > ${grub}/${platform}/eltorito.img
|
||||||
|
|
||||||
case ${target_arch} in
|
platform=x86_64-efi
|
||||||
'i686')
|
img=bootx64.efi
|
||||||
platform=i386-efi
|
|
||||||
img=bootia32.efi
|
|
||||||
;;
|
|
||||||
'x86_64')
|
|
||||||
platform=x86_64-efi
|
|
||||||
img=bootx64.efi
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
prepare_dir ${efi}
|
prepare_dir ${efi}
|
||||||
prepare_dir ${grub}/${platform}
|
prepare_dir ${grub}/${platform}
|
||||||
@@ -93,7 +80,7 @@ prepare_grub(){
|
|||||||
grub-mkimage -d ${grub}/${platform} -o ${efi}/${img} -O ${platform} -p ${prefix} iso9660
|
grub-mkimage -d ${grub}/${platform} -o ${efi}/${img} -O ${platform} -p ${prefix} iso9660
|
||||||
|
|
||||||
prepare_dir ${grub}/themes
|
prepare_dir ${grub}/themes
|
||||||
cp -r ${theme}/themes/${iso_name} ${grub}/themes/
|
cp -r ${theme}/themes/artix ${grub}/themes/
|
||||||
cp ${data}/unicode.pf2 ${grub}
|
cp ${data}/unicode.pf2 ${grub}
|
||||||
cp -r ${theme}/{locales,tz} ${grub}
|
cp -r ${theme}/{locales,tz} ${grub}
|
||||||
|
|
||||||
|
@@ -67,8 +67,6 @@ load_profile(){
|
|||||||
services_live=('artix-live' 'pacman-init')
|
services_live=('artix-live' 'pacman-init')
|
||||||
fi
|
fi
|
||||||
|
|
||||||
[[ -z ${netgroups_url} ]] && netgroups_url="https://raw.githubusercontent.com/artix-linux/netgroups/master"
|
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -93,7 +91,7 @@ write_live_session_conf(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
load_pkgs(){
|
load_pkgs(){
|
||||||
local pkglist="$1" init="$2" _kv="$3"
|
local pkglist="$1" init="$2"
|
||||||
info "Loading Packages: [%s] ..." "${pkglist##*/}"
|
info "Loading Packages: [%s] ..." "${pkglist##*/}"
|
||||||
|
|
||||||
local _init="s|>$init||g"
|
local _init="s|>$init||g"
|
||||||
@@ -104,7 +102,6 @@ load_pkgs(){
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
local _blacklist="s|>blacklist.*||g" \
|
local _blacklist="s|>blacklist.*||g" \
|
||||||
_kernel="s|KERNEL|$_kv|g" \
|
|
||||||
_space="s| ||g" \
|
_space="s| ||g" \
|
||||||
_clean=':a;N;$!ba;s/\n/ /g' \
|
_clean=':a;N;$!ba;s/\n/ /g' \
|
||||||
_com_rm="s|#.*||g"
|
_com_rm="s|#.*||g"
|
||||||
@@ -116,6 +113,5 @@ load_pkgs(){
|
|||||||
| sed "$_init" \
|
| sed "$_init" \
|
||||||
| sed "$_init_rm1" \
|
| sed "$_init_rm1" \
|
||||||
| sed "$_init_rm2" \
|
| sed "$_init_rm2" \
|
||||||
| sed "$_kernel" \
|
|
||||||
| sed "$_clean"))
|
| sed "$_clean"))
|
||||||
}
|
}
|
||||||
|
@@ -9,44 +9,6 @@
|
|||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
# GNU General Public License for more details.
|
# GNU General Public License for more details.
|
||||||
|
|
||||||
write_bootloader_conf(){
|
|
||||||
local conf="$1/bootloader.conf"
|
|
||||||
msg2 "Writing %s ..." "${conf##*/}"
|
|
||||||
echo '---' > "$conf"
|
|
||||||
echo "efiBootLoader: \"grub\"" >> "$conf"
|
|
||||||
echo "kernel: \"/vmlinuz-$kernel-${target_arch}\"" >> "$conf"
|
|
||||||
echo "img: \"/initramfs-$kernel-${target_arch}.img\"" >> "$conf"
|
|
||||||
echo "fallback: \"/initramfs-$kernel-${target_arch}-fallback.img\"" >> "$conf"
|
|
||||||
echo 'timeout: "10"' >> "$conf"
|
|
||||||
echo "kernelLine: \", with ${kernel}\"" >> "$conf"
|
|
||||||
echo "fallbackKernelLine: \", with ${kernel} (fallback initramfs)\"" >> "$conf"
|
|
||||||
echo 'grubInstall: "grub-install"' >> "$conf"
|
|
||||||
echo 'grubMkconfig: "grub-mkconfig"' >> "$conf"
|
|
||||||
echo 'grubCfg: "/boot/grub/grub.cfg"' >> "$conf"
|
|
||||||
echo '#efiBootloaderId: "dirname"' >> "$conf"
|
|
||||||
}
|
|
||||||
|
|
||||||
write_servicescfg_conf(){
|
|
||||||
local conf="$1/servicescfg.conf" init="$2"
|
|
||||||
msg2 "Writing %s ..." "${conf##*/}"
|
|
||||||
echo '---' > "$conf"
|
|
||||||
echo "initsys: $init" >> "$conf"
|
|
||||||
echo '' >> "$conf"
|
|
||||||
echo 'services:' >> "$conf"
|
|
||||||
echo ' enabled:' >> "$conf"
|
|
||||||
for svc in ${services[@]};do
|
|
||||||
echo " - name: $svc" >> "$conf"
|
|
||||||
echo ' runlevel: default' >> "$conf"
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
write_initcpio_conf(){
|
|
||||||
local conf="$1/initcpio.conf"
|
|
||||||
msg2 "Writing %s ..." "${conf##*/}"
|
|
||||||
echo "---" > "$conf"
|
|
||||||
echo "kernel: ${kernel}" >> "$conf"
|
|
||||||
}
|
|
||||||
|
|
||||||
write_users_conf(){
|
write_users_conf(){
|
||||||
local conf="$1/users.conf"
|
local conf="$1/users.conf"
|
||||||
msg2 "Writing %s ..." "${conf##*/}"
|
msg2 "Writing %s ..." "${conf##*/}"
|
||||||
@@ -61,43 +23,51 @@ write_users_conf(){
|
|||||||
echo "doAutologin: false" >> "$conf"
|
echo "doAutologin: false" >> "$conf"
|
||||||
echo "sudoersGroup: wheel" >> "$conf"
|
echo "sudoersGroup: wheel" >> "$conf"
|
||||||
echo "setRootPassword: true" >> "$conf"
|
echo "setRootPassword: true" >> "$conf"
|
||||||
echo "doReusePassword: false" >> "$conf" # only used in old 'users' module
|
# echo "doReusePassword: false" >> "$conf" # only used in old 'users' module
|
||||||
echo "availableShells: /bin/bash, /bin/zsh" >> "$conf" # only used in new 'users' module
|
echo "availableShells: /bin/bash, /bin/zsh" >> "$conf" # only used in new 'users' module
|
||||||
echo "avatarFilePath: ~/.face" >> "$conf"
|
echo "avatarFilePath: ~/.face" >> "$conf"
|
||||||
}
|
}
|
||||||
|
|
||||||
write_netinstall_conf(){
|
write_servicescfg_conf(){
|
||||||
local conf="$1/netinstall.conf"
|
local init="$2"
|
||||||
|
local conf="$1"/"$init"cfg.conf state='add'
|
||||||
msg2 "Writing %s ..." "${conf##*/}"
|
msg2 "Writing %s ..." "${conf##*/}"
|
||||||
echo "---" > "$conf"
|
echo '---' > "$conf"
|
||||||
echo "groupsUrl: ${netgroups}" >> "$conf"
|
if [[ "$init" == 'runit' ]];then
|
||||||
|
state='enabled'
|
||||||
|
echo 'svdir: /etc/runit/sv' >> "$conf"
|
||||||
|
echo '' >> "$conf"
|
||||||
|
echo 'runsvdir: /etc/runit/runsvdir' >> "$conf"
|
||||||
|
fi
|
||||||
|
echo '' >> "$conf"
|
||||||
|
echo 'services:' >> "$conf"
|
||||||
|
echo " $state:" >> "$conf"
|
||||||
|
for svc in ${services[@]};do
|
||||||
|
echo " - name: $svc" >> "$conf"
|
||||||
|
echo ' runlevel: default' >> "$conf"
|
||||||
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
write_unpack_conf(){
|
write_postcfg_conf(){
|
||||||
local conf="$1/unpackfs.conf"
|
local conf="$1/postcfg.conf" init="$2"
|
||||||
msg2 "Writing %s ..." "${conf##*/}"
|
sed -e "s|openrc|$init|" -i "$conf"
|
||||||
echo "---" > "$conf"
|
}
|
||||||
echo "unpack:" >> "$conf"
|
|
||||||
echo " - source: \"/run/${iso_name}/bootmnt/${iso_name}/${target_arch}/rootfs.sfs\"" >> "$conf"
|
write_netinstall_conf(){
|
||||||
echo " sourcefs: \"squashfs\"" >> "$conf"
|
local conf="$1/netinstall.conf" init="$2"
|
||||||
echo " destination: \"\"" >> "$conf"
|
sed -e "s|netgroups-openrc.yaml|netgroups-$init.yaml|" -i "$conf"
|
||||||
if [[ -f "${desktop_list}" ]] ; then
|
|
||||||
echo " - source: \"/run/${iso_name}/bootmnt/${iso_name}/${target_arch}/desktopfs.sfs\"" >> "$conf"
|
|
||||||
echo " sourcefs: \"squashfs\"" >> "$conf"
|
|
||||||
echo " destination: \"\"" >> "$conf"
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
configure_calamares(){
|
configure_calamares(){
|
||||||
local dest="$1" mods="$1/etc/calamares/modules" init="$2"
|
local mods="$1/etc/calamares/modules" init="$2"
|
||||||
if [[ -d $dest/etc/calamares/modules ]];then
|
if [[ -d "$mods" ]];then
|
||||||
info "Configuring [Calamares]"
|
info "Configuring [Calamares]"
|
||||||
write_netinstall_conf "$mods"
|
write_netinstall_conf "$mods" "$init"
|
||||||
write_unpack_conf "$mods"
|
|
||||||
write_users_conf "$mods"
|
write_users_conf "$mods"
|
||||||
write_initcpio_conf "$mods"
|
|
||||||
write_servicescfg_conf "$mods" "$init"
|
write_servicescfg_conf "$mods" "$init"
|
||||||
write_bootloader_conf "$mods"
|
write_postcfg_conf "$mods" "$init"
|
||||||
|
local name="$init"cfg
|
||||||
|
sed -e "s|openrccfg|$name|" -i "$1"/etc/calamares/settings.conf
|
||||||
info "Done configuring [Calamares]"
|
info "Done configuring [Calamares]"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
@@ -288,7 +288,7 @@ make_sfs() {
|
|||||||
error "The path %s does not exist" "${src}"
|
error "The path %s does not exist" "${src}"
|
||||||
retrun 1
|
retrun 1
|
||||||
fi
|
fi
|
||||||
local timer=$(get_timer) dest=${iso_root}/${iso_name}/${target_arch}
|
local timer=$(get_timer) dest=${iso_root}/artix/${target_arch}
|
||||||
local name=${1##*/}
|
local name=${1##*/}
|
||||||
local sfs="${dest}/${name}.sfs"
|
local sfs="${dest}/${name}.sfs"
|
||||||
mkdir -p ${dest}
|
mkdir -p ${dest}
|
||||||
@@ -401,8 +401,7 @@ make_iso() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
gen_iso_fn(){
|
gen_iso_fn(){
|
||||||
local vars=() name
|
local vars=("artix") name
|
||||||
vars+=("${iso_name}")
|
|
||||||
vars+=("${profile}")
|
vars+=("${profile}")
|
||||||
[[ ${initsys} == 'runit' ]] && vars+=("${initsys}")
|
[[ ${initsys} == 'runit' ]] && vars+=("${initsys}")
|
||||||
vars+=("${iso_version}")
|
vars+=("${iso_version}")
|
||||||
@@ -522,7 +521,7 @@ make_grub(){
|
|||||||
|
|
||||||
prepare_grub "${work_dir}/rootfs" "${work_dir}/livefs" "${iso_root}"
|
prepare_grub "${work_dir}/rootfs" "${work_dir}/livefs" "${iso_root}"
|
||||||
|
|
||||||
configure_grub "${iso_root}/boot/grub/kernels.cfg"
|
configure_grub "${iso_root}"
|
||||||
|
|
||||||
: > ${work_dir}/grub.lock
|
: > ${work_dir}/grub.lock
|
||||||
msg "Done [/iso/boot/grub]"
|
msg "Done [/iso/boot/grub]"
|
||||||
@@ -538,14 +537,14 @@ compress_images(){
|
|||||||
|
|
||||||
prepare_images(){
|
prepare_images(){
|
||||||
local timer=$(get_timer)
|
local timer=$(get_timer)
|
||||||
load_pkgs "${root_list}" "${initsys}" "${kernel}"
|
load_pkgs "${root_list}" "${initsys}"
|
||||||
run_safe "make_rootfs"
|
run_safe "make_rootfs"
|
||||||
if [[ -f "${desktop_list}" ]] ; then
|
if [[ -f "${desktop_list}" ]] ; then
|
||||||
load_pkgs "${desktop_list}" "${initsys}" "${kernel}"
|
load_pkgs "${desktop_list}" "${initsys}"
|
||||||
run_safe "make_desktopfs"
|
run_safe "make_desktopfs"
|
||||||
fi
|
fi
|
||||||
if [[ -f ${live_list} ]]; then
|
if [[ -f ${live_list} ]]; then
|
||||||
load_pkgs "${live_list}" "${initsys}" "${kernel}"
|
load_pkgs "${live_list}" "${initsys}"
|
||||||
run_safe "make_livefs"
|
run_safe "make_livefs"
|
||||||
fi
|
fi
|
||||||
run_safe "make_bootfs"
|
run_safe "make_bootfs"
|
||||||
|
11
lib/util.sh
11
lib/util.sh
@@ -47,11 +47,6 @@ get_osname(){
|
|||||||
echo "${NAME}"
|
echo "${NAME}"
|
||||||
}
|
}
|
||||||
|
|
||||||
get_osid(){
|
|
||||||
source /usr/lib/os-release
|
|
||||||
echo "${ID}"
|
|
||||||
}
|
|
||||||
|
|
||||||
init_artools_base(){
|
init_artools_base(){
|
||||||
|
|
||||||
target_arch=$(uname -m)
|
target_arch=$(uname -m)
|
||||||
@@ -89,16 +84,10 @@ init_artools_iso(){
|
|||||||
|
|
||||||
[[ -z ${iso_version} ]] && iso_version=$(date +%Y%m%d)
|
[[ -z ${iso_version} ]] && iso_version=$(date +%Y%m%d)
|
||||||
|
|
||||||
iso_name=$(get_osid)
|
|
||||||
|
|
||||||
iso_label="ARTIX_$(date +%Y%m)"
|
iso_label="ARTIX_$(date +%Y%m)"
|
||||||
|
|
||||||
[[ -z ${initsys} ]] && initsys="openrc"
|
[[ -z ${initsys} ]] && initsys="openrc"
|
||||||
|
|
||||||
[[ -z ${kernel} ]] && kernel="linux"
|
|
||||||
|
|
||||||
[[ -z ${kernel_args} ]] && kernel_args=""
|
|
||||||
|
|
||||||
[[ -z ${gpgkey} ]] && gpgkey=''
|
[[ -z ${gpgkey} ]] && gpgkey=''
|
||||||
|
|
||||||
[[ -z ${uplimit} ]] && uplimit=100
|
[[ -z ${uplimit} ]] && uplimit=100
|
||||||
|
Reference in New Issue
Block a user