summaryrefslogtreecommitdiff
path: root/app-admin
diff options
context:
space:
mode:
Diffstat (limited to 'app-admin')
-rw-r--r--app-admin/calamares/calamares-3.1.0-r2.ebuild (renamed from app-admin/calamares/calamares-3.1.0-r1.ebuild)6
-rw-r--r--app-admin/calamares/files/calamares-3.1.0-luks-fstab-write-devmapper.patch30
-rw-r--r--app-admin/calamares/files/calamares-3.1.0-luksfix.patch87
3 files changed, 34 insertions, 89 deletions
diff --git a/app-admin/calamares/calamares-3.1.0-r1.ebuild b/app-admin/calamares/calamares-3.1.0-r2.ebuild
index 44bd5a50..d954e877 100644
--- a/app-admin/calamares/calamares-3.1.0-r1.ebuild
+++ b/app-admin/calamares/calamares-3.1.0-r2.ebuild
@@ -48,8 +48,10 @@ DEPEND="
RDEPEND=">=app-misc/calamares-runtime-1.0[branding]"
src_prepare() {
- # luksfix (master) by frugalware, backported to stable
- # epatch "${FILESDIR}"/${P}-luksfix.patch
+ # 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
# 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)
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
new file mode 100644
index 00000000..6b6845d8
--- /dev/null
+++ b/app-admin/calamares/files/calamares-3.1.0-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.0-luksfix.patch b/app-admin/calamares/files/calamares-3.1.0-luksfix.patch
deleted file mode 100644
index af9a79bf..00000000
--- a/app-admin/calamares/files/calamares-3.1.0-luksfix.patch
+++ /dev/null
@@ -1,87 +0,0 @@
-diff -Nur a/src/modules/bootloader/main.py b/src/modules/bootloader/main.py
---- a/src/modules/bootloader/main.py 2017-02-17 15:21:02.000000000 +0000
-+++ b/src/modules/bootloader/main.py 2017-06-02 13:38:49.275348324 +0100
-@@ -98,14 +98,15 @@
- cryptdevice_params = []
-
- for partition in partitions:
-- if partition["fs"] == "linuxswap":
-+ if partition["fs"] == "linuxswap" and not "luksMapperName" in partition:
- swap_uuid = partition["uuid"]
-
- if partition["mountPoint"] == "/" and "luksMapperName" in partition:
- cryptdevice_params = [
- "cryptdevice=UUID={!s}:{!s}".format(partition["luksUuid"],
- partition["luksMapperName"]),
-- "root=/dev/mapper/{!s}".format(partition["luksMapperName"])
-+ "root=/dev/mapper/{!s}".format(partition["luksMapperName"]),
-+ "resume=/dev/mapper/{!s}".format(partition["luksMapperName"])
- ]
-
- if cryptdevice_params:
-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 13:28:53.792308347 +0100
-@@ -257,8 +257,23 @@
- check=check,
- )
-
-+ if filesystem == "swap" and "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,
-+ )
-+
- return dict(device="UUID=" + partition["uuid"],
-- mount_point=mount_point or "swap",
-+ mount_point=mount_point,
- fs=filesystem,
- options=options,
- check=check,
-diff -Nur a/src/modules/grubcfg/main.py b/src/modules/grubcfg/main.py
---- a/src/modules/grubcfg/main.py 2017-02-17 15:21:02.000000000 +0000
-+++ b/src/modules/grubcfg/main.py 2017-06-02 13:36:55.032340654 +0100
-@@ -48,7 +48,7 @@
-
- if dracut_bin == 0:
- for partition in partitions:
-- if partition["fs"] == "linuxswap":
-+ if partition["fs"] == "linuxswap" and not "luksMapperName" in partition:
- swap_uuid = partition["uuid"]
-
- if partition["fs"] == "linuxswap" and "luksMapperName" in partition:
-@@ -58,14 +58,15 @@
- cryptdevice_params = ["rd.luks.uuid={!s}".format(partition["luksUuid"])]
- else:
- for partition in partitions:
-- if partition["fs"] == "linuxswap":
-+ if partition["fs"] == "linuxswap" and not "luksMapperName" in partition:
- swap_uuid = partition["uuid"]
-
- if partition["mountPoint"] == "/" and "luksMapperName" in partition:
- cryptdevice_params = [
- "cryptdevice=UUID={!s}:{!s}".format(partition["luksUuid"],
- partition["luksMapperName"]),
-- "root=/dev/mapper/{!s}".format(partition["luksMapperName"])
-+ "root=/dev/mapper/{!s}".format(partition["luksMapperName"]),
-+ "resume=/dev/mapper/{!s}".format(partition["luksMapperName"])
- ]
-
- kernel_params = ["quiet"]
-@@ -80,6 +81,7 @@
- kernel_params.append("resume=UUID={!s}".format(swap_uuid))
-
- if dracut_bin == 0 and swap_outer_uuid:
-+ kernel_params.append("resume=/dev/mapper/{!s}".format(partition["luksMapperName"]))
- kernel_params.append("rd.luks.uuid={!s}".format(swap_outer_uuid))
-
- distributor_line = "GRUB_DISTRIBUTOR='{!s}'".format(distributor_replace)