From 7ee568d933edf108b587479c6a4b17fd4f974d79 Mon Sep 17 00:00:00 2001 From: bill-auger Date: Thu, 21 Dec 2017 18:17:41 -0500 Subject: bugfix chroot mount --- src/libcalamares/PacstrapCppJob.cpp | 9 +++++++-- src/modules/pacstrap-gui/pacstrap-gui.cpp | 22 +++++++++++----------- src/modules/welcome/welcome.conf | 2 +- 3 files changed, 19 insertions(+), 14 deletions(-) diff --git a/src/libcalamares/PacstrapCppJob.cpp b/src/libcalamares/PacstrapCppJob.cpp index 8ce58019e..3e30bc8f0 100644 --- a/src/libcalamares/PacstrapCppJob.cpp +++ b/src/libcalamares/PacstrapCppJob.cpp @@ -83,7 +83,7 @@ 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 -C %1 %2 %3 --noprogressbar" ; +const QString PacstrapCppJob::PACSTRAP_FMT = "pacstrap-calamares -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 \ @@ -128,9 +128,14 @@ PacstrapCppJob::PacstrapCppJob(const char* job_name , const char* status_msg , this->nPreviousPackages = 0 ; // deferred to exec() this->nPendingPackages = 0 ; // deferred to exec() this->progressPercent = 0 ; + + execStatus("sed 's|^chroot_setup |#chroot_setup |' /usr/bin/pacstrap > /usr/bin/pacstrap-calamares") ; } -PacstrapCppJob::~PacstrapCppJob() {} +PacstrapCppJob::~PacstrapCppJob() +{ + execStatus("rm /usr/bin/pacstrap-calamares") ; +} /* PacstrapCppJob public getters/setters */ diff --git a/src/modules/pacstrap-gui/pacstrap-gui.cpp b/src/modules/pacstrap-gui/pacstrap-gui.cpp index 7f5de5925..6a925e949 100644 --- a/src/modules/pacstrap-gui/pacstrap-gui.cpp +++ b/src/modules/pacstrap-gui/pacstrap-gui.cpp @@ -92,24 +92,24 @@ QString PacstrapGuiJob::chrootExec() QString welcome_title_cmd = QString(WELCOME_TITLE_FMT).arg( this->mountPoint) ; QString octopi_cmd = QString(OCTOPI_FMT ).arg( this->mountPoint) ; -printf("[PACSTRAP-GUI]: ls host/etc/skel%s\n" , execOutput("ls -al /etc/skel" ).toStdString().c_str()) ; -printf("[PACSTRAP-GUI]: ls -al chroot/etc/skel/ IN\n%s\n" , execOutput("ls -al /tmp/pacstrap/etc/skel" ).toStdString().c_str()) ; -printf("[PACSTRAP-GUI]: ls chroot/usr/share/backgrounds/%s\n" , execOutput("ls -al /tmp/pacstrap/usr/share/backgrounds/").toStdString().c_str()) ; -printf("[PACSTRAP-GUI]: ls chroot/etc/sudoers*%s\n" , execOutput("ls -al /tmp/pacstrap/etc/sudoers" ).toStdString().c_str()) ; +printf("[PACSTRAP-GUI]: ls host/etc/skel%s\n" , execOutput( "ls -al /etc/skel" ) .toStdString().c_str()) ; +printf("[PACSTRAP-GUI]: ls -al chroot/etc/skel/ IN\n%s\n" , execOutput(QString("ls -al %1/etc/skel" ).arg(this->mountPoint)).toStdString().c_str()) ; +printf("[PACSTRAP-GUI]: ls chroot/usr/share/backgrounds/%s\n" , execOutput(QString("ls -al %1/usr/share/backgrounds/").arg(this->mountPoint)).toStdString().c_str()) ; +printf("[PACSTRAP-GUI]: ls chroot/etc/sudoers*%s\n" , execOutput(QString("ls -al %1/etc/sudoers" ).arg(this->mountPoint)).toStdString().c_str()) ; // if (!!execStatus(wallpaper_cmd)) return WALLPAPER_ERROR_MSG ; // printf("[PACSTRAP-GUI]: ls chroot/etc/wallpaper.png\n") ; QProcess::execute(QString("/bin/sh -c \"ls -al %1/etc/wallpaper.png\"").arg(MOUNTPOINT)) ; -printf("[PACSTRAP-GUI]: default_desktop=%s\n" , default_desktop .toStdString().c_str()) ; -printf("[PACSTRAP-GUI]: locale=%s\n" , locale .toStdString().c_str()) ; -printf("[PACSTRAP-GUI]: mountPoint=%s\n" , this->mountPoint .toStdString().c_str()) ; -printf("[PACSTRAP-GUI]: ls -al chroot/etc/skel/ OUT\n%s\n" , execOutput("ls -al /tmp/pacstrap/etc/skel").toStdString().c_str()) ; -printf("[PACSTRAP-GUI]: ls -al chroot/etc/skel/ OUT\n%s\n" , execOutput("echo 'touch ~/autostart-sh' >> /tmp/pacstrap/etc/skel/.config/autostart/autostart.sh").toStdString().c_str()) ; -printf("[PACSTRAP-GUI]: ls -al chroot/etc/skel/ OUT\n%s\n" , execOutput("echo 'touch ~/autostart-lxde-sh' >> /tmp/pacstrap/etc/skel/.config/autostart/autostart-lxde.sh").toStdString().c_str()) ; +printf("[PACSTRAP-GUI]: default_desktop=%s\n" , default_desktop .toStdString().c_str()) ; +printf("[PACSTRAP-GUI]: locale=%s\n" , locale .toStdString().c_str()) ; +printf("[PACSTRAP-GUI]: mountPoint=%s\n" , this->mountPoint .toStdString().c_str()) ; +printf("[PACSTRAP-GUI]: ls -al chroot/etc/skel/ OUT\n%s\n" , execOutput(QString("ls -al %1/etc/skel" ).arg(this->mountPoint)).toStdString().c_str()) ; +printf("[PACSTRAP-GUI]: ls -al chroot/etc/skel/ OUT\n%s\n" , execOutput(QString("echo 'touch ~/autostart-sh' >> %1/etc/skel/.config/autostart/autostart.sh" ).arg(this->mountPoint)).toStdString().c_str()) ; +printf("[PACSTRAP-GUI]: ls -al chroot/etc/skel/ OUT\n%s\n" , execOutput(QString("echo 'touch ~/autostart-lxde-sh' >> %1/etc/skel/.config/autostart/autostart-lxde.sh").arg(this->mountPoint)).toStdString().c_str()) ; // if (!!execStatus(skel_cmd )) return "SKEL_FMT ERROR_MSG" ; -// printf("[PACSTRAP-GUI]: ls -al chroot/etc/skel/ OUT\n%s\n" , execOutput("ls -al /tmp/pacstrap/etc/skel")) ; +// printf("[PACSTRAP-GUI]: ls -al chroot/etc/skel/ OUT\n%s\n" , execOutput(QString("ls -al %1/etc/skel").arg(this->mountPoint))) ; // if (!!execStatus(set_prompt_cmd )) return "SET_PROMPT_FMT ERROR_MSG" ; if (!!execStatus(set_editor_cmd )) return "SET_EDITOR_FMT ERROR_MSG" ; if (!!execStatus(set_lang_cmd )) return "SET_LANG_FMT ERROR_MSG" ; diff --git a/src/modules/welcome/welcome.conf b/src/modules/welcome/welcome.conf index 3ab716b22..7dc301791 100644 --- a/src/modules/welcome/welcome.conf +++ b/src/modules/welcome/welcome.conf @@ -4,7 +4,7 @@ showKnownIssuesUrl: true showReleaseNotesUrl: true requirements: - requiredStorage: 9.0 + requiredStorage: 8.9 requiredRam: 1.0 internetCheckUrl: http://google.com -- cgit v1.2.2