forked from mirrored-repos/manjaro-tools
Compare commits
1 commit
master
...
experiment
Author | SHA1 | Date | |
---|---|---|---|
|
ddcf213bce |
32 changed files with 267 additions and 1242 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,4 +1,3 @@
|
||||||
.idea
|
|
||||||
*~
|
*~
|
||||||
*.tar.gz
|
*.tar.gz
|
||||||
*.tar.xz
|
*.tar.xz
|
||||||
|
|
5
Makefile
5
Makefile
|
@ -1,4 +1,4 @@
|
||||||
Version=0.15.14
|
Version=0.15.9
|
||||||
|
|
||||||
PREFIX = /usr/local
|
PREFIX = /usr/local
|
||||||
SYSCONFDIR = /etc
|
SYSCONFDIR = /etc
|
||||||
|
@ -13,8 +13,7 @@ BIN_BASE = \
|
||||||
bin/manjaro-chroot \
|
bin/manjaro-chroot \
|
||||||
bin/fstabgen \
|
bin/fstabgen \
|
||||||
bin/signfile \
|
bin/signfile \
|
||||||
bin/chroot-run \
|
bin/chroot-run
|
||||||
bin/check-yaml
|
|
||||||
|
|
||||||
LIBS_BASE = \
|
LIBS_BASE = \
|
||||||
lib/util.sh \
|
lib/util.sh \
|
||||||
|
|
17
README.md
17
README.md
|
@ -56,7 +56,7 @@ overriding
|
||||||
# default target branch
|
# default target branch
|
||||||
# target_branch=stable
|
# target_branch=stable
|
||||||
|
|
||||||
# default target arch: auto detect
|
# default taget arch: auto detect
|
||||||
# target_arch=$(uname -m)
|
# target_arch=$(uname -m)
|
||||||
|
|
||||||
# cache dir where buildpkg, buildtree cache packages/pkgbuild, builiso iso files
|
# cache dir where buildpkg, buildtree cache packages/pkgbuild, builiso iso files
|
||||||
|
@ -69,7 +69,7 @@ overriding
|
||||||
# log_dir='/var/log/manjaro-tools'
|
# log_dir='/var/log/manjaro-tools'
|
||||||
|
|
||||||
# custom build mirror server
|
# custom build mirror server
|
||||||
# build_mirror=https://manjaro.moson.eu
|
# build_mirror=https://mirror.netzspielplatz.de/manjaro/packages
|
||||||
|
|
||||||
################ buildtree ###############
|
################ buildtree ###############
|
||||||
|
|
||||||
|
@ -95,13 +95,13 @@ overriding
|
||||||
# build_list_iso=default
|
# build_list_iso=default
|
||||||
|
|
||||||
# the dist release; default: auto
|
# the dist release; default: auto
|
||||||
# dist_release=auto
|
# dist_release=17.1
|
||||||
|
|
||||||
# the branding; default: auto
|
# the branding; default: auto
|
||||||
# dist_branding="MANJARO"
|
# dist_branding="MJRO"
|
||||||
|
|
||||||
# unset defaults to given value
|
# unset defaults to given value
|
||||||
# kernel="linux54"
|
# kernel="linux414"
|
||||||
|
|
||||||
# gpg key; leave empty or commented to skip sfs signing
|
# gpg key; leave empty or commented to skip sfs signing
|
||||||
# gpgkey=""
|
# gpgkey=""
|
||||||
|
@ -240,9 +240,7 @@ Usage: buildiso [options]
|
||||||
-h This help
|
-h This help
|
||||||
-k <name> Kernel to use
|
-k <name> Kernel to use
|
||||||
[default: linux49]
|
[default: linux49]
|
||||||
-l Create permalink
|
|
||||||
-m Set SquashFS image mode to persistence
|
-m Set SquashFS image mode to persistence
|
||||||
-o Enable office installer
|
|
||||||
-p <profile> Buildset or profile [default: default]
|
-p <profile> Buildset or profile [default: default]
|
||||||
-q Query settings and pretend build
|
-q Query settings and pretend build
|
||||||
-r <dir> Chroots directory
|
-r <dir> Chroots directory
|
||||||
|
@ -407,7 +405,6 @@ Usage: deployiso [options]
|
||||||
-t Create ISO torrent
|
-t Create ISO torrent
|
||||||
-u Update remote directory
|
-u Update remote directory
|
||||||
-v Verbose output
|
-v Verbose output
|
||||||
-z Upload permalinks (shell.osdn.net)
|
|
||||||
~~~
|
~~~
|
||||||
|
|
||||||
###### * upload official build list, ie all built iso defined in a build list
|
###### * upload official build list, ie all built iso defined in a build list
|
||||||
|
@ -421,7 +418,3 @@ deployiso -p official
|
||||||
~~~
|
~~~
|
||||||
deployiso -p xfce -std
|
deployiso -p xfce -std
|
||||||
~~~
|
~~~
|
||||||
|
|
||||||
|
|
||||||
##### Fast compression
|
|
||||||
Lz4 Is very fast but not a good compression ratio, good for testing
|
|
||||||
|
|
54
bin/buildiso.in
Normal file → Executable file
54
bin/buildiso.in
Normal file → Executable file
|
@ -21,7 +21,6 @@ import ${LIBDIR}/util.sh
|
||||||
show_profile(){
|
show_profile(){
|
||||||
prepare_profile "$1"
|
prepare_profile "$1"
|
||||||
msg2 "iso_file: %s" "${iso_file}"
|
msg2 "iso_file: %s" "${iso_file}"
|
||||||
msg2 "iso_label: %s" "${iso_label}"
|
|
||||||
if ${verbose}; then
|
if ${verbose}; then
|
||||||
msg2 "autologin: %s" "${autologin}"
|
msg2 "autologin: %s" "${autologin}"
|
||||||
msg2 "nonfree_mhwd: %s" "${nonfree_mhwd}"
|
msg2 "nonfree_mhwd: %s" "${nonfree_mhwd}"
|
||||||
|
@ -29,34 +28,24 @@ show_profile(){
|
||||||
[[ ${target_arch} == 'x86_64' ]] && msg2 "multilib: %s" "${multilib}"
|
[[ ${target_arch} == 'x86_64' ]] && msg2 "multilib: %s" "${multilib}"
|
||||||
|
|
||||||
msg2 "extra: %s" "${extra}"
|
msg2 "extra: %s" "${extra}"
|
||||||
msg2 "office_installer: %s" "${office_installer}"
|
|
||||||
msg2 "permalink: %s" "${permalink}"
|
|
||||||
|
|
||||||
msg2 "netinstall: %s" "${netinstall}"
|
msg2 "netinstall: %s" "${netinstall}"
|
||||||
msg2 "chrootcfg: %s" "${chrootcfg}"
|
msg2 "chrootcfg: %s" "${chrootcfg}"
|
||||||
${netinstall} && msg2 "netgroups: %s" "$(get_yaml)"
|
${netinstall} && msg2 "netgroups: %s" "$(get_yaml)"
|
||||||
msg2 "geoip: %s" "${geoip}"
|
msg2 "geoip: %s" "${geoip}"
|
||||||
msg2 "oem_used: %s" "${oem_used}"
|
|
||||||
|
|
||||||
msg2 "efi_boot_loader: %s" "${efi_boot_loader}"
|
msg2 "efi_boot_loader: %s" "${efi_boot_loader}"
|
||||||
msg2 "custom_boot_args: %s" "${custom_boot_args}"
|
|
||||||
|
|
||||||
msg2 "hostname: %s" "${hostname}"
|
msg2 "hostname: %s" "${hostname}"
|
||||||
msg2 "username: %s" "${username}"
|
msg2 "username: %s" "${username}"
|
||||||
msg2 "password: %s" "${password}"
|
msg2 "password: %s" "${password}"
|
||||||
msg2 "user_shell: %s" "${user_shell}"
|
|
||||||
msg2 "login_shell: %s" "${login_shell}"
|
msg2 "login_shell: %s" "${login_shell}"
|
||||||
msg2 "addgroups: %s" "${addgroups}"
|
msg2 "addgroups: %s" "${addgroups}"
|
||||||
[[ -n ${smb_workgroup} ]] && msg2 "smb_workgroup: %s" "${smb_workgroup}"
|
[[ -n ${smb_workgroup} ]] && msg2 "smb_workgroup: %s" "${smb_workgroup}"
|
||||||
|
|
||||||
msg2 "enable_systemd: %s" "${enable_systemd[*]}"
|
msg2 "enable_systemd: %s" "${enable_systemd[*]}"
|
||||||
msg2 "enable_systemd_timers: %s" "${enable_systemd_timers[*]}"
|
|
||||||
msg2 "enable_systemd_live: %s" "${enable_systemd_live[*]}"
|
msg2 "enable_systemd_live: %s" "${enable_systemd_live[*]}"
|
||||||
[[ -n ${disable_systemd[*]} ]] && msg2 "disable_systemd: %s" "${disable_systemd[*]}"
|
[[ -n ${disable_systemd[*]} ]] && msg2 "disable_systemd: %s" "${disable_systemd[*]}"
|
||||||
|
|
||||||
msg2 "strict_snaps: %s" "${strict_snaps}"
|
|
||||||
msg2 "classic_snaps: %s" "${classic_snaps}"
|
|
||||||
msg2 "snap_channel: %s" "${snap_channel}"
|
|
||||||
fi
|
fi
|
||||||
reset_profile
|
reset_profile
|
||||||
}
|
}
|
||||||
|
@ -66,7 +55,7 @@ display_settings(){
|
||||||
show_config
|
show_config
|
||||||
|
|
||||||
msg "PROFILE:"
|
msg "PROFILE:"
|
||||||
msg2 "gitlab branch: %s" "${branch}"
|
msg2 "gitlab brach: %s" "${branch}"
|
||||||
msg2 "build_lists: %s" "$(show_build_lists ${list_dir_iso})"
|
msg2 "build_lists: %s" "$(show_build_lists ${list_dir_iso})"
|
||||||
msg2 "build_list_iso: %s" "${build_list_iso}"
|
msg2 "build_list_iso: %s" "${build_list_iso}"
|
||||||
msg2 "is_build_list: %s" "${is_build_list}"
|
msg2 "is_build_list: %s" "${is_build_list}"
|
||||||
|
@ -82,9 +71,6 @@ display_settings(){
|
||||||
msg2 "images_only: %s" "${images_only}"
|
msg2 "images_only: %s" "${images_only}"
|
||||||
msg2 "iso_only: %s" "${iso_only}"
|
msg2 "iso_only: %s" "${iso_only}"
|
||||||
msg2 "persist: %s" "${persist}"
|
msg2 "persist: %s" "${persist}"
|
||||||
msg2 "extra: %s" "${full_iso}"
|
|
||||||
msg2 "permalink: %s" "${permalink}"
|
|
||||||
msg2 "office_installer: %s" "${office_installer}"
|
|
||||||
|
|
||||||
msg "DIST SETTINGS:"
|
msg "DIST SETTINGS:"
|
||||||
msg2 "dist_name: %s" "${dist_name}"
|
msg2 "dist_name: %s" "${dist_name}"
|
||||||
|
@ -92,8 +78,9 @@ display_settings(){
|
||||||
msg2 "dist_codename: %s" "${dist_codename}"
|
msg2 "dist_codename: %s" "${dist_codename}"
|
||||||
|
|
||||||
msg "ISO INFO:"
|
msg "ISO INFO:"
|
||||||
|
msg2 "iso_label: %s" "${iso_label}"
|
||||||
msg2 "iso_compression: %s" "${iso_compression}"
|
msg2 "iso_compression: %s" "${iso_compression}"
|
||||||
|
|
||||||
msg "BUILD QUEUE:"
|
msg "BUILD QUEUE:"
|
||||||
run show_profile "${build_list_iso}"
|
run show_profile "${build_list_iso}"
|
||||||
}
|
}
|
||||||
|
@ -114,35 +101,31 @@ iso_only=false
|
||||||
verbose=false
|
verbose=false
|
||||||
persist=false
|
persist=false
|
||||||
initialize=false
|
initialize=false
|
||||||
permalink=false
|
|
||||||
|
|
||||||
usage() {
|
usage() {
|
||||||
echo "Usage: ${0##*/} [options]"
|
echo "Usage: ${0##*/} [options]"
|
||||||
|
echo " -i Initialize iso-profiles repo [default: ${branch}]"
|
||||||
|
echo " -p <profile> Buildset or profile [default: ${build_list_iso}]"
|
||||||
echo " -a <arch> Arch [default: ${target_arch}]"
|
echo " -a <arch> Arch [default: ${target_arch}]"
|
||||||
echo " -b <branch> Branch [default: ${target_branch}]"
|
echo " -b <branch> Branch [default: ${target_branch}]"
|
||||||
echo ' -c Disable clean work dir'
|
|
||||||
echo ' -d <comp> Compression used for build ISO: gzip, lzma, lz4, lzo, xz, zstd'
|
|
||||||
echo " [default: ${iso_compression}]"
|
|
||||||
echo ' -f Build full ISO (extra=true)'
|
|
||||||
echo ' -g <key> The gpg key for sfs signing'
|
|
||||||
echo " [default: ${gpgkey}]"
|
|
||||||
echo " -i Initialize iso-profiles repo [default: ${branch}]"
|
|
||||||
echo ' -k <name> Kernel to use'
|
|
||||||
echo " [default: ${kernel}]"
|
|
||||||
echo ' -l Create permalink'
|
|
||||||
echo ' -m Set SquashFS image mode to persistence'
|
|
||||||
echo ' -n Disable multilib'
|
|
||||||
echo " -p <profile> Buildset or profile [default: ${build_list_iso}]"
|
|
||||||
echo ' -o Enable office installer module'
|
|
||||||
echo ' -q Query settings and pretend build'
|
|
||||||
echo ' -r <dir> Chroots directory'
|
echo ' -r <dir> Chroots directory'
|
||||||
echo " [default: ${chroots_iso}]"
|
echo " [default: ${chroots_iso}]"
|
||||||
echo ' -t <dir> Target directory'
|
echo ' -t <dir> Target directory'
|
||||||
echo " [default: ${cache_dir_iso}]"
|
echo " [default: ${cache_dir_iso}]"
|
||||||
echo ' -v Verbose output to log file, show profile detail (-q)'
|
echo ' -k <name> Kernel to use'
|
||||||
|
echo " [default: ${kernel}]"
|
||||||
|
echo ' -g <key> The gpg key for sfs signing'
|
||||||
|
echo " [default: ${gpgkey}]"
|
||||||
|
echo ' -m Set SquashFS image mode to persistence'
|
||||||
|
echo ' -c Disable clean work dir'
|
||||||
|
echo ' -f Build full ISO (extra=true)'
|
||||||
|
echo ' -d <comp> Compression used for build ISO: xz, gzip, lzma, lzo, lz4'
|
||||||
|
echo " [default: ${iso_compression}]"
|
||||||
echo ' -x Build images only'
|
echo ' -x Build images only'
|
||||||
echo ' -z Generate iso only'
|
echo ' -z Generate iso only'
|
||||||
echo ' Requires pre built images (-x)'
|
echo ' Requires pre built images (-x)'
|
||||||
|
echo ' -v Verbose output to log file, show profile detail (-q)'
|
||||||
|
echo ' -q Query settings and pretend build'
|
||||||
echo ' -h This help'
|
echo ' -h This help'
|
||||||
echo ''
|
echo ''
|
||||||
echo ''
|
echo ''
|
||||||
|
@ -151,7 +134,7 @@ usage() {
|
||||||
|
|
||||||
orig_argv=("$@")
|
orig_argv=("$@")
|
||||||
|
|
||||||
opts='p:a:b:r:t:k:g:d:cfzxmnvqhilo'
|
opts='p:a:b:r:t:k:g:d:cfzxmvqhi'
|
||||||
|
|
||||||
while getopts "${opts}" arg; do
|
while getopts "${opts}" arg; do
|
||||||
case "${arg}" in
|
case "${arg}" in
|
||||||
|
@ -164,7 +147,6 @@ while getopts "${opts}" arg; do
|
||||||
g) gpgkey="$OPTARG" ;;
|
g) gpgkey="$OPTARG" ;;
|
||||||
k) kernel="$OPTARG" ;;
|
k) kernel="$OPTARG" ;;
|
||||||
m) persist=true ;;
|
m) persist=true ;;
|
||||||
n) no_multilib=true ;; # only exist if set here
|
|
||||||
p) build_list_iso="$OPTARG" ;;
|
p) build_list_iso="$OPTARG" ;;
|
||||||
q) pretend=true ;;
|
q) pretend=true ;;
|
||||||
r) chroots_iso="$OPTARG" ;;
|
r) chroots_iso="$OPTARG" ;;
|
||||||
|
@ -172,8 +154,6 @@ while getopts "${opts}" arg; do
|
||||||
v) verbose=true ;;
|
v) verbose=true ;;
|
||||||
x) images_only=true ;;
|
x) images_only=true ;;
|
||||||
z) iso_only=true ;;
|
z) iso_only=true ;;
|
||||||
l) permalink=true ;;
|
|
||||||
o) office_installer=true ;;
|
|
||||||
h|?) usage 0 ;;
|
h|?) usage 0 ;;
|
||||||
*) echo "invalid argument '${arg}'"; usage 1 ;;
|
*) echo "invalid argument '${arg}'"; usage 1 ;;
|
||||||
esac
|
esac
|
||||||
|
|
|
@ -45,8 +45,6 @@ display_settings(){
|
||||||
msg2 "verbose: %s" "${verbose}"
|
msg2 "verbose: %s" "${verbose}"
|
||||||
msg2 "signiso: %s" "${sign}"
|
msg2 "signiso: %s" "${sign}"
|
||||||
msg2 "torrent: %s" "${torrent}"
|
msg2 "torrent: %s" "${torrent}"
|
||||||
msg2 "shell_upload: %s" "${shell_upload}"
|
|
||||||
msg2 "upd_homepage: %s" "${upd_homepage}"
|
|
||||||
|
|
||||||
if ${torrent}; then
|
if ${torrent}; then
|
||||||
msg2 "tracker_url: %s" "${tracker_url}"
|
msg2 "tracker_url: %s" "${tracker_url}"
|
||||||
|
@ -76,15 +74,11 @@ torrent=false
|
||||||
update=false
|
update=false
|
||||||
verbose=false
|
verbose=false
|
||||||
sign=false
|
sign=false
|
||||||
alt_storage=false
|
|
||||||
shell_upload=false
|
|
||||||
upd_homepage=false
|
|
||||||
|
|
||||||
rsync_args=(-aP -e ssh)
|
rsync_args=(-aP -e ssh)
|
||||||
|
|
||||||
usage() {
|
usage() {
|
||||||
echo "Usage: ${0##*/} [options]"
|
echo "Usage: ${0##*/} [options]"
|
||||||
echo ' -a Use alternate storage server'
|
|
||||||
echo ' -d Use hidden remote directory'
|
echo ' -d Use hidden remote directory'
|
||||||
echo ' -h This help'
|
echo ' -h This help'
|
||||||
echo " -l Limit bandwidth in kB/s [default: ${limit}]"
|
echo " -l Limit bandwidth in kB/s [default: ${limit}]"
|
||||||
|
@ -94,18 +88,15 @@ usage() {
|
||||||
echo ' -t Create ISO torrent'
|
echo ' -t Create ISO torrent'
|
||||||
echo ' -u Update remote directory'
|
echo ' -u Update remote directory'
|
||||||
echo ' -v Verbose output'
|
echo ' -v Verbose output'
|
||||||
echo ' -w Update download page on manjaro.org'
|
|
||||||
echo ' -z Upload permalinks (shell.osdn.net)'
|
|
||||||
echo ''
|
echo ''
|
||||||
echo ''
|
echo ''
|
||||||
exit $1
|
exit $1
|
||||||
}
|
}
|
||||||
|
|
||||||
opts='adhl:p:qstuvwz'
|
opts='dhl:p:qstuv'
|
||||||
|
|
||||||
while getopts "${opts}" arg; do
|
while getopts "${opts}" arg; do
|
||||||
case "${arg}" in
|
case "${arg}" in
|
||||||
a) alt_storage=true ;;
|
|
||||||
d) hidden=true ;;
|
d) hidden=true ;;
|
||||||
l) limit="$OPTARG"; rsync_args+=(--bwlimit=${limit}) ;;
|
l) limit="$OPTARG"; rsync_args+=(--bwlimit=${limit}) ;;
|
||||||
p) build_list_iso="$OPTARG" ;;
|
p) build_list_iso="$OPTARG" ;;
|
||||||
|
@ -114,8 +105,6 @@ while getopts "${opts}" arg; do
|
||||||
t) torrent=true ;;
|
t) torrent=true ;;
|
||||||
u) update=true; rsync_args+=(-u) ;;
|
u) update=true; rsync_args+=(-u) ;;
|
||||||
v) verbose=true; rsync_args+=(-v --stats) ;;
|
v) verbose=true; rsync_args+=(-v --stats) ;;
|
||||||
w) upd_homepage=true; shell_upload=true ;;
|
|
||||||
z) shell_upload=true ;;
|
|
||||||
h|?) usage 0 ;;
|
h|?) usage 0 ;;
|
||||||
*) echo "invalid argument '${arg}'"; usage 1 ;;
|
*) echo "invalid argument '${arg}'"; usage 1 ;;
|
||||||
esac
|
esac
|
||||||
|
|
|
@ -115,12 +115,11 @@ if ${build_locales}; then
|
||||||
printf '%s.UTF-8 UTF-8\n' en_US > "$working_dir/etc/locale.gen"
|
printf '%s.UTF-8 UTF-8\n' en_US > "$working_dir/etc/locale.gen"
|
||||||
printf 'LANG=%s.UTF-8\n' en_US > "$working_dir/etc/locale.conf"
|
printf 'LANG=%s.UTF-8\n' en_US > "$working_dir/etc/locale.conf"
|
||||||
printf 'LC_MESSAGES=C\n' >> "$working_dir/etc/locale.conf"
|
printf 'LC_MESSAGES=C\n' >> "$working_dir/etc/locale.conf"
|
||||||
|
|
||||||
chroot_args=(${pac_conf:+-C "$pac_conf"} ${makepkg_conf:+-M "$makepkg_conf"} \
|
|
||||||
${mirrors_conf:+-S "$mirrors_conf"} ${build_mirror:+-B "$build_mirror"} \
|
|
||||||
${cache_dir:+-c "$cache_dir"} ${keep_flag})
|
|
||||||
|
|
||||||
exec chroot-run \
|
|
||||||
${chroot_args[*]} \
|
|
||||||
"$working_dir" locale-gen
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
chroot_args=(${pac_conf:+-C "$pac_conf"} ${makepkg_conf:+-M "$makepkg_conf"} ${mirrors_conf:+-S "$mirrors_conf"} ${build_mirror:+-B "$build_mirror"} ${cache_dir:+-c "$cache_dir"} ${keep_flag})
|
||||||
|
|
||||||
|
exec chroot-run \
|
||||||
|
${chroot_args[*]} \
|
||||||
|
"$working_dir" locale-gen
|
||||||
|
|
||||||
|
|
|
@ -11,4 +11,4 @@
|
||||||
|
|
||||||
version=@version@
|
version=@version@
|
||||||
|
|
||||||
find $PWD -maxdepth 1 -regex '.*\.pkg\.tar\.\(xz\|zst\)' -exec signfile {} \;
|
find $PWD -maxdepth 1 -name '*.pkg.tar.xz' -exec signfile {} \;
|
||||||
|
|
136
bin/testiso.in
136
bin/testiso.in
|
@ -11,123 +11,29 @@
|
||||||
|
|
||||||
version=@version@
|
version=@version@
|
||||||
|
|
||||||
LIBDIR='@libdir@'
|
|
||||||
|
|
||||||
[[ -r ${LIBDIR}/util-msg.sh ]] && source ${LIBDIR}/util-msg.sh
|
|
||||||
|
|
||||||
import ${LIBDIR}/util.sh
|
|
||||||
|
|
||||||
if [ $# -eq 0 ]; then
|
if [ $# -eq 0 ]; then
|
||||||
msg "No <profile>"
|
echo "
|
||||||
msg2 "Usage: testiso <profile>"
|
usage: testiso <isofile> [id|ic|sd|sc|vd|vc]
|
||||||
|
|
||||||
|
id boot iso as IDE disk
|
||||||
|
ic boot iso as IDE cd-rom
|
||||||
|
sd boot iso as SCSI disk
|
||||||
|
sc boot iso as SCSI cd-rom
|
||||||
|
vd boot iso as virtio disk
|
||||||
|
vc boot iso as virtio cd-rom
|
||||||
|
"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
vdi_size=10240 # 10GB size
|
case "${2}" in
|
||||||
|
id) IF="ide"; MEDIA="disk";;
|
||||||
#Check if already exist virtual disk and in case create it
|
ic) IF="ide"; MEDIA="cdrom";;
|
||||||
if [[ -e ~/VirtualBox\ VMs/Manjaro/Manjaro.vbox ]]; then
|
sd) IF="scsi"; MEDIA="disk";;
|
||||||
msg "Manjaro Virtual Machine Found"
|
sc) IF="scsi"; MEDIA="cdrom";;
|
||||||
else
|
vd) IF="virtio"; MEDIA="disk";;
|
||||||
msg "We create a new VirtualBox Machine called Manjaro"
|
vc) IF="virtio"; MEDIA="cdrom";;
|
||||||
msg2 "We create a new Virtual Disk Image ( vdi ) with ${vdi_size}GB"
|
*) IF="scsi"; MEDIA="cdrom";;
|
||||||
VBoxManage createmedium disk --filename ~/VirtualBox\ VMs/Manjaro/Manjaro.vdi --size ${vdi_size} --format VDI --variant Fixed
|
esac
|
||||||
|
|
||||||
UUID=$(VBoxManage showhdinfo ~/VirtualBox\ VMs/Manjaro/Manjaro.vdi | awk 'NR == 1 {print $2}') #uuid of vdi disk
|
|
||||||
gui_lang=$(awk -F'[.=]' '/LANG/ {print $2}' /etc/locale.conf)
|
|
||||||
|
|
||||||
echo '<?xml version="1.0"?>
|
|
||||||
<!--
|
|
||||||
** DO NOT EDIT THIS FILE.
|
|
||||||
** If you make changes to this file while any VirtualBox related application
|
|
||||||
** is running, your changes will be overwritten later, without taking effect.
|
|
||||||
** Use VBoxManage or the VirtualBox Manager GUI to make changes.
|
|
||||||
-->
|
|
||||||
<VirtualBox xmlns="http://www.virtualbox.org/" version="1.16-linux">
|
|
||||||
<Machine uuid="{d5d29291-32e4-4c8e-9633-ecc0511966da}" name="Manjaro" OSType="ArchLinux_64" snapshotFolder="Snapshots" lastStateChange="2019-08-17T15:20:11Z">
|
|
||||||
<MediaRegistry>
|
|
||||||
<HardDisks>
|
|
||||||
<HardDisk uuid="{UUID}" location="Manjaro.vdi" format="VDI" type="Normal"/>
|
|
||||||
</HardDisks>
|
|
||||||
</MediaRegistry>
|
|
||||||
<Hardware>
|
|
||||||
<CPU>
|
|
||||||
<PAE enabled="false"/>
|
|
||||||
<LongMode enabled="true"/>
|
|
||||||
<X2APIC enabled="true"/>
|
|
||||||
<HardwareVirtExLargePages enabled="false"/>
|
|
||||||
</CPU>
|
|
||||||
<Memory RAMSize="2048"/>
|
|
||||||
<Firmware type="EFI"/>
|
|
||||||
<HID Pointing="USBTablet"/>
|
|
||||||
<Display VRAMSize="16" accelerate3D="true"/>
|
|
||||||
<VideoCapture file="." fps="25"/>
|
|
||||||
<BIOS>
|
|
||||||
<IOAPIC enabled="true"/>
|
|
||||||
</BIOS>
|
|
||||||
<USB>
|
|
||||||
<Controllers>
|
|
||||||
<Controller name="OHCI" type="OHCI"/>
|
|
||||||
</Controllers>
|
|
||||||
</USB>
|
|
||||||
<Network>
|
|
||||||
<Adapter slot="0" enabled="true" MACAddress="080027967634" type="82540EM">
|
|
||||||
<NAT/>
|
|
||||||
</Adapter>
|
|
||||||
</Network>
|
|
||||||
<AudioAdapter codec="AD1980" driver="Pulse" enabled="true" enabledIn="false"/>
|
|
||||||
<RTC localOrUTC="UTC"/>
|
|
||||||
<GuestProperties>
|
|
||||||
<GuestProperty name="/VirtualBox/HostInfo/GUI/LanguageID" value="gui_lang" timestamp="1566055357633717000" flags=""/>
|
|
||||||
</GuestProperties>
|
|
||||||
</Hardware>
|
|
||||||
<StorageControllers>
|
|
||||||
<StorageController name="IDE" type="PIIX4" PortCount="2" useHostIOCache="true" Bootable="true">
|
|
||||||
<AttachedDevice passthrough="false" type="DVD" hotpluggable="false" port="1" device="0"/>
|
|
||||||
</StorageController>
|
|
||||||
<StorageController name="SATA" type="AHCI" PortCount="1" useHostIOCache="false" Bootable="true" IDE0MasterEmulationPort="0" IDE0SlaveEmulationPort="1" IDE1MasterEmulationPort="2" IDE1SlaveEmulationPort="3">
|
|
||||||
<AttachedDevice type="HardDisk" hotpluggable="false" port="0" device="0">
|
|
||||||
<Image uuid="{UUID}"/>
|
|
||||||
</AttachedDevice>
|
|
||||||
</StorageController>
|
|
||||||
</StorageControllers>
|
|
||||||
</Machine>
|
|
||||||
</VirtualBox>' > ~/VirtualBox\ VMs/Manjaro/Manjaro.vbox
|
|
||||||
|
|
||||||
sed -i "s/UUID/$UUID/g" ~/VirtualBox\ VMs/Manjaro/Manjaro.vbox
|
|
||||||
sed -i "s/gui_lang/$gui_lang/g" ~/VirtualBox\ VMs/Manjaro/Manjaro.vbox
|
|
||||||
|
|
||||||
VBoxManage registervm ~/VirtualBox\ VMs/Manjaro/Manjaro.vbox #register the manjaro vbox machine
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
VBoxManage storageattach Manjaro --storagectl IDE --port 1 --device 0 --medium emptydrive #empty the dvd drive
|
|
||||||
sleep 1
|
|
||||||
|
|
||||||
load_user_info
|
|
||||||
|
|
||||||
load_config "${USERCONFDIR}/manjaro-tools.conf" || load_config "${SYSCONFDIR}/manjaro-tools.conf"
|
|
||||||
|
|
||||||
run_dir=${cache_dir_iso}
|
|
||||||
dist_number=${dist_release}
|
|
||||||
|
|
||||||
iso_dir=$(find ${run_dir} -type d -iname $1)
|
|
||||||
|
|
||||||
iso=${iso_dir}/${dist_number}
|
|
||||||
|
|
||||||
if [[ -e $(ls ${iso}/*.iso) ]]; then
|
|
||||||
iso_name=$(ls ${iso}/*.iso)
|
|
||||||
else msg "No ISO to load present"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
VBoxManage storageattach Manjaro --storagectl IDE --port 1 --device 0 --type dvddrive --medium $iso_name #attach dvd manjaro iso
|
|
||||||
|
|
||||||
sleep 1
|
|
||||||
|
|
||||||
msg2 "Run Vbox Manjaro with ${iso_name}"
|
|
||||||
|
|
||||||
sleep 2
|
|
||||||
|
|
||||||
VBoxManage startvm Manjaro #run vbox machine
|
|
||||||
|
|
||||||
|
echo qemu -m 256 -drive file=${1},if=${IF},media=${MEDIA},boot=on
|
||||||
|
qemu -m 256 -drive file=${1},if=${IF},media=${MEDIA},boot=on
|
||||||
|
|
|
@ -29,12 +29,6 @@ windowExpanding: ${windowexp}
|
||||||
# in CalamaresUtilsGui, 800x520.
|
# in CalamaresUtilsGui, 800x520.
|
||||||
windowSize: ${windowsize}
|
windowSize: ${windowsize}
|
||||||
|
|
||||||
# Placement of Calamares window. Either "center" or "free".
|
|
||||||
# Whether "center" actually works does depend on the window
|
|
||||||
# manager in use (and only makes sense if you're not using
|
|
||||||
# *windowExpanding* set to "fullscreen").
|
|
||||||
windowPlacement: ${windowplacement}
|
|
||||||
|
|
||||||
# These are strings shown to the user in the user interface.
|
# These are strings shown to the user in the user interface.
|
||||||
# There is no provision for translating them -- since they
|
# There is no provision for translating them -- since they
|
||||||
# are names, the string is included as-is.
|
# are names, the string is included as-is.
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
architect
|
architect
|
||||||
gnome
|
gnome
|
||||||
kde
|
kde
|
||||||
|
lxqt
|
||||||
netinstall
|
netinstall
|
||||||
xfce
|
xfce
|
||||||
|
|
2
data/iso.list.d/sonar.list
Normal file
2
data/iso.list.d/sonar.list
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
gnome-edition
|
||||||
|
mate-edition
|
|
@ -131,12 +131,9 @@ DBGSRCDIR="/usr/src/debug"
|
||||||
COMPRESSGZ=(gzip -c -f -n)
|
COMPRESSGZ=(gzip -c -f -n)
|
||||||
COMPRESSBZ2=(bzip2 -c -f)
|
COMPRESSBZ2=(bzip2 -c -f)
|
||||||
COMPRESSXZ=(xz -c -z -)
|
COMPRESSXZ=(xz -c -z -)
|
||||||
COMPRESSZST=(zstd -c -T0 --ultra -20 -)
|
|
||||||
COMPRESSLRZ=(lrzip -q)
|
COMPRESSLRZ=(lrzip -q)
|
||||||
COMPRESSLZO=(lzop -q)
|
COMPRESSLZO=(lzop -q)
|
||||||
COMPRESSZ=(compress -c -f)
|
COMPRESSZ=(compress -c -f)
|
||||||
COMPRESSLZ4=(lz4 -q)
|
|
||||||
COMPRESSLZ=(lzip -c -f)
|
|
||||||
|
|
||||||
#########################################################################
|
#########################################################################
|
||||||
# EXTENSION DEFAULTS
|
# EXTENSION DEFAULTS
|
||||||
|
@ -145,5 +142,5 @@ COMPRESSLZ=(lzip -c -f)
|
||||||
# WARNING: Do NOT modify these variables unless you know what you are
|
# WARNING: Do NOT modify these variables unless you know what you are
|
||||||
# doing.
|
# doing.
|
||||||
#
|
#
|
||||||
PKGEXT='.pkg.tar.zst'
|
PKGEXT='.pkg.tar.xz'
|
||||||
SRCEXT='.src.tar.gz'
|
SRCEXT='.src.tar.gz'
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
# default target branch
|
# default target branch
|
||||||
# target_branch=stable
|
# target_branch=stable
|
||||||
|
|
||||||
# default target arch: auto detect
|
# default taget arch: auto detect
|
||||||
# target_arch=$(uname -m)
|
# target_arch=$(uname -m)
|
||||||
|
|
||||||
# cache dir where buildpkg, buildtree cache packages/pkgbuild, builiso iso files
|
# cache dir where buildpkg, buildtree cache packages/pkgbuild, builiso iso files
|
||||||
|
@ -18,7 +18,7 @@
|
||||||
# log_dir='/var/log/manjaro-tools'
|
# log_dir='/var/log/manjaro-tools'
|
||||||
|
|
||||||
# custom build mirror server
|
# custom build mirror server
|
||||||
# build_mirror=https://manjaro.moson.eu/
|
# build_mirror=https://mirror.netzspielplatz.de/manjaro/packages
|
||||||
|
|
||||||
################ buildtree ###############
|
################ buildtree ###############
|
||||||
|
|
||||||
|
@ -37,17 +37,17 @@
|
||||||
|
|
||||||
################ buildiso ################
|
################ buildiso ################
|
||||||
|
|
||||||
# default branch for iso-profiles repo: v18.1 Juhraya master>development release
|
#default branch for iso-profiles repo: v18.0 Illyria master>development release
|
||||||
# branch=v18.1
|
# branch=v18.0
|
||||||
|
|
||||||
# default iso build list; name without .list extension
|
# default iso build list; name without .list extension
|
||||||
# build_list_iso=default
|
# build_list_iso=default
|
||||||
|
|
||||||
# the dist release; default: auto
|
# the dist release; default: auto
|
||||||
# dist_release=18.1
|
# dist_release=18.0
|
||||||
|
|
||||||
# the dist codename; default: auto
|
# the dist codename; default: auto
|
||||||
# dist_codename=Juhraya
|
# dist_codename=Illyria
|
||||||
|
|
||||||
# the OS branding; default: auto
|
# the OS branding; default: auto
|
||||||
# dist_name
|
# dist_name
|
||||||
|
@ -55,11 +55,12 @@
|
||||||
# the branding; default: auto
|
# the branding; default: auto
|
||||||
# dist_branding="MJRO"
|
# dist_branding="MJRO"
|
||||||
|
|
||||||
# compression used, possible values gzip, lzma, lz4, lzo, xy, zstd (default)
|
# compression used, possible values xz (default, best compression), gzip, lzma, lzo, lz4
|
||||||
# iso_compression=zstd
|
# lz4 is faster but worst compression, may be useful for locally testing isos
|
||||||
|
# iso_compression=xz
|
||||||
|
|
||||||
# unset defaults to given value
|
# unset defaults to given value
|
||||||
# kernel="linux54"
|
# kernel="linux419"
|
||||||
|
|
||||||
# gpg key; leave empty or commented to skip sfs signing
|
# gpg key; leave empty or commented to skip sfs signing
|
||||||
# gpgkey=""
|
# gpgkey=""
|
||||||
|
@ -80,9 +81,6 @@
|
||||||
# (possible units: pixel (px) or font-units (em))
|
# (possible units: pixel (px) or font-units (em))
|
||||||
# windowsize="800px,520px"
|
# windowsize="800px,520px"
|
||||||
|
|
||||||
# placement of Calamares window, either "center" or "free".
|
|
||||||
# windowplacement="center"
|
|
||||||
|
|
||||||
# colors for text and background components:
|
# colors for text and background components:
|
||||||
|
|
||||||
# background of the sidebar
|
# background of the sidebar
|
||||||
|
@ -116,7 +114,7 @@
|
||||||
# limit=
|
# limit=
|
||||||
|
|
||||||
# the torrent tracker urls, comma separated
|
# the torrent tracker urls, comma separated
|
||||||
# tracker_url='udp://tracker.opentrackr.org:1337'
|
# tracker_url='udp://mirror.strits.dk:6969'
|
||||||
|
|
||||||
# Piece size, 2^n
|
# Piece size, 2^n
|
||||||
# piece_size=21
|
# piece_size=21
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
MODULES=(loop dm-snapshot)
|
MODULES="loop dm-snapshot"
|
||||||
HOOKS=(base udev miso_shutdown miso miso_loop_mnt miso_pxe_common miso_pxe_http miso_pxe_nbd miso_pxe_nfs miso_kms modconf block filesystems keyboard keymap)
|
HOOKS="base udev miso_shutdown miso miso_loop_mnt miso_pxe_common miso_pxe_http miso_pxe_nbd miso_pxe_nfs miso_kms modconf block filesystems keyboard keymap"
|
||||||
COMPRESSION="xz"
|
COMPRESSION="xz"
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
HoldPkg = pacman glibc
|
HoldPkg = pacman glibc
|
||||||
# If upgrades are available for these packages they will be asked for first
|
# If upgrades are available for these packages they will be asked for first
|
||||||
SyncFirst = manjaro-system archlinux-keyring manjaro-keyring
|
SyncFirst = manjaro-system archlinux-keyring manjaro-keyring
|
||||||
#XferCommand = /usr/bin/curl -L -C - -f -o %o %u
|
#XferCommand = /usr/bin/curl -C - -f %u > %o
|
||||||
#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
|
#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
|
||||||
#CleanMethod = KeepInstalled
|
#CleanMethod = KeepInstalled
|
||||||
#UseDelta = 0.7
|
#UseDelta = 0.7
|
||||||
|
@ -34,11 +34,10 @@ Architecture = auto
|
||||||
# Misc options
|
# Misc options
|
||||||
#UseSyslog
|
#UseSyslog
|
||||||
#Color
|
#Color
|
||||||
#NoProgressBar
|
#TotalDownload
|
||||||
# We cannot check disk space from within a chroot environment
|
# We cannot check disk space from within a chroot environment
|
||||||
#CheckSpace
|
#CheckSpace
|
||||||
#VerbosePkgLists
|
#VerbosePkgLists
|
||||||
ParallelDownloads = 4
|
|
||||||
|
|
||||||
# By default, pacman accepts packages signed by keys that its local keyring
|
# 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.
|
# trusts (see pacman-key and its man page), as well as unsigned packages.
|
||||||
|
@ -81,8 +80,13 @@ Include = /etc/pacman.d/mirrorlist
|
||||||
SigLevel = PackageRequired
|
SigLevel = PackageRequired
|
||||||
Include = /etc/pacman.d/mirrorlist
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
|
[community]
|
||||||
|
SigLevel = PackageRequired
|
||||||
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
# An example of a custom package repository. See the pacman manpage for
|
# An example of a custom package repository. See the pacman manpage for
|
||||||
# tips on creating your own repositories.
|
# tips on creating your own repositories.
|
||||||
#[custom]
|
#[custom]
|
||||||
#SigLevel = Optional TrustAll
|
#SigLevel = Optional TrustAll
|
||||||
#Server = file:///home/custompkgs
|
#Server = file:///home/custompkgs
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
#LogFile = /var/log/pacman.log
|
#LogFile = /var/log/pacman.log
|
||||||
#GPGDir = /etc/pacman.d/gnupg/
|
#GPGDir = /etc/pacman.d/gnupg/
|
||||||
HoldPkg = pacman glibc
|
HoldPkg = pacman glibc
|
||||||
#XferCommand = /usr/bin/curl -L -C - -f -o %o %u
|
#XferCommand = /usr/bin/curl -C - -f %u > %o
|
||||||
#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
|
#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
|
||||||
#CleanMethod = KeepInstalled
|
#CleanMethod = KeepInstalled
|
||||||
Architecture = auto
|
Architecture = auto
|
||||||
|
@ -30,10 +30,9 @@ Architecture = auto
|
||||||
# Misc options
|
# Misc options
|
||||||
#UseSyslog
|
#UseSyslog
|
||||||
#UseDelta
|
#UseDelta
|
||||||
#NoProgressBar
|
#TotalDownload
|
||||||
CheckSpace
|
CheckSpace
|
||||||
#VerbosePkgLists
|
#VerbosePkgLists
|
||||||
#ParallelDownloads = 5
|
|
||||||
|
|
||||||
# PGP signature checking
|
# PGP signature checking
|
||||||
# NOTE: None of this will work without running `pacman-key --init` first.
|
# NOTE: None of this will work without running `pacman-key --init` first.
|
||||||
|
@ -69,4 +68,4 @@ SigLevel = Never
|
||||||
|
|
||||||
[mhwd]
|
[mhwd]
|
||||||
#SigLevel = Optional TrustAll
|
#SigLevel = Optional TrustAll
|
||||||
Server = file:///opt/mhwd/pkg
|
Server = file:///opt/pkg
|
||||||
|
|
|
@ -10,10 +10,6 @@ Branch = stable
|
||||||
## 2) random - randomly generate the output mirrorlist
|
## 2) random - randomly generate the output mirrorlist
|
||||||
# Method = rank
|
# Method = rank
|
||||||
|
|
||||||
## Filename to use when ranking mirrors
|
|
||||||
## The file must be present in core repo
|
|
||||||
# TestFile = core.db.tar.gz
|
|
||||||
|
|
||||||
## Define protocols and priority
|
## Define protocols and priority
|
||||||
## separated by comma 'https,http' or 'http,https'
|
## separated by comma 'https,http' or 'http,https'
|
||||||
## ATM available protocols are: http, https, ftp
|
## ATM available protocols are: http, https, ftp
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
HoldPkg = pacman glibc
|
HoldPkg = pacman glibc
|
||||||
# If upgrades are available for these packages they will be asked for first
|
# If upgrades are available for these packages they will be asked for first
|
||||||
SyncFirst = manjaro-system archlinux-keyring manjaro-keyring
|
SyncFirst = manjaro-system archlinux-keyring manjaro-keyring
|
||||||
#XferCommand = /usr/bin/curl -L -C - -f -o %o %u
|
#XferCommand = /usr/bin/curl -C - -f %u > %o
|
||||||
#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
|
#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
|
||||||
#CleanMethod = KeepInstalled
|
#CleanMethod = KeepInstalled
|
||||||
#UseDelta = 0.7
|
#UseDelta = 0.7
|
||||||
|
@ -34,11 +34,10 @@ Architecture = auto
|
||||||
# Misc options
|
# Misc options
|
||||||
#UseSyslog
|
#UseSyslog
|
||||||
#Color
|
#Color
|
||||||
#NoProgressBar
|
#TotalDownload
|
||||||
# We cannot check disk space from within a chroot environment
|
# We cannot check disk space from within a chroot environment
|
||||||
#CheckSpace
|
#CheckSpace
|
||||||
#VerbosePkgLists
|
#VerbosePkgLists
|
||||||
ParallelDownloads = 4
|
|
||||||
|
|
||||||
# By default, pacman accepts packages signed by keys that its local keyring
|
# 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.
|
# trusts (see pacman-key and its man page), as well as unsigned packages.
|
||||||
|
@ -81,6 +80,10 @@ Include = /etc/pacman.d/mirrorlist
|
||||||
SigLevel = PackageRequired
|
SigLevel = PackageRequired
|
||||||
Include = /etc/pacman.d/mirrorlist
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
|
[community]
|
||||||
|
SigLevel = PackageRequired
|
||||||
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
# If you want to run 32 bit applications on your x86_64 system,
|
# If you want to run 32 bit applications on your x86_64 system,
|
||||||
# enable the multilib repositories as required here.
|
# enable the multilib repositories as required here.
|
||||||
|
|
||||||
|
|
|
@ -8,22 +8,12 @@
|
||||||
# use extra packages as defined in pkglist to activate a full profile
|
# use extra packages as defined in pkglist to activate a full profile
|
||||||
# extra="false"
|
# extra="false"
|
||||||
|
|
||||||
# use office installer module
|
|
||||||
# office_installer="false"
|
|
||||||
|
|
||||||
################ install ################
|
################ install ################
|
||||||
|
|
||||||
# default displaymanager: none
|
# default displaymanager: none
|
||||||
# supported; lightdm, sddm, gdm, lxdm, mdm
|
# supported; lightdm, sddm, gdm, lxdm, mdm
|
||||||
# displaymanager="none"
|
# displaymanager="none"
|
||||||
|
|
||||||
# add strict snaps: strict_snaps="core18 snap-store"
|
|
||||||
# strict_snaps=""
|
|
||||||
# add classic snaps: classic_snaps="code"
|
|
||||||
# classic_snaps=""
|
|
||||||
# choose the snap channel. Possible options are: stable, candidate, beta, edge
|
|
||||||
# snap_channel="stable"
|
|
||||||
|
|
||||||
# Set to false to disable autologin in the livecd
|
# Set to false to disable autologin in the livecd
|
||||||
# autologin="true"
|
# autologin="true"
|
||||||
|
|
||||||
|
@ -33,9 +23,6 @@
|
||||||
# possible values: grub;systemd-boot
|
# possible values: grub;systemd-boot
|
||||||
# efi_boot_loader="grub"
|
# efi_boot_loader="grub"
|
||||||
|
|
||||||
# kernel parameters (array); example: custom_boot_args="'acpi_osi=Linux'"
|
|
||||||
# custom_boot_args=
|
|
||||||
|
|
||||||
# configure calamares for netinstall
|
# configure calamares for netinstall
|
||||||
# netinstall="false"
|
# netinstall="false"
|
||||||
|
|
||||||
|
@ -77,5 +64,3 @@
|
||||||
# names must match systemd service names
|
# names must match systemd service names
|
||||||
# services in enable_systemd array don't need to be listed here
|
# services in enable_systemd array don't need to be listed here
|
||||||
# enable_systemd_live=('manjaro-live' 'mhwd-live' 'pacman-init' 'mirrors-live')
|
# enable_systemd_live=('manjaro-live' 'mhwd-live' 'pacman-init' 'mirrors-live')
|
||||||
|
|
||||||
# disable_systemd_live=()
|
|
||||||
|
|
|
@ -117,54 +117,12 @@ _verify_signature() {
|
||||||
return ${_status}
|
return ${_status}
|
||||||
}
|
}
|
||||||
|
|
||||||
_find_dev_by_path () {
|
|
||||||
local path="${1}"
|
|
||||||
local tmp_mnt=/tmp_mnt
|
|
||||||
local _mnt
|
|
||||||
local a d
|
|
||||||
local device
|
|
||||||
|
|
||||||
[[ "$path" ]] || return 1
|
|
||||||
|
|
||||||
mkdir -p "${tmp_mnt}"
|
|
||||||
|
|
||||||
for a in 1 2 3; do
|
|
||||||
for d in $(awk '{ print "/dev/"$4 }' /proc/partitions); do
|
|
||||||
|
|
||||||
# If the device is already mounted, it shouldn't be
|
|
||||||
# unmounted after the check.
|
|
||||||
|
|
||||||
grep -q "^$d " /proc/mounts && {
|
|
||||||
_mnt=$(grep "^$d " /proc/mounts | cut -d ' ' -f 2)
|
|
||||||
unmount=
|
|
||||||
} || {
|
|
||||||
mount -r -t auto "${d}" "${tmp_mnt}" 2> /dev/null || continue
|
|
||||||
_mnt="${tmp_mnt}"
|
|
||||||
unmount=true
|
|
||||||
}
|
|
||||||
|
|
||||||
# File exists in $d. Save $d on $device.
|
|
||||||
|
|
||||||
[[ -f "${_mnt}/${path}" ]] && device="${d}"
|
|
||||||
[[ "${unmount}" ]] && umount "${tmp_mnt}" 2> /dev/null || true
|
|
||||||
[[ "${device}" ]] && {
|
|
||||||
echo "${device}"
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
done
|
|
||||||
sleep 1
|
|
||||||
done
|
|
||||||
return 1
|
|
||||||
}
|
|
||||||
|
|
||||||
run_hook() {
|
run_hook() {
|
||||||
[[ -z "${arch}" ]] && arch="$(uname -m)"
|
[[ -z "${arch}" ]] && arch="$(uname -m)"
|
||||||
[[ -z "${copytoram_size}" ]] && copytoram_size="75%"
|
[[ -z "${copytoram_size}" ]] && copytoram_size="75%"
|
||||||
[[ -z "${misobasedir}" ]] && misobasedir="manjaro"
|
[[ -z "${misobasedir}" ]] && misobasedir="manjaro"
|
||||||
|
|
||||||
[[ -z "${dm_snap_prefix}" ]] && dm_snap_prefix="manjaro"
|
[[ -z "${dm_snap_prefix}" ]] && dm_snap_prefix="arch"
|
||||||
misodevice=$(_find_dev_by_path /.miso)
|
|
||||||
[[ -z "${misodevice}" ]] && misodevice="/dev/disk/by-label/${misolabel}"
|
[[ -z "${misodevice}" ]] && misodevice="/dev/disk/by-label/${misolabel}"
|
||||||
[[ -z "${cow_spacesize}" ]] && cow_spacesize="256M"
|
[[ -z "${cow_spacesize}" ]] && cow_spacesize="256M"
|
||||||
[[ -z "${overlay_root_size}" ]] && overlay_root_size="75%"
|
[[ -z "${overlay_root_size}" ]] && overlay_root_size="75%"
|
||||||
|
|
|
@ -1,56 +1,9 @@
|
||||||
# vim: set ft=sh:
|
# vim: set ft=sh:
|
||||||
|
|
||||||
find_dev_by_path () {
|
|
||||||
local path="${1}"
|
|
||||||
local tmp_mnt=/tmp_mnt
|
|
||||||
local _mnt
|
|
||||||
local a d
|
|
||||||
local device
|
|
||||||
|
|
||||||
[[ "$path" ]] || return 1
|
|
||||||
|
|
||||||
mkdir -p "${tmp_mnt}"
|
|
||||||
|
|
||||||
for a in 1 2 3; do
|
|
||||||
for d in $(awk '{ print "/dev/"$4 }' /proc/partitions); do
|
|
||||||
|
|
||||||
# If the device is already mounted, it shouldn't be
|
|
||||||
# unmounted after the check.
|
|
||||||
|
|
||||||
grep -q "^$d " /proc/mounts && {
|
|
||||||
_mnt=$(grep "^$d " /proc/mounts | cut -d ' ' -f 2)
|
|
||||||
unmount=
|
|
||||||
} || {
|
|
||||||
mount -r -t auto "${d}" "${tmp_mnt}" 2> /dev/null || continue
|
|
||||||
_mnt="${tmp_mnt}"
|
|
||||||
unmount=true
|
|
||||||
}
|
|
||||||
|
|
||||||
# File exists in $d. Save $d on $device.
|
|
||||||
|
|
||||||
[[ -f "${_mnt}/${path}" ]] && device="${d}"
|
|
||||||
[[ "${unmount}" ]] && umount "${tmp_mnt}" 2> /dev/null || true
|
|
||||||
[[ "${device}" ]] && {
|
|
||||||
echo "${device}"
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
done
|
|
||||||
sleep 1
|
|
||||||
done
|
|
||||||
return 1
|
|
||||||
}
|
|
||||||
|
|
||||||
run_hook () {
|
run_hook () {
|
||||||
|
[[ -n "${img_label}" ]] && img_dev="/dev/disk/by-label/${img_label}"
|
||||||
[[ -z "${img_flags}" ]] && img_flags="defaults"
|
[[ -z "${img_flags}" ]] && img_flags="defaults"
|
||||||
if [[ "${img_loop}" ]]; then
|
if [[ -n "${img_dev}" && -n "${img_loop}" ]]; then
|
||||||
img_dev=$(find_dev_by_path "${img_loop}")
|
|
||||||
|
|
||||||
if [[ -z "${img_dev}" ]]; then
|
|
||||||
[[ -b "/dev/disk/by-label/${img_label}" ]] &&
|
|
||||||
img_dev="/dev/disk/by-label/${img_label}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
mount_handler="miso_loop_mount_handler"
|
mount_handler="miso_loop_mount_handler"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
@ -78,7 +31,5 @@ miso_loop_mount_handler () {
|
||||||
if [[ "${copytoram}" == "y" ]]; then
|
if [[ "${copytoram}" == "y" ]]; then
|
||||||
losetup -d ${_dev_loop} 2>/dev/null
|
losetup -d ${_dev_loop} 2>/dev/null
|
||||||
umount /run/miso/img_dev
|
umount /run/miso/img_dev
|
||||||
else
|
|
||||||
echo $(readlink -f ${img_dev}) >> /run/miso/used_block_devices
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
run_cleanuphook() {
|
run_cleanuphook() {
|
||||||
rm -rf /usr/lib/modules
|
rm -rf /usr/lib/modules
|
||||||
cp -ax /. /run/initramfs
|
cp -ax / /run/initramfs
|
||||||
}
|
}
|
||||||
|
|
||||||
# vim: set ft=sh ts=4 sw=4 et:
|
# vim: set ft=sh ts=4 sw=4 et:
|
||||||
|
|
|
@ -18,7 +18,7 @@ prepare_initcpio(){
|
||||||
|
|
||||||
prepare_initramfs(){
|
prepare_initramfs(){
|
||||||
cp ${DATADIR}/mkinitcpio.conf $1/etc/mkinitcpio-${iso_name}.conf
|
cp ${DATADIR}/mkinitcpio.conf $1/etc/mkinitcpio-${iso_name}.conf
|
||||||
local _kernver=$(cat $1/usr/lib/modules/*/kernelbase | awk -F'-' '{print $1}')
|
local _kernver=$(cat $1/usr/lib/modules/*/version)
|
||||||
if [[ -n ${gpgkey} ]]; then
|
if [[ -n ${gpgkey} ]]; then
|
||||||
su ${OWNER} -c "gpg --export ${gpgkey} >${USERCONFDIR}/gpgkey"
|
su ${OWNER} -c "gpg --export ${gpgkey} >${USERCONFDIR}/gpgkey"
|
||||||
exec 17<>${USERCONFDIR}/gpgkey
|
exec 17<>${USERCONFDIR}/gpgkey
|
||||||
|
@ -39,9 +39,10 @@ prepare_initramfs(){
|
||||||
prepare_boot_extras(){
|
prepare_boot_extras(){
|
||||||
cp $1/boot/amd-ucode.img $2/amd_ucode.img
|
cp $1/boot/amd-ucode.img $2/amd_ucode.img
|
||||||
cp $1/boot/intel-ucode.img $2/intel_ucode.img
|
cp $1/boot/intel-ucode.img $2/intel_ucode.img
|
||||||
cp $1/usr/share/licenses/amd-ucode/LIC* $2/amd_ucode.LICENSE
|
cp $1/usr/share/licenses/amd-ucode/LICENSE $2/amd_ucode.LICENSE
|
||||||
cp $1/usr/share/licenses/intel-ucode/LIC* $2/intel_ucode.LICENSE
|
cp $1/usr/share/licenses/intel-ucode/LICENSE $2/intel_ucode.LICENSE
|
||||||
cp $1/boot/memtest86+/memtest.bin $2/memtest
|
cp $1/boot/memtest86+/memtest.bin $2/memtest
|
||||||
|
cp $1/usr/share/licenses/common/GPL2/license.txt $2/memtest.COPYING
|
||||||
}
|
}
|
||||||
|
|
||||||
prepare_grub(){
|
prepare_grub(){
|
||||||
|
@ -57,7 +58,7 @@ prepare_grub(){
|
||||||
|
|
||||||
msg2 "Building %s ..." "${img}"
|
msg2 "Building %s ..." "${img}"
|
||||||
|
|
||||||
grub-mkimage -d ${grub}/${platform} -o ${grub}/${platform}/${img} -O ${platform} -p ${prefix} biosdisk iso9660
|
grub-mkimage -d ${grub}/${platform} -o ${grub}/${platform}/${img} -O ${platform} -p ${prefix} biosdisk iso9660 part_msdos part_gpt fat ntfs
|
||||||
|
|
||||||
cat ${grub}/${platform}/cdboot.img ${grub}/${platform}/${img} > ${grub}/${platform}/eltorito.img
|
cat ${grub}/${platform}/cdboot.img ${grub}/${platform}/${img} > ${grub}/${platform}/eltorito.img
|
||||||
|
|
||||||
|
@ -79,7 +80,7 @@ prepare_grub(){
|
||||||
|
|
||||||
msg2 "Building %s ..." "${img}"
|
msg2 "Building %s ..." "${img}"
|
||||||
|
|
||||||
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 part_msdos part_gpt fat ntfs
|
||||||
|
|
||||||
prepare_dir ${grub}/themes
|
prepare_dir ${grub}/themes
|
||||||
cp -r ${data_live}/themes/${iso_name}-live ${grub}/themes/
|
cp -r ${data_live}/themes/${iso_name}-live ${grub}/themes/
|
||||||
|
@ -97,6 +98,6 @@ prepare_grub(){
|
||||||
mount_img "${efi_img}" "${mnt}"
|
mount_img "${efi_img}" "${mnt}"
|
||||||
prepare_dir ${mnt}/efi/boot
|
prepare_dir ${mnt}/efi/boot
|
||||||
msg2 "Building %s ..." "${img}"
|
msg2 "Building %s ..." "${img}"
|
||||||
grub-mkimage -d ${grub}/${platform} -o ${mnt}/efi/boot/${img} -O ${platform} -p ${prefix} iso9660
|
grub-mkimage -d ${grub}/${platform} -o ${mnt}/efi/boot/${img} -O ${platform} -p ${prefix} iso9660 part_msdos part_gpt fat ntfs
|
||||||
umount_img "${mnt}"
|
umount_img "${mnt}"
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,11 +33,6 @@ add_svc_sd(){
|
||||||
msg2 "Setting %s ..." "$2"
|
msg2 "Setting %s ..." "$2"
|
||||||
chroot $1 systemctl enable $2 &>/dev/null
|
chroot $1 systemctl enable $2 &>/dev/null
|
||||||
fi
|
fi
|
||||||
if [[ -f $1/etc/systemd/system/$2 ]] || \
|
|
||||||
[[ -f $1/usr/lib/systemd/system/$2 ]]; then
|
|
||||||
msg2 "Setting %s ..." "$2"
|
|
||||||
chroot $1 systemctl enable $2 &>/dev/null
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
set_xdm(){
|
set_xdm(){
|
||||||
|
@ -51,6 +46,27 @@ configure_mhwd_drivers(){
|
||||||
local path=$1${mhwd_repo}/ \
|
local path=$1${mhwd_repo}/ \
|
||||||
drv_path=$1/var/lib/mhwd/db/pci/graphic_drivers
|
drv_path=$1/var/lib/mhwd/db/pci/graphic_drivers
|
||||||
info "Configuring mhwd db ..."
|
info "Configuring mhwd db ..."
|
||||||
|
if [ -z "$(ls $path | grep catalyst-utils 2> /dev/null)" ]; then
|
||||||
|
msg2 "Disabling Catalyst driver"
|
||||||
|
mkdir -p $drv_path/catalyst/
|
||||||
|
echo "" > $drv_path/catalyst/MHWDCONFIG
|
||||||
|
fi
|
||||||
|
if [ -z "$(ls $path | grep nvidia-utils 2> /dev/null)" ]; then
|
||||||
|
msg2 "Disabling Nvidia driver"
|
||||||
|
mkdir -p $drv_path/nvidia/
|
||||||
|
touch $drv_path/nvidia/MHWDCONFIG
|
||||||
|
msg2 "Disabling Nvidia Bumblebee driver"
|
||||||
|
mkdir -p $drv_path/hybrid-intel-nvidia-bumblebee/
|
||||||
|
echo "" > $drv_path/hybrid-intel-nvidia-bumblebee/MHWDCONFIG
|
||||||
|
fi
|
||||||
|
if [ -z "$(ls $path | grep nvidia-340xx-utils 2> /dev/null)" ]; then
|
||||||
|
msg2 "Disabling Nvidia 340xx driver"
|
||||||
|
mkdir -p $drv_path/nvidia-340xx/
|
||||||
|
echo "" > $drv_path/nvidia-340xx/MHWDCONFIG
|
||||||
|
msg2 "Disabling Nvidia 340xx Bumblebee driver"
|
||||||
|
mkdir -p $drv_path/hybrid-intel-nvidia-340xx-bumblebee/
|
||||||
|
echo "" > $drv_path/hybrid-intel-nvidia-340xx-bumblebee/MHWDCONFIG
|
||||||
|
fi
|
||||||
if [ -z "$(ls $path | grep nvidia-390xx-utils 2> /dev/null)" ]; then
|
if [ -z "$(ls $path | grep nvidia-390xx-utils 2> /dev/null)" ]; then
|
||||||
msg2 "Disabling Nvidia 390xx driver"
|
msg2 "Disabling Nvidia 390xx driver"
|
||||||
mkdir -p $drv_path/nvidia-390xx/
|
mkdir -p $drv_path/nvidia-390xx/
|
||||||
|
@ -59,55 +75,27 @@ configure_mhwd_drivers(){
|
||||||
mkdir -p $drv_path/hybrid-intel-nvidia-390xx-bumblebee/
|
mkdir -p $drv_path/hybrid-intel-nvidia-390xx-bumblebee/
|
||||||
echo "" > $drv_path/hybrid-intel-nvidia-390xx-bumblebee/MHWDCONFIG
|
echo "" > $drv_path/hybrid-intel-nvidia-390xx-bumblebee/MHWDCONFIG
|
||||||
fi
|
fi
|
||||||
if [ -z "$(ls $path | grep nvidia-utils 2> /dev/null)" ]; then
|
if [ -z "$(ls $path | grep xf86-video-amdgpu 2> /dev/null)" ]; then
|
||||||
msg2 "Disabling Nvidia driver"
|
msg2 "Disabling AMD gpu driver"
|
||||||
mkdir -p $drv_path/nvidia/
|
mkdir -p $drv_path/xf86-video-amdgpu/
|
||||||
echo "" > $drv_path/nvidia/MHWDCONFIG
|
echo "" > $drv_path/xf86-video-amdgpu/MHWDCONFIG
|
||||||
msg2 "Disabling Nvidia AMD Prime driver"
|
|
||||||
mkdir -p $drv_path/hybrid-amd-nvidia-prime/
|
|
||||||
echo "" > $drv_path/hybrid-amd-nvidia-prime/MHWDCONFIG
|
|
||||||
msg2 "Disabling Nvidia Intel Prime driver"
|
|
||||||
mkdir -p $drv_path/hybrid-intel-nvidia-prime/
|
|
||||||
echo "" > $drv_path/hybrid-intel-nvidia-prime/MHWDCONFIG
|
|
||||||
fi
|
fi
|
||||||
if [ -z "$(ls $path | grep nvidia-470xx-utils 2> /dev/null)" ]; then
|
if [ -z "$(ls $path | grep virtualbox-guest-modules 2> /dev/null)" ]; then
|
||||||
msg2 "Disabling Nvidia 470xx driver"
|
msg2 "Disabling VirtualBox guest driver"
|
||||||
mkdir -p $drv_path/nvidia-470xx/
|
mkdir -p $drv_path/virtualbox/
|
||||||
echo "" > $drv_path/nvidia-470xx/MHWDCONFIG
|
echo "" > $drv_path/virtualbox/MHWDCONFIG
|
||||||
msg2 "Disabling Nvidia 470xx AMD Prime driver"
|
|
||||||
mkdir -p $drv_path/hybrid-amd-nvidia-470xx-prime/
|
|
||||||
echo "" > $drv_path/hybrid-amd-nvidia-470xx-prime/MHWDCONFIG
|
|
||||||
msg2 "Disabling Nvidia 470xx Intel Prime driver"
|
|
||||||
mkdir -p $drv_path/hybrid-intel-nvidia-470xx-prime/
|
|
||||||
echo "" > $drv_path/hybrid-intel-nvidia-470xx-prime/MHWDCONFIG
|
|
||||||
fi
|
|
||||||
local drv_path=$1/var/lib/mhwd/db/pci/network_drivers
|
|
||||||
if [ -z "$(ls $path | grep broadcom-wl 2> /dev/null)" ]; then
|
|
||||||
msg2 "Disabling broadcom-wl driver"
|
|
||||||
mkdir -p $drv_path/broadcom-wl/
|
|
||||||
echo "" > $drv_path/broadcom-wl/MHWDCONFIG
|
|
||||||
fi
|
|
||||||
if [ -z "$(ls $path | grep rt3562sta 2> /dev/null)" ]; then
|
|
||||||
msg2 "Disabling rt3562sta driver"
|
|
||||||
mkdir -p $drv_path/rt3562sta/
|
|
||||||
echo "" > $drv_path/rt3562sta/MHWDCONFIG
|
|
||||||
fi
|
|
||||||
if [ -z "$(ls $path | grep r8168 2> /dev/null)" ]; then
|
|
||||||
msg2 "Disabling r8168 driver"
|
|
||||||
mkdir -p $drv_path/r8168/
|
|
||||||
echo "" > $drv_path/r8168/MHWDCONFIG
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
configure_lsb(){
|
configure_lsb(){
|
||||||
if [ -e $1/etc/lsb-release ] ; then
|
if [ -e $1/etc/lsb-release ] ; then
|
||||||
msg2 "Configuring lsb-release"
|
msg2 "Configuring lsb-release"
|
||||||
sed -i -e "s/^.*DISTRIB_RELEASE.*/DISTRIB_RELEASE=\"${dist_release}\"/" $1/etc/lsb-release
|
sed -i -e "s/^.*DISTRIB_RELEASE.*/DISTRIB_RELEASE=${dist_release}/" $1/etc/lsb-release
|
||||||
sed -i -e "s/^.*DISTRIB_CODENAME.*/DISTRIB_CODENAME=\"${dist_codename}\"/" $1/etc/lsb-release
|
sed -i -e "s/^.*DISTRIB_CODENAME.*/DISTRIB_CODENAME=${dist_codename}/" $1/etc/lsb-release
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
configure_branding_old(){
|
configure_branding(){
|
||||||
msg2 "Configuring branding"
|
msg2 "Configuring branding"
|
||||||
echo "---
|
echo "---
|
||||||
componentName: manjaro
|
componentName: manjaro
|
||||||
|
@ -140,12 +128,6 @@ windowExpanding: ${windowexp}
|
||||||
# in CalamaresUtilsGui, 800x520.
|
# in CalamaresUtilsGui, 800x520.
|
||||||
windowSize: ${windowsize}
|
windowSize: ${windowsize}
|
||||||
|
|
||||||
# Placement of Calamares window. Either "center" or "free".
|
|
||||||
# Whether "center" actually works does depend on the window
|
|
||||||
# manager in use (and only makes sense if you're not using
|
|
||||||
# *windowExpanding* set to "fullscreen").
|
|
||||||
windowPlacement: ${windowplacement}
|
|
||||||
|
|
||||||
# These are strings shown to the user in the user interface.
|
# These are strings shown to the user in the user interface.
|
||||||
# There is no provision for translating them -- since they
|
# There is no provision for translating them -- since they
|
||||||
# are names, the string is included as-is.
|
# are names, the string is included as-is.
|
||||||
|
@ -189,17 +171,6 @@ images:
|
||||||
# installer is actually writing to disk and doing other slow things).
|
# installer is actually writing to disk and doing other slow things).
|
||||||
slideshow: "show.qml"
|
slideshow: "show.qml"
|
||||||
|
|
||||||
# There are two available APIs for the slideshow:
|
|
||||||
# - 1 (the default) loads the entire slideshow when the installation-
|
|
||||||
# slideshow page is shown and starts the QML then. The QML
|
|
||||||
# is never stopped (after installation is done, times etc.
|
|
||||||
# continue to fire).
|
|
||||||
# - 2 loads the slideshow on startup and calls onActivate() and
|
|
||||||
# onLeave() in the root object. After the installation is done,
|
|
||||||
# the show is stopped (first by calling onLeave(), then destroying
|
|
||||||
# the QML components).
|
|
||||||
slideshowAPI: 1
|
|
||||||
|
|
||||||
# Colors for text and background components.
|
# Colors for text and background components.
|
||||||
#
|
#
|
||||||
# - sidebarBackground is the background of the sidebar
|
# - sidebarBackground is the background of the sidebar
|
||||||
|
@ -215,261 +186,6 @@ style:
|
||||||
sidebarTextHighlight: "\"${sidebartexthighlight}"\"" > $1/usr/share/calamares/branding/manjaro/branding.desc
|
sidebarTextHighlight: "\"${sidebartexthighlight}"\"" > $1/usr/share/calamares/branding/manjaro/branding.desc
|
||||||
}
|
}
|
||||||
|
|
||||||
configure_branding(){
|
|
||||||
msg2 "Configuring branding"
|
|
||||||
echo "# SPDX-FileCopyrightText: no
|
|
||||||
# SPDX-License-Identifier: CC0-1.0
|
|
||||||
#
|
|
||||||
# Product branding information. This influences some global
|
|
||||||
# user-visible aspects of Calamares, such as the product
|
|
||||||
# name, window behavior, and the slideshow during installation.
|
|
||||||
#
|
|
||||||
# Additional styling can be done using the stylesheet.qss
|
|
||||||
# file, also in the branding directory.
|
|
||||||
---
|
|
||||||
componentName: manjaro
|
|
||||||
|
|
||||||
|
|
||||||
### WELCOME / OVERALL WORDING
|
|
||||||
#
|
|
||||||
# These settings affect some overall phrasing and looks,
|
|
||||||
# which are most visible in the welcome page.
|
|
||||||
|
|
||||||
# This selects between different welcome texts. When false, uses
|
|
||||||
# the traditional "Welcome to the %1 installer.", and when true,
|
|
||||||
# uses "Welcome to the Calamares installer for %1." This allows
|
|
||||||
# to distinguish this installer from other installers for the
|
|
||||||
# same distribution.
|
|
||||||
welcomeStyleCalamares: ${welcomestyle}
|
|
||||||
|
|
||||||
# Should the welcome image (productWelcome, below) be scaled
|
|
||||||
# up beyond its natural size? If false, the image does not grow
|
|
||||||
# with the window but remains the same size throughout (this
|
|
||||||
# may have surprising effects on HiDPI monitors).
|
|
||||||
welcomeExpandingLogo: ${welcomelogo}
|
|
||||||
|
|
||||||
### WINDOW CONFIGURATION
|
|
||||||
#
|
|
||||||
# The settings here affect the placement of the Calamares
|
|
||||||
# window through hints to the window manager and initial
|
|
||||||
# sizing of the Calamares window.
|
|
||||||
|
|
||||||
# Size and expansion policy for Calamares.
|
|
||||||
# - "normal" or unset, expand as needed, use *windowSize*
|
|
||||||
# - "fullscreen", start as large as possible, ignore *windowSize*
|
|
||||||
# - "noexpand", don't expand automatically, use *windowSize*
|
|
||||||
windowExpanding: ${windowexp}
|
|
||||||
|
|
||||||
# Size of Calamares window, expressed as w,h. Both w and h
|
|
||||||
# may be either pixels (suffix px) or font-units (suffix em).
|
|
||||||
# e.g. "800px,600px"
|
|
||||||
# "60em,480px"
|
|
||||||
# This setting is ignored if "fullscreen" is selected for
|
|
||||||
# *windowExpanding*, above. If not set, use constants defined
|
|
||||||
# in CalamaresUtilsGui, 800x520.
|
|
||||||
windowSize: ${windowsize}
|
|
||||||
|
|
||||||
# Placement of Calamares window. Either "center" or "free".
|
|
||||||
# Whether "center" actually works does depend on the window
|
|
||||||
# manager in use (and only makes sense if you're not using
|
|
||||||
# *windowExpanding* set to "fullscreen").
|
|
||||||
windowPlacement: ${windowplacement}
|
|
||||||
|
|
||||||
### PANELS CONFIGURATION
|
|
||||||
#
|
|
||||||
# Calamares has a main content area, and two panels (navigation
|
|
||||||
# and progress / sidebar). The panels can be controlled individually,
|
|
||||||
# or switched off. If both panels are switched off, the layout of
|
|
||||||
# the main content area loses its margins, on the assumption that
|
|
||||||
# you're doing something special.
|
|
||||||
|
|
||||||
# Kind of sidebar (panel on the left, showing progress).
|
|
||||||
# - "widget" or unset, use traditional sidebar (logo, items)
|
|
||||||
# - "none", hide it entirely
|
|
||||||
# - "qml", use calamares-sidebar.qml from branding folder
|
|
||||||
# In addition, you **may** specify a side, separated by a comma,
|
|
||||||
# from the kind. Valid sides are:
|
|
||||||
# - "left" (if not specified, uses this)
|
|
||||||
# - "right"
|
|
||||||
# - "top"
|
|
||||||
# - "bottom"
|
|
||||||
# For instance, "widget,right" is valid; so is "qml", which defaults
|
|
||||||
# to putting the sidebar on the left. Also valid is "qml,top".
|
|
||||||
# While "widget,top" is valid, the widgets code is **not** flexible
|
|
||||||
# and results will be terrible.
|
|
||||||
sidebar: qml
|
|
||||||
|
|
||||||
# Kind of navigation (button panel on the bottom).
|
|
||||||
# - "widget" or unset, use traditional navigation
|
|
||||||
# - "none", hide it entirely
|
|
||||||
# - "qml", use calamares-navigation.qml from branding folder
|
|
||||||
# In addition, you **may** specify a side, separated by a comma,
|
|
||||||
# from the kind. The same sides are valid as for *sidebar*,
|
|
||||||
# except the default is *bottom*.
|
|
||||||
navigation: widget
|
|
||||||
|
|
||||||
|
|
||||||
### STRINGS, IMAGES AND COLORS
|
|
||||||
#
|
|
||||||
# This section contains the "branding proper" of names
|
|
||||||
# and images, rather than global-look settings.
|
|
||||||
|
|
||||||
# These are strings shown to the user in the user interface.
|
|
||||||
# There is no provision for translating them -- since they
|
|
||||||
# are names, the string is included as-is.
|
|
||||||
#
|
|
||||||
# The four Url strings are the Urls used by the buttons in
|
|
||||||
# the welcome screen, and are not shown to the user. Clicking
|
|
||||||
# on the "Support" button, for instance, opens the link supportUrl.
|
|
||||||
# If a Url is empty, the corresponding button is not shown.
|
|
||||||
#
|
|
||||||
# bootloaderEntryName is how this installation / distro is named
|
|
||||||
# in the boot loader (e.g. in the GRUB menu).
|
|
||||||
#
|
|
||||||
# These strings support substitution from /etc/os-release
|
|
||||||
# if KDE Frameworks 5.58 are available at build-time. When
|
|
||||||
# enabled, @{var-name} is replaced by the equivalent value
|
|
||||||
# from os-release. All the supported var-names are in all-caps,
|
|
||||||
# and are listed on the FreeDesktop.org site,
|
|
||||||
# https://www.freedesktop.org/software/systemd/man/os-release.html
|
|
||||||
# Note that ANSI_COLOR and CPE_NAME don't make sense here, and
|
|
||||||
# are not supported (the rest are). Remember to quote the string
|
|
||||||
# if it contains substitutions, or you'll get YAML exceptions.
|
|
||||||
#
|
|
||||||
# The *Url* entries are used on the welcome page, and they
|
|
||||||
# are visible as buttons there if the corresponding *show* keys
|
|
||||||
# are set to "true" (they can also be overridden).
|
|
||||||
strings:
|
|
||||||
productName: ${dist_name} Linux
|
|
||||||
shortProductName: ${dist_name}
|
|
||||||
version: ${dist_release}
|
|
||||||
shortVersion: ${dist_release}
|
|
||||||
versionedName: ${dist_name} Linux ${dist_release} "\"${dist_codename}"\"
|
|
||||||
shortVersionedName: ${dist_name} ${dist_release}
|
|
||||||
bootloaderEntryName: ${dist_name}
|
|
||||||
|
|
||||||
|
|
||||||
# These images are loaded from the branding module directory.
|
|
||||||
#
|
|
||||||
# productBanner is an optional image, which if present, will be shown
|
|
||||||
# on the welcome page of the application, above the welcome text.
|
|
||||||
# It is intended to have a width much greater than height.
|
|
||||||
# It is displayed at 64px height (also on HiDPI).
|
|
||||||
# Recommended size is 64px tall, and up to 460px wide.
|
|
||||||
# productIcon is used as the window icon, and will (usually) be used
|
|
||||||
# by the window manager to represent the application. This image
|
|
||||||
# should be square, and may be displayed by the window manager
|
|
||||||
# as small as 16x16 (but possibly larger).
|
|
||||||
# productLogo is used as the logo at the top of the left-hand column
|
|
||||||
# which shows the steps to be taken. The image should be square,
|
|
||||||
# and is displayed at 80x80 pixels (also on HiDPI).
|
|
||||||
# productWallpaper is an optional image, which if present, will replace
|
|
||||||
# the normal solid background on every page of the application.
|
|
||||||
# It can be any size and proportion,
|
|
||||||
# and will be tiled to fit the entire window.
|
|
||||||
# For a non-tiled wallpaper, the size should be the same as
|
|
||||||
# the overall window, see *windowSize* above (800x520).
|
|
||||||
# productWelcome is shown on the welcome page of the application in
|
|
||||||
# the middle of the window, below the welcome text. It can be
|
|
||||||
# any size and proportion, and will be scaled to fit inside
|
|
||||||
# the window. Use 'welcomeExpandingLogo' to make it non-scaled.
|
|
||||||
# Recommended size is 320x150.
|
|
||||||
#
|
|
||||||
# These filenames can also use substitutions from os-release (see above).
|
|
||||||
images:
|
|
||||||
# productBanner: "banner.png"
|
|
||||||
productIcon: "logo_small.svg"
|
|
||||||
productLogo: "logo.svg"
|
|
||||||
# productWallpaper: "wallpaper.png"
|
|
||||||
productWelcome: "welcome/mascot.svg"
|
|
||||||
|
|
||||||
# Colors for text and background components.
|
|
||||||
#
|
|
||||||
# - SidebarBackground is the background of the sidebar
|
|
||||||
# - SidebarText is the (foreground) text color
|
|
||||||
# - SidebarBackgroundCurrent sets the background of the current step.
|
|
||||||
# Optional, and defaults to the application palette.
|
|
||||||
# - SidebarTextCurrent is the text color of the current step.
|
|
||||||
#
|
|
||||||
# These colors can **also** be set through the stylesheet, if the
|
|
||||||
# branding component also ships a stylesheet.qss. Then they are
|
|
||||||
# the corresponding CSS attributes of #sidebarApp.
|
|
||||||
style:
|
|
||||||
sidebarBackground: "\"${sidebarbackground}"\"
|
|
||||||
sidebarText: "\"${sidebartext}"\"
|
|
||||||
sidebarTextSelect: "\"${sidebartextselect}"\"
|
|
||||||
sidebarTextHighlight: "\"${sidebartexthighlight}"\"
|
|
||||||
SidebarBackground: "\"${sidebarbackground}"\"
|
|
||||||
SidebarText: "\"${sidebartext}"\"
|
|
||||||
SidebarTextSelect: "\"${sidebartextselect}"\"
|
|
||||||
SidebarBackgroundCurrent: "\"${sidebartexthighlight}"\"
|
|
||||||
|
|
||||||
### SLIDESHOW
|
|
||||||
#
|
|
||||||
# The slideshow is displayed during execution steps (e.g. when the
|
|
||||||
# installer is actually writing to disk and doing other slow things).
|
|
||||||
|
|
||||||
# The slideshow can be a QML file (recommended) which can display
|
|
||||||
# arbitrary things -- text, images, animations, or even play a game --
|
|
||||||
# during the execution step. The QML **is** abruptly stopped when the
|
|
||||||
# execution step is done, though, so maybe a game isn't a great idea.
|
|
||||||
#
|
|
||||||
# The slideshow can also be a sequence of images (not recommended unless
|
|
||||||
# you don't want QML at all in your Calamares). The images are displayed
|
|
||||||
# at a rate of 1 every 2 seconds during the execution step.
|
|
||||||
#
|
|
||||||
# To configure a QML file, list a single filename:
|
|
||||||
# slideshow: "show.qml"
|
|
||||||
# To configure images, like the filenames (here, as an inline list):
|
|
||||||
# slideshow: [ "/etc/calamares/slideshow/0.png", "/etc/logo.png" ]
|
|
||||||
slideshow: "slideshow/SlideShow.qml"
|
|
||||||
|
|
||||||
# There are two available APIs for a QML slideshow:
|
|
||||||
# - 1 (the default) loads the entire slideshow when the installation-
|
|
||||||
# slideshow page is shown and starts the QML then. The QML
|
|
||||||
# is never stopped (after installation is done, times etc.
|
|
||||||
# continue to fire).
|
|
||||||
# - 2 loads the slideshow on startup and calls onActivate() and
|
|
||||||
# onLeave() in the root object. After the installation is done,
|
|
||||||
# the show is stopped (first by calling onLeave(), then destroying
|
|
||||||
# the QML components).
|
|
||||||
#
|
|
||||||
# An image slideshow does not need to have the API defined.
|
|
||||||
slideshowAPI: 2
|
|
||||||
|
|
||||||
|
|
||||||
# These options are to customize online uploading of logs to pastebins:
|
|
||||||
# - type : Defines the kind of pastebin service to be used. Currently
|
|
||||||
# it accepts two values:
|
|
||||||
# - none : disables the pastebin functionality
|
|
||||||
# - fiche : use fiche pastebin server
|
|
||||||
# - url : Defines the address of pastebin service to be used.
|
|
||||||
# Takes string as input. Important bits are the host and port,
|
|
||||||
# the scheme is not used.
|
|
||||||
# - sizeLimit : Defines maximum size limit (in KiB) of log file to be pasted.
|
|
||||||
# The option must be set, to have the log option work.
|
|
||||||
# Takes integer as input. If < 0, no limit will be forced,
|
|
||||||
# else only last (approximately) 'n' KiB of log file will be pasted.
|
|
||||||
# Please note that upload size may be slightly over the limit (due
|
|
||||||
# to last minute logging), so provide a suitable value.
|
|
||||||
uploadServer :
|
|
||||||
type : "fiche"
|
|
||||||
url : "http://termbin.com:9999"
|
|
||||||
sizeLimit : -1" > $1/usr/share/calamares/branding/manjaro/branding.desc
|
|
||||||
}
|
|
||||||
|
|
||||||
configure_polkit_user_rules(){
|
|
||||||
msg2 "Configuring polkit user rules"
|
|
||||||
echo "/* Stop asking the user for a password while they are in a live session
|
|
||||||
*/
|
|
||||||
polkit.addRule(function(action, subject) {
|
|
||||||
if (subject.user == \"${username}\")
|
|
||||||
{
|
|
||||||
return polkit.Result.YES;
|
|
||||||
}
|
|
||||||
});" > $1/etc/polkit-1/rules.d/49-nopasswd-live.rules
|
|
||||||
}
|
|
||||||
|
|
||||||
configure_logind(){
|
configure_logind(){
|
||||||
msg2 "Configuring logind ..."
|
msg2 "Configuring logind ..."
|
||||||
local conf=$1/etc/systemd/logind.conf
|
local conf=$1/etc/systemd/logind.conf
|
||||||
|
@ -484,30 +200,14 @@ configure_journald(){
|
||||||
sed -i 's/#\(Storage=\)auto/\1volatile/' "$conf"
|
sed -i 's/#\(Storage=\)auto/\1volatile/' "$conf"
|
||||||
}
|
}
|
||||||
|
|
||||||
disable_srv_live(){
|
|
||||||
for srv in ${disable_systemd_live[@]}; do
|
|
||||||
enable_systemd_live=(${enable_systemd_live[@]//*$srv*})
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
configure_services(){
|
configure_services(){
|
||||||
info "Configuring services"
|
info "Configuring services"
|
||||||
use_apparmor="false"
|
for svc in ${enable_systemd[@]}; do
|
||||||
apparmor_boot_args=""
|
add_svc_sd "$1" "$svc"
|
||||||
enable_systemd_live=(${enable_systemd_live[@]} ${enable_systemd[@]})
|
done
|
||||||
|
|
||||||
[[ ! -z $disable_systemd_live ]] && disable_srv_live
|
|
||||||
|
|
||||||
for svc in ${enable_systemd_live[@]}; do
|
for svc in ${enable_systemd_live[@]}; do
|
||||||
add_svc_sd "$1" "$svc"
|
add_svc_sd "$1" "$svc"
|
||||||
[[ "$svc" == "apparmor" ]] && use_apparmor="true"
|
|
||||||
done
|
done
|
||||||
|
|
||||||
if [[ ${use_apparmor} == 'true' ]]; then
|
|
||||||
msg2 "Enable apparmor kernel parameters"
|
|
||||||
apparmor_boot_args="'apparmor=1' 'security=apparmor'"
|
|
||||||
fi
|
|
||||||
|
|
||||||
info "Done configuring services"
|
info "Done configuring services"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -591,7 +291,7 @@ configure_live_image(){
|
||||||
}
|
}
|
||||||
|
|
||||||
make_repo(){
|
make_repo(){
|
||||||
repo-add $1${mhwd_repo}/mhwd.db.tar.gz $1${mhwd_repo}/*pkg.tar*
|
repo-add $1${mhwd_repo}/mhwd.db.tar.gz $1${mhwd_repo}/*pkg*z
|
||||||
}
|
}
|
||||||
|
|
||||||
copy_from_cache(){
|
copy_from_cache(){
|
||||||
|
@ -608,7 +308,7 @@ copy_from_cache(){
|
||||||
-B "${build_mirror}/${target_branch}" \
|
-B "${build_mirror}/${target_branch}" \
|
||||||
"$1" \
|
"$1" \
|
||||||
pacman -v -Sp $2 --noconfirm > "$list"
|
pacman -v -Sp $2 --noconfirm > "$list"
|
||||||
sed -ni '/pkg.tar/p' "$list"
|
sed -ni '/.pkg.tar.xz/p' "$list"
|
||||||
sed -i "s/.*\///" "$list"
|
sed -i "s/.*\///" "$list"
|
||||||
|
|
||||||
msg2 "Copying mhwd package cache ..."
|
msg2 "Copying mhwd package cache ..."
|
||||||
|
|
|
@ -59,29 +59,11 @@ mount_fs_net(){
|
||||||
track_fs -t overlay overlay -olowerdir="${work_dir}/livefs":"${work_dir}/rootfs",upperdir="$1",workdir="${mnt_dir}/work" "$1"
|
track_fs -t overlay overlay -olowerdir="${work_dir}/livefs":"${work_dir}/rootfs",upperdir="$1",workdir="${mnt_dir}/work" "$1"
|
||||||
}
|
}
|
||||||
|
|
||||||
check_umount() {
|
|
||||||
if mountpoint -q "$1"
|
|
||||||
then
|
|
||||||
umount -l "$1"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
umount_fs(){
|
umount_fs(){
|
||||||
if [[ -n ${FS_ACTIVE_MOUNTS[@]} ]]; then
|
if [[ -n ${FS_ACTIVE_MOUNTS[@]} ]]; then
|
||||||
info "overlayfs umount: [%s]" "${FS_ACTIVE_MOUNTS[@]}"
|
info "overlayfs umount: [%s]" "${FS_ACTIVE_MOUNTS[@]}"
|
||||||
#umount "${FS_ACTIVE_MOUNTS[@]}"
|
umount "${FS_ACTIVE_MOUNTS[@]}"
|
||||||
for i in "${FS_ACTIVE_MOUNTS[@]}"
|
|
||||||
do
|
|
||||||
info "umount overlayfs: [%s]" "$i"
|
|
||||||
check_umount $i
|
|
||||||
done
|
|
||||||
unset FS_ACTIVE_MOUNTS
|
unset FS_ACTIVE_MOUNTS
|
||||||
rm -rf "${mnt_dir}/work"
|
rm -rf "${mnt_dir}/work"
|
||||||
fi
|
fi
|
||||||
mount_folders=$(grep "${work_dir}" /proc/mounts | awk '{print$2}' | sort -r)
|
|
||||||
for i in $mount_folders
|
|
||||||
do
|
|
||||||
info "umount folder: [%s]" "$i"
|
|
||||||
check_umount $i
|
|
||||||
done
|
|
||||||
}
|
}
|
||||||
|
|
154
lib/util-iso.sh
154
lib/util-iso.sh
|
@ -137,14 +137,15 @@ make_sfs() {
|
||||||
|
|
||||||
mksfs_args+=(${sfs} -noappend)
|
mksfs_args+=(${sfs} -noappend)
|
||||||
|
|
||||||
local highcomp
|
local highcomp="-b 256K -Xbcj x86"
|
||||||
|
# local comp='xz'
|
||||||
[[ "${iso_compression}" == "xz" ]] && highcomp="-b 256K -Xbcj x86"
|
[[ "${iso_compression}" != "xz" ]] && highcomp=""
|
||||||
|
|
||||||
[[ "${iso_compression}" == "zstd" ]] && highcomp="-b 256K -Xcompression-level 20" #compression level max 22 (default 15)
|
|
||||||
|
|
||||||
mksfs_args+=(-comp ${iso_compression} ${highcomp})
|
|
||||||
|
|
||||||
|
if [[ "${name}" == "mhwdfs" && ${used_kernel} < "4" ]]; then
|
||||||
|
mksfs_args+=(-comp lz4)
|
||||||
|
else
|
||||||
|
mksfs_args+=(-comp ${iso_compression} ${highcomp})
|
||||||
|
fi
|
||||||
if ${verbose}; then
|
if ${verbose}; then
|
||||||
mksquashfs "${mksfs_args[@]}" >/dev/null
|
mksquashfs "${mksfs_args[@]}" >/dev/null
|
||||||
else
|
else
|
||||||
|
@ -187,7 +188,7 @@ assemble_iso(){
|
||||||
-e --interval:appended_partition_2:all:: \
|
-e --interval:appended_partition_2:all:: \
|
||||||
-no-emul-boot \
|
-no-emul-boot \
|
||||||
-full-iso9660-filenames \
|
-full-iso9660-filenames \
|
||||||
-iso-level 3 -rock -joliet \
|
-iso-level 3 \
|
||||||
-o ${iso_dir}/${iso_file} \
|
-o ${iso_dir}/${iso_file} \
|
||||||
${iso_root}/
|
${iso_root}/
|
||||||
}
|
}
|
||||||
|
@ -198,10 +199,6 @@ make_iso() {
|
||||||
touch "${iso_root}/.miso"
|
touch "${iso_root}/.miso"
|
||||||
for sfs_dir in $(find "${work_dir}" -maxdepth 1 -type d); do
|
for sfs_dir in $(find "${work_dir}" -maxdepth 1 -type d); do
|
||||||
if [[ "${sfs_dir}" != "${work_dir}" ]]; then
|
if [[ "${sfs_dir}" != "${work_dir}" ]]; then
|
||||||
if [[ -e "${sfs_dir}"/etc/pacman.d/gnupg ]]; then
|
|
||||||
msg2 "Removing '/etc/pacman.d/gnupg' folder from ${sfs_dir}"
|
|
||||||
rm -rf "${sfs_dir}"/etc/pacman.d/gnupg
|
|
||||||
fi
|
|
||||||
make_sfs "${sfs_dir}"
|
make_sfs "${sfs_dir}"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
@ -210,50 +207,13 @@ make_iso() {
|
||||||
# Sanity checks
|
# Sanity checks
|
||||||
[[ ! -d "${iso_root}" ]] && return 1
|
[[ ! -d "${iso_root}" ]] && return 1
|
||||||
if [[ -f "${iso_dir}/${iso_file}" ]]; then
|
if [[ -f "${iso_dir}/${iso_file}" ]]; then
|
||||||
msg2 "Removing ${iso_file} related files ..."
|
msg2 "Removing existing bootable image..."
|
||||||
[[ -f "${iso_dir}/${iso_file}" ]] && rm -f "${iso_dir}/${iso_file}"
|
rm -rf "${iso_dir}/${iso_file}"
|
||||||
[[ -f "${iso_dir}/${iso_file}.sig" ]] && rm -f "${iso_dir}/${iso_file}.sig"
|
|
||||||
[[ -f "${iso_dir}/${iso_file}.sha1" ]] && rm -f "${iso_dir}/${iso_file}.sha1"
|
|
||||||
[[ -f "${iso_dir}/${iso_file}.sha256" ]] && rm -f "${iso_dir}/${iso_file}.sha256"
|
|
||||||
[[ -f "${iso_dir}/${iso_file}.torrent" ]] && rm -f "${iso_dir}/${iso_file}.torrent"
|
|
||||||
fi
|
fi
|
||||||
assemble_iso
|
assemble_iso
|
||||||
|
|
||||||
${permalink} && gen_permalink
|
|
||||||
|
|
||||||
msg "Done [Build ISO]"
|
msg "Done [Build ISO]"
|
||||||
}
|
}
|
||||||
|
|
||||||
gen_permalink(){
|
|
||||||
if [[ ${edition} == "community" ]] || [[ ${edition} == "manjaro" ]]; then
|
|
||||||
if [[ -f "${iso_dir}/${iso_file}" ]]; then
|
|
||||||
msg2 "Creating download link ..."
|
|
||||||
direct_url="https://osdn.net/dl/${edition}/${iso_file}"
|
|
||||||
[[ ${edition} == "community" ]] && direct_url="https://osdn.net/dl/manjaro-${edition}/${iso_file}"
|
|
||||||
## html permalink
|
|
||||||
html_doc="<!DOCTYPE HTML>"
|
|
||||||
html_doc+="<meta charset=\"UTF-8\">"
|
|
||||||
html_doc+="<meta http-equiv=\"refresh\" content=\"1; url=${direct_url}\">"
|
|
||||||
html_doc+="<script>window.location.href=\"${direct_url}\"</script>"
|
|
||||||
html_doc+="<title>Download Redirection</title>"
|
|
||||||
html_doc+="If you are not redirected automatically, follow the <a href=\"${direct_url}\">link to latest iso</a>"
|
|
||||||
## php permalink
|
|
||||||
php_doc="<?php "
|
|
||||||
php_doc+="header('Location: ' . '${direct_url}', true, 303); "
|
|
||||||
php_doc+="die(); "
|
|
||||||
php_doc+="?>"
|
|
||||||
## write files
|
|
||||||
if [[ ${extra} == "true" ]]; then
|
|
||||||
echo ${html_doc} > "${iso_dir}/.latest"
|
|
||||||
echo ${php_doc} > "${iso_dir}/.latest.php"
|
|
||||||
else
|
|
||||||
echo ${html_doc} > "${iso_dir}/.latest-minimal"
|
|
||||||
echo ${php_doc} > "${iso_dir}/.latest-minimal.php"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
gen_iso_fn(){
|
gen_iso_fn(){
|
||||||
local vars=() name
|
local vars=() name
|
||||||
vars+=("${iso_name}")
|
vars+=("${iso_name}")
|
||||||
|
@ -261,20 +221,14 @@ gen_iso_fn(){
|
||||||
[[ -n ${profile} ]] && vars+=("${profile}")
|
[[ -n ${profile} ]] && vars+=("${profile}")
|
||||||
fi
|
fi
|
||||||
vars+=("${dist_release}")
|
vars+=("${dist_release}")
|
||||||
|
vars+=("${target_branch}")
|
||||||
[[ ! ${target_branch} == "stable" ]] && vars+=("${target_branch}")
|
|
||||||
|
|
||||||
[[ ${extra} == 'false' ]] && vars+=("minimal")
|
[[ ${extra} == 'false' ]] && vars+=("minimal")
|
||||||
|
|
||||||
vars+=("$(date +%y%m%d)")
|
vars+=("${target_arch}")
|
||||||
|
|
||||||
vars+=("${kernel}")
|
|
||||||
|
|
||||||
[[ ${target_arch} == "i686" ]] && vars+=("${target_arch}")
|
|
||||||
for n in ${vars[@]}; do
|
for n in ${vars[@]}; do
|
||||||
name=${name:-}${name:+-}${n}
|
name=${name:-}${name:+-}${n}
|
||||||
done
|
done
|
||||||
|
|
||||||
echo $name
|
echo $name
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -285,38 +239,6 @@ reset_pac_conf(){
|
||||||
-i "$1/etc/pacman.conf"
|
-i "$1/etc/pacman.conf"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Snap support
|
|
||||||
function seed_snaps() {
|
|
||||||
local SEED_DIR="/var/lib/snapd/seed"
|
|
||||||
local SEED_CHANNEL="${snap_channel}"
|
|
||||||
local SEED_SNAPS="${strict_snaps} ${classic_snaps}"
|
|
||||||
|
|
||||||
if [[ -n "${strict_snaps}" ]] || [[ -n "${classic_snaps}" ]]; then
|
|
||||||
msg2 "Configuring snaps"
|
|
||||||
# Preseeded snaps should be downloaded from a versioned channel
|
|
||||||
rm -rfv "$1/${SEED_DIR}"
|
|
||||||
mkdir -p "$1/${SEED_DIR}/snaps"
|
|
||||||
mkdir -p "$1/${SEED_DIR}/assertions"
|
|
||||||
SEED_LIST=()
|
|
||||||
|
|
||||||
# Update SEED_LIST
|
|
||||||
for SEED_SNAP in ${SEED_SNAPS}; do
|
|
||||||
if [[ "${SEED_SNAP}" == "core" ]] || [[ "${SEED_SNAP}" == "core16" ]] || [[ "${SEED_SNAP}" == "core18" ]]; then
|
|
||||||
SEED_LIST+=(--snap=${SEED_SNAP}=stable)
|
|
||||||
else
|
|
||||||
SEED_LIST+=(--snap=${SEED_SNAP}=${SEED_CHANNEL})
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
# Create model and account assertions
|
|
||||||
# Runs outside the container.
|
|
||||||
snap known model > /tmp/generic.model
|
|
||||||
snap prepare-image --arch amd64 --classic /tmp/generic.model "${SEED_LIST[@]}" "$1"
|
|
||||||
else
|
|
||||||
msg2 "No snaps found in profile. Skipping adding snaps"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# Base installation (rootfs)
|
# Base installation (rootfs)
|
||||||
make_image_root() {
|
make_image_root() {
|
||||||
if [[ ! -e ${work_dir}/build.${FUNCNAME} ]]; then
|
if [[ ! -e ${work_dir}/build.${FUNCNAME} ]]; then
|
||||||
|
@ -358,21 +280,8 @@ make_image_desktop() {
|
||||||
cp "${path}/desktopfs-pkgs.txt" ${iso_dir}/$(gen_iso_fn)-pkgs.txt
|
cp "${path}/desktopfs-pkgs.txt" ${iso_dir}/$(gen_iso_fn)-pkgs.txt
|
||||||
[[ -e ${profile_dir}/desktop-overlay ]] && copy_overlay "${profile_dir}/desktop-overlay" "${path}"
|
[[ -e ${profile_dir}/desktop-overlay ]] && copy_overlay "${profile_dir}/desktop-overlay" "${path}"
|
||||||
|
|
||||||
if [[ -e "${path}/usr/share/calamares/branding/manjaro/calamares-sidebar.qml" ]]; then
|
|
||||||
configure_branding "${path}"
|
|
||||||
msg "Done [Distribution: Release ${dist_release} Codename ${dist_codename}]"
|
|
||||||
elif [[ -e "${path}/usr/share/calamares/branding/manjaro/show.qml" ]]; then
|
|
||||||
configure_branding_old "${path}"
|
|
||||||
msg "Done [Distribution: Release ${dist_release} Codename ${dist_codename}]"
|
|
||||||
fi
|
|
||||||
|
|
||||||
reset_pac_conf "${path}"
|
reset_pac_conf "${path}"
|
||||||
|
|
||||||
seed_snaps ${path}
|
|
||||||
|
|
||||||
echo "Enable os-prober"
|
|
||||||
sed -i -e 's,.*GRUB_DISABLE_OS_PROBER=.*,GRUB_DISABLE_OS_PROBER=false,' "${path}/etc/default/grub"
|
|
||||||
|
|
||||||
umount_fs
|
umount_fs
|
||||||
clean_up_image "${path}"
|
clean_up_image "${path}"
|
||||||
: > ${work_dir}/build.${FUNCNAME}
|
: > ${work_dir}/build.${FUNCNAME}
|
||||||
|
@ -402,27 +311,15 @@ make_image_live() {
|
||||||
copy_overlay "${profile_dir}/live-overlay" "${path}"
|
copy_overlay "${profile_dir}/live-overlay" "${path}"
|
||||||
configure_live_image "${path}"
|
configure_live_image "${path}"
|
||||||
|
|
||||||
# mask some systemd targets on live-session
|
configure_branding "${path}"
|
||||||
mkdir -p "${path}"/etc/systemd/system
|
msg "Done [Distribution: Release ${dist_release} Codename ${dist_codename}]"
|
||||||
ln -sfv /dev/null "${path}"/etc/systemd/system/sleep.target
|
|
||||||
ln -sfv /dev/null "${path}"/etc/systemd/system/suspend.target
|
|
||||||
ln -sfv /dev/null "${path}"/etc/systemd/system/hibernate.target
|
|
||||||
ln -sfv /dev/null "${path}"/etc/systemd/system/hybrid-sleep.target
|
|
||||||
|
|
||||||
if [[ -e "${path}/usr/share/calamares/branding/manjaro/calamares-sidebar.qml" ]]; then
|
|
||||||
configure_branding "${path}"
|
|
||||||
msg "Done [Distribution: Release ${dist_release} Codename ${dist_codename}]"
|
|
||||||
elif [[ -e "${path}/usr/share/calamares/branding/manjaro/show.qml" ]]; then
|
|
||||||
configure_branding_old "${path}"
|
|
||||||
msg "Done [Distribution: Release ${dist_release} Codename ${dist_codename}]"
|
|
||||||
fi
|
|
||||||
|
|
||||||
configure_polkit_user_rules "${path}"
|
|
||||||
|
|
||||||
reset_pac_conf "${path}"
|
reset_pac_conf "${path}"
|
||||||
|
|
||||||
umount_fs
|
umount_fs
|
||||||
|
|
||||||
|
# Clean up GnuPG keys
|
||||||
|
rm -rf "${path}/etc/pacman.d/gnupg"
|
||||||
clean_up_image "${path}"
|
clean_up_image "${path}"
|
||||||
: > ${work_dir}/build.${FUNCNAME}
|
: > ${work_dir}/build.${FUNCNAME}
|
||||||
msg "Done [Live installation] (livefs)"
|
msg "Done [Live installation] (livefs)"
|
||||||
|
@ -446,7 +343,7 @@ make_image_mhwd() {
|
||||||
rm ${path}${mhwd_repo}/${mhwd_clean}
|
rm ${path}${mhwd_repo}/${mhwd_clean}
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
cp ${DATADIR}/pacman-mhwd.conf ${path}/opt/mhwd
|
cp ${DATADIR}/pacman-mhwd.conf ${path}/opt
|
||||||
make_repo "${path}"
|
make_repo "${path}"
|
||||||
configure_mhwd_drivers "${path}"
|
configure_mhwd_drivers "${path}"
|
||||||
|
|
||||||
|
@ -491,7 +388,7 @@ make_image_boot() {
|
||||||
|
|
||||||
configure_grub(){
|
configure_grub(){
|
||||||
local default_args="misobasedir=${iso_name} misolabel=${iso_label}" \
|
local default_args="misobasedir=${iso_name} misolabel=${iso_label}" \
|
||||||
boot_args=('quiet' 'systemd.show_status=1' ${custom_boot_args} ${apparmor_boot_args})
|
boot_args=('quiet' 'systemd.show_status=1')
|
||||||
|
|
||||||
sed -e "s|@DIST_NAME@|${dist_name}|g" \
|
sed -e "s|@DIST_NAME@|${dist_name}|g" \
|
||||||
-e "s|@ARCH@|${target_arch}|g" \
|
-e "s|@ARCH@|${target_arch}|g" \
|
||||||
|
@ -529,12 +426,12 @@ check_requirements(){
|
||||||
if ! $(is_valid_branch ${target_branch}); then
|
if ! $(is_valid_branch ${target_branch}); then
|
||||||
die "%s is not a valid branch!" "${target_branch}"
|
die "%s is not a valid branch!" "${target_branch}"
|
||||||
fi
|
fi
|
||||||
if ! $(is_valid_comp ${iso_compression}); then
|
|
||||||
die "%s is not a valid compression algorithm!" "${iso_compression}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
local iso_kernel=${kernel:5:1}
|
local iso_kernel=${kernel:5:1} host_kernel=$(uname -r)
|
||||||
[[ ${iso_kernel} < "4" ]] && die "ISO kernel must be version>=4.0!"
|
if [[ ${iso_kernel} < "4" ]] \
|
||||||
|
|| [[ ${host_kernel%%*.} < "4" ]]; then
|
||||||
|
die "The host and iso kernels must be version>=4.0!"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
compress_images(){
|
compress_images(){
|
||||||
|
@ -639,9 +536,6 @@ load_profile(){
|
||||||
|
|
||||||
iso_file=$(gen_iso_fn).iso
|
iso_file=$(gen_iso_fn).iso
|
||||||
|
|
||||||
[[ ${extra} == 'false' ]] && _edition=("m")
|
|
||||||
iso_label=$(get_iso_label "${dist_branding}_${profile}${_edition}_${dist_release//.}")
|
|
||||||
|
|
||||||
mkchroot_args+=(-C ${pacman_conf} -S ${mirrors_conf} -B "${build_mirror}/${target_branch}" -K)
|
mkchroot_args+=(-C ${pacman_conf} -S ${mirrors_conf} -B "${build_mirror}/${target_branch}" -K)
|
||||||
work_dir=${chroots_iso}/${profile}/${target_arch}
|
work_dir=${chroots_iso}/${profile}/${target_arch}
|
||||||
|
|
||||||
|
|
|
@ -45,31 +45,33 @@ chroot_part_mount() {
|
||||||
}
|
}
|
||||||
|
|
||||||
select_os(){
|
select_os(){
|
||||||
local detected_os_list=( $(detect) ) os_list=() count select os_str os_root
|
local os_list=( $(detect) ) count=${#os_list[@]}
|
||||||
for os in ${detected_os_list[@]}; do
|
|
||||||
case ${os##*:} in
|
|
||||||
'linux') os_list+=($os)
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
count=${#os_list[@]}
|
|
||||||
if [[ ${count} < 1 ]]; then
|
|
||||||
die "No Linux partitions detected!"
|
|
||||||
fi
|
|
||||||
if [[ ${count} > 1 ]]; then
|
if [[ ${count} > 1 ]]; then
|
||||||
msg "Detected systems:"
|
msg "Detected systems:"
|
||||||
local i=0
|
local i=0
|
||||||
for os in ${os_list[@]}; do
|
for os in ${os_list[@]}; do
|
||||||
info "$i) $(get_os_name $os)"; i=$((i+1))
|
local last=${os##*:}
|
||||||
done
|
case $last in
|
||||||
|
'efi') count=$((count-1)) ;;
|
||||||
|
*) info "$i) $(get_os_name $os)"; i=$((i+1)) ;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
i=0
|
||||||
msg "Select system to mount [0-%s] : " "$((count-1))"
|
msg "Select system to mount [0-%s] : " "$((count-1))"
|
||||||
read select
|
read select
|
||||||
else
|
else
|
||||||
select=0
|
select=0
|
||||||
fi
|
fi
|
||||||
os_str=${os_list[$select]}
|
local os_str=${os_list[$select]} type
|
||||||
os_root=${os_str%%:*}
|
type=$os_str
|
||||||
msg "Mounting (%s) [%s]" "$(get_os_name $os_str)" "$os_root"
|
root=${os_str%%:*}
|
||||||
chroot_mount_partitions "$1" "$os_root"
|
type=${type##*:}
|
||||||
|
if [[ "${type##*:}" == 'linux' ]]; then
|
||||||
|
msg "Mounting (%s) [%s]" "$(get_os_name $os_str)" "$root"
|
||||||
|
chroot_mount_partitions "$1" "$root"
|
||||||
|
else
|
||||||
|
die "You can't mount %s!" "$select"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
chroot_mount_partitions(){
|
chroot_mount_partitions(){
|
||||||
|
|
|
@ -129,10 +129,8 @@ move_to_cache(){
|
||||||
local src="$1"
|
local src="$1"
|
||||||
[[ -n $PKGDEST ]] && src="$PKGDEST/$1"
|
[[ -n $PKGDEST ]] && src="$PKGDEST/$1"
|
||||||
[[ ! -f $src ]] && die
|
[[ ! -f $src ]] && die
|
||||||
if [[ ${pkg_dir} != $PKGDEST ]]; then
|
msg2 "Moving [%s] -> [%s]" "${src##*/}" "${pkg_dir}"
|
||||||
msg2 "Moving [%s] -> [%s]" "${src##*/}" "${pkg_dir}"
|
mv $src ${pkg_dir}/
|
||||||
mv $src ${pkg_dir}/
|
|
||||||
fi
|
|
||||||
${sign} && sign_pkg "${src##*/}"
|
${sign} && sign_pkg "${src##*/}"
|
||||||
user_own "${pkg_dir}" "-R"
|
user_own "${pkg_dir}" "-R"
|
||||||
}
|
}
|
||||||
|
@ -156,7 +154,7 @@ archive_logs(){
|
||||||
|
|
||||||
post_build(){
|
post_build(){
|
||||||
source PKGBUILD
|
source PKGBUILD
|
||||||
local ext='pkg.tar.zst' tarch ver src
|
local ext='pkg.tar.xz' tarch ver src
|
||||||
for pkg in ${pkgname[@]}; do
|
for pkg in ${pkgname[@]}; do
|
||||||
case $arch in
|
case $arch in
|
||||||
any) tarch='any' ;;
|
any) tarch='any' ;;
|
||||||
|
|
|
@ -9,8 +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.
|
||||||
|
|
||||||
import ${LIBDIR}/util.sh
|
|
||||||
|
|
||||||
# $1: sofile
|
# $1: sofile
|
||||||
# $2: soarch
|
# $2: soarch
|
||||||
process_sofile() {
|
process_sofile() {
|
||||||
|
|
|
@ -9,25 +9,17 @@
|
||||||
# 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.
|
||||||
|
|
||||||
local MINIMAL
|
|
||||||
|
|
||||||
connect(){
|
connect(){
|
||||||
${alt_storage} && server="storage-in" || server="storage"
|
${alt_storage} && server="storage-in" || server="storage"
|
||||||
local storage="@${server}.osdn.net:/storage/groups/m/ma/"
|
local storage="@${server}.osdn.net:/storage/groups/m/ma/"
|
||||||
echo "${account}${storage}${project}"
|
echo "${account}${storage}${project}"
|
||||||
}
|
}
|
||||||
|
|
||||||
connect_shell(){
|
|
||||||
local shell="@shell.osdn.net:/home/groups/m/ma/"
|
|
||||||
echo "${account}${shell}${project}"
|
|
||||||
}
|
|
||||||
|
|
||||||
make_torrent(){
|
make_torrent(){
|
||||||
find ${src_dir} -type f -name "*.torrent" -delete
|
find ${src_dir} -type f -name "*.torrent" -delete
|
||||||
|
|
||||||
if [[ -n $(find ${src_dir} -type f -name "*.iso") ]]; then
|
if [[ -n $(find ${src_dir} -type f -name "*.iso") ]]; then
|
||||||
isos=$(ls ${src_dir}/*.iso)
|
for iso in $(ls ${src_dir}/*.iso); do
|
||||||
for iso in ${isos}; do
|
|
||||||
local seed=https://${host}/dl/${project}/${iso##*/}
|
local seed=https://${host}/dl/${project}/${iso##*/}
|
||||||
local mktorrent_args=(-c "${torrent_meta}" -p -l ${piece_size} -a ${tracker_url} -w ${seed})
|
local mktorrent_args=(-c "${torrent_meta}" -p -l ${piece_size} -a ${tracker_url} -w ${seed})
|
||||||
${verbose} && mktorrent_args+=(-v)
|
${verbose} && mktorrent_args+=(-v)
|
||||||
|
@ -42,10 +34,7 @@ prepare_transfer(){
|
||||||
hidden="$2"
|
hidden="$2"
|
||||||
edition=$(get_edition "${profile}")
|
edition=$(get_edition "${profile}")
|
||||||
[[ -z ${project} ]] && project="$(get_project)"
|
[[ -z ${project} ]] && project="$(get_project)"
|
||||||
server=$(connect)
|
url=$(connect)
|
||||||
|
|
||||||
webshell=$(connect_shell)
|
|
||||||
htdocs="htdocs/${profile}"
|
|
||||||
|
|
||||||
target_dir="${profile}/${dist_release}"
|
target_dir="${profile}/${dist_release}"
|
||||||
src_dir="${run_dir}/${edition}/${target_dir}"
|
src_dir="${run_dir}/${edition}/${target_dir}"
|
||||||
|
@ -84,178 +73,16 @@ sync_dir(){
|
||||||
${ssh_agent} && ssh_add
|
${ssh_agent} && ssh_add
|
||||||
|
|
||||||
msg "Start upload [%s] to [%s] ..." "$1" "${project}"
|
msg "Start upload [%s] to [%s] ..." "$1" "${project}"
|
||||||
|
while [[ $count -le $max_count ]]; do
|
||||||
while [[ $count -le $max_count ]]; do
|
rsync ${rsync_args[*]} ${src_dir}/ ${url}/${target_dir}/
|
||||||
rsync ${rsync_args[*]} --exclude '.latest*' --exclude 'index.html' --exclude 'links.txt' ${src_dir}/ ${server}/${target_dir}/
|
|
||||||
if [[ $? != 0 ]]; then
|
if [[ $? != 0 ]]; then
|
||||||
count=$(($count + 1))
|
count=$(($count + 1))
|
||||||
msg "Upload failed. retrying (%s/%s) ..." "$count" "$max_count"
|
msg "Upload failed. retrying (%s/%s) ..." "$count" "$max_count"
|
||||||
sleep 2
|
sleep 2
|
||||||
else
|
else
|
||||||
count=$(($max_count + 1))
|
count=$(($max_count + 1))
|
||||||
|
|
||||||
${upd_homepage} && pull_hp_repo
|
|
||||||
${shell_upload} && upload_permalinks
|
|
||||||
|
|
||||||
msg "Done upload [%s]" "$1"
|
msg "Done upload [%s]" "$1"
|
||||||
show_elapsed_time "${FUNCNAME}" "${timer_start}"
|
show_elapsed_time "${FUNCNAME}" "${timer_start}"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
upload_permalinks(){
|
|
||||||
## permalinks for full ISO
|
|
||||||
if [[ -f "${src_dir}/.latest" ]]; then
|
|
||||||
msg "Uploading permalinks ..."
|
|
||||||
LATEST_ISO=$(sed -e 's/\"/\n/g' < "${src_dir}/.latest" | grep -Eo 'http.*iso$' -m1 | awk '{split($0,x,"/"); print x[6]}')
|
|
||||||
PKGLIST="${LATEST_ISO/.iso/-pkgs.txt}"
|
|
||||||
|
|
||||||
## upload redirector files
|
|
||||||
[[ -f "${src_dir}/.latest" ]] && sync_latest_html
|
|
||||||
[[ -f "${src_dir}/.latest.php" ]] && sync_latest_php
|
|
||||||
|
|
||||||
## upload verification files, torrent and package list
|
|
||||||
[[ -f "${src_dir}/${LATEST_ISO}.torrent" ]] && sync_latest_torrent
|
|
||||||
[[ -f "${src_dir}/${LATEST_ISO}.sig" ]] && sync_latest_signature
|
|
||||||
[[ -f "${src_dir}/${LATEST_ISO}.sha1" ]] && sync_latest_checksum_sha1
|
|
||||||
[[ -f "${src_dir}/${LATEST_ISO}.sha256" ]] && sync_latest_checksum_sha256
|
|
||||||
[[ -f "${src_dir}/${PKGLIST}" ]] && sync_latest_pkg_list
|
|
||||||
|
|
||||||
${upd_homepage} && upd_dl_checksum
|
|
||||||
fi
|
|
||||||
|
|
||||||
## permalinks for minimal ISO
|
|
||||||
if [[ -f "${src_dir}/.latest-minimal" ]]; then
|
|
||||||
msg "Uploading permalinks (minimal) ..."
|
|
||||||
MINIMAL="yes"
|
|
||||||
LATEST_ISO=$(sed -e 's/\"/\n/g' < "${src_dir}/.latest-minimal" | grep -Eo 'http.*iso$' -m1 | awk '{split($0,x,"/"); print x[6]}')
|
|
||||||
PKGLIST="${LATEST_ISO/.iso/-pkgs.txt}"
|
|
||||||
|
|
||||||
## upload redirector files
|
|
||||||
[[ -f "${src_dir}/.latest-minimal" ]] && sync_latest_html
|
|
||||||
[[ -f "${src_dir}/.latest-minimal.php" ]] && sync_latest_php
|
|
||||||
|
|
||||||
## upload verification files, torrent and package list
|
|
||||||
[[ -f "${src_dir}/${LATEST_ISO}.torrent" ]] && sync_latest_torrent
|
|
||||||
[[ -f "${src_dir}/${LATEST_ISO}.sig" ]] && sync_latest_signature
|
|
||||||
[[ -f "${src_dir}/${LATEST_ISO}.sha1" ]] && sync_latest_checksum_sha1
|
|
||||||
[[ -f "${src_dir}/${LATEST_ISO}.sha256" ]] && sync_latest_checksum_sha256
|
|
||||||
[[ -f "${src_dir}/${PKGLIST}" ]] && sync_latest_pkg_list
|
|
||||||
|
|
||||||
${upd_homepage} && upd_dl_checksum_minimal
|
|
||||||
fi
|
|
||||||
|
|
||||||
${upd_homepage} && upd_dl_version && push_hp_repo
|
|
||||||
}
|
|
||||||
|
|
||||||
sync_latest_pkg_list(){
|
|
||||||
msg2 "Uploading package list ..."
|
|
||||||
local pkglist="latest-pkgs.txt"
|
|
||||||
[[ ${MINIMAL} == "yes" ]] && pkglist="latest-minimal-pkgs.txt"
|
|
||||||
chmod g+w "${src_dir}/${PKGLIST}"
|
|
||||||
scp -p "${src_dir}/${PKGLIST}" "${webshell}/${htdocs}/${pkglist}"
|
|
||||||
}
|
|
||||||
|
|
||||||
sync_latest_checksum_sha256(){
|
|
||||||
msg2 "Uploading sha256 checksum file ..."
|
|
||||||
local filename="${LATEST_ISO}.sha256"
|
|
||||||
local checksum_file="latest.sha256"
|
|
||||||
[[ ${MINIMAL} == "yes" ]] && checksum_file="latest-minimal.sha256"
|
|
||||||
chmod g+w "${src_dir}/${filename}"
|
|
||||||
scp -p "${src_dir}/${filename}" "${webshell}/${htdocs}/${checksum_file}"
|
|
||||||
}
|
|
||||||
|
|
||||||
sync_latest_checksum_sha1(){
|
|
||||||
msg2 "Uploading sha1 checksum file ..."
|
|
||||||
local filename="${LATEST_ISO}.sha1"
|
|
||||||
local checksum_file="latest.sha1"
|
|
||||||
[[ ${MINIMAL} == "yes" ]] && checksum_file="latest-minimal.sha1"
|
|
||||||
chmod g+w "${src_dir}/${filename}"
|
|
||||||
scp -p "${src_dir}/${filename}" "${webshell}/${htdocs}/${checksum_file}"
|
|
||||||
}
|
|
||||||
|
|
||||||
sync_latest_signature(){
|
|
||||||
msg2 "Uploading signature file ..."
|
|
||||||
local filename="${LATEST_ISO}.sig"
|
|
||||||
local signature="latest.sig"
|
|
||||||
[[ ${MINIMAL} == "yes" ]] && signature="latest-minimal.sig"
|
|
||||||
chmod g+w "${src_dir}/${filename}"
|
|
||||||
scp -p "${src_dir}/${filename}" "${webshell}/${htdocs}/${signature}"
|
|
||||||
}
|
|
||||||
|
|
||||||
sync_latest_torrent(){
|
|
||||||
msg2 "Uploading torrent file ..."
|
|
||||||
local filename="${LATEST_ISO}.torrent"
|
|
||||||
local torrent="latest.torrent"
|
|
||||||
[[ ${MINIMAL} == "yes" ]] && torrent="latest-minimal.torrent"
|
|
||||||
chmod g+w "${src_dir}/${filename}"
|
|
||||||
scp -p "${src_dir}/${filename}" "${webshell}/${htdocs}/${torrent}"
|
|
||||||
}
|
|
||||||
|
|
||||||
sync_latest_php(){
|
|
||||||
msg2 "Uploading php redirector ..."
|
|
||||||
local filename=".latest.php"
|
|
||||||
local php="latest.php"
|
|
||||||
[[ ${MINIMAL} == "yes" ]] && filename=".latest-minimal.php" && php="latest-minimal.php"
|
|
||||||
chmod g+w "${src_dir}/${filename}"
|
|
||||||
scp -p "${src_dir}/.${php}" "${webshell}/${htdocs}/${php}"
|
|
||||||
}
|
|
||||||
|
|
||||||
sync_latest_html(){
|
|
||||||
msg2 "Uploading url redirector ..."
|
|
||||||
local filename=".latest"
|
|
||||||
local html="latest"
|
|
||||||
[[ ${MINIMAL} == "yes" ]] && filename=".latest-minimal" && html="latest-minimal"
|
|
||||||
chmod g+w "${src_dir}/${filename}"
|
|
||||||
scp -p "${src_dir}/.${html}" "${webshell}/${htdocs}/${html}"
|
|
||||||
}
|
|
||||||
|
|
||||||
pull_hp_repo(){
|
|
||||||
load_vars "$USER_HOME/.makepkg.conf" || load_vars /etc/makepkg.conf
|
|
||||||
[[ -z $SRCDEST ]] && SRCDEST=${cache_dir}
|
|
||||||
|
|
||||||
hp_repo=manjaro-homepage
|
|
||||||
[[ ${edition} == "manjaro" ]] && _edition="official" || _edition=${edition}
|
|
||||||
dl_file="${SRCDEST}/${hp_repo}/site/content/downloads/${_edition}/${profile}.md"
|
|
||||||
|
|
||||||
cd "${SRCDEST}"
|
|
||||||
if [[ ! -d "${hp_repo}" ]]; then
|
|
||||||
msg "Cloning manjaro.org"
|
|
||||||
git clone "ssh://git@gitlab.manjaro.org:22277/webpage/${hp_repo}.git"
|
|
||||||
else
|
|
||||||
cd "${hp_repo}"
|
|
||||||
msg "Pulling manjaro.org"
|
|
||||||
git pull
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
push_hp_repo(){
|
|
||||||
cd "${SRCDEST}/${hp_repo}"
|
|
||||||
msg "Updating manjaro.org"
|
|
||||||
git add ${dl_file}
|
|
||||||
git commit -m "update download ${profile}"
|
|
||||||
git push
|
|
||||||
}
|
|
||||||
|
|
||||||
upd_dl_checksum(){
|
|
||||||
local checksum=$(cat "${src_dir}/${LATEST_ISO}.sha1" | cut -d' ' -f1)
|
|
||||||
msg "Updating download page:"
|
|
||||||
msg2 "checksum > ${checksum}"
|
|
||||||
sed -i "/Download_x64_Checksum/c\Download_x64_Checksum = \"${checksum}\"" ${dl_file}
|
|
||||||
}
|
|
||||||
|
|
||||||
upd_dl_checksum_minimal(){
|
|
||||||
local checksum=$(cat "${src_dir}/${LATEST_ISO}.sha1" | cut -d' ' -f1)
|
|
||||||
msg "Updating download page:"
|
|
||||||
msg2 "checksum_minimal > ${checksum}"
|
|
||||||
sed -i "/Download_Minimal_x64_Checksum/c\Download_Minimal_x64_Checksum = \"${checksum}\"" ${dl_file}
|
|
||||||
}
|
|
||||||
|
|
||||||
upd_dl_version(){
|
|
||||||
timestamp=$(date -u +%Y-%m-%dT%T%Z)
|
|
||||||
msg2 "Version > ${dist_release}"
|
|
||||||
sed -i "/Version/c\Version = \"${dist_release}\"" ${dl_file}
|
|
||||||
msg2 "date > ${timestamp}"
|
|
||||||
sed -i "/^date/c\date = \"${timestamp}\"" ${dl_file}
|
|
||||||
}
|
}
|
||||||
|
|
171
lib/util-yaml.sh
171
lib/util-yaml.sh
|
@ -10,7 +10,7 @@
|
||||||
# GNU General Public License for more details.
|
# GNU General Public License for more details.
|
||||||
|
|
||||||
write_machineid_conf(){
|
write_machineid_conf(){
|
||||||
local conf="${etc_config_dir}/machineid.conf"
|
local conf="${modules_dir}/machineid.conf"
|
||||||
msg2 "Writing %s ..." "${conf##*/}"
|
msg2 "Writing %s ..." "${conf##*/}"
|
||||||
echo '---' > "$conf"
|
echo '---' > "$conf"
|
||||||
echo "systemd: true" >> $conf
|
echo "systemd: true" >> $conf
|
||||||
|
@ -20,7 +20,7 @@ write_machineid_conf(){
|
||||||
|
|
||||||
write_finished_conf(){
|
write_finished_conf(){
|
||||||
msg2 "Writing %s ..." "finished.conf"
|
msg2 "Writing %s ..." "finished.conf"
|
||||||
local conf="${etc_config_dir}/finished.conf" cmd="systemctl reboot"
|
local conf="${modules_dir}/finished.conf" cmd="systemctl reboot"
|
||||||
echo '---' > "$conf"
|
echo '---' > "$conf"
|
||||||
echo 'restartNowEnabled: true' >> "$conf"
|
echo 'restartNowEnabled: true' >> "$conf"
|
||||||
echo 'restartNowChecked: false' >> "$conf"
|
echo 'restartNowChecked: false' >> "$conf"
|
||||||
|
@ -42,7 +42,7 @@ get_preset(){
|
||||||
}
|
}
|
||||||
|
|
||||||
write_bootloader_conf(){
|
write_bootloader_conf(){
|
||||||
local conf="${etc_config_dir}/bootloader.conf"
|
local conf="${modules_dir}/bootloader.conf"
|
||||||
msg2 "Writing %s ..." "${conf##*/}"
|
msg2 "Writing %s ..." "${conf##*/}"
|
||||||
source "$(get_preset)"
|
source "$(get_preset)"
|
||||||
echo '---' > "$conf"
|
echo '---' > "$conf"
|
||||||
|
@ -63,7 +63,7 @@ write_bootloader_conf(){
|
||||||
}
|
}
|
||||||
|
|
||||||
write_servicescfg_conf(){
|
write_servicescfg_conf(){
|
||||||
local conf="${etc_config_dir}/servicescfg.conf"
|
local conf="${modules_dir}/servicescfg.conf"
|
||||||
msg2 "Writing %s ..." "${conf##*/}"
|
msg2 "Writing %s ..." "${conf##*/}"
|
||||||
echo '---' > "$conf"
|
echo '---' > "$conf"
|
||||||
echo '' >> "$conf"
|
echo '' >> "$conf"
|
||||||
|
@ -72,67 +72,30 @@ write_servicescfg_conf(){
|
||||||
}
|
}
|
||||||
|
|
||||||
write_services_conf(){
|
write_services_conf(){
|
||||||
local conf="${etc_config_dir}/services.conf"
|
local conf="${modules_dir}/services.conf"
|
||||||
local check="${modules_dir}/services.conf"
|
|
||||||
msg2 "Writing %s ..." "${conf##*/}"
|
msg2 "Writing %s ..." "${conf##*/}"
|
||||||
echo '---' > "$conf"
|
echo '---' > "$conf"
|
||||||
echo '' >> "$conf"
|
echo '' >> "$conf"
|
||||||
if [ ! ${#enable_systemd[@]} -eq 0 ]; then
|
echo 'services:' > "$conf"
|
||||||
if [ ! $(grep "services:" ${check} | wc -l) -eq 0 ]; then
|
for s in ${enable_systemd[@]}; do
|
||||||
echo 'services:' >> "$conf"
|
echo " - name: $s" >> "$conf"
|
||||||
else
|
echo ' mandatory: false' >> "$conf"
|
||||||
echo 'units:' >> "$conf"
|
echo '' >> "$conf"
|
||||||
fi
|
done
|
||||||
for s in ${enable_systemd[@]}; do
|
echo 'targets:' >> "$conf"
|
||||||
if [ ! $(grep "services:" ${check} | wc -l) -eq 0 ]; then
|
echo ' - name: "graphical"' >> "$conf"
|
||||||
echo " - name: $s" >> "$conf"
|
|
||||||
else
|
|
||||||
echo " - name: $s.service" >> "$conf"
|
|
||||||
echo ' action: "enable"' >> "$conf"
|
|
||||||
fi
|
|
||||||
echo ' mandatory: false' >> "$conf"
|
|
||||||
echo '' >> "$conf"
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
if [ ! ${#enable_systemd_timers[@]} -eq 0 ]; then
|
|
||||||
[ ! $(grep "timers:" ${check} | wc -l) -eq 0 ] && echo 'timers:' >> "$conf"
|
|
||||||
for s in ${enable_systemd_timers[@]}; do
|
|
||||||
if [ ! $(grep "timers:" ${check} | wc -l) -eq 0 ]; then
|
|
||||||
echo " - name: $s" >> "$conf"
|
|
||||||
else
|
|
||||||
echo " - name: $s.timer" >> "$conf"
|
|
||||||
echo ' action: "enable"' >> "$conf"
|
|
||||||
fi
|
|
||||||
echo ' mandatory: false' >> "$conf"
|
|
||||||
echo '' >> "$conf"
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
[ ! $(grep "targets:" ${check} | wc -l) -eq 0 ] && echo 'targets:' >> "$conf"
|
|
||||||
if [ ! $(grep "targets:" ${check} | wc -l) -eq 0 ]; then
|
|
||||||
echo ' - name: "graphical"' >> "$conf"
|
|
||||||
else
|
|
||||||
echo ' - name: "graphical.target"' >> "$conf"
|
|
||||||
echo ' action: "set-default"' >> "$conf"
|
|
||||||
fi
|
|
||||||
echo ' mandatory: true' >> "$conf"
|
echo ' mandatory: true' >> "$conf"
|
||||||
echo '' >> "$conf"
|
echo '' >> "$conf"
|
||||||
if [ ! ${#disable_systemd[@]} -eq 0 ]; then
|
echo 'disable:' >> "$conf"
|
||||||
[ ! $(grep "disable:" ${check} | wc -l) -eq 0 ] && echo 'disable:' >> "$conf"
|
for s in ${disable_systemd[@]}; do
|
||||||
for s in ${disable_systemd[@]}; do
|
echo " - name: $s" >> "$conf"
|
||||||
if [ ! $(grep "services:" ${check} | wc -l) -eq 0 ]; then
|
echo ' mandatory: false' >> "$conf"
|
||||||
echo " - name: $s" >> "$conf"
|
echo '' >> "$conf"
|
||||||
else
|
done
|
||||||
echo " - name: $s.service" >> "$conf"
|
|
||||||
echo ' action: "disable"' >> "$conf"
|
|
||||||
fi
|
|
||||||
echo ' mandatory: false' >> "$conf"
|
|
||||||
echo '' >> "$conf"
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
write_displaymanager_conf(){
|
write_displaymanager_conf(){
|
||||||
local conf="${etc_config_dir}/displaymanager.conf"
|
local conf="${modules_dir}/displaymanager.conf"
|
||||||
msg2 "Writing %s ..." "${conf##*/}"
|
msg2 "Writing %s ..." "${conf##*/}"
|
||||||
echo "---" > "$conf"
|
echo "---" > "$conf"
|
||||||
echo "displaymanagers:" >> "$conf"
|
echo "displaymanagers:" >> "$conf"
|
||||||
|
@ -147,14 +110,14 @@ write_displaymanager_conf(){
|
||||||
}
|
}
|
||||||
|
|
||||||
write_initcpio_conf(){
|
write_initcpio_conf(){
|
||||||
local conf="${etc_config_dir}/initcpio.conf"
|
local conf="${modules_dir}/initcpio.conf"
|
||||||
msg2 "Writing %s ..." "${conf##*/}"
|
msg2 "Writing %s ..." "${conf##*/}"
|
||||||
echo "---" > "$conf"
|
echo "---" > "$conf"
|
||||||
echo "kernel: ${kernel}" >> "$conf"
|
echo "kernel: ${kernel}" >> "$conf"
|
||||||
}
|
}
|
||||||
|
|
||||||
write_unpack_conf(){
|
write_unpack_conf(){
|
||||||
local conf="${etc_config_dir}/unpackfs.conf"
|
local conf="${modules_dir}/unpackfs.conf"
|
||||||
msg2 "Writing %s ..." "${conf##*/}"
|
msg2 "Writing %s ..." "${conf##*/}"
|
||||||
echo "---" > "$conf"
|
echo "---" > "$conf"
|
||||||
echo "unpack:" >> "$conf"
|
echo "unpack:" >> "$conf"
|
||||||
|
@ -169,7 +132,7 @@ write_unpack_conf(){
|
||||||
}
|
}
|
||||||
|
|
||||||
write_users_conf(){
|
write_users_conf(){
|
||||||
local conf="${etc_config_dir}/users.conf"
|
local conf="${modules_dir}/users.conf"
|
||||||
msg2 "Writing %s ..." "${conf##*/}"
|
msg2 "Writing %s ..." "${conf##*/}"
|
||||||
echo "---" > "$conf"
|
echo "---" > "$conf"
|
||||||
echo "defaultGroups:" >> "$conf"
|
echo "defaultGroups:" >> "$conf"
|
||||||
|
@ -181,8 +144,6 @@ write_users_conf(){
|
||||||
echo "autologinGroup: autologin" >> "$conf"
|
echo "autologinGroup: autologin" >> "$conf"
|
||||||
echo "doAutologin: false" >> "$conf" # can be either 'true' or 'false'
|
echo "doAutologin: false" >> "$conf" # can be either 'true' or 'false'
|
||||||
echo "sudoersGroup: wheel" >> "$conf"
|
echo "sudoersGroup: wheel" >> "$conf"
|
||||||
echo "passwordRequirements:" >> "$conf"
|
|
||||||
echo " nonempty: true" >> "$conf" # can be either 'true' or 'false'
|
|
||||||
echo "setRootPassword: true" >> "$conf" # must be true, else some options get hidden
|
echo "setRootPassword: true" >> "$conf" # must be true, else some options get hidden
|
||||||
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
|
||||||
|
@ -192,42 +153,17 @@ write_users_conf(){
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
write_partition_conf(){
|
|
||||||
local conf="${etc_config_dir}/partition.conf"
|
|
||||||
msg2 "Writing %s ..." "${conf##*/}"
|
|
||||||
echo "---" > "$conf"
|
|
||||||
echo "efiSystemPartition: \"/boot/efi\"" >> "$conf"
|
|
||||||
echo "userSwapChoices:" >> "$conf"
|
|
||||||
echo " - none # Create no swap, use no swap" >> "$conf"
|
|
||||||
echo " - small # Up to 4GB" >> "$conf"
|
|
||||||
echo " - suspend # At least main memory size" >> "$conf"
|
|
||||||
echo " - file # To swap file instead of partition" >> "$conf"
|
|
||||||
echo "alwaysShowPartitionLabels: true" >> "$conf"
|
|
||||||
echo "# There are four options: erase, replace, alongside, manual)," >> "$conf"
|
|
||||||
echo "# the default is \"none\"." >> "$conf"
|
|
||||||
echo "initialPartitioningChoice: erase" >> "$conf"
|
|
||||||
echo "initialSwapChoice: none" >> "$conf"
|
|
||||||
echo "defaultFileSystemType: \"ext4\"" >> "$conf"
|
|
||||||
echo "availableFileSystemTypes: [\"ext4\",\"btrfs\",\"f2fs\",\"xfs\"]" >> "$conf"
|
|
||||||
}
|
|
||||||
|
|
||||||
write_packages_conf(){
|
write_packages_conf(){
|
||||||
local conf="${etc_config_dir}/packages.conf"
|
local conf="${modules_dir}/packages.conf"
|
||||||
msg2 "Writing %s ..." "${conf##*/}"
|
msg2 "Writing %s ..." "${conf##*/}"
|
||||||
echo "---" > "$conf"
|
echo "---" > "$conf"
|
||||||
echo "backend: pacman" >> "$conf"
|
echo "backend: pacman" >> "$conf"
|
||||||
echo '' >> "$conf"
|
echo '' >> "$conf"
|
||||||
if ${needs_internet}; then
|
|
||||||
echo "skip_if_no_internet: false" >> "$conf"
|
|
||||||
else
|
|
||||||
echo "skip_if_no_internet: true" >> "$conf"
|
|
||||||
fi
|
|
||||||
echo "update_db: true" >> "$conf"
|
echo "update_db: true" >> "$conf"
|
||||||
echo "update_system: true" >> "$conf"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
write_welcome_conf(){
|
write_welcome_conf(){
|
||||||
local conf="${etc_config_dir}/welcome.conf"
|
local conf="${modules_dir}/welcome.conf"
|
||||||
msg2 "Writing %s ..." "${conf##*/}"
|
msg2 "Writing %s ..." "${conf##*/}"
|
||||||
echo "---" > "$conf" >> "$conf"
|
echo "---" > "$conf" >> "$conf"
|
||||||
echo "showSupportUrl: true" >> "$conf"
|
echo "showSupportUrl: true" >> "$conf"
|
||||||
|
@ -248,19 +184,13 @@ write_welcome_conf(){
|
||||||
echo " - storage" >> "$conf"
|
echo " - storage" >> "$conf"
|
||||||
echo " - ram" >> "$conf"
|
echo " - ram" >> "$conf"
|
||||||
echo " - root" >> "$conf"
|
echo " - root" >> "$conf"
|
||||||
if ${needs_internet}; then
|
if ${netinstall}; then
|
||||||
echo " - internet" >> "$conf"
|
echo " - internet" >> "$conf"
|
||||||
fi
|
fi
|
||||||
if ${geoip}; then
|
|
||||||
echo 'geoip:' >> "$conf"
|
|
||||||
echo ' style: "json"' >> "$conf"
|
|
||||||
echo ' url: "https://ipapi.co/json"' >> "$conf"
|
|
||||||
echo ' selector: "country"' >> "$conf"
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
write_mhwdcfg_conf(){
|
write_mhwdcfg_conf(){
|
||||||
local conf="${etc_config_dir}/mhwdcfg.conf"
|
local conf="${modules_dir}/mhwdcfg.conf"
|
||||||
msg2 "Writing %s ..." "${conf##*/}"
|
msg2 "Writing %s ..." "${conf##*/}"
|
||||||
echo "---" > "$conf"
|
echo "---" > "$conf"
|
||||||
echo "bus:" >> "$conf"
|
echo "bus:" >> "$conf"
|
||||||
|
@ -283,11 +213,11 @@ write_mhwdcfg_conf(){
|
||||||
${netinstall} && switch='false'
|
${netinstall} && switch='false'
|
||||||
echo "local: ${switch}" >> "$conf"
|
echo "local: ${switch}" >> "$conf"
|
||||||
echo '' >> "$conf"
|
echo '' >> "$conf"
|
||||||
echo 'repo: /opt/mhwd/pacman-mhwd.conf' >> "$conf"
|
echo 'repo: /opt/pacman-mhwd.conf' >> "$conf"
|
||||||
}
|
}
|
||||||
|
|
||||||
write_postcfg_conf(){
|
write_postcfg_conf(){
|
||||||
local conf="${etc_config_dir}/postcfg.conf"
|
local conf="${modules_dir}/postcfg.conf"
|
||||||
msg2 "Writing %s ..." "${conf##*/}"
|
msg2 "Writing %s ..." "${conf##*/}"
|
||||||
echo "---" > "$conf"
|
echo "---" > "$conf"
|
||||||
echo "keyrings:" >> "$conf"
|
echo "keyrings:" >> "$conf"
|
||||||
|
@ -315,24 +245,21 @@ get_yaml(){
|
||||||
}
|
}
|
||||||
|
|
||||||
write_netinstall_conf(){
|
write_netinstall_conf(){
|
||||||
local conf="${etc_config_dir}/netinstall.conf"
|
local conf="${modules_dir}/netinstall.conf"
|
||||||
msg2 "Writing %s ..." "${conf##*/}"
|
msg2 "Writing %s ..." "${conf##*/}"
|
||||||
echo "---" > "$conf"
|
echo "---" > "$conf"
|
||||||
echo "groupsUrl: ${netgroups}/$(get_yaml)" >> "$conf"
|
echo "groupsUrl: ${netgroups}/$(get_yaml)" >> "$conf"
|
||||||
echo "label:" >> "$conf"
|
|
||||||
echo " sidebar: \"${netinstall_label}\"" >> "$conf"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
write_locale_conf(){
|
write_locale_conf(){
|
||||||
local conf="${etc_config_dir}/locale.conf"
|
local conf="${modules_dir}/locale.conf"
|
||||||
msg2 "Writing %s ..." "${conf##*/}"
|
msg2 "Writing %s ..." "${conf##*/}"
|
||||||
echo "---" > "$conf"
|
echo "---" > "$conf"
|
||||||
echo "localeGenPath: /etc/locale.gen" >> "$conf"
|
echo "localeGenPath: /etc/locale.gen" >> "$conf"
|
||||||
if ${geoip}; then
|
if ${geoip}; then
|
||||||
echo 'geoip:' >> "$conf"
|
echo "geoipUrl: https://get.geojs.io/v1/ip/geo.json" >> "$conf"
|
||||||
echo ' style: "json"' >> "$conf"
|
echo "geoipStyle: json" >> "$conf"
|
||||||
echo ' url: "https://ipapi.co/json"' >> "$conf"
|
echo "geoipSelector: timezone" >> "$conf"
|
||||||
echo ' selector: "timezone"' >> "$conf"
|
|
||||||
else
|
else
|
||||||
echo "region: America" >> "$conf"
|
echo "region: America" >> "$conf"
|
||||||
echo "zone: New_York" >> "$conf"
|
echo "zone: New_York" >> "$conf"
|
||||||
|
@ -354,21 +281,12 @@ write_settings_conf(){
|
||||||
echo " - locale" >> "$conf" && write_locale_conf
|
echo " - locale" >> "$conf" && write_locale_conf
|
||||||
echo " - keyboard" >> "$conf"
|
echo " - keyboard" >> "$conf"
|
||||||
fi
|
fi
|
||||||
echo " - partition" >> "$conf" && write_partition_conf
|
echo " - partition" >> "$conf"
|
||||||
if ${oem_used}; then
|
if ${oem_used}; then
|
||||||
msg2 "Skipping to show users module."
|
msg2 "Skipping to show users module."
|
||||||
else
|
else
|
||||||
echo " - users" >> "$conf" && write_users_conf
|
echo " - users" >> "$conf" && write_users_conf
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# WIP - OfficeChooser
|
|
||||||
if ${oem_used} || ! ${office_installer}; then
|
|
||||||
msg2 "Skipping enabling PackageChooser module."
|
|
||||||
else
|
|
||||||
msg2 "Enabling PackageChooser module."
|
|
||||||
echo " - packagechooser" >> "$conf"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if ${netinstall}; then
|
if ${netinstall}; then
|
||||||
echo " - netinstall" >> "$conf" && write_netinstall_conf
|
echo " - netinstall" >> "$conf" && write_netinstall_conf
|
||||||
fi
|
fi
|
||||||
|
@ -404,10 +322,7 @@ write_settings_conf(){
|
||||||
echo " - initcpio" >> "$conf" && write_initcpio_conf
|
echo " - initcpio" >> "$conf" && write_initcpio_conf
|
||||||
if ${oem_used}; then
|
if ${oem_used}; then
|
||||||
msg2 "Skipping to set users module."
|
msg2 "Skipping to set users module."
|
||||||
if ${set_oem_user}; then
|
echo " - oemuser" >> "$conf"
|
||||||
msg2 "Setup OEM user."
|
|
||||||
echo " - oemuser" >> "$conf"
|
|
||||||
fi
|
|
||||||
else
|
else
|
||||||
echo " - users" >> "$conf"
|
echo " - users" >> "$conf"
|
||||||
fi
|
fi
|
||||||
|
@ -439,22 +354,12 @@ write_settings_conf(){
|
||||||
fi
|
fi
|
||||||
echo '' >> "$conf"
|
echo '' >> "$conf"
|
||||||
echo "dont-chroot: false" >> "$conf"
|
echo "dont-chroot: false" >> "$conf"
|
||||||
if ${oem_used}; then
|
|
||||||
echo "oem-setup: true" >> "$conf"
|
|
||||||
echo "disable-cancel: true" >> "$conf"
|
|
||||||
else
|
|
||||||
echo "oem-setup: false" >> "$conf"
|
|
||||||
echo "disable-cancel: false" >> "$conf"
|
|
||||||
fi
|
|
||||||
echo "disable-cancel-during-exec: true" >> "$conf"
|
|
||||||
echo "quit-at-end: false" >> "$conf"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
configure_calamares(){
|
configure_calamares(){
|
||||||
info "Configuring [Calamares]"
|
info "Configuring [Calamares]"
|
||||||
etc_config_dir=$1/etc/calamares/modules
|
modules_dir=$1/etc/calamares/modules
|
||||||
modules_dir=$1/usr/share/calamares/modules
|
prepare_dir "${modules_dir}"
|
||||||
prepare_dir "${etc_config_dir}"
|
|
||||||
write_settings_conf "$1"
|
write_settings_conf "$1"
|
||||||
info "Done configuring [Calamares]"
|
info "Done configuring [Calamares]"
|
||||||
}
|
}
|
||||||
|
|
113
lib/util.sh
113
lib/util.sh
|
@ -196,10 +196,8 @@ get_branch(){
|
||||||
# $1: chroot
|
# $1: chroot
|
||||||
# $2: branch
|
# $2: branch
|
||||||
set_branch(){
|
set_branch(){
|
||||||
if [[ $1 =~ "rootfs" ]]; then
|
info "Setting mirrorlist branch: %s" "$2"
|
||||||
info "Setting mirrorlist branch: %s" "$2"
|
sed -e "s|/stable|/$2|g" -i "$1/etc/pacman.d/mirrorlist"
|
||||||
sed -e "s|/stable|/$2|g" -i "$1/etc/pacman.d/mirrorlist"
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
init_common(){
|
init_common(){
|
||||||
|
@ -213,7 +211,7 @@ init_common(){
|
||||||
|
|
||||||
[[ -z ${log_dir} ]] && log_dir='/var/log/manjaro-tools'
|
[[ -z ${log_dir} ]] && log_dir='/var/log/manjaro-tools'
|
||||||
|
|
||||||
[[ -z ${build_mirror} ]] && build_mirror='https://mirror.easyname.at/manjaro'
|
[[ -z ${build_mirror} ]] && build_mirror='https://mirror.netzspielplatz.de/manjaro/packages'
|
||||||
|
|
||||||
[[ -z ${tmp_dir} ]] && tmp_dir='/tmp/manjaro-tools'
|
[[ -z ${tmp_dir} ]] && tmp_dir='/tmp/manjaro-tools'
|
||||||
}
|
}
|
||||||
|
@ -246,10 +244,10 @@ init_buildpkg(){
|
||||||
|
|
||||||
get_iso_label(){
|
get_iso_label(){
|
||||||
local label="$1"
|
local label="$1"
|
||||||
#label="${label//_}" # relace all _
|
label="${label//_}" # relace all _
|
||||||
label="${label//-}" # relace all -
|
label="${label//-}" # relace all -
|
||||||
label="${label^^}" # all uppercase
|
label="${label^^}" # all uppercase
|
||||||
label="${label::32}" # limit to 32 characters
|
label="${label::8}" # limit to 8 characters
|
||||||
echo ${label}
|
echo ${label}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -311,11 +309,13 @@ init_buildiso(){
|
||||||
|
|
||||||
iso_name=$(get_osid)
|
iso_name=$(get_osid)
|
||||||
|
|
||||||
[[ -z ${dist_branding} ]] && dist_branding="MANJARO"
|
[[ -z ${dist_branding} ]] && dist_branding="MJRO"
|
||||||
|
|
||||||
[[ -z ${iso_compression} ]] && iso_compression='zstd'
|
[[ -z ${iso_compression} ]] && iso_compression='xz'
|
||||||
|
|
||||||
[[ -z ${kernel} ]] && kernel="linux54"
|
iso_label=$(get_iso_label "${dist_branding}${dist_release//.}")
|
||||||
|
|
||||||
|
[[ -z ${kernel} ]] && kernel="linux419"
|
||||||
|
|
||||||
load_run_dir "${profile_repo}"
|
load_run_dir "${profile_repo}"
|
||||||
|
|
||||||
|
@ -330,7 +330,7 @@ init_buildiso(){
|
||||||
|
|
||||||
[[ -z ${gpgkey} ]] && gpgkey=''
|
[[ -z ${gpgkey} ]] && gpgkey=''
|
||||||
|
|
||||||
mhwd_repo="/opt/mhwd/pkg"
|
mhwd_repo="/opt/pkg"
|
||||||
}
|
}
|
||||||
|
|
||||||
init_calamares(){
|
init_calamares(){
|
||||||
|
@ -341,9 +341,7 @@ init_calamares(){
|
||||||
|
|
||||||
[[ -z ${windowexp} ]] && windowexp=noexpand
|
[[ -z ${windowexp} ]] && windowexp=noexpand
|
||||||
|
|
||||||
[[ -z ${windowsize} ]] && windowsize="800px,560px"
|
[[ -z ${windowsize} ]] && windowsize="800px,520px"
|
||||||
|
|
||||||
[[ -z ${windowplacement} ]] && windowplacement="center"
|
|
||||||
|
|
||||||
[[ -z ${sidebarbackground} ]] && sidebarbackground=#454948
|
[[ -z ${sidebarbackground} ]] && sidebarbackground=#454948
|
||||||
|
|
||||||
|
@ -363,7 +361,7 @@ init_deployiso(){
|
||||||
|
|
||||||
[[ -z ${alt_storage} ]] && alt_storage=false
|
[[ -z ${alt_storage} ]] && alt_storage=false
|
||||||
|
|
||||||
[[ -z ${tracker_url} ]] && tracker_url='udp://tracker.opentrackr.org:1337'
|
[[ -z ${tracker_url} ]] && tracker_url='udp://mirror.strits.dk:6969'
|
||||||
|
|
||||||
[[ -z ${piece_size} ]] && piece_size=21
|
[[ -z ${piece_size} ]] && piece_size=21
|
||||||
|
|
||||||
|
@ -386,7 +384,7 @@ load_config(){
|
||||||
|
|
||||||
init_buildiso
|
init_buildiso
|
||||||
|
|
||||||
init_calamares
|
init_calamares
|
||||||
|
|
||||||
init_deployiso
|
init_deployiso
|
||||||
|
|
||||||
|
@ -406,10 +404,7 @@ load_profile_config(){
|
||||||
[[ -z ${autologin} ]] && autologin="true"
|
[[ -z ${autologin} ]] && autologin="true"
|
||||||
[[ ${displaymanager} == 'none' ]] && autologin="false"
|
[[ ${displaymanager} == 'none' ]] && autologin="false"
|
||||||
|
|
||||||
[[ -z ${snap_channel} ]] && snap_channel="stable"
|
|
||||||
|
|
||||||
[[ -z ${multilib} ]] && multilib="true"
|
[[ -z ${multilib} ]] && multilib="true"
|
||||||
[[ ${no_multilib} == 'true' ]] && multilib="false"
|
|
||||||
|
|
||||||
[[ -z ${nonfree_mhwd} ]] && nonfree_mhwd="true"
|
[[ -z ${nonfree_mhwd} ]] && nonfree_mhwd="true"
|
||||||
|
|
||||||
|
@ -421,8 +416,6 @@ load_profile_config(){
|
||||||
|
|
||||||
[[ -z ${password} ]] && password="manjaro"
|
[[ -z ${password} ]] && password="manjaro"
|
||||||
|
|
||||||
[[ -z ${user_shell} ]] && user_shell='/bin/bash'
|
|
||||||
|
|
||||||
[[ -z ${login_shell} ]] && login_shell='/bin/bash'
|
[[ -z ${login_shell} ]] && login_shell='/bin/bash'
|
||||||
|
|
||||||
if [[ -z ${addgroups} ]]; then
|
if [[ -z ${addgroups} ]]; then
|
||||||
|
@ -442,19 +435,16 @@ load_profile_config(){
|
||||||
if [[ ${displaymanager} != "none" ]]; then
|
if [[ ${displaymanager} != "none" ]]; then
|
||||||
enable_systemd+=("${displaymanager}")
|
enable_systemd+=("${displaymanager}")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
[[ -z ${needs_internet} ]] && needs_internet='false'
|
|
||||||
[[ -z ${netinstall} ]] && netinstall='false'
|
[[ -z ${netinstall} ]] && netinstall='false'
|
||||||
[[ -z ${netinstall_label} ]] && netinstall_label='Package selection'
|
|
||||||
|
|
||||||
[[ -z ${mhwd_used} ]] && mhwd_used='true'
|
[[ -z ${mhwd_used} ]] && mhwd_used='true'
|
||||||
|
|
||||||
[[ -z ${oem_used} ]] && oem_used='false'
|
[[ -z ${oem_used} ]] && oem_used='false'
|
||||||
[[ -z ${set_oem_user} ]] && set_oem_user='true'
|
|
||||||
|
|
||||||
[[ -z ${chrootcfg} ]] && chrootcfg='false'
|
[[ -z ${chrootcfg} ]] && chrootcfg='false'
|
||||||
|
|
||||||
netgroups="https://gitlab.manjaro.org/applications/calamares-netgroups/-/raw/master/"
|
netgroups="https://raw.githubusercontent.com/manjaro/calamares-netgroups/master"
|
||||||
|
|
||||||
[[ -z ${geoip} ]] && geoip='true'
|
[[ -z ${geoip} ]] && geoip='true'
|
||||||
|
|
||||||
|
@ -466,8 +456,6 @@ load_profile_config(){
|
||||||
basic='true'
|
basic='true'
|
||||||
[[ ${extra} == 'true' ]] && basic='false'
|
[[ ${extra} == 'true' ]] && basic='false'
|
||||||
|
|
||||||
[[ -z ${office_installer} ]] && office_installer="false"
|
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -492,9 +480,6 @@ get_project(){
|
||||||
|
|
||||||
reset_profile(){
|
reset_profile(){
|
||||||
unset displaymanager
|
unset displaymanager
|
||||||
unset strict_snaps
|
|
||||||
unset classic_snaps
|
|
||||||
unset snap_channel
|
|
||||||
unset autologin
|
unset autologin
|
||||||
unset multilib
|
unset multilib
|
||||||
unset nonfree_mhwd
|
unset nonfree_mhwd
|
||||||
|
@ -506,18 +491,14 @@ reset_profile(){
|
||||||
unset enable_systemd
|
unset enable_systemd
|
||||||
unset disable_systemd
|
unset disable_systemd
|
||||||
unset enable_systemd_live
|
unset enable_systemd_live
|
||||||
unset disable_systemd_live
|
|
||||||
unset packages_desktop
|
unset packages_desktop
|
||||||
unset packages_mhwd
|
unset packages_mhwd
|
||||||
unset user_shell
|
|
||||||
unset login_shell
|
unset login_shell
|
||||||
unset netinstall
|
unset netinstall
|
||||||
unset chrootcfg
|
unset chrootcfg
|
||||||
unset geoip
|
unset geoip
|
||||||
unset extra
|
unset extra
|
||||||
unset full_iso
|
unset full_iso
|
||||||
unset office_installer
|
|
||||||
unset no_multilib
|
|
||||||
}
|
}
|
||||||
|
|
||||||
check_profile(){
|
check_profile(){
|
||||||
|
@ -620,7 +601,7 @@ load_pkgs(){
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# We can reuse this code
|
# We can reuse this code
|
||||||
local _edition _edition_rm
|
local _edition _edition_rm
|
||||||
case "${edition}" in
|
case "${edition}" in
|
||||||
|
@ -634,13 +615,6 @@ load_pkgs(){
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
local _office _office_rm
|
|
||||||
if ${office_installer}; then
|
|
||||||
_office="s|>office||g"
|
|
||||||
else
|
|
||||||
_office_rm="s|>office.*||g"
|
|
||||||
fi
|
|
||||||
|
|
||||||
local _blacklist="s|>blacklist.*||g" \
|
local _blacklist="s|>blacklist.*||g" \
|
||||||
_kernel="s|KERNEL|$kernel|g" \
|
_kernel="s|KERNEL|$kernel|g" \
|
||||||
_used_kernel=${kernel:5:2} \
|
_used_kernel=${kernel:5:2} \
|
||||||
|
@ -668,8 +642,6 @@ load_pkgs(){
|
||||||
| sed "$_basic_rm" \
|
| sed "$_basic_rm" \
|
||||||
| sed "$_extra" \
|
| sed "$_extra" \
|
||||||
| sed "$_extra_rm" \
|
| sed "$_extra_rm" \
|
||||||
| sed "$_office" \
|
|
||||||
| sed "$_office_rm" \
|
|
||||||
| sed "$_clean")
|
| sed "$_clean")
|
||||||
|
|
||||||
if [[ $1 == "${packages_mhwd}" ]]; then
|
if [[ $1 == "${packages_mhwd}" ]]; then
|
||||||
|
@ -786,14 +758,7 @@ is_valid_arch_iso(){
|
||||||
|
|
||||||
is_valid_branch(){
|
is_valid_branch(){
|
||||||
case $1 in
|
case $1 in
|
||||||
'stable'|'stable-staging'|'testing'|'unstable') return 0 ;;
|
'stable'|'testing'|'unstable') return 0 ;;
|
||||||
*) return 1 ;;
|
|
||||||
esac
|
|
||||||
}
|
|
||||||
|
|
||||||
is_valid_comp(){
|
|
||||||
case $1 in
|
|
||||||
'gzip'|'lzma'|'lz4'|'lzo'|'xz'|'zstd') return 0 ;;
|
|
||||||
*) return 1 ;;
|
*) return 1 ;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
@ -833,25 +798,25 @@ create_chksums() {
|
||||||
sha256sum $1 > $1.sha256
|
sha256sum $1 > $1.sha256
|
||||||
}
|
}
|
||||||
|
|
||||||
init_profiles() {
|
init_profiles() {
|
||||||
_workdir='/usr/share/manjaro-tools'
|
_workdir='/usr/share/manjaro-tools'
|
||||||
if [[ -d ${_workdir}/iso-profiles ]]; then
|
if [[ -d ${_workdir}/iso-profiles ]]; then
|
||||||
rm -Rf ${_workdir}/iso-profiles
|
rm -Rf ${_workdir}/iso-profiles ]]
|
||||||
fi
|
fi
|
||||||
git clone -q --depth 1 -b ${branch} https://gitlab.manjaro.org/profiles-and-settings/iso-profiles.git ${_workdir}/iso-profiles/
|
git clone -q --depth 1 -b ${branch} https://gitlab.manjaro.org/profiles-and-settings/iso-profiles.git ${_workdir}/iso-profiles/
|
||||||
|
|
||||||
#Check if git clone is done
|
#Check if git clone is done
|
||||||
if [[ -d ${_workdir}/iso-profiles/manjaro ]] && [[ -d ${_workdir}/iso-profiles/community ]]; then
|
if [[ -d ${_workdir}/iso-profiles/manjaro ]] && [[ -d ${_workdir}/iso-profiles/community ]]; then
|
||||||
|
|
||||||
for i in ${_workdir}/iso-profiles/.gitignore ${_workdir}/iso-profiles/README.md; do
|
for i in ${_workdir}/iso-profiles/.gitignore ${_workdir}/iso-profiles/README.md; do
|
||||||
rm -f $i
|
rm -f $i
|
||||||
done
|
done
|
||||||
|
|
||||||
for i in ${_workdir}/iso-profiles/.git ${_workdir}/iso-profiles/sonar; do
|
for i in ${_workdir}/iso-profiles/.git ${_workdir}/iso-profiles/sonar; do
|
||||||
rm -Rf $i
|
rm -Rf $i
|
||||||
done
|
done
|
||||||
else msg2 "Impossible to initialize iso-profiles, please check internet connection or browse at 'https://gitlab.manjaro.org/profiles-and-settings/iso-profiles'"
|
else msg2 "Impossible to initialize iso-profiles, please check internet connection or browse at 'https://gitlab.manjaro.org/profiles-and-settings/iso-profiles'"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue