From 21a4700d4251a9f63eb3f9cff68885c9544064f0 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Thu, 21 May 2020 16:16:07 +0100 Subject: app-admin/calamares : version bump --- .../files/calamares-openrc-dmcrypt-cfg-r1.patch | 84 ---------------------- 1 file changed, 84 deletions(-) delete mode 100644 app-admin/calamares/files/calamares-openrc-dmcrypt-cfg-r1.patch (limited to 'app-admin/calamares/files/calamares-openrc-dmcrypt-cfg-r1.patch') diff --git a/app-admin/calamares/files/calamares-openrc-dmcrypt-cfg-r1.patch b/app-admin/calamares/files/calamares-openrc-dmcrypt-cfg-r1.patch deleted file mode 100644 index 67279b7c..00000000 --- a/app-admin/calamares/files/calamares-openrc-dmcrypt-cfg-r1.patch +++ /dev/null @@ -1,84 +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-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