summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbill-auger <mr.j.spam.me@gmail.com>2017-06-04 22:03:00 -0400
committerbill-auger <mr.j.spam.me@gmail.com>2017-06-07 16:23:12 -0400
commitcefa7ca615b85dfc39c7cfd1549a26dd01d5011e (patch)
tree5806aff415e5c8cc26559ef7699b6416ef4b7e8b
parent55c1ab92a55dd26ab9bc43dd9d6f3b361ee09ff9 (diff)
stash - did not netinstall modulev3.1.0-parabola
-rwxr-xr-xmk7
-rw-r--r--settings.conf70
-rw-r--r--src/branding/parabola/branding.desc1
-rw-r--r--src/branding/parabola/show.qml238
-rw-r--r--src/modules/bootloader/bootloader.conf14
-rw-r--r--src/modules/bootloader/main.py7
-rw-r--r--src/modules/desktop/desktop.cpp9
-rw-r--r--src/modules/pacstrap/pacstrap.conf25
-rw-r--r--src/modules/pacstrap/pacstrap.cpp25
-rw-r--r--src/modules/pacstrap/pacstrap.h2
10 files changed, 222 insertions, 176 deletions
diff --git a/mk b/mk
index 8e943a6f7..7c8e57821 100755
--- a/mk
+++ b/mk
@@ -1,12 +1,14 @@
#!/bin/bash
-# sudo pacman -S arch-install-scripts
+# sudo pacman -S base-devel git extra-cmake-modules qt5-tools yaml-cpp polkit-qt5 \
+# kpmcore boost
+# sudo pacman -S squashfs-tools arch-install-scripts
if [ ! -d build ]
then mkdir build
-else rm build/Makefile > /dev/null
+else rm -f build/Makefile 2> /dev/null
fi
# if [ ! -d /etc/calamares/ ]
# then sudo mkdir /etc/calamares
@@ -18,6 +20,7 @@ fi
cd build
cmake -DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_INSTALL_PREFIX=/usr \
+ -DWITH_CRASHREPORTER=OFF \
-DSKIP_MODULES="dracut dracutlukscfg dummycpp dummyprocess dummypython \
dummypythonqt grubcfg initramfs initramfscfg \
interactiveterminal license luksbootkeyfile \
diff --git a/settings.conf b/settings.conf
index 69be1b5e9..c3f0d5937 100644
--- a/settings.conf
+++ b/settings.conf
@@ -8,8 +8,7 @@
# "local" means LIBDIR/calamares/modules with settings in SHARE/calamares/modules or
# /etc/calamares/modules.
# YAML: list of strings.
-# modules-search: [ local ]
-modules-search: [ build/src/modules ]
+modules-search: [ local ]
# Instances section. This section is optional, and it defines custom instances for
# modules of any kind. An instance entry has an instance name, a module name, and
@@ -60,39 +59,40 @@ modules-search: [ build/src/modules ]
# instances are lifted.
# YAML: list of lists of strings.
sequence:
-- show:
- - welcome
- - locale
- - keyboard
-# - netinstall
- - partition
- - users
- - summary
-- exec:
- - partition
- - pacstrap
- - mount
-# - unpackfs
- - networkcfg
-# - packages
- - machineid
- - fstab
- - locale
- - keyboard
- - localecfg
-# - initcpiocfg
-# - initcpio
- - umount
- - desktop
- - mount
- - users
- - displaymanager
- - hwclock
- - services
- - bootloader
- - umount
-- show:
- - finished
+ - show:
+ - welcome
+ - locale
+ - keyboard
+## - netinstall
+ - partition
+ - users
+ - summary
+ - exec:
+ - partition
+ - pacstrap
+ - mount
+## - unpackfs
+ - networkcfg
+## - packages
+ - machineid
+ - fstab
+ - locale
+ - keyboard
+ - localecfg
+## - initcpiocfg
+## - initcpio
+ - umount
+ - desktop
+ - mount
+ - users
+ - displaymanager
+ - hwclock
+ - services
+# - grubcfg
+ - bootloader
+ - umount
+ - show:
+ - finished
# A branding component is a directory, either in SHARE/calamares/branding or in
# /etc/calamares/branding (the latter takes precedence). The directory must contain a
diff --git a/src/branding/parabola/branding.desc b/src/branding/parabola/branding.desc
index 0d16525c8..02e8d15b9 100644
--- a/src/branding/parabola/branding.desc
+++ b/src/branding/parabola/branding.desc
@@ -8,7 +8,6 @@ strings:
shortVersion: 2017-06
versionedName: Parabola GNU/Linux-Libre
shortVersionedName: Parabola
- bootloaderEntryName: Parabola GNU/Linux-Libre
images:
productLogo: "squid.png"
diff --git a/src/branding/parabola/show.qml b/src/branding/parabola/show.qml
index 2702448eb..c060276a6 100644
--- a/src/branding/parabola/show.qml
+++ b/src/branding/parabola/show.qml
@@ -1,131 +1,159 @@
/* === This file is part of Calamares - <http://github.com/calamares> ===
- *
- * Copyright 2015, Teo Mrnjavac <teo@kde.org>
- *
- * Calamares is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * Calamares is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Calamares. If not, see <http://www.gnu.org/licenses/>.
- */
+*
+* Copyright 2015, Teo Mrnjavac <teo@kde.org>
+*
+* Calamares is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* Calamares is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with Calamares. If not, see <http://www.gnu.org/licenses/>.
+*/
/*
- * Slides images dimensions are 800x440px.
- */
+* Slides images dimensions are 800x440px.
+*/
import QtQuick 2.0;
import calamares.slideshow 1.0;
Presentation
{
- id: presentation
+ id: presentation
- Timer {
- interval: 5000
- running: true
- repeat: true
- onTriggered: presentation.goToNextSlide()
- }
-
- Slide {
+ Timer
+ {
+ interval: 2000
+ running: true
+ repeat: true
+ onTriggered: presentation.goToNextSlide()
+ }
- Image {
- id: background1
- source: "Wallpaper_Parabola_Landscape_r800x450px.png"
+ Slide
+ {
+ Image
+ {
+ id: background1
+ source: "Wallpaper_Parabola_Landscape_r800x450px.png"
// width: 800; height: 450
- fillMode: Image.PreserveAspectCrop
- anchors.centerIn: parent
- }
- Text {
- anchors.horizontalCenter: background1.horizontalCenter
- anchors.bottom: background1.bottom
- text: "slide-1"
- wrapMode: Text.WordWrap
-// width: 800
- horizontalAlignment: Text.Center
- }
+ fillMode: Image.PreserveAspectCrop
+ anchors.centerIn: parent
}
+// Text {
+// anchors.horizontalCenter: background1.horizontalCenter
+// anchors.bottom: background1.bottom
+// text: "slide-1"
+// wrapMode: Text.WordWrap
+// width: 800
+// horizontalAlignment: Text.Center
+// }
+ }
- Slide {
-
- Image {
- id: background2
- source: "Wallpaper_Parabola_Landscape_r800x450px.png"
- width: 800; height: 450
- fillMode: Image.PreserveAspectCrop
+ Slide
+ {
+ Image
+ {
+ id: background2
+ source: "Wallpaper_Parabola_Landscape_r800x450px.png"
+ width: 800; height: 450
+ fillMode: Image.PreserveAspectCrop
// anchors.centerIn: parent
- }
- Text {
- anchors.horizontalCenter: background2.horizontalCenter
- anchors.top: background2.bottom
- text: "slide-2"
- wrapMode: Text.WordWrap
- width: 800
- horizontalAlignment: Text.Center
- }
}
+// Text {
+// anchors.horizontalCenter: background2.horizontalCenter
+// anchors.top: background2.bottom
+// text: "slide-2"
+// wrapMode: Text.WordWrap
+// width: 800
+// horizontalAlignment: Text.Center
+// }
+ }
- Slide {
-
- Image {
- id: background3
- source: "Wallpaper_Parabola_Landscape_r800x450px.png"
+ Slide
+ {
+ Image
+ {
+ id: background3
+ source: "Wallpaper_Parabola_Landscape_r800x450px.png"
// width: 800; height: 450
- fillMode: Image.PreserveAspectFit
- anchors.centerIn: parent
- }
- Text {
- anchors.horizontalCenter: background3.horizontalCenter
- anchors.top: background3.bottom
- text: "slide-3"
- wrapMode: Text.WordWrap
- width: 800
- horizontalAlignment: Text.Center
- }
+ fillMode: Image.PreserveAspectFit
+ anchors.centerIn: parent
}
+// Text {
+// anchors.horizontalCenter: background3.horizontalCenter
+// anchors.top: background3.bottom
+// text: "slide-3"
+// wrapMode: Text.WordWrap
+// width: 800
+// horizontalAlignment: Text.Center
+// }
+ }
- Slide {
-
- Image {
- id: background4
- source: "Wallpaper_Parabola_Landscape_r800x450px.png"
- width: 800; height: 450
- fillMode: Image.PreserveAspectFit
+ Slide
+ {
+ Image
+ {
+ id: background4
+ source: "Wallpaper_Parabola_Landscape_r800x450px.png"
+ width: 800; height: 450
+ fillMode: Image.PreserveAspectFit
// anchors.centerIn: parent
- }
- Text {
- anchors.horizontalCenter: background4.horizontalCenter
- anchors.top: background4.bottom
- text: "slide-4"
- wrapMode: Text.WordWrap
- width: 800
- horizontalAlignment: Text.Center
- }
}
+// Text {
+// anchors.horizontalCenter: background4.horizontalCenter
+// anchors.top: background4.bottom
+// text: "slide-4"
+// wrapMode: Text.WordWrap
+// width: 800
+// horizontalAlignment: Text.Center
+// }
+ }
- Slide {
-
- Image {
- id: background5
- source: "Wallpaper_Parabola_Landscape_r800x450px.png"
+ Slide
+ {
+ Image
+ {
+ id: background5
+ source: "Wallpaper_Parabola_Landscape_r800x450px.png"
// width: 800; height: 450
- fillMode: Image.Stretch
- anchors.centerIn: parent
- }
- Text {
- anchors.horizontalCenter: background5.horizontalCenter
- anchors.top: background5.bottom
- text: "slide-5"
- wrapMode: Text.WordWrap
- width: 800
- horizontalAlignment: Text.Center
- }
+ fillMode: Image.Stretch
+ anchors.centerIn: parent
+ }
+// Text {
+// anchors.horizontalCenter: background5.horizontalCenter
+// anchors.top: background5.bottom
+// text: "slide-5"
+// wrapMode: Text.WordWrap
+// width: 800
+// horizontalAlignment: Text.Center
+// }
+ }
+
+ Slide
+ {
+ Image
+ {
+ id: background6
+ source: "Wallpaper_Parabola_Landscape_r960x540px.png"
+ fillMode: Image.Stretch
+ anchors.centerIn: parent
+ }
+ }
+ Slide
+ {
+ Image
+ {
+ id: background7
+ source: "Wallpaper_Parabola_Landscape_r1024x576px.png"
+ fillMode: Image.Stretch
+ anchors.top: parent.top
+ anchors.left: parent.left
}
+ }
}
diff --git a/src/modules/bootloader/bootloader.conf b/src/modules/bootloader/bootloader.conf
index 4a4c71ce1..a1ed7f236 100644
--- a/src/modules/bootloader/bootloader.conf
+++ b/src/modules/bootloader/bootloader.conf
@@ -5,21 +5,21 @@ efiBootLoader: "grub"
# systemd-boot configuration files settings, set kernel and initramfs file names
# and amount of time before default selection boots
-kernel: "/vmlinuz-linux-libre"
-img: "/initramfs-linux-libre.img"
+kernel: "/vmlinuz-linux-libre"
+img: "/initramfs-linux-libre.img"
fallback: "/initramfs-linux-libre-fallback.img"
-timeout: "10"
+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: "Generic GNU/Linux"
+bootloaderEntryName: "Parabola GNU/Linux-Libre"
# kernelLine: ", with Stable-Kernel"
-# fallbackKernelLine: ", with Stable-Kernel (fallback initramfs)"
+fallbackKernelLine: " (recovery mode)"
# GRUB 2 binary names and boot directory
# Some distributions (e.g. Fedora) use grub2-* (resp. /boot/grub2/) names.
-grubInstall: "grub-install"
+grubInstall: "grub-install"
grubMkconfig: "grub-mkconfig"
-grubCfg: "/boot/grub/grub.cfg"
+grubCfg: "/boot/grub/grub.cfg"
# Optionally set the --bootloader-id to use for EFI. If not set, this defaults
# to the bootloaderEntryName from branding.desc with problematic characters
# replaced. If an efiBootloaderId is specified here, it is taken to already be a
diff --git a/src/modules/bootloader/main.py b/src/modules/bootloader/main.py
index fd5990490..567031f4c 100644
--- a/src/modules/bootloader/main.py
+++ b/src/modules/bootloader/main.py
@@ -203,6 +203,13 @@ def install_grub(efi_directory, fw_type):
:param efi_directory:
: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() 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/desktop/desktop.cpp b/src/modules/desktop/desktop.cpp
index 98c47d28d..00c15e895 100644
--- a/src/modules/desktop/desktop.cpp
+++ b/src/modules/desktop/desktop.cpp
@@ -66,9 +66,10 @@ DesktopCppJob::exec()
if (target_device == "")
return Calamares::JobResult::error("Target device for root filesystem is unspecified.");
+cDebug() << QString("[PACSTRAPCPP]: DesktopCppJob::exec() default_desktop=%1").arg(globalStorage->value("default-desktop").toString());
-// QString default_desktop = globalStorage->value("default-desktop").toString();
- QString default_desktop = "mate"; // TODO: per user option
+ QString default_desktop = globalStorage->value("default-desktop").toString();
+default_desktop = "mate"; // TODO: per user option via globalStorage
QVariantList package_list = m_configurationMap.value("xserver").toList() +
m_configurationMap.value("applications").toList() +
m_configurationMap.value("utilities").toList() +
@@ -78,12 +79,12 @@ DesktopCppJob::exec()
QString packages = packageListToString(package_list) ;
QString mount_cmd = QString( "/bin/sh -c \"mount %1 %2\"" ).arg( target_device, mountpoint );
- QString install_cmd = QString( "/bin/sh -c \"pacstrap -c %1 %2\"" ).arg( mountpoint, packages );
+ QString pacstrap_cmd = QString( "/bin/sh -c \"pacstrap -c %1 %2\"" ).arg( mountpoint, packages );
QString umount_cmd = QString( "/bin/sh -c \"umount %1\"" ).arg( target_device );
// install graphical desktop
QProcess::execute( mount_cmd );
- QProcess::execute( install_cmd );
+ QProcess::execute( pacstrap_cmd );
QProcess::execute( umount_cmd );
emit progress( 10 );
diff --git a/src/modules/pacstrap/pacstrap.conf b/src/modules/pacstrap/pacstrap.conf
index dfed55705..63b1ccc2a 100644
--- a/src/modules/pacstrap/pacstrap.conf
+++ b/src/modules/pacstrap/pacstrap.conf
@@ -1,18 +1,9 @@
---
-syntax: "YAML map of anything"
-example:
- whats_this: "module-specific configuration"
- from_where: "pacstrap.conf"
-a_list:
- - "item1"
- - "item2"
- - "item3"
- - "item4"
-a_list_of_maps:
- - name: "an Item"
- contents:
- - "an element"
- - "another element"
- - name: "another item"
- contents:
- - "not much"
+base:
+ - "base"
+ - "sudo"
+kernel:
+ - "linux-libre"
+bootloader:
+ - "grub"
+# - "os-prober"
diff --git a/src/modules/pacstrap/pacstrap.cpp b/src/modules/pacstrap/pacstrap.cpp
index feb2f600c..374bca701 100644
--- a/src/modules/pacstrap/pacstrap.cpp
+++ b/src/modules/pacstrap/pacstrap.cpp
@@ -68,6 +68,10 @@ PacstrapCppJob::exec()
Calamares::GlobalStorage *globalStorage = Calamares::JobQueue::instance()->globalStorage();
QString target_device = globalStorage->value("target-device").toString();
QString mountpoint = "/tmp/pacstrap";
+ QVariantList package_list = m_configurationMap.value("base").toList() +
+ m_configurationMap.value("kernel").toList() +
+ m_configurationMap.value("bootloader").toList();
+ QString packages = packageListToString(package_list) ;
if (target_device == "")
return Calamares::JobResult::error("Target device for root filesystem is unspecified.");
@@ -76,22 +80,22 @@ PacstrapCppJob::exec()
QString keyring_cmd = "/bin/sh -c \"pacman -Sy --noconfirm parabola-keyring && \
pacman-key --populate parabola && \
pacman-key --refresh-keys \"";
- QString mkdir_cmd = QString( "/bin/sh -c \"mkdir %1\"" ).arg( mountpoint );
+ QString mkdir_cmd = QString( "/bin/sh -c \"mkdir %1 2> /dev/null\"" ).arg( mountpoint );
QString mount_cmd = QString( "/bin/sh -c \"mount %1 %2\"" ).arg( target_device, mountpoint );
- QString pacstrap_cmd = QString( "/bin/sh -c \"pacstrap -c %1 base\"" ).arg( mountpoint );
- QString kernel_cmd = QString( "/bin/sh -c \"pacstrap -c %1 linux-libre sudo\"" ).arg( mountpoint );
+ QString pacstrap_cmd = QString( "/bin/sh -c \"pacstrap -c %1 %2\"" ).arg( mountpoint, packages );
QString umount_cmd = QString( "/bin/sh -c \"umount %1\"" ).arg( target_device );
cDebug() << QString("[PACSTRAPCPP]: pacstrap_cmd=%1").arg(pacstrap_cmd);
// QProcess::execute( "/bin/sh -c \"ls /tmp/\"" );
// boot-strap install root filesystem
- m_status = tr( "Bootstrapping root filesystem" ); emit progress( 1 );
+ m_status = tr( "Installing root filesystem" ); emit progress( 1 );
// QProcess::execute( keyring_cmd );
QProcess::execute( mkdir_cmd );
QProcess::execute( mount_cmd );
QProcess::execute( pacstrap_cmd );
- m_status = tr( "Installing linux-libre kernel" ); emit progress( 5 );
+// m_status = tr( "Installing linux-libre kernel" ); emit progress( 5 );
+ emit progress( 5 );
// QProcess::execute( kernel_cmd );
QProcess::execute( umount_cmd );
@@ -138,4 +142,15 @@ if (mount_point == "/") cDebug() << QString("[PACSTRAPCPP]: target_device=%1").a
}
+QString
+PacstrapCppJob::packageListToString( const QVariantList& package_list )
+{
+ QStringList result;
+ for ( const QVariant& package : package_list )
+ result.append( package.toString() );
+
+ return result.join(' ');
+}
+
+
CALAMARES_PLUGIN_FACTORY_DEFINITION( PacstrapCppJobFactory, registerPlugin<PacstrapCppJob>(); )
diff --git a/src/modules/pacstrap/pacstrap.h b/src/modules/pacstrap/pacstrap.h
index c2056ce1f..f2301bf77 100644
--- a/src/modules/pacstrap/pacstrap.h
+++ b/src/modules/pacstrap/pacstrap.h
@@ -46,6 +46,8 @@ public:
private:
void setTargetDevice();
+ static QString packageListToString( const QVariantList& package_list );
+
QVariantMap m_configurationMap;
QString m_status;