Множественные изменения

Изменён формат вывода времени сборки.
Поддержка localversion.
Добавлен параметр --skip-config для пропуска конфигурации ядра вручную
Обновлены переводы.
master
Mike Khiretskiy 9 years ago
parent 2e4452b8b9
commit ab4a779c8d

@ -37,6 +37,9 @@ BUILD_KERNEL=1
# очистить исходники ядра перед сборкой
# clean the kernel sources before the compilation
CLEAN_KERNEL=1
# запускать изменение конфигурации ядра пользователем
# execute manual kernel configuration
MANUAL_CONFIG=1
# права на файл шаблона
# template file privileges
CHMOD=0644
@ -76,6 +79,7 @@ ${DESCRIPTION}
--kver-old [VERSION] specify the kernel version for new options ('list' for displaying possible values)
--convert migrate .config from the kernel directory to templates
-s, --skip-build do not build the kernel after configuration
--skip-config do not manual configure the kernel
--noclean do not clean the kernel sources before the compilation
--march [ARCH] kernel architecture (x86 or x86_64)
--safemode create an additional initrd with all modules (only for calculate-sources)
@ -95,6 +99,7 @@ rearrange_params() {
--long convert \
--long noclean \
--long skip-build \
--long skip-config \
--long safemode \
-- "$@")
if (( $? != 0 )); then
@ -138,6 +143,9 @@ do_args() {
-s|--skip-build)
BUILD_KERNEL=
;;
---skip-config)
MANUAL_CONFIG=
;;
--noclean)
CLEAN_KERNEL=
;;
@ -374,6 +382,11 @@ check_belong() {
return 0
}
real_kernel_version() {
local kdir=$1
file $kdir/arch/x86/boot/bzImage | sed -r 's/.*version\s(\S+)\s.*/\1/'
}
######################
# Обработать параметры
# Process the options
@ -561,7 +574,10 @@ eend
# Изменение конфигурации ядра пользователем
# Manual kernel configuration
###########################################
(cd $KERNEL_DIR; [[ -n ${KERNEL_OLD_DIR} || -z ${CREATE_NEW} ]] && KCONFIG_CONFIG=$(basename $NEW_CONFIG) make oldconfig;KCONFIG_CONFIG=$(basename $NEW_CONFIG) make -s menuconfig) || true
if [[ -n $MANUAL_CONFIG ]]
then
(cd $KERNEL_DIR; [[ -n ${KERNEL_OLD_DIR} || -z ${CREATE_NEW} ]] && KCONFIG_CONFIG=$(basename $NEW_CONFIG) make oldconfig;KCONFIG_CONFIG=$(basename $NEW_CONFIG) make -s menuconfig) || true
fi
###########################
# Создание шаблона
@ -634,18 +650,19 @@ then
) || eerror $"Failed to build kernel"
# сборка initramfs
# initramfs building
VMLINUZ_VER=$(real_kernel_version $KERNEL_DIR)
if [[ -n $DRACUT ]] && grep -q "CONFIG_BLK_DEV_INITRD=y" ${NEW_CONFIG}
then
type lz4 &>/dev/null&& LZ4=--lz4
${DRACUT} -fH --kver $LZ4 $KVER /boot/initramfs-${KVER}.img || eerror $"Failed to create the host-only initramfs"
type lz4 &>/dev/null&& LZ4="--lz4"
${DRACUT} -fH $LZ4 --kver=$VMLINUZ_VER /boot/initramfs-${VMLINUZ_VER}.img || eerror $"Failed to create the host-only initramfs"
if [[ $KVER =~ calculate ]] && [[ -n $SAFEMODE ]]
then
${DRACUT} -f --kver $LZ4 $KVER /boot/initramfs-${KVER/-calculate/-SafeMode-calculate}.img || eerror $"Failed to create the safemode initramfs"
${DRACUT} -f $LZ4 --kver=$VMLINUZ_VER /boot/initramfs-${VMLINUZ_VER/-calculate/-SafeMode-calculate}.img || eerror $"Failed to create the safemode initramfs"
fi
else
# удалить старый ramfs если его поддержка выключена в ядре
# remove the old ramfs if its support disabled in the kernel configuration
rm -f /boot/initramfs-${KVER}.img /boot/initramfs-${KVER/-calculate/-SafeMode-calculate}.img
rm -f /boot/initramfs-${VMLINUZ_VER}.img /boot/initramfs-${VMLINUZ_VER/-calculate/-SafeMode-calculate}.img
fi
# выполнение шаблонов для настройки загрузки системы
@ -664,9 +681,9 @@ then
echo -n $"Kernel build time: "
if [[ ${HOUR} -gt 0 ]]
then
printf "%02d:%02d:%02d\n" ${HOUR} ${MIN} ${SEC}
printf $"%d hour %d min %d sec\n" ${HOUR} ${MIN} ${SEC}
else
printf "%02d:%02d\n" ${MIN} ${SEC}
printf $"%d min %d sec\n" ${MIN} ${SEC}
fi
# вывод информационных сообщений, отображённых до сборки ядра

@ -1,7 +1,7 @@
#: ../cl-kernel:20
msgid "Kernel building tool"
msgstr ""
#: ../cl-kernel:57
#: ../cl-kernel:60
msgid ""
"Usage: $0 [OPTION]\n"
"\n"
@ -11,7 +11,7 @@ msgid ""
"\n"
" -h, --help display all options and exit"
msgstr ""
#: ../cl-kernel:69
#: ../cl-kernel:72
msgid ""
"Usage: $0 [OPTION]\n"
"\n"
@ -23,111 +23,118 @@ msgid ""
" --kver-old [VERSION] specify the kernel version for new options ('list' for displaying possible values)\n"
" --convert migrate .config from the kernel directory to templates\n"
" -s, --skip-build do not build the kernel after configuration\n"
" --skip-config do not manual configure the kernel\n"
" --noclean do not clean the kernel sources before the compilation\n"
" --march [ARCH] kernel architecture (x86 or x86_64)\n"
" --safemode create an additional initrd with all modules (only for calculate-sources)\n"
" --help display this help and exit\n"
""
msgstr ""
#: ../cl-kernel:130
#: ../cl-kernel:135
msgid "Error in parameter --march. The value may be 'x86' or 'x86_64'"
msgstr ""
#: ../cl-kernel:146
#: ../cl-kernel:154
msgid "Unknown option: $1"
msgstr ""
#: ../cl-kernel:154
#: ../cl-kernel:162
msgid "Unknown argument: $1"
msgstr ""
#: ../cl-kernel:278
#: ../cl-kernel:286
msgid "Failed to create the default kernel config"
msgstr ""
#: ../cl-kernel:281
#: ../cl-kernel:289
msgid "Failed to apply kernel templates"
msgstr ""
#: ../cl-kernel:284
#: ../cl-kernel:292
msgid "Kernel configuration file not found"
msgstr ""
#: ../cl-kernel:351
#: ../cl-kernel:359
msgid "Will be used $config kernel configuration"
msgstr ""
#: ../cl-kernel:353
#: ../cl-kernel:361
msgid "Failed to get current kernel configuration"
msgstr ""
#: ../cl-kernel:369
#: ../cl-kernel:377
msgid "${fn} does not belong to any package"
msgstr ""
#: ../cl-kernel:372
#: ../cl-kernel:380
msgid "${fn} belongs to multiple packages"
msgstr ""
#: ../cl-kernel:445
#: ../cl-kernel:458
msgid "Kernel directory ${check_dir} not found"
msgstr ""
#: ../cl-kernel:446
#: ../cl-kernel:459
msgid "Kernel directory ${check_dir} has no full sources"
msgstr ""
#: ../cl-kernel:460
#: ../cl-kernel:473
msgid "--safemode available for calculate-sources only"
msgstr ""
#: ../cl-kernel:465
#: ../cl-kernel:478
msgid "--safemode unavailable without dracut"
msgstr ""
#: ../cl-kernel:474
#: ../cl-kernel:487
msgid "Failed to create the kernel template directory"
msgstr ""
#: ../cl-kernel:525
#: ../cl-kernel:538
msgid "Preparing the current kernel configuration"
msgstr ""
#: ../cl-kernel:533
#: ../cl-kernel:546
msgid "--convert is uncompatible with --march"
msgstr ""
#: ../cl-kernel:537
#: ../cl-kernel:550
msgid "--convert is uncompatible with --kver-old"
msgstr ""
#: ../cl-kernel:548
#: ../cl-kernel:561
msgid "Preparing the basic kernel configuration"
msgstr ""
#: ../cl-kernel:583
#: ../cl-kernel:599
msgid "The kernel configuration has not changed"
msgstr ""
#: ../cl-kernel:588
#: ../cl-kernel:604
msgid "Backing up the template"
msgstr ""
#: ../cl-kernel:592
#: ../cl-kernel:608
msgid "Failed to create a backup directory"
msgstr ""
#: ../cl-kernel:607
#: ../cl-kernel:623
msgid "Creating the template"
msgstr ""
#: ../cl-kernel:610
#: ../cl-kernel:626
msgid "Skipping the empty template"
msgstr ""
#: ../cl-kernel:625
#: ../cl-kernel:641
msgid "Failed to import make.conf"
msgstr ""
#: ../cl-kernel:629
#: ../cl-kernel:645
msgid "Failed to clean the kernel sources"
msgstr ""
#: ../cl-kernel:631
#: ../cl-kernel:647
msgid "Failed to compile the kernel"
msgstr ""
#: ../cl-kernel:632
#: ../cl-kernel:648
msgid "Failed to compile the kernel modules"
msgstr ""
#: ../cl-kernel:633
#: ../cl-kernel:649
msgid "Failed to install the kernel"
msgstr ""
#: ../cl-kernel:634
#: ../cl-kernel:650
msgid "Failed to build kernel"
msgstr ""
#: ../cl-kernel:640
#: ../cl-kernel:657
msgid "Failed to create the host-only initramfs"
msgstr ""
#: ../cl-kernel:643
#: ../cl-kernel:660
msgid "Failed to create the safemode initramfs"
msgstr ""
#: ../cl-kernel:664
#: ../cl-kernel:681
msgid "Kernel build time: "
msgstr ""
#: ../cl-kernel:680
#: ../cl-kernel:684
msgid "%d hour %d min %d sec\\n"
msgstr ""
#: ../cl-kernel:686
msgid "%d min %d sec\\n"
msgstr ""
#: ../cl-kernel:697
msgid "All done!"
msgstr ""

