diff options
author | bill-auger <mr.j.spam.me@gmail.com> | 2017-11-19 22:44:11 -0500 |
---|---|---|
committer | bill-auger <mr.j.spam.me@gmail.com> | 2019-06-29 13:59:24 -0400 |
commit | 14b233a214e41b0af336721613b9bd9ed92af17d (patch) | |
tree | ad5ad0f910daa0315aa2d30003a9192500975f07 | |
parent | 29788da68b930ae82503e963d552a6c75f13ea55 (diff) |
implement luks - remove skel files
48 files changed, 519 insertions, 929 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index c589c6f27..9ae28d794 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -373,20 +373,6 @@ install( ${CMAKE_INSTALL_MANDIR}/man8/ ) -install( - PROGRAMS - ${CMAKE_SOURCE_DIR}/pacstrap-calamares.sh - DESTINATION - ${CMAKE_INSTALL_BINDIR}/calamares/skel/ -) - -install( - DIRECTORY - ${CMAKE_SOURCE_DIR}/data/skel/ - DESTINATION - ${CMAKE_INSTALL_DATADIR}/calamares/skel/ -) - # uninstall target configure_file( "${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in" diff --git a/PKGBUILD b/PKGBUILD deleted file mode 100644 index 6c53c2bbe..000000000 --- a/PKGBUILD +++ /dev/null @@ -1,39 +0,0 @@ -# Maintainer: bill-auger <bill-auger@programmer.net> - - -pkgname=calamares -pkgver=3.1.0 -pkgrel=2 -pkgdesc='Distribution-independent installer framework - Parabola edition' -arch=('i686' 'x86_64') -license=('GPL') -url="https://calamares.io/" - -depends=('boost-libs' 'dmidecode' 'gptfdisk' 'hwinfo' 'kconfig' 'kcoreaddons' 'ki18n' - 'kparts' 'kpmcore' 'polkit-qt5' 'python' 'squashfs-tools' 'solid' 'qt5ct' - 'qt5-styleplugins' 'qt5-svg' 'yaml-cpp') -makedepends=('boost' 'extra-cmake-modules' 'git' 'qt5-tools') - -_git_tag="${pkgver}-parabola-alpha${pkgrel}" -source=("https://notabug.org/bill-auger/calamares/archive/v${_git_tag}.tar.gz") -# sha256sums=('6ae55f567d5eafdb781dc84988dec184637fa7cf8bd55d7a2157b2d920880d52') # alpha1 -sha256sums=('a118ad28e7fd9b9b9603a7b79374c7e7d5c6ca9d41d6ba06137db94cdce05e5c') # alpha2 - - -build() { - mkdir -p ${srcdir}/calamares/build - cd ${srcdir}/calamares/build - cmake -DCMAKE_BUILD_TYPE=Debug \ - -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_INSTALL_LIBDIR=lib \ - -DWITH_CRASHREPORTER=OFF \ - -DSKIP_MODULES="dracut dracutlukscfg dummycpp dummyprocess dummypython \ - dummypythonqt grubcfg initramfs initramfscfg \ - interactiveterminal license luksbootkeyfile \ - luksopenswaphookcfg plymouthcfg removeuser webview" .. -} - -package() { - cd ${srcdir}/calamares/build - make DESTDIR="$pkgdir" install -} diff --git a/data/skel/mate/.ICEauthority b/data/skel/mate/.ICEauthority Binary files differdeleted file mode 100644 index b959e6a56..000000000 --- a/data/skel/mate/.ICEauthority +++ /dev/null diff --git a/data/skel/mate/.Xauthority b/data/skel/mate/.Xauthority Binary files differdeleted file mode 100644 index 132220db6..000000000 --- a/data/skel/mate/.Xauthority +++ /dev/null diff --git a/data/skel/mate/.bash_logout b/data/skel/mate/.bash_logout deleted file mode 100644 index 0e4e4f184..000000000 --- a/data/skel/mate/.bash_logout +++ /dev/null @@ -1,3 +0,0 @@ -# -# ~/.bash_logout -# diff --git a/data/skel/mate/.bash_profile b/data/skel/mate/.bash_profile deleted file mode 100644 index 5545f007e..000000000 --- a/data/skel/mate/.bash_profile +++ /dev/null @@ -1,5 +0,0 @@ -# -# ~/.bash_profile -# - -[[ -f ~/.bashrc ]] && . ~/.bashrc diff --git a/data/skel/mate/.bashrc b/data/skel/mate/.bashrc deleted file mode 100644 index 89392d75b..000000000 --- a/data/skel/mate/.bashrc +++ /dev/null @@ -1,15 +0,0 @@ -# -# ~/.bashrc -# - -# If not running interactively, don't do anything -[[ $- != *i* ]] && return - -setxkbmap us - -alias ls='ls --color=auto' - -if [[ "$XDG_VTNR" == "7" ]] -then PS1="\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w/\[\033[00m\]\n$ " -else PS1='[\u@\h \W]\$ ' -fi diff --git a/data/skel/mate/.cache/mate/background/0_1_1024_768_6fb1a8398fc17d5268aa5ccdd628a9a1 b/data/skel/mate/.cache/mate/background/0_1_1024_768_6fb1a8398fc17d5268aa5ccdd628a9a1 Binary files differdeleted file mode 100644 index 5163123b8..000000000 --- a/data/skel/mate/.cache/mate/background/0_1_1024_768_6fb1a8398fc17d5268aa5ccdd628a9a1 +++ /dev/null diff --git a/data/skel/mate/.config/caja/accels b/data/skel/mate/.config/caja/accels deleted file mode 100644 index b3731d8ce..000000000 --- a/data/skel/mate/.config/caja/accels +++ /dev/null @@ -1,134 +0,0 @@ -; caja GtkAccelMap rc-file -*- scheme -*- -; this file is an automated accelerator map dump -; -; (gtk_accel_path "<Actions>/DirViewActions/Trash" "") -; (gtk_accel_path "<Actions>/DirViewActions/Save Search" "") -; (gtk_accel_path "<Actions>/IconViewActions/Sort by Emblems" "") -; (gtk_accel_path "<Actions>/DirViewActions/Start Volume" "") -; (gtk_accel_path "<Actions>/DirViewActions/Location Poll" "") -; (gtk_accel_path "<Actions>/ShellActions/Go to Trash" "") -; (gtk_accel_path "<Actions>/SpatialActions/Go to Location" "<Primary>l") -; (gtk_accel_path "<Actions>/IconViewActions/Stretch" "") -; (gtk_accel_path "<Actions>/DirViewActions/MoveToMenu" "") -; (gtk_accel_path "<Actions>/ShellActions/ZoomInAccel" "<Primary>equal") -; (gtk_accel_path "<Actions>/DirViewActions/LocationTrash" "") -; (gtk_accel_path "<Actions>/DirViewActions/RenameSelectAll" "<Shift>F2") -; (gtk_accel_path "<Actions>/DirViewActions/Undo" "<Primary>z") -; (gtk_accel_path "<Actions>/DirViewActions/Location Start Volume" "") -; (gtk_accel_path "<Actions>/DirViewActions/CopyToMenu" "") -; (gtk_accel_path "<Actions>/DirViewActions/Empty Trash" "") -; (gtk_accel_path "<Actions>/ShellActions/Close" "<Primary>w") -; (gtk_accel_path "<Actions>/DirViewActions/LocationRestoreFromTrash" "") -; (gtk_accel_path "<Actions>/IconViewActions/Manual Layout" "") -; (gtk_accel_path "<Actions>/ExtensionsMenuGroup/CajaOpenTerminal::open_terminal" "") -; (gtk_accel_path "<Actions>/ShellActions/Zoom Normal" "<Primary>0") -; (gtk_accel_path "<Actions>/DirViewActions/Create Link" "<Primary>m") -; (gtk_accel_path "<Actions>/DirViewActions/LocationDelete" "") -; (gtk_accel_path "<Actions>/IconViewActions/Sort by Trash Time" "") -; (gtk_accel_path "<Actions>/DirViewActions/OtherApplication2" "") -; (gtk_accel_path "<Actions>/DirViewActions/OpenInNewTab" "<Primary><Shift>o") -; (gtk_accel_path "<Actions>/DirViewActions/OtherApplication1" "") -; (gtk_accel_path "<Actions>/ShellActions/Connect to Server" "") -; (gtk_accel_path "<Actions>/ShellActions/Help" "") -; (gtk_accel_path "<Actions>/ShellActions/ZoomInAccel2" "<Primary>KP_Add") -; (gtk_accel_path "<Actions>/SpatialActions/Close All Folders" "<Primary>q") -; (gtk_accel_path "<Actions>/ShellActions/File" "") -; (gtk_accel_path "<Actions>/DirViewActions/Format Volume" "") -; (gtk_accel_path "<Actions>/ShellActions/Caja Manual" "F1") -; (gtk_accel_path "<Actions>/ShellActions/Go to Network" "") -; (gtk_accel_path "<Actions>/DirViewActions/Mount Volume" "") -; (gtk_accel_path "<Actions>/DirViewActions/Copy" "<Primary>c") -; (gtk_accel_path "<Actions>/IconViewActions/Sort by Type" "") -; (gtk_accel_path "<Actions>/ShellActions/View" "") -; (gtk_accel_path "<Actions>/DirViewActions/New Empty File" "") -; (gtk_accel_path "<Actions>/ShellActions/About Caja" "") -; (gtk_accel_path "<Actions>/DirViewActions/Location Eject Volume" "") -; (gtk_accel_path "<Actions>/IconViewActions/Unstretch" "") -; (gtk_accel_path "<Actions>/ShellActions/Zoom Out" "<Primary>minus") -; (gtk_accel_path "<Actions>/DirViewActions/OpenCloseParent" "<Shift><Alt>Down") -; (gtk_accel_path "<Actions>/SpatialActions/Close Parent Folders" "<Primary><Shift>w") -; (gtk_accel_path "<Actions>/DirViewActions/Open" "<Primary>o") -; (gtk_accel_path "<Actions>/DirViewActions/Self Format Volume" "") -; (gtk_accel_path "<Actions>/DirViewActions/Unmount Volume" "") -; (gtk_accel_path "<Actions>/DirViewActions/Connect To Server Link" "") -; (gtk_accel_path "<Actions>/DirViewActions/Location Unmount Volume" "") -; (gtk_accel_path "<Actions>/DirViewActions/Reset to Defaults" "") -; (gtk_accel_path "<Actions>/DirViewActions/Location Mount Volume" "") -; (gtk_accel_path "<Actions>/DirViewActions/LocationCut" "") -; (gtk_accel_path "<Actions>/ShellActions/Zoom In" "<Primary>plus") -; (gtk_accel_path "<Actions>/DirViewActions/LocationOpenFolderWindow" "") -; (gtk_accel_path "<Actions>/DirViewActions/Self Eject Volume" "") -; (gtk_accel_path "<Actions>/IconViewActions/Tighter Layout" "") -; (gtk_accel_path "<Actions>/DirViewActions/Paste Files Into" "") -; (gtk_accel_path "<Actions>/DirViewActions/LocationCopy" "") -; (gtk_accel_path "<Actions>/DirViewActions/OpenAccel" "<Alt>Down") -; (gtk_accel_path "<Actions>/DirViewActions/Open With" "") -; (gtk_accel_path "<Actions>/ShellActions/Edit" "") -; (gtk_accel_path "<Actions>/ShellActions/Up" "<Alt>Up") -; (gtk_accel_path "<Actions>/DirViewActions/Open Scripts Folder" "") -; (gtk_accel_path "<Actions>/DirViewActions/New Documents" "") -; (gtk_accel_path "<Actions>/ShellActions/Reload" "<Primary>r") -; (gtk_accel_path "<Actions>/DirViewActions/Move to Home" "") -; (gtk_accel_path "<Actions>/ShellActions/Backgrounds and Emblems" "") -; (gtk_accel_path "<Actions>/DirViewActions/No Templates" "") -; (gtk_accel_path "<Actions>/DirViewActions/Location Format Volume" "") -; (gtk_accel_path "<Actions>/ShellActions/ZoomOutAccel" "<Primary>KP_Subtract") -; (gtk_accel_path "<Actions>/DirViewActions/LocationPasteFilesInto" "") -; (gtk_accel_path "<Actions>/IconViewActions/Sort by Size" "") -; (gtk_accel_path "<Actions>/DirViewActions/Select All" "<Primary>a") -; (gtk_accel_path "<Actions>/DirViewActions/OpenAlternate" "<Primary><Shift>o") -; (gtk_accel_path "<Actions>/ShellActions/Preferences" "") -; (gtk_accel_path "<Actions>/DirViewActions/Poll" "") -; (gtk_accel_path "<Actions>/DirViewActions/Select Pattern" "<Primary>s") -; (gtk_accel_path "<Actions>/DesktopViewActions/Change Background" "") -; (gtk_accel_path "<Actions>/IconViewActions/Reversed Order" "") -; (gtk_accel_path "<Actions>/ShellActions/Go to Computer" "") -; (gtk_accel_path "<Actions>/DirViewActions/Restore From Trash" "") -; (gtk_accel_path "<Actions>/DirViewActions/Location Stop Volume" "") -; (gtk_accel_path "<Actions>/DirViewActions/LocationProperties" "") -; (gtk_accel_path "<Actions>/DirViewActions/Rename" "F2") -; (gtk_accel_path "<Actions>/DirViewActions/Redo" "<Primary>y") -; (gtk_accel_path "<Actions>/ShellActions/Go to Templates" "") -; (gtk_accel_path "<Actions>/ShellActions/Show Hidden Files" "<Primary>h") -; (gtk_accel_path "<Actions>/DirViewActions/Self Start Volume" "") -; (gtk_accel_path "<Actions>/DirViewActions/Move to next pane" "") -; (gtk_accel_path "<Actions>/DirViewActions/OpenFolderWindow" "") -; (gtk_accel_path "<Actions>/DirViewActions/LocationOpenInNewTab" "") -; (gtk_accel_path "<Actions>/DirViewActions/Duplicate" "") -; (gtk_accel_path "<Actions>/DirViewActions/Eject Volume" "") -; (gtk_accel_path "<Actions>/DirViewActions/Stop Volume" "") -; (gtk_accel_path "<Actions>/DirViewActions/PropertiesAccel" "<Primary>i") -; (gtk_accel_path "<Actions>/ShellActions/Home" "<Alt>Home") -; (gtk_accel_path "<Actions>/IconViewActions/Clean Up" "") -; (gtk_accel_path "<Actions>/IconViewActions/Sort by Modification Date" "") -; (gtk_accel_path "<Actions>/DirViewActions/Save Search As" "") -; (gtk_accel_path "<Actions>/IconViewActions/Keep Aligned" "") -; (gtk_accel_path "<Actions>/DirViewActions/New Launcher" "") -; (gtk_accel_path "<Actions>/DirViewActions/Properties" "<Alt>Return") -; (gtk_accel_path "<Actions>/SpatialActions/Add Bookmark" "<Primary>d") -; (gtk_accel_path "<Actions>/DirViewActions/Copy to Desktop" "") -; (gtk_accel_path "<Actions>/ShellActions/Stop" "") -; (gtk_accel_path "<Actions>/DirViewActions/New Folder" "<Primary><Shift>n") -; (gtk_accel_path "<Actions>/DirViewActions/Self Poll" "") -; (gtk_accel_path "<Actions>/DirViewActions/Move to Desktop" "") -; (gtk_accel_path "<Actions>/DirViewActions/Cut" "<Primary>x") -; (gtk_accel_path "<Caja-Window>/view_as_4" "<Primary>4") -; (gtk_accel_path "<Actions>/DirViewActions/Delete" "<Shift>Delete") -; (gtk_accel_path "<Actions>/DesktopViewActions/New Launcher Desktop" "") -; (gtk_accel_path "<Actions>/IconViewActions/Sort by Name" "") -; (gtk_accel_path "<Caja-Window>/view_as_2" "<Primary>2") -; (gtk_accel_path "<Caja-Window>/view_as_3" "<Primary>3") -; (gtk_accel_path "<Actions>/DirViewActions/Paste" "<Primary>v") -; (gtk_accel_path "<Actions>/DirViewActions/Invert Selection" "<Primary><Shift>i") -; (gtk_accel_path "<Caja-Window>/view_as_1" "<Primary>1") -; (gtk_accel_path "<Actions>/DesktopViewActions/Empty Trash Conditional" "") -; (gtk_accel_path "<Actions>/IconViewActions/Arrange Items" "") -; (gtk_accel_path "<Actions>/DirViewActions/Self Stop Volume" "") -; (gtk_accel_path "<Actions>/SpatialActions/Places" "") -; (gtk_accel_path "<Actions>/SpatialActions/Edit Bookmarks" "<Primary>b") -; (gtk_accel_path "<Actions>/DirViewActions/Copy to Home" "") -; (gtk_accel_path "<Actions>/DirViewActions/Self Mount Volume" "") -; (gtk_accel_path "<Actions>/SpatialActions/Search" "<Primary>f") -; (gtk_accel_path "<Actions>/DirViewActions/Self Unmount Volume" "") -; (gtk_accel_path "<Actions>/DirViewActions/Copy to next pane" "") -; (gtk_accel_path "<Actions>/DirViewActions/LocationOpenAlternate" "") diff --git a/data/skel/mate/.config/caja/desktop-metadata b/data/skel/mate/.config/caja/desktop-metadata deleted file mode 100644 index d80c2893a..000000000 --- a/data/skel/mate/.config/caja/desktop-metadata +++ /dev/null @@ -1,23 +0,0 @@ -[directory] -caja-icon-view-keep-aligned=true -caja-icon-view-layout-timestamp=1505924306 - -[trash] -caja-icon-position=64,302 -icon-scale=1 -caja-icon-position-timestamp=1505924306 - -[computer] -caja-icon-position=64,22 -icon-scale=1 -caja-icon-position-timestamp=1505924306 - -[home] -caja-icon-position=64,102 -icon-scale=1 -caja-icon-position-timestamp=1505924306 - -[openSUSE 13.2 KDE Live.volume] -caja-icon-position=64,382 -icon-scale=1 -caja-icon-position-timestamp=1441316562 diff --git a/data/skel/mate/.config/dconf/user b/data/skel/mate/.config/dconf/user Binary files differdeleted file mode 100644 index 113e640ff..000000000 --- a/data/skel/mate/.config/dconf/user +++ /dev/null diff --git a/data/skel/mate/.config/gtk-2.0/gtkfilechooser.ini b/data/skel/mate/.config/gtk-2.0/gtkfilechooser.ini deleted file mode 100644 index c6b458dfa..000000000 --- a/data/skel/mate/.config/gtk-2.0/gtkfilechooser.ini +++ /dev/null @@ -1,11 +0,0 @@ -[Filechooser Settings] -LocationMode=path-bar -ShowHidden=true -ShowSizeColumn=true -GeometryX=52 -GeometryY=86 -GeometryWidth=920 -GeometryHeight=585 -SortColumn=name -SortOrder=ascending -StartupMode=recent diff --git a/data/skel/mate/.config/octopi/octopi.conf b/data/skel/mate/.config/octopi/octopi.conf deleted file mode 100644 index 58dfdac11..000000000 --- a/data/skel/mate/.config/octopi/octopi.conf +++ /dev/null @@ -1,2 +0,0 @@ -[General] -LastSyncDbTime=@DateTime(\0\0\0\x10\0\0\0\0\0\0%\x81\xa1\x2\x14Nc\0) diff --git a/data/skel/mate/.config/pulse/82b0568e94d14a1ea892086635b342fc-card-database.tdb b/data/skel/mate/.config/pulse/82b0568e94d14a1ea892086635b342fc-card-database.tdb Binary files differdeleted file mode 100644 index 323f375d6..000000000 --- a/data/skel/mate/.config/pulse/82b0568e94d14a1ea892086635b342fc-card-database.tdb +++ /dev/null diff --git a/data/skel/mate/.config/pulse/82b0568e94d14a1ea892086635b342fc-default-sink b/data/skel/mate/.config/pulse/82b0568e94d14a1ea892086635b342fc-default-sink deleted file mode 100644 index 8b1378917..000000000 --- a/data/skel/mate/.config/pulse/82b0568e94d14a1ea892086635b342fc-default-sink +++ /dev/null @@ -1 +0,0 @@ - diff --git a/data/skel/mate/.config/pulse/82b0568e94d14a1ea892086635b342fc-default-source b/data/skel/mate/.config/pulse/82b0568e94d14a1ea892086635b342fc-default-source deleted file mode 100644 index 8b1378917..000000000 --- a/data/skel/mate/.config/pulse/82b0568e94d14a1ea892086635b342fc-default-source +++ /dev/null @@ -1 +0,0 @@ - diff --git a/data/skel/mate/.config/pulse/82b0568e94d14a1ea892086635b342fc-device-volumes.tdb b/data/skel/mate/.config/pulse/82b0568e94d14a1ea892086635b342fc-device-volumes.tdb Binary files differdeleted file mode 100644 index ec6b6956c..000000000 --- a/data/skel/mate/.config/pulse/82b0568e94d14a1ea892086635b342fc-device-volumes.tdb +++ /dev/null diff --git a/data/skel/mate/.config/pulse/82b0568e94d14a1ea892086635b342fc-stream-volumes.tdb b/data/skel/mate/.config/pulse/82b0568e94d14a1ea892086635b342fc-stream-volumes.tdb Binary files differdeleted file mode 100644 index b768866fb..000000000 --- a/data/skel/mate/.config/pulse/82b0568e94d14a1ea892086635b342fc-stream-volumes.tdb +++ /dev/null diff --git a/data/skel/mate/.config/pulse/cookie b/data/skel/mate/.config/pulse/cookie Binary files differdeleted file mode 100644 index 4170e4612..000000000 --- a/data/skel/mate/.config/pulse/cookie +++ /dev/null diff --git a/data/skel/mate/.config/volumeicon/volumeicon b/data/skel/mate/.config/volumeicon/volumeicon deleted file mode 100644 index 588b9dda4..000000000 --- a/data/skel/mate/.config/volumeicon/volumeicon +++ /dev/null @@ -1,25 +0,0 @@ -[Alsa] -card=default - -[Notification] -show_notification=true -notification_type=0 - -[StatusIcon] -stepsize=5 -onclick=xterm -e 'alsamixer' -theme=Default -use_panel_specific_icons=false -lmb_slider=false -mmb_mute=false -use_horizontal_slider=false -show_sound_level=false -use_transparent_background=false - -[Hotkeys] -up_enabled=false -down_enabled=false -mute_enabled=false -up=XF86AudioRaiseVolume -down=XF86AudioLowerVolume -mute=XF86AudioMute diff --git a/data/skel/mate/.directory b/data/skel/mate/.directory deleted file mode 100644 index 07c52ff02..000000000 --- a/data/skel/mate/.directory +++ /dev/null @@ -1,6 +0,0 @@ -[Dolphin] -Timestamp=2014,12,3,17,12,32 -Version=3 - -[Settings] -HiddenFilesShown=true diff --git a/data/skel/mate/.dmrc b/data/skel/mate/.dmrc deleted file mode 100644 index 7083a13ef..000000000 --- a/data/skel/mate/.dmrc +++ /dev/null @@ -1,3 +0,0 @@ -[Desktop] -Language=en_US.utf8 -Session=mate diff --git a/data/skel/mate/.esd_auth b/data/skel/mate/.esd_auth deleted file mode 100644 index 619c476d7..000000000 --- a/data/skel/mate/.esd_auth +++ /dev/null @@ -1 +0,0 @@ -Þ¨uÚféñ·jí³†+±¬
\ No newline at end of file diff --git a/data/skel/mate/.local/share/keyrings/login.keyring b/data/skel/mate/.local/share/keyrings/login.keyring Binary files differdeleted file mode 100644 index 09e423571..000000000 --- a/data/skel/mate/.local/share/keyrings/login.keyring +++ /dev/null diff --git a/data/skel/mate/.local/share/keyrings/user.keystore b/data/skel/mate/.local/share/keyrings/user.keystore Binary files differdeleted file mode 100644 index 2d41c7f72..000000000 --- a/data/skel/mate/.local/share/keyrings/user.keystore +++ /dev/null diff --git a/data/skel/mate/.local/share/recently-used.xbel b/data/skel/mate/.local/share/recently-used.xbel deleted file mode 100644 index 03854a71e..000000000 --- a/data/skel/mate/.local/share/recently-used.xbel +++ /dev/null @@ -1,5 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<xbel version="1.0" - xmlns:bookmark="http://www.freedesktop.org/standards/desktop-bookmarks" - xmlns:mime="http://www.freedesktop.org/standards/shared-mime-info" -></xbel>
\ No newline at end of file diff --git a/data/skel/mate/.zshrc b/data/skel/mate/.zshrc deleted file mode 100644 index 8695b4dbe..000000000 --- a/data/skel/mate/.zshrc +++ /dev/null @@ -1,336 +0,0 @@ -# Filename: /etc/skel/.zshrc -# Purpose: config file for zsh (z shell) -# Authors: (c) grml-team (grml.org) -# Bug-Reports: see http://grml.org/bugs/ -# License: This file is licensed under the GPL v2 or any later version. -################################################################################ -# Nowadays, grml's zsh setup lives in only *one* zshrc file. -# That is the global one: /etc/zsh/zshrc (from grml-etc-core). -# It is best to leave *this* file untouched and do personal changes to -# your zsh setup via ${HOME}/.zshrc.local which is loaded at the end of -# the global zshrc. -# -# That way, we enable people on other operating systems to use our -# setup, too, just by copying our global zshrc to their ${HOME}/.zshrc. -# Adjustments would still go to the .zshrc.local file. -################################################################################ - -## Inform users about upgrade path for grml's old zshrc layout, assuming that: -## /etc/skel/.zshrc was installed as ~/.zshrc, -## /etc/zsh/zshrc was installed as ~/.zshrc.global and -## ~/.zshrc.local does not exist yet. -if [ -r ~/.zshrc -a -r ~/.zshrc.global -a ! -r ~/.zshrc.local ] ; then - printf '-!-\n' - printf '-!- Looks like you are using the old zshrc layout of grml.\n' - printf '-!- Please read the notes in the grml-zsh-refcard, being' - printf '-!- available at: http://grml.org/zsh/\n' - printf '-!-\n' - printf '-!- If you just want to get rid of this warning message execute:\n' - printf '-!- touch ~/.zshrc.local\n' - printf '-!-\n' -fi - -## Settings for umask -#if (( EUID == 0 )); then -# umask 002 -#else -# umask 022 -#fi - -## Now, we'll give a few examples of what you might want to use in your -## .zshrc.local file (just copy'n'paste and uncomment it there): - -## Prompt theme extension ## - -# Virtualenv support - -#function virtual_env_prompt () { -# REPLY=${VIRTUAL_ENV+(${VIRTUAL_ENV:t}) } -#} -#grml_theme_add_token virtual-env -f virtual_env_prompt '%F{magenta}' '%f' -#zstyle ':prompt:grml:left:setup' items rc virtual-env change-root user at host path vcs percent - -## ZLE tweaks ## - -## use the vi navigation keys (hjkl) besides cursor keys in menu completion -#bindkey -M menuselect 'h' vi-backward-char # left -#bindkey -M menuselect 'k' vi-up-line-or-history # up -#bindkey -M menuselect 'l' vi-forward-char # right -#bindkey -M menuselect 'j' vi-down-line-or-history # bottom - -## set command prediction from history, see 'man 1 zshcontrib' -#is4 && zrcautoload predict-on && \ -#zle -N predict-on && \ -#zle -N predict-off && \ -#bindkey "^X^Z" predict-on && \ -#bindkey "^Z" predict-off - -## press ctrl-q to quote line: -#mquote () { -# zle beginning-of-line -# zle forward-word -# # RBUFFER="'$RBUFFER'" -# RBUFFER=${(q)RBUFFER} -# zle end-of-line -#} -#zle -N mquote && bindkey '^q' mquote - -## define word separators (for stuff like backward-word, forward-word, backward-kill-word,..) -#WORDCHARS='*?_-.[]~=/&;!#$%^(){}<>' # the default -#WORDCHARS=. -#WORDCHARS='*?_[]~=&;!#$%^(){}' -#WORDCHARS='${WORDCHARS:s@/@}' - -# just type '...' to get '../..' -#rationalise-dot() { -#local MATCH -#if [[ $LBUFFER =~ '(^|/| | |'$'\n''|\||;|&)\.\.$' ]]; then -# LBUFFER+=/ -# zle self-insert -# zle self-insert -#else -# zle self-insert -#fi -#} -#zle -N rationalise-dot -#bindkey . rationalise-dot -## without this, typing a . aborts incremental history search -#bindkey -M isearch . self-insert - -#bindkey '\eq' push-line-or-edit - -## some popular options ## - -## add `|' to output redirections in the history -#setopt histallowclobber - -## try to avoid the 'zsh: no matches found...' -#setopt nonomatch - -## warning if file exists ('cat /dev/null > ~/.zshrc') -#setopt NO_clobber - -## don't warn me about bg processes when exiting -#setopt nocheckjobs - -## alert me if something failed -#setopt printexitvalue - -## with spelling correction, assume dvorak kb -#setopt dvorak - -## Allow comments even in interactive shells -#setopt interactivecomments - - -## compsys related snippets ## - -## changed completer settings -#zstyle ':completion:*' completer _complete _correct _approximate -#zstyle ':completion:*' expand prefix suffix - -## another different completer setting: expand shell aliases -#zstyle ':completion:*' completer _expand_alias _complete _approximate - -## to have more convenient account completion, specify your logins: -#my_accounts=( -# {grml,grml1}@foo.invalid -# grml-devel@bar.invalid -#) -#other_accounts=( -# {fred,root}@foo.invalid -# vera@bar.invalid -#) -#zstyle ':completion:*:my-accounts' users-hosts $my_accounts -#zstyle ':completion:*:other-accounts' users-hosts $other_accounts - -## add grml.org to your list of hosts -#hosts+=(grml.org) -#zstyle ':completion:*:hosts' hosts $hosts - -## telnet on non-default ports? ...well: -## specify specific port/service settings: -#telnet_users_hosts_ports=( -# user1@host1: -# user2@host2: -# @mail-server:{smtp,pop3} -# @news-server:nntp -# @proxy-server:8000 -#) -#zstyle ':completion:*:*:telnet:*' users-hosts-ports $telnet_users_hosts_ports - -## the default grml setup provides '..' as a completion. it does not provide -## '.' though. If you want that too, use the following line: -#zstyle ':completion:*' special-dirs true - -## aliases ## - -## translate -#alias u='translate -i' - -## ignore ~/.ssh/known_hosts entries -#alias insecssh='ssh -o "StrictHostKeyChecking=no" -o "UserKnownHostsFile=/dev/null" -o "PreferredAuthentications=keyboard-interactive"' - - -## global aliases (for those who like them) ## - -#alias -g '...'='../..' -#alias -g '....'='../../..' -#alias -g BG='& exit' -#alias -g C='|wc -l' -#alias -g G='|grep' -#alias -g H='|head' -#alias -g Hl=' --help |& less -r' -#alias -g K='|keep' -#alias -g L='|less' -#alias -g LL='|& less -r' -#alias -g M='|most' -#alias -g N='&>/dev/null' -#alias -g R='| tr A-z N-za-m' -#alias -g SL='| sort | less' -#alias -g S='| sort' -#alias -g T='|tail' -#alias -g V='| vim -' - -## instead of global aliase it might be better to use grmls $abk assoc array, whose contents are expanded after pressing ,. -#$abk[SnL]="| sort -n | less" - -## get top 10 shell commands: -#alias top10='print -l ${(o)history%% *} | uniq -c | sort -nr | head -n 10' - -## Execute \kbd{./configure} -#alias CO="./configure" - -## Execute \kbd{./configure --help} -#alias CH="./configure --help" - -## miscellaneous code ## - -## Use a default width of 80 for manpages for more convenient reading -#export MANWIDTH=${MANWIDTH:-80} - -## Set a search path for the cd builtin -#cdpath=(.. ~) - -## variation of our manzsh() function; pick you poison: -#manzsh() { /usr/bin/man zshall | most +/"$1" ; } - -## Switching shell safely and efficiently? http://www.zsh.org/mla/workers/2001/msg02410.html -#bash() { -# NO_SWITCH="yes" command bash "$@" -#} -#restart () { -# exec $SHELL $SHELL_ARGS "$@" -#} - -## Handy functions for use with the (e::) globbing qualifier (like nt) -#contains() { grep -q "$*" $REPLY } -#sameas() { diff -q "$*" $REPLY &>/dev/null } -#ot () { [[ $REPLY -ot ${~1} ]] } - -## get_ic() - queries imap servers for capabilities; real simple. no imaps -#ic_get() { -# emulate -L zsh -# local port -# if [[ ! -z $1 ]] ; then -# port=${2:-143} -# print "querying imap server on $1:${port}...\n"; -# print "a1 capability\na2 logout\n" | nc $1 ${port} -# else -# print "usage:\n $0 <imap-server> [port]" -# fi -#} - -## List all occurrences of programm in current PATH -#plap() { -# emulate -L zsh -# if [[ $# = 0 ]] ; then -# echo "Usage: $0 program" -# echo "Example: $0 zsh" -# echo "Lists all occurrences of program in the current PATH." -# else -# ls -l ${^path}/*$1*(*N) -# fi -#} - -## Find out which libs define a symbol -#lcheck() { -# if [[ -n "$1" ]] ; then -# nm -go /usr/lib/lib*.a 2>/dev/null | grep ":[[:xdigit:]]\{8\} . .*$1" -# else -# echo "Usage: lcheck <function>" >&2 -# fi -#} - -## Download a file and display it locally -#uopen() { -# emulate -L zsh -# if ! [[ -n "$1" ]] ; then -# print "Usage: uopen \$URL/\$file">&2 -# return 1 -# else -# FILE=$1 -# MIME=$(curl --head $FILE | \ -# grep Content-Type | \ -# cut -d ' ' -f 2 | \ -# cut -d\; -f 1) -# MIME=${MIME%$'\r'} -# curl $FILE | see ${MIME}:- -# fi -#} - -## Memory overview -#memusage() { -# ps aux | awk '{if (NR > 1) print $5; -# if (NR > 2) print "+"} -# END { print "p" }' | dc -#} - -## print hex value of a number -#hex() { -# emulate -L zsh -# if [[ -n "$1" ]]; then -# printf "%x\n" $1 -# else -# print 'Usage: hex <number-to-convert>' -# return 1 -# fi -#} - -## log out? set timeout in seconds... -## ...and do not log out in some specific terminals: -#if [[ "${TERM}" == ([Exa]term*|rxvt|dtterm|screen*) ]] ; then -# unset TMOUT -#else -# TMOUT=1800 -#fi - -## associate types and extensions (be aware with perl scripts and anwanted behaviour!) -#check_com zsh-mime-setup || { autoload zsh-mime-setup && zsh-mime-setup } -#alias -s pl='perl -S' - -## ctrl-s will no longer freeze the terminal. -#stty erase "^?" - -## you want to automatically use a bigger font on big terminals? -#if [[ "$TERM" == "xterm" ]] && [[ "$LINES" -ge 50 ]] && [[ "$COLUMNS" -ge 100 ]] && [[ -z "$SSH_CONNECTION" ]] ; then -# large -#fi - -## Some quick Perl-hacks aka /useful/ oneliner -#bew() { perl -le 'print unpack "B*","'$1'"' } -#web() { perl -le 'print pack "B*","'$1'"' } -#hew() { perl -le 'print unpack "H*","'$1'"' } -#weh() { perl -le 'print pack "H*","'$1'"' } -#pversion() { perl -M$1 -le "print $1->VERSION" } # i. e."pversion LWP -> 5.79" -#getlinks () { perl -ne 'while ( m/"((www|ftp|http):\/\/.*?)"/gc ) { print $1, "\n"; }' $* } -#gethrefs () { perl -ne 'while ( m/href="([^"]*)"/gc ) { print $1, "\n"; }' $* } -#getanames () { perl -ne 'while ( m/a name="([^"]*)"/gc ) { print $1, "\n"; }' $* } -#getforms () { perl -ne 'while ( m:(\</?(input|form|select|option).*?\>):gic ) { print $1, "\n"; }' $* } -#getstrings () { perl -ne 'while ( m/"(.*?)"/gc ) { print $1, "\n"; }' $*} -#getanchors () { perl -ne 'while ( m/«([^«»\n]+)»/gc ) { print $1, "\n"; }' $* } -#showINC () { perl -e 'for (@INC) { printf "%d %s\n", $i++, $_ }' } -#vimpm () { vim `perldoc -l $1 | sed -e 's/pod$/pm/'` } -#vimhelp () { vim -c "help $1" -c on -c "au! VimEnter *" } - -## END OF FILE ################################################################# diff --git a/data/skel/mate/CALAMARES-SKEL b/data/skel/mate/CALAMARES-SKEL deleted file mode 100644 index e69de29bb..000000000 --- a/data/skel/mate/CALAMARES-SKEL +++ /dev/null @@ -1,18 +1,35 @@ #!/bin/bash +readonly NO_UPGRADE=1 +readonly RUN_INSTALLED=1 +# [ "`lsmod | grep squashfs`" ] || sudo modprobe squashfs + + +function print() { printf "\033[01;34m%s\033[00m\n" "$(echo -e $*)" ; } -sudo echo "\n--- running pacman ---\n" -BASE_PKGS="$(pacman -Qg base-devel | cut -d ' ' -f 2)" -CALAMARES_PKGS="boost extra-cmake-modules git kpmcore qt5-tools polkit-qt5 yaml-cpp" # squashfs-tools os-prober -PARABOLA_PKGS="arch-install-scripts" -PKGS="$BASE_PKGS $CALAMARES_PKGS $PARABOLA_PKGS" -pacman -Qi calamares > /dev/null 2>&1 && sudo pacman -R calamares -pacman -Qi $PKGS > /dev/null || sudo pacman -S --needed $PKGS + +sudo echo +if pacman --version 2> /dev/null | grep libalpm > /dev/null +then print "\n--- running pacman ---\n" + BASE_PKGS="$(pacman -Qg base-devel | cut -d ' ' -f 2)" + CALAMARES_PKGS="boost extra-cmake-modules git kconfig kpmcore kservice kwindowsystem \ + plasma-framework qt5-tools polkit-qt5 yaml-cpp" # squashfs-tools os-prober +# PARABOLA_PKGS="arch-install-scripts" + PKGS="$BASE_PKGS $CALAMARES_PKGS $PARABOLA_PKGS" + pacman -Qi calamares > /dev/null 2>&1 && sudo pacman -R calamares + pacman -Qi $PKGS > /dev/null && (($NO_UPGRADE)) || sudo pacman -Sy --needed $PKGS || exit 1 +elif which apt-get &> /dev/null +then print "\n--- running apt ---\n" + apt-get install extra-cmake-modules libatasmart-dev libboost-python-dev \ + libkf5coreaddons-dev libkf5kio-dev libkf5plasma-dev \ + libkf5service-dev libkpmcore4-dev libparted-dev \ + libpolkit-qt5-1-dev qtdeclarative5-dev || exit 1 +fi -echo "\n--- preparing build environment ---\n" -if [ ! -d build ] -then mkdir build +if [ ! -d ./build ] +then print "\n--- preparing build environment ---\n" + mkdir ./build # else rm -f build/Makefile 2> /dev/null fi # if [ ! -d /etc/calamares/ ] @@ -22,29 +39,46 @@ fi # fi -echo "\n--- running cmake ---\n" -cd build -cmake -DCMAKE_BUILD_TYPE=Debug \ - -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_INSTALL_LIBDIR=lib \ - -DWITH_CRASHREPORTER=OFF \ - -DSKIP_MODULES="dracut dracutlukscfg dummycpp dummyprocess dummypython \ - dummypythonqt grubcfg initramfs initramfscfg \ - interactiveterminal license luksbootkeyfile \ - luksopenswaphookcfg plymouthcfg removeuser webview" .. +print "\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" .. + + +if [ -d /usr/share/calamares/ -o -f /usr/bin/calamares ] +then print "\n--- running make uninstall ---\n" + sudo make uninstall + sudo rm -rf /usr/share/calamares/ /usr/bin/calamares +fi -echo "\n--- running make uninstall ---\n" -[ -d /usr/share/calamares/ ] && sudo make uninstall -sudo rm -rf /usr/share/calamares/ +if [ ! -f Makefile ] +then print "\n--- Makefile does not exist - bailing ---\n" + cd .. + exit 1 +fi -echo "\n--- running make install ---\n" -[ -f Makefile ] && sudo make install +if (($RUN_INSTALLED)) +then print "\n--- running make install ---\n" + sudo make install +else print "\n--- running make ---\n" + make +fi cd .. -echo "\n--- launching calamares ---\n" -# [ "`lsmod | grep squashfs`" ] || sudo modprobe squashfs -[ -f /usr/bin/calamares ] && sudo calamares -# [ -f build/calamares ] && sudo build/calamares +if (($RUN_INSTALLED)) && [ -f /usr/bin/calamares ] +then print "\n--- launching calamares installed ---\n" + sudo calamares +elif [ -f build/calamares ] +then print "\n--- launching calamares uninstalled ---\n" + cp ./settings.conf ./build + cd ./build + sudo ./calamares -d + cd .. +fi diff --git a/settings.conf b/settings.conf index 89494a31e..3e3fe6473 100644 --- a/settings.conf +++ b/settings.conf @@ -63,33 +63,33 @@ sequence: - welcome - locale - keyboard + - users # - netinstall - partition - - users # - tracking - summary - exec: - partition - - pacstrap - mount + - pacstrap-base + - pacstrap-gui # - unpackfs - - networkcfg +# - networkcfg # - packages - machineid - fstab - locale - keyboard - localecfg -# - initcpiocfg -# - initcpio - - umount - - desktop - - mount + - luksbootkeyfile + - luksopenswaphookcfg + - initcpiocfg + - initcpio - users - displaymanager - hwclock - services -# - grubcfg + - grubcfg - bootloader - umount - show: diff --git a/src/libcalamares/GlobalStorage.cpp b/src/libcalamares/GlobalStorage.cpp index ea09dabcb..02d4fe7df 100644 --- a/src/libcalamares/GlobalStorage.cpp +++ b/src/libcalamares/GlobalStorage.cpp @@ -169,7 +169,11 @@ GlobalStoragePythonWrapper::value( const std::string& key ) const const QString GS::HAS_ISOREPO_KEY = "has-isorepo"; const QString GS::IS_ONLINE_KEY = "hasInternet"; -const QString GS::DESKTOP_PACKAGES_KEY = "default-desktop" ; +const QString GS::INITSYSTEM_KEY = "default-initsystem" ; +const QString GS::DESKTOP_KEY = "default-desktop" ; +const QString GS::LOCALE_KEY = "localeConf"; +const QString GS::LANG_KEY = "LANG"; +const QString GS::ROOT_MOUNTPOINT_KEY = "rootMountPoint"; const QString GS::PARTITIONS_KEY = "partitions"; const QString GS::DEVICE_KEY = "device"; const QString GS::FS_KEY = "fs"; diff --git a/src/libcalamares/GlobalStorage.h b/src/libcalamares/GlobalStorage.h index 7910e6873..543c6c6d0 100644 --- a/src/libcalamares/GlobalStorage.h +++ b/src/libcalamares/GlobalStorage.h @@ -106,7 +106,11 @@ class GS public: static const QString HAS_ISOREPO_KEY; static const QString IS_ONLINE_KEY; - static const QString DESKTOP_PACKAGES_KEY; + static const QString INITSYSTEM_KEY; + static const QString DESKTOP_KEY; + static const QString LOCALE_KEY; + static const QString LANG_KEY; + static const QString ROOT_MOUNTPOINT_KEY; static const QString PARTITIONS_KEY; static const QString DEVICE_KEY; static const QString FS_KEY; diff --git a/src/libcalamares/PacstrapCppJob.cpp b/src/libcalamares/PacstrapCppJob.cpp index 268baf2da..ae90093fc 100644 --- a/src/libcalamares/PacstrapCppJob.cpp +++ b/src/libcalamares/PacstrapCppJob.cpp @@ -27,85 +27,116 @@ /* PacstrapCppJob public class constants */ -const QString PacstrapCppJob::BASE_PACKAGES_KEY = "base" ; const QString PacstrapCppJob::BOOTLODER_PACKAGES_KEY = "bootloader" ; const QString PacstrapCppJob::KERNEL_PACKAGES_KEY = "kernel" ; +const QString PacstrapCppJob::OPENRC_PACKAGES_KEY = "openrc" ; +const QString PacstrapCppJob::SYSTEMD_PACKAGES_KEY = "systemd" ; const QString PacstrapCppJob::APPLICATIONS_PACKAGES_KEY = "applications" ; const QString PacstrapCppJob::MULTIMEDIA_PACKAGES_KEY = "multimedia" ; const QString PacstrapCppJob::NETWORK_PACKAGES_KEY = "network" ; -const QString PacstrapCppJob::THEMES_PACKAGES_KEY = "themes" ; +const QString PacstrapCppJob::LOOKANDFEEL_PACKAGES_KEY = "look-and-feel" ; const QString PacstrapCppJob::UTILITIES_PACKAGES_KEY = "utilities" ; const QString PacstrapCppJob::XSERVER_PACKAGES_KEY = "x-server" ; -const QString PacstrapCppJob::MATE_PACKAGES_KEY = "mate" ; const QString PacstrapCppJob::LXDE_PACKAGES_KEY = "lxde" ; +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" ; -const char* PacstrapCppJob::GUI_STATUS_MSG = "Installing graphical desktop environment" ; -const qreal PacstrapCppJob::BASE_JOB_WEIGHT = 20.0 ; // progress-bar job weight (1.0 normal) -const qreal PacstrapCppJob::GUI_JOB_WEIGHT = 57.0 ; // progress-bar job weight (1.0 normal) -const qreal PacstrapCppJob::PACMAN_SYNC_PROPORTION = 0.05 ; // per task progress-bar proportion -const qreal PacstrapCppJob::LIST_PACKAGES_PROPORTION = 0.05 ; // per task progress-bar proportion -const qreal PacstrapCppJob::CHROOT_TASK_PROPORTION = 0.9 ; // per task progress-bar proportion -const QString PacstrapCppJob::PACSTRAP_CLEANUP_CMD = QString("umount %1/dev/pts %1/dev/shm %1/dev %1/proc %1/run %1/sys %1/tmp %1").arg(MOUNTPOINT) ; -const QString PacstrapCppJob::PACSTRAP_FMT = "pacstrap -C %1 %2 %3 --noprogressbar" ; -const QString PacstrapCppJob::PACSTRAP_ERROR_MSG = "Failed to install packages in chroot." ; +// 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" ; +const char* PacstrapCppJob::GUI_STATUS_MSG = "Installing graphical desktop environment" ; +const qreal PacstrapCppJob::BASE_JOB_WEIGHT = 20.0 ; // progress-bar job weight (1.0 normal) +const qreal PacstrapCppJob::GUI_JOB_WEIGHT = 57.0 ; // progress-bar job weight (1.0 normal) +const QSTRINGMAP PacstrapCppJob::LANGUAGE_PACKS = { {"eo" , "iceweasel-l10n-eo" } , + {"es_ES.UTF-8" , "icedove-l10n-es-es" } , + {"es_ES.UTF-8" , "iceweasel-l10n-es-es" } , + {"fr_FR.UTF-8" , "icedove-l10n-fr" } , + {"fr_FR.UTF-8" , "iceweasel-l10n-fr" } , + {"gl_ES.UTF-8" , "icedove-l10n-gl" } , + {"gl_ES.UTF-8" , "iceweasel-l10n-gl" } , + {"it_IT.UTF-8" , "icedove-l10n-it" } , + {"it_IT.UTF-8" , "iceweasel-l10n-it" } , + {"pt_BR.UTF-8" , "icedove-l10n-pt-br" } , + {"pt_BR.UTF-8" , "iceweasel-l10n-pt-br" } , + {"pl_PL.UTF-8" , "icedove-l10n-pl" } , + {"pl_PL.UTF-8" , "iceweasel-l10n-pl" } } ; /* 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::DEFAULT_CONF_FILENAME = "/etc/pacman.conf" ; -const QString PacstrapCppJob::ONLINE_CONF_FILENAME = "/etc/pacman-online.conf" ; -const QString PacstrapCppJob::OFFLINE_CONF_FILENAME = "/etc/pacman-offline.conf" ; -const QString PacstrapCppJob::SYSTEM_EXEC_FMT = "/bin/sh -c \"%1\"" ; -// const QString PacstrapCppJob::KEYRING_CMD = "pacman -Sy --noconfirm parabola-keyring" ; -// const QString PacstrapCppJob::KEYRING_CMD = "pacman -Sy --noconfirm parabola-keyring && \ -// pacman-key --init && \ -// pacman-key --populate parabola && \ -// pacman-key --refresh-keys " ; -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::UMOUNT_FMT = "umount %1" ; -const QString PacstrapCppJob::CONFIG_ERROR_MSG = "Invalid configuration map." ; -const QString PacstrapCppJob::TARGET_ERROR_MSG = "Target device for root filesystem is unspecified." ; -const QString PacstrapCppJob::CONFFILE_ERROR_MSG = "Pacman configuration not found: '%1'." ; -// const QString PacstrapCppJob::KEYRING_ERROR_MSG = "Failed to update the pacman keyring." ; -const QString PacstrapCppJob::MOUNT_ERROR_MSG = "Failed to mount the pacstrap chroot." ; -const QString PacstrapCppJob::CHROOT_PREP_ERROR_MSG = "Failed to prepare the pacstrap chroot." ; -const QString PacstrapCppJob::PACMAN_SYNC_ERROR_MSG = "Failed to syncronize packages in the pacstrap 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") ; +// 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" ; +const QString PacstrapCppJob::ONLINE_CONF_FILENAME = "/etc/pacman-online.conf" ; +const QString PacstrapCppJob::OFFLINE_CONF_FILENAME = "/etc/pacman-offline.conf" ; +const qreal PacstrapCppJob::PACMAN_SYNC_PROPORTION = 0.05 ; // per task progress-bar proportion +const qreal PacstrapCppJob::LIST_PACKAGES_PROPORTION = 0.05 ; // per task progress-bar proportion +const qreal PacstrapCppJob::CHROOT_TASK_PROPORTION = 0.9 ; // per task progress-bar proportion +const QString PacstrapCppJob::SYSTEM_EXEC_FMT = "/bin/sh -c \"%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 = "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 \ + archlinuxarm \ + parabola && \ + pacman-key --refresh-keys " ; +// const QString PacstrapCppJob::UMOUNT_FMT = "umount %1" ; +const QString PacstrapCppJob::CONFIG_ERROR_MSG = "Invalid configuration map." ; +const QString PacstrapCppJob::TARGET_ERROR_MSG = "Target device for root filesystem is unspecified." ; +const QString PacstrapCppJob::CONFFILE_ERROR_MSG = "Pacman configuration not found: '%1'." ; +const QString PacstrapCppJob::KEYRING_ERROR_MSG = "Failed to update the pacman keyring." ; +const QString PacstrapCppJob::MOUNT_ERROR_MSG = "Failed to mount the pacstrap chroot." ; +const QString PacstrapCppJob::CHROOT_PREP_ERROR_MSG = "Failed to prepare the pacstrap chroot." ; +const QString PacstrapCppJob::PACMAN_SYNC_ERROR_MSG = "Failed to syncronize packages in the pacstrap chroot." ; +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") ; /* PacstrapCppJob public constructors/destructors */ -PacstrapCppJob::PacstrapCppJob(QString job_name , QString status_msg , - qreal job_weight , QObject* parent ) : - jobName (job_name ) , statusMsg (status_msg) , - jobWeight(job_weight) , Calamares::CppJob(parent ) +PacstrapCppJob::PacstrapCppJob(const char* job_name , const char* status_msg , + qreal job_weight , QObject* parent ) : + jobName (tr(job_name)) , statusMsg (tr(status_msg)) , + jobWeight(job_weight ) , Calamares::CppJob(parent ) { this->globalStorage = Calamares::JobQueue::instance()->globalStorage() ; this->localStorage = QVariantMap() ; // deferred to setConfigurationMap() + this->mountPoint = QString("") ; // deferred to exec() this->targetDevice = QString("") ; // deferred to exec() this->confFile = QString("") ; // deferred to exec() this->packages = QString("") ; // deferred to exec() + this->cacheDir = QDir("") ; // deferred to exec() + this->metedataDir = QDir("") ; // deferred to exec() 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 */ @@ -123,16 +154,26 @@ QString PacstrapCppJob::prettyStatusMessage() const { return thi Calamares::JobResult PacstrapCppJob::exec() { +// globalStorage->insert(GS::INITSYSTEM_KEY , OPENRC_PACKAGES_KEY) ; // TODO: per user option via globalStorage +globalStorage->insert(GS::INITSYSTEM_KEY , SYSTEMD_PACKAGES_KEY) ; // TODO: per user option via globalStorage +globalStorage->insert(GS::DESKTOP_KEY , LXDE_PACKAGES_KEY ) ; // TODO: per user option via globalStorage +// globalStorage->insert(GS::DESKTOP_KEY , MATE_PACKAGES_KEY ) ; // TODO: per user option via globalStorage + // cleanup from possibly aborted previous runs - QProcess::execute(SYSTEM_EXEC_FMT.arg(PACSTRAP_CLEANUP_CMD)) ; +// 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() ; + 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() ; + this->mountPoint = this->globalStorage->value(GS::ROOT_MOUNTPOINT_KEY).toString() ; this->targetDevice = FindTargetDevice(partitions) ; this->confFile = (!has_isorepo) ? DEFAULT_CONF_FILENAME : (is_online ) ? ONLINE_CONF_FILENAME : OFFLINE_CONF_FILENAME ; this->packages = getPackageList() ; + this->cacheDir = QDir(PACKAGES_CACHE_DIR_FMT .arg(this->mountPoint)) ; + this->metedataDir = QDir(PACKAGES_METADATA_DIR_FMT.arg(this->mountPoint)) ; + QString cache_path = this->cacheDir .absolutePath() ; + QString metadata_path = this->metedataDir.absolutePath() ; DEBUG_TRACE_EXEC @@ -141,26 +182,50 @@ DEBUG_TRACE_EXEC 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 , MOUNTPOINT) ; - QString chroot_prep_cmd = CHROOT_PREP_FMT .arg(PACKAGES_CACHE_DIR .absolutePath() , - PACKAGES_METADATA_DIR.absolutePath() ) ; - QString pacman_sync_cmd = DB_REFRESH_FMT .arg(this->confFile , MOUNTPOINT) ; - QString list_packages_cmd = LIST_PACKAGES_FMT.arg(this->confFile , MOUNTPOINT , this->packages) ; - QString umount_cmd = UMOUNT_FMT .arg(this->targetDevice) ; +// 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(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) ; +execStatus(QString("touch %1/etc/os-release").arg(this->mountPoint)) ; //FIXME: + if (!this->packages.isEmpty()) { - QString new_packages = execOutput(list_packages_cmd , LIST_PACKAGES_PROPORTION) ; - this->nPreviousPackages = NPackagesInstalled() ; - this->nPendingPackages = new_packages.count(QChar::LineFeed) ; + QVariantMap result = execWithProgress(list_packages_cmd , LIST_PACKAGES_PROPORTION) ; + int status = result.value(STATUS_KEY).toInt() ; + QString new_packages = result.value(STDOUT_KEY).toString() ; + QString stderr = result.value(STDERR_KEY).toString() ; + this->nPreviousPackages = nPackagesInstalled() ; + this->nPendingPackages = new_packages.count(QChar::LineFeed) ; + + if (!!status) return JobError(stderr) ; if (this->nPendingPackages > 0) { + QString pacstrap_cmd = PACSTRAP_FMT.arg(this->confFile , this->mountPoint , this->packages) ; + QVariantMap pacstrap_result = execWithProgress(pacstrap_cmd , CHROOT_TASK_PROPORTION) ; + int pacstrap_status = pacstrap_result.value(STATUS_KEY).toInt() ; + QString pacstrap_error = pacstrap_result.value(STDERR_KEY).toString().trimmed() ; + + if (pacstrap_error.contains("signature")) + { + this->progressPercent = emitProgress(-CHROOT_TASK_PROPORTION) ; + + if (!!execStatus(KEYRING_CMD , CHROOT_TASK_PROPORTION * 0.5)) + return JobError(KEYRING_ERROR_MSG) ; + + pacstrap_result = execWithProgress(pacstrap_cmd , CHROOT_TASK_PROPORTION * 0.5) ; + pacstrap_status = pacstrap_result.value(STATUS_KEY).toInt() ; + pacstrap_error = pacstrap_result.value(STDERR_KEY).toString().trimmed() ; + } + if (!!pacstrap_status) return JobError(PACSTRAP_ERROR_MSG + pacstrap_error) ; + QString exec_error_msg = chrootExec() ; if (exec_error_msg.isEmpty()) this->nPendingPackages = 0 ; @@ -168,8 +233,9 @@ DEBUG_TRACE_EXEC } } - if (!execStatus(umount_cmd)) this->progressPercent = emitProgress(1.0) ; - else return JobError(UMOUNT_ERROR_MSG) ; +// if (!execStatus(umount_cmd)) this->progressPercent = emitProgress(1.0) ; +// else return JobError(UMOUNT_ERROR_MSG) ; + this->progressPercent = emitProgress(1.0) ; return JobSuccess() ; } @@ -206,35 +272,35 @@ QVariantMap PacstrapCppJob::execWithProgress(QString command_line , qreal task_p DEBUG_TRACE_EXECWITHPROGRESS - retval.insert(STATUS_KEY , QVariant(status)) ; - retval.insert(STDOUT_KEY , QVariant(stdout)) ; - retval.insert(STDERR_KEY , QVariant(stderr)) ; + retval.insert(STATUS_KEY , QVariant(status)) ; + retval.insert(STDOUT_KEY , QVariant(stdout)) ; + retval.insert(STDERR_KEY , QVariant(stderr)) ; - return retval ; -} ; + return retval ; +} int PacstrapCppJob::execStatus(QString command_line , qreal task_proportion) { - QVariantMap result = execWithProgress(command_line , task_proportion) ; - int status = result.value(STATUS_KEY).toInt() ; + QVariantMap result = execWithProgress(command_line , task_proportion) ; + int status = result.value(STATUS_KEY).toInt() ; - return status ; + return status ; } QString PacstrapCppJob::execOutput(QString command_line , qreal task_proportion) { - QVariantMap result = execWithProgress(command_line , task_proportion) ; - QString stdout = result.value(STDOUT_KEY).toString() ; + QVariantMap result = execWithProgress(command_line , task_proportion) ; + QString stdout = result.value(STDOUT_KEY).toString().trimmed() ; - return stdout ; + return stdout ; } QString PacstrapCppJob::execError(QString command_line , qreal task_proportion) { - QVariantMap result = execWithProgress(command_line , task_proportion) ; - QString stderr = result.value(STDERR_KEY).toString() ; + QVariantMap result = execWithProgress(command_line , task_proportion) ; + QString stderr = result.value(STDERR_KEY).toString().trimmed() ; - return stderr ; + return stderr ; } @@ -261,16 +327,12 @@ DEBUG_TRACE_FINDTARGETDEVICE return target_device ; } -qint16 PacstrapCppJob::NPackagesInstalled() -{ - int n_downloaded = PACKAGES_CACHE_DIR .entryList(QDir::Files | QDir::NoDotAndDotDot).count() ; - int n_installed = PACKAGES_METADATA_DIR.entryList(QDir::Dirs | QDir::NoDotAndDotDot).count() ; - - return (n_downloaded + n_installed) / 2 ; -} - 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) ; } @@ -282,6 +344,14 @@ Calamares::JobResult PacstrapCppJob::JobSuccess() /* PacstrapCppJob private instance methods */ +qint16 PacstrapCppJob::nPackagesInstalled() +{ + int n_downloaded = this->cacheDir .entryList(QDir::Files | QDir::NoDotAndDotDot).count() ; + int n_installed = this->metedataDir.entryList(QDir::Dirs | QDir::NoDotAndDotDot).count() ; + + return (n_downloaded + n_installed) / 2 ; +} + qreal PacstrapCppJob::emitProgress(qreal transient_percent) { qreal progress_percent = qBound(0.0 , this->progressPercent + transient_percent , 1.0) ; @@ -297,7 +367,7 @@ qreal PacstrapCppJob::getTaskCompletion() { if (this->nPendingPackages == 0) return 0.0 ; - qreal n_new_packages = qreal(NPackagesInstalled() - this->nPreviousPackages) ; + qreal n_new_packages = qreal(nPackagesInstalled() - this->nPreviousPackages) ; qreal completion_percent = qreal(n_new_packages / this->nPendingPackages ) ; DEBUG_TRACE_GETTASKCOMPLETION diff --git a/src/libcalamares/PacstrapCppJob.h b/src/libcalamares/PacstrapCppJob.h index ca0d851ed..7934d8c89 100644 --- a/src/libcalamares/PacstrapCppJob.h +++ b/src/libcalamares/PacstrapCppJob.h @@ -19,6 +19,8 @@ #ifndef PACSTRAPCPPJOB_H #define PACSTRAPCPPJOB_H +#define QSTRINGMAP QMultiMap<QString , QString> + #include <QDir> #include <QObject> #include <QTimerEvent> @@ -35,8 +37,8 @@ class PacstrapCppJob : public Calamares::CppJob public: - explicit PacstrapCppJob(QString job_name , QString status_msg , - qreal job_weight = 1.0 , QObject* parent = nullptr ) ; + explicit PacstrapCppJob(const char* job_name , const char* status_msg , + qreal job_weight = 1.0 , QObject* parent = nullptr ) ; virtual ~PacstrapCppJob() ; void setConfigurationMap(const QVariantMap& config) override ; @@ -63,9 +65,12 @@ protected: qreal jobWeight ; Calamares::GlobalStorage* globalStorage ; QVariantMap localStorage ; + QString mountPoint ; QString targetDevice ; QString confFile ; QString packages ; + QDir cacheDir ; + QDir metedataDir ; qint16 nPreviousPackages ; qint16 nPendingPackages ; qreal progressPercent ; @@ -74,69 +79,71 @@ protected: private: static QString FindTargetDevice (const QVariantList& partitions) ; - static qint16 NPackagesInstalled() ; static inline Calamares::JobResult JobError (QString error_msg) ; static inline Calamares::JobResult JobSuccess () ; - qreal emitProgress (qreal transient_percent) ; - qreal getTaskCompletion() ; + qint16 nPackagesInstalled() ; + qreal emitProgress (qreal transient_percent) ; + qreal getTaskCompletion () ; /* constants */ public: - static const QString BASE_PACKAGES_KEY ; static const QString BOOTLODER_PACKAGES_KEY ; static const QString KERNEL_PACKAGES_KEY ; + static const QString OPENRC_PACKAGES_KEY ; + static const QString SYSTEMD_PACKAGES_KEY ; static const QString APPLICATIONS_PACKAGES_KEY ; static const QString MULTIMEDIA_PACKAGES_KEY ; static const QString NETWORK_PACKAGES_KEY ; - static const QString THEMES_PACKAGES_KEY ; + static const QString LOOKANDFEEL_PACKAGES_KEY ; static const QString UTILITIES_PACKAGES_KEY ; static const QString XSERVER_PACKAGES_KEY ; - static const QString MATE_PACKAGES_KEY ; static const QString LXDE_PACKAGES_KEY ; + static const QString MATE_PACKAGES_KEY ; protected: - static const QString MOUNTPOINT ; - static const char* BASE_JOB_NAME ; - static const char* GUI_JOB_NAME ; - static const char* BASE_STATUS_MSG ; - static const char* GUI_STATUS_MSG ; - static const qreal BASE_JOB_WEIGHT ; - static const qreal GUI_JOB_WEIGHT ; - static const qreal PACMAN_SYNC_PROPORTION ; - static const qreal LIST_PACKAGES_PROPORTION ; - static const qreal CHROOT_TASK_PROPORTION ; - static const QString PACSTRAP_CLEANUP_CMD ; - static const QString PACSTRAP_FMT ; - static const QString PACSTRAP_ERROR_MSG ; +// static const QString MOUNTPOINT ; + static const char* BASE_JOB_NAME ; + static const char* GUI_JOB_NAME ; + static const char* BASE_STATUS_MSG ; + static const char* GUI_STATUS_MSG ; + static const qreal BASE_JOB_WEIGHT ; + static const qreal GUI_JOB_WEIGHT ; + static const QSTRINGMAP LANGUAGE_PACKS ; private: - static const QDir PACKAGES_CACHE_DIR ; - static const QDir PACKAGES_METADATA_DIR ; + static const QString PACKAGES_CACHE_DIR_FMT ; + static const QString PACKAGES_METADATA_DIR_FMT ; static const QString DEFAULT_CONF_FILENAME ; static const QString ONLINE_CONF_FILENAME ; static const QString OFFLINE_CONF_FILENAME ; + static const qreal PACMAN_SYNC_PROPORTION ; + static const qreal LIST_PACKAGES_PROPORTION ; + static const qreal CHROOT_TASK_PROPORTION ; static const QString SYSTEM_EXEC_FMT ; -// static const QString KEYRING_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 CONFIG_ERROR_MSG ; static const QString TARGET_ERROR_MSG ; static const QString CONFFILE_ERROR_MSG ; -// static const QString KEYRING_ERROR_MSG ; + static const QString KEYRING_ERROR_MSG ; static const QString MOUNT_ERROR_MSG ; static const QString CHROOT_PREP_ERROR_MSG ; static const QString PACMAN_SYNC_ERROR_MSG ; + static const QString PACSTRAP_ERROR_MSG ; static const QString UMOUNT_ERROR_MSG ; static const QString STATUS_KEY ; static const QString STDOUT_KEY ; @@ -150,15 +157,16 @@ private: << " 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 ; \ - cDebug() << "[PACSTRAP]: status=" << status ; \ - cDebug(LOGVERBOSE) << "[PACSTRAP]: stdout=" << stdout ; \ - cDebug(LOGVERBOSE) << "[PACSTRAP]: stderr=" << stderr ; +#define DEBUG_TRACE_EXECWITHPROGRESS \ + cDebug() << "[PACSTRAP]: shell command exited=" << command_line ; \ + cDebug() << "[PACSTRAP]: status=" << status ; \ + cDebug(LOGVERBOSE) << "[PACSTRAP]: stdout='" << stdout << "'" ; \ + cDebug(LOGVERBOSE) << "[PACSTRAP]: stderr='" << stderr << "'" ; #define DEBUG_TRACE_FINDTARGETDEVICE if (!target_device.isEmpty()) \ cDebug() << "[PACSTRAP]: mounting target_device: " << target_device ; @@ -170,17 +178,25 @@ private: #define DEBUG_TRACE_GETTASKCOMPLETION cDebug(LOGVERBOSE) << "[PACSTRAP]: " << \ "this->nPreviousPackages=" << this->nPreviousPackages << \ - " NPackagesInstalled()=" << NPackagesInstalled() << \ + " nPackagesInstalled()=" << nPackagesInstalled() << \ "\n " << \ "n_new_packages=" << (int)n_new_packages << \ " this->nPendingPackages=" << this->nPendingPackages << \ " completion_percent=" << completion_percent ; #ifndef QT_NO_DEBUG -# define DEBUG_TRACE_DESKTOPPACKAGES \ - printf("[PACSTRAP-GUI]: installing default_desktop: %s\n" , \ - globalStorage->value(GS::DESKTOP_PACKAGES_KEY).toString().toStdString().c_str()) ; +# define DEBUG_TRACE_BASEPACKAGES \ + printf("[PACSTRAP-GUI]: installing initsystem: %s\n" , \ + init_key.toStdString().c_str() ) ; +# define DEBUG_TRACE_DESKTOPPACKAGES \ + printf("[PACSTRAP-GUI]: installing initsystem: %s default_desktop: %s" , \ + init_key .toStdString().c_str() , \ + desktop_key.toStdString().c_str() ) ; \ + printf("language_packs: %s for locale: %s\n" , \ + language_packs.join(' ').toStdString().c_str() , \ + locale .toStdString().c_str() ) ; #else // QT_NO_DEBUG +# define DEBUG_TRACE_BASEPACKAGES ; # define DEBUG_TRACE_DESKTOPPACKAGES ; #endif // QT_NO_DEBUG 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/locale/LocalePage.cpp b/src/modules/locale/LocalePage.cpp index 2172586ff..8d3d458da 100644 --- a/src/modules/locale/LocalePage.cpp +++ b/src/modules/locale/LocalePage.cpp @@ -450,13 +450,16 @@ LocaleConfiguration LocalePage::guessLocaleConfiguration() const { QLocale myLocale; // User-selected language - +cLog() << "LocalePage::guessLocaleConfiguration() m_localeGenLines.isEmpty()=" << m_localeGenLines.isEmpty() ; // If we cannot say anything about available locales if ( m_localeGenLines.isEmpty() ) { cDebug() << "WARNING: guessLocaleConfiguration can't guess from an empty list."; return LocaleConfiguration::createDefault(); } +cLog() << "LocalePage::guessLocaleConfiguration() myLocale.name()=" << myLocale.name() ; +if ( myLocale.name().isEmpty() ) cLog() << "LocalePage::guessLocaleConfiguration() returing default" ; +else cLog() << "LocalePage::guessLocaleConfiguration() returing fromLanguageAndLocation()" ; QString myLanguageLocale = myLocale.name(); if ( myLanguageLocale.isEmpty() ) diff --git a/src/modules/pacstrap-base/CMakeLists.txt b/src/modules/pacstrap-base/CMakeLists.txt index 366fc0d4b..c8e7b64ee 100644 --- a/src/modules/pacstrap-base/CMakeLists.txt +++ b/src/modules/pacstrap-base/CMakeLists.txt @@ -7,10 +7,3 @@ calamares_add_plugin( pacstrap-base calamares SHARED_LIB ) - -install( - DIRECTORY - ${CMAKE_SOURCE_DIR}/data/skel/ - DESTINATION - ${CMAKE_INSTALL_DATADIR}/calamares/skel/ -) diff --git a/src/modules/pacstrap-base/pacstrap-base.conf b/src/modules/pacstrap-base/pacstrap-base.conf index 444741bab..af1b54c65 100644 --- a/src/modules/pacstrap-base/pacstrap-base.conf +++ b/src/modules/pacstrap-base/pacstrap-base.conf @@ -1,9 +1,36 @@ --- -base: - - "base" +### Common ### bootloader: - "grub" + - "mkinitcpio-openswap" kernel: - "linux-libre" + + +### Init System ### + +openrc: + - "base-openrc" + - "gpm-openrc" + - "haveged-openrc" + - "hdparm-openrc" + - "networkmanager-openrc" + - "ntp-openrc" + - "openssh-openrc" + - "openvpn-openrc" + - "rsync-openrc" + - "wpa_supplicant-openrc" + +systemd: + - "base" + - "gpm" + - "haveged" + - "hdparm" + - "networkmanager" + - "ntp" + - "openssh" + - "openvpn" + - "rsync" + - "wpa_supplicant" diff --git a/src/modules/pacstrap-base/pacstrap-base.cpp b/src/modules/pacstrap-base/pacstrap-base.cpp index b998c41f7..1c8d714d7 100644 --- a/src/modules/pacstrap-base/pacstrap-base.cpp +++ b/src/modules/pacstrap-base/pacstrap-base.cpp @@ -22,21 +22,31 @@ #include "pacstrap-base.h" +/* 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/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 */ -PacstrapBaseJob::PacstrapBaseJob(QObject* parent) : PacstrapCppJob(tr(BASE_JOB_NAME) , - tr(BASE_STATUS_MSG) , - BASE_JOB_WEIGHT , - parent ) {} +PacstrapBaseJob::PacstrapBaseJob(QObject* parent) : PacstrapCppJob(BASE_JOB_NAME , + BASE_STATUS_MSG , + BASE_JOB_WEIGHT , + parent ) {} /* PacstrapBaseJob protected getters/setters */ QString PacstrapBaseJob::getPackageList() { - return (this->localStorage.value(BASE_PACKAGES_KEY ).toStringList() + - this->localStorage.value(BOOTLODER_PACKAGES_KEY).toStringList() + - this->localStorage.value(KERNEL_PACKAGES_KEY ).toStringList() ).join(' ') ; + QString init_key = this->globalStorage->value(GS::INITSYSTEM_KEY).toString() ; + + return (this->localStorage.value(BOOTLODER_PACKAGES_KEY).toStringList() + + this->localStorage.value(KERNEL_PACKAGES_KEY ).toStringList() + + this->localStorage.value(init_key ).toStringList() ).join(' ') ; } @@ -44,28 +54,14 @@ QString PacstrapBaseJob::getPackageList() QString PacstrapBaseJob::chrootExec() { - QString pacstrap_cmd = PACSTRAP_FMT .arg(this->confFile , MOUNTPOINT , packages) ; - QString grub_theme_cmd = GRUB_THEME_FMT.arg(MOUNTPOINT) ; - - if (!!execStatus(pacstrap_cmd , CHROOT_TASK_PROPORTION)) return PACSTRAP_ERROR_MSG ; +// 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("") ; } -/* 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." ; - - CALAMARES_PLUGIN_FACTORY_DEFINITION(PacstrapBaseJobFactory , registerPlugin<PacstrapBaseJob>() ;) 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.conf b/src/modules/pacstrap-gui/pacstrap-gui.conf index 60018a766..78fc5c2dc 100644 --- a/src/modules/pacstrap-gui/pacstrap-gui.conf +++ b/src/modules/pacstrap-gui/pacstrap-gui.conf @@ -1,7 +1,10 @@ --- +### GUI Common ### + applications: - "abiword" - - "epdfview" + - "gnumeric" + - "gparted" - "icedove" - "iceweasel" - "leafpad" @@ -13,7 +16,6 @@ applications: - "qtox" - "ring-client-gnome" - "smplayer" - - "xarchiver" multimedia: - "alsa-utils" @@ -22,14 +24,17 @@ multimedia: - "pulseaudio-alsa" network: - - "networkmanager" + - "gnome-keyring" + - "network-manager-applet" -themes: - - "grub2-theme-gnuaxiom" +look-and-feel: + - "parabola-laf" + - "xdg-user-dirs" utilities: - "bash-completion" - "dmidecode" + - "gvfs" - "p7zip" - "sudo" - "unar" @@ -44,14 +49,37 @@ x-server: - "xf86-video-sisusb" - "xorg-xinit" + +### Init System ### + +openrc: + - "gvfs-mtp" + - "gvfs-gphoto2" + - "networkmanager-elogind" + - "openrc-desktop" + - "polkit-elogind" + +systemd: [] + + +### Desktop Environment ### + mate: - "galculator-gtk2" - - "gnome-keyring" - - "gnumeric" - - "gparted" - "gpicview" - "lightdm-gtk-greeter-settings" - "mate" - "mate-extra" - "network-manager-applet" - "volumeicon" + - "xarchiver" + +lxde: + - "epdfview" + - "galculator-gtk2" + - "gksu" + - "gnome-screenshot" + - "lxde" + - "obconf" + - "xarchiver" + - "xscreensaver" diff --git a/src/modules/pacstrap-gui/pacstrap-gui.cpp b/src/modules/pacstrap-gui/pacstrap-gui.cpp index a21d3a022..7d904e591 100644 --- a/src/modules/pacstrap-gui/pacstrap-gui.cpp +++ b/src/modules/pacstrap-gui/pacstrap-gui.cpp @@ -22,30 +22,55 @@ #include "pacstrap-gui.h" +/* 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 Welcome|' %1/etc/skel/.config/autostart/autostart.sh" ; +const QString PacstrapGuiJob::OCTOPI_FMT = "rm -f %1/etc/xdg/autostart/octopi-notifier.desktop" ; + + /* PacstrapGuiJob public instance methods */ -PacstrapGuiJob::PacstrapGuiJob(QObject* parent) : PacstrapCppJob(tr(GUI_JOB_NAME) , - tr(GUI_STATUS_MSG) , - GUI_JOB_WEIGHT , - parent ) {} +PacstrapGuiJob::PacstrapGuiJob(QObject* parent) : PacstrapCppJob(GUI_JOB_NAME , + GUI_STATUS_MSG , + GUI_JOB_WEIGHT , + parent ) {} /* PacstrapGuiJob protected getters/setters */ QString PacstrapGuiJob::getPackageList() { -globalStorage->insert(GS::DESKTOP_PACKAGES_KEY , MATE_PACKAGES_KEY) ; // TODO: per user option via globalStorage -DEBUG_TRACE_DESKTOPPACKAGES + QString init_key = this->globalStorage->value(GS::INITSYSTEM_KEY).toString() ; + QString desktop_key = this->globalStorage->value(GS::DESKTOP_KEY ).toString() ; + QString locale = this->globalStorage->value(GS::LOCALE_KEY ).toMap() + .value(GS::LANG_KEY ).toString() ; + QStringList language_packs = LANGUAGE_PACKS.values(locale) ; - QString desktop = this->globalStorage->value(GS::DESKTOP_PACKAGES_KEY).toString() ; +DEBUG_TRACE_DESKTOPPACKAGES return (this->localStorage.value(APPLICATIONS_PACKAGES_KEY).toStringList() + this->localStorage.value(MULTIMEDIA_PACKAGES_KEY ).toStringList() + this->localStorage.value(NETWORK_PACKAGES_KEY ).toStringList() + - this->localStorage.value(THEMES_PACKAGES_KEY ).toStringList() + + this->localStorage.value(LOOKANDFEEL_PACKAGES_KEY ).toStringList() + this->localStorage.value(UTILITIES_PACKAGES_KEY ).toStringList() + this->localStorage.value(XSERVER_PACKAGES_KEY ).toStringList() + - this->localStorage.value(desktop ).toStringList() ).join(' ') ; + this->localStorage.value(init_key ).toStringList() + + this->localStorage.value(desktop_key ).toStringList() + + language_packs ).join(' ') ; } @@ -53,28 +78,50 @@ DEBUG_TRACE_DESKTOPPACKAGES QString PacstrapGuiJob::chrootExec() { - QString pacstrap_cmd = PACSTRAP_FMT .arg(this->confFile , MOUNTPOINT , packages) ; - QString wallpaper_cmd = WALLPAPER_FMT.arg(MOUNTPOINT) ; - - if (!!execStatus(pacstrap_cmd , CHROOT_TASK_PROPORTION)) return PACSTRAP_ERROR_MSG ; - -printf("[PACSTRAP-GUI]: ls /etc/skel\n") ; QProcess::execute(QString("/bin/sh -c \"ls -al /etc/skel/\"" ) ) ; -printf("[PACSTRAP-GUI]: ls chroot/etc/skel/\n") ; QProcess::execute(QString("/bin/sh -c \"ls -al %1/etc/skel/\"" ).arg(MOUNTPOINT)) ; -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]: ls chroot/etc/sudoers*\n") ; QProcess::execute(QString("/bin/sh -c \"ls -al %1/etc/sudoers*\"" ).arg(MOUNTPOINT)) ; - - 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)) ; +// 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 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(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()) ; +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(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" ; + if (!!execStatus(dm_desktop_cmd )) return "DM_DESKTOP_FMT ERROR_MSG" ; + if (!!execStatus(dm_lang_cmd )) return "DM_LANG_FMT ERROR_MSG" ; + if (!!execStatus(welcome_title_cmd )) return "WELCOME_TITLE_FMT ERROR_MSG" ; + if (default_desktop == LXDE_PACKAGES_KEY && + !!execStatus(octopi_cmd )) return "OCTOPI_FMT ERROR_MSG" ; return QString("") ; } -/* 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." ; - - CALAMARES_PLUGIN_FACTORY_DEFINITION(PacstrapGuiJobFactory , registerPlugin<PacstrapGuiJob>() ;) diff --git a/src/modules/pacstrap-gui/pacstrap-gui.h b/src/modules/pacstrap-gui/pacstrap-gui.h index 6e310f18a..aec736b7a 100644 --- a/src/modules/pacstrap-gui/pacstrap-gui.h +++ b/src/modules/pacstrap-gui/pacstrap-gui.h @@ -42,8 +42,20 @@ protected: private: - static const QString WALLPAPER_FMT ; - static const QString WALLPAPER_ERROR_MSG ; +// 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 ; + static const QString DM_DESKTOP_FMT ; + static const QString DM_LANG_FMT ; + static const QString WELCOME_TITLE_FMT ; + static const QString OCTOPI_FMT ; } ; diff --git a/src/modules/services/main.py b/src/modules/services/main.py index 03d82554a..55f4d1695 100644 --- a/src/modules/services/main.py +++ b/src/modules/services/main.py @@ -24,6 +24,8 @@ import libcalamares def run(): + setServices() + """ Setup systemd services """ @@ -99,3 +101,15 @@ def run(): ) return None + + +def setServices(): + #init_key = libcalamares.globalstorage.value(GS::INITSYSTEM_KEY) + #desktop_key = libcalamares.globalstorage.value(GS::DESKTOP_KEY ) + init_key = libcalamares.globalstorage.value('default-initsystem') # TODO: + desktop_key = libcalamares.globalstorage.value('default-desktop' ) # TODO: + config = libcalamares.job.configuration + config['services'] = config[init_key + '-services'] + \ + config[desktop_key + '-services'] + config['targets' ] = config[init_key + '-targets' ] + config['disable' ] = config[init_key + '-disable' ] diff --git a/src/modules/services/services.conf b/src/modules/services/services.conf index b044b297f..483ab8129 100644 --- a/src/modules/services/services.conf +++ b/src/modules/services/services.conf @@ -1,20 +1,30 @@ --- #systemd services and targets are enabled in this precise order -services: +services: [] # deferred +targets: [] # deferred +disable: [] # deferred + +systemd-services: - name: "NetworkManager" #name of the service file mandatory: false #true=> if enabling fails the installer errors out and quits #false=>if enabling fails print warning to console and continue - name: "cups" mandatory: false + +lxde-services: + - name: "lxdm" + mandatory: true + +mate-services: - name: "lightdm" mandatory: true -targets: +systemd-targets: - name: "graphical" mandatory: true -disable: +systemd-disable: - name: "pacman-init" mandatory: false diff --git a/src/modules/users/CreateUserJob.cpp b/src/modules/users/CreateUserJob.cpp index 9872dbaf9..1bfe068b9 100644 --- a/src/modules/users/CreateUserJob.cpp +++ b/src/modules/users/CreateUserJob.cpp @@ -189,15 +189,6 @@ cDebug() << QString("[CREATEUSER]: CreateUserJob::exec() ls -l %1").arg(sudoersF tr( "useradd terminated with error code %1." ) .arg( ec ) ); - -cDebug() << QString("[CREATEUSER]: CreateUserJob::exec() ls -al /etc/skel - source "); - QProcess::execute( QString( "/bin/sh -c \"ls -al /etc/skel /etc/skel/.config\"" ) ); -cDebug() << QString("[CREATEUSER]: CreateUserJob::exec() ls -al /etc/skel - target"); - CalamaresUtils::System::instance()->targetEnvCall( { "ls","-a","-l","/etc/skel/","/etc/skel/.config" } ); -cDebug() << QString("[CREATEUSER]: CreateUserJob::exec() ls -al /home/%1/ - target").arg(m_userName); - CalamaresUtils::System::instance()->targetEnvCall( { "ls","-a","-l",QString("/home/%1/").arg(m_userName),QString("/home/%1/.config").arg(m_userName) } ); - - ec = CalamaresUtils::System::instance()-> targetEnvCall( { "usermod", "-aG", @@ -222,62 +213,5 @@ cDebug() << QString("[CREATEUSER]: CreateUserJob::exec() ls -al /home/%1/ - targ tr( "chown terminated with error code %1." ) .arg( ec ) ); - - /* parabola-specific configuration */ - -// Calamares::GlobalStorage* globalStorage = Calamares::JobQueue::instance()->globalStorage(); - QString default_desktop = gs->value(GS::DESKTOP_PACKAGES_KEY).toString(); -/* - if [ -x /usr/bin/setxkbmap ]; then - echo "setxkbmap $(cat /.codecheck | grep XKBMAP= | cut -d '=' -f 2)" >> /home/${user#*=}/.bashrc - fi -*/ - - CalamaresUtils::System* sys = CalamaresUtils::System::instance() ; -// QString userCmd = QString("sudo -u %1 ").arg(m_userName) ; - if (default_desktop == "mate") - { - cDebug() << QString("[CREATEUSER]: configuring mate desktop") ; -/* - QVariantList commands = m_configurationMap.value("gsettings-commands").toList(); - - for ( const QVariant& command : commands ) - CalamaresUtils::System::instance()->targetEnvCall( { "sh", "-c", "sudo -u " + m_userName + command.toString() } ); - sys->targetEnvCall( { "sh", "-c", userCmd + gsettingsCmd } ); -*/ -/* - QString gsettingsCmd ; - gsettingsCmd += QString( "gsettings set org.mate.interface gtk-theme 'Radiance-Purple'" ); - gsettingsCmd += QString(";"); - gsettingsCmd += QString( "gsettings set org.mate.Marco.general theme 'Radiance-Purple'" ); - gsettingsCmd += QString(";"); - gsettingsCmd += QString( "gsettings set org.mate.interface icon-theme 'RAVE-X-Dark-Purple'" ); - gsettingsCmd += QString(";"); - gsettingsCmd += QString( "gsettings set org.mate.peripherals-mouse cursor-size '18'" ); - gsettingsCmd += QString(";"); - gsettingsCmd += QString( "gsettings set org.mate.peripherals-mouse cursor-theme 'mate'" ); - gsettingsCmd += QString(";"); - gsettingsCmd += QString( "gsettings set org.mate.background picture-filename '/etc/wallpaper.png'" ); - sys->targetEnvCall({ "sh" , "-c" , userCmd + gsettingsCmd }) ; -*/ - -const QString SKELS_DIR = "/usr/share/calamares/skel" ; - - QString skel_dir = QString("%1/%2" ).arg(SKELS_DIR , default_desktop) ; - QString chroot_home_dir = QString("%1/home/%2").arg(destDir.absolutePath() , m_userName) ; - QString skel_cmd = QString("cp -rT %1/ %2/").arg(skel_dir , chroot_home_dir) ; -// QString chown_root_cmd = QString("chown root:root /home/") ; - QString chown_user_cmd = QString("chown -R %1:%1 /home/%1/").arg(m_userName) ; - -sys->targetEnvCall({ "sh" , "-c" , QString("echo '[CREATEUSER]: sys->targetEnvCall'") }) ; -cDebug() << QString("[CREATEUSER]: ls -al chroot/home/user/ IN") ; sys->targetEnvCall({ "sh" , "-c" , QString("ls -al %1").arg(chroot_home_dir) }) ; - QProcess::execute(QString("/bin/sh -c \"%1\"").arg(skel_cmd)) ; -cDebug() << QString("[CREATEUSER]: ls -al chroot/home/user/ MID1") ; sys->targetEnvCall({ "sh" , "-c" , QString("ls -al %1").arg(chroot_home_dir) }) ; -// sys->targetEnvCall({ "sh" , "-c" , chown_root_cmd }) ; -cDebug() << QString("[CREATEUSER]: ls -al chroot/home/user/ MID2") ; sys->targetEnvCall({ "sh" , "-c" , QString("ls -al %1").arg(chroot_home_dir) }) ; - sys->targetEnvCall({ "sh" , "-c" , chown_user_cmd }) ; -cDebug() << QString("[CREATEUSER]: ls -al chroot/home/user/ OUT") ; sys->targetEnvCall({ "sh" , "-c" , QString("ls -al %1").arg(chroot_home_dir) }) ; - } - return Calamares::JobResult::ok(); } 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 |