From 58240837d18e3ded66115a875c213c76fc4d7f72 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sun, 3 Dec 2017 13:02:05 +0000 Subject: app-admin/calamares : version bump (3.1.8 -> 3.1.9) --- app-admin/calamares/Manifest | 2 +- app-admin/calamares/calamares-3.1.8-r3.ebuild | 79 ----------- app-admin/calamares/calamares-3.1.9.ebuild | 79 +++++++++++ .../calamares-3.1.8-dont-run-locale-gen.patch | 42 ------ .../files/calamares-3.1.8-kpmcore-3.2.patch | 146 --------------------- .../files/calamares-3.1.8-openrc-dmcrypt-cfg.patch | 80 ----------- .../files/calamares-dont-run-locale-gen.patch | 42 ++++++ .../calamares/files/calamares-kpmcore-3.2.patch | 146 +++++++++++++++++++++ .../files/calamares-openrc-dmcrypt-cfg-r1.patch | 84 ++++++++++++ 9 files changed, 352 insertions(+), 348 deletions(-) delete mode 100644 app-admin/calamares/calamares-3.1.8-r3.ebuild create mode 100644 app-admin/calamares/calamares-3.1.9.ebuild delete mode 100644 app-admin/calamares/files/calamares-3.1.8-dont-run-locale-gen.patch delete mode 100644 app-admin/calamares/files/calamares-3.1.8-kpmcore-3.2.patch delete mode 100644 app-admin/calamares/files/calamares-3.1.8-openrc-dmcrypt-cfg.patch create mode 100644 app-admin/calamares/files/calamares-dont-run-locale-gen.patch create mode 100644 app-admin/calamares/files/calamares-kpmcore-3.2.patch create mode 100644 app-admin/calamares/files/calamares-openrc-dmcrypt-cfg-r1.patch diff --git a/app-admin/calamares/Manifest b/app-admin/calamares/Manifest index 20c7d15c..d27c74f1 100644 --- a/app-admin/calamares/Manifest +++ b/app-admin/calamares/Manifest @@ -1 +1 @@ -DIST calamares-3.1.8.tar.gz 2265097 SHA256 abc3d44285a17175a1cf2ca69e4b89ab207927edc4d0c0ce48253f8e0a61c007 SHA512 f5fe3e92357d2f7492298b26826da420862438e55f91be6f8d9414d332c2f4b74d382d1c128d78e453609a9a2bc79b423c5e331a295479d169ed76a7028f0375 WHIRLPOOL 43cc8bb2ce073e4b632fa8da71fbd3132b60fb5a85786cde8996e91cfa1c91b695279d52853e34da4c63a4344489120c20f8ab843c77d2ba69d114bb877d4a0a +DIST calamares-3.1.9.tar.gz 2265530 SHA256 126bb8a653a10f6cf55d6fa4abfe1021e23b75f3a3b533d827cb8e1c4acffe44 SHA512 d8c0ceab9999ce1b28565ac9b241c0b45a56c8d27cd3bd84ca0ee8fe59a3684b9b871fbad5437da1a0073f56aacee94a35a6d60303f0ef0871a740282e8bacfc WHIRLPOOL 15afc512605bb4714e08f41b31c1542786fdaf3326ddd5c681dcf8d349256d9ab7acbfec81678cdb4ba2e6b4d2b87b8426f1444c9c25e879808f0d40573a7d93 diff --git a/app-admin/calamares/calamares-3.1.8-r3.ebuild b/app-admin/calamares/calamares-3.1.8-r3.ebuild deleted file mode 100644 index 067d28b0..00000000 --- a/app-admin/calamares/calamares-3.1.8-r3.ebuild +++ /dev/null @@ -1,79 +0,0 @@ -# Copyright 1999-2015 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -EAPI=5 -PYTHON_COMPAT=( python3_5 ) - -inherit eutils cmake-utils python-r1 - -SRC_URI="https://github.com/calamares/calamares/releases/download/v${PV}/${P}.tar.gz" - -DESCRIPTION="Distribution-independent installer framework" -HOMEPAGE="http://calamares.io" - -LICENSE="GPL-3" -SLOT="0" -KEYWORDS="amd64" -IUSE="+python" - -S="${WORKDIR}/${P}" - -DEPEND=" - python? ( - >=dev-libs/boost-1.55.0-r2[python_targets_python3_5] - ) - >=dev-qt/designer-5.6.0:5 - >=dev-qt/linguist-tools-5.6.0:5 - >=dev-qt/qtconcurrent-5.6.0:5 - >=dev-qt/qtcore-5.6.0:5 - >=dev-qt/qtdbus-5.6.0:5 - >=dev-qt/qtdeclarative-5.6.0:5 - >=dev-qt/qtgui-5.6.0:5 - >=dev-qt/qtnetwork-5.6.0:5 - >=dev-qt/qtopengl-5.6.0:5 - >=dev-qt/qtprintsupport-5.6.0:5 - >=dev-qt/qtscript-5.6.0:5 - >=dev-qt/qtsvg-5.6.0:5 - >=dev-qt/qttest-5.6.0:5 - >=dev-qt/qtwebengine-5.6.0:5 - >=dev-qt/qtwebchannel-5.6.0:5 - >=dev-qt/qtwidgets-5.6.0:5 - >=dev-qt/qtxml-5.6.0:5 - >=dev-qt/qtxmlpatterns-5.6.0:5 - >=dev-cpp/yaml-cpp-0.5.1 - >=kde-frameworks/extra-cmake-modules-5.18.0 - >=sys-libs/kpmcore-3.0.2" - -RDEPEND=">=app-misc/calamares-runtime-1.0[branding]" - -src_prepare() { - # build against kpmcore-3.2 - epatch "${FILESDIR}"/${P}-kpmcore-3.2.patch - # don't run locale-gen during system installation, we run it ourselves during stage4 bootstrap...this patch should speed up installation significantly - epatch "${FILESDIR}"/${P}-dont-run-locale-gen.patch - # support auto-unlocking encrypted /home partition via OpenRC's dmcrypt service - epatch -p1 "${FILESDIR}"/${P}-openrc-dmcrypt-cfg.patch - # replace calamares installer desktop icon - sed -i "s/Icon=calamares/Icon=redcore-logo/g" "${S}/calamares.desktop" - # fix installer doesn't start from desktop launcher (IMPROVE THIS UGLY THINGY) - sed -i "s/pkexec //g" "${S}/calamares.desktop" - sed -i "s/calamares/calamares-pkexec/g" "${S}/calamares.desktop" - # If qtchooser is installed, it may break the build, because moc,rcc and uic binaries for wrong qt version may be used. - # Setting QT_SELECT environment variable will enforce correct binaries (fix taken from vlc ebuild) - export QT_SELECT=qt5 -} - -src_configure() { - local mycmakeargs=( - -DWITH_PARTITIONMANAGER=1 - ) - cmake-utils_src_configure -} - -src_install() { - cmake-utils_src_install - insinto /usr/bin - insopts -m 755 - doins ${FILESDIR}/calamares-pkexec -} diff --git a/app-admin/calamares/calamares-3.1.9.ebuild b/app-admin/calamares/calamares-3.1.9.ebuild new file mode 100644 index 00000000..6475e2ac --- /dev/null +++ b/app-admin/calamares/calamares-3.1.9.ebuild @@ -0,0 +1,79 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=5 +PYTHON_COMPAT=( python3_5 ) + +inherit eutils cmake-utils python-r1 + +SRC_URI="https://github.com/calamares/calamares/releases/download/v${PV}/${P}.tar.gz" + +DESCRIPTION="Distribution-independent installer framework" +HOMEPAGE="http://calamares.io" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="amd64" +IUSE="+python" + +S="${WORKDIR}/${P}" + +DEPEND=" + python? ( + >=dev-libs/boost-1.55.0-r2[python_targets_python3_5] + ) + >=dev-qt/designer-5.6.0:5 + >=dev-qt/linguist-tools-5.6.0:5 + >=dev-qt/qtconcurrent-5.6.0:5 + >=dev-qt/qtcore-5.6.0:5 + >=dev-qt/qtdbus-5.6.0:5 + >=dev-qt/qtdeclarative-5.6.0:5 + >=dev-qt/qtgui-5.6.0:5 + >=dev-qt/qtnetwork-5.6.0:5 + >=dev-qt/qtopengl-5.6.0:5 + >=dev-qt/qtprintsupport-5.6.0:5 + >=dev-qt/qtscript-5.6.0:5 + >=dev-qt/qtsvg-5.6.0:5 + >=dev-qt/qttest-5.6.0:5 + >=dev-qt/qtwebengine-5.6.0:5 + >=dev-qt/qtwebchannel-5.6.0:5 + >=dev-qt/qtwidgets-5.6.0:5 + >=dev-qt/qtxml-5.6.0:5 + >=dev-qt/qtxmlpatterns-5.6.0:5 + >=dev-cpp/yaml-cpp-0.5.1 + >=kde-frameworks/extra-cmake-modules-5.18.0 + >=sys-libs/kpmcore-3.0.2" + +RDEPEND=">=app-misc/calamares-runtime-1.0[branding]" + +src_prepare() { + # build against kpmcore-3.2 + epatch "${FILESDIR}"/${PN}-kpmcore-3.2.patch + # don't run locale-gen during system installation, we run it ourselves during stage4 bootstrap...this patch should speed up installation significantly + epatch "${FILESDIR}"/${PN}-dont-run-locale-gen.patch + # support auto-unlocking encrypted partitions via OpenRC's dmcrypt service + epatch -p1 "${FILESDIR}"/${PN}-openrc-dmcrypt-cfg-r1.patch + # replace calamares installer desktop icon + sed -i "s/Icon=calamares/Icon=redcore-logo/g" "${S}/calamares.desktop" + # fix installer doesn't start from desktop launcher (IMPROVE THIS UGLY THINGY) + sed -i "s/pkexec //g" "${S}/calamares.desktop" + sed -i "s/calamares/calamares-pkexec/g" "${S}/calamares.desktop" + # If qtchooser is installed, it may break the build, because moc,rcc and uic binaries for wrong qt version may be used. + # Setting QT_SELECT environment variable will enforce correct binaries (fix taken from vlc ebuild) + export QT_SELECT=qt5 +} + +src_configure() { + local mycmakeargs=( + -DWITH_PARTITIONMANAGER=1 + ) + cmake-utils_src_configure +} + +src_install() { + cmake-utils_src_install + insinto /usr/bin + insopts -m 755 + doins ${FILESDIR}/calamares-pkexec +} diff --git a/app-admin/calamares/files/calamares-3.1.8-dont-run-locale-gen.patch b/app-admin/calamares/files/calamares-3.1.8-dont-run-locale-gen.patch deleted file mode 100644 index 29ca6a61..00000000 --- a/app-admin/calamares/files/calamares-3.1.8-dont-run-locale-gen.patch +++ /dev/null @@ -1,42 +0,0 @@ -diff -Nur a/src/modules/localecfg/main.py b/src/modules/localecfg/main.py ---- a/src/modules/localecfg/main.py 2017-11-14 15:18:58.000000000 +0000 -+++ b/src/modules/localecfg/main.py 2017-11-20 18:56:23.801595116 +0000 -@@ -47,38 +47,6 @@ - - install_path = libcalamares.globalstorage.value("rootMountPoint") - -- # restore backup if available -- if os.path.exists('/etc/locale.gen.bak'): -- shutil.copy2("{!s}/etc/locale.gen.bak".format(install_path), -- "{!s}/etc/locale.gen".format(install_path)) -- -- # run locale-gen if detected -- if os.path.exists('/etc/locale.gen'): -- text = [] -- -- with open("{!s}/etc/locale.gen".format(install_path), "r") as gen: -- text = gen.readlines() -- -- # we want unique values, so locale_values should have 1 or 2 items -- locale_values = set(locale_conf.values()) -- -- with open("{!s}/etc/locale.gen".format(install_path), "w") as gen: -- for line in text: -- # always enable en_US -- if en_us_locale in line and line[0] == "#": -- # uncomment line -- line = line[1:].lstrip() -- -- for locale_value in locale_values: -- if locale_value in line and line[0] == "#": -- # uncomment line -- line = line[1:].lstrip() -- -- gen.write(line) -- -- libcalamares.utils.target_env_call(['locale-gen']) -- print('locale.gen done') -- - # write /etc/locale.conf - locale_conf_path = os.path.join(install_path, "etc/locale.conf") - with open(locale_conf_path, "w") as lcf: diff --git a/app-admin/calamares/files/calamares-3.1.8-kpmcore-3.2.patch b/app-admin/calamares/files/calamares-3.1.8-kpmcore-3.2.patch deleted file mode 100644 index 07e506ec..00000000 --- a/app-admin/calamares/files/calamares-3.1.8-kpmcore-3.2.patch +++ /dev/null @@ -1,146 +0,0 @@ -diff -Naur calamares-3.1.8/src/modules/partition/CMakeLists.txt calamares-3.1.8-p/src/modules/partition/CMakeLists.txt ---- calamares-3.1.8/src/modules/partition/CMakeLists.txt 2017-11-14 16:18:58.000000000 +0100 -+++ calamares-3.1.8-p/src/modules/partition/CMakeLists.txt 2017-11-18 13:16:38.335840619 +0100 -@@ -5,14 +5,10 @@ - include(GenerateExportHeader) - find_package( KF5 REQUIRED CoreAddons ) - --# These are needed because KPMcore links publicly against ConfigCore, I18n, IconThemes, KIOCore and Service --find_package( KF5 REQUIRED Config I18n IconThemes KIO Service ) -+find_package( Qt5 REQUIRED DBus ) -+find_package( KF5 REQUIRED Config I18n WidgetsAddons Service ) - --find_package( KPMcore 3.1.50 QUIET ) --if ( KPMcore_FOUND ) -- add_definitions(-DWITH_KPMCORE22) --endif() --find_package( KPMcore 3.0.3 QUIET ) -+find_package( KPMcore 3.2 QUIET ) - # 3.0.3 and newer has fixes for NVMe support; allow 3.0.2, but warn - # about it .. needs to use a different feature name because it otherwise - # gets reported as KPMcore (the package). -@@ -25,15 +21,6 @@ - add_feature_info( KPMcoreNVMe KPMcore_FOUND "Older KPMcore with no NVMe support" ) - endif() - --find_library( atasmart_LIB atasmart ) --find_library( blkid_LIB blkid ) --if( NOT atasmart_LIB ) -- message( WARNING "atasmart library not found." ) --endif() --if( NOT blkid_LIB ) -- message( WARNING "blkid library not found." ) --endif() -- - - include_directories( ${KPMCORE_INCLUDE_DIR} ) - include_directories( ${PROJECT_BINARY_DIR}/src/libcalamaresui ) -diff -Naur calamares-3.1.8/src/modules/partition/core/KPMHelpers.cpp calamares-3.1.8-p/src/modules/partition/core/KPMHelpers.cpp ---- calamares-3.1.8/src/modules/partition/core/KPMHelpers.cpp 2017-11-14 16:18:58.000000000 +0100 -+++ calamares-3.1.8-p/src/modules/partition/core/KPMHelpers.cpp 2017-11-18 13:11:35.255540490 +0100 -@@ -116,9 +116,7 @@ - PartitionTable::Flags flags ) - { - FileSystem* fs = FileSystemFactory::create( fsType, firstSector, lastSector --#ifdef WITH_KPMCORE22 - ,device.logicalSize() --#endif - ); - return new Partition( - parent, -@@ -153,9 +151,7 @@ - FileSystemFactory::create( FileSystem::Luks, - firstSector, - lastSector --#ifdef WITH_KPMCORE22 - ,device.logicalSize() --#endif - ) ); - if ( !fs ) - { -@@ -186,9 +182,7 @@ - partition->fileSystem().type(), - partition->firstSector(), - partition->lastSector() --#ifdef WITH_KPMCORE22 - ,device->logicalSize() --#endif - ); - return new Partition( partition->parent(), - *device, -diff -Naur calamares-3.1.8/src/modules/partition/jobs/FillGlobalStorageJob.cpp calamares-3.1.8-p/src/modules/partition/jobs/FillGlobalStorageJob.cpp ---- calamares-3.1.8/src/modules/partition/jobs/FillGlobalStorageJob.cpp 2017-11-14 16:18:58.000000000 +0100 -+++ calamares-3.1.8-p/src/modules/partition/jobs/FillGlobalStorageJob.cpp 2017-11-18 13:11:35.256540518 +0100 -@@ -77,50 +77,6 @@ - return uuid; - } - --// TODO: this will be available from KPMCore soon --static const char* filesystem_labels[] = { -- "unknown", -- "extended", -- -- "ext2", -- "ext3", -- "ext4", -- "linuxswap", -- "fat16", -- "fat32", -- "ntfs", -- "reiser", -- "reiser4", -- "xfs", -- "jfs", -- "hfs", -- "hfsplus", -- "ufs", -- "unformatted", -- "btrfs", -- "hpfs", -- "luks", -- "ocfs2", -- "zfs", -- "exfat", -- "nilfs2", -- "lvm2 pv", -- "f2fs", -- "udf", -- "iso9660", --}; -- --Q_STATIC_ASSERT_X((sizeof(filesystem_labels) / sizeof(char *)) >= FileSystem::__lastType, "Mismatch in filesystem labels"); -- --static QString --untranslatedTypeName(FileSystem::Type t) --{ -- -- Q_ASSERT( t >= 0 ); -- Q_ASSERT( t <= FileSystem::__lastType ); -- -- return QLatin1String(filesystem_labels[t]); --} - - static QVariant - mapForPartition( Partition* partition, const QString& uuid ) -@@ -129,7 +85,7 @@ - map[ "device" ] = partition->partitionPath(); - map[ "mountPoint" ] = PartitionInfo::mountPoint( partition ); - map[ "fsName" ] = partition->fileSystem().name(); -- map[ "fs" ] = untranslatedTypeName( partition->fileSystem().type() ); -+ map[ "fs" ] = partition->fileSystem().name( { QStringLiteral("C") } ); // Untranslated - if ( partition->fileSystem().type() == FileSystem::Luks && - dynamic_cast< FS::luks& >( partition->fileSystem() ).innerFS() ) - map[ "fs" ] = dynamic_cast< FS::luks& >( partition->fileSystem() ).innerFS()->name(); -diff -Naur calamares-3.1.8/src/modules/partition/tests/PartitionJobTests.cpp calamares-3.1.8-p/src/modules/partition/tests/PartitionJobTests.cpp ---- calamares-3.1.8/src/modules/partition/tests/PartitionJobTests.cpp 2017-11-14 16:18:58.000000000 +0100 -+++ calamares-3.1.8-p/src/modules/partition/tests/PartitionJobTests.cpp 2017-11-18 13:11:35.255540490 +0100 -@@ -219,9 +219,7 @@ - else - lastSector = freeSpacePartition->lastSector(); - FileSystem* fs = FileSystemFactory::create( type, firstSector, lastSector --#ifdef WITH_KPMCORE22 - ,m_device->logicalSize() --#endif - ); - - Partition* partition = new Partition( diff --git a/app-admin/calamares/files/calamares-3.1.8-openrc-dmcrypt-cfg.patch b/app-admin/calamares/files/calamares-3.1.8-openrc-dmcrypt-cfg.patch deleted file mode 100644 index d39e3fab..00000000 --- a/app-admin/calamares/files/calamares-3.1.8-openrc-dmcrypt-cfg.patch +++ /dev/null @@ -1,80 +0,0 @@ -diff -Nur a/src/modules/openrcdmcryptcfg/main.py b/src/modules/openrcdmcryptcfg/main.py ---- a/src/modules/openrcdmcryptcfg/main.py 1970-01-01 01:00:00.000000000 +0100 -+++ b/src/modules/openrcdmcryptcfg/main.py 2017-08-22 19:23:32.660085460 +0100 -@@ -0,0 +1,61 @@ -+#!/usr/bin/env python3 -+# -*- coding: utf-8 -*- -+# -+# === This file is part of Calamares - === -+# -+# Copyright 2017, Ghiunhan Mamut -+# -+# Calamares is free software: you can redistribute it and/or modify -+# it under the terms of the GNU General Public License as published by -+# the Free Software Foundation, either version 3 of the License, or -+# (at your option) any later version. -+# -+# Calamares is distributed in the hope that it will be useful, -+# but WITHOUT ANY WARRANTY; without even the implied warranty of -+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+# GNU General Public License for more details. -+# -+# You should have received a copy of the GNU General Public License -+# along with Calamares. If not, see . -+ -+import libcalamares -+import os.path -+ -+ -+def write_dmcrypt_conf(partitions, root_mount_point, dmcrypt_conf_path): -+ crypto_target = "" -+ crypto_source = "" -+ -+ for partition in partitions: -+ if partition["mountPoint"] == "/home" and not "luksMapperName" in partition: -+ pass -+ -+ elif partition["mountPoint"] == "/home" and "luksMapperName" in partition: -+ crypto_target = partition["luksMapperName"] -+ crypto_source = "/dev/disk/by-uuid/{!s}".format(partition["uuid"]) -+ with open(os.path.join(root_mount_point, dmcrypt_conf_path), 'a+') as dmcrypt_file: -+ dmcrypt_file.write("\ntarget=" + crypto_target) -+ dmcrypt_file.write("\nsource=" + crypto_source) -+ dmcrypt_file.write("\nkey=/crypto_keyfile.bin") -+ dmcrypt_file.write("\n") -+ dmcrypt_file.close() -+ -+ elif not partition["mountPoint"] == "/home" in partition: -+ pass -+ -+ return None -+ -+ -+def run(): -+ """ -+ This module configures the OpenRC dmcrypt service for an encrypted /home partition. -+ :return: -+ """ -+ -+ root_mount_point = libcalamares.globalstorage.value("rootMountPoint") -+ dmcrypt_conf_path = libcalamares.job.configuration["configFilePath"] -+ partitions = libcalamares.globalstorage.value("partitions") -+ -+ dmcrypt_conf_path = dmcrypt_conf_path.lstrip('/') -+ -+ return write_dmcrypt_conf(partitions, root_mount_point, dmcrypt_conf_path) -diff -Nur a/src/modules/openrcdmcryptcfg/module.desc b/src/modules/openrcdmcryptcfg/module.desc ---- a/src/modules/openrcdmcryptcfg/module.desc 1970-01-01 01:00:00.000000000 +0100 -+++ b/src/modules/openrcdmcryptcfg/module.desc 2017-08-22 13:11:15.198714035 +0100 -@@ -0,0 +1,5 @@ -+--- -+type: "job" -+name: "openrcdmcryptcfg" -+interface: "python" -+script: "main.py" -diff -Nur a/src/modules/openrcdmcryptcfg/openrcdmcryptcfg.conf b/src/modules/openrcdmcryptcfg/openrcdmcryptcfg.conf ---- a/src/modules/openrcdmcryptcfg/openrcdmcryptcfg.conf 1970-01-01 01:00:00.000000000 +0100 -+++ b/src/modules/openrcdmcryptcfg/openrcdmcryptcfg.conf 2017-08-22 13:11:15.198714035 +0100 -@@ -0,0 +1,2 @@ -+--- -+configFilePath: /etc/conf.d/dmcrypt diff --git a/app-admin/calamares/files/calamares-dont-run-locale-gen.patch b/app-admin/calamares/files/calamares-dont-run-locale-gen.patch new file mode 100644 index 00000000..29ca6a61 --- /dev/null +++ b/app-admin/calamares/files/calamares-dont-run-locale-gen.patch @@ -0,0 +1,42 @@ +diff -Nur a/src/modules/localecfg/main.py b/src/modules/localecfg/main.py +--- a/src/modules/localecfg/main.py 2017-11-14 15:18:58.000000000 +0000 ++++ b/src/modules/localecfg/main.py 2017-11-20 18:56:23.801595116 +0000 +@@ -47,38 +47,6 @@ + + install_path = libcalamares.globalstorage.value("rootMountPoint") + +- # restore backup if available +- if os.path.exists('/etc/locale.gen.bak'): +- shutil.copy2("{!s}/etc/locale.gen.bak".format(install_path), +- "{!s}/etc/locale.gen".format(install_path)) +- +- # run locale-gen if detected +- if os.path.exists('/etc/locale.gen'): +- text = [] +- +- with open("{!s}/etc/locale.gen".format(install_path), "r") as gen: +- text = gen.readlines() +- +- # we want unique values, so locale_values should have 1 or 2 items +- locale_values = set(locale_conf.values()) +- +- with open("{!s}/etc/locale.gen".format(install_path), "w") as gen: +- for line in text: +- # always enable en_US +- if en_us_locale in line and line[0] == "#": +- # uncomment line +- line = line[1:].lstrip() +- +- for locale_value in locale_values: +- if locale_value in line and line[0] == "#": +- # uncomment line +- line = line[1:].lstrip() +- +- gen.write(line) +- +- libcalamares.utils.target_env_call(['locale-gen']) +- print('locale.gen done') +- + # write /etc/locale.conf + locale_conf_path = os.path.join(install_path, "etc/locale.conf") + with open(locale_conf_path, "w") as lcf: diff --git a/app-admin/calamares/files/calamares-kpmcore-3.2.patch b/app-admin/calamares/files/calamares-kpmcore-3.2.patch new file mode 100644 index 00000000..07e506ec --- /dev/null +++ b/app-admin/calamares/files/calamares-kpmcore-3.2.patch @@ -0,0 +1,146 @@ +diff -Naur calamares-3.1.8/src/modules/partition/CMakeLists.txt calamares-3.1.8-p/src/modules/partition/CMakeLists.txt +--- calamares-3.1.8/src/modules/partition/CMakeLists.txt 2017-11-14 16:18:58.000000000 +0100 ++++ calamares-3.1.8-p/src/modules/partition/CMakeLists.txt 2017-11-18 13:16:38.335840619 +0100 +@@ -5,14 +5,10 @@ + include(GenerateExportHeader) + find_package( KF5 REQUIRED CoreAddons ) + +-# These are needed because KPMcore links publicly against ConfigCore, I18n, IconThemes, KIOCore and Service +-find_package( KF5 REQUIRED Config I18n IconThemes KIO Service ) ++find_package( Qt5 REQUIRED DBus ) ++find_package( KF5 REQUIRED Config I18n WidgetsAddons Service ) + +-find_package( KPMcore 3.1.50 QUIET ) +-if ( KPMcore_FOUND ) +- add_definitions(-DWITH_KPMCORE22) +-endif() +-find_package( KPMcore 3.0.3 QUIET ) ++find_package( KPMcore 3.2 QUIET ) + # 3.0.3 and newer has fixes for NVMe support; allow 3.0.2, but warn + # about it .. needs to use a different feature name because it otherwise + # gets reported as KPMcore (the package). +@@ -25,15 +21,6 @@ + add_feature_info( KPMcoreNVMe KPMcore_FOUND "Older KPMcore with no NVMe support" ) + endif() + +-find_library( atasmart_LIB atasmart ) +-find_library( blkid_LIB blkid ) +-if( NOT atasmart_LIB ) +- message( WARNING "atasmart library not found." ) +-endif() +-if( NOT blkid_LIB ) +- message( WARNING "blkid library not found." ) +-endif() +- + + include_directories( ${KPMCORE_INCLUDE_DIR} ) + include_directories( ${PROJECT_BINARY_DIR}/src/libcalamaresui ) +diff -Naur calamares-3.1.8/src/modules/partition/core/KPMHelpers.cpp calamares-3.1.8-p/src/modules/partition/core/KPMHelpers.cpp +--- calamares-3.1.8/src/modules/partition/core/KPMHelpers.cpp 2017-11-14 16:18:58.000000000 +0100 ++++ calamares-3.1.8-p/src/modules/partition/core/KPMHelpers.cpp 2017-11-18 13:11:35.255540490 +0100 +@@ -116,9 +116,7 @@ + PartitionTable::Flags flags ) + { + FileSystem* fs = FileSystemFactory::create( fsType, firstSector, lastSector +-#ifdef WITH_KPMCORE22 + ,device.logicalSize() +-#endif + ); + return new Partition( + parent, +@@ -153,9 +151,7 @@ + FileSystemFactory::create( FileSystem::Luks, + firstSector, + lastSector +-#ifdef WITH_KPMCORE22 + ,device.logicalSize() +-#endif + ) ); + if ( !fs ) + { +@@ -186,9 +182,7 @@ + partition->fileSystem().type(), + partition->firstSector(), + partition->lastSector() +-#ifdef WITH_KPMCORE22 + ,device->logicalSize() +-#endif + ); + return new Partition( partition->parent(), + *device, +diff -Naur calamares-3.1.8/src/modules/partition/jobs/FillGlobalStorageJob.cpp calamares-3.1.8-p/src/modules/partition/jobs/FillGlobalStorageJob.cpp +--- calamares-3.1.8/src/modules/partition/jobs/FillGlobalStorageJob.cpp 2017-11-14 16:18:58.000000000 +0100 ++++ calamares-3.1.8-p/src/modules/partition/jobs/FillGlobalStorageJob.cpp 2017-11-18 13:11:35.256540518 +0100 +@@ -77,50 +77,6 @@ + return uuid; + } + +-// TODO: this will be available from KPMCore soon +-static const char* filesystem_labels[] = { +- "unknown", +- "extended", +- +- "ext2", +- "ext3", +- "ext4", +- "linuxswap", +- "fat16", +- "fat32", +- "ntfs", +- "reiser", +- "reiser4", +- "xfs", +- "jfs", +- "hfs", +- "hfsplus", +- "ufs", +- "unformatted", +- "btrfs", +- "hpfs", +- "luks", +- "ocfs2", +- "zfs", +- "exfat", +- "nilfs2", +- "lvm2 pv", +- "f2fs", +- "udf", +- "iso9660", +-}; +- +-Q_STATIC_ASSERT_X((sizeof(filesystem_labels) / sizeof(char *)) >= FileSystem::__lastType, "Mismatch in filesystem labels"); +- +-static QString +-untranslatedTypeName(FileSystem::Type t) +-{ +- +- Q_ASSERT( t >= 0 ); +- Q_ASSERT( t <= FileSystem::__lastType ); +- +- return QLatin1String(filesystem_labels[t]); +-} + + static QVariant + mapForPartition( Partition* partition, const QString& uuid ) +@@ -129,7 +85,7 @@ + map[ "device" ] = partition->partitionPath(); + map[ "mountPoint" ] = PartitionInfo::mountPoint( partition ); + map[ "fsName" ] = partition->fileSystem().name(); +- map[ "fs" ] = untranslatedTypeName( partition->fileSystem().type() ); ++ map[ "fs" ] = partition->fileSystem().name( { QStringLiteral("C") } ); // Untranslated + if ( partition->fileSystem().type() == FileSystem::Luks && + dynamic_cast< FS::luks& >( partition->fileSystem() ).innerFS() ) + map[ "fs" ] = dynamic_cast< FS::luks& >( partition->fileSystem() ).innerFS()->name(); +diff -Naur calamares-3.1.8/src/modules/partition/tests/PartitionJobTests.cpp calamares-3.1.8-p/src/modules/partition/tests/PartitionJobTests.cpp +--- calamares-3.1.8/src/modules/partition/tests/PartitionJobTests.cpp 2017-11-14 16:18:58.000000000 +0100 ++++ calamares-3.1.8-p/src/modules/partition/tests/PartitionJobTests.cpp 2017-11-18 13:11:35.255540490 +0100 +@@ -219,9 +219,7 @@ + else + lastSector = freeSpacePartition->lastSector(); + FileSystem* fs = FileSystemFactory::create( type, firstSector, lastSector +-#ifdef WITH_KPMCORE22 + ,m_device->logicalSize() +-#endif + ); + + Partition* partition = new Partition( diff --git a/app-admin/calamares/files/calamares-openrc-dmcrypt-cfg-r1.patch b/app-admin/calamares/files/calamares-openrc-dmcrypt-cfg-r1.patch new file mode 100644 index 00000000..67279b7c --- /dev/null +++ b/app-admin/calamares/files/calamares-openrc-dmcrypt-cfg-r1.patch @@ -0,0 +1,84 @@ +diff -Nur a/src/modules/openrcdmcryptcfg/main.py b/src/modules/openrcdmcryptcfg/main.py +--- a/src/modules/openrcdmcryptcfg/main.py 1970-01-01 01:00:00.000000000 +0100 ++++ b/src/modules/openrcdmcryptcfg/main.py 2017-12-02 19:40:18.212303089 +0000 +@@ -0,0 +1,65 @@ ++#!/usr/bin/env python3 ++# -*- coding: utf-8 -*- ++# ++# === This file is part of Calamares - === ++# ++# Copyright 2017, Ghiunhan Mamut ++# ++# Calamares is free software: you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation, either version 3 of the License, or ++# (at your option) any later version. ++# ++# Calamares is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with Calamares. If not, see . ++ ++import libcalamares ++import os.path ++ ++def write_dmcrypt_conf(partitions, root_mount_point, dmcrypt_conf_path): ++ crypto_target = "" ++ crypto_source = "" ++ ++ for partition in partitions: ++ has_luks = "luksMapperName" in partition ++ skip_partitions = partition["mountPoint"] == "/" or partition["fs"] == "linuxswap" ++ ++ if not has_luks and not skip_partitions: ++ libcalamares.utils.debug( ++ "Skip writing OpenRC LUKS configuration for partition {!s}".format(partition["mountPoint"])) ++ ++ if has_luks and not skip_partitions: ++ crypto_target = partition["luksMapperName"] ++ crypto_source = "/dev/disk/by-uuid/{!s}".format(partition["uuid"]) ++ libcalamares.utils.debug( ++ "Writing OpenRC LUKS configuration for partition {!s}".format(partition["mountPoint"])) ++ ++ with open(os.path.join(root_mount_point, dmcrypt_conf_path), 'a+') as dmcrypt_file: ++ dmcrypt_file.write("\ntarget=" + crypto_target) ++ dmcrypt_file.write("\nsource=" + crypto_source) ++ dmcrypt_file.write("\nkey=/crypto_keyfile.bin") ++ dmcrypt_file.write("\n") ++ ++ if has_luks and skip_partitions: ++ pass # root and swap partitions should be handled by initramfs generators ++ ++ return None ++ ++def run(): ++ """ ++ This module configures OpenRC dmcrypt service for LUKS encrypted partitions. ++ :return: ++ """ ++ ++ root_mount_point = libcalamares.globalstorage.value("rootMountPoint") ++ dmcrypt_conf_path = libcalamares.job.configuration["configFilePath"] ++ partitions = libcalamares.globalstorage.value("partitions") ++ ++ dmcrypt_conf_path = dmcrypt_conf_path.lstrip('/') ++ ++ return write_dmcrypt_conf(partitions, root_mount_point, dmcrypt_conf_path) +diff -Nur a/src/modules/openrcdmcryptcfg/module.desc b/src/modules/openrcdmcryptcfg/module.desc +--- a/src/modules/openrcdmcryptcfg/module.desc 1970-01-01 01:00:00.000000000 +0100 ++++ b/src/modules/openrcdmcryptcfg/module.desc 2017-12-02 16:48:49.663145918 +0000 +@@ -0,0 +1,5 @@ ++--- ++type: "job" ++name: "openrcdmcryptcfg" ++interface: "python" ++script: "main.py" +diff -Nur a/src/modules/openrcdmcryptcfg/openrcdmcryptcfg.conf b/src/modules/openrcdmcryptcfg/openrcdmcryptcfg.conf +--- a/src/modules/openrcdmcryptcfg/openrcdmcryptcfg.conf 1970-01-01 01:00:00.000000000 +0100 ++++ b/src/modules/openrcdmcryptcfg/openrcdmcryptcfg.conf 2017-12-02 16:48:49.663145918 +0000 +@@ -0,0 +1,2 @@ ++--- ++configFilePath: /etc/conf.d/dmcrypt -- cgit v1.2.3