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.xz
|
||||
.kateproject.d
|
||||
data/misc
|
||||
data/schemas/*.conf
|
||||
.project
|
||||
|
|
21
Makefile
21
Makefile
|
@ -1,4 +1,4 @@
|
|||
Version=0.13.7
|
||||
Version=0.13.8
|
||||
|
||||
PREFIX = /usr/local
|
||||
SYSCONFDIR = /etc
|
||||
|
@ -76,8 +76,6 @@ LIBS_ISO = \
|
|||
|
||||
SHARED_ISO = \
|
||||
data/pacman-mhwd.conf \
|
||||
data/desktop.map \
|
||||
data/linux.preset \
|
||||
data/profile.conf.example
|
||||
|
||||
CPIOHOOKS = \
|
||||
|
@ -100,6 +98,7 @@ MAN_XML = \
|
|||
buildtree.xml \
|
||||
buildiso.xml \
|
||||
deployiso.xml \
|
||||
check-yaml.xml \
|
||||
manjaro-tools.conf.xml \
|
||||
profile.conf.xml
|
||||
|
||||
|
@ -110,6 +109,10 @@ LIBS_YAML = \
|
|||
lib/util-yaml.sh
|
||||
|
||||
SHARED_YAML = \
|
||||
data/desktop.map \
|
||||
data/linux.preset
|
||||
|
||||
SCHEMAS = \
|
||||
data/schemas/bootloader.schema.yaml \
|
||||
data/schemas/chrootcfg.schema.yaml \
|
||||
data/schemas/displaymanager.schema.yaml \
|
||||
|
@ -230,8 +233,14 @@ install_yaml:
|
|||
install -dm0755 $(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 -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:
|
||||
for f in ${SYSCONF}; do rm -f $(DESTDIR)$(SYSCONFDIR)/manjaro-tools/$$f; done
|
||||
|
@ -265,7 +274,9 @@ uninstall_iso:
|
|||
uninstall_yaml:
|
||||
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 ${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
|
||||
|
||||
|
|
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
|
||||
Usage: check-yaml [options]
|
||||
-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]
|
||||
-i <name> Init system to use [default: systemd]
|
||||
-c Check also calamares yaml files generated for the profile
|
||||
-g Enable pacman group accepted for -p
|
||||
-v Validate by schema
|
||||
-q Query settings
|
||||
-h This help
|
||||
~~~
|
||||
|
@ -291,11 +293,20 @@ check-yaml -p xfce -a i686 -c
|
|||
check-yaml -p xfce -c
|
||||
~~~
|
||||
|
||||
* for a kdebase pacman group with validation
|
||||
|
||||
~~~
|
||||
check-yaml -p kdebase -gv
|
||||
~~~
|
||||
|
||||
####Special parameters
|
||||
|
||||
######* -c
|
||||
* generate calamares module and settings conf files per profile
|
||||
|
||||
######* -g
|
||||
* generate a netgroup for specified pacman group
|
||||
|
||||
###5. buildtree
|
||||
|
||||
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}"
|
||||
|
||||
msg2 "netinstall: %s" "${netinstall}"
|
||||
msg2 "chrootcfg: %s" "${chrootcfg}"
|
||||
${netinstall} && msg2 "netgroups: %s" "$(get_yaml)"
|
||||
msg2 "unpackfs: %s" "${unpackfs}"
|
||||
msg2 "geoip: %s" "${geoip}"
|
||||
|
||||
msg2 "efi_boot_loader: %s" "${efi_boot_loader}"
|
||||
|
|
|
@ -33,8 +33,9 @@ show_profile(){
|
|||
[[ ${target_arch} == 'x86_64' ]] && msg2 "multilib: %s" "${multilib}"
|
||||
|
||||
msg2 "netinstall: %s" "${netinstall}"
|
||||
msg2 "chrootcfg: %s" "${chrootcfg}"
|
||||
${netinstall} && msg2 "netgroups: %s" "$(get_yaml)"
|
||||
msg2 "unpackfs: %s" "${unpackfs}"
|
||||
msg2 "geoip: %s" "${geoip}"
|
||||
|
||||
msg2 "efi_boot_loader: %s" "${efi_boot_loader}"
|
||||
|
||||
|
|
|
@ -15,3 +15,4 @@ lxqt:lxqt-session
|
|||
pantheon:pantheon-session
|
||||
budgie-desktop:budgie-desktop
|
||||
deepin:startdde
|
||||
Lumina-DE:start-lumina-desktop
|
||||
|
|
|
@ -40,8 +40,8 @@
|
|||
# the default url for the netinstall.yaml
|
||||
# netgroups="https://raw.githubusercontent.com/manjaro/manjaro-tools-iso-profiles/master/shared/netinstall"
|
||||
|
||||
# configure calamares to use chrootcfg instead of unpackfs
|
||||
# unpackfs="true"
|
||||
# configure calamares to use chrootcfg instead of unpackfs; default: unpackfs
|
||||
# chrootcfg="false"
|
||||
|
||||
# use geoip
|
||||
# geoip="true"
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
---
|
||||
type: map
|
||||
mapping:
|
||||
efiBootLoader: { type: str, required: yes }
|
||||
kernel: { type: str, required: yes }
|
||||
img: { type: str, required: yes }
|
||||
fallback: { type: str, required: yes }
|
||||
timeout: { type: str, required: yes }
|
||||
efiBootLoader: { type: str, required: true }
|
||||
kernel: { type: str, required: true }
|
||||
img: { type: str, required: true }
|
||||
fallback: { type: str, required: true }
|
||||
timeout: { type: str, required: true }
|
||||
bootloaderEntryName: { type: str }
|
||||
kernelLine: { type: str, required: yes }
|
||||
fallbackKernelLine: { type: str, required: yes }
|
||||
grubInstall: { type: str, required: yes }
|
||||
grubMkconfig: { type: str, required: yes }
|
||||
grubCfg: { type: str, required: yes }
|
||||
kernelLine: { type: str, required: true }
|
||||
fallbackKernelLine: { type: str, required: true }
|
||||
grubInstall: { type: str, required: true }
|
||||
grubMkconfig: { type: str, required: true }
|
||||
grubCfg: { type: str, required: true }
|
||||
efiBootloaderId: { type: str }
|
||||
|
|
|
@ -6,8 +6,8 @@ mapping:
|
|||
sequence:
|
||||
- type: map
|
||||
mapping:
|
||||
"name": { type: str, required: yes }
|
||||
"mode": { type: str, required: yes }
|
||||
"name": { type: str, required: true }
|
||||
"mode": { type: str, required: true }
|
||||
keyrings:
|
||||
type: seq
|
||||
sequence:
|
||||
|
|
|
@ -4,10 +4,10 @@ mapping:
|
|||
"displaymanagers":
|
||||
type: seq
|
||||
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":
|
||||
type: map
|
||||
mapping:
|
||||
"executable": { type: str }
|
||||
"desktopFile": { type: str }
|
||||
"basicSetup": { type: bool, default: false, required: yes }
|
||||
"basicSetup": { type: bool, default: false }
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
type: map
|
||||
mapping:
|
||||
"restartNowEnabled": { type: bool, default: true, required: yes }
|
||||
"restartNowChecked": { type: bool, default: false, required: yes }
|
||||
"restartNowCommand": { type: str, required: yes }
|
||||
"restartNowEnabled": { type: bool, default: true }
|
||||
"restartNowChecked": { type: bool, default: false }
|
||||
"restartNowCommand": { type: str, required: true }
|
||||
|
|
|
@ -4,13 +4,13 @@ mapping:
|
|||
"mountOptions":
|
||||
type: map
|
||||
mapping:
|
||||
"default": { type: str, required: yes }
|
||||
"btrfs": { type: str, required: yes }
|
||||
"default": { type: str, required: true }
|
||||
"btrfs": { type: str, required: true }
|
||||
"ssdExtraMountOptions":
|
||||
type: map
|
||||
mapping:
|
||||
"ext4": { type: str, required: yes }
|
||||
"jfs": { type: str, required: yes }
|
||||
"xfs": { type: str, required: yes }
|
||||
"swap": { type: str, required: yes }
|
||||
"btrfs": { type: str, required: yes }
|
||||
"ext4": { type: str, required: true }
|
||||
"jfs": { type: str, required: true }
|
||||
"xfs": { type: str, required: true }
|
||||
"swap": { type: str, required: true }
|
||||
"btrfs": { type: str, required: true }
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
---
|
||||
type: map
|
||||
mapping:
|
||||
"overwrite": { type: bool, default: false, required: yes }
|
||||
"overwrite": { type: bool, default: false }
|
||||
"defaults":
|
||||
type: map
|
||||
mapping:
|
||||
"GRUB_TIMEOUT": { type: int, required: yes }
|
||||
"GRUB_DEFAULT": { type: str, required: yes }
|
||||
"GRUB_DISABLE_SUBMENU": { type: bool, default: true, required: yes }
|
||||
"GRUB_TERMINAL_OUTPUT": { type: str, required: yes }
|
||||
"GRUB_DISABLE_RECOVERY": { type: bool, default: true, required: yes }
|
||||
"GRUB_TIMEOUT": { type: int, required: true }
|
||||
"GRUB_DEFAULT": { type: str, required: true }
|
||||
"GRUB_DISABLE_SUBMENU": { type: bool, default: true }
|
||||
"GRUB_TERMINAL_OUTPUT": { type: str, required: true }
|
||||
"GRUB_DISABLE_RECOVERY": { type: bool, default: true }
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
---
|
||||
type: map
|
||||
mapping:
|
||||
kernel: { type: str, required: yes }
|
||||
kernel: { type: str, required: true }
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
type: map
|
||||
mapping:
|
||||
xOrgConfFileName: { type: str, required: yes }
|
||||
convertedKeymapPath: { type: str, required: yes }
|
||||
xOrgConfFileName: { type: str, required: true }
|
||||
convertedKeymapPath: { type: str, required: true }
|
||||
|
|
|
@ -3,5 +3,5 @@ type: map
|
|||
mapping:
|
||||
"region": { type: str }
|
||||
"zone": { type: str }
|
||||
"localeGenPath": { type: str, required: yes }
|
||||
"localeGenPath": { type: str, required: true }
|
||||
"geoipUrl": { type: str }
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
---
|
||||
type: map
|
||||
mapping:
|
||||
"configFilePath": { type: str, required: yes }
|
||||
"configFilePath": { type: str, required: true }
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
type: map
|
||||
mapping:
|
||||
"systemd": { type: bool, default: true, required: yes }
|
||||
"dbus": { type: bool, default: true, required: yes }
|
||||
"symlink": { type: bool, default: true, required: yes }
|
||||
"systemd": { type: bool, default: true }
|
||||
"dbus": { type: bool, default: true }
|
||||
"symlink": { type: bool, default: true }
|
||||
|
|
|
@ -16,6 +16,6 @@ mapping:
|
|||
type: seq
|
||||
sequence:
|
||||
- type: int
|
||||
"driver": { type: str, required: yes }
|
||||
"local": { type: bool, default: true, required: yes }
|
||||
"repo": { type: str, required: yes }
|
||||
"driver": { type: str, required: true }
|
||||
"local": { type: bool, default: true }
|
||||
"repo": { type: str, required: true }
|
||||
|
|
|
@ -6,16 +6,16 @@ mapping:
|
|||
sequence:
|
||||
- type: map
|
||||
mapping:
|
||||
"device": { type: str, required: yes }
|
||||
"device": { type: str, required: true }
|
||||
"fs": { type: str }
|
||||
"mountPoint": { type: str, required: yes }
|
||||
"mountPoint": { type: str, required: true }
|
||||
"options": { type: str }
|
||||
"extraMountsEfi":
|
||||
type: seq
|
||||
sequence:
|
||||
- type: map
|
||||
mapping:
|
||||
"device": { type: str, required: yes }
|
||||
"device": { type: str, required: true }
|
||||
"fs": { type: str }
|
||||
"mountPoint": { type: str, required: yes }
|
||||
"mountPoint": { type: str, required: true }
|
||||
"options": { type: str }
|
||||
|
|
|
@ -3,12 +3,12 @@ type: seq
|
|||
sequence:
|
||||
- type: map
|
||||
mapping:
|
||||
"name": { type: str, required: yes }
|
||||
"description": { type: str, required: yes }
|
||||
"name": { type: str, required: true }
|
||||
"description": { type: str, required: true }
|
||||
"selected": { type: bool, default: false }
|
||||
"hidden": { type: bool, default: false }
|
||||
"packages":
|
||||
type: seq
|
||||
required: yes
|
||||
required: true
|
||||
sequence:
|
||||
- type: str
|
||||
- { type: text }
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
---
|
||||
type: map
|
||||
mapping:
|
||||
groupsUrl: { type: str, required: yes }
|
||||
groupsUrl: { type: str, required: true }
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
type: map
|
||||
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":
|
||||
type: seq
|
||||
sequence:
|
||||
|
@ -10,16 +10,12 @@ mapping:
|
|||
"install":
|
||||
type: seq
|
||||
sequence:
|
||||
- type: str
|
||||
- type: map
|
||||
mapping:
|
||||
- { type: text }
|
||||
"remove":
|
||||
type: seq
|
||||
sequence:
|
||||
- type: str
|
||||
- type: map
|
||||
mapping:
|
||||
- { type: text }
|
||||
"localInstall":
|
||||
type: seq
|
||||
sequence:
|
||||
- type: str
|
||||
- { type: text }
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
---
|
||||
type: map
|
||||
mapping:
|
||||
efiSystemPartition: { type: str, required: yes }
|
||||
ensureSuspendToDisk: { type: bool, default: true, required: yes }
|
||||
drawNestedPartitions: { type: bool, default: false, required: yes }
|
||||
alwaysShowPartitionLabels: { type: bool, default: true, required: yes }
|
||||
defaultFileSystemType: { type: str, required: yes }
|
||||
efiSystemPartition: { type: str, required: true }
|
||||
ensureSuspendToDisk: { type: bool, default: true }
|
||||
drawNestedPartitions: { type: bool, default: false }
|
||||
alwaysShowPartitionLabels: { type: bool, default: true }
|
||||
defaultFileSystemType: { type: str, required: true }
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
---
|
||||
type: map
|
||||
mapping:
|
||||
"username": { type: str, required: yes }
|
||||
"username": { type: str, required: true }
|
||||
|
|
|
@ -2,13 +2,12 @@
|
|||
type: map
|
||||
mapping:
|
||||
"modules-search":
|
||||
required: true
|
||||
type: seq
|
||||
required: yes
|
||||
sequence:
|
||||
- type: str
|
||||
- { type: str }
|
||||
"instances":
|
||||
type: seq
|
||||
required: yes
|
||||
sequence:
|
||||
- type: map
|
||||
mapping:
|
||||
|
@ -17,59 +16,17 @@ mapping:
|
|||
"config": { type: str }
|
||||
"sequence":
|
||||
type: seq
|
||||
required: yes
|
||||
sequence:
|
||||
- type: map
|
||||
mapping:
|
||||
"show":
|
||||
type: seq
|
||||
sequence:
|
||||
- type: map
|
||||
mapping:
|
||||
"welcome": { type: str, required: yes }
|
||||
"locale": { type: str, required: yes }
|
||||
"keyboard": { type: str, required: yes }
|
||||
"partition": { type: str, required: yes }
|
||||
"users": { type: str, required: yes }
|
||||
"summary": { type: str, required: yes }
|
||||
"netinstall": { type: str }
|
||||
- { type: str, enum: [welcome, netinstall, locale, keyboard, partition, users, summary, finished], unique: true }
|
||||
"exec":
|
||||
type: seq
|
||||
sequence:
|
||||
- type: map
|
||||
mapping:
|
||||
"partition": { type: str, required: yes }
|
||||
"mount": { type: str, required: yes }
|
||||
"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 }
|
||||
- { 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 }
|
||||
"branding": { type: str, required: true }
|
||||
"prompt-install": { type: bool, default: false }
|
||||
"dont-chroot": { type: bool, default: false }
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
type: map
|
||||
mapping:
|
||||
"scrLog": { type: str }
|
||||
"srcLog": { type: str }
|
||||
"destLog": { type: str }
|
||||
|
|
|
@ -2,12 +2,12 @@
|
|||
type: map
|
||||
mapping:
|
||||
"defaultGroups":
|
||||
required: yes
|
||||
required: true
|
||||
type: seq
|
||||
sequence:
|
||||
- { type: str }
|
||||
"autologinGroup": { type: str, required: yes }
|
||||
"autologinGroup": { type: str, required: true }
|
||||
"doAutologin": { type: bool, default: true }
|
||||
"sudoersGroup": { type: str, required: yes }
|
||||
"setRootPassword": { type: bool, default: true, required: yes }
|
||||
"sudoersGroup": { type: str, required: true }
|
||||
"setRootPassword": { type: bool, default: true }
|
||||
"doReusePassword": { type: bool, default: true }
|
||||
|
|
|
@ -1,33 +1,21 @@
|
|||
---
|
||||
type: map
|
||||
mapping:
|
||||
"showSupportUrl": { type: bool, default: true, required: yes }
|
||||
"showKnownIssuesUrl": { type: bool, default: true, required: yes }
|
||||
"showReleaseNotesUrl": { type: bool, default: true, required: yes }
|
||||
"showSupportUrl": { type: bool, default: true }
|
||||
"showKnownIssuesUrl": { type: bool, default: true }
|
||||
"showReleaseNotesUrl": { type: bool, default: true }
|
||||
"requirements":
|
||||
type: map
|
||||
mapping:
|
||||
"requiredStorage": { type: float, required: yes }
|
||||
"requiredRam": { type: float, required: yes }
|
||||
"requiredStorage": { type: float, required: true }
|
||||
"requiredRam": { type: float, required: true }
|
||||
"check":
|
||||
required: yes
|
||||
required: true
|
||||
type: seq
|
||||
sequence:
|
||||
- type: map
|
||||
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 }
|
||||
- { type: str, enum: [storage, ram, power, internet, root], unique: true }
|
||||
"required":
|
||||
required: yes
|
||||
required: true
|
||||
type: seq
|
||||
sequence:
|
||||
- type: map
|
||||
mapping:
|
||||
"storage": { type: str, required: yes }
|
||||
"ram": { type: str, required: yes }
|
||||
"power": { type: str }
|
||||
"internet": { type: str }
|
||||
"root": { type: str, required: yes }
|
||||
- { type: str, enum: [storage, ram, power, internet, root], unique: true }
|
||||
|
|
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>
|
||||
<term><varname>unpackfs=</varname></term>
|
||||
<term><varname>chrootcfg=</varname></term>
|
||||
|
||||
<listitem><para>Accepts
|
||||
<option>true</option> (the default)
|
||||
|
|
|
@ -140,29 +140,6 @@ configure_services(){
|
|||
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(){
|
||||
local path=$1${SYSCONFDIR}
|
||||
[[ ! -d $path ]] && mkdir -p $path
|
||||
|
|
|
@ -168,24 +168,11 @@ make_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(){
|
||||
local vars=() name
|
||||
vars+=("${iso_name}")
|
||||
if ! ${netinstall};then
|
||||
if ! ${chrootcfg};then
|
||||
[[ -n ${profile} ]] && vars+=("${profile}")
|
||||
else
|
||||
if ${unpackfs};then
|
||||
[[ -n ${profile} ]] && vars+=("${profile}")
|
||||
fi
|
||||
fi
|
||||
[[ ${initsys} == 'openrc' ]] && vars+=("${initsys}")
|
||||
vars+=("${dist_release}")
|
||||
|
@ -453,6 +440,16 @@ make_torrent(){
|
|||
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(){
|
||||
local timer=$(get_timer)
|
||||
run_safe "make_iso"
|
||||
|
|
|
@ -9,6 +9,38 @@
|
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# 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(){
|
||||
local conf="${modules_dir}/machineid.conf" switch='false'
|
||||
msg2 "Writing %s ..." "${conf##*/}"
|
||||
|
@ -108,7 +140,17 @@ write_services_conf(){
|
|||
write_displaymanager_conf(){
|
||||
local conf="${modules_dir}/displaymanager.conf"
|
||||
msg2 "Writing %s ..." "${conf##*/}"
|
||||
echo "displaymanagers:" > "$conf"
|
||||
echo "---" > "$conf"
|
||||
if ${chrootcfg}; then
|
||||
echo "displaymanagers:" >> "$conf"
|
||||
echo " - lightdm" >> "$conf"
|
||||
echo " - gdm" >> "$conf"
|
||||
echo " - mdm" >> "$conf"
|
||||
echo " - sddm" >> "$conf"
|
||||
echo " - lxdm" >> "$conf"
|
||||
echo " - slim" >> "$conf"
|
||||
else
|
||||
echo "displaymanagers:" >> "$conf"
|
||||
echo " - ${displaymanager}" >> "$conf"
|
||||
echo '' >> "$conf"
|
||||
if $(is_valid_de); then
|
||||
|
@ -116,6 +158,7 @@ write_displaymanager_conf(){
|
|||
echo " executable: \"${default_desktop_executable}\"" >> "$conf"
|
||||
echo " desktopFile: \"${default_desktop_file}\"" >> "$conf"
|
||||
fi
|
||||
fi
|
||||
echo '' >> "$conf"
|
||||
echo "basicSetup: false" >> "$conf"
|
||||
}
|
||||
|
@ -212,12 +255,8 @@ write_mhwdcfg_conf(){
|
|||
echo "driver: free" >> "$conf"
|
||||
fi
|
||||
echo '' >> "$conf"
|
||||
if ${netinstall};then
|
||||
if ${unpackfs};then
|
||||
echo "local: true" >> "$conf"
|
||||
else
|
||||
if ${chrootcfg};then
|
||||
echo "local: false" >> "$conf"
|
||||
fi
|
||||
else
|
||||
echo "local: true" >> "$conf"
|
||||
fi
|
||||
|
@ -241,10 +280,10 @@ write_postcfg_conf(){
|
|||
|
||||
get_yaml(){
|
||||
local args=() ext="yaml" yaml
|
||||
if ${unpackfs};then
|
||||
args+=("hybrid")
|
||||
else
|
||||
if ${chrootcfg};then
|
||||
args+=('netinstall')
|
||||
else
|
||||
args+=("hybrid")
|
||||
fi
|
||||
args+=("${initsys}")
|
||||
[[ ${edition} == 'sonar' ]] && args+=("${edition}")
|
||||
|
@ -288,27 +327,30 @@ write_settings_conf(){
|
|||
echo "modules-search: [ local ]" >> "$conf"
|
||||
echo '' >> "$conf"
|
||||
echo "instances:" >> "$conf"
|
||||
echo '# - id: owncloud' >> "$conf"
|
||||
echo '# module: webview' >> "$conf"
|
||||
echo '# config: owncloud.conf' >> "$conf"
|
||||
echo '' >> "$conf"
|
||||
echo "sequence:" >> "$conf"
|
||||
echo " - show:" >> "$conf"
|
||||
echo " - welcome" >> "$conf"
|
||||
${netinstall} && echo " - netinstall" >> "$conf"
|
||||
echo " - locale" >> "$conf"
|
||||
echo " - keyboard" >> "$conf"
|
||||
echo " - partition" >> "$conf"
|
||||
echo " - users" >> "$conf"
|
||||
${netinstall} && echo " - netinstall" >> "$conf"
|
||||
echo " - summary" >> "$conf"
|
||||
echo " - exec:" >> "$conf"
|
||||
echo " - partition" >> "$conf"
|
||||
echo " - mount" >> "$conf"
|
||||
if ${netinstall};then
|
||||
if ${unpackfs};then
|
||||
if ${chrootcfg}; then
|
||||
echo " - chrootcfg" >> "$conf"
|
||||
echo " - networkcfg" >> "$conf"
|
||||
else
|
||||
echo " - unpackfs" >> "$conf"
|
||||
echo " - networkcfg" >> "$conf"
|
||||
echo " - packages" >> "$conf"
|
||||
else
|
||||
echo " - chrootcfg" >> "$conf"
|
||||
echo " - networkcfg" >> "$conf"
|
||||
fi
|
||||
else
|
||||
echo " - unpackfs" >> "$conf"
|
||||
|
@ -361,8 +403,10 @@ configure_calamares(){
|
|||
|
||||
if ${netinstall};then
|
||||
write_netinstall_conf
|
||||
if ! ${chrootcfg}; then
|
||||
write_packages_conf
|
||||
fi
|
||||
fi
|
||||
|
||||
write_bootloader_conf
|
||||
|
||||
|
@ -394,20 +438,21 @@ configure_calamares(){
|
|||
|
||||
check_yaml(){
|
||||
msg2 "Checking validity [%s] ..." "${1##*/}"
|
||||
local name=${1##*/} data schema
|
||||
local name=${1##*/} data=$1 schema
|
||||
case ${name##*.} in
|
||||
yaml)
|
||||
name=netgroups
|
||||
data=$1
|
||||
# data=$1
|
||||
;;
|
||||
conf)
|
||||
name=${name%.conf}
|
||||
data=${tmp_dir}/$name.yaml
|
||||
cp $1 $data
|
||||
# data=${tmp_dir}/$name.yaml
|
||||
# cp $1 $data
|
||||
;;
|
||||
esac
|
||||
schema=${DATADIR}/schemas/$name.schema.yaml
|
||||
pykwalify -d $data -s $schema
|
||||
# pykwalify -d $data -s $schema
|
||||
kwalify -lf $schema $data
|
||||
}
|
||||
|
||||
write_calamares_yaml(){
|
||||
|
@ -422,7 +467,8 @@ write_calamares_yaml(){
|
|||
|
||||
write_netgroup_yaml(){
|
||||
msg2 "Writing %s ..." "${2##*/}"
|
||||
echo "- name: '$1'" > "$2"
|
||||
echo "---" > "$2"
|
||||
echo "- name: '$1'" >> "$2"
|
||||
echo " description: '$1'" >> "$2"
|
||||
echo " selected: 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
|
||||
die "netinstall only accepts true/false value!"
|
||||
fi
|
||||
if ! is_valid_bool "${unpackfs}";then
|
||||
die "unpackfs only accepts true/false value!"
|
||||
if ! is_valid_bool "${chrootcfg}";then
|
||||
die "chrootcfg only accepts true/false value!"
|
||||
fi
|
||||
if ! is_valid_bool "${geoip}";then
|
||||
die "geoip only accepts true/false value!"
|
||||
fi
|
||||
}
|
||||
|
||||
|
@ -453,9 +456,11 @@ load_profile_config(){
|
|||
|
||||
[[ -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'
|
||||
|
||||
|
@ -473,15 +478,6 @@ get_edition(){
|
|||
echo ${path##*/}
|
||||
}
|
||||
|
||||
is_valid_de(){
|
||||
if [[ ${default_desktop_executable} != "none" ]] && \
|
||||
[[ ${default_desktop_file} != "none" ]]; then
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
reset_profile(){
|
||||
unset displaymanager
|
||||
unset autologin
|
||||
|
@ -507,7 +503,7 @@ reset_profile(){
|
|||
unset tracker_url
|
||||
unset piece_size
|
||||
unset netinstall
|
||||
unset unpackfs
|
||||
unset chrootcfg
|
||||
unset netgroups
|
||||
unset geoip
|
||||
}
|
||||
|
@ -551,8 +547,8 @@ check_profile(){
|
|||
|
||||
[[ -f "${profile_dir}/Packages-Mhwd" ]] && packages_mhwd=${profile_dir}/Packages-Mhwd
|
||||
|
||||
if ! ${netinstall} && ! ${unpackfs};then
|
||||
unpackfs="true"
|
||||
if ! ${netinstall}; then
|
||||
chrootcfg="false"
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue