Compare commits

...

7 Commits

@ -1,27 +1,28 @@
From 18fcf71d53a8c476c55076f8a0e8db0904a51670 Mon Sep 17 00:00:00 2001 From 0d80cd00f38b0d8be0070b8db92066e070687528 Mon Sep 17 00:00:00 2001
From: Eugene Zamriy <evgeniy.zamriy@softline.com> From: Eugene Zamriy <evgeniy.zamriy@softline.com>
Date: Fri, 28 Jul 2023 23:47:23 +0300 Date: Fri, 28 Jul 2023 23:47:23 +0300
Subject: [PATCH 04/15] Add Minimal and Server repository support Subject: [PATCH 4/4] Add Minimal and Server repository support
--- ---
pyanaconda/core/constants.py | 4 +++- pyanaconda/core/constants.py | 5 ++++-
1 file changed, 3 insertions(+), 1 deletion(-) 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/pyanaconda/core/constants.py b/pyanaconda/core/constants.py diff --git a/pyanaconda/core/constants.py b/pyanaconda/core/constants.py
index 1496f8c..72a9d39 100644 index 1496f8c..e8c79b8 100644
--- a/pyanaconda/core/constants.py --- a/pyanaconda/core/constants.py
+++ b/pyanaconda/core/constants.py +++ b/pyanaconda/core/constants.py
@@ -58,7 +58,9 @@ DEFAULT_REPOS = [productName.split('-')[0].lower(), @@ -58,7 +58,10 @@ DEFAULT_REPOS = [productName.split('-')[0].lower(),
"fedora-modular-server", "fedora-modular-server",
"rawhide", "rawhide",
"BaseOS", # Used by RHEL "BaseOS", # Used by RHEL
- "baseos"] # Used by CentOS Stream - "baseos"] # Used by CentOS Stream
+ "baseos", # Used by CentOS Stream + "baseos", # Used by CentOS Stream
+ "Server", # Used by MSVSphere + "Server", # Used by MSVSphere
+ "Certified", # Used by MSVSphere Certified
+ "Minimal"] # Used by MSVSphere + "Minimal"] # Used by MSVSphere
DBUS_ANACONDA_SESSION_ADDRESS = "DBUS_ANACONDA_SESSION_BUS_ADDRESS" DBUS_ANACONDA_SESSION_ADDRESS = "DBUS_ANACONDA_SESSION_BUS_ADDRESS"
-- --
2.44.0 2.46.0

