summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbill-auger <mr.j.spam.me@gmail.com>2019-05-14 04:32:28 -0400
committerbill-auger <mr.j.spam.me@gmail.com>2019-05-16 06:18:19 -0400
commitbba7d46bf84f27f095d5f114f7111e83381d47e2 (patch)
tree87c8434199c01b1d8a2085987163a2c14ce7ede9
parent31aea6d41e98cb5dfa60d59af10503a12d652bc6 (diff)
housekeeping
-rwxr-xr-xmk26
-rw-r--r--src/branding/parabola/branding.desc37
-rw-r--r--src/calamares/progresstree/ProgressTreeModel.cpp4
-rw-r--r--src/libcalamares/PacstrapCppJob.cpp25
-rw-r--r--src/libcalamares/PacstrapCppJob.h21
-rw-r--r--src/modules/bootloader/bootloader.conf2
-rw-r--r--src/modules/bootloader/main.py8
-rw-r--r--src/modules/grubcfg/main.py8
-rw-r--r--src/modules/pacstrap-base/pacstrap-base.cpp7
-rw-r--r--src/modules/pacstrap-base/pacstrap-base.h2
-rw-r--r--src/modules/pacstrap-gui/pacstrap-gui.cpp66
-rw-r--r--src/modules/pacstrap-gui/pacstrap-gui.h5
-rw-r--r--src/modules/users/CreateUserJob.cpp24
-rw-r--r--src/modules/users/UsersPage.cpp45
-rw-r--r--src/modules/users/page_usersetup.ui12
-rw-r--r--src/modules/welcome/WelcomePage.cpp5
16 files changed, 91 insertions, 206 deletions
diff --git a/mk b/mk
index 66976fa8d..acea9b441 100755
--- a/mk
+++ b/mk
@@ -29,7 +29,7 @@ fi
[ "$(cat ./LAST_BUILD_HOST)" == "$THIS_BUILD_HOST" ] || (echo "cleaning build/ dir" ; sudo rm -rf ./build)
echo "$THIS_BUILD_HOST" > ./LAST_BUILD_HOST
-if [ ! -d ./build ]
+if [ ! -d ./build ]
then print "\n--- preparing build environment ---\n"
mkdir ./build
# else rm -f build/Makefile 2> /dev/null
@@ -42,15 +42,16 @@ fi
print "\n--- running cmake ---\n"
+sed -i "s|_BUILD_DATE_|$(date +%Y.%m)|" src/branding/parabola/branding.desc
cd ./build
-cmake -DCMAKE_BUILD_TYPE=Debug \
- -DCMAKE_INSTALL_PREFIX=/usr \
- -DCMAKE_INSTALL_LIBDIR=lib \
- -DSKIP_MODULES="contextualprocess dracut dracutlukscfg dummycpp dummyprocess \
- dummypython dummypythonqt fsresizer initramfs initramfscfg \
- interactiveterminal license openrcdmcryptcfg packages plymouthcfg \
- preservefiles rawfs removeuser shellprocess tracking webview" ..
-
+cmake -DCMAKE_BUILD_TYPE=Debug \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_INSTALL_LIBDIR=lib \
+ -DSKIP_MODULES="contextualprocess dracut dracutlukscfg dummycpp dummyprocess \
+ dummypython dummypythonqt fsresizer initramfs initramfscfg \
+ interactiveterminal license networkcfg openrcdmcryptcfg \
+ packages plymouthcfg preservefiles rawfs removeuser \
+ shellprocess tracking unpackfs webview" ..
if [ -d /usr/share/calamares/ -o -f /usr/bin/calamares ]
then print "\n--- running make uninstall ---\n"
@@ -69,19 +70,20 @@ fi
if (($RUN_INSTALLED))
then print "\n--- running make install ---\n"
sudo make install || exit 1
+ sudo cp ../settings.conf /usr/share/calamares/
else print "\n--- running make ---\n"
make || exit 1
+ cp ../settings.conf ./
fi
cd ..
if (($RUN_INSTALLED)) && [ -f /usr/bin/calamares ]
then print "\n--- launching calamares installed ---\n"
- sudo calamares
+ sudo calamares -D 6
elif [ -f build/calamares ]
then print "\n--- launching calamares uninstalled ---\n"
- cp ./settings.conf ./build
cd ./build
- sudo ./calamares -d
+ sudo ./calamares -d 6
cd ..
fi
diff --git a/src/branding/parabola/branding.desc b/src/branding/parabola/branding.desc
index 258ac1d81..ce55e99ae 100644
--- a/src/branding/parabola/branding.desc
+++ b/src/branding/parabola/branding.desc
@@ -7,26 +7,27 @@ windowExpanding: normal
windowSize: 1016px,580px
strings:
- productName: Parabola GNU/Linux-Libre
- shortProductName: Parabola
- version: 2017-09
- shortVersion: 2017-09
- versionedName: Parabola
- shortVersionedName: Parabola
- productUrl: http://www.parabola.nu/
- supportUrl: https://kiwiirc.com/client/irc.freenode.net?channels=#parabola
- knownIssuesUrl: http://labs.parabola.nu/
+ productName: 'Parabola GNU/Linux-Libre'
+ shortProductName: 'Parabola'
+ version: '_BUILD_DATE_'
+ shortVersion: '_BUILD_DATE_'
+ versionedName: 'Parabola GNU/Linux-Libre'
+ shortVersionedName: 'Parabola'
+ bootloaderEntryName: 'Parabola GNU/Linux-Libre'
+ productUrl: 'http://www.parabola.nu/'
+ supportUrl: 'https://kiwiirc.com/client/irc.freenode.net?channels=#parabola'
+ knownIssuesUrl: 'http://labs.parabola.nu/'
images:
- productLogo: "parabola-gnu-freedood.png"
- productIcon: "parabolaicon.png"
- productWelcome: "languages.png"
- productBanner: "parabola-calamares-banner-dark.png"
+ productLogo: 'parabola-gnu-freedood.png'
+ productIcon: 'parabolaicon.png'
+ productWelcome: 'languages.png'
+ productBanner: 'parabola-calamares-banner-dark.png'
-slideshow: "show.qml"
+slideshow: 'show.qml'
style:
- sidebarBackground: "#202020"
- sidebarText: "#FFFFFF"
- sidebarTextSelect: "#8888FF"
- sidebarTextHighlight: "#444488"
+ sidebarBackground: '#202020'
+ sidebarText: '#FFFFFF'
+ sidebarTextSelect: '#8888FF'
+ sidebarTextHighlight: '#444488'
diff --git a/src/calamares/progresstree/ProgressTreeModel.cpp b/src/calamares/progresstree/ProgressTreeModel.cpp
index 5289029e4..0fd0ad79f 100644
--- a/src/calamares/progresstree/ProgressTreeModel.cpp
+++ b/src/calamares/progresstree/ProgressTreeModel.cpp
@@ -141,10 +141,10 @@ ProgressTreeModel::setupModelData()
const Calamares::ViewManager* vm = Calamares::ViewManager::instance();
const auto steps = vm->viewSteps();
-int step_n = 0 ; // FIXME: netinstall packages step
+int step_n = 0 ; // FIXME: hide incomplete netinstall packages step
for ( const Calamares::ViewStep* step : steps )
{
-if (step_n++ == 4) continue ; // FIXME: netinstall packages step
+if (step_n++ == 4) continue ; // FIXME: hide incomplete netinstall packages step
m_rootItem->appendChild( new ViewStepItem( step, m_rootItem ) );
}
}
diff --git a/src/libcalamares/PacstrapCppJob.cpp b/src/libcalamares/PacstrapCppJob.cpp
index e6762b50e..ab2071242 100644
--- a/src/libcalamares/PacstrapCppJob.cpp
+++ b/src/libcalamares/PacstrapCppJob.cpp
@@ -43,7 +43,6 @@ const QString PacstrapCppJob::MATE_PACKAGES_KEY = "mate" ;
/* PacstrapCppJob protected class constants */
-// const QString PacstrapCppJob::MOUNTPOINT = "/tmp/pacstrap" ;
const char* PacstrapCppJob::BASE_JOB_NAME = "Pacstrap Base C++ Job" ;
const char* PacstrapCppJob::GUI_JOB_NAME = "Pacstrap Desktop C++ Job" ;
const char* PacstrapCppJob::BASE_STATUS_MSG = "Installing root filesystem" ;
@@ -69,8 +68,6 @@ const QString PacstrapCppJob::POSTINST_ERROR_MSG = "Error running post-instal
/* PacstrapCppJob private class constants */
-// const QDir PacstrapCppJob::PACKAGES_CACHE_DIR = QDir(MOUNTPOINT + "/var/cache/pacman/pkg") ;
-// const QDir PacstrapCppJob::PACKAGES_METADATA_DIR = QDir(MOUNTPOINT + "/var/lib/pacman/local") ;
const QString PacstrapCppJob::PACKAGES_CACHE_DIR_FMT = "%1/var/cache/pacman/pkg" ;
const QString PacstrapCppJob::PACKAGES_METADATA_DIR_FMT = "%1/var/lib/pacman/local" ;
const QString PacstrapCppJob::DEFAULT_CONF_FILENAME = "/etc/pacman.conf" ;
@@ -84,13 +81,10 @@ const QString PacstrapCppJob::PACSTRAP_FILENAME = "/usr/bin/pacstrap-cala
const QString PacstrapCppJob::PACSTRAP_PREP_CMD = "sed 's|^chroot_setup |#chroot_setup |' /usr/bin/pacstrap > %1 && \
chmod +x %1" ;
const QString PacstrapCppJob::PACSTRAP_RM_CMD = "rm %1" ;
-// const QString PacstrapCppJob::PACSTRAP_CLEANUP_CMD = "umount %1/dev/pts %1/dev/shm %1/dev %1/proc %1/run %1/sys %1/tmp %1 2> /dev/null" ;
-// const QString PacstrapCppJob::MOUNT_FMT = "mkdir %2 2> /dev/null || true && mount %1 %2" ;
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 = "%1 -M -C %2 %3 %4 --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 \
@@ -101,7 +95,6 @@ const QString PacstrapCppJob::KEYRING_CMD = "pacman -Sy --noconfirm
archlinuxarm \
parabola && \
pacman-key --refresh-keys " ;
-// const QString PacstrapCppJob::UMOUNT_FMT = "umount %1" ;
const QString PacstrapCppJob::PACSTRAP_PREP_ERROR_MSG = "Could not create custom 'pacstrap-calamares' script." ;
const QString PacstrapCppJob::CONFIG_ERROR_MSG = "Invalid configuration map." ;
const QString PacstrapCppJob::TARGET_ERROR_MSG = "Target device for root filesystem is unspecified." ;
@@ -112,7 +105,6 @@ const QString PacstrapCppJob::CHROOT_PREP_ERROR_MSG = "Failed to prepare the
const QString PacstrapCppJob::PACMAN_SYNC_ERROR_MSG = "Failed to syncronize packages in the pacstrap chroot." ;
const QString PacstrapCppJob::LIST_PACKAGES_ERROR_MSG = "Failed to compile packages list." ;
const QString PacstrapCppJob::PACSTRAP_ERROR_MSG = "Failed to install packages in chroot." ;
-// const QString PacstrapCppJob::UMOUNT_ERROR_MSG = "Failed to unmount the pacstrap chroot." ;
const QString PacstrapCppJob::STATUS_KEY = QString("status") ;
const QString PacstrapCppJob::STDOUT_KEY = QString("stdout") ;
const QString PacstrapCppJob::STDERR_KEY = QString("stderr") ;
@@ -156,9 +148,6 @@ QString PacstrapCppJob::prettyStatusMessage() const { return thi
Calamares::JobResult PacstrapCppJob::exec()
{
- // cleanup from possibly aborted previous runs
-// Teardown() ;
-
QVariantList partitions = this->globalStorage->value(GS::PARTITIONS_KEY ).toList() ;
bool has_isorepo = this->globalStorage->value(GS::HAS_ISOREPO_KEY ).toBool() ;
bool is_online = this->globalStorage->value(GS::IS_ONLINE_KEY ).toBool() ;
@@ -178,15 +167,10 @@ DEBUG_TRACE_EXEC
if (this->targetDevice.isEmpty() ) return JobError(TARGET_ERROR_MSG) ;
if (!QFile(this->confFile).exists()) return JobError(CONFFILE_ERROR_MSG.arg(this->confFile)) ;
-// QString keyring_cmd = KEYRING_CMD ;
-// QString mount_cmd = MOUNT_FMT .arg(this->targetDevice , this->mountPoint) ;
QString chroot_prep_cmd = CHROOT_PREP_FMT .arg(cache_path , metadata_path) ;
QString pacman_sync_cmd = DB_REFRESH_FMT .arg(this->confFile , this->mountPoint) ;
QString list_packages_cmd = LIST_PACKAGES_FMT.arg(this->confFile , this->mountPoint , this->packages) ;
-// QString umount_cmd = UMOUNT_FMT .arg(this->targetDevice) ;
-// if (!!execStatus(keyring_cmd )) return JobError(KEYRING_ERROR_MSG) ;
-// if (!!execStatus(mount_cmd )) return JobError(MOUNT_ERROR_MSG ) ;
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 ) ;
@@ -206,6 +190,7 @@ DEBUG_TRACE_EXEC
QString pacstrap_prep_cmd = PACSTRAP_PREP_CMD.arg(PACSTRAP_FILENAME) ;
QString pacstrap_cmd = PACSTRAP_FMT .arg(PACSTRAP_FILENAME , this->confFile ,
this->mountPoint , this->packages ) ;
+ QString keyring_cmd = KEYRING_CMD ;
QString pacstrap_rm_cmd = PACSTRAP_RM_CMD .arg(PACSTRAP_FILENAME) ;
if (!!execStatus(pacstrap_prep_cmd)) return JobError(PACSTRAP_PREP_ERROR_MSG) ;
@@ -218,7 +203,7 @@ DEBUG_TRACE_EXEC
{
this->progressPercent = emitProgress(-CHROOT_TASK_PROPORTION) ;
- if (!!execStatus(KEYRING_CMD , CHROOT_TASK_PROPORTION * 0.5))
+ if (!!execStatus(keyring_cmd , CHROOT_TASK_PROPORTION * 0.5))
return JobError(KEYRING_ERROR_MSG) ;
pacstrap_result = execWithProgress(pacstrap_cmd , CHROOT_TASK_PROPORTION * 0.5) ;
@@ -236,8 +221,6 @@ DEBUG_TRACE_EXEC
}
}
-// if (!execStatus(umount_cmd)) this->progressPercent = emitProgress(1.0) ;
-// else return JobError(UMOUNT_ERROR_MSG) ;
this->progressPercent = emitProgress(1.0) ;
return JobSuccess() ;
@@ -332,10 +315,6 @@ DEBUG_TRACE_FINDTARGETDEVICE
Calamares::JobResult PacstrapCppJob::JobError(QString error_msg)
{
-// Calamares::GlobalStorage* global_storage = Calamares::JobQueue::instance()->globalStorage() ;
-// QString mountpoint = global_storage.value(GS::ROOT_MOUNTPOINT_KEY).toString() ;
-// QProcess::execute(SYSTEM_EXEC_FMT.arg(PACSTRAP_CLEANUP_CMD.arg(mountpoint))) ;
-
return Calamares::JobResult::error(error_msg) ;
}
diff --git a/src/libcalamares/PacstrapCppJob.h b/src/libcalamares/PacstrapCppJob.h
index ee81d60b8..79e549a74 100644
--- a/src/libcalamares/PacstrapCppJob.h
+++ b/src/libcalamares/PacstrapCppJob.h
@@ -106,7 +106,6 @@ public:
protected:
-// static const QString MOUNTPOINT ;
static const char* BASE_JOB_NAME ;
static const char* GUI_JOB_NAME ;
static const char* BASE_STATUS_MSG ;
@@ -132,14 +131,11 @@ private:
static const QString PACSTRAP_FILENAME ;
static const QString PACSTRAP_PREP_CMD ;
static const QString PACSTRAP_RM_CMD ;
-// static const QString PACSTRAP_CLEANUP_CMD ;
static const QString KEYRING_CMD ;
- static const QString MOUNT_FMT ;
static const QString CHROOT_PREP_FMT ;
static const QString DB_REFRESH_FMT ;
static const QString LIST_PACKAGES_FMT ;
static const QString PACSTRAP_FMT ;
- static const QString UMOUNT_FMT ;
static const QString PACSTRAP_PREP_ERROR_MSG ;
static const QString CONFIG_ERROR_MSG ;
static const QString TARGET_ERROR_MSG ;
@@ -150,7 +146,6 @@ private:
static const QString PACMAN_SYNC_ERROR_MSG ;
static const QString LIST_PACKAGES_ERROR_MSG ;
static const QString PACSTRAP_ERROR_MSG ;
- static const QString UMOUNT_ERROR_MSG ;
static const QString STATUS_KEY ;
static const QString STDOUT_KEY ;
static const QString STDERR_KEY ;
@@ -159,14 +154,14 @@ private:
/* DEBUG */
-#define DEBUG_TRACE_EXEC cDebug() << "[PACSTRAP]: exec()" \
- << " job_name=" << this->jobName \
- << " has_isorepo=" << has_isorepo \
- << " is_online=" << is_online \
- << " mountPoint=" << this->mountPoint \
- << " targetDevice=" << this->targetDevice \
- << " confFile=" << this->confFile \
- << " n_packages=" << this->packages.count() ;
+#define DEBUG_TRACE_EXEC cDebug() << "[PACSTRAP]: exec()" << \
+ " job_name=" << this->jobName << \
+ " has_isorepo=" << has_isorepo << \
+ " is_online=" << is_online << \
+ " mountPoint=" << this->mountPoint << \
+ " targetDevice=" << this->targetDevice << \
+ " confFile=" << this->confFile << \
+ " n_packages=" << this->packages.count() ;
#define DEBUG_TRACE_EXECWITHPROGRESS \
cDebug() << "[PACSTRAP]: shell command exited=" << command_line ; \
diff --git a/src/modules/bootloader/bootloader.conf b/src/modules/bootloader/bootloader.conf
index d85a6a2f3..4c3aadb4d 100644
--- a/src/modules/bootloader/bootloader.conf
+++ b/src/modules/bootloader/bootloader.conf
@@ -16,7 +16,7 @@ timeout: "10"
# Optionally set the menu entry name and kernel name to use in systemd-boot.
# If not specified here, these settings will be taken from branding.desc.
#
-bootloaderEntryName: "Parabola GNU/Linux-Libre"
+# bootloaderEntryName: "Generic GNU/Linux"
# kernelLine: ", with Stable-Kernel"
fallbackKernelLine: " (recovery mode)"
diff --git a/src/modules/bootloader/main.py b/src/modules/bootloader/main.py
index 251b89899..d88136ced 100644
--- a/src/modules/bootloader/main.py
+++ b/src/modules/bootloader/main.py
@@ -273,14 +273,6 @@ def install_grub(efi_directory, 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() 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":
libcalamares.utils.debug("Bootloader: grub (efi)")
install_path = libcalamares.globalstorage.value("rootMountPoint")
diff --git a/src/modules/grubcfg/main.py b/src/modules/grubcfg/main.py
index 1e6ff5696..83441a736 100644
--- a/src/modules/grubcfg/main.py
+++ b/src/modules/grubcfg/main.py
@@ -135,10 +135,6 @@ 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()]
@@ -221,10 +217,6 @@ 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 2c8237f4c..a622264f8 100644
--- a/src/modules/pacstrap-base/pacstrap-base.cpp
+++ b/src/modules/pacstrap-base/pacstrap-base.cpp
@@ -24,10 +24,8 @@
/* PacstrapBaseJob private class constants */
-// 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/GNUAxiom/theme.txt|' %1/etc/default/grub" ;
const QString PacstrapBaseJob::GRUB_CONFIG_FMT = "grub-mkconfig -o %1/boot/grub/grub.cfg" ;
-// const QString PacstrapBaseJob::GRUB_CRYPTO_ERROR_MSG = "The grub enable crypto command has failed." ;
const QString PacstrapBaseJob::GRUB_THEME_ERROR_MSG = "The grub theme command has failed." ;
const QString PacstrapBaseJob::GRUB_CONFIG_ERROR_MSG = "The grub-mkconfig command has failed." ;
@@ -59,17 +57,12 @@ QString PacstrapBaseJob::chrootExecPreInstall() { return QString("") ; }
QString PacstrapBaseJob::chrootExecPostInstall()
{
-// QString grub_crypto_cmd = GRUB_CRYPTO_FMT.arg(this->mountPoint) ;
QString grub_theme_cmd = GRUB_THEME_FMT .arg(this->mountPoint) ;
QString grub_config_cmd = GRUB_CONFIG_FMT.arg(this->mountPoint) ;
-// if (!!execStatus(grub_crypto_cmd)) return GRUB_CRYPTO_ERROR_MSG ;
if (!!execStatus(grub_theme_cmd )) return GRUB_THEME_ERROR_MSG ;
if (!!execStatus(grub_config_cmd)) return GRUB_CONFIG_ERROR_MSG ;
-printf("[PACSTRAP-JOB]: FIXME: this->mountPoint/etc/os-release: %s\n" , execOutput(QString("ls -l %1/etc/os-release").arg(this->mountPoint))) ; // FIXME:
-execStatus(QString("touch %1/etc/os-release").arg(this->mountPoint)) ; // FIXME:
-
return QString("") ;
}
diff --git a/src/modules/pacstrap-base/pacstrap-base.h b/src/modules/pacstrap-base/pacstrap-base.h
index f339b5cd6..9d6298ba9 100644
--- a/src/modules/pacstrap-base/pacstrap-base.h
+++ b/src/modules/pacstrap-base/pacstrap-base.h
@@ -43,10 +43,8 @@ protected:
private:
-// static const QString GRUB_CRYPTO_FMT ;
static const QString GRUB_THEME_FMT ;
static const QString GRUB_CONFIG_FMT ;
-// static const QString GRUB_CRYPTO_ERROR_MSG ;
static const QString GRUB_THEME_ERROR_MSG ;
static const QString GRUB_CONFIG_ERROR_MSG ;
} ;
diff --git a/src/modules/pacstrap-gui/pacstrap-gui.cpp b/src/modules/pacstrap-gui/pacstrap-gui.cpp
index 4161750b6..472df5f03 100644
--- a/src/modules/pacstrap-gui/pacstrap-gui.cpp
+++ b/src/modules/pacstrap-gui/pacstrap-gui.cpp
@@ -24,23 +24,15 @@
/* PacstrapGuiJob private class constants */
-// const QString PacstrapGuiJob::WALLPAPER_FMT = "cp /etc/wallpaper.png %1/etc/" ;
-// const QString PacstrapGuiJob::WALLPAPER_ERROR_MSG = "The wallpaper installation command has failed." ;
-const QString PacstrapGuiJob::GET_XKBMAP_CMD = "grep 'XKBMAP=' ~/.codecheck 2> /dev/null | cut -d '=' -f 2" ;
-// const QString PacstrapGuiJob::SKEL_DIR = "/usr/share/calamares/skel" ;
-// const QString PacstrapGuiJob::CHROOT_SKEL_DIR = QString("%1/etc/skel").arg(MOUNTPOINT) ;
-// const QString PacstrapGuiJob::SKEL_FMT = "cp -rT %1/ %2/" ;
-// PS1="\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\n$ "
-// const QString PacstrapGuiJob::SET_PROMPT_FMT = "echo 'PS1=\"\\[\\033[01;32m\\]\\u@\\h\\[\\033[00m\\]:\\[\\033[01;34m\\]\\w\\[\\033[00m\\]\\n$ \"' >> %1/.bashrc" ;
-const QString PacstrapGuiJob::SET_EDITOR_FMT = "echo 'export EDITOR=nano' >> %1/etc/skel/.bashrc" ;
-// const QString PacstrapGuiJob::SET_LANG_FMT = "echo 'LANG=%1' >> %2/.config/locale.conf" ;
-const QString PacstrapGuiJob::SET_LANG_FMT = "echo 'export LANG=%1' >> %2/etc/skel/.bashrc" ;
-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_|Parabola GNU/Linux-libre News|' %1/usr/bin/autostart.sh" ;
-const QString PacstrapGuiJob::WELCOME_TEXT_FMT = "sed 's|_DEFAULT_DESKTOP_|%1|' /usr/share/calamares/welcome > %2/usr/share/parabola-laf/news/news-0" ;
-const QString PacstrapGuiJob::OCTOPI_FMT = "rm -f %1/etc/xdg/autostart/octopi-notifier.desktop" ; // FIXME: issue #1850
+const QString PacstrapGuiJob::GET_XKBMAP_CMD = "grep 'XKBMAP=' ~/.codecheck 2> /dev/null | cut -d '=' -f 2" ;
+const QString PacstrapGuiJob::SET_EDITOR_FMT = "echo 'export EDITOR=nano' >> %1/etc/skel/.bashrc" ;
+const QString PacstrapGuiJob::SET_LANG_FMT = "echo 'export LANG=%1' >> %2/etc/skel/.bashrc" ;
+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_|Parabola GNU/Linux-libre News|' %1/usr/bin/autostart.sh" ;
+const QString PacstrapGuiJob::WELCOME_TEXT_FMT = "sed 's|_DEFAULT_DESKTOP_|%1|' /usr/share/calamares/welcome > %2/usr/share/parabola-laf/news/news-0" ;
+const QString PacstrapGuiJob::OCTOPI_FMT = "rm -f %1/etc/xdg/autostart/octopi-notifier.desktop" ; // FIXME: issue #1850
const QString PacstrapGuiJob::GRUB_THEME_FMT = "sed -i 's|^#GRUB_THEME=.*|GRUB_THEME=/boot/grub/themes/parabola-laf/theme.txt|' %1/etc/default/grub" ; // TODO:: delegate this to parabola-laf
const QString PacstrapGuiJob::GRUB_CONFIG_FMT = "grub-mkconfig -o %1/boot/grub/grub.cfg" ; // TODO:: delegate this to parabola-laf
const QString PacstrapGuiJob::GRUB_THEME_ERROR_MSG = "The grub theme command has failed." ; // TODO:: delegate this to parabola-laf
@@ -84,43 +76,21 @@ QString PacstrapGuiJob::chrootExecPreInstall() { return QString("") ; }
QString PacstrapGuiJob::chrootExecPostInstall()
{
-// QString wallpaper_cmd = WALLPAPER_FMT.arg(MOUNTPOINT) ;
QString default_desktop = this->globalStorage->value(GS::DESKTOP_KEY).toString() ;
QString locale = this->globalStorage->value(GS::LOCALE_KEY).toMap().value(GS::LANG_KEY).toString() ;
QString xkbmap = execOutput(GET_XKBMAP_CMD) ; if (xkbmap.isEmpty()) xkbmap = "us" ;
-// QString skel_cmd = QString(SKEL_FMT ).arg(SKEL_DIR , CHROOT_SKEL_DIR) ;
-// QString set_prompt_cmd = QString(SET_PROMPT_FMT ).arg( CHROOT_SKEL_DIR) ;
- QString set_editor_cmd = QString(SET_EDITOR_FMT ).arg( this->mountPoint) ;
- QString set_lang_cmd = QString(SET_LANG_FMT ).arg(locale , this->mountPoint) ;
- QString set_xkbmap_cmd = QString(SET_XKBMAP_FMT ).arg(xkbmap , this->mountPoint) ;
- QString dm_desktop_cmd = QString(DM_DESKTOP_FMT ).arg(default_desktop , this->mountPoint) ;
- QString dm_lang_cmd = QString(DM_LANG_FMT ).arg(locale , this->mountPoint) ;
- QString welcome_title_cmd = QString(WELCOME_TITLE_FMT).arg( this->mountPoint) ;
- QString welcome_text_cmd = QString(WELCOME_TEXT_FMT ).arg(default_desktop , this->mountPoint) ;
- QString octopi_cmd = QString(OCTOPI_FMT ).arg( this->mountPoint) ;
- // TODO: above *_FMT already are QString - no need to wrap them
- QString grub_config_cmd = GRUB_CONFIG_FMT.arg(this->mountPoint) ; // TODO:: delegate this to parabola-laf
+ QString set_editor_cmd = SET_EDITOR_FMT .arg( this->mountPoint) ;
+ QString set_lang_cmd = SET_LANG_FMT .arg(locale , this->mountPoint) ;
+ QString set_xkbmap_cmd = SET_XKBMAP_FMT .arg(xkbmap , this->mountPoint) ;
+ QString dm_desktop_cmd = DM_DESKTOP_FMT .arg(default_desktop , this->mountPoint) ;
+ QString dm_lang_cmd = DM_LANG_FMT .arg(locale , this->mountPoint) ;
+ QString welcome_title_cmd = WELCOME_TITLE_FMT.arg( this->mountPoint) ;
+ QString welcome_text_cmd = WELCOME_TEXT_FMT .arg(default_desktop , this->mountPoint) ;
+ QString octopi_cmd = OCTOPI_FMT .arg( this->mountPoint) ;
+ QString grub_config_cmd = GRUB_CONFIG_FMT .arg(this->mountPoint) ; // TODO:: delegate this to parabola-laf
if (!!execStatus(grub_config_cmd)) return GRUB_CONFIG_ERROR_MSG ; // TODO:: delegate this to parabola-laf
-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(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()) ;
-
-// if (!!execStatus(skel_cmd )) return "SKEL_FMT ERROR_MSG" ;
-// 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" ;
if (!!execStatus(set_xkbmap_cmd )) return "SET_XKBMAP_FMT ERROR_MSG" ;
diff --git a/src/modules/pacstrap-gui/pacstrap-gui.h b/src/modules/pacstrap-gui/pacstrap-gui.h
index 0ab4c220f..7e611cdee 100644
--- a/src/modules/pacstrap-gui/pacstrap-gui.h
+++ b/src/modules/pacstrap-gui/pacstrap-gui.h
@@ -43,13 +43,8 @@ protected:
private:
-// static const QString WALLPAPER_FMT ;
-// static const QString WALLPAPER_ERROR_MSG ;
static const QString GET_XKBMAP_CMD ;
static const QString SKEL_DIR ;
-// static const QString CHROOT_SKEL_DIR ;
-// static const QString SKEL_FMT ;
-// static const QString SET_PROMPT_FMT ;
static const QString SET_EDITOR_FMT ;
static const QString SET_LANG_FMT ;
static const QString SET_XKBMAP_FMT ;
diff --git a/src/modules/users/CreateUserJob.cpp b/src/modules/users/CreateUserJob.cpp
index 09d054421..f02c9b44b 100644
--- a/src/modules/users/CreateUserJob.cpp
+++ b/src/modules/users/CreateUserJob.cpp
@@ -75,32 +75,14 @@ CreateUserJob::exec()
if ( gs->contains( "sudoersGroup" ) &&
!gs->value( "sudoersGroup" ).toString().isEmpty() )
{
-/*
- QString sudoersFilename = QStringLiteral( "etc/sudoers.d/" );
- if ( gs->contains( "sudoersFilename" ) &&
- !gs->value( "sudoersFilename" ).toString().isEmpty() )
- sudoersFilename += gs->value( "sudoersFilename" ).toString();
- else
- sudoersFilename += QStringLiteral( "10-parabola-installer" );
-*/
QMap<QString, QVariant> brandingMap = gs->value( "branding" ).toMap();
- QString distroName = brandingMap.value( "shortProductName" ).toString();
- distroName = distroName.toLower().replace( QRegExp( "[^a-z0-9]" ), "-" );
- QString sudoersFilename = QString( "etc/sudoers.d/10-%1-installer" ).arg( distroName );
+ QString productName = brandingMap.value( "shortProductName", QVariant( "calamares" ) )
+ .toString().toLower().replace( QRegExp( "[^a-z0-9]" ), "-" );
+ QString sudoersFilename = QString( "etc/sudoers.d/10-%1-installer" ).arg( productName );
QFileInfo sudoersFi( destDir.absoluteFilePath( sudoersFilename ) );
cDebug() << QString("[CREATEUSER]: preparing sudoers") ;
-QString etcdir = gs->value( "rootMountPoint" ).toString() + "/etc" ;
-cDebug() << QString("[CREATEUSER]: CreateUserJob::exec() distroName=%1" ).arg(distroName);
-cDebug() << QString("[CREATEUSER]: CreateUserJob::exec() sudoersFilename=%1").arg(sudoersFilename);
-cDebug() << QString("[CREATEUSER]: CreateUserJob::exec() sudoersFi=%1" ).arg(sudoersFi.filePath());
-cDebug() << QString("[CREATEUSER]: CreateUserJob::exec() isAbsolute=%1" ).arg(sudoersFi.isAbsolute());
-cDebug() << QString("[CREATEUSER]: CreateUserJob::exec() exists=%1" ).arg(sudoersFi.absoluteDir().exists());
-cDebug() << QString("[CREATEUSER]: CreateUserJob::exec() isWritable=%1" ).arg(sudoersFi.isWritable());
-cDebug() << QString("[CREATEUSER]: CreateUserJob::exec() ls -l %1").arg(etcdir) ; QProcess::execute( QString( "/bin/sh -c \"ls -l %1\"" ).arg( etcdir ) ) ;
-cDebug() << QString("[CREATEUSER]: CreateUserJob::exec() ls -l %1").arg(sudoersFi.filePath()) ; QProcess::execute( QString( "/bin/sh -c \"ls -l %1\"" ).arg( sudoersFi.filePath() ) ) ;
-
if ( !sudoersFi.absoluteDir().exists() )
return Calamares::JobResult::error( tr( "Sudoers dir is not writable." ) );
diff --git a/src/modules/users/UsersPage.cpp b/src/modules/users/UsersPage.cpp
index 2f32b725c..ed4c0b3a8 100644
--- a/src/modules/users/UsersPage.cpp
+++ b/src/modules/users/UsersPage.cpp
@@ -88,6 +88,13 @@ UsersPage::UsersPage( QWidget* parent )
this, &UsersPage::onRootPasswordTextChanged );
connect( ui->textBoxVerifiedRootPassword, &QLineEdit::textChanged,
this, &UsersPage::onRootPasswordTextChanged );
+ connect( ui->checkBoxValidatePassword, &QCheckBox::stateChanged,
+ this, [this]( int checked )
+ {
+ onPasswordTextChanged(ui->textBoxUserPassword->text());
+ onRootPasswordTextChanged(ui->textBoxRootPassword->text());
+ checkReady( isReady() );
+ } );
connect( ui->checkBoxReusePassword, &QCheckBox::stateChanged,
this, [this]( int checked )
{
@@ -99,15 +106,6 @@ UsersPage::UsersPage( QWidget* parent )
ui->textBoxVerifiedRootPassword->setVisible( !checked );
checkReady( isReady() );
} );
- connect( ui->checkBoxValidatePassword, &QCheckBox::stateChanged,
- this, [this]( int checked )
- {
-cWarning() << "ui->checkBoxValidatePassword::stateChanged()";
-
- onPasswordTextChanged(ui->textBoxUserPassword->text());
- onRootPasswordTextChanged(ui->textBoxRootPassword->text());
- checkReady( isReady() );
- } );
m_customUsername = false;
@@ -401,8 +399,6 @@ UsersPage::validateHostnameText( const QString& textRef )
void
UsersPage::onPasswordTextChanged( const QString& )
{
-cWarning() << "onPasswordTextChanged()";
-
QString pw1 = ui->textBoxUserPassword->text();
QString pw2 = ui->textBoxUserVerifiedPassword->text();
m_readyPassword = true;
@@ -425,20 +421,12 @@ cWarning() << "onPasswordTextChanged()";
for ( auto pc : m_passwordChecks )
{
QString s = pc.filter( pw1 );
-#ifdef CHECK_PWQUALITY
-cWarning() << "pc.getClass()=" << pc.getClass() << " "
- << ( ui->checkBoxValidatePassword->isChecked() ? "ui->checkBoxValidatePassword->isChecked()" :
- "! ui->checkBoxValidatePassword->isChecked()")
- << ( pc.getClass() == "libpwquality" ? "pc.getClass() == libpwquality" :
- "pc.getClass() != libpwquality" ) ;
+#ifdef CHECK_PWQUALITY
if ( ! ui->checkBoxValidatePassword->isChecked() && pc.getClass() == "libpwquality" )
continue;
-
-cWarning() << "s=" << s << "s.isEmpty()=" << s.isEmpty() ;
-#else // CHECK_PWQUALITY
-cWarning() << "!CHECK_PWQUALITY" ;
#endif // CHECK_PWQUALITY
+
if ( !s.isEmpty() )
{
labelError( ui->labelUserPassword, ui->labelUserPasswordError, s );
@@ -446,7 +434,6 @@ cWarning() << "!CHECK_PWQUALITY" ;
break;
}
}
-cWarning() << "m_readyPassword=" << m_readyPassword ;
if ( m_readyPassword )
{
@@ -460,8 +447,6 @@ cWarning() << "m_readyPassword=" << m_readyPassword ;
void
UsersPage::onRootPasswordTextChanged( const QString& )
{
-cWarning() << "onRootPasswordTextChanged()";
-
QString pw1 = ui->textBoxRootPassword->text();
QString pw2 = ui->textBoxVerifiedRootPassword->text();
m_readyRootPassword = true;
@@ -507,23 +492,23 @@ cWarning() << "onRootPasswordTextChanged()";
void
-UsersPage::setAutologinDefault( bool checked )
+UsersPage::setValidatePasswordDefault( bool checked )
{
- ui->checkBoxAutoLogin->setChecked( checked );
+ ui->checkBoxValidatePassword->setChecked( checked );
emit checkReady( isReady() );
}
void
-UsersPage::setReusePasswordDefault( bool checked )
+UsersPage::setAutologinDefault( bool checked )
{
- ui->checkBoxReusePassword->setChecked( checked );
+ ui->checkBoxAutoLogin->setChecked( checked );
emit checkReady( isReady() );
}
void
-UsersPage::setValidatePasswordDefault( bool checked )
+UsersPage::setReusePasswordDefault( bool checked )
{
- ui->checkBoxValidatePassword->setChecked( checked );
+ ui->checkBoxReusePassword->setChecked( checked );
emit checkReady( isReady() );
}
diff --git a/src/modules/users/page_usersetup.ui b/src/modules/users/page_usersetup.ui
index 2d53b4bda..ae74255c2 100644
--- a/src/modules/users/page_usersetup.ui
+++ b/src/modules/users/page_usersetup.ui
@@ -461,23 +461,23 @@
</spacer>
</item>
<item>
- <widget class="QCheckBox" name="checkBoxAutoLogin">
+ <widget class="QCheckBox" name="checkBoxValidatePassword">
<property name="text">
- <string>Log in automatically without asking for the password.</string>
+ <string>Require strong passwords.</string>
</property>
</widget>
</item>
<item>
- <widget class="QCheckBox" name="checkBoxReusePassword">
+ <widget class="QCheckBox" name="checkBoxAutoLogin">
<property name="text">
- <string>Use the same password for the administrator account.</string>
+ <string>Log in automatically without asking for the password.</string>
</property>
</widget>
</item>
<item>
- <widget class="QCheckBox" name="checkBoxValidatePassword">
+ <widget class="QCheckBox" name="checkBoxReusePassword">
<property name="text">
- <string>Require strong passwords.</string>
+ <string>Use the same password for the administrator account.</string>
</property>
</widget>
</item>
diff --git a/src/modules/welcome/WelcomePage.cpp b/src/modules/welcome/WelcomePage.cpp
index 06dfb4025..13676ffe7 100644
--- a/src/modules/welcome/WelcomePage.cpp
+++ b/src/modules/welcome/WelcomePage.cpp
@@ -94,7 +94,7 @@ WelcomePage::WelcomePage( QWidget* parent )
tr(
"<h1>%1</h1><br/>"
"<strong>%2<br/>"
- "for %3</strong><br/><br/>"
+ "for %3</strong>(Built on: %4)<br/><br/>"
"Copyright 2014-2017 Teo Mrnjavac &lt;teo@kde.org&gt;<br/>"
"Copyright 2017-2019 Adriaan de Groot &lt;groot@kde.org&gt;<br/>"
"Thanks to <a href=\"https://calamares.io/team/\">the Calamares team</a> "
@@ -107,7 +107,8 @@ WelcomePage::WelcomePage( QWidget* parent )
)
.arg( CALAMARES_APPLICATION_NAME )
.arg( CALAMARES_VERSION )
- .arg( *Calamares::Branding::VersionedName ),
+ .arg( *Calamares::Branding::VersionedName )
+ .arg( *Calamares::Branding::Version ),
QMessageBox::Ok,
this );
mb.setIconPixmap( CalamaresUtils::defaultPixmap( CalamaresUtils::Squid,