From 086a019d19cc32c28731c7f65a55ffdad94f4ec3 Mon Sep 17 00:00:00 2001 From: n3rdopolis Date: Sun, 6 Aug 2017 11:43:24 -0400 Subject: [PATCH 1/5] Correct update-initramfs command This allows it to create a new initramfs, and replace it. This will better ensure that calamares generated initramfs is used --- src/modules/initramfs/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/initramfs/main.py b/src/modules/initramfs/main.py index 947c034ea..b96abd7f0 100644 --- a/src/modules/initramfs/main.py +++ b/src/modules/initramfs/main.py @@ -27,7 +27,7 @@ def run(): :return: """ - return_code = target_env_call(["update-initramfs", "-k", "all", "-u"]) + return_code = target_env_call(["update-initramfs", "-k", "all", "-c", "-t"]) if return_code != 0: return ( From aac783ed3a847737f7b0cad47fcc63998daa4e3d Mon Sep 17 00:00:00 2001 From: n3rdopolis Date: Sun, 6 Aug 2017 12:07:12 -0400 Subject: [PATCH 2/5] Try to correct character per line count --- src/modules/initramfs/main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/modules/initramfs/main.py b/src/modules/initramfs/main.py index b96abd7f0..1bff39489 100644 --- a/src/modules/initramfs/main.py +++ b/src/modules/initramfs/main.py @@ -27,7 +27,8 @@ def run(): :return: """ - return_code = target_env_call(["update-initramfs", "-k", "all", "-c", "-t"]) + return_code = target_env_call(["update-initramfs", "-k", "all", "-c", + "-t"]) if return_code != 0: return ( From 05e48d43570013c23465975c263dc55840c1a09a Mon Sep 17 00:00:00 2001 From: n3rdopolis Date: Sun, 6 Aug 2017 12:20:26 -0400 Subject: [PATCH 3/5] Remove whitespace --- src/modules/initramfs/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/initramfs/main.py b/src/modules/initramfs/main.py index 1bff39489..ff7d41f27 100644 --- a/src/modules/initramfs/main.py +++ b/src/modules/initramfs/main.py @@ -27,7 +27,7 @@ def run(): :return: """ - return_code = target_env_call(["update-initramfs", "-k", "all", "-c", + return_code = target_env_call(["update-initramfs", "-k", "all", "-c", "-t"]) if return_code != 0: From f0a143cd5c088a249ed2c20e8e096000985ebd12 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Thu, 10 Aug 2017 15:45:38 -0400 Subject: [PATCH 4/5] PythonJob: switching between C++ and Python is hard --- src/modules/dummypython/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/dummypython/main.py b/src/modules/dummypython/main.py index 7cca65109..fd9a2abda 100644 --- a/src/modules/dummypython/main.py +++ b/src/modules/dummypython/main.py @@ -42,7 +42,7 @@ def run(): accumulator += "This job's path: " + libcalamares.job.working_path libcalamares.utils.debug(accumulator) - accumulator = "*** Job configuration "; + accumulator = "*** Job configuration " accumulator += str(libcalamares.job.configuration) libcalamares.utils.debug(accumulator) From 40c3b3dd04dbc15b67ed20f10ed46d1738438da6 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Thu, 10 Aug 2017 16:04:02 -0400 Subject: [PATCH 5/5] Modules: initramfscfg copy files from own install-dir FIXES #770 --- src/modules/initramfscfg/main.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/modules/initramfscfg/main.py b/src/modules/initramfscfg/main.py index 3f77ccd6d..d935328d6 100644 --- a/src/modules/initramfscfg/main.py +++ b/src/modules/initramfscfg/main.py @@ -8,6 +8,7 @@ # Copyright 2016, David McKinney # Copyright 2016, Kevin Kofler # Copyright 2017, Alf Gaida +# Copyright 2017, Adriaan de Groot # # Calamares is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -48,14 +49,19 @@ def copy_initramfs_hooks(partitions, root_mount_point): if encrypt_hook: target = "{!s}/usr/share/initramfs-tools/hooks/encrypt_hook".format( root_mount_point) + + # Find where this module is installed + _filename = inspect.getframeinfo(inspect.currentframe()).filename + _path = os.path.dirname(os.path.abspath(_filename)) + if unencrypted_separate_boot: shutil.copy2( - "/usr/lib/calamares/modules/initramfscfg/encrypt_hook_nokey", + os.path.join(_path, "encrypt_hook_nokey"), target ) else: shutil.copy2( - "/usr/lib/calamares/modules/initramfscfg/encrypt_hook", + os.path.join(_path, "encrypt_hook"), target ) os.chmod(target, 0o755)