Browse Source

Добавлены настроки для пактов sys-boot

* grub
* plymouth
* plymouth-calculate-plugin
master
parent
commit
409556a4aa
  1. 7
      merge/README.txt
  2. 1
      merge/sys-boot/.calculate_directory
  3. 1
      merge/sys-boot/grub/.calculate_directory
  4. 1
      merge/sys-boot/grub/background/.calculate_directory
  5. 2
      merge/sys-boot/grub/background/grub-calculate.png
  6. 12
      merge/sys-boot/grub/default.grub
  7. 1
      merge/sys-boot/grub/grub.d/.calculate_directory
  8. 1
      merge/sys-boot/grub/grub.d/00_header
  9. 21
      merge/sys-boot/grub/grub.d/05_theme
  10. 16
      merge/sys-boot/grub/grub.d/07_passwd
  11. 1
      merge/sys-boot/grub/grub.d/07_passwd.remove
  12. 10
      merge/sys-boot/grub/grub.d/10_linux
  13. 9
      merge/sys-boot/grub/grub.d/30_os-prober
  14. 1
      merge/sys-boot/plymouth-calculate-plugin/.calculate_directory
  15. 2
      merge/sys-boot/plymouth-calculate-plugin/.shutdown.md5.remove
  16. 2
      merge/sys-boot/plymouth-calculate-plugin/.shutdown.png
  17. 1
      merge/sys-boot/plymouth-calculate-plugin/.shutdown.png.remove
  18. 1
      merge/sys-boot/plymouth-calculate-plugin/.shutdown.remove/.calculate_directory
  19. 1
      merge/sys-boot/plymouth-calculate-plugin/.shutdown/.calculate_directory
  20. 33
      merge/sys-boot/plymouth-calculate-plugin/.shutdown/0-images
  21. 1
      merge/sys-boot/plymouth-calculate-plugin/boot.md5.remove
  22. 2
      merge/sys-boot/plymouth-calculate-plugin/boot.png
  23. 1
      merge/sys-boot/plymouth-calculate-plugin/boot.png.remove
  24. 1
      merge/sys-boot/plymouth-calculate-plugin/boot.remove/.calculate_directory
  25. 1
      merge/sys-boot/plymouth-calculate-plugin/boot/.calculate_directory
  26. 33
      merge/sys-boot/plymouth-calculate-plugin/boot/0-images
  27. 45
      merge/sys-boot/plymouth-calculate-plugin/calculate.plymouth
  28. 1
      merge/sys-boot/plymouth/.calculate_directory
  29. 10
      merge/sys-boot/plymouth/plymouthd.defaults

7
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, учесть возможность того, что останутся устаревшие версии

1
merge/sys-boot/.calculate_directory

@ -0,0 +1 @@
{% calculate append = 'skip' %}

1
merge/sys-boot/grub/.calculate_directory

@ -0,0 +1 @@
{% calcualte path='/boot', name='grub', package='sys-boot/grub:2' %}

1
merge/sys-boot/grub/background/.calculate_directory

@ -0,0 +1 @@
{% calculate append=skip, main.cl.chroot_status %}

2
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

12
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"

1
merge/sys-boot/grub/grub.d/.calculate_directory

@ -0,0 +1 @@
{% calculate path='/etc' %}

1
merge/sys-boot/grub/grub.d/00_header

@ -0,0 +1 @@
{% calculate format='regex', chmod='755', comment='#', autoupdate %}

21
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 <<EOF
{% if custom.theme.grub.background and exists(custom.theme.grub.background) %}
set color_normal={{ custom.theme.grub.gfx.text.color }}
set color_highlight={{ custom.theme.grub.gfx.text.highlight.color }}
{% else %}
set color_normal={{ custom.theme.grub.text.color }}
set color_highlight={{ custom.theme.grub.text.highlight.color }}
{% endif %}
EOF
fi

16
merge/sys-boot/grub/grub.d/07_passwd

@ -0,0 +1,16 @@
{% calculate comment='#', chmod='700', not main.cl.chroot_status and install.cl.grub.pwd, unbound %}
#!/bin/sh
# 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
cat <<EOF
set superusers="root"
password_pbkdf2 root {{ install.cl.grub.pwd }}
export superusers
EOF

1
merge/sys-boot/grub/grub.d/07_passwd.remove

@ -0,0 +1 @@
{% calculate append='remove', name='07_passwd', not install.cl.grub.pwd or main.cl.chroot_status %}

10
merge/sys-boot/grub/grub.d/10_linux

@ -0,0 +1,10 @@
{% calculate chmod='755', format='regex', multiline, comment='#', autoupdate %}
<reg>(replacement_title=.*?Advanced options.*?)g'\)"</reg>
<text>\1g') ..."</text>
<reg>("submenu '.*?Advanced options for.*?grub_quote\))'</reg>
<text>\1 ...'</text>
<reg>(menuentry .*?\)') (\$\{CLASS\})</reg>
<text>\1 --unrestricted \2</text>
<reg>(submenu.*? ...') (\\\$menu)</reg>
<text>\1 --unrestricted \2</text>

9
merge/sys-boot/grub/grub.d/30_os-prober

@ -0,0 +1,9 @@
{% calculate chmod='755', format='regex', multiline, comment='#', autoupdate %}
<reg>(replacement_title=.*?Advanced options.*?)g'\)"</reg>
<text>\1g') ..."</text>
<reg>("submenu '.*?Advanced options for.*?grub_quote\))'</reg>
<text>\1 ...'</text>
<reg>(menuentry .*?\)') (\$CLASS|--class)</reg>
<text>\1 --unrestricted \2</text>
<reg>(submenu .*?...') (\\\$menuentry)</reg>
<text>\1 --unrestricted \2</text>

1
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' %}

2
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'))) %}

2
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

1
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'))) %}

1
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)) %}

1
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) %}

33
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 %}

1
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')) %}

2
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

1
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')) %}

1
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) %}

1
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) %}

33
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 %}

45
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

1
merge/sys-boot/plymouth/.calculate_directory

@ -0,0 +1 @@
{% calculate append='skip', package='sys-boot/plymouth' %}

10
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
Loading…
Cancel
Save