forked from mirrored-repos/manjaro-tools
Merge branch 'master' of github.com:manjaro/manjaro-tools into stable-0.13.x
This commit is contained in:
commit
ef9d9e34fa
35 changed files with 417 additions and 291 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -2,5 +2,5 @@
|
||||||
*.tar.gz
|
*.tar.gz
|
||||||
*.tar.xz
|
*.tar.xz
|
||||||
.kateproject.d
|
.kateproject.d
|
||||||
data/misc
|
data/schemas/*.conf
|
||||||
.project
|
.project
|
||||||
|
|
21
Makefile
21
Makefile
|
@ -1,4 +1,4 @@
|
||||||
Version=0.13.7
|
Version=0.13.8
|
||||||
|
|
||||||
PREFIX = /usr/local
|
PREFIX = /usr/local
|
||||||
SYSCONFDIR = /etc
|
SYSCONFDIR = /etc
|
||||||
|
@ -76,8 +76,6 @@ LIBS_ISO = \
|
||||||
|
|
||||||
SHARED_ISO = \
|
SHARED_ISO = \
|
||||||
data/pacman-mhwd.conf \
|
data/pacman-mhwd.conf \
|
||||||
data/desktop.map \
|
|
||||||
data/linux.preset \
|
|
||||||
data/profile.conf.example
|
data/profile.conf.example
|
||||||
|
|
||||||
CPIOHOOKS = \
|
CPIOHOOKS = \
|
||||||
|
@ -100,6 +98,7 @@ MAN_XML = \
|
||||||
buildtree.xml \
|
buildtree.xml \
|
||||||
buildiso.xml \
|
buildiso.xml \
|
||||||
deployiso.xml \
|
deployiso.xml \
|
||||||
|
check-yaml.xml \
|
||||||
manjaro-tools.conf.xml \
|
manjaro-tools.conf.xml \
|
||||||
profile.conf.xml
|
profile.conf.xml
|
||||||
|
|
||||||
|
@ -110,6 +109,10 @@ LIBS_YAML = \
|
||||||
lib/util-yaml.sh
|
lib/util-yaml.sh
|
||||||
|
|
||||||
SHARED_YAML = \
|
SHARED_YAML = \
|
||||||
|
data/desktop.map \
|
||||||
|
data/linux.preset
|
||||||
|
|
||||||
|
SCHEMAS = \
|
||||||
data/schemas/bootloader.schema.yaml \
|
data/schemas/bootloader.schema.yaml \
|
||||||
data/schemas/chrootcfg.schema.yaml \
|
data/schemas/chrootcfg.schema.yaml \
|
||||||
data/schemas/displaymanager.schema.yaml \
|
data/schemas/displaymanager.schema.yaml \
|
||||||
|
@ -230,8 +233,14 @@ install_yaml:
|
||||||
install -dm0755 $(DESTDIR)$(PREFIX)/lib/manjaro-tools
|
install -dm0755 $(DESTDIR)$(PREFIX)/lib/manjaro-tools
|
||||||
install -m0644 ${LIBS_YAML} $(DESTDIR)$(PREFIX)/lib/manjaro-tools
|
install -m0644 ${LIBS_YAML} $(DESTDIR)$(PREFIX)/lib/manjaro-tools
|
||||||
|
|
||||||
|
install -dm0755 $(DESTDIR)$(PREFIX)/share/manjaro-tools
|
||||||
|
install -m0644 ${SHARED_YAML} $(DESTDIR)$(PREFIX)/share/manjaro-tools
|
||||||
|
|
||||||
install -dm0755 $(DESTDIR)$(PREFIX)/share/manjaro-tools/schemas
|
install -dm0755 $(DESTDIR)$(PREFIX)/share/manjaro-tools/schemas
|
||||||
install -m0644 ${SHARED_YAML} $(DESTDIR)$(PREFIX)/share/manjaro-tools/schemas
|
install -m0644 ${SCHEMAS} $(DESTDIR)$(PREFIX)/share/manjaro-tools/schemas
|
||||||
|
|
||||||
|
install -dm0755 $(DESTDIR)$(PREFIX)/share/man/man1
|
||||||
|
gzip -c man/check-yaml.1 > $(DESTDIR)$(PREFIX)/share/man/man1/check-yaml.1.gz
|
||||||
|
|
||||||
uninstall_base:
|
uninstall_base:
|
||||||
for f in ${SYSCONF}; do rm -f $(DESTDIR)$(SYSCONFDIR)/manjaro-tools/$$f; done
|
for f in ${SYSCONF}; do rm -f $(DESTDIR)$(SYSCONFDIR)/manjaro-tools/$$f; done
|
||||||
|
@ -265,7 +274,9 @@ uninstall_iso:
|
||||||
uninstall_yaml:
|
uninstall_yaml:
|
||||||
for f in ${BIN_YAML}; do rm -f $(DESTDIR)$(PREFIX)/bin/$$f; done
|
for f in ${BIN_YAML}; do rm -f $(DESTDIR)$(PREFIX)/bin/$$f; done
|
||||||
for f in ${LIBS_YAML}; do rm -f $(DESTDIR)$(PREFIX)/lib/manjaro-tools/$$f; done
|
for f in ${LIBS_YAML}; do rm -f $(DESTDIR)$(PREFIX)/lib/manjaro-tools/$$f; done
|
||||||
for f in ${SHARED_YAML}; do rm -f $(DESTDIR)$(PREFIX)/share/manjaro-tools/schemas/$$f; done
|
for f in ${SCHEMAS}; do rm -f $(DESTDIR)$(PREFIX)/share/manjaro-tools/schemas/$$f; done
|
||||||
|
for f in ${SHARED_YAML}; do rm -f $(DESTDIR)$(PREFIX)/share/manjaro-tools/$$f; done
|
||||||
|
rm -f $(DESTDIR)$(PREFIX)/share/man/man1/check-yaml.1.gz
|
||||||
|
|
||||||
install: install_base install_pkg install_iso install_yaml
|
install: install_base install_pkg install_iso install_yaml
|
||||||
|
|
||||||
|
|
13
README.md
13
README.md
|
@ -270,10 +270,12 @@ yaml files are used by calamares netinstall option from a specified url(netgroup
|
||||||
$ check-yaml -h
|
$ check-yaml -h
|
||||||
Usage: check-yaml [options]
|
Usage: check-yaml [options]
|
||||||
-p <profile> Buildset or profile [default: default]
|
-p <profile> Buildset or profile [default: default]
|
||||||
-a <arch> Arch [default: x86_64]
|
-a <arch> Arch [default: auto]
|
||||||
-k <name> Kernel to use[default: linux44]
|
-k <name> Kernel to use[default: linux44]
|
||||||
-i <name> Init system to use [default: systemd]
|
-i <name> Init system to use [default: systemd]
|
||||||
-c Check also calamares yaml files generated for the profile
|
-c Check also calamares yaml files generated for the profile
|
||||||
|
-g Enable pacman group accepted for -p
|
||||||
|
-v Validate by schema
|
||||||
-q Query settings
|
-q Query settings
|
||||||
-h This help
|
-h This help
|
||||||
~~~
|
~~~
|
||||||
|
@ -291,11 +293,20 @@ check-yaml -p xfce -a i686 -c
|
||||||
check-yaml -p xfce -c
|
check-yaml -p xfce -c
|
||||||
~~~
|
~~~
|
||||||
|
|
||||||
|
* for a kdebase pacman group with validation
|
||||||
|
|
||||||
|
~~~
|
||||||
|
check-yaml -p kdebase -gv
|
||||||
|
~~~
|
||||||
|
|
||||||
####Special parameters
|
####Special parameters
|
||||||
|
|
||||||
######* -c
|
######* -c
|
||||||
* generate calamares module and settings conf files per profile
|
* generate calamares module and settings conf files per profile
|
||||||
|
|
||||||
|
######* -g
|
||||||
|
* generate a netgroup for specified pacman group
|
||||||
|
|
||||||
###5. buildtree
|
###5. buildtree
|
||||||
|
|
||||||
buildtree is a little tools to sync arch abs and manjaro PKGBUILD git repos.
|
buildtree is a little tools to sync arch abs and manjaro PKGBUILD git repos.
|
||||||
|
|
|
@ -35,8 +35,8 @@ show_profile(){
|
||||||
[[ ${target_arch} == 'x86_64' ]] && msg2 "multilib: %s" "${multilib}"
|
[[ ${target_arch} == 'x86_64' ]] && msg2 "multilib: %s" "${multilib}"
|
||||||
|
|
||||||
msg2 "netinstall: %s" "${netinstall}"
|
msg2 "netinstall: %s" "${netinstall}"
|
||||||
|
msg2 "chrootcfg: %s" "${chrootcfg}"
|
||||||
${netinstall} && msg2 "netgroups: %s" "$(get_yaml)"
|
${netinstall} && msg2 "netgroups: %s" "$(get_yaml)"
|
||||||
msg2 "unpackfs: %s" "${unpackfs}"
|
|
||||||
msg2 "geoip: %s" "${geoip}"
|
msg2 "geoip: %s" "${geoip}"
|
||||||
|
|
||||||
msg2 "efi_boot_loader: %s" "${efi_boot_loader}"
|
msg2 "efi_boot_loader: %s" "${efi_boot_loader}"
|
||||||
|
|
|
@ -33,8 +33,9 @@ show_profile(){
|
||||||
[[ ${target_arch} == 'x86_64' ]] && msg2 "multilib: %s" "${multilib}"
|
[[ ${target_arch} == 'x86_64' ]] && msg2 "multilib: %s" "${multilib}"
|
||||||
|
|
||||||
msg2 "netinstall: %s" "${netinstall}"
|
msg2 "netinstall: %s" "${netinstall}"
|
||||||
|
msg2 "chrootcfg: %s" "${chrootcfg}"
|
||||||
${netinstall} && msg2 "netgroups: %s" "$(get_yaml)"
|
${netinstall} && msg2 "netgroups: %s" "$(get_yaml)"
|
||||||
msg2 "unpackfs: %s" "${unpackfs}"
|
msg2 "geoip: %s" "${geoip}"
|
||||||
|
|
||||||
msg2 "efi_boot_loader: %s" "${efi_boot_loader}"
|
msg2 "efi_boot_loader: %s" "${efi_boot_loader}"
|
||||||
|
|
||||||
|
|
|
@ -15,3 +15,4 @@ lxqt:lxqt-session
|
||||||
pantheon:pantheon-session
|
pantheon:pantheon-session
|
||||||
budgie-desktop:budgie-desktop
|
budgie-desktop:budgie-desktop
|
||||||
deepin:startdde
|
deepin:startdde
|
||||||
|
Lumina-DE:start-lumina-desktop
|
||||||
|
|
|
@ -40,8 +40,8 @@
|
||||||
# the default url for the netinstall.yaml
|
# the default url for the netinstall.yaml
|
||||||
# netgroups="https://raw.githubusercontent.com/manjaro/manjaro-tools-iso-profiles/master/shared/netinstall"
|
# netgroups="https://raw.githubusercontent.com/manjaro/manjaro-tools-iso-profiles/master/shared/netinstall"
|
||||||
|
|
||||||
# configure calamares to use chrootcfg instead of unpackfs
|
# configure calamares to use chrootcfg instead of unpackfs; default: unpackfs
|
||||||
# unpackfs="true"
|
# chrootcfg="false"
|
||||||
|
|
||||||
# use geoip
|
# use geoip
|
||||||
# geoip="true"
|
# geoip="true"
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
---
|
---
|
||||||
type: map
|
type: map
|
||||||
mapping:
|
mapping:
|
||||||
efiBootLoader: { type: str, required: yes }
|
efiBootLoader: { type: str, required: true }
|
||||||
kernel: { type: str, required: yes }
|
kernel: { type: str, required: true }
|
||||||
img: { type: str, required: yes }
|
img: { type: str, required: true }
|
||||||
fallback: { type: str, required: yes }
|
fallback: { type: str, required: true }
|
||||||
timeout: { type: str, required: yes }
|
timeout: { type: str, required: true }
|
||||||
bootloaderEntryName: { type: str }
|
bootloaderEntryName: { type: str }
|
||||||
kernelLine: { type: str, required: yes }
|
kernelLine: { type: str, required: true }
|
||||||
fallbackKernelLine: { type: str, required: yes }
|
fallbackKernelLine: { type: str, required: true }
|
||||||
grubInstall: { type: str, required: yes }
|
grubInstall: { type: str, required: true }
|
||||||
grubMkconfig: { type: str, required: yes }
|
grubMkconfig: { type: str, required: true }
|
||||||
grubCfg: { type: str, required: yes }
|
grubCfg: { type: str, required: true }
|
||||||
efiBootloaderId: { type: str }
|
efiBootloaderId: { type: str }
|
||||||
|
|
|
@ -6,8 +6,8 @@ mapping:
|
||||||
sequence:
|
sequence:
|
||||||
- type: map
|
- type: map
|
||||||
mapping:
|
mapping:
|
||||||
"name": { type: str, required: yes }
|
"name": { type: str, required: true }
|
||||||
"mode": { type: str, required: yes }
|
"mode": { type: str, required: true }
|
||||||
keyrings:
|
keyrings:
|
||||||
type: seq
|
type: seq
|
||||||
sequence:
|
sequence:
|
||||||
|
|
|
@ -4,10 +4,10 @@ mapping:
|
||||||
"displaymanagers":
|
"displaymanagers":
|
||||||
type: seq
|
type: seq
|
||||||
sequence:
|
sequence:
|
||||||
- { type: str, required: yes, enum: [slim, sddm, lightdm, gdm, mdm, lxdm, kdm] }
|
- { type: str, required: true, enum: [slim, sddm, lightdm, gdm, mdm, lxdm, kdm] }
|
||||||
"defaultDesktopEnvironment":
|
"defaultDesktopEnvironment":
|
||||||
type: map
|
type: map
|
||||||
mapping:
|
mapping:
|
||||||
"executable": { type: str }
|
"executable": { type: str }
|
||||||
"desktopFile": { type: str }
|
"desktopFile": { type: str }
|
||||||
"basicSetup": { type: bool, default: false, required: yes }
|
"basicSetup": { type: bool, default: false }
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
---
|
---
|
||||||
type: map
|
type: map
|
||||||
mapping:
|
mapping:
|
||||||
"restartNowEnabled": { type: bool, default: true, required: yes }
|
"restartNowEnabled": { type: bool, default: true }
|
||||||
"restartNowChecked": { type: bool, default: false, required: yes }
|
"restartNowChecked": { type: bool, default: false }
|
||||||
"restartNowCommand": { type: str, required: yes }
|
"restartNowCommand": { type: str, required: true }
|
||||||
|
|
|
@ -4,13 +4,13 @@ mapping:
|
||||||
"mountOptions":
|
"mountOptions":
|
||||||
type: map
|
type: map
|
||||||
mapping:
|
mapping:
|
||||||
"default": { type: str, required: yes }
|
"default": { type: str, required: true }
|
||||||
"btrfs": { type: str, required: yes }
|
"btrfs": { type: str, required: true }
|
||||||
"ssdExtraMountOptions":
|
"ssdExtraMountOptions":
|
||||||
type: map
|
type: map
|
||||||
mapping:
|
mapping:
|
||||||
"ext4": { type: str, required: yes }
|
"ext4": { type: str, required: true }
|
||||||
"jfs": { type: str, required: yes }
|
"jfs": { type: str, required: true }
|
||||||
"xfs": { type: str, required: yes }
|
"xfs": { type: str, required: true }
|
||||||
"swap": { type: str, required: yes }
|
"swap": { type: str, required: true }
|
||||||
"btrfs": { type: str, required: yes }
|
"btrfs": { type: str, required: true }
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
---
|
---
|
||||||
type: map
|
type: map
|
||||||
mapping:
|
mapping:
|
||||||
"overwrite": { type: bool, default: false, required: yes }
|
"overwrite": { type: bool, default: false }
|
||||||
"defaults":
|
"defaults":
|
||||||
type: map
|
type: map
|
||||||
mapping:
|
mapping:
|
||||||
"GRUB_TIMEOUT": { type: int, required: yes }
|
"GRUB_TIMEOUT": { type: int, required: true }
|
||||||
"GRUB_DEFAULT": { type: str, required: yes }
|
"GRUB_DEFAULT": { type: str, required: true }
|
||||||
"GRUB_DISABLE_SUBMENU": { type: bool, default: true, required: yes }
|
"GRUB_DISABLE_SUBMENU": { type: bool, default: true }
|
||||||
"GRUB_TERMINAL_OUTPUT": { type: str, required: yes }
|
"GRUB_TERMINAL_OUTPUT": { type: str, required: true }
|
||||||
"GRUB_DISABLE_RECOVERY": { type: bool, default: true, required: yes }
|
"GRUB_DISABLE_RECOVERY": { type: bool, default: true }
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
---
|
---
|
||||||
type: map
|
type: map
|
||||||
mapping:
|
mapping:
|
||||||
kernel: { type: str, required: yes }
|
kernel: { type: str, required: true }
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
type: map
|
type: map
|
||||||
mapping:
|
mapping:
|
||||||
xOrgConfFileName: { type: str, required: yes }
|
xOrgConfFileName: { type: str, required: true }
|
||||||
convertedKeymapPath: { type: str, required: yes }
|
convertedKeymapPath: { type: str, required: true }
|
||||||
|
|
|
@ -3,5 +3,5 @@ type: map
|
||||||
mapping:
|
mapping:
|
||||||
"region": { type: str }
|
"region": { type: str }
|
||||||
"zone": { type: str }
|
"zone": { type: str }
|
||||||
"localeGenPath": { type: str, required: yes }
|
"localeGenPath": { type: str, required: true }
|
||||||
"geoipUrl": { type: str }
|
"geoipUrl": { type: str }
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
---
|
---
|
||||||
type: map
|
type: map
|
||||||
mapping:
|
mapping:
|
||||||
"configFilePath": { type: str, required: yes }
|
"configFilePath": { type: str, required: true }
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
---
|
---
|
||||||
type: map
|
type: map
|
||||||
mapping:
|
mapping:
|
||||||
"systemd": { type: bool, default: true, required: yes }
|
"systemd": { type: bool, default: true }
|
||||||
"dbus": { type: bool, default: true, required: yes }
|
"dbus": { type: bool, default: true }
|
||||||
"symlink": { type: bool, default: true, required: yes }
|
"symlink": { type: bool, default: true }
|
||||||
|
|
|
@ -16,6 +16,6 @@ mapping:
|
||||||
type: seq
|
type: seq
|
||||||
sequence:
|
sequence:
|
||||||
- type: int
|
- type: int
|
||||||
"driver": { type: str, required: yes }
|
"driver": { type: str, required: true }
|
||||||
"local": { type: bool, default: true, required: yes }
|
"local": { type: bool, default: true }
|
||||||
"repo": { type: str, required: yes }
|
"repo": { type: str, required: true }
|
||||||
|
|
|
@ -6,16 +6,16 @@ mapping:
|
||||||
sequence:
|
sequence:
|
||||||
- type: map
|
- type: map
|
||||||
mapping:
|
mapping:
|
||||||
"device": { type: str, required: yes }
|
"device": { type: str, required: true }
|
||||||
"fs": { type: str }
|
"fs": { type: str }
|
||||||
"mountPoint": { type: str, required: yes }
|
"mountPoint": { type: str, required: true }
|
||||||
"options": { type: str }
|
"options": { type: str }
|
||||||
"extraMountsEfi":
|
"extraMountsEfi":
|
||||||
type: seq
|
type: seq
|
||||||
sequence:
|
sequence:
|
||||||
- type: map
|
- type: map
|
||||||
mapping:
|
mapping:
|
||||||
"device": { type: str, required: yes }
|
"device": { type: str, required: true }
|
||||||
"fs": { type: str }
|
"fs": { type: str }
|
||||||
"mountPoint": { type: str, required: yes }
|
"mountPoint": { type: str, required: true }
|
||||||
"options": { type: str }
|
"options": { type: str }
|
||||||
|
|
|
@ -3,12 +3,12 @@ type: seq
|
||||||
sequence:
|
sequence:
|
||||||
- type: map
|
- type: map
|
||||||
mapping:
|
mapping:
|
||||||
"name": { type: str, required: yes }
|
"name": { type: str, required: true }
|
||||||
"description": { type: str, required: yes }
|
"description": { type: str, required: true }
|
||||||
"selected": { type: bool, default: false }
|
"selected": { type: bool, default: false }
|
||||||
"hidden": { type: bool, default: false }
|
"hidden": { type: bool, default: false }
|
||||||
"packages":
|
"packages":
|
||||||
type: seq
|
type: seq
|
||||||
required: yes
|
required: true
|
||||||
sequence:
|
sequence:
|
||||||
- type: str
|
- { type: text }
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
---
|
---
|
||||||
type: map
|
type: map
|
||||||
mapping:
|
mapping:
|
||||||
groupsUrl: { type: str, required: yes }
|
groupsUrl: { type: str, required: true }
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
---
|
---
|
||||||
type: map
|
type: map
|
||||||
mapping:
|
mapping:
|
||||||
"backend": { type: str, required: yes, enum: [packagekit, zypp, yum, dnf, urpmi, apt, pacman, portage, entropy] }
|
"backend": { type: str, required: true, enum: [packagekit, zypp, yum, dnf, urpmi, apt, pacman, portage, entropy] }
|
||||||
"operations":
|
"operations":
|
||||||
type: seq
|
type: seq
|
||||||
sequence:
|
sequence:
|
||||||
|
@ -10,16 +10,12 @@ mapping:
|
||||||
"install":
|
"install":
|
||||||
type: seq
|
type: seq
|
||||||
sequence:
|
sequence:
|
||||||
- type: str
|
- { type: text }
|
||||||
- type: map
|
"remove":
|
||||||
mapping:
|
|
||||||
"remove":
|
|
||||||
type: seq
|
type: seq
|
||||||
sequence:
|
sequence:
|
||||||
- type: str
|
- { type: text }
|
||||||
- type: map
|
"localInstall":
|
||||||
mapping:
|
|
||||||
"localInstall":
|
|
||||||
type: seq
|
type: seq
|
||||||
sequence:
|
sequence:
|
||||||
- type: str
|
- { type: text }
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
---
|
---
|
||||||
type: map
|
type: map
|
||||||
mapping:
|
mapping:
|
||||||
efiSystemPartition: { type: str, required: yes }
|
efiSystemPartition: { type: str, required: true }
|
||||||
ensureSuspendToDisk: { type: bool, default: true, required: yes }
|
ensureSuspendToDisk: { type: bool, default: true }
|
||||||
drawNestedPartitions: { type: bool, default: false, required: yes }
|
drawNestedPartitions: { type: bool, default: false }
|
||||||
alwaysShowPartitionLabels: { type: bool, default: true, required: yes }
|
alwaysShowPartitionLabels: { type: bool, default: true }
|
||||||
defaultFileSystemType: { type: str, required: yes }
|
defaultFileSystemType: { type: str, required: true }
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
---
|
---
|
||||||
type: map
|
type: map
|
||||||
mapping:
|
mapping:
|
||||||
"username": { type: str, required: yes }
|
"username": { type: str, required: true }
|
||||||
|
|
|
@ -1,75 +1,32 @@
|
||||||
---
|
---
|
||||||
type: map
|
type: map
|
||||||
mapping:
|
mapping:
|
||||||
"modules-search":
|
"modules-search":
|
||||||
type: seq
|
required: true
|
||||||
required: yes
|
type: seq
|
||||||
sequence:
|
sequence:
|
||||||
- type: str
|
- { type: str }
|
||||||
"instances":
|
"instances":
|
||||||
type: seq
|
type: seq
|
||||||
required: yes
|
sequence:
|
||||||
sequence:
|
|
||||||
- type: map
|
|
||||||
mapping:
|
|
||||||
"id": { type: str }
|
|
||||||
"module": { type: str }
|
|
||||||
"config": { type: str }
|
|
||||||
"sequence":
|
|
||||||
type: seq
|
|
||||||
required: yes
|
|
||||||
sequence:
|
|
||||||
- type: map
|
- type: map
|
||||||
mapping:
|
mapping:
|
||||||
"show":
|
"id": { type: str }
|
||||||
type: seq
|
"module": { type: str }
|
||||||
sequence:
|
"config": { type: str }
|
||||||
- type: map
|
"sequence":
|
||||||
mapping:
|
type: seq
|
||||||
"welcome": { type: str, required: yes }
|
sequence:
|
||||||
"locale": { type: str, required: yes }
|
- type: map
|
||||||
"keyboard": { type: str, required: yes }
|
mapping:
|
||||||
"partition": { type: str, required: yes }
|
"show":
|
||||||
"users": { type: str, required: yes }
|
type: seq
|
||||||
"summary": { type: str, required: yes }
|
sequence:
|
||||||
"netinstall": { type: str }
|
- { type: str, enum: [welcome, netinstall, locale, keyboard, partition, users, summary, finished], unique: true }
|
||||||
"exec":
|
"exec":
|
||||||
type: seq
|
type: seq
|
||||||
sequence:
|
sequence:
|
||||||
- type: map
|
- { type: str, enum: [partition, mount, chrootcfg, unpackfs, networkcfg, machineid, fstab, locale, keyboard, localecfg, luksopenswaphookcfg, luksbootkeyfile, plymouthcfg, initcpiocfg, initcpio, users, displaymanager, mhwdcfg, hwclock, servicescfg, services, grubcfg, bootloader, postcfg, umount, packages, removeuser, dracut], unique: true }
|
||||||
mapping:
|
"branding": { type: str, required: true }
|
||||||
"partition": { type: str, required: yes }
|
"prompt-install": { type: bool, default: false }
|
||||||
"mount": { type: str, required: yes }
|
"dont-chroot": { type: bool, default: false }
|
||||||
"unpackfs": { type: str }
|
|
||||||
"chrootcfg": { type: str }
|
|
||||||
"packages": { type: str }
|
|
||||||
"machineid": { type: str, required: yes }
|
|
||||||
"fstab": { type: str, required: yes }
|
|
||||||
"locale": { type: str, required: yes }
|
|
||||||
"keyboard": { type: str, required: yes }
|
|
||||||
"localecfg": { type: str, required: yes }
|
|
||||||
"luksopenswaphookcfg": { type: str }
|
|
||||||
"luksbootkeyfile": { type: str }
|
|
||||||
"plymouthcfg": { type: str }
|
|
||||||
"initcpiocfg": { type: str, required: yes }
|
|
||||||
"initcpio": { type: str, required: yes }
|
|
||||||
"users": { type: str, required: yes }
|
|
||||||
"displaymanager": { type: str, required: yes }
|
|
||||||
"mhwdcfg": { type: str }
|
|
||||||
"networkcfg": { type: str, required: yes }
|
|
||||||
"hwclock": { type: str, required: yes }
|
|
||||||
"services": { type: str }
|
|
||||||
"servicescfg": { type: str }
|
|
||||||
"grubcfg": { type: str, required: yes }
|
|
||||||
"bootloader": { type: str, required: yes }
|
|
||||||
"postcfg": { type: str, required: yes }
|
|
||||||
"umount": { type: str, required: yes }
|
|
||||||
"show":
|
|
||||||
type: seq
|
|
||||||
sequence:
|
|
||||||
- type: map
|
|
||||||
mapping:
|
|
||||||
"finished": { type: str, required: yes }
|
|
||||||
"branding": { type: str, required: yes }
|
|
||||||
"prompt-install": { type: bool, required: yes, default: false }
|
|
||||||
"dont-chroot": { type: bool, required: yes, default: false }
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
type: map
|
type: map
|
||||||
mapping:
|
mapping:
|
||||||
"scrLog": { type: str }
|
"srcLog": { type: str }
|
||||||
"destLog": { type: str }
|
"destLog": { type: str }
|
||||||
|
|
|
@ -2,12 +2,12 @@
|
||||||
type: map
|
type: map
|
||||||
mapping:
|
mapping:
|
||||||
"defaultGroups":
|
"defaultGroups":
|
||||||
required: yes
|
required: true
|
||||||
type: seq
|
type: seq
|
||||||
sequence:
|
sequence:
|
||||||
- { type: str }
|
- { type: str }
|
||||||
"autologinGroup": { type: str, required: yes }
|
"autologinGroup": { type: str, required: true }
|
||||||
"doAutologin": { type: bool, default: true }
|
"doAutologin": { type: bool, default: true }
|
||||||
"sudoersGroup": { type: str, required: yes }
|
"sudoersGroup": { type: str, required: true }
|
||||||
"setRootPassword": { type: bool, default: true, required: yes }
|
"setRootPassword": { type: bool, default: true }
|
||||||
"doReusePassword": { type: bool, default: true }
|
"doReusePassword": { type: bool, default: true }
|
||||||
|
|
|
@ -1,33 +1,21 @@
|
||||||
---
|
---
|
||||||
type: map
|
type: map
|
||||||
mapping:
|
mapping:
|
||||||
"showSupportUrl": { type: bool, default: true, required: yes }
|
"showSupportUrl": { type: bool, default: true }
|
||||||
"showKnownIssuesUrl": { type: bool, default: true, required: yes }
|
"showKnownIssuesUrl": { type: bool, default: true }
|
||||||
"showReleaseNotesUrl": { type: bool, default: true, required: yes }
|
"showReleaseNotesUrl": { type: bool, default: true }
|
||||||
"requirements":
|
"requirements":
|
||||||
type: map
|
type: map
|
||||||
mapping:
|
mapping:
|
||||||
"requiredStorage": { type: float, required: yes }
|
"requiredStorage": { type: float, required: true }
|
||||||
"requiredRam": { type: float, required: yes }
|
"requiredRam": { type: float, required: true }
|
||||||
"check":
|
"check":
|
||||||
required: yes
|
required: true
|
||||||
type: seq
|
type: seq
|
||||||
sequence:
|
sequence:
|
||||||
- type: map
|
- { type: str, enum: [storage, ram, power, internet, root], unique: true }
|
||||||
mapping:
|
|
||||||
"storage": { type: str, required: yes }
|
|
||||||
"ram": { type: str, required: yes }
|
|
||||||
"power": { type: str, required: yes }
|
|
||||||
"internet": { type: str, required: yes }
|
|
||||||
"root": { type: str, required: yes }
|
|
||||||
"required":
|
"required":
|
||||||
required: yes
|
required: true
|
||||||
type: seq
|
type: seq
|
||||||
sequence:
|
sequence:
|
||||||
- type: map
|
- { type: str, enum: [storage, ram, power, internet, root], unique: true }
|
||||||
mapping:
|
|
||||||
"storage": { type: str, required: yes }
|
|
||||||
"ram": { type: str, required: yes }
|
|
||||||
"power": { type: str }
|
|
||||||
"internet": { type: str }
|
|
||||||
"root": { type: str, required: yes }
|
|
||||||
|
|
145
docbook/check-yaml.xml
Normal file
145
docbook/check-yaml.xml
Normal file
|
@ -0,0 +1,145 @@
|
||||||
|
<?xml version='1.0'?> <!--*-nxml-*-->
|
||||||
|
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
||||||
|
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
||||||
|
|
||||||
|
<!--
|
||||||
|
This file is part of manjaro-tools.
|
||||||
|
|
||||||
|
Copyright 2015 Manjaro Developers
|
||||||
|
|
||||||
|
manjaro-tools is free software; you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU Lesser General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2.1 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
manjaro-tools is distributed in the hope that it will be useful, but
|
||||||
|
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
Lesser General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Lesser General Public License
|
||||||
|
along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<refentry id="check-yaml" xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||||
|
|
||||||
|
<refentryinfo>
|
||||||
|
<title>check-yaml-+</title>
|
||||||
|
<productname>manjaro-tools</productname>
|
||||||
|
|
||||||
|
<authorgroup>
|
||||||
|
<author>
|
||||||
|
<contrib></contrib>
|
||||||
|
<firstname></firstname>
|
||||||
|
<surname></surname>
|
||||||
|
<email></email>
|
||||||
|
</author>
|
||||||
|
</authorgroup>
|
||||||
|
</refentryinfo>
|
||||||
|
|
||||||
|
<refmeta>
|
||||||
|
<refentrytitle>check-yaml</refentrytitle>
|
||||||
|
<manvolnum>1</manvolnum>
|
||||||
|
</refmeta>
|
||||||
|
|
||||||
|
<refnamediv>
|
||||||
|
<refname>check-yaml</refname>
|
||||||
|
<refpurpose>check-yaml is used to generate and validate yaml files used by calamares. </refpurpose>
|
||||||
|
</refnamediv>
|
||||||
|
|
||||||
|
<refsynopsisdiv>
|
||||||
|
<cmdsynopsis>
|
||||||
|
<command>check-yaml</command>
|
||||||
|
<arg choice="opt" rep="repeat">OPTIONS</arg>
|
||||||
|
</cmdsynopsis>
|
||||||
|
</refsynopsisdiv>
|
||||||
|
|
||||||
|
<refsect1>
|
||||||
|
<title>Description</title>
|
||||||
|
|
||||||
|
<para><command>check-yaml</command> is used to generate and validate yaml files used by calamares.</para>
|
||||||
|
|
||||||
|
<para>check-yaml is a script to generate and validate yaml files by yaml schemas. Buildiso generates these files also, but check-yaml is a standalone version without the need to build the entire iso.</para>
|
||||||
|
|
||||||
|
</refsect1>
|
||||||
|
|
||||||
|
<refsect1>
|
||||||
|
<title>Options</title>
|
||||||
|
|
||||||
|
<para>The following options are understood:</para>
|
||||||
|
|
||||||
|
<variablelist>
|
||||||
|
<varlistentry>
|
||||||
|
<term><option>-p PROFILE...</option></term>
|
||||||
|
|
||||||
|
<listitem><para>Name of the build list or name of the directory.</para></listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><option>-a i686|x86_64</option></term>
|
||||||
|
|
||||||
|
<listitem><para>Architecture that the yaml will be created for. Can be i686 or x86_64.</para></listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><option>-i systemd|openrc</option></term>
|
||||||
|
|
||||||
|
<listitem><para>The init system the yaml will be created for.</para></listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><option>-k linuxXXX</option></term>
|
||||||
|
|
||||||
|
<listitem><para>The kernel the yaml will be created for.</para></listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><option>-c</option></term>
|
||||||
|
|
||||||
|
<listitem><para>Create calamares yaml conf files.</para></listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><option>-g</option></term>
|
||||||
|
|
||||||
|
<listitem><para>Generate a packman group netgroup yaml file.</para></listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><option>-v</option></term>
|
||||||
|
|
||||||
|
<listitem><para>Validate the yaml file by yaml schema.</para></listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><option>-q</option></term>
|
||||||
|
|
||||||
|
<listitem><para>Query settings.</para></listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><option>-h</option></term>
|
||||||
|
|
||||||
|
<listitem><para>Help.</para></listitem>
|
||||||
|
</varlistentry>
|
||||||
|
</variablelist>
|
||||||
|
|
||||||
|
</refsect1>
|
||||||
|
|
||||||
|
<!--<refsect1>
|
||||||
|
<title>Exit status</title>
|
||||||
|
|
||||||
|
<para>On success, 0 is returned, a non-zero failure code
|
||||||
|
otherwise.</para>
|
||||||
|
</refsect1>
|
||||||
|
-->
|
||||||
|
|
||||||
|
<refsect1>
|
||||||
|
<title>See Also</title>
|
||||||
|
<para>
|
||||||
|
<citerefentry project='manjaro-tools'><refentrytitle>manjaro-tools.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
||||||
|
<citerefentry project='manjaro-tools'><refentrytitle>profiles.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
||||||
|
</para>
|
||||||
|
</refsect1>
|
||||||
|
|
||||||
|
</refentry>
|
|
@ -141,7 +141,7 @@
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>unpackfs=</varname></term>
|
<term><varname>chrootcfg=</varname></term>
|
||||||
|
|
||||||
<listitem><para>Accepts
|
<listitem><para>Accepts
|
||||||
<option>true</option> (the default)
|
<option>true</option> (the default)
|
||||||
|
|
|
@ -140,29 +140,6 @@ configure_services(){
|
||||||
info "Done configuring [%s]" "${initsys}"
|
info "Done configuring [%s]" "${initsys}"
|
||||||
}
|
}
|
||||||
|
|
||||||
load_desktop_map(){
|
|
||||||
local _space="s| ||g" _clean=':a;N;$!ba;s/\n/ /g' _com_rm="s|#.*||g" \
|
|
||||||
file=${DATADIR}/desktop.map
|
|
||||||
local desktop_map=$(sed "$_com_rm" "$file" \
|
|
||||||
| sed "$_space" \
|
|
||||||
| sed "$_clean")
|
|
||||||
echo ${desktop_map}
|
|
||||||
}
|
|
||||||
|
|
||||||
detect_desktop_env(){
|
|
||||||
local xs=$1/usr/share/xsessions ex=$1/usr/bin key val map=( $(load_desktop_map) )
|
|
||||||
default_desktop_file="none"
|
|
||||||
default_desktop_executable="none"
|
|
||||||
for item in "${map[@]}";do
|
|
||||||
key=${item%:*}
|
|
||||||
val=${item#*:}
|
|
||||||
if [[ -f $xs/$key.desktop ]] && [[ -f $ex/$val ]];then
|
|
||||||
default_desktop_file="$key"
|
|
||||||
default_desktop_executable="$val"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
write_live_session_conf(){
|
write_live_session_conf(){
|
||||||
local path=$1${SYSCONFDIR}
|
local path=$1${SYSCONFDIR}
|
||||||
[[ ! -d $path ]] && mkdir -p $path
|
[[ ! -d $path ]] && mkdir -p $path
|
||||||
|
|
|
@ -168,24 +168,11 @@ make_iso() {
|
||||||
msg "Done [Build ISO]"
|
msg "Done [Build ISO]"
|
||||||
}
|
}
|
||||||
|
|
||||||
# $1: file
|
|
||||||
make_checksum(){
|
|
||||||
msg "Creating [%s] sum ..." "${iso_checksum}"
|
|
||||||
local cs=$(${iso_checksum}sum ${iso_dir}/$1)
|
|
||||||
msg2 "%s sum: %s" "${iso_checksum}" "${cs##*/}"
|
|
||||||
echo "${cs}" > ${iso_dir}/$1.${iso_checksum}
|
|
||||||
msg "Done [%s] sum" "${iso_checksum}"
|
|
||||||
}
|
|
||||||
|
|
||||||
gen_iso_fn(){
|
gen_iso_fn(){
|
||||||
local vars=() name
|
local vars=() name
|
||||||
vars+=("${iso_name}")
|
vars+=("${iso_name}")
|
||||||
if ! ${netinstall};then
|
if ! ${chrootcfg};then
|
||||||
[[ -n ${profile} ]] && vars+=("${profile}")
|
[[ -n ${profile} ]] && vars+=("${profile}")
|
||||||
else
|
|
||||||
if ${unpackfs};then
|
|
||||||
[[ -n ${profile} ]] && vars+=("${profile}")
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
[[ ${initsys} == 'openrc' ]] && vars+=("${initsys}")
|
[[ ${initsys} == 'openrc' ]] && vars+=("${initsys}")
|
||||||
vars+=("${dist_release}")
|
vars+=("${dist_release}")
|
||||||
|
@ -453,6 +440,16 @@ make_torrent(){
|
||||||
mktorrent ${mktorrent_args[*]} -o ${iso_dir}/${fn} ${iso_dir}/${iso_file}
|
mktorrent ${mktorrent_args[*]} -o ${iso_dir}/${fn} ${iso_dir}/${iso_file}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# $1: file
|
||||||
|
make_checksum(){
|
||||||
|
msg "Creating [%s] sum ..." "${iso_checksum}"
|
||||||
|
cd ${iso_dir}
|
||||||
|
local cs=$(${iso_checksum}sum $1)
|
||||||
|
msg2 "%s sum: %s" "${iso_checksum}" "${cs##*/}"
|
||||||
|
echo "${cs}" > ${iso_dir}/$1.${iso_checksum}
|
||||||
|
msg "Done [%s] sum" "${iso_checksum}"
|
||||||
|
}
|
||||||
|
|
||||||
compress_images(){
|
compress_images(){
|
||||||
local timer=$(get_timer)
|
local timer=$(get_timer)
|
||||||
run_safe "make_iso"
|
run_safe "make_iso"
|
||||||
|
|
174
lib/util-yaml.sh
174
lib/util-yaml.sh
|
@ -9,6 +9,38 @@
|
||||||
# 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.
|
||||||
|
|
||||||
|
load_desktop_map(){
|
||||||
|
local _space="s| ||g" _clean=':a;N;$!ba;s/\n/ /g' _com_rm="s|#.*||g" \
|
||||||
|
file=${DATADIR}/desktop.map
|
||||||
|
local desktop_map=$(sed "$_com_rm" "$file" \
|
||||||
|
| sed "$_space" \
|
||||||
|
| sed "$_clean")
|
||||||
|
echo ${desktop_map}
|
||||||
|
}
|
||||||
|
|
||||||
|
detect_desktop_env(){
|
||||||
|
local xs=$1/usr/share/xsessions ex=$1/usr/bin key val map=( $(load_desktop_map) )
|
||||||
|
default_desktop_file="none"
|
||||||
|
default_desktop_executable="none"
|
||||||
|
for item in "${map[@]}";do
|
||||||
|
key=${item%:*}
|
||||||
|
val=${item#*:}
|
||||||
|
if [[ -f $xs/$key.desktop ]] && [[ -f $ex/$val ]];then
|
||||||
|
default_desktop_file="$key"
|
||||||
|
default_desktop_executable="$val"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
is_valid_de(){
|
||||||
|
if [[ ${default_desktop_executable} != "none" ]] && \
|
||||||
|
[[ ${default_desktop_file} != "none" ]]; then
|
||||||
|
return 0
|
||||||
|
else
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
write_machineid_conf(){
|
write_machineid_conf(){
|
||||||
local conf="${modules_dir}/machineid.conf" switch='false'
|
local conf="${modules_dir}/machineid.conf" switch='false'
|
||||||
msg2 "Writing %s ..." "${conf##*/}"
|
msg2 "Writing %s ..." "${conf##*/}"
|
||||||
|
@ -108,13 +140,24 @@ write_services_conf(){
|
||||||
write_displaymanager_conf(){
|
write_displaymanager_conf(){
|
||||||
local conf="${modules_dir}/displaymanager.conf"
|
local conf="${modules_dir}/displaymanager.conf"
|
||||||
msg2 "Writing %s ..." "${conf##*/}"
|
msg2 "Writing %s ..." "${conf##*/}"
|
||||||
echo "displaymanagers:" > "$conf"
|
echo "---" > "$conf"
|
||||||
echo " - ${displaymanager}" >> "$conf"
|
if ${chrootcfg}; then
|
||||||
echo '' >> "$conf"
|
echo "displaymanagers:" >> "$conf"
|
||||||
if $(is_valid_de); then
|
echo " - lightdm" >> "$conf"
|
||||||
echo "defaultDesktopEnvironment:" >> "$conf"
|
echo " - gdm" >> "$conf"
|
||||||
echo " executable: \"${default_desktop_executable}\"" >> "$conf"
|
echo " - mdm" >> "$conf"
|
||||||
echo " desktopFile: \"${default_desktop_file}\"" >> "$conf"
|
echo " - sddm" >> "$conf"
|
||||||
|
echo " - lxdm" >> "$conf"
|
||||||
|
echo " - slim" >> "$conf"
|
||||||
|
else
|
||||||
|
echo "displaymanagers:" >> "$conf"
|
||||||
|
echo " - ${displaymanager}" >> "$conf"
|
||||||
|
echo '' >> "$conf"
|
||||||
|
if $(is_valid_de); then
|
||||||
|
echo "defaultDesktopEnvironment:" >> "$conf"
|
||||||
|
echo " executable: \"${default_desktop_executable}\"" >> "$conf"
|
||||||
|
echo " desktopFile: \"${default_desktop_file}\"" >> "$conf"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
echo '' >> "$conf"
|
echo '' >> "$conf"
|
||||||
echo "basicSetup: false" >> "$conf"
|
echo "basicSetup: false" >> "$conf"
|
||||||
|
@ -212,14 +255,10 @@ write_mhwdcfg_conf(){
|
||||||
echo "driver: free" >> "$conf"
|
echo "driver: free" >> "$conf"
|
||||||
fi
|
fi
|
||||||
echo '' >> "$conf"
|
echo '' >> "$conf"
|
||||||
if ${netinstall};then
|
if ${chrootcfg};then
|
||||||
if ${unpackfs};then
|
|
||||||
echo "local: true" >> "$conf"
|
|
||||||
else
|
|
||||||
echo "local: false" >> "$conf"
|
echo "local: false" >> "$conf"
|
||||||
fi
|
|
||||||
else
|
else
|
||||||
echo "local: true" >> "$conf"
|
echo "local: true" >> "$conf"
|
||||||
fi
|
fi
|
||||||
echo '' >> "$conf"
|
echo '' >> "$conf"
|
||||||
echo 'repo: /opt/pacman-mhwd.conf' >> "$conf"
|
echo 'repo: /opt/pacman-mhwd.conf' >> "$conf"
|
||||||
|
@ -241,10 +280,10 @@ write_postcfg_conf(){
|
||||||
|
|
||||||
get_yaml(){
|
get_yaml(){
|
||||||
local args=() ext="yaml" yaml
|
local args=() ext="yaml" yaml
|
||||||
if ${unpackfs};then
|
if ${chrootcfg};then
|
||||||
args+=("hybrid")
|
|
||||||
else
|
|
||||||
args+=('netinstall')
|
args+=('netinstall')
|
||||||
|
else
|
||||||
|
args+=("hybrid")
|
||||||
fi
|
fi
|
||||||
args+=("${initsys}")
|
args+=("${initsys}")
|
||||||
[[ ${edition} == 'sonar' ]] && args+=("${edition}")
|
[[ ${edition} == 'sonar' ]] && args+=("${edition}")
|
||||||
|
@ -288,56 +327,59 @@ write_settings_conf(){
|
||||||
echo "modules-search: [ local ]" >> "$conf"
|
echo "modules-search: [ local ]" >> "$conf"
|
||||||
echo '' >> "$conf"
|
echo '' >> "$conf"
|
||||||
echo "instances:" >> "$conf"
|
echo "instances:" >> "$conf"
|
||||||
|
echo '# - id: owncloud' >> "$conf"
|
||||||
|
echo '# module: webview' >> "$conf"
|
||||||
|
echo '# config: owncloud.conf' >> "$conf"
|
||||||
echo '' >> "$conf"
|
echo '' >> "$conf"
|
||||||
echo "sequence:" >> "$conf"
|
echo "sequence:" >> "$conf"
|
||||||
echo "- show:" >> "$conf"
|
echo " - show:" >> "$conf"
|
||||||
echo " - welcome" >> "$conf"
|
echo " - welcome" >> "$conf"
|
||||||
${netinstall} && echo " - netinstall" >> "$conf"
|
echo " - locale" >> "$conf"
|
||||||
echo " - locale" >> "$conf"
|
echo " - keyboard" >> "$conf"
|
||||||
echo " - keyboard" >> "$conf"
|
echo " - partition" >> "$conf"
|
||||||
echo " - partition" >> "$conf"
|
echo " - users" >> "$conf"
|
||||||
echo " - users" >> "$conf"
|
${netinstall} && echo " - netinstall" >> "$conf"
|
||||||
echo " - summary" >> "$conf"
|
echo " - summary" >> "$conf"
|
||||||
echo "- exec:" >> "$conf"
|
echo " - exec:" >> "$conf"
|
||||||
echo " - partition" >> "$conf"
|
echo " - partition" >> "$conf"
|
||||||
echo " - mount" >> "$conf"
|
echo " - mount" >> "$conf"
|
||||||
if ${netinstall};then
|
if ${netinstall};then
|
||||||
if ${unpackfs};then
|
if ${chrootcfg}; then
|
||||||
echo " - unpackfs" >> "$conf"
|
echo " - chrootcfg" >> "$conf"
|
||||||
echo " - networkcfg" >> "$conf"
|
echo " - networkcfg" >> "$conf"
|
||||||
echo " - packages" >> "$conf"
|
|
||||||
else
|
else
|
||||||
echo " - chrootcfg" >> "$conf"
|
echo " - unpackfs" >> "$conf"
|
||||||
echo " - networkcfg" >> "$conf"
|
echo " - networkcfg" >> "$conf"
|
||||||
|
echo " - packages" >> "$conf"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo " - unpackfs" >> "$conf"
|
echo " - unpackfs" >> "$conf"
|
||||||
echo " - networkcfg" >> "$conf"
|
echo " - networkcfg" >> "$conf"
|
||||||
fi
|
fi
|
||||||
echo " - machineid" >> "$conf"
|
echo " - machineid" >> "$conf"
|
||||||
echo " - fstab" >> "$conf"
|
echo " - fstab" >> "$conf"
|
||||||
echo " - locale" >> "$conf"
|
echo " - locale" >> "$conf"
|
||||||
echo " - keyboard" >> "$conf"
|
echo " - keyboard" >> "$conf"
|
||||||
echo " - localecfg" >> "$conf"
|
echo " - localecfg" >> "$conf"
|
||||||
echo " - luksopenswaphookcfg" >> "$conf"
|
echo " - luksopenswaphookcfg" >> "$conf"
|
||||||
echo " - luksbootkeyfile" >> "$conf"
|
echo " - luksbootkeyfile" >> "$conf"
|
||||||
echo " - plymouthcfg" >> "$conf"
|
echo " - plymouthcfg" >> "$conf"
|
||||||
echo " - initcpiocfg" >> "$conf"
|
echo " - initcpiocfg" >> "$conf"
|
||||||
echo " - initcpio" >> "$conf"
|
echo " - initcpio" >> "$conf"
|
||||||
echo " - users" >> "$conf"
|
echo " - users" >> "$conf"
|
||||||
echo " - displaymanager" >> "$conf"
|
echo " - displaymanager" >> "$conf"
|
||||||
echo " - mhwdcfg" >> "$conf"
|
echo " - mhwdcfg" >> "$conf"
|
||||||
echo " - hwclock" >> "$conf"
|
echo " - hwclock" >> "$conf"
|
||||||
case ${initsys} in
|
case ${initsys} in
|
||||||
'systemd') echo " - services" >> "$conf" ;;
|
'systemd') echo " - services" >> "$conf" ;;
|
||||||
'openrc') echo " - servicescfg" >> "$conf" ;;
|
'openrc') echo " - servicescfg" >> "$conf" ;;
|
||||||
esac
|
esac
|
||||||
echo " - grubcfg" >> "$conf"
|
echo " - grubcfg" >> "$conf"
|
||||||
echo " - bootloader" >> "$conf"
|
echo " - bootloader" >> "$conf"
|
||||||
echo " - postcfg" >> "$conf"
|
echo " - postcfg" >> "$conf"
|
||||||
echo " - umount" >> "$conf"
|
echo " - umount" >> "$conf"
|
||||||
echo "- show:" >> "$conf"
|
echo " - show:" >> "$conf"
|
||||||
echo " - finished" >> "$conf"
|
echo " - finished" >> "$conf"
|
||||||
echo '' >> "$conf"
|
echo '' >> "$conf"
|
||||||
echo "branding: ${iso_name}" >> "$conf"
|
echo "branding: ${iso_name}" >> "$conf"
|
||||||
echo '' >> "$conf"
|
echo '' >> "$conf"
|
||||||
|
@ -361,7 +403,9 @@ configure_calamares(){
|
||||||
|
|
||||||
if ${netinstall};then
|
if ${netinstall};then
|
||||||
write_netinstall_conf
|
write_netinstall_conf
|
||||||
write_packages_conf
|
if ! ${chrootcfg}; then
|
||||||
|
write_packages_conf
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
write_bootloader_conf
|
write_bootloader_conf
|
||||||
|
@ -394,20 +438,21 @@ configure_calamares(){
|
||||||
|
|
||||||
check_yaml(){
|
check_yaml(){
|
||||||
msg2 "Checking validity [%s] ..." "${1##*/}"
|
msg2 "Checking validity [%s] ..." "${1##*/}"
|
||||||
local name=${1##*/} data schema
|
local name=${1##*/} data=$1 schema
|
||||||
case ${name##*.} in
|
case ${name##*.} in
|
||||||
yaml)
|
yaml)
|
||||||
name=netgroups
|
name=netgroups
|
||||||
data=$1
|
# data=$1
|
||||||
;;
|
;;
|
||||||
conf)
|
conf)
|
||||||
name=${name%.conf}
|
name=${name%.conf}
|
||||||
data=${tmp_dir}/$name.yaml
|
# data=${tmp_dir}/$name.yaml
|
||||||
cp $1 $data
|
# cp $1 $data
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
schema=${DATADIR}/schemas/$name.schema.yaml
|
schema=${DATADIR}/schemas/$name.schema.yaml
|
||||||
pykwalify -d $data -s $schema
|
# pykwalify -d $data -s $schema
|
||||||
|
kwalify -lf $schema $data
|
||||||
}
|
}
|
||||||
|
|
||||||
write_calamares_yaml(){
|
write_calamares_yaml(){
|
||||||
|
@ -422,7 +467,8 @@ write_calamares_yaml(){
|
||||||
|
|
||||||
write_netgroup_yaml(){
|
write_netgroup_yaml(){
|
||||||
msg2 "Writing %s ..." "${2##*/}"
|
msg2 "Writing %s ..." "${2##*/}"
|
||||||
echo "- name: '$1'" > "$2"
|
echo "---" > "$2"
|
||||||
|
echo "- name: '$1'" >> "$2"
|
||||||
echo " description: '$1'" >> "$2"
|
echo " description: '$1'" >> "$2"
|
||||||
echo " selected: false" >> "$2"
|
echo " selected: false" >> "$2"
|
||||||
echo " hidden: false" >> "$2"
|
echo " hidden: false" >> "$2"
|
||||||
|
|
28
lib/util.sh
28
lib/util.sh
|
@ -370,8 +370,11 @@ check_profile_vars(){
|
||||||
if ! is_valid_bool "${netinstall}";then
|
if ! is_valid_bool "${netinstall}";then
|
||||||
die "netinstall only accepts true/false value!"
|
die "netinstall only accepts true/false value!"
|
||||||
fi
|
fi
|
||||||
if ! is_valid_bool "${unpackfs}";then
|
if ! is_valid_bool "${chrootcfg}";then
|
||||||
die "unpackfs only accepts true/false value!"
|
die "chrootcfg only accepts true/false value!"
|
||||||
|
fi
|
||||||
|
if ! is_valid_bool "${geoip}";then
|
||||||
|
die "geoip only accepts true/false value!"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -453,9 +456,11 @@ load_profile_config(){
|
||||||
|
|
||||||
[[ -z ${netinstall} ]] && netinstall='false'
|
[[ -z ${netinstall} ]] && netinstall='false'
|
||||||
|
|
||||||
[[ -z ${unpackfs} ]] && unpackfs='true'
|
[[ -z ${chrootcfg} ]] && chrootcfg='false'
|
||||||
|
|
||||||
[[ -z ${netgroups} ]] && netgroups="https://raw.githubusercontent.com/manjaro/manjaro-tools-iso-profiles/master/shared/netinstall"
|
#[[ -z ${netgroups} ]] && -- needs to be hardcoded for now, until a standard has been established
|
||||||
|
# will be unlocked again after everything has been established.
|
||||||
|
netgroups="https://raw.githubusercontent.com/manjaro/manjaro-tools-iso-profiles/master/shared/netinst"
|
||||||
|
|
||||||
[[ -z ${geoip} ]] && geoip='true'
|
[[ -z ${geoip} ]] && geoip='true'
|
||||||
|
|
||||||
|
@ -473,15 +478,6 @@ get_edition(){
|
||||||
echo ${path##*/}
|
echo ${path##*/}
|
||||||
}
|
}
|
||||||
|
|
||||||
is_valid_de(){
|
|
||||||
if [[ ${default_desktop_executable} != "none" ]] && \
|
|
||||||
[[ ${default_desktop_file} != "none" ]]; then
|
|
||||||
return 0
|
|
||||||
else
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
reset_profile(){
|
reset_profile(){
|
||||||
unset displaymanager
|
unset displaymanager
|
||||||
unset autologin
|
unset autologin
|
||||||
|
@ -507,7 +503,7 @@ reset_profile(){
|
||||||
unset tracker_url
|
unset tracker_url
|
||||||
unset piece_size
|
unset piece_size
|
||||||
unset netinstall
|
unset netinstall
|
||||||
unset unpackfs
|
unset chrootcfg
|
||||||
unset netgroups
|
unset netgroups
|
||||||
unset geoip
|
unset geoip
|
||||||
}
|
}
|
||||||
|
@ -551,8 +547,8 @@ check_profile(){
|
||||||
|
|
||||||
[[ -f "${profile_dir}/Packages-Mhwd" ]] && packages_mhwd=${profile_dir}/Packages-Mhwd
|
[[ -f "${profile_dir}/Packages-Mhwd" ]] && packages_mhwd=${profile_dir}/Packages-Mhwd
|
||||||
|
|
||||||
if ! ${netinstall} && ! ${unpackfs};then
|
if ! ${netinstall}; then
|
||||||
unpackfs="true"
|
chrootcfg="false"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue