From 3f3b523a5c90dfb76019964a235c12f1279f4b95 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 15 Jul 2017 23:09:49 +0100 Subject: app-admin/calamares : version bump --- app-admin/calamares/Manifest | 2 +- app-admin/calamares/calamares-3.1.0-r3.ebuild | 79 ---------------------- app-admin/calamares/calamares-3.1.1.ebuild | 79 ++++++++++++++++++++++ ...alamares-3.1.0-luks-fstab-write-devmapper.patch | 30 -------- .../files/calamares-3.1.0-openrc-dmcrypt-cfg.patch | 78 --------------------- ...alamares-3.1.1-luks-fstab-write-devmapper.patch | 30 ++++++++ .../files/calamares-3.1.1-openrc-dmcrypt-cfg.patch | 78 +++++++++++++++++++++ 7 files changed, 188 insertions(+), 188 deletions(-) delete mode 100644 app-admin/calamares/calamares-3.1.0-r3.ebuild create mode 100644 app-admin/calamares/calamares-3.1.1.ebuild delete mode 100644 app-admin/calamares/files/calamares-3.1.0-luks-fstab-write-devmapper.patch delete mode 100644 app-admin/calamares/files/calamares-3.1.0-openrc-dmcrypt-cfg.patch create mode 100644 app-admin/calamares/files/calamares-3.1.1-luks-fstab-write-devmapper.patch create mode 100644 app-admin/calamares/files/calamares-3.1.1-openrc-dmcrypt-cfg.patch (limited to 'app-admin/calamares') diff --git a/app-admin/calamares/Manifest b/app-admin/calamares/Manifest index a09258eb..5641d7b8 100644 --- a/app-admin/calamares/Manifest +++ b/app-admin/calamares/Manifest @@ -1 +1 @@ -DIST calamares-3.1.0.tar.gz 2215820 SHA256 7b4c74fc350624a17eb8b8187ade490711bfdc608d2be07322c8a3fc0a449276 SHA512 17c15aafbc811f42246f8300f64ffe7d44b43ac24f5b6ced15c83715c5fff9644060964de82cc3e7021c710e6eebbc124785d9d7b85613c5f190ec0f8d5d5389 WHIRLPOOL 6c8e46aff3700d26e876dd6f02bf28e55ea59cebe46438e64a8d04e921df9e35d0c1c3077479767b67284805103c16cda7ef5e1a2ec50d9e735093cb9e04b886 +DIST calamares-3.1.1.tar.gz 4895018 SHA256 1644f28f0ee166411dafc849d1d1c9b5bf4f7346ebaf430ee3cf1a7d330a85aa SHA512 4c45f949075a46c6b1de14b322f7d124b4346b11c112b410a216359530d055d21ae8357609d2279614da5490f72f38aebf7844942a2e8a8c2a244cf31350720c WHIRLPOOL 8be229cdcbea88c396a98f42232b0dcb30df81895f927ef45c815be618f5d094f85e2b0fdda7cdf93d6a953d785a7c45bd3f0eae70d2e8775a0bccb8d0a19b3e diff --git a/app-admin/calamares/calamares-3.1.0-r3.ebuild b/app-admin/calamares/calamares-3.1.0-r3.ebuild deleted file mode 100644 index ebf426f6..00000000 --- a/app-admin/calamares/calamares-3.1.0-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_4 ) - -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_4] - ) - >=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() { - # by default, calamares writes UUID=partition-uuid in fstab, regardless - # is luks or not. This is utterly broken for many reasons. The patch - # below will make calamares to write proper /dev/mapper entries. - epatch "${FILESDIR}"/${P}-luks-fstab-write-devmapper.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.1.ebuild b/app-admin/calamares/calamares-3.1.1.ebuild new file mode 100644 index 00000000..ebf426f6 --- /dev/null +++ b/app-admin/calamares/calamares-3.1.1.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_4 ) + +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_4] + ) + >=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() { + # by default, calamares writes UUID=partition-uuid in fstab, regardless + # is luks or not. This is utterly broken for many reasons. The patch + # below will make calamares to write proper /dev/mapper entries. + epatch "${FILESDIR}"/${P}-luks-fstab-write-devmapper.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/files/calamares-3.1.0-luks-fstab-write-devmapper.patch b/app-admin/calamares/files/calamares-3.1.0-luks-fstab-write-devmapper.patch deleted file mode 100644 index 6b6845d8..00000000 --- a/app-admin/calamares/files/calamares-3.1.0-luks-fstab-write-devmapper.patch +++ /dev/null @@ -1,30 +0,0 @@ -diff -Nur a/src/modules/fstab/main.py b/src/modules/fstab/main.py ---- a/src/modules/fstab/main.py 2016-11-25 17:38:49.000000000 +0000 -+++ b/src/modules/fstab/main.py 2017-06-02 15:46:38.124863165 +0100 -@@ -257,12 +257,20 @@ - check=check, - ) - -- return dict(device="UUID=" + partition["uuid"], -- mount_point=mount_point or "swap", -- fs=filesystem, -- options=options, -- check=check, -- ) -+ if "luksMapperName" in partition: -+ return dict(device="/dev/mapper/" + partition["luksMapperName"], -+ mount_point=mount_point or "swap", -+ fs=filesystem, -+ options=options, -+ check=check, -+ ) -+ else: -+ return dict(device="UUID=" + partition["uuid"], -+ mount_point=mount_point or "swap", -+ fs=filesystem, -+ options=options, -+ check=check, -+ ) - - def print_fstab_line(self, dct, file=None): - """ Prints line to '/etc/fstab' file. """ diff --git a/app-admin/calamares/files/calamares-3.1.0-openrc-dmcrypt-cfg.patch b/app-admin/calamares/files/calamares-3.1.0-openrc-dmcrypt-cfg.patch deleted file mode 100644 index 9c0cd6b8..00000000 --- a/app-admin/calamares/files/calamares-3.1.0-openrc-dmcrypt-cfg.patch +++ /dev/null @@ -1,78 +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-06-03 17:34:02.791096200 +0100 -@@ -0,0 +1,59 @@ -+#!/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 "luksMapperName" in partition: -+ crypto_target = partition["luksMapperName"] -+ crypto_source = "/dev/disk/by-uuid/{!s}".format(partition["uuid"]) -+ -+ if not "luksMapperName" in partition: -+ return None -+ -+ 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() -+ -+ 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-06-03 14:39:12.592391951 +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-06-03 14:44:03.981411513 +0100 -@@ -0,0 +1,2 @@ -+--- -+configFilePath: /etc/conf.d/dmcrypt diff --git a/app-admin/calamares/files/calamares-3.1.1-luks-fstab-write-devmapper.patch b/app-admin/calamares/files/calamares-3.1.1-luks-fstab-write-devmapper.patch new file mode 100644 index 00000000..6b6845d8 --- /dev/null +++ b/app-admin/calamares/files/calamares-3.1.1-luks-fstab-write-devmapper.patch @@ -0,0 +1,30 @@ +diff -Nur a/src/modules/fstab/main.py b/src/modules/fstab/main.py +--- a/src/modules/fstab/main.py 2016-11-25 17:38:49.000000000 +0000 ++++ b/src/modules/fstab/main.py 2017-06-02 15:46:38.124863165 +0100 +@@ -257,12 +257,20 @@ + check=check, + ) + +- return dict(device="UUID=" + partition["uuid"], +- mount_point=mount_point or "swap", +- fs=filesystem, +- options=options, +- check=check, +- ) ++ if "luksMapperName" in partition: ++ return dict(device="/dev/mapper/" + partition["luksMapperName"], ++ mount_point=mount_point or "swap", ++ fs=filesystem, ++ options=options, ++ check=check, ++ ) ++ else: ++ return dict(device="UUID=" + partition["uuid"], ++ mount_point=mount_point or "swap", ++ fs=filesystem, ++ options=options, ++ check=check, ++ ) + + def print_fstab_line(self, dct, file=None): + """ Prints line to '/etc/fstab' file. """ diff --git a/app-admin/calamares/files/calamares-3.1.1-openrc-dmcrypt-cfg.patch b/app-admin/calamares/files/calamares-3.1.1-openrc-dmcrypt-cfg.patch new file mode 100644 index 00000000..9c0cd6b8 --- /dev/null +++ b/app-admin/calamares/files/calamares-3.1.1-openrc-dmcrypt-cfg.patch @@ -0,0 +1,78 @@ +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-06-03 17:34:02.791096200 +0100 +@@ -0,0 +1,59 @@ ++#!/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 "luksMapperName" in partition: ++ crypto_target = partition["luksMapperName"] ++ crypto_source = "/dev/disk/by-uuid/{!s}".format(partition["uuid"]) ++ ++ if not "luksMapperName" in partition: ++ return None ++ ++ 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() ++ ++ 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-06-03 14:39:12.592391951 +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-06-03 14:44:03.981411513 +0100 +@@ -0,0 +1,2 @@ ++--- ++configFilePath: /etc/conf.d/dmcrypt -- cgit v1.2.3