summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbill-auger <mr.j.spam.me@gmail.com>2017-12-09 12:38:54 -0500
committerbill-auger <mr.j.spam.me@gmail.com>2018-05-27 06:25:59 -0400
commit050a58301f7ded45c92cb62e3903108624f5cf68 (patch)
tree176d3d5e78c753450120e35ffbc39a18e698cc6f
parent7ee568d933edf108b587479c6a4b17fd4f974d79 (diff)
ok luks
-rwxr-xr-xmk12
-rw-r--r--settings.conf2
-rw-r--r--src/libcalamares/PacstrapCppJob.cpp5
-rw-r--r--src/modules/bootloader/main.py6
-rw-r--r--src/modules/grubcfg/main.py16
-rw-r--r--src/modules/pacstrap-base/pacstrap-base.cpp19
-rw-r--r--src/modules/pacstrap-base/pacstrap-base.h2
-rw-r--r--src/modules/pacstrap-gui/pacstrap-gui.cpp2
8 files changed, 43 insertions, 21 deletions
diff --git a/mk b/mk
index 42f7dc613..bf1c7e4e7 100755
--- a/mk
+++ b/mk
@@ -24,12 +24,12 @@ fi
echo "\n--- running cmake ---\n"
cd build
-cmake -DCMAKE_BUILD_TYPE=Debug \
- -DCMAKE_INSTALL_PREFIX=/usr \
- -DCMAKE_INSTALL_LIBDIR=lib \
- -DSKIP_MODULES="dracut dracutlukscfg dummycpp dummyprocess dummypython \
- dummypythonqt grubcfg initramfs initramfscfg tracking \
- interactiveterminal license plymouthcfg removeuser webview" ..
+cmake -DCMAKE_BUILD_TYPE=Debug \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_INSTALL_LIBDIR=lib \
+ -DSKIP_MODULES="dracut dracutlukscfg dummycpp dummyprocess dummypython \
+ dummypythonqt initramfs initramfscfg interactiveterminal \
+ license plymouthcfg removeuser tracking webview" ..
echo "\n--- running make uninstall ---\n"
diff --git a/settings.conf b/settings.conf
index 5d2d6e34e..3e3fe6473 100644
--- a/settings.conf
+++ b/settings.conf
@@ -89,7 +89,7 @@ sequence:
- displaymanager
- hwclock
- services
-# - grubcfg
+ - grubcfg
- bootloader
- umount
- show:
diff --git a/src/libcalamares/PacstrapCppJob.cpp b/src/libcalamares/PacstrapCppJob.cpp
index 3e30bc8f0..ae90093fc 100644
--- a/src/libcalamares/PacstrapCppJob.cpp
+++ b/src/libcalamares/PacstrapCppJob.cpp
@@ -83,12 +83,13 @@ const QString PacstrapCppJob::PACSTRAP_CLEANUP_CMD = "umount %1/dev/pts %1/d
const QString PacstrapCppJob::CHROOT_PREP_FMT = "mkdir -m 0755 -p {%1,%2}" ;
const QString PacstrapCppJob::DB_REFRESH_FMT = "pacman -S --print --config %1 --root %2 --refresh" ;
const QString PacstrapCppJob::LIST_PACKAGES_FMT = "pacman -S --print --config %1 --root %2 %3" ;
-const QString PacstrapCppJob::PACSTRAP_FMT = "pacstrap-calamares -C %1 %2 %3 --noprogressbar" ;
+const QString PacstrapCppJob::PACSTRAP_FMT = "pacstrap-calamares -M -C %1 %2 %3 --noprogressbar" ;
// const QString PacstrapCppJob::KEYRING_CMD = "pacman -Sy --noconfirm parabola-keyring" ;
const QString PacstrapCppJob::KEYRING_CMD = "pacman -Sy --noconfirm archlinux-keyring \
archlinux32-keyring \
archlinuxarm-keyring \
parabola-keyring && \
+ rm -rf /etc/pacman.d/gnupg/ && \
pacman-key --init && \
pacman-key --populate archlinux \
archlinux32 \
@@ -192,6 +193,8 @@ DEBUG_TRACE_EXEC
if (!!execStatus(chroot_prep_cmd )) return JobError(CHROOT_PREP_ERROR_MSG) ;
if (!!execStatus(pacman_sync_cmd , PACMAN_SYNC_PROPORTION)) return JobError(PACMAN_SYNC_ERROR_MSG) ;
+execStatus(QString("touch %1/etc/os-release").arg(this->mountPoint)) ; //FIXME:
+
if (!this->packages.isEmpty())
{
QVariantMap result = execWithProgress(list_packages_cmd , LIST_PACKAGES_PROPORTION) ;
diff --git a/src/modules/bootloader/main.py b/src/modules/bootloader/main.py
index f6fb1c648..07eb5f3df 100644
--- a/src/modules/bootloader/main.py
+++ b/src/modules/bootloader/main.py
@@ -213,12 +213,16 @@ def install_grub(efi_directory, fw_type):
:param fw_type:
"""
import json
+
+
print("bootloader::install_grub()" + fw_type)
print("bootloader::install_grub() boot_loader=" + json.dumps(libcalamares.globalstorage.value("bootLoader")))
if libcalamares.globalstorage.value("bootLoader") != None:
- print("bootloader::install_grub() boot_loader=" + json.dumps(libcalamares.globalstorage.value("bootLoader")["installPath"]))
+ print("bootloader::install_grub() installPath=" + json.dumps(libcalamares.globalstorage.value("bootLoader")["installPath"]))
print("bootloader::install_grub() grubMkconfig=" + libcalamares.job.configuration["grubMkconfig"])
print("bootloader::install_grub() grubCfg=" + libcalamares.job.configuration["grubCfg"])
+
+
if fw_type == "efi":
print("Bootloader: grub (efi)")
install_path = libcalamares.globalstorage.value("rootMountPoint")
diff --git a/src/modules/grubcfg/main.py b/src/modules/grubcfg/main.py
index 3ef68e46e..70684a240 100644
--- a/src/modules/grubcfg/main.py
+++ b/src/modules/grubcfg/main.py
@@ -57,6 +57,10 @@ def modify_grub_default(partitions, root_mount_point, distributor):
cryptdevice_params = []
+
+ print("modify_grub_default() root_mount_point=" + root_mount_point + " have_dracut=" + str(have_dracut))
+
+
if have_dracut:
for partition in partitions:
has_luks = "luksMapperName" in partition
@@ -77,6 +81,10 @@ def modify_grub_default(partitions, root_mount_point, distributor):
if partition["fs"] == "linuxswap" and not has_luks:
swap_uuid = partition["uuid"]
+
+ print("modify_grub_default() partition[device]=" + partition["device"] + " partition[mountPoint]=" + partition["mountPoint"] + " has_luks=" + str(has_luks))
+
+
if (partition["mountPoint"] == "/" and has_luks):
cryptdevice_params = [
"cryptdevice=UUID={!s}:{!s}".format(
@@ -120,6 +128,10 @@ def modify_grub_default(partitions, root_mount_point, distributor):
else:
overwrite = False
+
+ print("modify_grub_default() cryptdevice_params=" + str(cryptdevice_params) + " default_grub=" + default_grub + " os.path.exists(default_grub)=" + str(os.path.exists(default_grub)) + " overwrite=" + str(overwrite))
+
+
if os.path.exists(default_grub) and not overwrite:
with open(default_grub, 'r') as grub_file:
lines = [x.strip() for x in grub_file.readlines()]
@@ -202,6 +214,10 @@ def run():
fw_type = libcalamares.globalstorage.value("firmwareType")
+
+ print("grub run() bootLoader(is None)=" + str(libcalamares.globalstorage.value("bootLoader") is None) + " fw_type=" + fw_type + " efiSystemPartition=" + libcalamares.globalstorage.value("efiSystemPartition"))
+
+
if (libcalamares.globalstorage.value("bootLoader") is None
and fw_type != "efi"):
return None
diff --git a/src/modules/pacstrap-base/pacstrap-base.cpp b/src/modules/pacstrap-base/pacstrap-base.cpp
index f4aab99c3..1c8d714d7 100644
--- a/src/modules/pacstrap-base/pacstrap-base.cpp
+++ b/src/modules/pacstrap-base/pacstrap-base.cpp
@@ -24,8 +24,10 @@
/* PacstrapBaseJob private class constants */
-const QString PacstrapBaseJob::GRUB_THEME_FMT = "sed -i 's|[#]GRUB_THEME=.*|GRUB_THEME=/boot/grub/themes/GNUAxiom/theme.txt|' %1/etc/default/grub" ;
-const QString PacstrapBaseJob::GRUB_THEME_ERROR_MSG = "The grub theme installation command has failed." ;
+// const QString PacstrapBaseJob::GRUB_CRYPTO_FMT = "sed -i 's|^#GRUB_ENABLE_CRYPTODISK=y|GRUB_ENABLE_CRYPTODISK=y|' %1/etc/default/grub" ;
+const QString PacstrapBaseJob::GRUB_THEME_FMT = "sed -i 's|^#GRUB_THEME=.*|GRUB_THEME=/boot/grub/themes/parabola-laf/theme.txt|' %1/etc/default/grub" ;
+// const QString PacstrapBaseJob::GRUB_CRYPTO_ERROR_MSG = "The grub enable crypto command has failed." ;
+const QString PacstrapBaseJob::GRUB_THEME_ERROR_MSG = "The grub define theme command has failed." ;
/* PacstrapBaseJob public instance methods */
@@ -52,16 +54,11 @@ QString PacstrapBaseJob::getPackageList()
QString PacstrapBaseJob::chrootExec()
{
- QString grub_theme_cmd = GRUB_THEME_FMT.arg(MOUNTPOINT) ;
+// QString grub_crypto_cmd = GRUB_CRYPTO_FMT.arg(this->mountPoint) ;
+ QString grub_theme_cmd = GRUB_THEME_FMT .arg(this->mountPoint) ;
-QString grub_theme_kludge_cmd = QString("echo GRUB_THEME=/boot/grub/themes/GNUAxiom/theme.txt >> %1/etc/default/grub").arg(MOUNTPOINT) ;
-printf("[PACSTRAP-BASE]: grub_theme_cmd=%s\n" , grub_theme_cmd.toStdString().c_str()) ;
-printf("[PACSTRAP-BASE]: grub_theme_cmd IN:\n"); QProcess::execute(QString("/bin/sh -c \"cat %1/etc/default/grub\"").arg(MOUNTPOINT));
-
- if (!!execStatus(grub_theme_cmd)) return GRUB_THEME_ERROR_MSG ;
-
-if (!!execStatus(grub_theme_kludge_cmd)) return "grub_theme_kludge_cmd failed" ;
-printf("[PACSTRAP-BASE]: grub_theme_cmd OUT:\n"); QProcess::execute(QString("/bin/sh -c \"cat %1/etc/default/grub\"").arg(MOUNTPOINT));
+// if (!!execStatus(grub_crypto_cmd)) return GRUB_CRYPTO_ERROR_MSG ;
+ if (!!execStatus(grub_theme_cmd )) return GRUB_THEME_ERROR_MSG ;
return QString("") ;
}
diff --git a/src/modules/pacstrap-base/pacstrap-base.h b/src/modules/pacstrap-base/pacstrap-base.h
index 48a9b8b1a..81504d00b 100644
--- a/src/modules/pacstrap-base/pacstrap-base.h
+++ b/src/modules/pacstrap-base/pacstrap-base.h
@@ -42,7 +42,9 @@ protected:
private:
+// static const QString GRUB_CRYPTO_FMT ;
static const QString GRUB_THEME_FMT ;
+// static const QString GRUB_CRYPTO_ERROR_MSG ;
static const QString GRUB_THEME_ERROR_MSG ;
} ;
diff --git a/src/modules/pacstrap-gui/pacstrap-gui.cpp b/src/modules/pacstrap-gui/pacstrap-gui.cpp
index 6a925e949..7d904e591 100644
--- a/src/modules/pacstrap-gui/pacstrap-gui.cpp
+++ b/src/modules/pacstrap-gui/pacstrap-gui.cpp
@@ -38,7 +38,7 @@ const QString PacstrapGuiJob::SET_LANG_FMT = "echo 'export LANG=%1'
const QString PacstrapGuiJob::SET_XKBMAP_FMT = "echo 'setxkbmap %1' >> %2/etc/skel/.bashrc" ;
const QString PacstrapGuiJob::DM_DESKTOP_FMT = "sed -i 's|^Session=.*|Session=%1|' %2/etc/skel/.dmrc" ;
const QString PacstrapGuiJob::DM_LANG_FMT = "sed -i 's|^Language=.*|Language=%1|' %2/etc/skel/.dmrc" ;
-const QString PacstrapGuiJob::WELCOME_TITLE_FMT = "sed -i 's|_EDITION_TITLE_|${WELCOME_TITLE}|' %1/etc/skel/.config/autostart/autostart.sh" ;
+const QString PacstrapGuiJob::WELCOME_TITLE_FMT = "sed -i 's|_EDITION_TITLE_|Parabola Welcome|' %1/etc/skel/.config/autostart/autostart.sh" ;
const QString PacstrapGuiJob::OCTOPI_FMT = "rm -f %1/etc/xdg/autostart/octopi-notifier.desktop" ;