@ -1,19 +1,19 @@
From b0fe2c954cbab7d9e963a71efa6be2e9b310ab3d Mon Sep 17 00:00:00 2001 From ddec23a420f03e2519bba9b0aba24b401ee0c409 Mon Sep 17 00:00:00 2001
From: tigro <tigro@msvsphere-os.ru> From: tigro <tigro@msvsphere-os.ru>
Date: Wed, 3 Apr 2024 10:11:15 +0300 Date: Wed, 3 Apr 2024 10:11:15 +0300
Subject: [PATCH] Add MSVSphere identification support Subject: [PATCH 11/11] Add MSVSphere identification support
--- ---
data/liveinst/gnome/fedora-welcome.desktop | 4 +- data/liveinst/gnome/fedora-welcome.desktop | 4 +-
data/liveinst/gnome/fedora-welcome.js | 2 +- data/liveinst/gnome/fedora-welcome.js | 2 +-
po/ru.po | 216 ++++++++++++++---- po/ru.po | 238 ++++++++++++++----
pyanaconda/product.py | 36 ++- pyanaconda/product.py | 40 ++-
.../ui/gui/spokes/installation_progress.py | 8 +- .../ui/gui/spokes/installation_progress.py | 8 +-
pyanaconda/ui/gui/spokes/lib/accordion.py | 2 +- pyanaconda/ui/gui/spokes/lib/accordion.py | 2 +-
.../ui/gui/spokes/lib/storage_dialogs.py | 4 +- .../ui/gui/spokes/lib/storage_dialogs.py | 4 +-
pyanaconda/ui/gui/spokes/welcome.py | 21 +- pyanaconda/ui/gui/spokes/welcome.py | 23 +-
pyanaconda/vnc.py | 42 +++- pyanaconda/vnc.py | 47 +++-
9 files changed, 273 insertions(+), 62 deletions(-) 9 files changed, 305 insertions(+), 63 deletions(-)
diff --git a/data/liveinst/gnome/fedora-welcome.desktop b/data/liveinst/gnome/fedora-welcome.desktop diff --git a/data/liveinst/gnome/fedora-welcome.desktop b/data/liveinst/gnome/fedora-welcome.desktop
index 90f5678..8ca72a7 100644 index 90f5678..8ca72a7 100644
@ -29,7 +29,7 @@ index 90f5678..8ca72a7 100644
Terminal=false Terminal=false
Type=Application Type=Application
diff --git a/data/liveinst/gnome/fedora-welcome.js b/data/liveinst/gnome/fedora-welcome.js diff --git a/data/liveinst/gnome/fedora-welcome.js b/data/liveinst/gnome/fedora-welcome.js
index 4c0a66a..e313403 100755 index 4c0a66a..0a494c8 100755
--- a/data/liveinst/gnome/fedora-welcome.js --- a/data/liveinst/gnome/fedora-welcome.js
+++ b/data/liveinst/gnome/fedora-welcome.js +++ b/data/liveinst/gnome/fedora-welcome.js
@@ -62,7 +62,7 @@ const WelcomeWindow = new Lang.Class({ @@ -62,7 +62,7 @@ const WelcomeWindow = new Lang.Class({
@ -42,10 +42,10 @@ index 4c0a66a..e313403 100755
this.window.connect('key-press-event', Lang.bind(this, this.window.connect('key-press-event', Lang.bind(this,
function(w, event) { function(w, event) {
diff --git a/po/ru.po b/po/ru.po diff --git a/po/ru.po b/po/ru.po
index 1edb03d..1f8915b 100644 index 1edb03d..4742180 100644
--- a/po/ru.po --- a/po/ru.po
+++ b/po/ru.po +++ b/po/ru.po
@@ -197,7 +197,37 @@ msgstr "Выбор корня" @@ -197,7 +197,42 @@ msgstr "Выбор корня"
msgid "The following installations were discovered on your system." msgid "The following installations were discovered on your system."
msgstr "В вашей системе обнаружены следующие установки." msgstr "В вашей системе обнаружены следующие установки."
@ -57,34 +57,39 @@ index 1edb03d..1f8915b 100644
+ +
+#: pyanaconda/product.py:85 +#: pyanaconda/product.py:85
+#, python-format +#, python-format
+msgid "MSVSphere %(productVersion)s Certified INSTALLATION"
+msgstr "УСТАНОВКА МСВСфера %(productVersion)s Сертифицированная"
+
+#: pyanaconda/product.py:87
+#, python-format
+msgid "MSVSphere %(productVersion)s ARM INSTALLATION" +msgid "MSVSphere %(productVersion)s ARM INSTALLATION"
+msgstr "УСТАНОВКА МСВСфера %(productVersion)s АРМ" +msgstr "УСТАНОВКА МСВСфера %(productVersion)s АРМ"
+ +
+#: pyanaconda/product.py:87 +#: pyanaconda/product.py:89
+#, python-format +#, python-format
+msgid "MSVSphere %(productVersion)s Cinnamon INSTALLATION" +msgid "MSVSphere %(productVersion)s Cinnamon INSTALLATION"
+msgstr "УСТАНОВКА МСВСфера %(productVersion)s Cinnamon" +msgstr "УСТАНОВКА МСВСфера %(productVersion)s Cinnamon"
+ +
+#: pyanaconda/product.py:89 +#: pyanaconda/product.py:91
+#, python-format +#, python-format
+msgid "MSVSphere %(productVersion)s KDE INSTALLATION" +msgid "MSVSphere %(productVersion)s KDE INSTALLATION"
+msgstr "УСТАНОВКА МСВСфера %(productVersion)s KDE" +msgstr "УСТАНОВКА МСВСфера %(productVersion)s KDE"
+ +
+#: pyanaconda/product.py:91 +#: pyanaconda/product.py:93
+#, python-format +#, python-format
+msgid "MSVSphere %(productVersion)s XFCE INSTALLATION" +msgid "MSVSphere %(productVersion)s XFCE INSTALLATION"
+msgstr "УСТАНОВКА МСВСфера %(productVersion)s XFCE" +msgstr "УСТАНОВКА МСВСфера %(productVersion)s XFCE"
+ +
+#: pyanaconda/product.py:93 +#: pyanaconda/product.py:95
+#, python-format +#, python-format
+msgid "MSVSphere %(productVersion)s OS INSTALLATION" +msgid "MSVSphere %(productVersion)s OS INSTALLATION"
+msgstr "УСТАНОВКА МСВСфера %(productVersion)s ОС" +msgstr "УСТАНОВКА МСВСфера %(productVersion)s ОС"
+ +
+#: pyanaconda/product.py:95 +#: pyanaconda/product.py:97
#, python-format #, python-format
msgid "%(productName)s %(productVersion)s INSTALLATION" msgid "%(productName)s %(productVersion)s INSTALLATION"
msgstr "УСТАНОВКА %(productName)s %(productVersion)s" msgstr "УСТАНОВКА %(productName)s %(productVersion)s"
@@ -288,31 +318,91 @@ msgstr "Сервера NTP:" @@ -288,31 +323,101 @@ msgstr "Сервера NTP:"
msgid "not configured" msgid "not configured"
msgstr "не настроено" msgstr "не настроено"
@ -96,66 +101,76 @@ index 1edb03d..1f8915b 100644
+ +
+#: pyanaconda/vnc.py:83 +#: pyanaconda/vnc.py:83
+#, python-format +#, python-format
+msgid "MSVSphere %(productVersion)s Certified installation"
+msgstr "Установка МСВСфера %(productVersion)s Сертифицированная"
+
+#: pyanaconda/vnc.py:85
+#, python-format
+msgid "MSVSphere %(productVersion)s ARM installation" +msgid "MSVSphere %(productVersion)s ARM installation"
+msgstr "Установка МСВСфера %(productVersion)s АРМ" +msgstr "Установка МСВСфера %(productVersion)s АРМ"
+ +
+#: pyanaconda/vnc.py:85 +#: pyanaconda/vnc.py:87
+#, python-format +#, python-format
+msgid "MSVSphere %(productVersion)s Cinnamon installation" +msgid "MSVSphere %(productVersion)s Cinnamon installation"
+msgstr "Установка МСВСфера %(productVersion)s Cinnamon" +msgstr "Установка МСВСфера %(productVersion)s Cinnamon"
+ +
+#: pyanaconda/vnc.py:87 +#: pyanaconda/vnc.py:89
+#, python-format +#, python-format
+msgid "MSVSphere %(productVersion)s KDE installation" +msgid "MSVSphere %(productVersion)s KDE installation"
+msgstr "Установка МСВСфера %(productVersion)s KDE" +msgstr "Установка МСВСфера %(productVersion)s KDE"
+ +
+#: pyanaconda/vnc.py:89 +#: pyanaconda/vnc.py:91
+#, python-format +#, python-format
+msgid "MSVSphere %(productVersion)s XFCE installation" +msgid "MSVSphere %(productVersion)s XFCE installation"
+msgstr "Установка МСВСфера %(productVersion)s XFCE" +msgstr "Установка МСВСфера %(productVersion)s XFCE"
+ +
+#: pyanaconda/vnc.py:91 +#: pyanaconda/vnc.py:93
+#, python-format +#, python-format
+msgid "MSVSphere %(productVersion)s OS installation" +msgid "MSVSphere %(productVersion)s OS installation"
+msgstr "Установка МСВСфера %(productVersion)s ОС" +msgstr "Установка МСВСфера %(productVersion)s ОС"
+ +
+#: pyanaconda/vnc.py:93 +#: pyanaconda/vnc.py:95
#, python-format #, python-format
msgid "%(productName)s %(productVersion)s installation" msgid "%(productName)s %(productVersion)s installation"
msgstr "Установка %(productName)s %(productVersion)s" msgstr "Установка %(productName)s %(productVersion)s"
-#: pyanaconda/vnc.py:148 -#: pyanaconda/vnc.py:148
+#: pyanaconda/vnc.py:159 +#: pyanaconda/vnc.py:167
+#, python-format +#, python-format
+msgid "MSVSphere %(productVersion)s Server installation on host %(name)s" +msgid "MSVSphere %(productVersion)s Server installation on host %(name)s"
+msgstr "Установка МСВСфера %(productVersion)s Сервер на %(name)s" +msgstr "Установка МСВСфера %(productVersion)s Сервер на %(name)s"
+ +
+#: pyanaconda/vnc.py:162 +#: pyanaconda/vnc.py:170
+#, python-format
+msgid "MSVSphere %(productVersion)s Certified installation on host %(name)s"
+msgstr "Установка МСВСфера %(productVersion)s Сертифицированная на %(name)s"
+
+#: pyanaconda/vnc.py:173
+#, python-format +#, python-format
+msgid "MSVSphere %(productVersion)s ARM installation on host %(name)s" +msgid "MSVSphere %(productVersion)s ARM installation on host %(name)s"
+msgstr "Установка МСВСфера %(productVersion)s АРМ на %(name)s" +msgstr "Установка МСВСфера %(productVersion)s АРМ на %(name)s"
+ +
+#: pyanaconda/vnc.py:162 +#: pyanaconda/vnc.py:176
+#, python-format +#, python-format
+msgid "MSVSphere %(productVersion)s Cinnamon installation on host %(name)s" +msgid "MSVSphere %(productVersion)s Cinnamon installation on host %(name)s"
+msgstr "Установка МСВСфера %(productVersion)s Cinnamon на %(name)s" +msgstr "Установка МСВСфера %(productVersion)s Cinnamon на %(name)s"
+ +
+#: pyanaconda/vnc.py:162 +#: pyanaconda/vnc.py:179
+#, python-format +#, python-format
+msgid "MSVSphere %(productVersion)s KDE installation on host %(name)s" +msgid "MSVSphere %(productVersion)s KDE installation on host %(name)s"
+msgstr "Установка МСВСфера %(productVersion)s KDE на %(name)s" +msgstr "Установка МСВСфера %(productVersion)s KDE на %(name)s"
+ +
+#: pyanaconda/vnc.py:162 +#: pyanaconda/vnc.py:182
+#, python-format +#, python-format
+msgid "MSVSphere %(productVersion)s XFCE installation on host %(name)s" +msgid "MSVSphere %(productVersion)s XFCE installation on host %(name)s"
+msgstr "Установка МСВСфера %(productVersion)s XFCE на %(name)s" +msgstr "Установка МСВСфера %(productVersion)s XFCE на %(name)s"
+ +
+#: pyanaconda/vnc.py:165 +#: pyanaconda/vnc.py:185
+#, python-format +#, python-format
+msgid "MSVSphere %(productVersion)s OS installation on host %(name)s" +msgid "MSVSphere %(productVersion)s OS installation on host %(name)s"
+msgstr "Установка МСВСфера %(productVersion)s ОС на %(name)s" +msgstr "Установка МСВСфера %(productVersion)s ОС на %(name)s"
+ +
+#: pyanaconda/vnc.py:168 +#: pyanaconda/vnc.py:188
#, python-format #, python-format
msgid "%(productName)s %(productVersion)s installation on host %(name)s" msgid "%(productName)s %(productVersion)s installation on host %(name)s"
msgstr "Установка %(productName)s %(productVersion)s на %(name)s" msgstr "Установка %(productName)s %(productVersion)s на %(name)s"
@ -182,7 +197,7 @@ index 1edb03d..1f8915b 100644
#, python-format #, python-format
msgid "Giving up attempting to connect after %d try!\n" msgid "Giving up attempting to connect after %d try!\n"
msgid_plural "Giving up attempting to connect after %d tries!\n" msgid_plural "Giving up attempting to connect after %d tries!\n"
@@ -320,16 +410,16 @@ msgstr[0] "Установка соединения прекращена посл @@ -320,16 +425,16 @@ msgstr[0] "Установка соединения прекращена посл
msgstr[1] "Установка соединения прекращена после %d попыток!\n" msgstr[1] "Установка соединения прекращена после %d попыток!\n"
msgstr[2] "Установка соединения прекращена после %d попыток!\n" msgstr[2] "Установка соединения прекращена после %d попыток!\n"
@ -202,7 +217,7 @@ index 1edb03d..1f8915b 100644
#, python-format #, python-format
msgid "" msgid ""
"Please manually connect your vnc client to IP-ADDRESS:%s to begin the " "Please manually connect your vnc client to IP-ADDRESS:%s to begin the "
@@ -340,15 +430,15 @@ msgstr "" @@ -340,15 +445,15 @@ msgstr ""
"Переключитесь на оболочку (Ctrl-B 2) и выполните команду 'ip addr', чтобы " "Переключитесь на оболочку (Ctrl-B 2) и выполните команду 'ip addr', чтобы "
"найти IP-ADDRESS." "найти IP-ADDRESS."
@ -221,7 +236,7 @@ index 1edb03d..1f8915b 100644
msgid "" msgid ""
"\n" "\n"
"\n" "\n"
@@ -366,7 +456,7 @@ msgstr "" @@ -366,7 +471,7 @@ msgstr ""
"\n" "\n"
"\n" "\n"
@ -230,7 +245,7 @@ index 1edb03d..1f8915b 100644
msgid "" msgid ""
"\n" "\n"
"\n" "\n"
@@ -382,7 +472,7 @@ msgstr "" @@ -382,7 +487,7 @@ msgstr ""
"для ограничения доступа к серверу.\n" "для ограничения доступа к серверу.\n"
"\n" "\n"
@ -239,7 +254,7 @@ index 1edb03d..1f8915b 100644
msgid "" msgid ""
"\n" "\n"
"\n" "\n"
@@ -394,7 +484,7 @@ msgstr "" @@ -394,7 +499,7 @@ msgstr ""
"Вы выбрали запуск VNC с паролем.\n" "Вы выбрали запуск VNC с паролем.\n"
"\n" "\n"
@ -248,7 +263,7 @@ index 1edb03d..1f8915b 100644
msgid "" msgid ""
"\n" "\n"
"\n" "\n"
@@ -406,7 +496,7 @@ msgstr "" @@ -406,7 +511,7 @@ msgstr ""
"Неизвестная ошибка. Остановка работы.\n" "Неизвестная ошибка. Остановка работы.\n"
"\n" "\n"
@ -257,7 +272,7 @@ index 1edb03d..1f8915b 100644
msgid "" msgid ""
"VNC password must be six to eight characters long.\n" "VNC password must be six to eight characters long.\n"
"Please enter a new one, or leave blank for no password." "Please enter a new one, or leave blank for no password."
@@ -750,13 +840,13 @@ msgstr "" @@ -750,13 +855,13 @@ msgstr ""
#: pyanaconda/core/constants.py:157 #: pyanaconda/core/constants.py:157
msgid "" msgid ""
@ -277,7 +292,7 @@ index 1edb03d..1f8915b 100644
#: pyanaconda/core/constants.py:163 #: pyanaconda/core/constants.py:163
msgid "" msgid ""
@@ -1507,7 +1597,7 @@ msgstr "Не удалось добавить устройство." @@ -1507,7 +1612,7 @@ msgstr "Не удалось добавить устройство."
#: pyanaconda/modules/storage/partitioning/interactive/utils.py:213 #: pyanaconda/modules/storage/partitioning/interactive/utils.py:213
#, python-brace-format #, python-brace-format
msgid "New {name} {version} Installation" msgid "New {name} {version} Installation"
@ -286,7 +301,7 @@ index 1edb03d..1f8915b 100644
#: pyanaconda/modules/storage/partitioning/interactive/utils.py:275 #: pyanaconda/modules/storage/partitioning/interactive/utils.py:275
msgid "Cannot set label on file system." msgid "Cannot set label on file system."
@@ -1937,7 +2027,7 @@ msgid "" @@ -1937,7 +2042,7 @@ msgid ""
"recommended for a normal %(productName)s install." "recommended for a normal %(productName)s install."
msgstr "" msgstr ""
"Размер раздела %(mount)s меньше %(size)s, что меньше рекомендованного " "Размер раздела %(mount)s меньше %(size)s, что меньше рекомендованного "
@ -295,7 +310,7 @@ index 1edb03d..1f8915b 100644
#: pyanaconda/modules/storage/checker/utils.py:131 #: pyanaconda/modules/storage/checker/utils.py:131
#, python-format #, python-format
@@ -3455,7 +3545,7 @@ msgid "" @@ -3455,7 +3560,7 @@ msgid ""
"You haven't created any mount points for your %(product)s %(version)s " "You haven't created any mount points for your %(product)s %(version)s "
"installation yet. You can:" "installation yet. You can:"
msgstr "" msgstr ""
@ -304,7 +319,7 @@ index 1edb03d..1f8915b 100644
"Вы можете:" "Вы можете:"
#: pyanaconda/ui/gui/spokes/lib/accordion.py:479 #: pyanaconda/ui/gui/spokes/lib/accordion.py:479
@@ -3487,6 +3577,10 @@ msgstr "" @@ -3487,6 +3592,10 @@ msgstr ""
"_Автоматически созданные точки монтирования могут быть зашифрованы по " "_Автоматически созданные точки монтирования могут быть зашифрованы по "
"умолчанию:" "умолчанию:"
@ -315,7 +330,7 @@ index 1edb03d..1f8915b 100644
#: pyanaconda/ui/gui/spokes/lib/storage_dialogs.py:69 #: pyanaconda/ui/gui/spokes/lib/storage_dialogs.py:69
msgid "Please wait... software metadata still loading." msgid "Please wait... software metadata still loading."
msgstr "Подождите… Всё ещё загружаются метаданные ПО." msgstr "Подождите… Всё ещё загружаются метаданные ПО."
@@ -3498,7 +3592,7 @@ msgid "" @@ -3498,7 +3607,7 @@ msgid ""
"of available space, including <b>%(software)s</b> for software and " "of available space, including <b>%(software)s</b> for software and "
"<b>%(swap)s</b> for swap space." "<b>%(swap)s</b> for swap space."
msgstr "" msgstr ""
@ -324,7 +339,7 @@ index 1edb03d..1f8915b 100644
"<b>%(software)s</b> для программ и <b>%(swap)s</b> для подкачки." "<b>%(software)s</b> для программ и <b>%(swap)s</b> для подкачки."
#: pyanaconda/ui/gui/spokes/lib/storage_dialogs.py:81 #: pyanaconda/ui/gui/spokes/lib/storage_dialogs.py:81
@@ -3509,7 +3603,7 @@ msgid "" @@ -3509,7 +3618,7 @@ msgid ""
"<b>%(software)s</b> for software and <b>%(swap)s</b> for swap space." "<b>%(software)s</b> for software and <b>%(swap)s</b> for swap space."
msgstr "" msgstr ""
"Для <a href=\"\" title=\"%(tooltip)s\">программного обеспечения " "Для <a href=\"\" title=\"%(tooltip)s\">программного обеспечения "
@ -333,7 +348,7 @@ index 1edb03d..1f8915b 100644
"<b>%(software)s</b> для программ и <b>%(swap)s</b> для подкачки." "<b>%(software)s</b> для программ и <b>%(swap)s</b> для подкачки."
#: pyanaconda/ui/gui/spokes/lib/storage_dialogs.py:132 #: pyanaconda/ui/gui/spokes/lib/storage_dialogs.py:132
@@ -3520,11 +3614,11 @@ msgstr "%s На выбранных дисках доступно:" @@ -3520,11 +3629,11 @@ msgstr "%s На выбранных дисках доступно:"
#: pyanaconda/ui/gui/spokes/lib/storage_dialogs.py:142 #: pyanaconda/ui/gui/spokes/lib/storage_dialogs.py:142
#, python-format #, python-format
msgid "" msgid ""
@ -347,7 +362,7 @@ index 1edb03d..1f8915b 100644
"существующие разделы с помощью помощника или самостоятельно выбрать размеры " "существующие разделы с помощью помощника или самостоятельно выбрать размеры "
"разделов в окне настройки разделов." "разделов в окне настройки разделов."
@@ -3534,7 +3628,7 @@ msgid "" @@ -3534,7 +3643,7 @@ msgid ""
" You don't have enough space available to install <b>%(product)s</b>, even " " You don't have enough space available to install <b>%(product)s</b>, even "
"if you used all of the free space available on the selected disks." "if you used all of the free space available on the selected disks."
msgstr "" msgstr ""
@ -356,7 +371,7 @@ index 1edb03d..1f8915b 100644
"использовать все свободное место на выбранных дисках." "использовать все свободное место на выбранных дисках."
#: pyanaconda/ui/gui/spokes/lib/storage_dialogs.py:178 #: pyanaconda/ui/gui/spokes/lib/storage_dialogs.py:178
@@ -3545,10 +3639,10 @@ msgid "" @@ -3545,10 +3654,10 @@ msgid ""
"could add more disks for additional space, modify your software selection to " "could add more disks for additional space, modify your software selection to "
"install a smaller version of <b>%(productName)s</b>, or quit the installer." "install a smaller version of <b>%(productName)s</b>, or quit the installer."
msgstr "" msgstr ""
@ -369,7 +384,7 @@ index 1edb03d..1f8915b 100644
"покинуть программу установки." "покинуть программу установки."
#: pyanaconda/ui/gui/spokes/lib/subscription.py:66 #: pyanaconda/ui/gui/spokes/lib/subscription.py:66
@@ -4096,7 +4190,7 @@ msgid "" @@ -4096,7 +4205,7 @@ msgid ""
"you'll be able to view their details here." "you'll be able to view their details here."
msgstr "" msgstr ""
"Здесь будет показана информация о созданных точках монтирования для " "Здесь будет показана информация о созданных точках монтирования для "
@ -378,44 +393,51 @@ index 1edb03d..1f8915b 100644
#: pyanaconda/ui/gui/spokes/custom_storage.py:615 #: pyanaconda/ui/gui/spokes/custom_storage.py:615
#: pyanaconda/ui/gui/spokes/advstorage/nvdimm.glade:178 #: pyanaconda/ui/gui/spokes/advstorage/nvdimm.glade:178
@@ -4431,6 +4525,36 @@ msgstr "Рабочий сервер NTP не настроен" @@ -4431,7 +4540,42 @@ msgstr "Рабочий сервер NTP не настроен"
msgid "What language would you like to use during the installation process?" msgid "What language would you like to use during the installation process?"
msgstr "Какой язык вы хотите использовать в процессе установки?" msgstr "Какой язык вы хотите использовать в процессе установки?"
+#: pyanaconda/ui/gui/spokes/welcome.py:278 -#: pyanaconda/ui/gui/spokes/welcome.py:209
+#: pyanaconda/ui/gui/spokes/welcome.py:213
+#, python-format +#, python-format
+msgid "WELCOME TO MSVSphere %(version)s Server" +msgid "WELCOME TO MSVSphere %(version)s Server"
+msgstr "ДОБРО ПОЖАЛОВАТЬ В МСВСфера %(version)s Сервер" +msgstr "ДОБРО ПОЖАЛОВАТЬ В МСВСфера %(version)s Сервер"
+ +
+#: pyanaconda/ui/gui/spokes/welcome.py:280 +#: pyanaconda/ui/gui/spokes/welcome.py:215
+#, python-format
+msgid "WELCOME TO MSVSphere %(version)s Certified"
+msgstr "ДОБРО ПОЖАЛОВАТЬ В МСВСфера %(version)s Сертифицированная"
+
+#: pyanaconda/ui/gui/spokes/welcome.py:217
+#, python-format +#, python-format
+msgid "WELCOME TO MSVSphere %(version)s ARM" +msgid "WELCOME TO MSVSphere %(version)s ARM"
+msgstr "ДОБРО ПОЖАЛОВАТЬ В МСВСфера %(version)s АРМ" +msgstr "ДОБРО ПОЖАЛОВАТЬ В МСВСфера %(version)s АРМ"
+ +
+#: pyanaconda/ui/gui/spokes/welcome.py:282 +#: pyanaconda/ui/gui/spokes/welcome.py:219
+#, python-format +#, python-format
+msgid "WELCOME TO MSVSphere %(version)s Cinnamon" +msgid "WELCOME TO MSVSphere %(version)s Cinnamon"
+msgstr "ДОБРО ПОЖАЛОВАТЬ В МСВСфера %(version)s Cinnamon" +msgstr "ДОБРО ПОЖАЛОВАТЬ В МСВСфера %(version)s Cinnamon"
+ +
+#: pyanaconda/ui/gui/spokes/welcome.py:284 +#: pyanaconda/ui/gui/spokes/welcome.py:221
+#, python-format +#, python-format
+msgid "WELCOME TO MSVSphere %(version)s KDE" +msgid "WELCOME TO MSVSphere %(version)s KDE"
+msgstr "ДОБРО ПОЖАЛОВАТЬ В МСВСфера %(version)s KDE" +msgstr "ДОБРО ПОЖАЛОВАТЬ В МСВСфера %(version)s KDE"
+ +
+#: pyanaconda/ui/gui/spokes/welcome.py:286 +#: pyanaconda/ui/gui/spokes/welcome.py:223
+#, python-format +#, python-format
+msgid "WELCOME TO MSVSphere %(version)s XFCE" +msgid "WELCOME TO MSVSphere %(version)s XFCE"
+msgstr "ДОБРО ПОЖАЛОВАТЬ В МСВСфера %(version)s XFCE" +msgstr "ДОБРО ПОЖАЛОВАТЬ В МСВСфера %(version)s XFCE"
+ +
+#: pyanaconda/ui/gui/spokes/welcome.py:288 +#: pyanaconda/ui/gui/spokes/welcome.py:225
+#, python-format +#, python-format
+msgid "WELCOME TO MSVSphere %(version)s OS" +msgid "WELCOME TO MSVSphere %(version)s OS"
+msgstr "ДОБРО ПОЖАЛОВАТЬ В МСВСфера %(version)s ОС" +msgstr "ДОБРО ПОЖАЛОВАТЬ В МСВСфера %(version)s ОС"
+ +
#: pyanaconda/ui/gui/spokes/welcome.py:209 +#: pyanaconda/ui/gui/spokes/welcome.py:227
#, python-format #, python-format
msgid "WELCOME TO %(name)s %(version)s." msgid "WELCOME TO %(name)s %(version)s."
@@ -4482,8 +4606,8 @@ msgid "" msgstr "ДОБРО ПОЖАЛОВАТЬ В %(name)s %(version)s."
@@ -4482,8 +4626,8 @@ msgid ""
"%s is now successfully installed and ready for you to use!\n" "%s is now successfully installed and ready for you to use!\n"
"Go ahead and reboot your system to start using it!" "Go ahead and reboot your system to start using it!"
msgstr "" msgstr ""
@ -426,7 +448,7 @@ index 1edb03d..1f8915b 100644
#: pyanaconda/ui/gui/spokes/installation_progress.py:163 #: pyanaconda/ui/gui/spokes/installation_progress.py:163
#, python-format #, python-format
@@ -4491,8 +4615,8 @@ msgid "" @@ -4491,8 +4635,8 @@ msgid ""
"%s is now successfully installed and ready for you to use!\n" "%s is now successfully installed and ready for you to use!\n"
"Go ahead and quit the application to start using it!" "Go ahead and quit the application to start using it!"
msgstr "" msgstr ""
@ -437,7 +459,7 @@ index 1edb03d..1f8915b 100644
#: pyanaconda/ui/gui/spokes/installation_source.py:73 #: pyanaconda/ui/gui/spokes/installation_source.py:73
msgid "Setting up installation source..." msgid "Setting up installation source..."
@@ -7614,21 +7738,21 @@ msgstr "Настройка Liveinst" @@ -7614,21 +7758,21 @@ msgstr "Настройка Liveinst"
#: data/liveinst/gnome/fedora-welcome.desktop:3 #: data/liveinst/gnome/fedora-welcome.desktop:3
#: data/liveinst/gnome/fedora-welcome.js:65 #: data/liveinst/gnome/fedora-welcome.js:65
@ -468,7 +490,7 @@ index 1edb03d..1f8915b 100644
#: data/liveinst/gnome/fedora-welcome.js:130 #: data/liveinst/gnome/fedora-welcome.js:130
diff --git a/pyanaconda/product.py b/pyanaconda/product.py diff --git a/pyanaconda/product.py b/pyanaconda/product.py
index 9dbfe1f..140dbee 100644 index 9dbfe1f..3a9998c 100644
--- a/pyanaconda/product.py --- a/pyanaconda/product.py
+++ b/pyanaconda/product.py +++ b/pyanaconda/product.py
@@ -19,6 +19,7 @@ @@ -19,6 +19,7 @@
@ -479,7 +501,7 @@ index 9dbfe1f..140dbee 100644
from pyanaconda.core.i18n import _ from pyanaconda.core.i18n import _
@@ -64,9 +65,42 @@ def trim_product_version_for_ui(version): @@ -64,9 +65,46 @@ def trim_product_version_for_ui(version):
productVersion = trim_product_version_for_ui(productVersion) productVersion = trim_product_version_for_ui(productVersion)
@ -488,6 +510,8 @@ index 9dbfe1f..140dbee 100644
+ if productName == "MSVSphere Server" or \ + if productName == "MSVSphere Server" or \
+ (productName == "MSVSphere" and productVariant == "Minimal"): + (productName == "MSVSphere" and productVariant == "Minimal"):
+ productFlavor = "Server" + productFlavor = "Server"
+ elif productName == "MSVSphere" and productVariant == "Certified":
+ productFlavor = "Certified"
+ elif productName == "MSVSphere" and productVariant == "BaseOS": + elif productName == "MSVSphere" and productVariant == "BaseOS":
+ productFlavor = "OS" + productFlavor = "OS"
+ elif productName == "MSVSphere": + elif productName == "MSVSphere":
@ -507,6 +531,8 @@ index 9dbfe1f..140dbee 100644
- return _("%(productName)s %(productVersion)s INSTALLATION") % { - return _("%(productName)s %(productVersion)s INSTALLATION") % {
+ if productBase == "MSVSphere" and productFlavor == "Server": + if productBase == "MSVSphere" and productFlavor == "Server":
+ distro_text = _("MSVSphere %(productVersion)s Server INSTALLATION") + distro_text = _("MSVSphere %(productVersion)s Server INSTALLATION")
+ elif productBase == "MSVSphere" and productFlavor == "Certified":
+ distro_text = _("MSVSphere %(productVersion)s Certified INSTALLATION")
+ elif productBase == "MSVSphere" and productFlavor == "ARM": + elif productBase == "MSVSphere" and productFlavor == "ARM":
+ distro_text = _("MSVSphere %(productVersion)s ARM INSTALLATION") + distro_text = _("MSVSphere %(productVersion)s ARM INSTALLATION")
+ elif productBase == "MSVSphere" and productFlavor == "Cinnamon": + elif productBase == "MSVSphere" and productFlavor == "Cinnamon":
@ -577,7 +603,7 @@ index 2f8338b..e330641 100644
self._add_modify_watcher(label) self._add_modify_watcher(label)
diff --git a/pyanaconda/ui/gui/spokes/welcome.py b/pyanaconda/ui/gui/spokes/welcome.py diff --git a/pyanaconda/ui/gui/spokes/welcome.py b/pyanaconda/ui/gui/spokes/welcome.py
index de71615..7937f2c 100644 index de71615..a0718bb 100644
--- a/pyanaconda/ui/gui/spokes/welcome.py --- a/pyanaconda/ui/gui/spokes/welcome.py
+++ b/pyanaconda/ui/gui/spokes/welcome.py +++ b/pyanaconda/ui/gui/spokes/welcome.py
@@ -35,7 +35,10 @@ from pyanaconda.ui.gui.spokes.lib.lang_locale_handler import LangLocaleHandler @@ -35,7 +35,10 @@ from pyanaconda.ui.gui.spokes.lib.lang_locale_handler import LangLocaleHandler
@ -592,13 +618,15 @@ index de71615..7937f2c 100644
from pyanaconda import flags from pyanaconda import flags
from pyanaconda.core.i18n import _ from pyanaconda.core.i18n import _
from pyanaconda.core.util import ipmi_abort from pyanaconda.core.util import ipmi_abort
@@ -206,7 +209,21 @@ class WelcomeLanguageSpoke(StandaloneSpoke, LangLocaleHandler): @@ -206,7 +209,23 @@ class WelcomeLanguageSpoke(StandaloneSpoke, LangLocaleHandler):
# The welcome label is special - it has text that needs to be substituted. # The welcome label is special - it has text that needs to be substituted.
welcomeLabel = self.builder.get_object("welcomeLabel") welcomeLabel = self.builder.get_object("welcomeLabel")
- welcomeLabel.set_text(_("WELCOME TO %(name)s %(version)s.") % - welcomeLabel.set_text(_("WELCOME TO %(name)s %(version)s.") %
+ if productBase == "MSVSphere" and productFlavor == "Server": + if productBase == "MSVSphere" and productFlavor == "Server":
+ welcome_text = _("WELCOME TO MSVSphere %(version)s Server") + welcome_text = _("WELCOME TO MSVSphere %(version)s Server")
+ elif productBase == "MSVSphere" and productFlavor == "Certified":
+ welcome_text = _("WELCOME TO MSVSphere %(version)s Certified")
+ elif productBase == "MSVSphere" and productFlavor == "ARM": + elif productBase == "MSVSphere" and productFlavor == "ARM":
+ welcome_text = _("WELCOME TO MSVSphere %(version)s ARM") + welcome_text = _("WELCOME TO MSVSphere %(version)s ARM")
+ elif productBase == "MSVSphere" and productFlavor == "Cinnamon": + elif productBase == "MSVSphere" and productFlavor == "Cinnamon":
@ -616,10 +644,10 @@ index de71615..7937f2c 100644
# Retranslate the language (filtering) entry's placeholder text # Retranslate the language (filtering) entry's placeholder text
diff --git a/pyanaconda/vnc.py b/pyanaconda/vnc.py diff --git a/pyanaconda/vnc.py b/pyanaconda/vnc.py
index 5fadcde..c349de8 100644 index 5fadcde..0d0e3b7 100644
--- a/pyanaconda/vnc.py --- a/pyanaconda/vnc.py
+++ b/pyanaconda/vnc.py +++ b/pyanaconda/vnc.py
@@ -76,7 +76,22 @@ class VncServer(object): @@ -76,7 +76,24 @@ class VncServer(object):
self.anaconda = None self.anaconda = None
self.log = get_stdout_logger() self.log = get_stdout_logger()
@ -627,6 +655,8 @@ index 5fadcde..c349de8 100644
+ is_sphere = product.productBase == "MSVSphere" + is_sphere = product.productBase == "MSVSphere"
+ if is_sphere and product.productFlavor == "Server": + if is_sphere and product.productFlavor == "Server":
+ desktop_text = _("MSVSphere %(productVersion)s Server installation") + desktop_text = _("MSVSphere %(productVersion)s Server installation")
+ elif is_sphere and product.productFlavor == "Certified":
+ desktop_text = _("MSVSphere %(productVersion)s Certified installation")
+ elif is_sphere and product.productFlavor == "ARM": + elif is_sphere and product.productFlavor == "ARM":
+ desktop_text = _("MSVSphere %(productVersion)s ARM installation") + desktop_text = _("MSVSphere %(productVersion)s ARM installation")
+ elif is_sphere and product.productFlavor == "Cinnamon": + elif is_sphere and product.productFlavor == "Cinnamon":
@ -643,7 +673,7 @@ index 5fadcde..c349de8 100644
% {'productName': product.productName, % {'productName': product.productName,
'productVersion': product.productVersion} 'productVersion': product.productVersion}
@@ -145,8 +160,29 @@ class VncServer(object): @@ -145,8 +162,32 @@ class VncServer(object):
# figure out product info # figure out product info
if host: if host:
@ -653,6 +683,9 @@ index 5fadcde..c349de8 100644
+ if is_sphere and product.productFlavor == "Server": + if is_sphere and product.productFlavor == "Server":
+ desktop_text = _("MSVSphere %(productVersion)s Server " + desktop_text = _("MSVSphere %(productVersion)s Server "
+ "installation on host %(name)s") + "installation on host %(name)s")
+ elif is_sphere and product.productFlavor == "Certified":
+ desktop_text = _("MSVSphere %(productVersion)s Certified "
+ "installation on host %(name)s")
+ elif is_sphere and product.productFlavor == "ARM": + elif is_sphere and product.productFlavor == "ARM":
+ desktop_text = _("MSVSphere %(productVersion)s ARM " + desktop_text = _("MSVSphere %(productVersion)s ARM "
+ "installation on host %(name)s") + "installation on host %(name)s")
@ -676,5 +709,5 @@ index 5fadcde..c349de8 100644
'productVersion': product.productVersion, 'productVersion': product.productVersion,
'name': host} 'name': host}
-- --
2.44.0 2.46.0

@ -16,7 +16,7 @@ index 78577cb..0bd5227 100644
DEFAULT_HELP_LANG = "en_US.UTF-8" DEFAULT_HELP_LANG = "en_US.UTF-8"
-DEFAULT_VC_FONT = "eurlatgr" -DEFAULT_VC_FONT = "eurlatgr"
+DEFAULT_VC_FONT = "LatGrkCyr-8x16" +DEFAULT_VC_FONT = "latarcyrheb-sun16"
DEFAULT_KEYBOARD = "us" DEFAULT_KEYBOARD = "us"

@ -0,0 +1,488 @@
From 2716b292b9d42961222fd645c6b2d281d46d6688 Mon Sep 17 00:00:00 2001
From: Dmitry Samoylik <Dmitriy.Samoylik@softline.com>
Date: Thu, 26 Sep 2024 16:57:48 +0300
Subject: [PATCH] Implement show EULA before installation
---
data/anaconda.conf | 4 +-
pyanaconda/core/configuration/license.py | 2 -
pyanaconda/core/eula.py | 23 ++++
pyanaconda/ui/categories/eula.py | 14 +++
pyanaconda/ui/gui/spokes/eula.glade | 136 +++++++++++++++++++++++
pyanaconda/ui/gui/spokes/eula.py | 107 ++++++++++++++++++
pyanaconda/ui/tui/spokes/eula.py | 128 +++++++++++++++++++++
7 files changed, 409 insertions(+), 5 deletions(-)
create mode 100644 pyanaconda/core/eula.py
create mode 100644 pyanaconda/ui/categories/eula.py
create mode 100644 pyanaconda/ui/gui/spokes/eula.glade
create mode 100644 pyanaconda/ui/gui/spokes/eula.py
create mode 100644 pyanaconda/ui/tui/spokes/eula.py
diff --git a/data/anaconda.conf b/data/anaconda.conf
index b5878e3..c15e99d 100644
--- a/data/anaconda.conf
+++ b/data/anaconda.conf
@@ -308,9 +308,7 @@ password_policies =
# If the given distribution has an EULA & feels the need to
# tell the user about it fill in this variable by a path
# pointing to a file with the EULA on the installed system.
-#
-# This is currently used just to show the path to the file to
-# the user at the end of the installation.
+
eula =
diff --git a/pyanaconda/core/configuration/license.py b/pyanaconda/core/configuration/license.py
index 04c44bf..a51f52a 100644
--- a/pyanaconda/core/configuration/license.py
+++ b/pyanaconda/core/configuration/license.py
@@ -31,7 +31,5 @@ class LicenseSection(Section):
tell the user about it fill in this variable by a path
pointing to a file with the EULA on the installed system.
- This is currently used just to show the path to the file to
- the user at the end of the installation.
"""
return self._get_option("eula", str)
diff --git a/pyanaconda/core/eula.py b/pyanaconda/core/eula.py
new file mode 100644
index 0000000..15a393e
--- /dev/null
+++ b/pyanaconda/core/eula.py
@@ -0,0 +1,23 @@
+import os
+from pyanaconda.core.configuration.anaconda import conf
+
+def get_license_file_name():
+ """Get filename of the license file best matching current localization settings.
+ :return: filename of the license file or None if no license file found
+ :rtype: str or None
+ """
+ if not conf.license.eula:
+ return None
+
+ if not os.path.exists(conf.license.eula):
+ return None
+
+ return conf.license.eula
+
+
+def eula_available():
+ """Report if it looks like there is an EULA available on the system.
+ :return: True if an EULA seems to be available, False otherwise
+ :rtype: bool
+ """
+ return bool(get_license_file_name())
diff --git a/pyanaconda/ui/categories/eula.py b/pyanaconda/ui/categories/eula.py
new file mode 100644
index 0000000..0a4fe96
--- /dev/null
+++ b/pyanaconda/ui/categories/eula.py
@@ -0,0 +1,14 @@
+from pyanaconda.ui.categories import SpokeCategory
+from pyanaconda.core.i18n import _
+
+__all__ = ["LicensingCategory"]
+
+class LicensingCategory(SpokeCategory):
+
+ @staticmethod
+ def get_title():
+ return _("LICENSING")
+
+ @staticmethod
+ def get_sort_order():
+ return 900
diff --git a/pyanaconda/ui/gui/spokes/eula.glade b/pyanaconda/ui/gui/spokes/eula.glade
new file mode 100644
index 0000000..1d340f0
--- /dev/null
+++ b/pyanaconda/ui/gui/spokes/eula.glade
@@ -0,0 +1,136 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <!-- interface-requires gtk+ 3.6 -->
+ <!-- interface-requires AnacondaWidgets 1.0 -->
+ <object class="GtkTextBuffer" id="eulaBuffer">
+ <property name="text">The license will go here</property>
+ </object>
+ <object class="AnacondaSpokeWindow" id="eulaWindow">
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <property name="window_name" translatable="yes">License Information</property>
+ <signal name="button-clicked" handler="on_back_clicked" swapped="no"/>
+ <child internal-child="main_box">
+ <object class="GtkBox" id="AnacondaSpokeWindow-main_box1">
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">6</property>
+ <child internal-child="nav_box">
+ <object class="GtkEventBox" id="AnacondaSpokeWindow-nav_box1">
+ <property name="can_focus">False</property>
+ <child internal-child="nav_area">
+ <object class="GtkGrid" id="AnacondaSpokeWindow-nav_area1">
+ <property name="can_focus">False</property>
+ <property name="margin_left">6</property>
+ <property name="margin_right">6</property>
+ <property name="margin_top">6</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child internal-child="alignment">
+ <object class="GtkAlignment" id="AnacondaSpokeWindow-alignment1">
+ <property name="can_focus">False</property>
+ <property name="xscale">0.8</property>
+ <property name="yscale">0.8</property>
+ <child internal-child="action_area">
+ <object class="GtkBox" id="mainBox">
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <child>
+ <object class="GtkLabel" id="licenseAgreementLabel">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="halign">start</property>
+ <property name="margin_top">24</property>
+ <property name="margin_bottom">6</property>
+ <property name="label" translatable="yes">License Agreement:</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkBox" id="eulaBox">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <property name="orientation">vertical</property>
+ <child>
+ <object class="GtkScrolledWindow" id="eulaScrolledWindow">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="shadow_type">in</property>
+ <child>
+ <object class="GtkTextView" id="eulaView">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="margin_bottom">18</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <property name="vscroll_policy">natural</property>
+ <property name="pixels_above_lines">12</property>
+ <property name="editable">False</property>
+ <property name="wrap_mode">word</property>
+ <property name="left_margin">12</property>
+ <property name="right_margin">12</property>
+ <property name="cursor_visible">False</property>
+ <property name="buffer">eulaBuffer</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="agreeCheckButton">
+ <property name="label" translatable="yes">I _accept the license agreement</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ <signal name="toggled" handler="on_check_button_toggled" swapped="no"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ </child>
+ </object>
+</interface>
diff --git a/pyanaconda/ui/gui/spokes/eula.py b/pyanaconda/ui/gui/spokes/eula.py
new file mode 100644
index 0000000..a487c6b
--- /dev/null
+++ b/pyanaconda/ui/gui/spokes/eula.py
@@ -0,0 +1,107 @@
+import logging
+
+from pyanaconda.ui.common import FirstbootOnlySpokeMixIn
+from pyanaconda.ui.gui.spokes import NormalSpoke
+from pyanaconda.core.i18n import _, CN_
+from pyanaconda.core import eula
+from pyanaconda.ui.categories.eula import LicensingCategory
+from pyanaconda.anaconda_loggers import get_module_logger
+from pykickstart.constants import FIRSTBOOT_RECONFIG
+
+log = get_module_logger(__name__)
+__all__ = ["EULASpoke"]
+
+
+class EULASpoke(FirstbootOnlySpokeMixIn, NormalSpoke):
+ """The EULA spoke"""
+
+ builderObjects = ["eulaBuffer", "eulaWindow"]
+ mainWidgetName = "eulaWindow"
+ uiFile = "spokes/eula.glade"
+ icon = "application-certificate-symbolic"
+ title = CN_("GUI|Spoke", "_License Information")
+ category = LicensingCategory
+
+ @staticmethod
+ def get_screen_id():
+ """Return a unique id of this UI screen."""
+ return "license-information"
+
+ def initialize(self):
+ log.debug("initializing the EULA spoke")
+ NormalSpoke.initialize(self)
+
+ self._have_eula = True
+ self._eula_buffer = self.builder.get_object("eulaBuffer")
+ self._agree_check_button = self.builder.get_object("agreeCheckButton")
+ self._agree_label = self._agree_check_button.get_child()
+ self._agree_text = self._agree_label.get_text()
+
+ log.debug("looking for the license file")
+ license_file = eula.get_license_file_name()
+ if not license_file:
+ log.error("no license found")
+ self._have_eula = False
+ self._eula_buffer.set_text(_("No license found"))
+ return
+
+ # if there is "eula <...>" in kickstart, use its value
+ if self.data.eula.agreed is not None:
+ self._agree_check_button.set_active(self.data.eula.agreed)
+
+ self._eula_buffer.set_text("")
+ itr = self._eula_buffer.get_iter_at_offset(0)
+ log.debug("opening the license file")
+ with open(license_file, "r") as fobj:
+ # insert the first line without prefixing with space
+ try:
+ first_line = next(fobj)
+ except StopIteration:
+ # nothing in the file
+ return
+ self._eula_buffer.insert(itr, first_line.strip())
+
+ # EULA file may be preformatted for the console, we want to let Gtk
+ # format it (blank lines should be preserved)
+ for line in fobj:
+ stripped_line = line.strip()
+ if stripped_line:
+ self._eula_buffer.insert(itr, " " + stripped_line)
+ else:
+ self._eula_buffer.insert(itr, "\n\n")
+
+ def refresh(self):
+ self._agree_check_button.set_sensitive(self._have_eula)
+ self._agree_check_button.set_active(self.data.eula.agreed)
+
+ def apply(self):
+ self.data.eula.agreed = self._agree_check_button.get_active()
+
+ @property
+ def completed(self):
+ return not self._have_eula or self.data.eula.agreed
+
+ @property
+ def status(self):
+ if not self._have_eula:
+ return _("No license found")
+
+ return _("License accepted") if self.data.eula.agreed else _("License not accepted")
+
+ @classmethod
+ def should_run(cls, environment, data):
+ if eula.eula_available():
+ # don't run if we are in initial-setup in reconfig mode and the EULA has already been accepted
+ if FirstbootOnlySpokeMixIn.should_run(environment, data) and data and data.firstboot.firstboot == FIRSTBOOT_RECONFIG and data.eula.agreed:
+ log.debug("not running license spoke: reconfig mode & license already accepted")
+ return False
+ return True
+ return False
+
+ def on_check_button_toggled(self, *args):
+ if self._agree_check_button.get_active():
+ log.debug("license is now accepted")
+ self._agree_label.set_markup("<b>%s</b>" % self._agree_text)
+ else:
+ log.debug("license no longer accepted")
+ self._agree_label.set_markup(self._agree_text)
diff --git a/pyanaconda/ui/tui/spokes/eula.py b/pyanaconda/ui/tui/spokes/eula.py
new file mode 100644
index 0000000..a3e8e62
--- /dev/null
+++ b/pyanaconda/ui/tui/spokes/eula.py
@@ -0,0 +1,128 @@
+import logging
+
+from pyanaconda.ui.tui.spokes import NormalTUISpoke
+from simpleline.render.widgets import TextWidget, CheckboxWidget
+from simpleline.render.containers import ListRowContainer
+from simpleline.render.screen import UIScreen, InputState
+from simpleline.render.screen_handler import ScreenHandler
+from pyanaconda.ui.common import FirstbootOnlySpokeMixIn
+from pyanaconda.core import eula
+from pyanaconda.ui.categories.eula import LicensingCategory
+from pyanaconda.core.i18n import _, N_
+from pykickstart.constants import FIRSTBOOT_RECONFIG
+
+log = logging.getLogger("initial-setup")
+
+__all__ = ["EULASpoke"]
+
+
+class EULASpoke(FirstbootOnlySpokeMixIn, NormalTUISpoke):
+ """The EULA spoke providing ways to read the license and agree/disagree with it."""
+
+ category = LicensingCategory
+
+ @staticmethod
+ def get_screen_id():
+ """Return a unique id of this UI screen."""
+ return "license-information"
+
+ def __init__(self, *args, **kwargs):
+ NormalTUISpoke.__init__(self, *args, **kwargs)
+ self.title = _("License information")
+ self._container = None
+
+ def initialize(self):
+ NormalTUISpoke.initialize(self)
+
+ def refresh(self, args=None):
+ NormalTUISpoke.refresh(self, args)
+
+ self._container = ListRowContainer(1)
+
+ log.debug("license found")
+ # make the options aligned to the same column (the checkbox has the
+ # '[ ]' prepended)
+ self._container.add(TextWidget("%s\n" % _("Read the License Agreement")),
+ self._show_license_screen_callback)
+
+ self._container.add(CheckboxWidget(title=_("I accept the license agreement"),
+ completed=self.data.eula.agreed),
+ self._license_accepted_callback)
+ self.window.add_with_separator(self._container)
+
+ @property
+ def completed(self):
+ # Either there is no EULA available, or user agrees/disagrees with it.
+ return self.data.eula.agreed
+
+ @property
+ def mandatory(self):
+ # This spoke is always mandatory.
+ return True
+
+ @property
+ def status(self):
+ return _("License accepted") if self.data.eula.agreed else _("License not accepted")
+
+ @classmethod
+ def should_run(cls, environment, data):
+ if eula.eula_available():
+ # don't run if we are in initial-setup in reconfig mode and the EULA has already been accepted
+ if FirstbootOnlySpokeMixIn.should_run(environment, data) and data and data.firstboot.firstboot == FIRSTBOOT_RECONFIG and data.eula.agreed:
+ log.debug("not running license spoke: reconfig mode & license already accepted")
+ return False
+ return True
+ return False
+
+ def apply(self):
+ # nothing needed here, the agreed field is changed in the input method
+ pass
+
+ def input(self, args, key):
+ if not self._container.process_user_input(key):
+ return key
+
+ return InputState.PROCESSED
+
+ @staticmethod
+ def _show_license_screen_callback(data):
+ # show license
+ log.debug("showing the license")
+ eula_screen = LicenseScreen()
+ ScreenHandler.push_screen(eula_screen)
+
+ def _license_accepted_callback(self, data):
+ # toggle EULA agreed checkbox by changing ksdata
+ log.debug("license accepted state changed to: %s", self.data.eula.agreed)
+ self.data.eula.agreed = not self.data.eula.agreed
+ self.redraw()
+
+
+class LicenseScreen(UIScreen):
+ """Screen showing the License without any input from user requested."""
+
+ def __init__(self):
+ super().__init__()
+
+ self._license_file = eula.get_license_file_name()
+
+ def refresh(self, args=None):
+ super().refresh(args)
+
+ # read the license file and make it one long string so that it can be
+ # processed by the TextWidget to fit in the screen in a best possible
+ # way
+ log.debug("reading the license file")
+ with open(self._license_file, 'r') as f:
+ license_text = f.read()
+
+ self.window.add_with_separator(TextWidget(license_text))
+
+ def input(self, args, key):
+ """ Handle user input. """
+ return InputState.PROCESSED_AND_CLOSE
+
+ def prompt(self, args=None):
+ # we don't want to prompt user, just close the screen
+ self.close()
+ return None
--
2.39.2

@ -7647,6 +7647,37 @@ msgstr "Закрыть"
msgid "Starting Install to Hard Drive" msgid "Starting Install to Hard Drive"
msgstr "Начинается установка на жёсткий диск" msgstr "Начинается установка на жёсткий диск"
msgid "LICENSING"
msgstr "ЛИЦЕНЗИРОВАНИЕ"
msgctxt "GUI|Spoke"
msgid "_License Information"
msgstr "О _лицензии"
msgid "License information"
msgstr "О лицензии"
msgid "License Information"
msgstr "О лицензии"
msgid "License accepted"
msgstr "Лицензия принята"
msgid "License not accepted"
msgstr "Лицензия не принята"
msgid "Read the License Agreement"
msgstr "Прочитайте лицензионное соглашение"
msgid "I accept the license agreement"
msgstr "Принимаю лицензионное соглашение"
msgid "I _accept the license agreement"
msgstr "_Принимаю лицензионное соглашение"
msgid "License Agreement:"
msgstr "Лицензионное соглашение:"
#~ msgid "Failed to attach subscription." #~ msgid "Failed to attach subscription."
#~ msgstr "Не удалось прикрепить подписку." #~ msgstr "Не удалось прикрепить подписку."

@ -1,7 +1,7 @@
Summary: Graphical system installer Summary: Graphical system installer
Name: anaconda Name: anaconda
Version: 34.25.4.9 Version: 34.25.4.9
Release: 1%{?dist}.inferit.1 Release: 1%{?dist}.inferit.103.certified
License: GPLv2+ and MIT License: GPLv2+ and MIT
URL: http://fedoraproject.org/wiki/Anaconda URL: http://fedoraproject.org/wiki/Anaconda
@ -31,6 +31,7 @@ Patch1013: 0013-Fix-smt-url.patch
Patch1014: 0014-Make-branding-free-Russian-translation.patch Patch1014: 0014-Make-branding-free-Russian-translation.patch
Patch1015: 0015-Disable-sphere-url.patch Patch1015: 0015-Disable-sphere-url.patch
Patch1016: 0016-Set-LatGrkCyr-8x16-as-default-font-instead-of-eurlat.patch Patch1016: 0016-Set-LatGrkCyr-8x16-as-default-font-instead-of-eurlat.patch
Patch1017: 0017-Implement-show-EULA-before-installation.patch
# Versions of required components (done so we make sure the buildrequires # Versions of required components (done so we make sure the buildrequires
# match the requires versions of things). # match the requires versions of things).
@ -182,6 +183,8 @@ BuildRequires: desktop-file-utils
Requires: anaconda-gui = %{version}-%{release} Requires: anaconda-gui = %{version}-%{release}
Requires: usermode Requires: usermode
Requires: zenity Requires: zenity
# Avoid double licensing
Conflicts: initial-setup-gui
%description live %description live
The anaconda-live package contains scripts, data and dependencies required The anaconda-live package contains scripts, data and dependencies required
@ -405,6 +408,11 @@ desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{buildroot}%{_d
%{_datadir}/applications/*.desktop %{_datadir}/applications/*.desktop
%{_datadir}/anaconda/gnome %{_datadir}/anaconda/gnome
%{_sysconfdir}/xdg/autostart/*.desktop %{_sysconfdir}/xdg/autostart/*.desktop
%{_datadir}/anaconda/ui/spokes/eula.*
%{python3_sitearch}/pyanaconda/ui/gui/spokes/eula.*
%{python3_sitearch}/pyanaconda/ui/gui/spokes/__pycache__/eula.*
%{python3_sitearch}/pyanaconda/ui/tui/spokes/eula.*
%{python3_sitearch}/pyanaconda/ui/tui/spokes/__pycache__/eula.*
%files gui %files gui
%{python3_sitearch}/pyanaconda/ui/gui/* %{python3_sitearch}/pyanaconda/ui/gui/*
@ -415,6 +423,10 @@ desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{buildroot}%{_d
%exclude %{_datadir}/anaconda/ui/spokes/blivet_gui.* %exclude %{_datadir}/anaconda/ui/spokes/blivet_gui.*
%exclude %{python3_sitearch}/pyanaconda/ui/gui/spokes/blivet_gui.* %exclude %{python3_sitearch}/pyanaconda/ui/gui/spokes/blivet_gui.*
%endif %endif
# Place eula to live only
%exclude %{_datadir}/anaconda/ui/spokes/eula.*
%exclude %{python3_sitearch}/pyanaconda/ui/gui/spokes/eula.*
%exclude %{python3_sitearch}/pyanaconda/ui/gui/spokes/__pycache__/eula.*
%{_datadir}/anaconda/window-manager %{_datadir}/anaconda/window-manager
%{_datadir}/anaconda/anaconda-gtk.css %{_datadir}/anaconda/anaconda-gtk.css
@ -422,6 +434,8 @@ desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{buildroot}%{_d
%{python3_sitearch}/pyanaconda/rescue.py %{python3_sitearch}/pyanaconda/rescue.py
%{python3_sitearch}/pyanaconda/__pycache__/rescue.* %{python3_sitearch}/pyanaconda/__pycache__/rescue.*
%{python3_sitearch}/pyanaconda/ui/tui/* %{python3_sitearch}/pyanaconda/ui/tui/*
%exclude %{python3_sitearch}/pyanaconda/ui/tui/spokes/eula.*
%exclude %{python3_sitearch}/pyanaconda/ui/tui/spokes/__pycache__/eula.*
%files widgets %files widgets
%{_libdir}/libAnacondaWidgets.so.* %{_libdir}/libAnacondaWidgets.so.*
@ -441,6 +455,21 @@ desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{buildroot}%{_d
%{_prefix}/libexec/anaconda/dd_* %{_prefix}/libexec/anaconda/dd_*
%changelog %changelog
* Wed Oct 09 2024 Arkady L. Shane <tigro@msvsphere-os.ru> - 34.25.4.9-1.inferit.103.certified
- Place eula files only in live package to avoid license dupes in initial-setup
* Thu Sep 26 2024 Dmitry Samoylik <Dmitriy.Samoylik@softline.com> - 34.25.4.9-1.inferit.102.certified
- Implement show EULA before installation
* Sat Sep 14 2024 Arkady L. Shane <tigro@msvsphere-os.ru> - 34.25.4.9-1.inferit.101.certified
- Added Certified Flavour
* Fri Sep 13 2024 Arkady L. Shane <tigro@msvsphere-os.ru> - 34.25.4.9-1.inferit.100.certified
- Bump release
* Fri Sep 13 2024 Arkady L. Shane <tigro@msvsphere-os.ru> - 34.25.4.9-1.inferit.2
- Added Certified repository support
* Mon Aug 12 2024 Arkady L. Shane <tigro@msvsphere-os.ru> - 34.25.4.9-1.inferit.1 * Mon Aug 12 2024 Arkady L. Shane <tigro@msvsphere-os.ru> - 34.25.4.9-1.inferit.1
- Set LatGrkCyr-8x16 as default font instead of eurlatgr - Set LatGrkCyr-8x16 as default font instead of eurlatgr

Loading…
Cancel
Save