diff --git a/merge/README.txt b/merge/README.txt index 1d0a811..70ebc0f 100644 --- a/merge/README.txt +++ b/merge/README.txt @@ -45,3 +45,10 @@ merge/sys-apps/portage/syncmodule/calculate содержит код, котор Изучить условие subgid sys-apps/shadow (они одинаковые для subuid и subgid) Из sys-apps/calculate-utils удалены все шаблоны исправляющие код утилит 3.X + +--- Заметки по шаблонам --- +Нужно проверить обрабатываются ли format='regex' с пустым содержимым +Обрабатывается ли корректно параметр name='' + +---Учесть при внедрении--- +Удалены шаблоны для plymouth 0.9.4, учесть возможность того, что останутся устаревшие версии diff --git a/merge/sys-boot/.calculate_directory b/merge/sys-boot/.calculate_directory new file mode 100644 index 0000000..8e3df7f --- /dev/null +++ b/merge/sys-boot/.calculate_directory @@ -0,0 +1 @@ +{% calculate append = 'skip' %} diff --git a/merge/sys-boot/grub/.calculate_directory b/merge/sys-boot/grub/.calculate_directory new file mode 100644 index 0000000..8597ff4 --- /dev/null +++ b/merge/sys-boot/grub/.calculate_directory @@ -0,0 +1 @@ +{% calcualte path='/boot', name='grub', package='sys-boot/grub:2' %} diff --git a/merge/sys-boot/grub/background/.calculate_directory b/merge/sys-boot/grub/background/.calculate_directory new file mode 100644 index 0000000..1cc6641 --- /dev/null +++ b/merge/sys-boot/grub/background/.calculate_directory @@ -0,0 +1 @@ +{% calculate append=skip, main.cl.chroot_status %} diff --git a/merge/sys-boot/grub/background/grub-calculate.png b/merge/sys-boot/grub/background/grub-calculate.png new file mode 100644 index 0000000..3a89251 --- /dev/null +++ b/merge/sys-boot/grub/background/grub-calculate.png @@ -0,0 +1,2 @@ +{% calculate format='backgrounds', convert='png', stretch, path='/boot/grub', name='grub-calculate.png', source=custom.theme.grub.background, pkg('media-gfx/imagemagick) or pkg(media-gfx/graphicsmagick), mirror %} +1920x1080 diff --git a/merge/sys-boot/grub/default.grub b/merge/sys-boot/grub/default.grub new file mode 100644 index 0000000..9767282 --- /dev/null +++ b/merge/sys-boot/grub/default.grub @@ -0,0 +1,12 @@ +{% calculate format='openrc', path='/etc/default', name='grub' %} +GRUB_DISABLE_RECOVERY=true +GRUB_DEFAULT=saved +GRUB_TIMEOUT=2 +!GRUB_TERMINAL=del +GRUB_GFXMODE="1024x768" +GRUB_BACKGROUND="/boot/grub/grub-calculate.png" +GRUB_COLOR_NORMAL="white/black" +GRUB_COLOR_HIGHLIGHT="magenta/black" +!GRUB_VIDEO_BACKEND=del +GRUB_GFXPAYLOAD_LINUX=keep +GRUB_FONT="/usr/share/grub/unicode.pf2" diff --git a/merge/sys-boot/grub/grub.d/.calculate_directory b/merge/sys-boot/grub/grub.d/.calculate_directory new file mode 100644 index 0000000..208fa70 --- /dev/null +++ b/merge/sys-boot/grub/grub.d/.calculate_directory @@ -0,0 +1 @@ +{% calculate path='/etc' %} diff --git a/merge/sys-boot/grub/grub.d/00_header b/merge/sys-boot/grub/grub.d/00_header new file mode 100644 index 0000000..8a8869a --- /dev/null +++ b/merge/sys-boot/grub/grub.d/00_header @@ -0,0 +1 @@ +{% calculate format='regex', chmod='755', comment='#', autoupdate %} diff --git a/merge/sys-boot/grub/grub.d/05_theme b/merge/sys-boot/grub/grub.d/05_theme new file mode 100644 index 0000000..80d027e --- /dev/null +++ b/merge/sys-boot/grub/grub.d/05_theme @@ -0,0 +1,21 @@ +{% calculate comment='#', chmod='755' %} +# grub-mkconfig helper script. +# Copyright 2016 Calculate Ltd. http://www.calculate-linux.org +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 + +if [ "x$GRUB_TERMINAL_OUTPUT" != xconsole ]; then + cat <(replacement_title=.*?Advanced options.*?)g'\)" +\1g') ..." +("submenu '.*?Advanced options for.*?grub_quote\))' +\1 ...' +(menuentry .*?\)') (\$\{CLASS\}) +\1 --unrestricted \2 +(submenu.*? ...') (\\\$menu) +\1 --unrestricted \2 + diff --git a/merge/sys-boot/grub/grub.d/30_os-prober b/merge/sys-boot/grub/grub.d/30_os-prober new file mode 100644 index 0000000..197998d --- /dev/null +++ b/merge/sys-boot/grub/grub.d/30_os-prober @@ -0,0 +1,9 @@ +{% calculate chmod='755', format='regex', multiline, comment='#', autoupdate %} +(replacement_title=.*?Advanced options.*?)g'\)" +\1g') ..." +("submenu '.*?Advanced options for.*?grub_quote\))' +\1 ...' +(menuentry .*?\)') (\$CLASS|--class) +\1 --unrestricted \2 +(submenu .*?...') (\\\$menuentry) +\1 --unrestricted \2 diff --git a/merge/sys-boot/plymouth-calculate-plugin/.calculate_directory b/merge/sys-boot/plymouth-calculate-plugin/.calculate_directory new file mode 100644 index 0000000..1b476bd --- /dev/null +++ b/merge/sys-boot/plymouth-calculate-plugin/.calculate_directory @@ -0,0 +1 @@ +{% calculate path='/usr/share/plymouth/themes', name='calculate', package='sys-boot/plymouth-calculate-plugin' %} diff --git a/merge/sys-boot/plymouth-calculate-plugin/.shutdown.md5.remove b/merge/sys-boot/plymouth-calculate-plugin/.shutdown.md5.remove new file mode 100644 index 0000000..12d0ddd --- /dev/null +++ b/merge/sys-boot/plymouth-calculate-plugin/.shutdown.md5.remove @@ -0,0 +1,2 @@ +{% calculate append='remove', name='.shutdown.md5', not(custom.theme.splash.shutdown.type == 'logo' and custom.theme.splash.shutdown.picture and exists(custom.theme.splash.shutdown.picture) and (pkg('media-gfx/imagemagick') or pkg('media-gfx/graphicsmagick'))) %} + diff --git a/merge/sys-boot/plymouth-calculate-plugin/.shutdown.png b/merge/sys-boot/plymouth-calculate-plugin/.shutdown.png new file mode 100644 index 0000000..5e101f2 --- /dev/null +++ b/merge/sys-boot/plymouth-calculate-plugin/.shutdown.png @@ -0,0 +1,2 @@ +{% calculate format='backgrounds', stretch, convert='png', custom.theme.splash.shutdown.type == 'logo' and custom.theme.splash.shutdown.picture and exists(custom.theme.splash.shutdown.picture) and (pkg('media-gfx/imagemagick') or pkg('media-gfx/graphicsmagick')), source=custom.theme.splash.shutdown.picture, mirror %} +original diff --git a/merge/sys-boot/plymouth-calculate-plugin/.shutdown.png.remove b/merge/sys-boot/plymouth-calculate-plugin/.shutdown.png.remove new file mode 100644 index 0000000..0f4dd74 --- /dev/null +++ b/merge/sys-boot/plymouth-calculate-plugin/.shutdown.png.remove @@ -0,0 +1 @@ +{% calculate append='remove', name='.shutdown.png', not(custom.theme.splash.shutdown.type == 'logo' and custom.theme.splash.shutdown.picture and exists(custom.theme.splash.shutdown.picture) and (pkg('media-gfx/imagemagick') or pkg('media-gfx/graphicsmagick'))) %} diff --git a/merge/sys-boot/plymouth-calculate-plugin/.shutdown.remove/.calculate_directory b/merge/sys-boot/plymouth-calculate-plugin/.shutdown.remove/.calculate_directory new file mode 100644 index 0000000..1090dda --- /dev/null +++ b/merge/sys-boot/plymouth-calculate-plugin/.shutdown.remove/.calculate_directory @@ -0,0 +1 @@ +{% calculate not (custom.theme.splash.shutdown.type == 'background' and custom.theme.splash.shutdown.picture and exists(custom.theme.splash.shutdown.picture)) %} diff --git a/merge/sys-boot/plymouth-calculate-plugin/.shutdown/.calculate_directory b/merge/sys-boot/plymouth-calculate-plugin/.shutdown/.calculate_directory new file mode 100644 index 0000000..d8b0bb9 --- /dev/null +++ b/merge/sys-boot/plymouth-calculate-plugin/.shutdown/.calculate_directory @@ -0,0 +1 @@ +{% calculate custom.theme.splash.shutdown.type == 'background' and custom.theme.splash.shutdown.picture and exists(custom.theme.splash.shutdown.picture) %} diff --git a/merge/sys-boot/plymouth-calculate-plugin/.shutdown/0-images b/merge/sys-boot/plymouth-calculate-plugin/.shutdown/0-images new file mode 100644 index 0000000..329072e --- /dev/null +++ b/merge/sys-boot/plymouth-calculate-plugin/.shutdown/0-images @@ -0,0 +1,33 @@ +{% calculate format='background', convert='png', stretch, name='', source=custom.theme.splash.shutdown.picture mirror exists(custom.theme.splash.shutdown.picture) %} +{% main.cl.chroot_status %} +1024x768 +640x480 +800x480 +800x600 +1024x576 +1024x600 +1200x800 +1280x800 +1280x720 +1280x768 +1280x1024 +1360x768 +1366x768 +1368x768 +1400x1050 +1440x900 +1680x945 +1680x1050 +1920x1080 +1920x1200 +1600x768 +1600x900 +1600x1200 +2048x1152 +2560x1440 +2560x1600 +{% else %} +{{ install.os.resolution.framebuffer|cut(0,'-') }} +{{ install.os.resolution.x11 }} +1024x768 +{% endif %} diff --git a/merge/sys-boot/plymouth-calculate-plugin/boot.md5.remove b/merge/sys-boot/plymouth-calculate-plugin/boot.md5.remove new file mode 100644 index 0000000..c4ae2ec --- /dev/null +++ b/merge/sys-boot/plymouth-calculate-plugin/boot.md5.remove @@ -0,0 +1 @@ +{% calculate append='remove', name='boot.md5', custom.theme.splash.silent.type != 'logo' or not custom.theme.splash.silent.picture or not exists(custom.theme.splash.silent.picture) or not (pkg('media-gfx/imagemagick') or pkg('media-gfx/graphicsmagick')) %} diff --git a/merge/sys-boot/plymouth-calculate-plugin/boot.png b/merge/sys-boot/plymouth-calculate-plugin/boot.png new file mode 100644 index 0000000..d84ac3b --- /dev/null +++ b/merge/sys-boot/plymouth-calculate-plugin/boot.png @@ -0,0 +1,2 @@ +{% calculate format='backgrounds', stretch, convert='png', custom.theme.splash.silent.type == 'logo' and custom.theme.splash.silent.picture and exists(custom.theme.splash.silent.picture) and (pkg('media-gfx/imagemagick') or pkg('media-gfx/graphicsmagick')), source=custom.theme.splash.silent.picture, mirror %} +original diff --git a/merge/sys-boot/plymouth-calculate-plugin/boot.png.remove b/merge/sys-boot/plymouth-calculate-plugin/boot.png.remove new file mode 100644 index 0000000..e40ea2c --- /dev/null +++ b/merge/sys-boot/plymouth-calculate-plugin/boot.png.remove @@ -0,0 +1 @@ +{% calculate append='remove', name='boot.png', custom.theme.splash.silent.type != 'logo' or not custom.theme.splash.silent.picture or not exists(custom.theme.splash.silent.picture) or not (pkg('media-gfx/imagemagick') or pkg('media-gfx/graphicsmagick')) %} diff --git a/merge/sys-boot/plymouth-calculate-plugin/boot.remove/.calculate_directory b/merge/sys-boot/plymouth-calculate-plugin/boot.remove/.calculate_directory new file mode 100644 index 0000000..c11f0c5 --- /dev/null +++ b/merge/sys-boot/plymouth-calculate-plugin/boot.remove/.calculate_directory @@ -0,0 +1 @@ +{% calculate append='remove', name='boot', custom.theme.splash.silent.type != 'background' or custom.theme.splash.silent.picture or not exists(custom.theme.splash.silent.picture) %} diff --git a/merge/sys-boot/plymouth-calculate-plugin/boot/.calculate_directory b/merge/sys-boot/plymouth-calculate-plugin/boot/.calculate_directory new file mode 100644 index 0000000..fb1f52c --- /dev/null +++ b/merge/sys-boot/plymouth-calculate-plugin/boot/.calculate_directory @@ -0,0 +1 @@ +{% calculate custom.theme.splash.silent.type == 'background' and custom.theme.splash.silent.picture and exists(custom.theme.splash.silent.picture) %} diff --git a/merge/sys-boot/plymouth-calculate-plugin/boot/0-images b/merge/sys-boot/plymouth-calculate-plugin/boot/0-images new file mode 100644 index 0000000..2208978 --- /dev/null +++ b/merge/sys-boot/plymouth-calculate-plugin/boot/0-images @@ -0,0 +1,33 @@ +{% calculate format='backgrounds', convert='png', stretch, name='', source=custom.theme.splash.silent.picture, mirror, exists(custom.theme.splash.silent.picture) %} +{% if main.cl.chroot_status %} +1024x768 +640x480 +800x480 +800x600 +1024x576 +1024x600 +1200x800 +1280x800 +1280x720 +1280x768 +1280x1024 +1360x768 +1366x768 +1368x768 +1400x1050 +1440x900 +1680x945 +1680x1050 +1920x1080 +1920x1200 +1600x768 +1600x900 +1600x1200 +2048x1152 +2560x1440 +2560x1600 +{% else %} +{{ install.os.resolution.framebuffer|cut(0,'-') }} +{{ install.os.resolution.x11 }} +1024x768 +{% endif %} diff --git a/merge/sys-boot/plymouth-calculate-plugin/calculate.plymouth b/merge/sys-boot/plymouth-calculate-plugin/calculate.plymouth new file mode 100644 index 0000000..afa3354 --- /dev/null +++ b/merge/sys-boot/plymouth-calculate-plugin/calculate.plymouth @@ -0,0 +1,45 @@ +{% calculate format='kde', path='/usr/share/plymouth/themes/calculate', pkg('sys-boot/plymouth-calculate-plugin') >= '0.9.5' %} +[Plymouth Theme] +Name=Calculate +Description=Calculate spinner theme +ModuleName=calculate + +[calculate] +ImageDir=/usr/share/plymouth/themes/calculate + +[boot-up] +BackgroundStartColor=0x{{ custom.theme.splash.silent.background.color.begin }} +BackgroundEndColor=0x{{ custom.theme.splash.silent.background.color.end }} +{% if custom.theme.splash.silent.picture and custom.theme.splash.silent.type == 'background' %} +WatermarkImage=/usr/share/plymouth/themes/calculate/boot +{% elif custom.theme.splash.silent.picture and custom.theme.splash.silent.type == 'logo' %} +WatermarkImage=/usr/share/plymouth/themes/calculate/boot.png +{% else %} +!WatermarkImage +{% endif %} + +[shutdown] +BackgroundStartColor=0x{{ custom.theme.splash.shutdown.background.color.begin }} +BackgroundEndColor=0x{{ custom.theme.splash.shutdown.background.color.begin }} +{% if custom.theme.splash.shutdown.picture and custom.theme.splash.shutdown.type == 'background' %} +WatermarkImage=/usr/share/plymouth/themes/calculate/.shutdown +{% elif custom.theme.splash.shutdown.picture and custom.theme.splash.shutdown.type == 'logo' %} +WatermarkImage=/usr/share/plymouth/themes/calculate/.shutdown.png +{% else %} +!WatermarkImage= +{% endif %} +TitleColor=0x{{ custom.theme.splash.shutdown.text.color }} +Title=S h u t t i n g d o w n + +[reboot] +BackgroundStartColor=0x{{ custom.theme.splash.shutdown.background.color.begin }} +BackgroundEndColor=0x{{ custom.theme.splash.shutdown.background.color.begin }} +{% if custom.theme.splash.shutdown.picture and custom.theme.splash.shutdown.type == 'background' %} +WatermarkImage=/usr/share/plymouth/themes/calculate/.shutdown +{% elif custom.theme.splash.shutdown.picture and custom.theme.splash.shutdown.type == 'logo' %} +WatermarkImage=/usr/share/plymouth/themes/calculate/.shutdown.png +{% else %} +!WatermarkImage= +{% endif %} +TitleColor=0x{{ custom.theme.splash.shutdown.text.color }} +Title=S h u t t i n g d o w n diff --git a/merge/sys-boot/plymouth/.calculate_directory b/merge/sys-boot/plymouth/.calculate_directory new file mode 100644 index 0000000..c57b3f8 --- /dev/null +++ b/merge/sys-boot/plymouth/.calculate_directory @@ -0,0 +1 @@ +{% calculate append='skip', package='sys-boot/plymouth' %} diff --git a/merge/sys-boot/plymouth/plymouthd.defaults b/merge/sys-boot/plymouth/plymouthd.defaults new file mode 100644 index 0000000..14a6d88 --- /dev/null +++ b/merge/sys-boot/plymouth/plymouthd.defaults @@ -0,0 +1,10 @@ +{% calculate format='kde', path='/usr/share/plymouth' %} +[Daemon] +{% if pkg('sys-boot/plymouth-calculate-plugin') %} +Theme=calculate +{% else %} +Theme=spinner +{% endif %} +ShowDelay=1 +FBDeviceTimeout=3 +DeviceTimeout=20