@ -15,7 +15,7 @@ msgstr ""
msgid "Kernel building tool"
msgstr "Utilitaire de compilation du noyau"
#: ../cl-kernel:57
#: ../cl-kernel:60
msgid ""
"Usage: $0 [OPTION]\n"
"\n"
@ -33,7 +33,8 @@ msgstr ""
"\n"
" -h, --help afficher toutes les options et quitter"
#: ../cl-kernel:69
#: ../cl-kernel:72
#, fuzzy
msgid ""
"Usage: $0 [OPTION]\n"
"\n"
@ -48,6 +49,7 @@ msgid ""
" --convert migrate .config from the kernel directory to "
"templates\n"
" -s, --skip-build do not build the kernel after configuration\n"
" --skip-config do not manual configure the kernel\n"
" --noclean do not clean the kernel sources before the "
"compilation\n"
" --march [ARCH] kernel architecture (x86 or x86_64)\n"
@ -71,145 +73,154 @@ msgstr ""
"configuration\n"
" --noclean do not clean the kernel sources before the "
"compilation\n"
" --skip-config do not manual configure the kernel\n"
" --march [АРХИТЕКТУРА] spécifier l'architecture du noyau (x86 ou "
"x86_64)\n"
" --safemode créer un fichier initrd additionnel avec tous "
"les modules (option réservée à calculate-sources)\n"
" --help afficher cette aide et quitter\n"
#: ../cl-kernel:130
#: ../cl-kernel:135
msgid "Error in parameter --march. The value may be 'x86' or 'x86_64'"
msgstr "Erreur du paramètre --march. La valeur peut être 'x86' ou 'x86_64'"
#: ../cl-kernel:146
#: ../cl-kernel:154
msgid "Unknown option: $1"
msgstr "Option inconnue : $1"
#: ../cl-kernel:154
#: ../cl-kernel:162
msgid "Unknown argument: $1"
msgstr "Option inconnue : $1"
#: ../cl-kernel:278
#: ../cl-kernel:286
msgid "Failed to create the default kernel config"
msgstr "Impossible de créer la configuration par défaut"
#: ../cl-kernel:281
#: ../cl-kernel:289
msgid "Failed to apply kernel templates"
msgstr "Impossible d'appliquer les modèles"
#: ../cl-kernel:284
#: ../cl-kernel:292
msgid "Kernel configuration file not found"
msgstr "Fichier de configuration introuvable"
#: ../cl-kernel:351
#: ../cl-kernel:359
msgid "Will be used $config kernel configuration"
msgstr ""
#: ../cl-kernel:353
#: ../cl-kernel:361
msgid "Failed to get current kernel configuration"
msgstr ""
#: ../cl-kernel:369
#: ../cl-kernel:377
msgid "${fn} does not belong to any package"
msgstr ""
#: ../cl-kernel:372
#: ../cl-kernel:380
msgid "${fn} belongs to multiple packages"
msgstr ""
#: ../cl-kernel:445
#: ../cl-kernel:458
msgid "Kernel directory ${check_dir} not found"
msgstr "Répertoire du noyau, ${check_dir}, introuvable"
#: ../cl-kernel:446
#: ../cl-kernel:459
msgid "Kernel directory ${check_dir} has no full sources"
msgstr ""
"Le répertoire du noyau, ${check_dir}, ne contient pas de sources complètes"
#: ../cl-kernel:460
#: ../cl-kernel:473
msgid "--safemode available for calculate-sources only"
msgstr "L'option --safemode n'est disponible que pour calculate-sources"
#: ../cl-kernel:465
#: ../cl-kernel:478
msgid "--safemode unavailable without dracut"
msgstr "L'option --safemode requiert dracut"
#: ../cl-kernel:474
#: ../cl-kernel:487
msgid "Failed to create the kernel template directory"
msgstr "Impossible de créer le répertoire des modèles"
#: ../cl-kernel:525
#: ../cl-kernel:538
msgid "Preparing the current kernel configuration"
msgstr "Préparation de la configuration courante"
#: ../cl-kernel:533
#: ../cl-kernel:546
msgid "--convert is uncompatible with --march"
msgstr ""
#: ../cl-kernel:537
#: ../cl-kernel:550
msgid "--convert is uncompatible with --kver-old"
msgstr ""
#: ../cl-kernel:548
#: ../cl-kernel:561
msgid "Preparing the basic kernel configuration"
msgstr "Préparation de la configuration de base"
#: ../cl-kernel:583
#: ../cl-kernel:599
msgid "The kernel configuration has not changed"
msgstr "La configuration du noyau n'a pas été modifiée"
#: ../cl-kernel:588
#: ../cl-kernel:604
msgid "Backing up the template"
msgstr "Sauvegarde d'une copie du modèle"
#: ../cl-kernel:592
#: ../cl-kernel:608
msgid "Failed to create a backup directory"
msgstr "Impossible de créer le répertoire des copies"
#: ../cl-kernel:607
#: ../cl-kernel:623
msgid "Creating the template"
msgstr "Création du modèle"
#: ../cl-kernel:610
#: ../cl-kernel:626
msgid "Skipping the empty template"
msgstr "Omission du modèle vide"
#: ../cl-kernel:625
#: ../cl-kernel:641
msgid "Failed to import make.conf"
msgstr ""
#: ../cl-kernel:629
#: ../cl-kernel:645
msgid "Failed to clean the kernel sources"
msgstr ""
#: ../cl-kernel:631
#: ../cl-kernel:647
msgid "Failed to compile the kernel"
msgstr ""
#: ../cl-kernel:632
#: ../cl-kernel:648
msgid "Failed to compile the kernel modules"
msgstr ""
#: ../cl-kernel:633
#: ../cl-kernel:649
msgid "Failed to install the kernel"
msgstr ""
#: ../cl-kernel:634
#: ../cl-kernel:650
msgid "Failed to build kernel"
msgstr ""
#: ../cl-kernel:640
#: ../cl-kernel:657
msgid "Failed to create the host-only initramfs"
msgstr ""
#: ../cl-kernel:643
#: ../cl-kernel:660
msgid "Failed to create the safemode initramfs"
msgstr ""
#: ../cl-kernel:664
#: ../cl-kernel:681
msgid "Kernel build time: "
msgstr "Temps de compilation du noyau : "
#: ../cl-kernel:680
#: ../cl-kernel:684
msgid "%d hour %d min %d sec\\n"
msgstr ""
#: ../cl-kernel:686
msgid "%d min %d sec\\n"
msgstr ""
#: ../cl-kernel:697
msgid "All done!"
msgstr "C'est fait !"

@ -15,7 +15,7 @@ msgstr ""
msgid "Kernel building tool"
msgstr "Утилита для сборки ядра"
#: ../cl-kernel:57
#: ../cl-kernel:60
msgid ""
"Usage: $0 [OPTION]\n"
"\n"
@ -33,7 +33,7 @@ msgstr ""
"\n"
" -h, --help отобразить все параметры и выйти"
#: ../cl-kernel:69
#: ../cl-kernel:72
msgid ""
"Usage: $0 [OPTION]\n"
"\n"
@ -48,6 +48,7 @@ msgid ""
" --convert migrate .config from the kernel directory to "
"templates\n"
" -s, --skip-build do not build the kernel after configuration\n"
" --skip-config do not manual configure the kernel\n"
" --noclean do not clean the kernel sources before the "
"compilation\n"
" --march [ARCH] kernel architecture (x86 or x86_64)\n"
@ -68,144 +69,153 @@ msgstr ""
" --convert преобразовать .config из директории ядра в "
"шаблоны\n"
" -s, --skip-build не собирать ядро после конфигурации\n"
" --skip-config пропустить конфигурацию ядра вручную\n"
" --noclean не выполнять make clean перед сборкой ядра\n"
" --march [АРХИТЕКТУРА] архитектура ядра (x86 или x86_64)\n"
" --safemode создать дополнительный initrd со всеми модулями "
"(только для calculate-sources)\n"
" --help вывод этой справки и выход\n"
#: ../cl-kernel:130
#: ../cl-kernel:135
msgid "Error in parameter --march. The value may be 'x86' or 'x86_64'"
msgstr "Ошибка в параметре --march. Значение может быть 'x86' или 'x86_64'"
#: ../cl-kernel:146
#: ../cl-kernel:154
msgid "Unknown option: $1"
msgstr "Неизвестный параметр: $1"
#: ../cl-kernel:154
#: ../cl-kernel:162
msgid "Unknown argument: $1"
msgstr "Неизвестный параметр: $1"
#: ../cl-kernel:278
#: ../cl-kernel:286
msgid "Failed to create the default kernel config"
msgstr "Не удалось создать конфигурацию ядра по умолчанию"
#: ../cl-kernel:281
#: ../cl-kernel:289
msgid "Failed to apply kernel templates"
msgstr "Не удалось применить шаблоны ядра"
#: ../cl-kernel:284
#: ../cl-kernel:292
msgid "Kernel configuration file not found"
msgstr "Файл конфигурации ядра не найден"
#: ../cl-kernel:351
#: ../cl-kernel:359
msgid "Will be used $config kernel configuration"
msgstr "Будет использован $config с конфигурацией ядра"
#: ../cl-kernel:353
#: ../cl-kernel:361
msgid "Failed to get current kernel configuration"
msgstr "Не удалось получить текущую конфигурацию ядра"
#: ../cl-kernel:369
#: ../cl-kernel:377
msgid "${fn} does not belong to any package"
msgstr "${fn} не принадлежит ни одному пакету"
#: ../cl-kernel:372
#: ../cl-kernel:380
msgid "${fn} belongs to multiple packages"
msgstr "${fn} принадлежит нескольким пакетам"
#: ../cl-kernel:445
#: ../cl-kernel:458
msgid "Kernel directory ${check_dir} not found"
msgstr "Директория ядра ${check_dir} не найдена"
#: ../cl-kernel:446
#: ../cl-kernel:459
msgid "Kernel directory ${check_dir} has no full sources"
msgstr "Директория ядра ${check_dir} не содержит всего исходного кода"
#: ../cl-kernel:460
#: ../cl-kernel:473
msgid "--safemode available for calculate-sources only"
msgstr "--safemode доступен только для calculate-sources"
#: ../cl-kernel:465
#: ../cl-kernel:478
msgid "--safemode unavailable without dracut"
msgstr "--safemode недоступен без dracut"
#: ../cl-kernel:474
#: ../cl-kernel:487
msgid "Failed to create the kernel template directory"
msgstr "Не удалось создать директорию для шаблонов ядра"
#: ../cl-kernel:525
#: ../cl-kernel:538
msgid "Preparing the current kernel configuration"
msgstr "Подготовка текущей конфигурации ядра"
#: ../cl-kernel:533
#: ../cl-kernel:546
msgid "--convert is uncompatible with --march"
msgstr "--convert не совместим с --march"
#: ../cl-kernel:537
#: ../cl-kernel:550
msgid "--convert is uncompatible with --kver-old"
msgstr "--convert не совместим с --kver-old"
#: ../cl-kernel:548
#: ../cl-kernel:561
msgid "Preparing the basic kernel configuration"
msgstr "Подготовка базовой конфигурации ядра"
#: ../cl-kernel:583
#: ../cl-kernel:599
msgid "The kernel configuration has not changed"
msgstr "Конфигурация ядра не изменилась"
#: ../cl-kernel:588
#: ../cl-kernel:604
msgid "Backing up the template"
msgstr "Резервное копирование шаблона"
#: ../cl-kernel:592
#: ../cl-kernel:608
msgid "Failed to create a backup directory"
msgstr "Не удалось создать директорию для резервных копий"
#: ../cl-kernel:607
#: ../cl-kernel:623
msgid "Creating the template"
msgstr "Создание шаблона"
#: ../cl-kernel:610
#: ../cl-kernel:626
msgid "Skipping the empty template"
msgstr "Пропуск пустого шаблона"
#: ../cl-kernel:625
#: ../cl-kernel:641
msgid "Failed to import make.conf"
msgstr ""
#: ../cl-kernel:629
#: ../cl-kernel:645
msgid "Failed to clean the kernel sources"
msgstr "Не удалось выполнить make clean для исходного кода ядра"
#: ../cl-kernel:631
#: ../cl-kernel:647
msgid "Failed to compile the kernel"
msgstr "Не удалось скомпилировать ядро"
#: ../cl-kernel:632
#: ../cl-kernel:648
msgid "Failed to compile the kernel modules"
msgstr "Не удалось собрать модули ядра"
#: ../cl-kernel:633
#: ../cl-kernel:649
msgid "Failed to install the kernel"
msgstr "Не удалось установить ядро"
#: ../cl-kernel:634
#: ../cl-kernel:650
msgid "Failed to build kernel"
msgstr "Не удалось собрать ядро"
#: ../cl-kernel:640
#: ../cl-kernel:657
msgid "Failed to create the host-only initramfs"
msgstr "Не удалось создать host-only initramfs"
#: ../cl-kernel:643
#: ../cl-kernel:660
msgid "Failed to create the safemode initramfs"
msgstr "Не удалось создать safemode initramfs"
#: ../cl-kernel:664
#: ../cl-kernel:681
msgid "Kernel build time: "
msgstr "Время сборки ядра: "
#: ../cl-kernel:680
#: ../cl-kernel:684
msgid "%d hour %d min %d sec\\n"
msgstr "%d час %d мин %d сек\\n"
#: ../cl-kernel:686
msgid "%d min %d sec\\n"
msgstr "%d мин %d сек\\n"
#: ../cl-kernel:697
msgid "All done!"
msgstr "Все готово!"

Loading…
Cancel
Save