commit fb302808194ca17089f9f4f2a3f31e6cfbb7ec0b Author: Valeria Fadeeva Date: Fri Jul 19 22:08:51 2024 +0500 Init diff --git a/49-nopasswd-calamares.rules b/49-nopasswd-calamares.rules new file mode 100644 index 0000000..c152890 --- /dev/null +++ b/49-nopasswd-calamares.rules @@ -0,0 +1,8 @@ +/* Allow Calamares to be started without password authentication + */ +polkit.addRule(function(action, subject) { + if ((action.id == "com.github.calamares.calamares.pkexec.run")) + { + return polkit.Result.YES; + } +}); diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..1dc65a3 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,765 @@ +# === This file is part of Calamares - === +# +# SPDX-FileCopyrightText: 2017 Adriaan de Groot +# SPDX-License-Identifier: BSD-2-Clause +# +### +# +# Calamares is Free Software: see the License-Identifier above. +# +# Individual files may have different licenses (like the CMake +# infrastructure, which is BSD-2-Clause licensed). Check the SPDX +# identifiers in each file. +# +### +# +# Generally, this CMakeLists.txt will find all the dependencies for Calamares +# and complain appropriately. See below (later in this file) for CMake-level +# options. There are some "secret" options as well: +# +# SKIP_MODULES : a space or semicolon-separated list of directory names +# under src/modules that should not be built. +# USE_ : fills in SKIP_MODULES for modules called -. +# WITH_ : try to enable (these usually default to ON). For +# a list of WITH_ grep CMakeCache.txt after running +# CMake once. These affect the ABI offered by Calamares. +# - PYBIND11 (use bundled pybind11, default ON, needs WITH_PYTHON) +# - PYTHON (enable Python Job modules, default ON if Python is found) +# - QML (enable QML UI View modules, default ON) +# - QT6 (use Qt6 rather than Qt5, default to OFF) +# The WITH_* options affect the ABI of Calamares: you must +# build (C++) modules for Calamares with the same WITH_* +# settings, or they may not load at all. +# BUILD_ : choose additional things to build +# - APPDATA (use AppData in packagechooser, requires QtXml) +# - APPSTREAM (use AppStream in packagechooser, requires libappstream-qt) +# - BUILD_CRASH_REPORTING (uses KCrash, rather than Calamares internal, for crash reporting) +# - SCHEMA_TESTING (requires Python, see ci/configvalidator.py) +# - TESTING (standard CMake option) +# DEBUG_ : special developer flags for debugging. +# +# Example usage: +# +# cmake . -DSKIP_MODULES="partition luksbootkeycfg" +# +# To obtain the version number of calamares, run CMake in script mode, e.g. +# cmake -P CMakeLists.txt + +cmake_minimum_required(VERSION 3.16 FATAL_ERROR) + +set(CALAMARES_VERSION 3.3.9) +set(CALAMARES_RELEASE_MODE ON) # Set to ON during a release + +if(CMAKE_SCRIPT_MODE_FILE) + include(${CMAKE_CURRENT_LIST_DIR}/CMakeModules/ExtendedVersion.cmake) + set(CMAKE_SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}) + extend_version( ${CALAMARES_VERSION} ${CALAMARES_RELEASE_MODE} _vshort _vlong ) + message("${_vlong}") + return() +endif() + +# Massage the version for CMake if there is a version-suffix +string(REGEX REPLACE "-.*" "" CALAMARES_VERSION_SHORT "${CALAMARES_VERSION}") +# And preserve the original version (suffix and all) because project() overwrites +# .. but if we're doing non-release builds, this gets replaced with git versioning. +set(CALAMARES_VERSION_LONG "${CALAMARES_VERSION}") + +project(CALAMARES VERSION ${CALAMARES_VERSION_SHORT} LANGUAGES C CXX HOMEPAGE_URL "https://calamares.io/") + +if(NOT CALAMARES_RELEASE_MODE AND CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR) + message(FATAL_ERROR "Do not build development versions in the source-directory.") +endif() +# Calamares in the 3.3 series promises ABI compatbility, so it sets a +# .so-version equal to the series number. We use ci/abicheck.sh to +# keep track of this. Note that the **alpha** releases also have +# such an .so-version, but are not ABI-stable yet. +set(CALAMARES_SOVERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}") + +### OPTIONS +# +option(INSTALL_POLKIT "Install Polkit configuration" ON) +option(INSTALL_COMPLETION "Install shell completions" OFF) +option(INSTALL_CONFIG "Install configuration files" OFF) +# When adding WITH_* that affects the ABI offered by libcalamares, +# also update libcalamares/CalamaresConfig.h.in +option(WITH_PYBIND11 "Use bundled pybind11 instead of Boost::Python" ON) +option(WITH_PYTHON "Enable Python modules API." ON) +option(WITH_QML "Enable QML UI options." ON) +option(WITH_QT6 "Use Qt6 instead of Qt5" OFF) +# +# Additional parts to build that do not affect ABI +option(BUILD_SCHEMA_TESTING "Enable schema-validation-tests" ON) +# Options for the calamares executable +option(BUILD_CRASH_REPORTING "Enable crash reporting with KCrash." ON) + +# Possible debugging flags are: +# - DEBUG_TIMEZONES draws latitude and longitude lines on the timezone +# widget and enables chatty debug logging, for dealing with the timezone +# location database. +# - DEBUG_FILESYSTEMS does extra logging and checking when looking at +# partition configuration. Lists known KPMCore FS types. +# - DEBUG_PARTITION_UNSAFE (see partition/CMakeLists.txt) +# - DEBUG_PARTITION_BAIL_OUT (see partition/CMakeLists.txt) + +### USE_* +# +# By convention, when there are multiple modules that implement similar +# functionality, and it only makes sense to have **at most one** of them +# enabled at any time, those modules are named -. +# For example, services-systemd and services-openrc. +# +# Setting up SKIP_MODULES to ignore "the ones you don't want" can be +# annoying and error-prone (e.g. if a new module shows up). The USE_* +# modules provide a way to do automatic selection. To pick exactly +# one of the implementations from group , set USE_ to the +# name of the implementation. If USE_ is unset, or empty, then +# all the implementations are enabled (this just means they are +# **available** to `settings.conf`, not that they are used). +# +# To explicitly disable a set of modules, set USE_=none +# (e.g. the literal string none), which won't match any of the +# modules but is handled specially. +# +# The following USE_* functionalities are available: +# - *services* picks one of the two service-configuration modules, +# for either systemd or openrc. This defaults to empty so that +# **both** modules are available. +set(USE_services "" CACHE STRING "Select the services module to use") + +### Calamares application info +# +set(CALAMARES_ORGANIZATION_NAME "Calamares") +set(CALAMARES_ORGANIZATION_DOMAIN "github.com/calamares") +set(CALAMARES_APPLICATION_NAME "Calamares") +set(CALAMARES_DESCRIPTION_SUMMARY "The distribution-independent installer framework") + +### Transifex (languages) info +# +# complete = 100% translated, +# good = nearly complete (use own judgement, right now >= 75%) +# ok = incomplete (more than 25% untranslated, at least 5% translated), +# incomplete = <5% translated, placeholder in tx; these are not included. +# +# Language en (source language) is added later. It isn't listed in +# Transifex either. Get the list of languages and their status +# from https://app.transifex.com/calamares/calamares/ , or (preferably) +# use ci/txstats.py to automatically check. +# +# When adding a new language, take care that it is properly loaded +# by the translation framework. Languages with alternate scripts +# (sr@latin in particular) or location (ca@valencia) need special +# handling in libcalamares/locale/Translation.h . +# +# NOTE: move ie (Interlingue) to _ok once Qt supports it. +# NOTE: update these lines by running `txstats.py`, or for full automation +# `txstats.py -e`. See also +# +# Total 80 languages +set( _tx_complete de en es_AR fi_FI hr hu ja lt tr_TR uk zh_TW ) +set( _tx_good az az_AZ be bg ca cs_CZ es fr fur he hi is it_IT ko + pl pt_BR pt_PT ru si sq sv zh_CN ) +set( _tx_ok ar as ast bn ca@valencia da el en_GB eo es_MX et eu fa + gl id ka ml mr nb nl oc ro sk sl sr sr@latin tg th vi ) +set( _tx_incomplete bqi es_PR gu ie ja-Hira kk kn lo lv mk ne_NP + ro_RO ta_IN te ur uz zh zh_HK ) +# Total 80 languages + +### Required versions +# +# See DEPENDENCIES section below. + +# The default build is with Qt5, but that is increasingly not the +# version installed-by-default on Linux systems. Upgrade the default +# if Qt5 isn't available but Qt6 is. This also saves messing around +# with special CMake flags for every script (e.g. ci/RELEASE.sh and +# ci/abicheck.sh). +if(NOT WITH_QT6) + find_package(Qt5Core QUIET) + if (NOT TARGET Qt5::Core) + find_package(Qt6Core QUIET) + if (TARGET Qt6::Core) + message(STATUS "Default Qt version (Qt5) not found, upgrading build to Qt6") + set(WITH_QT6 ON) + endif() + endif() +endif() +if(WITH_QT6) + message(STATUS "Building Calamares with Qt6") + set(qtname "Qt6") + set(kfname "KF6") + set(QT_VERSION 6.5.0) + set(ECM_VERSION 5.240) + set(KF_VERSION 5.240) # KDE Neon weirdness + # API that was deprecated before Qt 5.15 causes a compile error + add_compile_definitions(QT_DISABLE_DEPRECATED_BEFORE=0x060400) + # Something to add to filenames for this specific Qt version + set(QT_VERSION_SUFFIX "-qt6") +else() + message(STATUS "Building Calamares with Qt5") + set(qtname "Qt5") + set(kfname "KF5") + set(QT_VERSION 5.15.0) + set(ECM_VERSION 5.78) + set(KF_VERSION 5.78) + # API that was deprecated before Qt 5.15 causes a compile error + add_compile_definitions(QT_DISABLE_DEPRECATED_BEFORE=0x050f00) + # Something to add to filenames for this specific Qt version + set(QT_VERSION_SUFFIX "") +endif() + +set(BOOSTPYTHON_VERSION 1.72.0) +set(PYTHONLIBS_VERSION 3.6) +set(YAMLCPP_VERSION 0.5.1) + +### CMAKE SETUP +# +set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/CMakeModules") + +# Enable IN_LIST +if(POLICY CMP0057) + cmake_policy(SET CMP0057 NEW) +endif() +# Let ``AUTOMOC`` and ``AUTOUIC`` process ``GENERATED`` files. +if(POLICY CMP0071) + cmake_policy(SET CMP0071 NEW) +endif() +# Recognize more macros to trigger automoc +if(NOT CMAKE_VERSION VERSION_LESS "3.10.0") + list( + APPEND + CMAKE_AUTOMOC_MACRO_NAMES + "K_PLUGIN_FACTORY_WITH_JSON" + "K_EXPORT_PLASMA_DATAENGINE_WITH_JSON" + "K_EXPORT_PLASMA_RUNNER" + ) +endif() + +# CMake Modules +include(CMakePackageConfigHelpers) +include(CTest) +include(FeatureSummary) + +# Calamares Modules +include(CMakeColors) + +### C++ SETUP +# +set(CMAKE_CXX_STANDARD 20) +set(CMAKE_CXX_STANDARD_REQUIRED ON) +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Werror=return-type") +set(CMAKE_CXX_FLAGS_DEBUG "-Og -g ${CMAKE_CXX_FLAGS_DEBUG}") +set(CMAKE_CXX_FLAGS_MINSIZEREL "-Os -DNDEBUG") +set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG") +set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g") + +set(CMAKE_C_STANDARD 99) +set(CMAKE_C_STANDARD_REQUIRED ON) +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall") +set(CMAKE_C_FLAGS_DEBUG "-Og -g") +set(CMAKE_C_FLAGS_MINSIZEREL "-Os -DNDEBUG") +set(CMAKE_C_FLAGS_RELEASE "-O3 -DNDEBUG") +set(CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -g") + +set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined -Wl,--fatal-warnings ${CMAKE_SHARED_LINKER_FLAGS}") + +# If no build type is set, pick a reasonable one +if(NOT CMAKE_BUILD_TYPE) + if(CALAMARES_RELEASE_MODE) + set(CMAKE_BUILD_TYPE "RelWithDebInfo") + else() + set(CMAKE_BUILD_TYPE "Debug") + endif() +endif() + +if(CMAKE_CXX_COMPILER_ID MATCHES "Clang") + message(STATUS "Found Clang ${CMAKE_CXX_COMPILER_VERSION}, setting up Clang-specific compiler flags.") + + # Clang warnings: doing *everything* is counter-productive, since it warns + # about things which we can't fix (e.g. C++98 incompatibilities, but + # Calamares is C++17). + foreach( + CLANG_WARNINGS + -Weverything + -Wno-c++98-compat + -Wno-c++98-compat-pedantic + -Wno-padded + -Wno-undefined-reinterpret-cast + -Wno-global-constructors + -Wno-exit-time-destructors + -Wno-missing-prototypes + -Wno-documentation-unknown-command + -Wno-unknown-warning-option + ) + string(APPEND CMAKE_CXX_FLAGS " ${CLANG_WARNINGS}") + endforeach() + + # The dwarf-debugging flags are slightly different, too + string(APPEND CMAKE_CXX_FLAGS_DEBUG " -gdwarf") + string(APPEND CMAKE_C_FLAGS_DEBUG " -gdwarf") + + # Third-party code where we don't care so much about compiler warnings + # (because it's uncomfortable to patch) get different flags; use + # mark_thirdparty_code( [...] ) + # to switch off warnings for those sources. + set(SUPPRESS_3RDPARTY_WARNINGS "-Wno-everything") + + set(CMAKE_TOOLCHAIN_PREFIX "llvm-") + + # The path prefix is only relevant for CMake 3.16 and later, fixes #1286 + set(CMAKE_AUTOMOC_PATH_PREFIX OFF) + set(CALAMARES_AUTOMOC_OPTIONS "-butils/moc-warnings.h") + set(CALAMARES_AUTOUIC_OPTIONS --include utils/moc-warnings.h) +else() + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wnon-virtual-dtor -Woverloaded-virtual") + + set(SUPPRESS_3RDPARTY_WARNINGS "") +endif() + +# Use mark_thirdparty_code() to reduce warnings from the compiler +# on code that we're not going to fix. Call this with a list of files. +macro(mark_thirdparty_code) + set_source_files_properties( + ${ARGV} + PROPERTIES COMPILE_FLAGS "${SUPPRESS_3RDPARTY_WARNINGS}" COMPILE_DEFINITIONS "THIRDPARTY" + ) +endmacro() + +if(CMAKE_COMPILER_IS_GNUCXX) + if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 4.9 OR CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 4.9) + message(STATUS "Found GNU g++ ${CMAKE_CXX_COMPILER_VERSION}, enabling colorized error messages.") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fdiagnostics-color=auto") + endif() +endif() + +### DEPENDENCIES +# +find_package(${qtname} ${QT_VERSION} CONFIG REQUIRED Concurrent Core DBus Gui LinguistTools Network Svg Widgets) +if(WITH_QML) + find_package(${qtname} ${QT_VERSION} CONFIG REQUIRED Quick QuickWidgets) +endif() +# Note that some modules need more Qt modules, optionally. + +find_package(YAMLCPP ${YAMLCPP_VERSION}) +set_package_properties( + YAMLCPP + PROPERTIES + TYPE REQUIRED + DESCRIPTION "YAML parser for C++" + PURPOSE "Parsing of configuration files" +) + +find_package(Polkit${qtname}-1) +if(INSTALL_POLKIT) + set_package_properties( + Polkit${qtname}-1 + PROPERTIES + TYPE REQUIRED + ) +endif() +set_package_properties( + Polkit${qtname}-1 + PROPERTIES + DESCRIPTION "${qtname} support for Polkit" + URL "https://cgit.kde.org/polkit-qt-1.git" + PURPOSE "Polkit${qtname}-1 helps with installing Polkit configuration" +) + +# Find ECM once, and add it to the module search path; Calamares +# modules that need ECM can do +# if(ECM_FOUND) +# no need to mess with the module path after. +find_package(ECM ${ECM_VERSION} NO_MODULE) +if(ECM_FOUND) + message(STATUS "Found KDE ECM ${ECM_MODULE_PATH}") + set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${CMAKE_MODULE_PATH}) + if(BUILD_TESTING) + # ECM implies that we can build the tests, too + find_package(${qtname} COMPONENTS Test REQUIRED) + include(ECMAddTests) + endif() + include(KDEInstallDirs) +endif() + +find_package(${kfname}CoreAddons ${KF_VERSION} QUIET) +set_package_properties( + ${kfname}CoreAddons + PROPERTIES + TYPE REQUIRED + DESCRIPTION "KDE Framework CoreAddons" + URL "https://api.kde.org/frameworks/" + PURPOSE "Essential Framework for AboutData and Macros" +) + +# After this point, there should be no REQUIRED find_packages, +# since we want tidy reporting of optional dependencies. +feature_summary( + WHAT REQUIRED_PACKAGES_NOT_FOUND + FATAL_ON_MISSING_REQUIRED_PACKAGES + DESCRIPTION "The following REQUIRED packages were not found:" + QUIET_ON_EMPTY +) + +# +# OPTIONAL DEPENDENCIES +# +# First, set KF back to optional so that any missing components don't trip us up. +find_package(${kfname}Crash ${KF_VERSION} QUIET) +set_package_properties( + ${kfname}Crash + PROPERTIES + TYPE OPTIONAL + DESCRIPTION "KDE Framework Crash" + URL "https://api.kde.org/frameworks/" + PURPOSE "Framework for sending Crash Dumps" +) + +if(NOT TARGET ${kfname}::Crash) + if(BUILD_CRASH_REPORTING) + message(WARNING "BUILD_CRASH_REPORTING is set, but ${kfname}::Crash is not available.") + endif() + set(BUILD_CRASH_REPORTING OFF) +endif() + +find_package(Python ${PYTHONLIBS_VERSION} COMPONENTS Interpreter Development) +set_package_properties( + Python + PROPERTIES + DESCRIPTION "Python3 interpreter." + URL "https://python.org" + PURPOSE "Python3 interpreter for certain tests." +) + +set(_schema_explanation "") +if(Python_Interpreter_FOUND) + if(BUILD_SCHEMA_TESTING) + # The configuration validator script has some dependencies, + # and if they are not installed, don't run. If errors out + # with exit(1) on missing dependencies. + if(CALAMARES_CONFIGVALIDATOR_CHECKED) + message(STATUS "Using cached config-validation result") + set(_validator_deps ${CALAMARES_CONFIGVALIDATOR_RESULT}) + else() + execute_process( + COMMAND ${Python_EXECUTABLE} "${CMAKE_SOURCE_DIR}/ci/configvalidator.py" -x + RESULT_VARIABLE _validator_deps + ) + set(CALAMARES_CONFIGVALIDATOR_CHECKED TRUE CACHE INTERNAL "Dependencies for configvalidator checked") + set(CALAMARES_CONFIGVALIDATOR_RESULT ${_validator_deps} + CACHE INTERNAL "Result of configvalidator dependency check" + ) + endif() + # It should never succeed, but only returns 1 when the imports fail + if(_validator_deps EQUAL 1) + message(STATUS "Checked for config-validation dependencies: NOT-FOUND") + set(_schema_explanation " Missing dependencies for configvalidator.py.") + set(BUILD_SCHEMA_TESTING OFF) + else() + message(STATUS "Checked for config-validation dependencies: found") + endif() + else() + set(CALAMARES_CONFIGVALIDATOR_CHECKED OFF CACHE INTERNAL "Dependencies for configvalidator checked") + endif() +else() + # Can't run schema tests without Python3. + set(_schema_explanation " Missing Python3.") + set(BUILD_SCHEMA_TESTING OFF) + set(CALAMARES_CONFIGVALIDATOR_CHECKED OFF CACHE INTERNAL "Dependencies for configvalidator checked") +endif() +add_feature_info(yaml-schema BUILD_SCHEMA_TESTING "Validate YAML (config files) with schema.${_schema_explanation}") + +if(NOT Python_Development_FOUND) + message(STATUS "Disabling Python modules") + set(WITH_PYTHON OFF) + set(WITH_PYBIND11 OFF) + set(WITH_BOOST_PYTHON OFF) +endif() + +if(WITH_PYTHON AND NOT WITH_PYBIND11) + set(WITH_BOOST_PYTHON ON) + find_package(boost_python) + if(NOT TARGET Boost::python) + find_package(Boost ${BOOSTPYTHON_VERSION} COMPONENTS python) + set_package_properties(Boost PROPERTIES + PURPOSE "Boost.Python is used for Python job modules (because WITH_PYBIND11 is OFF)." + TYPE REQUIRED + ) + else() + message(STATUS "Found boost_python with target Boost::python") + set(Boost_FOUND ON) + endif() +endif() +add_feature_info(python WITH_PYTHON "Enable Python-modules") +add_feature_info(python-pybind11 WITH_PYBIND11 "Python-modules through pybind11") +add_feature_info(python-boost WITH_BOOST_PYTHON "Python-modules through Boost::Python") + +# Now we know the state of the ABI-options, copy them into "Calamares_" +# prefixed variables, to match how the variables would-be-named +# when building out-of-tree. +set(Calamares_WITH_PYTHON ${WITH_PYTHON}) +set(Calamares_WITH_PYBIND11 ${WITH_PYBIND11}) +set(Calamares_WITH_BOOST_PYTHON ${WITH_BOOST_PYTHON}) +set(Calamares_WITH_QML ${WITH_QML}) +set(Calamares_WITH_QT6 ${WITH_QT6}) + +### Transifex Translation status +# +# Construct language lists for use. This massages the language lists if +# needed and checks for some obvious errors. The actual work of +# compiling translations is done in the lang/ directory. +# + +set(curr_tx ${_tx_complete} ${_tx_good} ${_tx_ok} ${_tx_incomplete}) +set(tx_errors OFF) +if(curr_tx) + # New in list + foreach(l ${curr_tx}) + set(p_l "lang/calamares_${l}.ts") + if(NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${p_l}) + message(WARNING "Language ${l} has no .ts file yet.") + set(tx_errors ON) + endif() + endforeach() + + unset(p_l) + unset(l) +endif() +unset(curr_tx) +if(tx_errors) + message(FATAL_ERROR "Translation warnings, see above.") +endif() + +set(CALAMARES_TRANSLATION_LANGUAGES en ${_tx_complete} ${_tx_good} ${_tx_ok}) +if(NOT CALAMARES_RELEASE_MODE) + # Outside of release mode, enable all the languages + list(APPEND CALAMARES_TRANSLATION_LANGUAGES ${_tx_incomplete}) +endif() +list(SORT CALAMARES_TRANSLATION_LANGUAGES) +list(REMOVE_DUPLICATES CALAMARES_TRANSLATION_LANGUAGES) + +add_subdirectory(lang) # i18n tools + +### Example Distro +# +# For testing purposes Calamares includes a very, very, limited sample +# distro called "Generic". The root filesystem of "Generic" lives in +# data/example-root and can be squashed up as part of the build, so +# that a pure-upstream run of ./calamares -d from the build directory +# (with all the default settings and configurations) can actually +# do an complete example run. +# +# Some binaries from the build host (e.g. /bin and /lib) are also +# squashed into the example filesystem. +# +# To build the example distro (for use by the default, example, +# unsquashfs module), build the target 'example-distro', eg.: +# +# make example-distro +# +find_program(mksquashfs_PROGRAM mksquashfs) +if(mksquashfs_PROGRAM) + set(mksquashfs_FOUND ON) + set(src_fs ${CMAKE_SOURCE_DIR}/data/example-root/) + set(dst_fs ${CMAKE_BINARY_DIR}/example.sqfs) + if(EXISTS ${src_fs}) + # based on the build host. If /lib64 exists, assume it is needed. + # Collect directories needed for a minimal binary distro, + # Note that the last path component is added to the root, so + # if you add /usr/sbin here, it will be put into /sbin_1. + # Add such paths to /etc/profile under ${src_fs}. + set(candidate_fs /sbin /bin /lib /lib64) + set(host_fs "") + foreach(c_fs ${candidate_fs}) + if(EXISTS ${c_fs}) + list(APPEND host_fs ${c_fs}) + endif() + endforeach() + add_custom_command( + OUTPUT ${dst_fs} + COMMAND ${mksquashfs_PROGRAM} ${src_fs} ${dst_fs} -all-root + COMMAND ${mksquashfs_PROGRAM} ${host_fs} ${dst_fs} -all-root + ) + add_custom_target(example-distro DEPENDS ${dst_fs}) + endif() +else() + set(mksquashfs_FOUND OFF) +endif() +# Doesn't list mksquashfs as an optional dep, though, because it +# hasn't been sent through the find_package() scheme. +# +# "http://tldp.org/HOWTO/SquashFS-HOWTO/creatingandusing.html" +add_feature_info(ExampleDistro ${mksquashfs_FOUND} "Create example-distro target.") + +### CALAMARES PROPER +# + +# Additional info for non-release builds. The "extended" version information +# with date and git information (commit, dirty status) is used only +# by CalamaresVersionX.h, which is included by consumers that need a full +# version number with all that information; normal consumers can include +# CalamaresVersion.h with more stable numbers. +if(NOT CALAMARES_RELEASE_MODE AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.git/") + include(ExtendedVersion) + extend_version( "${CALAMARES_VERSION}" OFF CALAMARES_VERSION_SHORT CALAMARES_VERSION_LONG ) +endif() + +# Special define for RC (e.g. not-a-release) builds. +# This is consumed via the CalamaresConfig.h header. +if(NOT CALAMARES_RELEASE_MODE) + set(CALAMARES_VERSION_RC 1) +endif() + +# enforce using constBegin, constEnd for const-iterators +add_definitions(-DQT_STRICT_ITERATORS -DQT_SHARED -DQT_SHAREDPOINTER_TRACK_POINTERS) + +# set paths +set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}") +set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}") +set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}") + +# Better default installation paths: GNUInstallDirs defines +# CMAKE_INSTALL_FULL_SYSCONFDIR to be CMAKE_INSTALL_PREFIX/etc by default +# but we really want /etc +if(NOT DEFINED CMAKE_INSTALL_SYSCONFDIR) + set(CMAKE_INSTALL_SYSCONFDIR "/etc") +endif() + +# make predefined install dirs available everywhere +include(GNUInstallDirs) + +# This is used by CalamaresAddLibrary; once Calamares is installed, +# the CalamaresConfig.cmake module sets this variable to the IMPORTED +# libraries for Calamares. +set(Calamares_LIBRARIES calamares) + +add_subdirectory(3rdparty/kdsingleapplication) +if(WITH_PYBIND11) + add_subdirectory(3rdparty/pybind11) +endif() +add_subdirectory(src) + +add_feature_info(Python ${WITH_PYTHON} "Python job modules") +add_feature_info(Pybind11 ${WITH_PYBIND11} "Python using bundled pybind11") +add_feature_info(Qml ${WITH_QML} "QML UI support") +add_feature_info(Polkit ${INSTALL_POLKIT} "Install Polkit files") +add_feature_info(KCrash ${BUILD_CRASH_REPORTING} "Crash dumps via KCrash") + +### Post-source configuration +# +# +find_package(${kfname} ${KF_VERSION} QUIET COMPONENTS CoreAddons) + +### CMake infrastructure installation +# +# +set(CMAKE_INSTALL_CMAKEDIR "${CMAKE_INSTALL_LIBDIR}/cmake/Calamares" CACHE PATH "Installation directory for CMake files") +set(CMAKE_INSTALL_FULL_CMAKEDIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_CMAKEDIR}") + +export(PACKAGE Calamares) +configure_package_config_file( + "CalamaresConfig.cmake.in" + "${PROJECT_BINARY_DIR}/CalamaresConfig.cmake" + INSTALL_DESTINATION "${CMAKE_INSTALL_CMAKEDIR}" + PATH_VARS CMAKE_INSTALL_INCLUDEDIR CMAKE_INSTALL_LIBDIR CMAKE_INSTALL_DATADIR +) +write_basic_package_version_file( + ${PROJECT_BINARY_DIR}/CalamaresConfigVersion.cmake + VERSION ${PROJECT_VERSION} + COMPATIBILITY SameMajorVersion +) +install(EXPORT Calamares DESTINATION "${CMAKE_INSTALL_CMAKEDIR}" FILE "CalamaresTargets.cmake" NAMESPACE Calamares::) + +# Install the cmake files +install( + FILES + "${PROJECT_BINARY_DIR}/CalamaresConfig.cmake" + "${PROJECT_BINARY_DIR}/CalamaresConfigVersion.cmake" + "CMakeModules/CalamaresAddBrandingSubdirectory.cmake" + "CMakeModules/CalamaresAddLibrary.cmake" + "CMakeModules/CalamaresAddModuleSubdirectory.cmake" + "CMakeModules/CalamaresAddPlugin.cmake" + "CMakeModules/CalamaresAddTest.cmake" + "CMakeModules/CalamaresAddTranslations.cmake" + "CMakeModules/CalamaresAutomoc.cmake" + "CMakeModules/CalamaresCheckModuleSelection.cmake" + "CMakeModules/CMakeColors.cmake" + "CMakeModules/FindYAMLCPP.cmake" + DESTINATION "${CMAKE_INSTALL_CMAKEDIR}" +) + +### Miscellaneous installs +# +# +if(INSTALL_POLKIT) + install(FILES com.github.calamares.calamares.policy DESTINATION "${POLKITQT-1_POLICY_FILES_INSTALL_DIR}") +endif() + +if(INSTALL_COMPLETION) + if(NOT CMAKE_INSTALL_BASHCOMPLETIONDIR) + set(CMAKE_INSTALL_BASHCOMPLETIONDIR "${CMAKE_INSTALL_DATADIR}/bash-completion/completions") + endif() + + install(FILES ${CMAKE_SOURCE_DIR}/data/completion/bash/calamares DESTINATION "${CMAKE_INSTALL_BASHCOMPLETIONDIR}") +endif() + +install(FILES calamares.desktop DESTINATION ${CMAKE_INSTALL_DATADIR}/applications) + +install(FILES man/calamares.8 DESTINATION ${CMAKE_INSTALL_MANDIR}/man8/) + +if(INSTALL_CONFIG) + install(FILES settings.conf DESTINATION share/calamares) +endif() + +### Uninstall +# +# +configure_file( + "${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in" + "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" + IMMEDIATE + @ONLY +) + +add_custom_target(uninstall COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake) + +### Developer convenience +# +# The module support files -- .desc files, .conf files -- are copied into the build +# directory so that it is possible to run `calamares -d` from there. Copy the +# top-level settings.conf as well, into the build directory. +if( settings.conf IS_NEWER_THAN ${CMAKE_BINARY_DIR}/settings.conf ) + configure_file(settings.conf ${CMAKE_BINARY_DIR}/settings.conf COPYONLY) +endif() + + + +### CMAKE SUMMARY REPORT +# +get_directory_property(SKIPPED_MODULES DIRECTORY src/modules DEFINITION LIST_SKIPPED_MODULES) +calamares_explain_skipped_modules( ${SKIPPED_MODULES} ) + +feature_summary(WHAT ENABLED_FEATURES DESCRIPTION "The following features are enabled" QUIET_ON_EMPTY) +feature_summary(WHAT DISABLED_FEATURES DESCRIPTION "The following features have been disabled:" QUIET_ON_EMPTY) +feature_summary( + WHAT OPTIONAL_PACKAGES_NOT_FOUND + DESCRIPTION "The following OPTIONAL packages were not found:" + QUIET_ON_EMPTY +) +feature_summary( + WHAT REQUIRED_PACKAGES_NOT_FOUND + FATAL_ON_MISSING_REQUIRED_PACKAGES + DESCRIPTION "The following REQUIRED packages were not found:" + QUIET_ON_EMPTY +) + +### PACKAGING +# +# Note: most distro's will do distro-specific packaging rather than +# using CPack, and this duplicates information in the AppStream, too. +set(CPACK_PACKAGE_VENDOR calamares) +set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "A Linux system installer") +set(CPACK_PACKAGE_DESCRIPTION + "Calamares is a Linux system installer, intended for Linux distributions to use on their ISOs and other bootable media to install the distribution to the end-user's computer. Calamares can also be used as an OEM configuration tool. It is modular, extensible and highly-configurable for Linux distributions from all five major Linux families." +) +set(CPACK_PACKAGE_ICON "data/images/squid.png") + +include(CPack) diff --git a/README.md b/README.md new file mode 100644 index 0000000..6579408 --- /dev/null +++ b/README.md @@ -0,0 +1,70 @@ +# Melawy Linux fork of Calamares Installer Framework +[![Maintenance](https://img.shields.io/maintenance/yes/2024.svg)]() + + + +# Calamares: Distribution-Independent Installer Framework +--------- + +[![Current issue](https://img.shields.io/badge/issue-in_progress-FE9B48)](https://github.com/calamares/calamares/labels/hacking%3A%20in-progress) +[![GitHub release](https://img.shields.io/github/release/calamares/calamares.svg)](https://github.com/calamares/calamares/releases) +[![GitHub Build Status](https://img.shields.io/github/actions/workflow/status/calamares/calamares/push.yml)](https://github.com/calamares/calamares/actions?query=workflow%3Aci) +[![GitHub license](https://img.shields.io/badge/license-Multiple-green)](https://github.com/calamares/calamares/tree/calamares/LICENSES) + + +| [Report a Bug](https://github.com/calamares/calamares/issues/new) | [Translate](https://app.transifex.com/calamares/calamares/) | [Contribute](CONTRIBUTING.md) | [Chat on Matrix: #calamares:kde.org](https://webchat.kde.org/#/room/%23calamares:kde.org) | [Wiki](https://github.com/calamares/calamares/wiki) | +|:--:|:--:|:--:|:--:|:--:| + + +> Calamares is a distribution-independent system installer, with an advanced partitioning +> feature for both manual and automated partitioning operations. Calamares is designed to +> be customizable by distribution maintainers without the need for cumbersome patching, +> thanks to third-party branding and external modules support. + +## Target Audience + +Calamares is a Linux installer; users who install Linux on a computer will hopefully +use it just **once**, to install their Linux distribution. Calamares is not +a "ready to use" application: distributions apply a huge amount of customization +and configuration to Calamares, and the target audience for this repository +is those distributions, and the people who make those Linux distros. + +Calamares has some [generic user documentation](https://calamares.io/docs/users-guide/) +for end-users, but most of what we have is for distro developers. + +## Getting Calamares + +Clone Calamares from GitHub. The default branch is called *calamares*. + +``` +git clone https://github.com/calamares/calamares.git +``` + +Calamares is a KDE-Frameworks and Qt-based, C++17, CMake-built application. +The dependencies are explained in [CONTRIBUTING.md](CONTRIBUTING.md). + +## Contributing to Calamares + +Calamares welcomes PRs. New issues are welcome, too. +There are both the Calamares **core** repository (this one) +and an **extensions** repository ([Calamares extensions](https://github.com/calamares/calamares-extensions)). + +Contributions to code, modules, documentation, the wiki, and the website are all welcome. +There is more information in the [CONTRIBUTING.md](CONTRIBUTING.md) file. + +## Join the Conversation + +GitHub Issues are **one** place for discussing Calamares if there are concrete +problems or a new feature to discuss. +Issues are not a help channel. +Visit Matrix for help with configuration or compilation. + +Regular Calamares development chit-chat happens in a [Matrix](https://matrix.org/) +room, `#calamares:kde.org`. Responsiveness is best during the day +in Europe, but feel free to idle. +Matrix is persistent, and we'll see your message eventually. + +* [![Join us on Matrix](https://img.shields.io/badge/Matrix-%23calamares:kde.org-blue)](https://webchat.kde.org/#/room/%23calamares:kde.org) (needs a Matrix account) + diff --git a/calamares_polkit b/calamares_polkit new file mode 100644 index 0000000..1d484d8 --- /dev/null +++ b/calamares_polkit @@ -0,0 +1,7 @@ +#!/bin/bash + +if [ $(which pkexec) ]; then + pkexec --disable-internal-agent "/usr/bin/calamares" "$@" +else + /usr/bin/calamares "$@" +fi diff --git a/data/images/boot-environment.svg b/data/images/boot-environment.svg new file mode 100644 index 0000000..fb3b1a2 --- /dev/null +++ b/data/images/boot-environment.svg @@ -0,0 +1,121 @@ + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + diff --git a/data/images/bugs.svg b/data/images/bugs.svg new file mode 100644 index 0000000..e84a0c0 --- /dev/null +++ b/data/images/bugs.svg @@ -0,0 +1,122 @@ + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + diff --git a/data/images/help-donate.svg b/data/images/help-donate.svg new file mode 100644 index 0000000..47500cf --- /dev/null +++ b/data/images/help-donate.svg @@ -0,0 +1,46 @@ + + + + + + + + diff --git a/data/images/help.svg b/data/images/help.svg new file mode 100644 index 0000000..8eb6eff --- /dev/null +++ b/data/images/help.svg @@ -0,0 +1,180 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + diff --git a/data/images/information.svgz b/data/images/information.svgz new file mode 100644 index 0000000..379d198 Binary files /dev/null and b/data/images/information.svgz differ diff --git a/data/images/partition-alongside.svg b/data/images/partition-alongside.svg new file mode 100644 index 0000000..3bba643 --- /dev/null +++ b/data/images/partition-alongside.svg @@ -0,0 +1,426 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/data/images/partition-disk.svg b/data/images/partition-disk.svg new file mode 100644 index 0000000..d53c0e1 --- /dev/null +++ b/data/images/partition-disk.svg @@ -0,0 +1,309 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + diff --git a/data/images/partition-erase-auto.svg b/data/images/partition-erase-auto.svg new file mode 100644 index 0000000..5d20eb0 --- /dev/null +++ b/data/images/partition-erase-auto.svg @@ -0,0 +1,379 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/data/images/partition-manual.svg b/data/images/partition-manual.svg new file mode 100644 index 0000000..438b56e --- /dev/null +++ b/data/images/partition-manual.svg @@ -0,0 +1,354 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + diff --git a/data/images/partition-partition.svg b/data/images/partition-partition.svg new file mode 100644 index 0000000..5d557f4 --- /dev/null +++ b/data/images/partition-partition.svg @@ -0,0 +1,345 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + diff --git a/data/images/partition-replace-os.svg b/data/images/partition-replace-os.svg new file mode 100644 index 0000000..c11db80 --- /dev/null +++ b/data/images/partition-replace-os.svg @@ -0,0 +1,420 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/data/images/partition-table.svg b/data/images/partition-table.svg new file mode 100644 index 0000000..f551141 --- /dev/null +++ b/data/images/partition-table.svg @@ -0,0 +1,122 @@ + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + diff --git a/data/images/release.svg b/data/images/release.svg new file mode 100644 index 0000000..7b8a4ac --- /dev/null +++ b/data/images/release.svg @@ -0,0 +1,109 @@ + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + diff --git a/data/images/squid.png b/data/images/squid.png new file mode 100644 index 0000000..cf59825 Binary files /dev/null and b/data/images/squid.png differ diff --git a/data/images/squid.svg b/data/images/squid.svg new file mode 100644 index 0000000..c5e8d7b --- /dev/null +++ b/data/images/squid.svg @@ -0,0 +1,341 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + diff --git a/data/images/state-ok.svg b/data/images/state-ok.svg new file mode 100644 index 0000000..5277bf5 --- /dev/null +++ b/data/images/state-ok.svg @@ -0,0 +1,50 @@ + + + + + + + + + diff --git a/data/images/yes.svgz b/data/images/yes.svgz new file mode 100644 index 0000000..113a6ad Binary files /dev/null and b/data/images/yes.svgz differ diff --git a/git_check_version.sh b/git_check_version.sh new file mode 100755 index 0000000..185658d --- /dev/null +++ b/git_check_version.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +printf "3.3.0.%s\n" "$(git rev-list --count HEAD)" + +echo "Ready" diff --git a/git_push.sh b/git_push.sh new file mode 100755 index 0000000..c0351e9 --- /dev/null +++ b/git_push.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +git add . && git commit -m "Update" +git push --force + +echo "Ready" diff --git a/git_status.sh b/git_status.sh new file mode 100755 index 0000000..36339ed --- /dev/null +++ b/git_status.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +git status + +echo "Ready" diff --git a/lang_xml_en_correct.py b/lang_xml_en_correct.py new file mode 100755 index 0000000..ad74a19 --- /dev/null +++ b/lang_xml_en_correct.py @@ -0,0 +1,64 @@ +#!/usr/bin/env python3 + + +with open("lang/calamares_en.ts") as lang: + + result = [] + + for line in lang: + if '' in line: + line = f'\n' + + if '' in line: + line = f'\n' + + if " 0: + with open("lang/calamares_en_mod.ts", mode = "wt+") as lang_mod: + lang_mod.writelines(result) diff --git a/lang_xml_ru_correct.py b/lang_xml_ru_correct.py new file mode 100755 index 0000000..1e43982 --- /dev/null +++ b/lang_xml_ru_correct.py @@ -0,0 +1,64 @@ +#!/usr/bin/env python3 + + +with open("lang/calamares_ru.ts") as lang: + + result = [] + + for line in lang: + if '' in line: + line = f'\n' + + if '' in line: + line = f'\n' + + if " 0: + with open("lang/calamares_ru_mod.ts", mode = "wt+") as lang_mod: + lang_mod.writelines(result) diff --git a/settings.conf b/settings.conf new file mode 100644 index 0000000..f0776c7 --- /dev/null +++ b/settings.conf @@ -0,0 +1,138 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# +# Configuration file for Melawy Linux Calamares online installs +--- + +modules-search: [ local ] + +instances: +- id: online + module: packages + config: packages_online.conf + +- id: online + module: welcome + config: welcome_online.conf + +# - shellprocess_copy_packages_dont_chroot +- id: copy_packages_dont_chroot + module: shellprocess + config: shellprocess_copy_packages_dont_chroot.conf + +# - shellprocess@initialize_pacman_dont_chroot +- id: initialize_pacman_dont_chroot + module: shellprocess + config: shellprocess_initialize_pacman_dont_chroot_online.conf + +# - shellprocess@remove_ucode_chrooted +- id: remove_ucode_chrooted + module: shellprocess + config: shellprocess_remove_ucode_chrooted.conf + +# - shellprocess@copy_refind_theme_chrooted +- id: copy_refind_theme_chrooted + module: shellprocess + config: shellprocess_copy_refind_theme_chrooted.conf + +# - shellprocess@remove_unneeded_nvidia_and_virt_machine_and_packages_chrooted +- id: remove_unneeded_nvidia_and_virt_machine_and_packages_chrooted + module: shellprocess + config: shellprocess_remove_unneeded_nvidia_and_virt_machine_and_packages_chrooted.conf + +# - shellprocess@build_dracut_kernels_and_menu_chrooted +- id: build_dracut_kernels_and_menu_chrooted + module: shellprocess + config: shellprocess_build_dracut_kernels_and_menu_chrooted.conf + +# - shellprocess@final_chrooted +- id: final_chrooted + module: shellprocess + config: shellprocess_final_chrooted.conf + +# - shellprocess@copy_pacman_std_conf_dont_chroot +- id: copy_pacman_std_conf_dont_chroot + module: shellprocess + config: shellprocess_copy_pacman_std_conf_dont_chroot.conf + +# - shellprocess@copy_install_logs_dont_chroot +- id: copy_install_logs_dont_chroot + module: shellprocess + config: shellprocess_copy_install_logs_dont_chroot.conf + +# - shellprocess@install_nvidia_drivers_chrooted +- id: install_nvidia_drivers_chrooted + module: shellprocess + config: shellprocess_install_nvidia_drivers_chrooted.conf + +# - shellprocess@install_intel_drivers_chrooted +- id: install_intel_drivers_chrooted + module: shellprocess + config: shellprocess_install_intel_drivers_chrooted.conf + + +sequence: +- show: + - welcome@online + - locale + - keyboard +# - packagechooser + - netinstall + - packagechooserq + - partition + - users + - summary +- exec: + - hardwaredetect + - partition + - zfs + - mount + - shellprocess@copy_packages_dont_chroot + - shellprocess@initialize_pacman_dont_chroot + - pacstrap + - machineid + - fstab + - locale + - keyboard + - localecfg + - userpkglist + - packages@online + - luksbootkeyfile + - zfshostid + - users + - networkcfg + - displaymanager + - hwclock + - shellprocess@remove_ucode_chrooted + - eos_bootloader + - grubcfg + - bootloader + - services-systemd + - shellprocess@copy_refind_theme_chrooted + - shellprocess@install_nvidia_drivers_chrooted + - shellprocess@install_intel_drivers_chrooted + - shellprocess@remove_unneeded_nvidia_and_virt_machine_and_packages_chrooted + - shellprocess@build_dracut_kernels_and_menu_chrooted + - shellprocess@final_chrooted + - shellprocess@copy_pacman_std_conf_dont_chroot + - shellprocess@copy_install_logs_dont_chroot + - preservefiles + - umount +- show: + - finished + +branding: melawy + +prompt-install: true + +dont-chroot: false + +oem-setup: false + +disable-cancel: false + +disable-cancel-during-exec: false + +hide-back-and-next-during-exec: true + +quit-at-end: false diff --git a/settings_offline.conf b/settings_offline.conf new file mode 100644 index 0000000..3ae68dc --- /dev/null +++ b/settings_offline.conf @@ -0,0 +1,133 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# +# Configuration file for Melawy Linux offline installs + +--- + +modules-search: [ local ] + +instances: +- id: offline + module: packages + config: packages_offline.conf + +- id: offline + module: welcome + config: welcome_offline.conf + +- id: offline + module: eos_bootloader + config: eos_bootloader_offline.conf + +# - shellprocess@reset_systemd_multiuser_chrooted +- id: reset_systemd_multiuser_chrooted + module: shellprocess + config: shellprocess_reset_systemd_multiuser_chrooted.conf + +# - shellprocess@initialize_pacman_dont_chroot +- id: initialize_pacman_dont_chroot + module: shellprocess + config: shellprocess_initialize_pacman_dont_chroot_offline.conf + +# - shellprocess@remove_ucode_chrooted +- id: remove_ucode_chrooted + module: shellprocess + config: shellprocess_remove_ucode_chrooted.conf + +# - shellprocess@copy_refind_theme_chrooted +- id: copy_refind_theme_chrooted + module: shellprocess + config: shellprocess_copy_refind_theme_chrooted.conf + +# - shellprocess@remove_unneeded_nvidia_and_virt_machine_and_packages_chrooted +- id: remove_unneeded_nvidia_and_virt_machine_and_packages_chrooted + module: shellprocess + config: shellprocess_remove_unneeded_nvidia_and_virt_machine_and_packages_chrooted.conf + +# - shellprocess@build_dracut_kernels_and_menu_chrooted +- id: build_dracut_kernels_and_menu_chrooted + module: shellprocess + config: shellprocess_build_dracut_kernels_and_menu_chrooted.conf + +# - shellprocess@final_chrooted +- id: final_chrooted + module: shellprocess + config: shellprocess_final_chrooted.conf + +# - shellprocess@copy_pacman_std_conf_dont_chroot +- id: copy_pacman_std_conf_dont_chroot + module: shellprocess + config: shellprocess_copy_pacman_std_conf_dont_chroot.conf + +# - shellprocess@copy_install_logs_dont_chroot +- id: copy_install_logs_dont_chroot + module: shellprocess + config: shellprocess_copy_install_logs_dont_chroot.conf + +# - shellprocess@install_intel_drivers_chrooted +- id: install_intel_drivers_chrooted + module: shellprocess + config: shellprocess_install_intel_drivers_chrooted.conf + + +sequence: +- show: + - welcome@offline + - locale + - keyboard + - packagechooserq + - partition + - users + - summary +- exec: + - hardwaredetect + - partition + - mount + - unpackfs + - shellprocess@reset_systemd_multiuser_chrooted + - machineid + - fstab + - locale + - keyboard + - localecfg + - luksbootkeyfile + - removeuser + - users + - networkcfg + - displaymanager + - shellprocess@initialize_pacman_dont_chroot + - packages@offline + - hwclock + - shellprocess@remove_ucode_chrooted + - eos_bootloader@offline + - grubcfg + - bootloader + - services-systemd + - shellprocess@copy_refind_theme_chrooted + - shellprocess@install_intel_drivers_chrooted + - shellprocess@remove_unneeded_nvidia_and_virt_machine_and_packages_chrooted + - shellprocess@build_dracut_kernels_and_menu_chrooted + - shellprocess@final_chrooted + - shellprocess@copy_pacman_std_conf_dont_chroot + - shellprocess@copy_install_logs_dont_chroot + - preservefiles + - umount +- show: + - finished + +branding: melawy + +prompt-install: true + +dont-chroot: false + +oem-setup: false + +disable-cancel: false + +disable-cancel-during-exec: false + +hide-back-and-next-during-exec: true + +quit-at-end: false diff --git a/settings_online.conf b/settings_online.conf new file mode 100644 index 0000000..d0430e0 --- /dev/null +++ b/settings_online.conf @@ -0,0 +1,135 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# +# Configuration file for Melawy Linux Calamares online installs +--- + +modules-search: [ local ] + +instances: +- id: online + module: packages + config: packages_online.conf + +- id: online + module: welcome + config: welcome_online.conf + +# - shellprocess_copy_packages_dont_chroot +- id: copy_packages_dont_chroot + module: shellprocess + config: shellprocess_copy_packages_dont_chroot.conf + +# - shellprocess@initialize_pacman_dont_chroot +- id: initialize_pacman_dont_chroot + module: shellprocess + config: shellprocess_initialize_pacman_dont_chroot_online.conf + +# - shellprocess@remove_ucode_chrooted +- id: remove_ucode_chrooted + module: shellprocess + config: shellprocess_remove_ucode_chrooted.conf + +# - shellprocess@copy_refind_theme_chrooted +- id: copy_refind_theme_chrooted + module: shellprocess + config: shellprocess_copy_refind_theme_chrooted.conf + +# - shellprocess@remove_unneeded_nvidia_and_virt_machine_and_packages_chrooted +- id: remove_unneeded_nvidia_and_virt_machine_and_packages_chrooted + module: shellprocess + config: shellprocess_remove_unneeded_nvidia_and_virt_machine_and_packages_chrooted.conf + +# - shellprocess@build_dracut_kernels_and_menu_chrooted +- id: build_dracut_kernels_and_menu_chrooted + module: shellprocess + config: shellprocess_build_dracut_kernels_and_menu_chrooted.conf + +# - shellprocess@final_chrooted +- id: final_chrooted + module: shellprocess + config: shellprocess_final_chrooted.conf + +# - shellprocess@copy_pacman_std_conf_dont_chroot +- id: copy_pacman_std_conf_dont_chroot + module: shellprocess + config: shellprocess_copy_pacman_std_conf_dont_chroot.conf + +# - shellprocess@copy_install_logs_dont_chroot +- id: copy_install_logs_dont_chroot + module: shellprocess + config: shellprocess_copy_install_logs_dont_chroot.conf + +# - shellprocess@install_nvidia_drivers_chrooted +- id: install_nvidia_drivers_chrooted + module: shellprocess + config: shellprocess_install_nvidia_drivers_chrooted.conf + +# - shellprocess@install_intel_drivers_chrooted +- id: install_intel_drivers_chrooted + module: shellprocess + config: shellprocess_install_intel_drivers_chrooted.conf + + +sequence: +- show: + - welcome@online + - locale + - keyboard +# - packagechooser + - netinstall + - packagechooserq + - partition + - users + - summary +- exec: + - hardwaredetect + - partition + - mount + - shellprocess@copy_packages_dont_chroot + - shellprocess@initialize_pacman_dont_chroot + - pacstrap + - machineid + - fstab + - locale + - keyboard + - localecfg + - packages@online + - luksbootkeyfile + - users + - networkcfg + - displaymanager + - hwclock + - shellprocess@remove_ucode_chrooted + - eos_bootloader + - grubcfg + - bootloader + - services-systemd + - shellprocess@copy_refind_theme_chrooted + - shellprocess@install_nvidia_drivers_chrooted + - shellprocess@install_intel_drivers_chrooted + - shellprocess@remove_unneeded_nvidia_and_virt_machine_and_packages_chrooted + - shellprocess@build_dracut_kernels_and_menu_chrooted + - shellprocess@final_chrooted + - shellprocess@copy_pacman_std_conf_dont_chroot + - shellprocess@copy_install_logs_dont_chroot + - preservefiles + - umount +- show: + - finished + +branding: melawy + +prompt-install: true + +dont-chroot: false + +oem-setup: false + +disable-cancel: false + +disable-cancel-during-exec: false + +hide-back-and-next-during-exec: true + +quit-at-end: false diff --git a/settings_sample.conf b/settings_sample.conf new file mode 100644 index 0000000..f4cbd05 --- /dev/null +++ b/settings_sample.conf @@ -0,0 +1,236 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# +# Configuration file for Calamares +# +# This is the top-level configuration file for Calamares. +# It specifies what modules will be used, as well as some +# overall characteristics -- is this a setup program, or +# an installer. More specific configuration is devolved +# to the branding file (for the UI) and the individual +# module configuration files (for functionality). +--- +# Modules can be job modules (with different interfaces) and QtWidgets view +# modules. They could all be placed in a number of different paths. +# "modules-search" is a list of strings, each of these can either be a full +# path to a directory or the keyword "local". +# +# "local" means: +# - modules in $LIBDIR/calamares/modules, with +# - settings in SHARE/calamares/modules or /etc/calamares/modules. +# In debug-mode (e.g. calamares -d) "local" also adds some paths +# that make sense from inside the build-directory, so that you +# can build-and-run with the latest modules immediately. +# +# Strings other than "local" are taken as paths and interpreted +# relative to wherever Calamares is started. It is therefore **strongly** +# recommended to use only absolute paths here. This is mostly useful +# if your distro has forks of standard Calamares modules, but also +# uses some form of upstream packaging which might overwrite those +# forked modules -- then you can keep modules somewhere outside of +# the "regular" module tree. +# +# +# YAML: list of strings. +modules-search: [ local ] + +# Instances section. This section is optional, and it defines custom instances +# for modules of any kind. An instance entry has these keys: +# - *module* name, which matches the module name from the module descriptor +# (usually the name of the directory under `src/modules/`, but third- +# party modules may diverge. +# - *id* (optional) an identifier to distinguish this instance from +# all the others. If none is given, the name of the module is used. +# Together, the module and id form an instance key (see below). +# - *config* (optional) a filename for the configuration. If none is +# given, *module*`.conf` is used (e.g. `welcome.conf` for the welcome +# module) +# - *weight* (optional) In the *exec* phase of the sequence, progress +# is reported as jobs are completed. The jobs from a single module +# together contribute the full weight of that module. The overall +# progress (0 .. 100%) is divided up according to the weight of each +# module. Give modules that take a lot of time to complete, a larger +# weight to keep the overall progress moving along steadily. This +# weight overrides a weight given in the module descriptor. If no weight +# is given, uses the value from the module descriptor, or 1 if there +# isn't one there either. +# +# The primary goal of this mechanism is to allow loading multiple instances +# of the same module, with different configuration. If you don't need this, +# the instances section can safely be left empty. +# +# Module name plus instance name makes an instance key, e.g. +# "packagechooserq@licenseq", where "packagechooserq" is the module name (for the packagechooserq +# viewmodule) and "licenseq" is the instance name. In the *sequence* +# section below, use instance-keys to name instances (instead of just +# a module name, for modules which have only a single instance). +# +# Every module implicitly has an instance with the instance name equal +# to its module name, e.g. "welcome@welcome". In the *sequence* section, +# mentioning a module without a full instance key (e.g. "welcome") +# means that implicit module. +# +# An instance may specify its configuration file (e.g. `webview-home.conf`). +# The implicit instances all have configuration files named `.conf`. +# This (implict) way matches the source examples, where the welcome +# module contains an example `welcome.conf`. Specify a *config* for +# any module (also implicit instances) to change which file is used. +# +# For more information on running module instances, run Calamares in debug +# mode and check the Modules page in the Debug information interface. +# +# A module that is often used with instances is shellprocess, which will +# run shell commands specified in the configuration file. By configuring +# more than one instance of the module, multiple shell sessions can be run +# during install. +# +# YAML: list of maps of string:string key-value pairs. +#instances: +#- id: licenseq +# module: packagechooserq +# config: licenseq.conf + +# Sequence section. This section describes the sequence of modules, both +# viewmodules and jobmodules, as they should appear and/or run. +# +# A jobmodule instance key (or name) can only appear in an exec phase, whereas +# a viewmodule instance key (or name) can appear in both exec and show phases. +# There is no limit to the number of show or exec phases. However, the same +# module instance key should not appear more than once per phase, and +# deployers should take notice that the global storage structure is persistent +# throughout the application lifetime, possibly influencing behavior across +# phases. A show phase defines a sequence of viewmodules (and therefore +# pages). These viewmodules can offer up jobs for the execution queue. +# +# An exec phase displays a progress page (with brandable slideshow). This +# progress page iterates over the modules listed in the *immediately +# preceding* show phase, and enqueues their jobs, as well as any other jobs +# from jobmodules, in the order defined in the current exec phase. +# +# It then executes the job queue and clears it. If a viewmodule offers up a +# job for execution, but the module name (or instance key) isn't listed in the +# immediately following exec phase, this job will not be executed. +# +# YAML: list of lists of strings. +sequence: +- show: + - welcome +# - notesqml +# - packagechooserq@licenseq + - locale + - keyboard + - partition + - users +# - tracking + - summary +- exec: +# - dummycpp +# - dummyprocess +# - dummypython + - partition +# - zfs + - mount + - unpackfs + - machineid + - fstab + - locale + - keyboard + - localecfg +# - luksbootkeyfile +# - luksopenswaphookcfg +# - dracutlukscfg +# - plymouthcfg +# - zfshostid + - initcpiocfg + - initcpio + - users + - displaymanager + - networkcfg + - hwclock + - services-systemd +# - dracut + - initramfs +# - 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 YAML file branding.desc which may reference additional resources +# (such as images) as paths relative to the current directory. +# +# A branding component can also ship a QML slideshow for execution pages, +# along with translation files. +# +# Only the name of the branding component (directory) should be specified +# here, Calamares then takes care of finding it and loading the contents. +# +# YAML: string. +branding: default + +# If this is set to true, Calamares will show an "Are you sure?" prompt right +# before each execution phase, i.e. at points of no return. If this is set to +# false, no prompt is shown. Default is false, but Calamares will complain if +# this is not explicitly set. +# +# YAML: boolean. +prompt-install: false + +# If this is set to true, Calamares will execute all target environment +# commands in the current environment, without chroot. This setting should +# only be used when setting up Calamares as a post-install configuration tool, +# as opposed to a full operating system installer. +# +# Some official Calamares modules are not expected to function with this +# setting. (e.g. partitioning seems like a bad idea, since that is expected to +# have been done already) +# +# Default is false (for a normal installer), but Calamares will complain if +# this is not explicitly set. +# +# YAML: boolean. +dont-chroot: false + +# If this is set to true, Calamares refers to itself as a "setup program" +# rather than an "installer". Defaults to the value of dont-chroot, but +# Calamares will complain if this is not explicitly set. +oem-setup: false + +# If this is set to true, the "Cancel" button will be disabled entirely. +# The button is also hidden from view. +# +# This can be useful if when e.g. Calamares is used as a post-install +# configuration tool and you require the user to go through all the +# configuration steps. +# +# Default is false, but Calamares will complain if this is not explicitly set. +# +# YAML: boolean. +disable-cancel: false + +# If this is set to true, the "Cancel" button will be disabled once +# you start the 'Installation', meaning there won't be a way to cancel +# the Installation until it has finished or installation has failed. +# +# Default is false, but Calamares will complain if this is not explicitly set. +# +# YAML: boolean. +disable-cancel-during-exec: false + +# If this is set to true, the "Next" and "Back" button will be hidden once +# you start the 'Installation'. +# +# Default is false, but Calamares will complain if this is not explicitly set. +# +# YAML: boolean. +hide-back-and-next-during-exec: false + +# If this is set to true, then once the end of the sequence has +# been reached, the quit (done) button is clicked automatically +# and Calamares will close. Default is false: the user will see +# that the end of installation has been reached, and that things are ok. +# +# +quit-at-end: false diff --git a/src/branding/CMakeLists.txt b/src/branding/CMakeLists.txt new file mode 100644 index 0000000..8982574 --- /dev/null +++ b/src/branding/CMakeLists.txt @@ -0,0 +1,10 @@ +# === This file is part of Calamares - === +# +# SPDX-FileCopyrightText: 2020 Adriaan de Groot +# SPDX-License-Identifier: BSD-2-Clause +# + +# Add branding components. Since there is only one, called "default", +# add that one. For examples of other branding components, see +# the calamares-extensions repository. +calamares_add_branding_subdirectory( melawy ) diff --git a/src/branding/melawy/banner.png b/src/branding/melawy/banner.png new file mode 100644 index 0000000..afdd044 Binary files /dev/null and b/src/branding/melawy/banner.png differ diff --git a/src/branding/melawy/branding.desc b/src/branding/melawy/branding.desc new file mode 100644 index 0000000..ae79f83 --- /dev/null +++ b/src/branding/melawy/branding.desc @@ -0,0 +1,222 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# +# Product branding information. This influences some global +# user-visible aspects of Calamares, such as the product +# name, window behavior, and the slideshow during installation. +# +# Additional styling can be done using the stylesheet.qss +# file, also in the branding directory. +--- +componentName: melawy + + +### WELCOME / OVERALL WORDING +# +# These settings affect some overall phrasing and looks, +# which are most visible in the welcome page. + +# This selects between different welcome texts. When false, uses +# the traditional "Welcome to the %1 installer.", and when true, +# uses "Welcome to the Calamares installer for %1." This allows +# to distinguish this installer from other installers for the +# same distribution. +welcomeStyleCalamares: false + +# Should the welcome image (productWelcome, below) be scaled +# up beyond its natural size? If false, the image does not grow +# with the window but remains the same size throughout (this +# may have surprising effects on HiDPI monitors). +welcomeExpandingLogo: true + +### WINDOW CONFIGURATION +# +# The settings here affect the placement of the Calamares +# window through hints to the window manager and initial +# sizing of the Calamares window. + +# Size and expansion policy for Calamares. +# - "normal" or unset, expand as needed, use *windowSize* +# - "fullscreen", start as large as possible, ignore *windowSize* +# - "noexpand", don't expand automatically, use *windowSize* +windowExpanding: normal + +# Size of Calamares window, expressed as w,h. Both w and h +# may be either pixels (suffix px) or font-units (suffix em). +# e.g. "800px,600px" +# "60em,480px" +# This setting is ignored if "fullscreen" is selected for +# *windowExpanding*, above. If not set, use constants defined +# in CalamaresUtilsGui, 800x520. +windowSize: 1200px,715px + +# Placement of Calamares window. Either "center" or "free". +# Whether "center" actually works does depend on the window +# manager in use (and only makes sense if you're not using +# *windowExpanding* set to "fullscreen"). +windowPlacement: center + +### PANELS CONFIGURATION +# +# Calamares has a main content area, and two panels (navigation +# and progress / sidebar). The panels can be controlled individually, +# or switched off. If both panels are switched off, the layout of +# the main content area loses its margins, on the assumption that +# you're doing something special. + +# Kind of sidebar (panel on the left, showing progress). +# - "widget" or unset, use traditional sidebar (logo, items) +# - "none", hide it entirely +# - "qml", use calamares-sidebar.qml from branding folder +# In addition, you **may** specify a side, separated by a comma, +# from the kind. Valid sides are: +# - "left" (if not specified, uses this) +# - "right" +# - "top" +# - "bottom" +# For instance, "widget,right" is valid; so is "qml", which defaults +# to putting the sidebar on the left. Also valid is "qml,top". +# While "widget,top" is valid, the widgets code is **not** flexible +# and results will be terrible. +sidebar: qml,top + +# Kind of navigation (button panel on the bottom). +# - "widget" or unset, use traditional navigation +# - "none", hide it entirely +# - "qml", use calamares-navigation.qml from branding folder +# In addition, you **may** specify a side, separated by a comma, +# from the kind. The same sides are valid as for *sidebar*, +# except the default is *bottom*. +navigation: widget + + +### STRINGS, IMAGES AND COLORS +# +# This section contains the "branding proper" of names +# and images, rather than global-look settings. + +# These are strings shown to the user in the user interface. +# There is no provision for translating them -- since they +# are names, the string is included as-is. +# +# The four Url strings are the Urls used by the buttons in +# the welcome screen, and are not shown to the user. Clicking +# on the "Support" button, for instance, opens the link supportUrl. +# If a Url is empty, the corresponding button is not shown. +# +# bootloaderEntryName is how this installation / distro is named +# in the boot loader (e.g. in the GRUB menu). +# +# These strings support substitution from /etc/os-release +# if KDE Frameworks 5.58 are available at build-time. When +# enabled, @{var-name} is replaced by the equivalent value +# from os-release. All the supported var-names are in all-caps, +# and are listed on the FreeDesktop.org site, +# https://www.freedesktop.org/software/systemd/man/os-release.html +# Note that ANSI_COLOR and CPE_NAME don't make sense here, and +# are not supported (the rest are). Remember to quote the string +# if it contains substitutions, or you'll get YAML exceptions. +# +# The *Url* entries are used on the welcome page, and they +# are visible as buttons there if the corresponding *show* keys +# are set to "true" (they can also be overridden). +strings: + productName: Melawy Linux + shortProductName: Melawy Linux + version: ${release_name} ${version} + shortVersion: ${version} + versionedName: Melawy Linux + shortVersionedName: ${release_name} + bootloaderEntryName: Melawy Linux + productUrl: https://melawy.ru/ + supportUrl: https://melawy.ru/ + releaseNotesUrl: https://melawy.ru + +# These images are loaded from the branding module directory. +# +# productBanner is an optional image, which if present, will be shown +# on the welcome page of the application, above the welcome text. +# It is intended to have a width much greater than height. +# It is displayed at 64px height (also on HiDPI). +# Recommended size is 64px tall, and up to 460px wide. +# productIcon is used as the window icon, and will (usually) be used +# by the window manager to represent the application. This image +# should be square, and may be displayed by the window manager +# as small as 16x16 (but possibly larger). +# productLogo is used as the logo at the top of the left-hand column +# which shows the steps to be taken. The image should be square, +# and is displayed at 80x80 pixels (also on HiDPI). +# productWallpaper is an optional image, which if present, will replace +# the normal solid background on every page of the application. +# It can be any size and proportion, +# and will be tiled to fit the entire window. +# For a non-tiled wallpaper, the size should be the same as +# the overall window, see *windowSize* above (800x520). +# productWelcome is shown on the welcome page of the application in +# the middle of the window, below the welcome text. It can be +# any size and proportion, and will be scaled to fit inside +# the window. Use `welcomeExpandingLogo` to make it non-scaled. +# Recommended size is 320x150. +# +# These filenames can also use substitutions from os-release (see above). +images: + productLogo: "logo.png" + productIcon: "icon.png" + productWelcome: "welcome.png" + # productBanner: "banner.png" + # productWallpaper: "wallpaper.png" + +# Colors for text and background components. +# +# - sidebarBackground is the background of the sidebar +# - sidebarText is the (foreground) text color +# - sidebarTextHighlight sets the background of the selected (current) step. +# Optional, and defaults to the application palette. +# - sidebarSelect is the text color of the selected step. +# +# These colors can **also** be set through the stylesheet, if the +# branding component also ships a stylesheet.qss. Then they are +# the corresponding CSS attributes of #sidebarApp. +style: + SidebarBackground: "#22272e" + SidebarText: "#96c5f6" + SidebarTextCurrent: "#ffffff" + SidebarBackgroundCurrent: "#7e4242" +### SLIDESHOW +# +# The slideshow is displayed during execution steps (e.g. when the +# installer is actually writing to disk and doing other slow things). + +# The slideshow can be a QML file (recommended) which can display +# arbitrary things -- text, images, animations, or even play a game -- +# during the execution step. The QML **is** abruptly stopped when the +# execution step is done, though, so maybe a game isn't a great idea. +# +# The slideshow can also be a sequence of images (not recommended unless +# you don't want QML at all in your Calamares). The images are displayed +# at a rate of 1 every 2 seconds during the execution step. +# +# To configure a QML file, list a single filename: +# slideshow: "show.qml" +# To configure images, like the filenames (here, as an inline list): +# slideshow: [ "/etc/calamares/slideshow/0.png", "/etc/logo.png" ] +slideshow: "show.qml" + +# There are two available APIs for a QML slideshow: +# - 1 (the default) loads the entire slideshow when the installation- +# slideshow page is shown and starts the QML then. The QML +# is never stopped (after installation is done, times etc. +# continue to fire). +# - 2 loads the slideshow on startup and calls onActivate() and +# onLeave() in the root object. After the installation is done, +# the show is stopped (first by calling onLeave(), then destroying +# the QML components). +# +# An image slideshow does not need to have the API defined. +slideshowAPI: 2 + +# log feature +uploadServer : + type : "fiche" + url : "http://termbin.com:9999" + sizeLimit : -1 diff --git a/src/branding/melawy/calamares-sidebar.qml b/src/branding/melawy/calamares-sidebar.qml new file mode 100644 index 0000000..9f05454 --- /dev/null +++ b/src/branding/melawy/calamares-sidebar.qml @@ -0,0 +1,105 @@ +/* Sample of QML progress tree. + + SPDX-FileCopyrightText: 2020 Adriaan de Groot + SPDX-FileCopyrightText: 2021 Anke Boersma + SPDX-License-Identifier: GPL-3.0-or-later + + + The progress tree (actually a list) is generally "vertical" in layout, + with the steps going "down", but it could also be a more compact + horizontal layout with suitable branding settings. + + This example emulates the layout and size of the widgets progress tree. +*/ + +import io.calamares.ui 1.0 +import io.calamares.core 1.0 + +import QtQuick 2.3 +import QtQuick.Layouts 1.3 +import QtQuick.Controls 2.15 + +Rectangle { + id: sideBar; + color: Branding.styleString( Branding.SidebarBackground ); + height: 38; + width: parent.width; + + RowLayout { + anchors.fill: parent; + spacing: 2; + + Image { + Layout.leftMargin: 12; + Layout.rightMargin: 12; + Layout.alignment: Qt.AlignCenter; + id: logo; + width: 30; + height: width; // square + source: "file:/" + Branding.imagePath(Branding.ProductLogo); + sourceSize.width: width; + sourceSize.height: height; + } + + Repeater { + model: ViewManager + Rectangle { + Layout.leftMargin: 6; + Layout.rightMargin: 6; + Layout.fillWidth: true; + Layout.alignment: Qt.AlignCenter; + height: 32; + radius: 6; + color: Branding.styleString( index == ViewManager.currentStepIndex ? Branding.SidebarBackgroundCurrent : Branding.SidebarBackground ); + + Text { + horizontalAlignment: Text.AlignHCenter; + verticalAlignment: Text.AlignVCenter; + anchors.verticalCenter: parent.verticalCenter; + anchors.horizontalCenter: parent.horizontalCenter; + x: parent.x + 12; + color: Branding.styleString( index == ViewManager.currentStepIndex ? Branding.SidebarTextCurrent : Branding.SidebarText ); + + text: display; + width: parent.width; + wrapMode: Text.WordWrap; + font.weight: (index == ViewManager.currentStepIndex ? Font.Bold : Font.Normal); + font.pointSize : (index == ViewManager.currentStepIndex ? 10 : 9); + } + } + } + + Item { + Layout.fillHeight: true; + } + + /*Rectangle { + id: debugArea; + Layout.rightMargin: (debug.enabled) ? 8 : 0; + Layout.bottomMargin: (debug.enabled) ? 18 : 0; + Layout.fillWidth: true; + Layout.alignment: Qt.AlignCenter; + height: 32; + //width: parent.width; + color: Branding.styleString( debug.enabled ? Branding.SidebarTextHighlight : Branding.SidebarBackground ); + visible: debug.enabled; + + MouseArea { + id: mouseAreaDebug; + anchors.fill: parent; + cursorShape: Qt.PointingHandCursor; + hoverEnabled: true; + + Text { + anchors.verticalCenter: parent.verticalCenter; + anchors.horizontalCenter: parent.horizontalCenter; + text: qsTr("Debug"); + color: Branding.styleString( Branding.SidebarTextSelected ); + font.pointSize: 9; + } + + onClicked: debug.toggle(); + } + }*/ + } +} diff --git a/src/branding/melawy/finishedq.qml b/src/branding/melawy/finishedq.qml new file mode 100644 index 0000000..f52e505 --- /dev/null +++ b/src/branding/melawy/finishedq.qml @@ -0,0 +1,107 @@ +/* === This file is part of Calamares - === + * + * SPDX-FileCopyrightText: 2021 Anke Boersma + * SPDX-License-Identifier: GPL-3.0-or-later + * License-Filename: LICENSE + * + * Calamares is Free Software: see the License-Identifier above. + * + */ + +import io.calamares.core 1.0 +import io.calamares.ui 1.0 + +import QtQuick 2.15 +import QtQuick.Controls 2.15 +import QtQuick.Layouts 1.3 +import org.kde.kirigami 2.7 as Kirigami +import QtGraphicalEffects 1.0 +import QtQuick.Window 2.3 + +Page { + + id: finished + // needs to come from umount.conf + property var configdestLog: "/var/log/Calamares.log" + + width: parent.width + height: parent.height + + header: Kirigami.Heading { + width: parent.width + height: 80 + id: header + Layout.fillWidth: true + horizontalAlignment: Qt.AlignHCenter + color: "white" + level: 1 + text: qsTr("Installation Completed") + + Text { + anchors.top: header.bottom + anchors.horizontalCenter: parent.horizontalCenter + horizontalAlignment: Text.AlignHCenter + font.pointSize: 14 + color: "white" + text: qsTr("%1 has been installed on your computer.
+ You may now restart into your new system, or continue using the Live environment.").arg(Branding.string(Branding.ProductName)) + } + + Image { + source: "logo.png" + anchors.top: header.bottom + anchors.topMargin: 80 + anchors.horizontalCenter: parent.horizontalCenter + width: 192 + height: 192 + mipmap: true + } + } + + RowLayout { + Layout.alignment: Qt.AlignRight|Qt.AlignVCenter + anchors.centerIn: parent + spacing: 6 + + Button { + id: button + text: qsTr("Close Installer") + icon.name: "application-exit" + onClicked: { ViewManager.quit(); } + //onClicked: console.log("close calamares"); + } + + Button { + text: qsTr("Restart System") + icon.name: "system-reboot" + onClicked: { + config.doRestart(true); + ViewManager.quit(); + } + } + } + + Item { + + Layout.fillHeight: true + Layout.fillWidth: true + anchors.bottom: parent.bottom + anchors.bottomMargin : 128 + anchors.horizontalCenter: parent.horizontalCenter + + Text { + anchors.centerIn: parent + anchors.top: parent.top + horizontalAlignment: Text.AlignHCenter + color: "white" + text: qsTr("

A full log of the install is available as installation.log in the home directory of the Live user.
+ This log is copied to %1 of the target system.

").arg(configdestLog) + } + } + + function onActivate() { + } + + function onLeave() { + } +} diff --git a/src/branding/melawy/icon.png b/src/branding/melawy/icon.png new file mode 100644 index 0000000..2d9a002 Binary files /dev/null and b/src/branding/melawy/icon.png differ diff --git a/src/branding/melawy/lang/calamares-default_ar.ts b/src/branding/melawy/lang/calamares-default_ar.ts new file mode 100644 index 0000000..3c4fe09 --- /dev/null +++ b/src/branding/melawy/lang/calamares-default_ar.ts @@ -0,0 +1,17 @@ + + + + + show + + + This is a second Slide element. + عرض الثاني + + + + This is a third Slide element. + عرض الثالث + + + diff --git a/src/branding/melawy/lang/calamares-default_en.ts b/src/branding/melawy/lang/calamares-default_en.ts new file mode 100644 index 0000000..b02dbd5 --- /dev/null +++ b/src/branding/melawy/lang/calamares-default_en.ts @@ -0,0 +1,17 @@ + + + + + show + + + This is a second Slide element. + + + + + This is a third Slide element. + + + + diff --git a/src/branding/melawy/lang/calamares-default_eo.ts b/src/branding/melawy/lang/calamares-default_eo.ts new file mode 100644 index 0000000..7d1ef4e --- /dev/null +++ b/src/branding/melawy/lang/calamares-default_eo.ts @@ -0,0 +1,17 @@ + + + + + show + + + This is a second Slide element. + Ĉi tio estas la dua gliteja. + + + + This is a third Slide element. + Ĉi tio estas la tria gliteja. + + + diff --git a/src/branding/melawy/lang/calamares-default_fr.ts b/src/branding/melawy/lang/calamares-default_fr.ts new file mode 100644 index 0000000..ec5e041 --- /dev/null +++ b/src/branding/melawy/lang/calamares-default_fr.ts @@ -0,0 +1,17 @@ + + + + + show + + + This is a second Slide element. + Ceci est la deuxieme affiche. + + + + This is a third Slide element. + La troisième affice ce trouve ici. + + + diff --git a/src/branding/melawy/lang/calamares-default_nl.ts b/src/branding/melawy/lang/calamares-default_nl.ts new file mode 100644 index 0000000..19fd583 --- /dev/null +++ b/src/branding/melawy/lang/calamares-default_nl.ts @@ -0,0 +1,17 @@ + + + + + show + + + This is a second Slide element. + Dit is het tweede Dia element. + + + + This is a third Slide element. + Dit is het derde Dia element. + + + diff --git a/src/branding/melawy/languages.png b/src/branding/melawy/languages.png new file mode 100644 index 0000000..6ad1f50 Binary files /dev/null and b/src/branding/melawy/languages.png differ diff --git a/src/branding/melawy/logo.png b/src/branding/melawy/logo.png new file mode 100644 index 0000000..93becee Binary files /dev/null and b/src/branding/melawy/logo.png differ diff --git a/src/branding/melawy/show.qml b/src/branding/melawy/show.qml new file mode 100644 index 0000000..ca77f19 --- /dev/null +++ b/src/branding/melawy/show.qml @@ -0,0 +1,166 @@ +/* === This file is part of Calamares - === + * + * SPDX-FileCopyrightText: 2015 Teo Mrnjavac + * SPDX-FileCopyrightText: 2018 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later + * + * Calamares is Free Software: see the License-Identifier above. + * + */ + +import QtQuick 2.0; +import calamares.slideshow 1.0; + +Presentation +{ + id: presentation + + function nextSlide() { + console.log("QML Component (default slideshow) Next slide"); + presentation.goToNextSlide(); + } + + Timer { + id: advanceTimer + interval: 30000 + running: presentation.activatedInCalamares + repeat: true + onTriggered: nextSlide() + } + + Slide { + anchors.fill: parent + anchors.verticalCenterOffset: 0 + + Image { + id: background1 + source: "slide1.png" + width: parent.width; height: parent.height + horizontalAlignment: Image.AlignCenter + verticalAlignment: Image.AlignTop + fillMode: Image.Stretch + anchors.fill: parent + } + } + + Slide { + anchors.fill: parent + anchors.verticalCenterOffset: 0 + + Image { + id: background2 + source: "slide2.png" + width: parent.width; height: parent.height + horizontalAlignment: Image.AlignCenter + verticalAlignment: Image.AlignTop + fillMode: Image.Stretch + anchors.fill: parent + } + } + + + Slide { + anchors.fill: parent + anchors.verticalCenterOffset: 0 + + Image { + id: background3 + source: "slide3.png" + width: parent.width; height: parent.height + horizontalAlignment: Image.AlignCenter + verticalAlignment: Image.AlignTop + fillMode: Image.Stretch + anchors.fill: parent + } + } + + Slide { + anchors.fill: parent + anchors.verticalCenterOffset: 0 + + Image { + id: background4 + source: "slide4.png" + width: parent.width; height: parent.height + horizontalAlignment: Image.AlignCenter + verticalAlignment: Image.AlignTop + fillMode: Image.Stretch + anchors.fill: parent + } + } + + Slide { + anchors.fill: parent + anchors.verticalCenterOffset: 0 + + Image { + id: background5 + source: "slide5.png" + width: parent.width; height: parent.height + horizontalAlignment: Image.AlignCenter + verticalAlignment: Image.AlignTop + fillMode: Image.Stretch + anchors.fill: parent + } + } + + Slide { + anchors.fill: parent + anchors.verticalCenterOffset: 0 + + Image { + id: background6 + source: "slide6.png" + width: parent.width; height: parent.height + horizontalAlignment: Image.AlignCenter + verticalAlignment: Image.AlignTop + fillMode: Image.Stretch + anchors.fill: parent + } + } + + Slide { + anchors.fill: parent + anchors.verticalCenterOffset: 0 + + Image { + id: background7 + source: "slide7.png" + width: parent.width; height: parent.height + horizontalAlignment: Image.AlignCenter + verticalAlignment: Image.AlignTop + fillMode: Image.Stretch + anchors.fill: parent + } + } + + Slide { + anchors.fill: parent + anchors.verticalCenterOffset: 0 + + Image { + id: background8 + source: "slide8.png" + width: parent.width; height: parent.height + horizontalAlignment: Image.AlignCenter + verticalAlignment: Image.AlignTop + fillMode: Image.Stretch + anchors.fill: parent + } + } + + // When this slideshow is loaded as a V1 slideshow, only + // activatedInCalamares is set, which starts the timer (see above). + // + // In V2, also the onActivate() and onLeave() methods are called. + // These example functions log a message (and re-start the slides + // from the first). + function onActivate() { + console.log("QML Component (default slideshow) activated"); + presentation.currentSlide = 0; + } + + function onLeave() { + console.log("QML Component (default slideshow) deactivated"); + } +} diff --git a/src/branding/melawy/slide1.png b/src/branding/melawy/slide1.png new file mode 100644 index 0000000..3261eb1 Binary files /dev/null and b/src/branding/melawy/slide1.png differ diff --git a/src/branding/melawy/slide2.png b/src/branding/melawy/slide2.png new file mode 100644 index 0000000..c22e552 Binary files /dev/null and b/src/branding/melawy/slide2.png differ diff --git a/src/branding/melawy/slide3.png b/src/branding/melawy/slide3.png new file mode 100644 index 0000000..466f249 Binary files /dev/null and b/src/branding/melawy/slide3.png differ diff --git a/src/branding/melawy/slide4.png b/src/branding/melawy/slide4.png new file mode 100644 index 0000000..2d41946 Binary files /dev/null and b/src/branding/melawy/slide4.png differ diff --git a/src/branding/melawy/slide5.png b/src/branding/melawy/slide5.png new file mode 100644 index 0000000..2a222a9 Binary files /dev/null and b/src/branding/melawy/slide5.png differ diff --git a/src/branding/melawy/slide6.png b/src/branding/melawy/slide6.png new file mode 100644 index 0000000..8651713 Binary files /dev/null and b/src/branding/melawy/slide6.png differ diff --git a/src/branding/melawy/slide7.png b/src/branding/melawy/slide7.png new file mode 100644 index 0000000..73d3390 Binary files /dev/null and b/src/branding/melawy/slide7.png differ diff --git a/src/branding/melawy/slide8.png b/src/branding/melawy/slide8.png new file mode 100644 index 0000000..00abaad Binary files /dev/null and b/src/branding/melawy/slide8.png differ diff --git a/src/branding/melawy/stylesheet.qss b/src/branding/melawy/stylesheet.qss new file mode 100644 index 0000000..53475ab --- /dev/null +++ b/src/branding/melawy/stylesheet.qss @@ -0,0 +1,494 @@ +/* + +A branding component can ship a stylesheet (like this one) +which is applied to parts of the Calamares user-interface. +In principle, all parts can be styled through CSS. +Missing parts should be filed as issues. + +The IDs are based on the object names in the C++ code. +You can use the Debug Dialog to find out object names: + - Open the debug dialog + - Choose tab *Tools* + - Click *Widget Tree* button +The list of object names is printed in the log. + +Documentation for styling Qt Widgets through a stylesheet +can be found at + https://doc.qt.io/qt-5/stylesheet-examples.html + https://doc.qt.io/qt-5/stylesheet-reference.html +In Calamares, styling widget classes is supported (e.g. +using `QComboBox` as a selector). + +This example stylesheet has all the actual styling commented out. +The examples are not exhaustive. + +Use gammaray + +*/ + + +/* ########## MAIN APPLICATION WINDOW ########## */ +#mainApp { + background-color: #22272e; + color: #96c5f6; +} + +#mainText{ + font : bold 14px; +} + +#sidebarApp { + background-color: #22272e; + color: #96c5f6; +} + +#logoApp { + background-color: #22272e; + color: #96c5f6; +} + +#sidebarMenuApp { + padding: 3px; + background-color: #22272e; +} + +#view-button-back:hover { + color: #96c5f6; +} +#view-button-next:hover { + color: #96c5f6; +} +#view-button-cancel:hover { + color: #96c5f6; +} + + +#debugButton { + background-color: none; + font: bold 8px; + color: #96c5f6; + height: 32px; + border: none; +} + +#debugButton:pressed { + color: #7f3fbf; +} + +#debugButton:hover { + color: #7f3fbf; +} + + +#aboutButton { + background-color: none; + font: 14px; + color: #96c5f6; + height: 32px; + border: none; +} + +#aboutButton:pressed { + color: #7f3fbf; +} + +#aboutButton:hover { + color: #7f3fbf; +} + + +#donateButton:hover { + color: #7f3fbf; +} + +#supportButton:hover { + color: #7f3fbf; +} + +#knownIssuesButton:hover { + color: #7f3fbf; +} + +#releaseNotesButton:hover { + color: #7f3fbf; +} + +#products { + color: #96c5f6; + padding-left: 5px; + padding-right: 5px; + padding-top: 5px; + font: 15px; +} + +#productScreenshot { + padding-top: 1px; + padding-bottom: 1px; +} + +/*set to same as main app background-color and 1px to hide it*/ +#productName { + color: #96c5f6; + padding-left: 40px; + font: 16px; +} + +#productDescription { + color: #96c5f6; + padding-left: 40px; + padding-right: 40px; + font: 14px; +} + + +QWidget { + background-color: #22272e; + color: #aaaaaa; + font: 14px; +} + +QScrollArea { + background-color: #22272e; + color: #aaaaaa; + font: 14px; +} + +QLabel { + background-color: #22272e; + color: #aaaaaa; + font: 14px; +} + +// QAbstractSpinBox { +// } +// QListWidget::item:alternate { +// } + +/* ########## TOOLTIP ########## */ + +QToolTip { + background-color: #22272e; + color: #aaaaaa; + font : 14px; + padding: 3px; + border: none; +} + +QPushButton { + color: #aaaaaa; + font : 14px; + padding: 10px; +} + +// QPushButton:pressed { +// } +// +// QPushButton:hover { +// } + +QDialogButtonBox { + dialogbuttonbox-buttons-have-icons: 0; + color: #96c5f6; + font: 14px; +} + +/* ########## SCROLL BAR ########## */ + +// QScrollBar:vertical { +// background: #efefef; +// width: 20px; +// margin: 38px 0 20px 0; +// } +// +// QScrollBar::handle:vertical { +// background-color: #22272e; +// max-height: 25px; +// } +// +// QScrollBar::sub-line:vertical { +// border: none; +// background: none; +// height: 20px; +// subcontrol-position: top; +// subcontrol-origin: margin; +// } +// +// QScrollBar::add-line:vertical { +// border: none; +// background: none; +// height: 20px; +// subcontrol-position: bottom; +// subcontrol-origin: margin; +// } + +/* ########## QLIST VIEW ########## */ + +QListView { + background-color: #22272e; + alternate-background-color: #22272e; + color: #aaaaaa; + font: 14px; +} + +// QListView::item:alternate { +// background-color: #22272e; +// color: #aaaaaa; +// } +// +// QListView::item:!alternate:selected:active { +// background-color: #22272e; +// color: #aaaaaa; +// } +// +// QListView::item:selected:active { +// background-color: #22272e; +// color: #aaaaaa; +// } +// +// QListView::item:selected:!active { +// background-color: #22272e; +// color: #aaaaaa; +// } +// +// QListView::item:hover { +// background-color: #22272e; +// color: #aaaaaa; +// } +// +// QListView#listLayout::item:!alternate:selected:active { +// background-color: #22272e; +// color: #aaaaaa; +// } +// +// QListView#listVariant::item:!alternate:selected:active { +// background-color: #22272e; +// color: #aaaaaa; +// } + + + +/* ########## QLINE EDIT ########## */ + +QTextEdit { + background-color: #22272e; + color: #aaaaaa; + font: 14px; +} + +QLineEdit { + background-color: #22272e; + color: #aaaaaa; + font: 14px; +} + +// QLineEdit#LE_TestKeyboard { +// font: 14px; +// } +// +// QLineEdit#m_passphraseLineEdit, QLineEdit#vgName, +// QLineEdit#m_confirmLineEdit { +// font: 14px; +// } +// +// QLineEdit#textBoxUserVerifiedPassword, QLineEdit#textBoxVerifiedRootPassword { +// font: 14px; +// } +// +// QLineEdit#textBoxFullName, QLineEdit#textBoxLoginName, QLineEdit#textBoxHostName, +// QLineEdit#textBoxUserPassword, QLineEdit#textBoxRootPassword { +// font: 14px; +// } + +#textBoxFullName, #textBoxLoginName, #textBoxHostName, #textBoxUserPassword, +#textBoxRootPassword, #textBoxAutoLogin, #vgName { + font: 14px; +} + +#textBoxUserVerifiedPassword, #textBoxVerifiedRootPassword, +#LE_TestKeyboard, #m_confirmLineEdit, #m_passphraseLineEdit { + font: 14px; +} + +/* ##########PARTITION ########## */ + +#partitionLabel { +} + +#partitionLabelsView { +} + +#CreatePartitionDialog { +} + +#partResizerWidget { + font: 14px; +} + +/* ########## PAGE_USERSETUP ########## */ + + #labelWhatIsYourName { + font: 14px; +} + #textBoxFullName { + font: 14px; +} + #labelFullName { + font: 14px; +} + #labelFullNameError { + font: 14px; +} + #username_label_2 { + font: 14px; +} + #textBoxLoginName { + font: 14px; +} + #labelUsername { + font: 14px; +} + #labelUsernameError { + font: 14px; +} + #hostname_label_2 { + font: 14px; +} + #textBoxHostName { + font: 14px; +} + #labelHostname { + font: 14px; +} + #labelHostnameError { + font: 14px; +} + #password_label_2 { + font: 14px; +} + #textBoxUserPassword { + font: 14px; +} + #textBoxUserVerifiedPassword { + font: 14px; +} + #labelUserPassword { + font: 14px; +} + #labelUserPasswordError { + font: 14px; +} + #checkBoxRequireStrongPassword { + font: 14px; +} + #checkBoxDoAutoLogin { + font: 14px; +} + #checkBoxReusePassword { + font: 14px; +} + #labelChooseRootPassword { + font: 14px; +} + #textBoxRootPassword { + font: 14px; +} + #textBoxVerifiedRootPassword { + font: 14px; +} + #labelRootPassword { + font: 14px; +} + #labelRootPasswordError { + font: 14px; +} + +/* ########## COMBO BOX ########## */ + +QComboBox { + color: #aaaaaa; + font: 14px; +} + +QComboBox::item:selected { + background-color: #22272e; + color: #aaaaaa; +} + +#mountPointComboBox::drop-down { + font: 14px; +} + +/* ########## SPIN BOX ########## */ + +QSpinBox { + color: #aaaaaa; + font: 14px; +} + +/* ########## TREE VIEW ########## */ + +QTreeView { + background-color: #22272e; + alternate-background-color: #22272e; + color: #aaaaaa; + font: 14px; + show-decoration-selected: 0; +} + +QTreeView::item { + background-color: #22272e; + padding: 2px; +} + +QTreeView::item:selected { + background-color: #22272e; + font: bold; +} + +// QTreeView::branch:has-siblings:!adjoins-item { +// } +// QTreeView::branch:has-siblings:adjoins-item { +// } +// QTreeView::branch:!has-children:!has-siblings:adjoins-item { +// } +// QTreeView::branch:has-children:!has-siblings:closed, +// QTreeView::branch:closed:has-children:has-siblings { +// } +// QTreeView::branch:open:has-children:!has-siblings, +// QTreeView::branch:open:has-children:has-siblings { +// } + +/* ########## CHECK BOX ########## */ + +QCheckBox { + color: #aaaaaa; + font: 14px; +} + +// QCheckBox::indicator:unchecked { +// } +// QCheckBox::indicator:checked { +// } +// QItemSelectionModel::Select { +// } + +QRadioButton { + color: #aaaaaa; + font: 14px; +} + +/* ########## HEADER VIEW ########## */ + +QHeaderView::section { + font : 14px; +} + +/* ########## PROGRESS BAR ########## */ + +QProgressBar { + text-align: center; +} + +QProgressBar::chunk { + background-color: #22272e; +} diff --git a/src/branding/melawy/welcome.png b/src/branding/melawy/welcome.png new file mode 100644 index 0000000..6dc3abf Binary files /dev/null and b/src/branding/melawy/welcome.png differ diff --git a/src/modules/bootloader/bootloader.conf b/src/modules/bootloader/bootloader.conf new file mode 100644 index 0000000..41e1550 --- /dev/null +++ b/src/modules/bootloader/bootloader.conf @@ -0,0 +1,84 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# +# Bootloader configuration. The bootloader is installed to allow +# the system to start (and pick one of the installed operating +# systems to run). +# +# Take note that Debian-derivatives that use unmodified GRUB EFI packages +# should specifically set *efiBootloaderId* to "debian" because that is +# hard-coded in `grubx64.efi`. +--- +# A variable from global storage which overrides the value of efiBootLoader +#efiBootLoaderVar: "packagechooser_bootloader" +efiBootLoaderVar: "packagechooser_packagechooserq" + +# Define which bootloader you want to use for EFI installations +# Possible options are 'grub', 'sb-shim', 'systemd-boot' or 'refind' +efiBootLoader: "refind" + +# systemd-boot configuration files settings + +# kernelSearchPath is the path relative to the root of the install to search for kernels +# A kernel is identified by finding files which match regular expression, kernelPattern +kernelSearchPath: "/usr/lib/modules" +kernelPattern: "^vmlinuz.*" + +# loaderEntries is an array of options to add to loader.conf for systemd-boot +# please note that the "default" option is added programmatically +loaderEntries: + - "timeout 5" + - "console-mode max" + +# systemd-boot and refind support custom kernel params +kernelParams: [ "nvme_load=YES","nowatchdog","zswap.enabled=0","page_alloc.shuffle=1","threadirqs","split_lock_detect=off","pci=pcie_bus_perf","add_efi_memmap","quiet" ] + +# A list of kernel names that refind should accept as kernels +refindKernelList: [ "linux","linux-lts","linux-zen","linux-hardened","linux-xanmod-anbox","linux-xanmod","linux-xanmod-lts","linux-lqx","linux-cachyos","linux-cachyos-cfs","linux-cachyos-bore","linux-cachyos-tt","linux-cachyos-bmq","linux-cachyos-pds","linux-cachyos-lts" ] + +# GRUB 2 binary names and boot directory +# Some distributions (e.g. Fedora) use grub2-* (resp. /boot/grub2/) names. +# These names are also used when using sb-shim, since that needs some +# GRUB functionality (notably grub-probe) to work. As needed, you may use +# complete paths like `/usr/bin/efibootmgr` for the executables. +# +grubInstall: "grub-install" +grubMkconfig: "grub-mkconfig" +grubCfg: "/boot/grub/grub.cfg" +grubProbe: "grub-probe" +efiBootMgr: "efibootmgr" + +# Optionally set the bootloader ID to use for EFI. This is passed to +# grub-install --bootloader-id. +# +# If not set here, the value from bootloaderEntryName from branding.desc +# is used, with problematic characters (space and slash) replaced. +# +# The ID is also used as a directory name within the EFI environment, +# and the bootloader is copied from /boot/efi/EFI// . When +# setting the option here, keep in mind that the name is sanitized +# (problematic characters, see above, are replaced). +# +# There are some special words possible at the end of *efiBootloaderId*: +# ${SERIAL} can be used to obtain a uniquely-numbered suffix +# that is added to the Id (yielding, e.g., `dirname1` or `dirname72`) +# ${RANDOM} can be used to obtain a unique 4-digit hex suffix +# ${PHRASE} can be used to obtain a unique 1-to-3-word suffix +# from a dictionary of space-themed words +# These words must be at the **end** of the *efiBootloaderId* value. +# There must also be at most one of them. If there is none, no suffix- +# processing is done and the *efiBootloaderId* is used unchanged. +# +# NOTE: Debian derivatives that use the unmodified Debian GRUB EFI +# packages may need to set this to "debian" because that is +# hard-coded in `grubx64.efi`. +# +efiBootloaderId: "Melawy Linux" + +# Optionally install a copy of the GRUB EFI bootloader as the EFI +# fallback loader (either bootia32.efi or bootx64.efi depending on +# the system). This may be needed on certain systems (Intel DH87MC +# seems to be the only one). If you set this to false, take care +# to add another module to optionally install the fallback on those +# boards that need it. +installEFIFallback: true diff --git a/src/modules/bootloader/main.py b/src/modules/bootloader/main.py new file mode 100644 index 0000000..19aef68 --- /dev/null +++ b/src/modules/bootloader/main.py @@ -0,0 +1,984 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- +# +# === This file is part of Calamares - === +# +# SPDX-FileCopyrightText: 2014 Aurélien Gâteau +# SPDX-FileCopyrightText: 2014 Anke Boersma +# SPDX-FileCopyrightText: 2014 Daniel Hillenbrand +# SPDX-FileCopyrightText: 2014 Benjamin Vaudour +# SPDX-FileCopyrightText: 2014-2019 Kevin Kofler +# SPDX-FileCopyrightText: 2015-2018 Philip Mueller +# SPDX-FileCopyrightText: 2016-2017 Teo Mrnjavac +# SPDX-FileCopyrightText: 2017 Alf Gaida +# SPDX-FileCopyrightText: 2017-2019 Adriaan de Groot +# SPDX-FileCopyrightText: 2017 Gabriel Craciunescu +# SPDX-FileCopyrightText: 2017 Ben Green +# SPDX-FileCopyrightText: 2021 Neal Gompa +# SPDX-License-Identifier: GPL-3.0-or-later +# +# Calamares is Free Software: see the License-Identifier above. +# + +import fileinput +import os +import re +import shutil +import subprocess + +import libcalamares + +from libcalamares.utils import check_target_env_call + +import gettext + +_ = gettext.translation("calamares-python", + localedir=libcalamares.utils.gettext_path(), + languages=libcalamares.utils.gettext_languages(), + fallback=True).gettext + +# This is the sanitizer used all over to tidy up filenames +# to make identifiers (or to clean up names to make filenames). +file_name_sanitizer = str.maketrans(" /()", "_-__") + + +def pretty_name(): + return _("Install bootloader.") + + +def get_uuid(): + """ + Checks and passes 'uuid' to other routine. + + :return: + """ + partitions = libcalamares.globalstorage.value("partitions") + + for partition in partitions: + if partition["mountPoint"] == "/": + libcalamares.utils.debug("Root partition uuid: \"{!s}\"".format(partition["uuid"])) + return partition["uuid"] + + return "" + + +def get_kernel_line(kernel_type): + """ + Passes 'kernel_line' to other routine based on configuration file. + + :param kernel_type: + :return: + """ + if kernel_type == "fallback": + if "fallbackKernelLine" in libcalamares.job.configuration: + return libcalamares.job.configuration["fallbackKernelLine"] + else: + return " (fallback)" + else: + if "kernelLine" in libcalamares.job.configuration: + return libcalamares.job.configuration["kernelLine"] + else: + return "" + + +def get_zfs_root(): + """ + Looks in global storage to find the zfs root + + :return: A string containing the path to the zfs root or None if it is not found + """ + + zfs = libcalamares.globalstorage.value("zfsDatasets") + + if not zfs: + libcalamares.utils.warning("Failed to locate zfs dataset list") + return None + + # Find the root dataset + for dataset in zfs: + try: + if dataset["mountpoint"] == "/": + return dataset["zpool"] + "/" + dataset["dsName"] + except KeyError: + # This should be impossible + libcalamares.utils.warning("Internal error handling zfs dataset") + raise + + return None + + +def is_btrfs_root(partition): + """ Returns True if the partition object refers to a btrfs root filesystem + + :param partition: A partition map from global storage + :return: True if btrfs and root, False otherwise + """ + return partition["mountPoint"] == "/" and partition["fs"] == "btrfs" + + +def is_zfs_root(partition): + """ Returns True if the partition object refers to a zfs root filesystem + + :param partition: A partition map from global storage + :return: True if zfs and root, False otherwise + """ + return partition["mountPoint"] == "/" and partition["fs"] == "zfs" + + +def have_program_in_target(program : str): + """Returns @c True if @p program is in path in the target""" + return libcalamares.utils.target_env_call(["/usr/bin/which", program]) == 0 + + +def get_kernel_params(uuid): + # Configured kernel parameters (default "quiet"), if plymouth installed, add splash + # screen parameter and then "rw". + kernel_params = libcalamares.job.configuration.get("kernelParams", ["quiet"]) + if have_program_in_target("plymouth"): + kernel_params.append("splash") + kernel_params.append("bgrt_disable") + kernel_params.append("rw") + + use_systemd_naming = have_program_in_target("dracut") or (libcalamares.utils.target_env_call(["/usr/bin/grep", "-q", "^HOOKS.*systemd", "/etc/mkinitcpio.conf"]) == 0) + + partitions = libcalamares.globalstorage.value("partitions") + try: + gpu_drivers = libcalamares.globalstorage.value("gpuDrivers") + except KeyError: + pass + + cryptdevice_params = [] + swap_uuid = "" + swap_outer_mappername = None + swap_outer_uuid = None + + has_dracut = libcalamares.utils.target_env_call(["sh", "-c", "which dracut"]) == 0 + uses_systemd_hook = libcalamares.utils.target_env_call(["sh", "-c", + "grep -q \"^HOOKS.*systemd\" /etc/mkinitcpio.conf"]) == 0 + use_systemd_naming = has_dracut or uses_systemd_hook + + + # Take over swap settings: + # - unencrypted swap partition sets swap_uuid + # - encrypted root sets cryptdevice_params + for partition in partitions: + if partition["fs"] == "linuxswap" and not partition.get("claimed", None): + # Skip foreign swap + continue + has_luks = "luksMapperName" in partition + if partition["fs"] == "linuxswap" and not has_luks: + swap_uuid = partition["uuid"] + + if partition["fs"] == "linuxswap" and has_luks: + swap_outer_mappername = partition["luksMapperName"] + swap_outer_uuid = partition["luksUuid"] + + if partition["mountPoint"] == "/" and has_luks: + if use_systemd_naming: + cryptdevice_params = [f"rd.luks.uuid={partition['luksUuid']}"] + else: + cryptdevice_params = [f"cryptdevice=UUID={partition['luksUuid']}:{partition['luksMapperName']}"] + cryptdevice_params.append(f"root=/dev/mapper/{partition['luksMapperName']}") + + # btrfs and zfs handling + for partition in partitions: + # If a btrfs root subvolume wasn't set, it means the root is directly on the partition + # and this option isn't needed + if is_btrfs_root(partition): + btrfs_root_subvolume = libcalamares.globalstorage.value("btrfsRootSubvolume") + if btrfs_root_subvolume: + kernel_params.append("rootflags=subvol=" + btrfs_root_subvolume) + + # zfs needs to be told the location of the root dataset + if is_zfs_root(partition): + zfs_root_path = get_zfs_root() + if zfs_root_path is not None: + kernel_params.append("root=ZFS=" + zfs_root_path) + else: + # Something is really broken if we get to this point + libcalamares.utils.warning("Internal error handling zfs dataset") + raise Exception("Internal zfs data missing, please contact your distribution") + + if cryptdevice_params: + kernel_params.extend(cryptdevice_params) + else: + kernel_params.append("root=UUID={!s}".format(uuid)) + + if swap_uuid: + kernel_params.append("resume=UUID={!s}".format(swap_uuid)) + + if use_systemd_naming and swap_outer_uuid: + kernel_params.append(f"rd.luks.uuid={swap_outer_uuid}") + + if swap_outer_mappername: + kernel_params.append(f"resume=/dev/mapper/{swap_outer_mappername}") + + if "nvidia" in gpu_drivers: + kernel_params.append("nvidia") + kernel_params.append("nvidia-drm.modeset=1") + kernel_params.append("nvidia-drm.fbdev=1") + kernel_params.append("nouveau.modeset=0") + # kernel_params.append("modprobe.blacklist=nouveau") + kernel_params.append("i915.modeset=1") + kernel_params.append("radeon.modeset=1") + elif "nouveau" in gpu_drivers: + kernel_params.append("nvidia") + kernel_params.append("nvidia-drm.modeset=1") + kernel_params.append("nvidia-drm.fbdev=1") + kernel_params.append("nouveau.modeset=0") + # kernel_params.append("modprobe.blacklist=nouveau") + kernel_params.append("i915.modeset=1") + kernel_params.append("radeon.modeset=1") + + return kernel_params + + +def create_systemd_boot_conf(installation_root_path, efi_dir, uuid, kernel, kernel_version): + """ + Creates systemd-boot configuration files based on given parameters. + + :param installation_root_path: A string containing the absolute path to the root of the installation + :param efi_dir: A string containing the path to the efi dir relative to the root of the installation + :param uuid: A string containing the UUID of the root volume + :param kernel: A string containing the path to the kernel relative to the root of the installation + :param kernel_version: The kernel version string + """ + + # Get the kernel params and write them to /etc/kernel/cmdline + # This file is used by kernel-install + kernel_params = " ".join(get_kernel_params(uuid)) + kernel_cmdline_path = os.path.join(installation_root_path, "etc", "kernel") + os.makedirs(kernel_cmdline_path, exist_ok=True) + with open(os.path.join(kernel_cmdline_path, "cmdline"), "w") as cmdline_file: + cmdline_file.write(kernel_params) + + libcalamares.utils.debug(f"Configuring kernel version {kernel_version}") + + # get the machine-id + with open(os.path.join(installation_root_path, "etc", "machine-id"), 'r') as machineid_file: + machine_id = machineid_file.read().rstrip('\n') + + # Ensure the directory exists + machine_dir = os.path.join(installation_root_path + efi_dir, machine_id) + os.makedirs(machine_dir, exist_ok=True) + + # Call kernel-install for each kernel + libcalamares.utils.target_env_process_output(["kernel-install", + "add", + kernel_version, + os.path.join("/", kernel)]) + + +def create_loader(loader_path, installation_root_path): + """ + Writes configuration for loader. + + :param loader_path: The absolute path to the loader.conf file + :param installation_root_path: The path to the root of the target installation + """ + + # get the machine-id + with open(os.path.join(installation_root_path, "etc", "machine-id"), 'r') as machineid_file: + machine_id = machineid_file.read().rstrip('\n') + + try: + loader_entries = libcalamares.job.configuration["loaderEntries"] + except KeyError: + libcalamares.utils.debug("No aditional loader entries found in config") + loader_entries = [] + pass + + lines = [f"default {machine_id}*"] + + lines.extend(loader_entries) + + with open(loader_path, 'w') as loader_file: + for line in lines: + loader_file.write(line + "\n") + + +class SuffixIterator(object): + """ + Wrapper for one of the "generator" classes below to behave like + a proper Python iterator. The iterator is initialized with a + maximum number of attempts to generate a new suffix. + """ + + def __init__(self, attempts, generator): + self.generator = generator + self.attempts = attempts + self.counter = 0 + + def __iter__(self): + return self + + def __next__(self): + self.counter += 1 + if self.counter <= self.attempts: + return self.generator.next() + raise StopIteration + + +class serialEfi(object): + """ + EFI Id generator that appends a serial number to the given name. + """ + + def __init__(self, name): + self.name = name + # So the first call to next() will bump it to 0 + self.counter = -1 + + def next(self): + self.counter += 1 + if self.counter > 0: + return "{!s}{!s}".format(self.name, self.counter) + else: + return self.name + + +def render_in_base(value, base_values, length=-1): + """ + Renders @p value in base-N, where N is the number of + items in @p base_values. When rendering, use the items + of @p base_values (e.g. use "0123456789" to get regular decimal + rendering, or "ABCDEFGHIJ" for letters-as-numbers 'encoding'). + + If length is positive, pads out to at least that long with + leading "zeroes", whatever base_values[0] is. + """ + if value < 0: + raise ValueError("Cannot render negative values") + if len(base_values) < 2: + raise ValueError("Insufficient items for base-N rendering") + if length < 1: + length = 1 + digits = [] + base = len(base_values) + while value > 0: + place = value % base + value = value // base + digits.append(base_values[place]) + while len(digits) < length: + digits.append(base_values[0]) + return "".join(reversed(digits)) + + +class randomEfi(object): + """ + EFI Id generator that appends a random 4-digit hex number to the given name. + """ + + def __init__(self, name): + self.name = name + # So the first call to next() will bump it to 0 + self.counter = -1 + + def next(self): + self.counter += 1 + if self.counter > 0: + import random + v = random.randint(0, 65535) # 16 bits + return "{!s}{!s}".format(self.name, render_in_base(v, "0123456789ABCDEF", 4)) + else: + return self.name + + +class phraseEfi(object): + """ + EFI Id generator that appends a random phrase to the given name. + """ + words = ("Sun", "Moon", "Mars", "Soyuz", "Falcon", "Kuaizhou", "Gaganyaan") + + def __init__(self, name): + self.name = name + # So the first call to next() will bump it to 0 + self.counter = -1 + + def next(self): + self.counter += 1 + if self.counter > 0: + import random + desired_length = 1 + self.counter // 5 + v = random.randint(0, len(self.words) ** desired_length) + return "{!s}{!s}".format(self.name, render_in_base(v, self.words)) + else: + return self.name + + +def get_efi_suffix_generator(name): + """ + Handle EFI bootloader Ids with ${} for suffix-processing. + """ + if "${" not in name: + raise ValueError("Misplaced call to get_efi_suffix_generator, no ${}") + if not name.endswith("}"): + raise ValueError("Misplaced call to get_efi_suffix_generator, no trailing ${}") + if name.count("${") > 1: + raise ValueError("EFI ID {!r} contains multiple generators".format(name)) + import re + prefix, generator_name = re.match("(.*)\${([^}]*)}$", name).groups() + if generator_name not in ("SERIAL", "RANDOM", "PHRASE"): + raise ValueError("EFI suffix {!r} is unknown".format(generator_name)) + + generator = None + if generator_name == "SERIAL": + generator = serialEfi(prefix) + elif generator_name == "RANDOM": + generator = randomEfi(prefix) + elif generator_name == "PHRASE": + generator = phraseEfi(prefix) + if generator is None: + raise ValueError("EFI suffix {!r} is unsupported".format(generator_name)) + + return generator + + +def change_efi_suffix(efi_directory, bootloader_id): + """ + Returns a label based on @p bootloader_id that is usable within + @p efi_directory. If there is a ${} suffix marker + in the given id, tries to generate a unique label. + """ + if bootloader_id.endswith("}") and "${" in bootloader_id: + # Do 10 attempts with any suffix generator + g = SuffixIterator(10, get_efi_suffix_generator(bootloader_id)) + else: + # Just one attempt + g = [bootloader_id] + + for candidate_name in g: + if not os.path.exists(os.path.join(efi_directory, candidate_name)): + return candidate_name + return bootloader_id + + +def efi_label(efi_directory): + """ + Returns a sanitized label, possibly unique, that can be + used within @p efi_directory. + """ + if "efiBootloaderId" in libcalamares.job.configuration: + efi_bootloader_id = change_efi_suffix(efi_directory, libcalamares.job.configuration["efiBootloaderId"]) + else: + branding = libcalamares.globalstorage.value("branding") + efi_bootloader_id = branding["bootloaderEntryName"] + + return efi_bootloader_id.translate(file_name_sanitizer) + + +def efi_word_size(): + # get bitness of the underlying UEFI + try: + sysfile = open("/sys/firmware/efi/fw_platform_size", "r") + efi_bitness = sysfile.read(2) + except Exception: + # if the kernel is older than 4.0, the UEFI bitness likely isn't + # exposed to the userspace so we assume a 64 bit UEFI here + efi_bitness = "64" + return efi_bitness + + +def efi_boot_next(): + """ + Tell EFI to definitely boot into the just-installed + system next time. + """ + boot_mgr = libcalamares.job.configuration["efiBootMgr"] + boot_entry = None + efi_bootvars = subprocess.check_output([boot_mgr], universal_newlines=True) + for line in efi_bootvars.split('\n'): + if not line: + continue + words = line.split() + if len(words) >= 2 and words[0] == "BootOrder:": + boot_entry = words[1].split(',')[0] + break + if boot_entry: + subprocess.call([boot_mgr, "-n", boot_entry]) + + +def get_kernels(installation_root_path): + """ + Gets a list of kernels and associated values for each kernel. This will work as is for many distros. + If not, it should be safe to modify it to better support your distro + + :param installation_root_path: A string with the absolute path to the root of the installation + + Returns a list of 3-tuples + + Each 3-tuple contains the kernel, kernel_type and kernel_version + """ + try: + kernel_search_path = libcalamares.job.configuration["kernelSearchPath"] + except KeyError: + libcalamares.utils.warning("No kernel pattern found in configuration, using '/usr/lib/modules'") + kernel_search_path = "/usr/lib/modules" + pass + + kernel_list = [] + + try: + kernel_pattern = libcalamares.job.configuration["kernelPattern"] + except KeyError: + libcalamares.utils.warning("No kernel pattern found in configuration, using 'vmlinuz'") + kernel_pattern = "vmlinuz" + pass + + # find all the installed kernels + for root, dirs, files in os.walk(os.path.join(installation_root_path, kernel_search_path.lstrip('/'))): + for file in files: + if re.search(kernel_pattern, file): + rel_root = os.path.relpath(root, installation_root_path) + kernel_list.append((os.path.join(rel_root, file), "default", os.path.basename(root))) + + return kernel_list + + +def install_clr_boot_manager(): + """ + Installs clr-boot-manager as the bootloader for EFI systems + """ + libcalamares.utils.debug("Bootloader: clr-boot-manager") + + installation_root_path = libcalamares.globalstorage.value("rootMountPoint") + kernel_config_path = os.path.join(installation_root_path, "etc", "kernel") + os.makedirs(kernel_config_path, exist_ok=True) + cmdline_path = os.path.join(kernel_config_path, "cmdline") + + # Get the kernel params + uuid = get_uuid() + kernel_params = " ".join(get_kernel_params(uuid)) + + # Write out the cmdline file for clr-boot-manager + with open(cmdline_path, "w") as cmdline_file: + cmdline_file.write(kernel_params) + + check_target_env_call(["clr-boot-manager", "update"]) + + +def install_systemd_boot(efi_directory): + """ + Installs systemd-boot as bootloader for EFI setups. + + :param efi_directory: + """ + libcalamares.utils.debug("Bootloader: systemd-boot") + installation_root_path = libcalamares.globalstorage.value("rootMountPoint") + install_efi_directory = installation_root_path + efi_directory + uuid = get_uuid() + loader_path = os.path.join(install_efi_directory, + "loader", + "loader.conf") + subprocess.call(["bootctl", + "--path={!s}".format(install_efi_directory), + "install"]) + + for (kernel, kernel_type, kernel_version) in get_kernels(installation_root_path): + create_systemd_boot_conf(installation_root_path, + efi_directory, + uuid, + kernel, + kernel_version) + + create_loader(loader_path, installation_root_path) + + +def get_grub_efi_parameters(): + """ + Returns a 3-tuple of suitable parameters for GRUB EFI installation, + depending on the host machine architecture. The return is + - target name + - grub.efi name + - boot.efi name + all three are strings. May return None if there is no suitable + set for the current machine. May return unsuitable values if the + host architecture is unknown (e.g. defaults to x86_64). + """ + import platform + efi_bitness = efi_word_size() + cpu_type = platform.machine() + + if efi_bitness == "32": + # Assume all 32-bitters are legacy x86 + return "i386-efi", "grubia32.efi", "bootia32.efi" + elif efi_bitness == "64" and cpu_type == "aarch64": + return "arm64-efi", "grubaa64.efi", "bootaa64.efi" + elif efi_bitness == "64" and cpu_type == "loongarch64": + return "loongarch64-efi", "grubloongarch64.efi", "bootloongarch64.efi" + elif efi_bitness == "64": + # If it's not ARM, must by AMD64 + return "x86_64-efi", "grubx64.efi", "bootx64.efi" + libcalamares.utils.warning( + "Could not find GRUB parameters for bits {b} and cpu {c}".format(b=repr(efi_bitness), c=repr(cpu_type))) + return None + + +def run_grub_mkconfig(partitions, output_file): + """ + Runs grub-mkconfig in the target environment + + :param partitions: The partitions list from global storage + :param output_file: A string containing the path to the generating grub config file + :return: + """ + + # zfs needs an environment variable set for grub-mkconfig + if any([is_zfs_root(partition) for partition in partitions]): + check_target_env_call(["sh", "-c", "ZPOOL_VDEV_NAME_PATH=1 " + + libcalamares.job.configuration["grubMkconfig"] + " -o " + output_file]) + else: + # The input file /etc/default/grub should already be filled out by the + # grubcfg job module. + check_target_env_call([libcalamares.job.configuration["grubMkconfig"], "-o", output_file]) + + +def run_grub_install(fw_type, partitions, efi_directory): + """ + Runs grub-install in the target environment + + :param fw_type: A string which is "efi" for UEFI installs. Any other value results in a BIOS install + :param partitions: The partitions list from global storage + :param efi_directory: The path of the efi directory relative to the root of the install + :return: + """ + + is_zfs = any([is_zfs_root(partition) for partition in partitions]) + + # zfs needs an environment variable set for grub + if is_zfs: + check_target_env_call(["sh", "-c", "echo ZPOOL_VDEV_NAME_PATH=1 >> /etc/environment"]) + + if fw_type == "efi": + assert efi_directory is not None + efi_bootloader_id = efi_label(efi_directory) + efi_target, efi_grub_file, efi_boot_file = get_grub_efi_parameters() + + if is_zfs: + check_target_env_call(["sh", "-c", "ZPOOL_VDEV_NAME_PATH=1 " + libcalamares.job.configuration["grubInstall"] + + " --target=" + efi_target + " --efi-directory=" + efi_directory + + " --bootloader-id=" + efi_bootloader_id + " --force"]) + else: + check_target_env_call([libcalamares.job.configuration["grubInstall"], + "--target=" + efi_target, + "--efi-directory=" + efi_directory, + "--bootloader-id=" + efi_bootloader_id, + "--force"]) + else: + assert efi_directory is None + if libcalamares.globalstorage.value("bootLoader") is None: + return + + boot_loader = libcalamares.globalstorage.value("bootLoader") + if boot_loader["installPath"] is None: + return + + if is_zfs: + check_target_env_call(["sh", "-c", "ZPOOL_VDEV_NAME_PATH=1 " + + libcalamares.job.configuration["grubInstall"] + + " --target=i386-pc --recheck --force " + + boot_loader["installPath"]]) + else: + check_target_env_call([libcalamares.job.configuration["grubInstall"], + "--target=i386-pc", + "--recheck", + "--force", + boot_loader["installPath"]]) + + +def install_grub(efi_directory, fw_type): + """ + Installs grub as bootloader, either in pc or efi mode. + + :param efi_directory: + :param fw_type: + """ + # get the partition from global storage + partitions = libcalamares.globalstorage.value("partitions") + if not partitions: + libcalamares.utils.warning(_("Failed to install grub, no partitions defined in global storage")) + return + + if fw_type == "efi": + libcalamares.utils.debug("Bootloader: grub (efi)") + installation_root_path = libcalamares.globalstorage.value("rootMountPoint") + install_efi_directory = installation_root_path + efi_directory + + if not os.path.isdir(install_efi_directory): + os.makedirs(install_efi_directory) + + efi_bootloader_id = efi_label(efi_directory) + + efi_target, efi_grub_file, efi_boot_file = get_grub_efi_parameters() + + run_grub_install(fw_type, partitions, efi_directory) + + # VFAT is weird, see issue CAL-385 + install_efi_directory_firmware = (vfat_correct_case( + install_efi_directory, + "EFI")) + if not os.path.exists(install_efi_directory_firmware): + os.makedirs(install_efi_directory_firmware) + + # there might be several values for the boot directory + # most usual they are boot, Boot, BOOT + + install_efi_boot_directory = (vfat_correct_case( + install_efi_directory_firmware, + "boot")) + if not os.path.exists(install_efi_boot_directory): + os.makedirs(install_efi_boot_directory) + + # Workaround for some UEFI firmwares + fallback = "installEFIFallback" + libcalamares.utils.debug("UEFI Fallback: " + str(libcalamares.job.configuration.get(fallback, ""))) + if libcalamares.job.configuration.get(fallback, True): + libcalamares.utils.debug(" .. installing '{!s}' fallback firmware".format(efi_boot_file)) + efi_file_source = os.path.join(install_efi_directory_firmware, + efi_bootloader_id, + efi_grub_file) + efi_file_target = os.path.join(install_efi_boot_directory, efi_boot_file) + + shutil.copy2(efi_file_source, efi_file_target) + else: + libcalamares.utils.debug("Bootloader: grub (bios)") + run_grub_install(fw_type, partitions, None) + + run_grub_mkconfig(partitions, libcalamares.job.configuration["grubCfg"]) + + +def install_secureboot(efi_directory): + """ + Installs the secureboot shim in the system by calling efibootmgr. + """ + efi_bootloader_id = efi_label(efi_directory) + + installation_root_path = libcalamares.globalstorage.value("rootMountPoint") + install_efi_directory = installation_root_path + efi_directory + + if efi_word_size() == "64": + install_efi_bin = "shimx64.efi" + elif efi_word_size() == "32": + install_efi_bin = "shimia32.efi" + else: + libcalamares.utils.warning(f"Unknown efi word size of {efi_word_size()} found") + return None + + # Copied, roughly, from openSUSE's install script, + # and pythonified. *disk* is something like /dev/sda, + # while *drive* may return "(disk/dev/sda,gpt1)" .. + # we're interested in the numbers in the second part + # of that tuple. + efi_drive = subprocess.check_output([ + libcalamares.job.configuration["grubProbe"], + "-t", "drive", "--device-map=", install_efi_directory]).decode("ascii") + efi_disk = subprocess.check_output([ + libcalamares.job.configuration["grubProbe"], + "-t", "disk", "--device-map=", install_efi_directory]).decode("ascii") + + efi_drive_partition = efi_drive.replace("(", "").replace(")", "").split(",")[1] + # Get the first run of digits from the partition + efi_partition_number = None + c = 0 + start = None + while c < len(efi_drive_partition): + if efi_drive_partition[c].isdigit() and start is None: + start = c + if not efi_drive_partition[c].isdigit() and start is not None: + efi_partition_number = efi_drive_partition[start:c] + break + c += 1 + if efi_partition_number is None: + raise ValueError("No partition number found for %s" % install_efi_directory) + + subprocess.call([ + libcalamares.job.configuration["efiBootMgr"], + "-c", + "-w", + "-L", efi_bootloader_id, + "-d", efi_disk, + "-p", efi_partition_number, + "-l", install_efi_directory + "/" + install_efi_bin]) + + efi_boot_next() + + # The input file /etc/default/grub should already be filled out by the + # grubcfg job module. + check_target_env_call([libcalamares.job.configuration["grubMkconfig"], + "-o", os.path.join(efi_directory, "EFI", + efi_bootloader_id, "grub.cfg")]) + + +def vfat_correct_case(parent, name): + for candidate in os.listdir(parent): + if name.lower() == candidate.lower(): + return os.path.join(parent, candidate) + return os.path.join(parent, name) + + +def efi_partitions(efi_boot_path): + """ + The (one) partition mounted on @p efi_boot_path, or an empty list. + """ + return [p for p in libcalamares.globalstorage.value("partitions") if p["mountPoint"] == efi_boot_path] + + +def update_refind_config(efi_directory, installation_root_path): + """ + :param efi_directory: The path to the efi directory relative to the root + :param installation_root_path: The path to the root of the installation + """ + try: + kernel_list = libcalamares.job.configuration["refindKernelList"] + except KeyError: + libcalamares.utils.warning('refindKernelList not set. Skipping updating refind.conf') + return + + # Update the config in the file + for line in fileinput.input(installation_root_path + efi_directory + "/EFI/refind/refind.conf", inplace=True): + line = line.strip() + if line.startswith("#extra_kernel_version_strings") or line.startswith("extra_kernel_version_strings"): + line = line.lstrip("#") + for kernel in kernel_list: + if kernel not in line: + line += "," + kernel + print(line) + + +def install_refind(efi_directory): + try: + installation_root_path = libcalamares.globalstorage.value("rootMountPoint") + except KeyError: + libcalamares.utils.warning('Global storage value "rootMountPoint" missing') + + install_efi_directory = installation_root_path + efi_directory + uuid = get_uuid() + kernel_params = " ".join(get_kernel_params(uuid)) + conf_path = os.path.join(installation_root_path, "boot/refind_linux.conf") + + libcalamares.utils.host_env_process_output(["refind-install", "--root", installation_root_path]) + libcalamares.utils.host_env_process_output(["refind-install", "--alldrivers", "--yes"]) + + with open(conf_path, "r") as refind_file: + filedata = [x.strip() for x in refind_file.readlines()] + + with open(conf_path, 'w') as refind_file: + for line in filedata: + if line.startswith('"Boot with standard options"'): + line = f'"Boot with standard options" "{kernel_params}"' + elif line.startswith('"Boot to single-user mode"'): + line = f'"Boot to single-user mode" "{kernel_params}" single' + refind_file.write(line + "\n") + + update_refind_config(efi_directory, installation_root_path) + + + libcalamares.utils.debug("Bootloader: rEFInd") + + # Get the kernel params and write them to /etc/kernel/cmdline + # This file is used by dracut-ukify and dracut-initramfs + + # installation_root_path = libcalamares.globalstorage.value("rootMountPoint") + kernel_cmdline_path = os.path.join(installation_root_path, "etc", "kernel") + os.makedirs(kernel_cmdline_path, exist_ok=True) + cmdline_path = os.path.join(kernel_cmdline_path, "cmdline") + + # Get the kernel params + # uuid = get_uuid() + # kernel_params = " ".join(get_kernel_params(uuid)) + + # Write out the cmdline file for rEFInd + with open(cmdline_path, "w") as cmdline_file: + cmdline_file.write(kernel_params) + + +def prepare_bootloader(fw_type): + """ + Prepares bootloader. + Based on value 'efi_boot_loader', it either calls systemd-boot + or grub to be installed. + + :param fw_type: + :return: + """ + + # Get the boot loader selection from global storage if it is set in the config file + try: + gs_name = libcalamares.job.configuration["efiBootLoaderVar"] + if libcalamares.globalstorage.contains(gs_name): + efi_boot_loader = libcalamares.globalstorage.value(gs_name) + else: + libcalamares.utils.warning( + f"Specified global storage value not found in global storage") + return None + except KeyError: + # If the conf value for using global storage is not set, use the setting from the config file. + try: + efi_boot_loader = libcalamares.job.configuration["efiBootLoader"] + except KeyError: + if fw_type == "efi": + libcalamares.utils.warning("Configuration missing both efiBootLoader and efiBootLoaderVar on an EFI " + "system, bootloader not installed") + return + else: + pass + + # If the user has selected not to install bootloader, bail out here + if efi_boot_loader.casefold() == "none": + libcalamares.utils.debug("Skipping bootloader installation since no bootloader was selected") + return None + + efi_directory = libcalamares.globalstorage.value("efiSystemPartition") + + if efi_boot_loader == "clr-boot-manager": + if fw_type != "efi": + # Grub has to be installed first on non-EFI systems + install_grub(efi_directory, fw_type) + install_clr_boot_manager() + elif efi_boot_loader == "systemd-boot" and fw_type == "efi": + install_systemd_boot(efi_directory) + elif efi_boot_loader == "sb-shim" and fw_type == "efi": + install_secureboot(efi_directory) + elif efi_boot_loader == "refind" and fw_type == "efi": + install_refind(efi_directory) + elif efi_boot_loader == "grub" or fw_type != "efi": + install_grub(efi_directory, fw_type) + else: + libcalamares.utils.debug("WARNING: the combination of " + "boot-loader '{!s}' and firmware '{!s}' " + "is not supported.".format(efi_boot_loader, fw_type)) + + +def run(): + """ + Starts procedure and passes 'fw_type' to other routine. + + :return: + """ + + fw_type = libcalamares.globalstorage.value("firmwareType") + + if libcalamares.globalstorage.value("bootLoader") is None and fw_type != "efi": + libcalamares.utils.warning("Non-EFI system, and no bootloader is set.") + return None + + partitions = libcalamares.globalstorage.value("partitions") + if fw_type == "efi": + efi_system_partition = libcalamares.globalstorage.value("efiSystemPartition") + esp_found = [p for p in partitions if p["mountPoint"] == efi_system_partition] + if not esp_found: + libcalamares.utils.warning("EFI system, but nothing mounted on {!s}".format(efi_system_partition)) + return None + + try: + prepare_bootloader(fw_type) + except subprocess.CalledProcessError as e: + libcalamares.utils.warning(str(e)) + libcalamares.utils.debug("stdout:" + str(e.stdout)) + libcalamares.utils.debug("stderr:" + str(e.stderr)) + return (_("Bootloader installation error"), + _("The bootloader could not be installed. The installation command
{!s}
returned error " + "code {!s}.") + .format(e.cmd, e.returncode)) + + return None diff --git a/src/modules/eos_bootloader/eos_bootloader.conf b/src/modules/eos_bootloader/eos_bootloader.conf new file mode 100644 index 0000000..d38718c --- /dev/null +++ b/src/modules/eos_bootloader/eos_bootloader.conf @@ -0,0 +1,39 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# +### eos_bootloader Module +# +# This module performs the initial config for the chosen bootloader. It does not install the bootloader, +# that is left to the bootloader module. This module is intended to run before that installing any needed packages +# and preparing the bootloader module to be run +# + +# +# The variable to be evaluated from globalstorage +gsName: packagechooser_packagechooserq + +# +# If this config is to be used for offline installs +# offline: true + +# The location on the ISO of the packages +packageLocation: /usr/share/packages + +# A list of bootloaders and the packages to install for each +bootloader: + - name: grub + packages: [ grub, grub-dracut, os-prober ] + - name: systemd-boot + packages: [ systemd-boot-dracut ] + - name: refind + packages: [ refind, melawy-dracut-initramfs, melawy-dracut-ukify, melawy-refind-menu-generator, melawy-refind-theme-nier-a2 ] + - name: none + packages: [ grub-dracut ] + +#bootloader: +# - name: grub +# - packages: [ grub, dracut-hook ] +# - name: systemd-boot +# - packages: [ kernel-install-for-dracut ] +# - name: refind +# - packages: [ refind, dracut-hook ] diff --git a/src/modules/eos_bootloader/eos_bootloader.schema.yaml b/src/modules/eos_bootloader/eos_bootloader.schema.yaml new file mode 100644 index 0000000..5517573 --- /dev/null +++ b/src/modules/eos_bootloader/eos_bootloader.schema.yaml @@ -0,0 +1,18 @@ +--- +$schema: https://json-schema.org/schema# +$id: https://calamares.io/schemas/eos_script +additionalProperties: false +type: object +properties: + gsName: { type: string } + packageLocation: { type: string } + bootloader: + type: array + items: + type: object + additionalProperties: false + properties: + name: { type: string } + packages: { type: array } + required: [ name, packages ] + required: [ gsName, packageLocation, bootloader ] \ No newline at end of file diff --git a/src/modules/eos_bootloader/eos_bootloader_offline.conf b/src/modules/eos_bootloader/eos_bootloader_offline.conf new file mode 100644 index 0000000..db06670 --- /dev/null +++ b/src/modules/eos_bootloader/eos_bootloader_offline.conf @@ -0,0 +1,41 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# +### eos_bootloader Module +# +# This module performs the initial config for the chosen bootloader. It does not install the bootloader, +# that is left to the bootloader module. This module is intended to run before that installing any needed packages +# and preparing the bootloader module to be run + + +# The variable to be evaluated from globalstorage + +gsName: packagechooser_packagechooserq + +# If this config is to be used for offline installs + +offline: true + +# The location on the ISO of the packages + +packageLocation: /usr/share/packages + +# A list of bootloaders and the packages to install for each + +bootloader: + - name: grub + packages: [ grub, grub-dracut, os-prober ] + - name: systemd-boot + packages: [ systemd-boot-dracut ] + - name: refind + packages: [ refind, melawy-dracut-initramfs, melawy-dracut-ukify, melawy-refind-menu-generator, melawy-refind-theme-nier-a2 ] + - name: none + packages: [ grub-dracut ] + +#bootloader: +# - name: grub +# - packages: [ grub, dracut-hook ] +# - name: systemd-boot +# - packages: [ kernel-install-for-dracut ] +# - name: refind +# - packages: [ refind, dracut-hook ] diff --git a/src/modules/eos_bootloader/main.py b/src/modules/eos_bootloader/main.py new file mode 100755 index 0000000..fd81fe2 --- /dev/null +++ b/src/modules/eos_bootloader/main.py @@ -0,0 +1,170 @@ +#!/usr/bin/env python3 + +import os +import subprocess +import shutil + +import libcalamares +from libcalamares.utils import gettext_path, gettext_languages + +import gettext + +_translation = gettext.translation("calamares-python", + localedir=gettext_path(), + languages=gettext_languages(), + fallback=True) +_ = _translation.gettext +_n = _translation.ngettext + +custom_status_message = None +name = "Prepare for bootloader" +user_output = False + + +def pretty_name(): + return _(name) + + +def pretty_status_message(): + if custom_status_message is not None: + return custom_status_message + + +def is_resume_needed(): + partitions = libcalamares.globalstorage.value("partitions") + for partition in partitions: + if partition["fs"] == "linuxswap": + return True + + return False + + +def get_local_packages(packages): + try: + package_location = libcalamares.job.configuration["packageLocation"] + except KeyError: + return "Configuration Error", "No package location defined in config" + + if not os.path.exists(package_location): + return ("Package location missing", + f"{package_location} is not currently available") + + try: + installation_root_path = libcalamares.globalstorage.value("rootMountPoint") + except KeyError: + libcalamares.utils.warning('Global storage value "rootMountPoint" missing') + + package_files = [] + for root, dirs, files in os.walk(os.path.join(installation_root_path, package_location.lstrip('/'))): + for file in files: + for package in packages: + # for other package archive + if (file.startswith(package + "-") and "pkg.tar" in file and ".sig" not in file): + package_files.append(os.path.join(package_location, file)) + + # to avoid pacman error - duplicate target by (file.startswith(package + "-")) + package_files = set(package_files) + # to return list (for future checking data type) + package_files = list(package_files) + + return package_files + + +def run_dracut(installation_root_path): + kernel_search_path = "/usr/lib/modules" + + # find all the installed kernels and run dracut + for root, dirs, files in os.walk(os.path.join(installation_root_path, kernel_search_path.lstrip('/'))): + for file in files: + if file == "pkgbase": + kernel_version = os.path.basename(root) + # run dracut + pkgbase_location = os.path.join(root, file) + with open(pkgbase_location, 'r') as pkgbase_file: + kernel_suffix = pkgbase_file.read().rstrip() + try: + libcalamares.utils.target_env_process_output(["dracut", "--force", "--hostonly", "--no-hostonly-cmdline", f"/boot/initramfs-{kernel_suffix}.img", kernel_version]) + libcalamares.utils.target_env_process_output(["dracut", "--force", "--no-hostonly", f"/boot/initramfs-{kernel_suffix}-fallback.img", kernel_version]) + except subprocess.CalledProcessError as cpe: + libcalamares.utils.warning(f"dracut failed with error: {cpe.stderr}") + + kernel_name = f"vmlinuz-{kernel_suffix}" + # copy kernel to boot + shutil.copy2(os.path.join(root, "vmlinuz"), os.path.join(installation_root_path, "boot", kernel_name)) + + +def run(): + if not libcalamares.job.configuration: + return "No configuration found", "Aborting due to missing configuration" + + try: + gs_name = libcalamares.job.configuration["gsName"] + except KeyError: + return "Missing global storage value", "gsname not found in configuration file" + + try: + offline = libcalamares.job.configuration["offline"] + except KeyError: + offline = False + pass + + bootloaders = libcalamares.job.configuration.get("bootloader", []) + + if libcalamares.globalstorage.contains(gs_name): + bootloader_name = libcalamares.globalstorage.value(gs_name) + else: + return f"Key missing", f"Failed to find {gs_name} in global storage" + + try: + installation_root_path = libcalamares.globalstorage.value("rootMountPoint") + except KeyError: + libcalamares.utils.warning('Global storage value "rootMountPoint" missing') + + packages = None + + for bootloader in bootloaders: + try: + if bootloader["name"].casefold() == bootloader_name.casefold(): + packages = bootloader["packages"] + except KeyError: + return f"Configuration error", f"Missing key 'name' in configuration" + + # remove mkinitcpio + try: + libcalamares.utils.target_env_process_output(["pacman", "--noconfirm", "-Rcn", "mkinitcpio"]) + except subprocess.CalledProcessError: + # If it isn't installed, don't trigger an error + pass + + # Add the resume module for dracut + if is_resume_needed(): + dracut_file_path = os.path.join(installation_root_path , "etc/dracut.conf.d/resume.conf") + resume_line = 'add_dracutmodules+=" resume "' + with open(dracut_file_path, 'w') as dracut_resume: + dracut_resume.write(resume_line + "\n") + + # install packages + if offline: + package_files = get_local_packages(packages) + if package_files is not None: + try: + libcalamares.utils.target_env_process_output(["pacman", "--noconfirm", "--needed", "-U"] + package_files) + except subprocess.CalledProcessError as cpe: + return f"Failed to install packages for {bootloader_name}", f"The install failed with error: {cpe.stderr}" + else: + if packages is not None: + try: + libcalamares.utils.target_env_process_output(["pacman", "--noconfirm", "--needed", "-S"] + packages) + except subprocess.CalledProcessError as cpe: + package_files = get_local_packages(packages) + if package_files is not None: + try: + libcalamares.utils.target_env_process_output(["pacman", "--noconfirm", "--needed", "-U"] + package_files) + except subprocess.CalledProcessError as cpe: + return f"Failed to install packages for {bootloader_name}", f"The install failed with error: {cpe.stderr}" + + # Run dracut unless we are using systemd-boot since kernel-install handles that + if bootloader_name.casefold().strip() != "systemd-boot": + run_dracut(installation_root_path) + + return None diff --git a/src/modules/eos_bootloader/module.desc b/src/modules/eos_bootloader/module.desc new file mode 100644 index 0000000..da0d622 --- /dev/null +++ b/src/modules/eos_bootloader/module.desc @@ -0,0 +1,7 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +--- +type: "job" +name: "eos_bootloader" +interface: "python" +script: "main.py" diff --git a/src/modules/grubcfg/grubcfg.conf b/src/modules/grubcfg/grubcfg.conf new file mode 100644 index 0000000..a422a7a --- /dev/null +++ b/src/modules/grubcfg/grubcfg.conf @@ -0,0 +1,67 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# +# Create, overwrite or update /etc/default/grub in the target system. +# +# Write lines to /etc/default/grub (in the target system) based +# on calculated values and the values set in the *defaults* key +# in this configuration file. +# +# Calculated values are: +# - GRUB_DISTRIBUTOR, branding module, *bootloaderEntryName* (this +# string is sanitized, and see also setting *keep_distributor*) +# - GRUB_ENABLE_CRYPTODISK, based on the presence of filesystems +# that use LUKS +# - GRUB_CMDLINE_LINUX_DEFAULT, adding LUKS setup and plymouth +# support to the kernel. + +--- +# The variable to be evaluated from globalstorage that determines the selected bootloader +#gsName: packagechooser_bootloader + +gsName: packagechooser_packagechooserq + +# If set to true, always creates /etc/default/grub from scratch even if the file +# already existed. If set to false, edits the existing file instead. + +overwrite: false + +# If set to true, prefer to write files in /etc/default/grub.d/ +# rather than the single file /etc/default/grub. If this is set, +# Calamares will write /etc/default/grub.d/00Calamares instead. + +prefer_grub_d: false + +# If set to true, an **existing** setting for GRUB_DISTRIBUTOR is +# kept, not updated to the *bootloaderEntryName* from the branding file. +# Use this if the GRUB_DISTRIBUTOR setting in the file is "smart" in +# some way (e.g. uses shell-command substitution). + +keep_distributor: false + +# The default kernel params that should always be applied. +# This is an array of strings. If it is unset, the default is +# `["quiet"]`. To avoid the default, explicitly set this key +# to an empty list, `[]`. + +kernel_params: [ "nvme_load=YES","nowatchdog","zswap.enabled=0","page_alloc.shuffle=1","threadirqs","split_lock_detect=off","pci=pcie_bus_perf","add_efi_memmap","quiet" ] + +# Default entries to write to /etc/default/grub if it does not exist yet or if +# we are overwriting it. +# + +defaults: + GRUB_TIMEOUT: 5 + GRUB_TIMEOUT_STYLE: 'countdown' + GRUB_DEFAULT: "saved" + GRUB_SAVEDEFAULT: true + GRUB_DISABLE_SUBMENU: false + GRUB_DISABLE_RECOVERY: true + GRUB_TERMINAL_OUTPUT: "gfxterm" + GRUB_BACKGROUND: "/usr/share/melawy-linux/splash.png" + GRUB_GFXMODE: auto + GRUB_GFXPAYLOAD_LINUX: keep + +# Set to true to force defaults to be used even when not overwriting +always_use_defaults: true + diff --git a/src/modules/grubcfg/grubcfg.schema.yaml b/src/modules/grubcfg/grubcfg.schema.yaml new file mode 100644 index 0000000..50e5f9e --- /dev/null +++ b/src/modules/grubcfg/grubcfg.schema.yaml @@ -0,0 +1,24 @@ +# SPDX-FileCopyrightText: 2020 Adriaan de Groot +# SPDX-License-Identifier: GPL-3.0-or-later +--- +$schema: https://json-schema.org/schema# +$id: https://calamares.io/schemas/grubcfg +additionalProperties: false +type: object +properties: + gsName: { type: string } + overwrite: { type: boolean, default: false } + keep_distributor: { type: boolean, default: false } + prefer_grub_d: { type: boolean, default: false } + kernel_params: { type: array, items: { type: string } } + defaults: + type: object + additionalProperties: true # Other fields are acceptable + properties: + GRUB_TIMEOUT: { type: integer } + GRUB_DEFAULT: { type: string } + GRUB_DISABLE_SUBMENU: { type: boolean, default: true } + GRUB_TERMINAL_OUTPUT: { type: string } + GRUB_DISABLE_RECOVERY: { type: boolean, default: true } + required: [ GRUB_TIMEOUT, GRUB_DEFAULT ] + always_use_defaults: { type: boolean, default: false } diff --git a/src/modules/grubcfg/main.py b/src/modules/grubcfg/main.py new file mode 100755 index 0000000..b611650 --- /dev/null +++ b/src/modules/grubcfg/main.py @@ -0,0 +1,381 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- +# +# === This file is part of Calamares - === +# +# SPDX-FileCopyrightText: 2014-2015 Philip Müller +# SPDX-FileCopyrightText: 2015-2017 Teo Mrnjavac +# SPDX-FileCopyrightText: 2017 Alf Gaida +# SPDX-FileCopyrightText: 2017 2019, Adriaan de Groot +# SPDX-FileCopyrightText: 2017-2018 Gabriel Craciunescu +# SPDX-License-Identifier: GPL-3.0-or-later +# +# Calamares is Free Software: see the License-Identifier above. +# + +import libcalamares +import fileinput +import os +import re +import shutil +import subprocess + +from libcalamares.utils import check_target_env_call + +import gettext +_ = gettext.translation("calamares-python", + localedir=libcalamares.utils.gettext_path(), + languages=libcalamares.utils.gettext_languages(), + fallback=True).gettext + + +def have_program_in_target(program : str): + """Returns @c True if @p program is in path in the target""" + return libcalamares.utils.target_env_call(["/usr/bin/which", program]) == 0 + + +def pretty_name(): + return _("Configure GRUB.") + + +def get_grub_config_path(root_mount_point): + """ + Figures out where to put the grub config files. Returns + a the full path of a file inside that + directory, as "the config file". + + Returns a path into @p root_mount_point. + """ + default_dir = os.path.join(root_mount_point, "etc/default") + default_config_file = "grub" + + if "prefer_grub_d" in libcalamares.job.configuration and libcalamares.job.configuration["prefer_grub_d"]: + possible_dir = os.path.join(root_mount_point, "etc/default/grub.d") + if os.path.exists(possible_dir) and os.path.isdir(possible_dir): + default_dir = possible_dir + default_config_file = "00calamares" + + if not os.path.exists(default_dir): + try: + os.mkdir(default_dir) + except Exception as error: + # exception as error is still redundant, but it print out the error + # identify a solution for each exception and + # if possible and code it within. + libcalamares.utils.debug(f"Failed to create {default_dir}") + libcalamares.utils.debug(f"{error}") + raise + + return os.path.join(default_dir, default_config_file) + + +def get_zfs_root(): + """ + Looks in global storage to find the zfs root + + :return: A string containing the path to the zfs root or None if it is not found + """ + + zfs = libcalamares.globalstorage.value("zfsDatasets") + + if not zfs: + libcalamares.utils.warning("Failed to locate zfs dataset list") + return None + + # Find the root dataset + for dataset in zfs: + try: + if dataset["mountpoint"] == "/": + return dataset["zpool"] + "/" + dataset["dsName"] + except KeyError: + # This should be impossible + libcalamares.utils.warning("Internal error handling zfs dataset") + raise + + return None + + +def update_existing_config(default_grub, grub_config_items): + """ + Updates the existing grub configuration file with any items present in @p grub_config_items + + Items that exist in the file will be updated and new items will be appended to the end + + :param default_grub: The absolute path to the grub config file + :param grub_config_items: A dict holding the key value pairs representing the items + """ + + default_grub_orig = default_grub + ".calamares" + shutil.move(default_grub, default_grub_orig) + + with open(default_grub, "w") as grub_file: + with open(default_grub_orig, "r") as grub_orig_file: + for line in grub_orig_file.readlines(): + line = line.strip() + if "=" in line: + # This may be a key, strip the leading comment if it has one + key = line.lstrip("#").split("=")[0].strip() + + # check if this is one of the keys we care about + if key in grub_config_items.keys(): + print(f"{key}={grub_config_items[key]}", file=grub_file) + del grub_config_items[key] + else: + print(line, file=grub_file) + else: + print(line, file=grub_file) + + if len(grub_config_items) != 0: + for dict_key, dict_val in grub_config_items.items(): + print(f"{dict_key}={dict_val}", file=grub_file) + + os.remove(default_grub_orig) + + +def modify_grub_default(partitions, root_mount_point, distributor): + """ + Configures '/etc/default/grub' for hibernation and plymouth. + + @see bootloader/main.py, for similar handling of kernel parameters + + :param partitions: + :param root_mount_point: + :param distributor: name of the distributor to fill in for + GRUB_DISTRIBUTOR. Must be a string. If the job setting + *keep_distributor* is set, then this is only used if no + GRUB_DISTRIBUTOR is found at all (otherwise, when *keep_distributor* + is set, the GRUB_DISTRIBUTOR lines are left unchanged). + If *keep_distributor* is unset or false, then GRUB_DISTRIBUTOR + is always updated to set this value. + :return: + """ + default_grub = get_grub_config_path(root_mount_point) + distributor = distributor.replace("'", "'\\''") + dracut_bin = libcalamares.utils.target_env_call( + ["sh", "-c", "which dracut"] + ) + plymouth_bin = libcalamares.utils.target_env_call( + ["sh", "-c", "which plymouth"] + ) + uses_systemd_hook = libcalamares.utils.target_env_call( + ["sh", "-c", "grep -q \"^HOOKS.*systemd\" /etc/mkinitcpio.conf"] + ) == 0 + + try: + gpu_drivers = libcalamares.globalstorage.value("gpuDrivers") + except KeyError: + pass + + # Shell exit value 0 means success + have_plymouth = plymouth_bin == 0 + use_systemd_naming = dracut_bin == 0 or uses_systemd_hook + + use_splash = "" + swap_uuid = "" + swap_outer_uuid = "" + swap_outer_mappername = None + no_save_default = False + unencrypted_separate_boot = any(p["mountPoint"] == "/boot" and "luksMapperName" not in p for p in partitions) + # If there is no dracut, and the root partition is ZFS, this gets set below + zfs_root_path = None + + for partition in partitions: + if partition["mountPoint"] in ("/", "/boot") and partition["fs"] in ("btrfs", "f2fs", "zfs"): + no_save_default = True + break + + if have_plymouth: + use_splash = "splash" + + cryptdevice_params = [] + + if use_systemd_naming: + for partition in partitions: + if partition["fs"] == "linuxswap" and not partition.get("claimed", None): + # Skip foreign swap + continue + has_luks = "luksMapperName" in partition + if partition["fs"] == "linuxswap" and not has_luks: + swap_uuid = partition["uuid"] + + if partition["fs"] == "linuxswap" and has_luks: + swap_outer_uuid = partition["luksUuid"] + swap_outer_mappername = partition["luksMapperName"] + + if partition["mountPoint"] == "/" and has_luks: + cryptdevice_params = [f"rd.luks.uuid={partition['luksUuid']}"] + if not unencrypted_separate_boot and uses_systemd_hook: + cryptdevice_params.append("rd.luks.key=/crypto_keyfile.bin") + else: + for partition in partitions: + if partition["fs"] == "linuxswap" and not partition.get("claimed", None): + # Skip foreign swap + continue + has_luks = "luksMapperName" in partition + if partition["fs"] == "linuxswap" and not has_luks: + swap_uuid = partition["uuid"] + + if partition["fs"] == "linuxswap" and has_luks: + swap_outer_mappername = partition["luksMapperName"] + + if partition["mountPoint"] == "/" and has_luks: + cryptdevice_params = [ + f"cryptdevice=UUID={partition['luksUuid']}:{partition['luksMapperName']}", + f"root=/dev/mapper/{partition['luksMapperName']}" + ] + + if partition["fs"] == "zfs" and partition["mountPoint"] == "/": + zfs_root_path = get_zfs_root() + + kernel_params = libcalamares.job.configuration.get("kernel_params", ["quiet"]) + if have_program_in_target("plymouth"): + kernel_params.append("splash") + kernel_params.append("bgrt_disable") + + # Currently, grub doesn't detect this properly so it must be set manually + if zfs_root_path: + kernel_params.insert(0, "zfs=" + zfs_root_path) + + if cryptdevice_params: + kernel_params.extend(cryptdevice_params) + + if use_splash: + kernel_params.append(use_splash) + + if swap_uuid: + kernel_params.append(f"resume=UUID={swap_uuid}") + + if use_systemd_naming and swap_outer_uuid: + kernel_params.append(f"rd.luks.uuid={swap_outer_uuid}") + if swap_outer_mappername: + kernel_params.append(f"resume=/dev/mapper/{swap_outer_mappername}") + + if "nvidia" in gpu_drivers: + kernel_params.append("nvidia") + kernel_params.append("nvidia-drm.modeset=1") + kernel_params.append("nvidia-drm.fbdev=1") + kernel_params.append("nouveau.modeset=0") + # kernel_params.append("modprobe.blacklist=nouveau") + kernel_params.append("i915.modeset=1") + kernel_params.append("radeon.modeset=1") + elif "nouveau" in gpu_drivers: + kernel_params.append("nvidia") + kernel_params.append("nvidia-drm.modeset=1") + kernel_params.append("nvidia-drm.fbdev=1") + kernel_params.append("nouveau.modeset=0") + # kernel_params.append("modprobe.blacklist=nouveau") + kernel_params.append("i915.modeset=1") + kernel_params.append("radeon.modeset=1") + + overwrite = libcalamares.job.configuration.get("overwrite", False) + + grub_config_items = {} + # read the lines we need from the existing config + 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()] + + for line in lines: + if line.startswith("GRUB_CMDLINE_LINUX_DEFAULT"): + existing_params = re.sub(r"^GRUB_CMDLINE_LINUX_DEFAULT\s*=\s*", "", line).strip("\"'").split() + + for existing_param in existing_params: + existing_param_name = existing_param.split("=")[0].strip() + + # Ensure we aren't adding duplicated params + param_exists = False + for param in kernel_params: + if param.split("=")[0].strip() == existing_param_name: + param_exists = True + break + if not param_exists and existing_param_name not in ["quiet", "resume", "splash"]: + kernel_params.append(existing_param) + + elif line.startswith("GRUB_DISTRIBUTOR") and libcalamares.job.configuration.get("keep_distributor", False): + distributor_parts = line.split("=") + if len(distributor_parts) > 1: + distributor = distributor_parts[1].strip("'\"") + + # If a filesystem grub can't write to is used, disable save default + if no_save_default and line.strip().startswith("GRUB_SAVEDEFAULT"): + grub_config_items["GRUB_SAVEDEFAULT"] = "false" + + always_use_defaults = libcalamares.job.configuration.get("always_use_defaults", False) + + # If applicable add the items from defaults to the dict containing the grub config to wirte/modify + if always_use_defaults or overwrite or not os.path.exists(default_grub): + if "defaults" in libcalamares.job.configuration: + for key, value in libcalamares.job.configuration["defaults"].items(): + if isinstance(value, bool): + if value: + escaped_value = "true" + else: + escaped_value = "false" + else: + escaped_value = str(value).replace("'", "'\\''") + + grub_config_items[key] = f"'{escaped_value}'" + + grub_config_items['GRUB_CMDLINE_LINUX_DEFAULT'] = f"'{' '.join(kernel_params)}'" + grub_config_items["GRUB_DISTRIBUTOR"] = f"'{distributor}'" + + if cryptdevice_params and not unencrypted_separate_boot: + grub_config_items["GRUB_ENABLE_CRYPTODISK"] = "y" + + if overwrite or not os.path.exists(default_grub) or libcalamares.job.configuration.get("prefer_grub_d", False): + with open(default_grub, 'w') as grub_file: + for key, value in grub_config_items.items(): + grub_file.write(f"{key}={value}\n") + else: + update_existing_config(default_grub, grub_config_items) + + return None + + +def run(): + """ + Calls routine with given parameters to modify '/etc/default/grub'. + + :return: + """ + + if not libcalamares.job.configuration: + return "No configuration found", "Aborting due to missing configuration" + + try: + gs_name = libcalamares.job.configuration["gsName"] + except KeyError: + return "Missing global storage value", "gsname not found in configuration file" + + if libcalamares.globalstorage.contains(gs_name): + bootloader_name = libcalamares.globalstorage.value(gs_name) + else: + return f"Key missing", f"Failed to find {gs_name} in global storage" + + if bootloader_name != "grub": + libcalamares.utils.debug("Bootloader is not grub, skipping grub configuration") + return None + + fw_type = libcalamares.globalstorage.value("firmwareType") + partitions = libcalamares.globalstorage.value("partitions") + root_mount_point = libcalamares.globalstorage.value("rootMountPoint") + branding = libcalamares.globalstorage.value("branding") + if branding is None: + distributor = None + else: + distributor = branding["bootloaderEntryName"] + + if libcalamares.globalstorage.value("bootLoader") is None and fw_type != "efi": + return None + + if fw_type == "efi": + esp_found = False + + for partition in partitions: + if partition["mountPoint"] == libcalamares.globalstorage.value("efiSystemPartition"): + esp_found = True + + if not esp_found: + return None + + return modify_grub_default(partitions, root_mount_point, distributor) diff --git a/src/modules/hardwaredetect/main.py b/src/modules/hardwaredetect/main.py new file mode 100644 index 0000000..a8337b7 --- /dev/null +++ b/src/modules/hardwaredetect/main.py @@ -0,0 +1,60 @@ +#!/usr/bin/env python3 + +import subprocess + +import libcalamares +from libcalamares.utils import gettext_path, gettext_languages + +import gettext + +_translation = gettext.translation("calamares-python", + localedir=gettext_path(), + languages=gettext_languages(), + fallback=True) +_ = _translation.gettext +_n = _translation.ngettext + +custom_status_message = None +name = "Hardware detection" + + +def pretty_name(): + return _(name) + + +def pretty_status_message(): + if custom_status_message is not None: + return custom_status_message + + +def run(): + cpu_model = "unknown" + cpu_vendor = "unknown" + gpu_drivers = [] + try: + with open("/proc/cpuinfo", "r") as cpu_file: + for line in cpu_file: + if line.strip().startswith("vendor_id"): + cpu_vendor = line.split(":")[1].strip() + if line.strip().startswith("model name"): + cpu_model = line.split(":")[1].strip() + except KeyError: + libcalamares.utils.warning("Failed to get CPU drivers") + + try: + lspci_output = subprocess.run("LANG=C lspci -k | grep -EA3 'VGA|3D|Display'", + capture_output=True, shell=True, text=True) + + for line in lspci_output.stdout.split("\n"): + if line.strip().startswith("Kernel driver in use:"): + gpu_drivers.append(line.split(":")[1].strip()) + except subprocess.CalledProcessError as cpe: + libcalamares.utils.warning(f"Failed to get GPU drivers with error: {cpe.output}") + except KeyError: + libcalamares.utils.warning("Failed to parse GPU driver string") + + libcalamares.globalstorage.insert("cpuModel", cpu_model) + libcalamares.globalstorage.insert("cpuVendor", cpu_vendor) + libcalamares.globalstorage.insert("gpuDrivers", gpu_drivers) + + return None diff --git a/src/modules/hardwaredetect/module.desc b/src/modules/hardwaredetect/module.desc new file mode 100644 index 0000000..91a24a9 --- /dev/null +++ b/src/modules/hardwaredetect/module.desc @@ -0,0 +1,9 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +--- +type: "job" +name: "hardwaredetect" +interface: "python" +script: "main.py" +noconfig: true + diff --git a/src/modules/locale/images/bg.png b/src/modules/locale/images/bg.png new file mode 100644 index 0000000..f460c49 Binary files /dev/null and b/src/modules/locale/images/bg.png differ diff --git a/src/modules/locale/images/pin.png b/src/modules/locale/images/pin.png new file mode 100644 index 0000000..575836e Binary files /dev/null and b/src/modules/locale/images/pin.png differ diff --git a/src/modules/locale/images/timezone_-1.0.png b/src/modules/locale/images/timezone_-1.0.png new file mode 100644 index 0000000..5ee1cd5 Binary files /dev/null and b/src/modules/locale/images/timezone_-1.0.png differ diff --git a/src/modules/locale/images/timezone_-10.0.png b/src/modules/locale/images/timezone_-10.0.png new file mode 100644 index 0000000..30a0b89 Binary files /dev/null and b/src/modules/locale/images/timezone_-10.0.png differ diff --git a/src/modules/locale/images/timezone_-11.0.png b/src/modules/locale/images/timezone_-11.0.png new file mode 100644 index 0000000..864c274 Binary files /dev/null and b/src/modules/locale/images/timezone_-11.0.png differ diff --git a/src/modules/locale/images/timezone_-2.0.png b/src/modules/locale/images/timezone_-2.0.png new file mode 100644 index 0000000..0152537 Binary files /dev/null and b/src/modules/locale/images/timezone_-2.0.png differ diff --git a/src/modules/locale/images/timezone_-3.0.png b/src/modules/locale/images/timezone_-3.0.png new file mode 100644 index 0000000..d0037fa Binary files /dev/null and b/src/modules/locale/images/timezone_-3.0.png differ diff --git a/src/modules/locale/images/timezone_-3.5.png b/src/modules/locale/images/timezone_-3.5.png new file mode 100644 index 0000000..95c6bce Binary files /dev/null and b/src/modules/locale/images/timezone_-3.5.png differ diff --git a/src/modules/locale/images/timezone_-4.0.png b/src/modules/locale/images/timezone_-4.0.png new file mode 100644 index 0000000..fdacb7d Binary files /dev/null and b/src/modules/locale/images/timezone_-4.0.png differ diff --git a/src/modules/locale/images/timezone_-4.5.png b/src/modules/locale/images/timezone_-4.5.png new file mode 100644 index 0000000..b5efef1 Binary files /dev/null and b/src/modules/locale/images/timezone_-4.5.png differ diff --git a/src/modules/locale/images/timezone_-5.0.png b/src/modules/locale/images/timezone_-5.0.png new file mode 100644 index 0000000..9d57d7a Binary files /dev/null and b/src/modules/locale/images/timezone_-5.0.png differ diff --git a/src/modules/locale/images/timezone_-6.0.png b/src/modules/locale/images/timezone_-6.0.png new file mode 100644 index 0000000..23ee6eb Binary files /dev/null and b/src/modules/locale/images/timezone_-6.0.png differ diff --git a/src/modules/locale/images/timezone_-7.0.png b/src/modules/locale/images/timezone_-7.0.png new file mode 100644 index 0000000..687f115 Binary files /dev/null and b/src/modules/locale/images/timezone_-7.0.png differ diff --git a/src/modules/locale/images/timezone_-8.0.png b/src/modules/locale/images/timezone_-8.0.png new file mode 100644 index 0000000..7dbb006 Binary files /dev/null and b/src/modules/locale/images/timezone_-8.0.png differ diff --git a/src/modules/locale/images/timezone_-9.0.png b/src/modules/locale/images/timezone_-9.0.png new file mode 100644 index 0000000..31600f9 Binary files /dev/null and b/src/modules/locale/images/timezone_-9.0.png differ diff --git a/src/modules/locale/images/timezone_0.0.png b/src/modules/locale/images/timezone_0.0.png new file mode 100644 index 0000000..d48f2e6 Binary files /dev/null and b/src/modules/locale/images/timezone_0.0.png differ diff --git a/src/modules/locale/images/timezone_1.0.png b/src/modules/locale/images/timezone_1.0.png new file mode 100644 index 0000000..5cb3b6a Binary files /dev/null and b/src/modules/locale/images/timezone_1.0.png differ diff --git a/src/modules/locale/images/timezone_10.0.png b/src/modules/locale/images/timezone_10.0.png new file mode 100644 index 0000000..9758dea Binary files /dev/null and b/src/modules/locale/images/timezone_10.0.png differ diff --git a/src/modules/locale/images/timezone_11.0.png b/src/modules/locale/images/timezone_11.0.png new file mode 100644 index 0000000..af569e1 Binary files /dev/null and b/src/modules/locale/images/timezone_11.0.png differ diff --git a/src/modules/locale/images/timezone_11.5.png b/src/modules/locale/images/timezone_11.5.png new file mode 100644 index 0000000..442cabf Binary files /dev/null and b/src/modules/locale/images/timezone_11.5.png differ diff --git a/src/modules/locale/images/timezone_12.0.png b/src/modules/locale/images/timezone_12.0.png new file mode 100644 index 0000000..9774255 Binary files /dev/null and b/src/modules/locale/images/timezone_12.0.png differ diff --git a/src/modules/locale/images/timezone_12.75.png b/src/modules/locale/images/timezone_12.75.png new file mode 100644 index 0000000..309f233 Binary files /dev/null and b/src/modules/locale/images/timezone_12.75.png differ diff --git a/src/modules/locale/images/timezone_13.0.png b/src/modules/locale/images/timezone_13.0.png new file mode 100644 index 0000000..157bdb6 Binary files /dev/null and b/src/modules/locale/images/timezone_13.0.png differ diff --git a/src/modules/locale/images/timezone_2.0.png b/src/modules/locale/images/timezone_2.0.png new file mode 100644 index 0000000..6da8dbe Binary files /dev/null and b/src/modules/locale/images/timezone_2.0.png differ diff --git a/src/modules/locale/images/timezone_3.0.png b/src/modules/locale/images/timezone_3.0.png new file mode 100644 index 0000000..a6c40d4 Binary files /dev/null and b/src/modules/locale/images/timezone_3.0.png differ diff --git a/src/modules/locale/images/timezone_3.5.png b/src/modules/locale/images/timezone_3.5.png new file mode 100644 index 0000000..d5bad37 Binary files /dev/null and b/src/modules/locale/images/timezone_3.5.png differ diff --git a/src/modules/locale/images/timezone_4.0.png b/src/modules/locale/images/timezone_4.0.png new file mode 100644 index 0000000..24f8a6e Binary files /dev/null and b/src/modules/locale/images/timezone_4.0.png differ diff --git a/src/modules/locale/images/timezone_4.5.png b/src/modules/locale/images/timezone_4.5.png new file mode 100644 index 0000000..0a53210 Binary files /dev/null and b/src/modules/locale/images/timezone_4.5.png differ diff --git a/src/modules/locale/images/timezone_5.0.png b/src/modules/locale/images/timezone_5.0.png new file mode 100644 index 0000000..da8ca22 Binary files /dev/null and b/src/modules/locale/images/timezone_5.0.png differ diff --git a/src/modules/locale/images/timezone_5.5.png b/src/modules/locale/images/timezone_5.5.png new file mode 100644 index 0000000..c0e7633 Binary files /dev/null and b/src/modules/locale/images/timezone_5.5.png differ diff --git a/src/modules/locale/images/timezone_5.75.png b/src/modules/locale/images/timezone_5.75.png new file mode 100644 index 0000000..3d3c51d Binary files /dev/null and b/src/modules/locale/images/timezone_5.75.png differ diff --git a/src/modules/locale/images/timezone_6.0.png b/src/modules/locale/images/timezone_6.0.png new file mode 100644 index 0000000..75fa983 Binary files /dev/null and b/src/modules/locale/images/timezone_6.0.png differ diff --git a/src/modules/locale/images/timezone_6.5.png b/src/modules/locale/images/timezone_6.5.png new file mode 100644 index 0000000..ec66436 Binary files /dev/null and b/src/modules/locale/images/timezone_6.5.png differ diff --git a/src/modules/locale/images/timezone_7.0.png b/src/modules/locale/images/timezone_7.0.png new file mode 100644 index 0000000..ebc4a6e Binary files /dev/null and b/src/modules/locale/images/timezone_7.0.png differ diff --git a/src/modules/locale/images/timezone_8.0.png b/src/modules/locale/images/timezone_8.0.png new file mode 100644 index 0000000..2883a07 Binary files /dev/null and b/src/modules/locale/images/timezone_8.0.png differ diff --git a/src/modules/locale/images/timezone_9.0.png b/src/modules/locale/images/timezone_9.0.png new file mode 100644 index 0000000..797f8d6 Binary files /dev/null and b/src/modules/locale/images/timezone_9.0.png differ diff --git a/src/modules/locale/images/timezone_9.5.png b/src/modules/locale/images/timezone_9.5.png new file mode 100644 index 0000000..aab2bcd Binary files /dev/null and b/src/modules/locale/images/timezone_9.5.png differ diff --git a/src/modules/luksbootkeyfile/luksbootkeyfile.conf b/src/modules/luksbootkeyfile/luksbootkeyfile.conf new file mode 100644 index 0000000..1da9962 --- /dev/null +++ b/src/modules/luksbootkeyfile/luksbootkeyfile.conf @@ -0,0 +1,14 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# +# Luksbootkeyfile configuration. A key file is created for the +# LUKS encrypted devices. +--- +# Set Password-Based Key Derivation Function (PBKDF) algorithm +# for LUKS keyslot. +# +# There are three usable specific values: pbkdf2, argon2i or argon2id. +# There is one value equivalent to not setting it: default +# +# When not set (or explicitly set to "default"), the cryptsetup default is used +luks2Hash: argon2id diff --git a/src/modules/mount/mount.conf b/src/modules/mount/mount.conf new file mode 100644 index 0000000..d71ad01 --- /dev/null +++ b/src/modules/mount/mount.conf @@ -0,0 +1,134 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# +# Mount filesystems in the target (generally, before treating the +# target as a usable chroot / "live" system). Filesystems are +# automatically mounted from the partitioning module. Filesystems +# listed here are **extra**. The filesystems listed in *extraMounts* +# are mounted in all target systems. +--- +# Extra filesystems to mount. The key's value is a list of entries; each +# entry has five keys: +# - device The device node to mount +# - fs (optional) The filesystem type to use +# - mountPoint Where to mount the filesystem +# - options (optional) An array of options to pass to mount +# - efi (optional) A boolean that when true is only mounted for UEFI installs +# +# The device is not mounted if the mountPoint is unset or if the fs is +# set to unformatted. +# +extraMounts: + - device: proc + fs: proc + mountPoint: /proc + - device: sys + fs: sysfs + mountPoint: /sys + - device: /dev + mountPoint: /dev + options: [ bind ] + - device: tmpfs + fs: tmpfs + mountPoint: /run + - device: /run/udev + mountPoint: /run/udev + options: [ bind ] + - device: efivarfs + fs: efivarfs + mountPoint: /sys/firmware/efi/efivars + efi: true + +# Btrfs subvolumes to create if root filesystem is on btrfs volume. +# If *mountpoint* is mounted already to another partition, it is ignored. +# Separate subvolume for swapfile is handled separately and automatically. +# +# It is possible to prevent subvolume creation -- this is likely only relevant +# for the root (/) subvolume -- by giving an empty string as a subvolume +# name. In this case no subvolume will be created. +# +btrfsSubvolumes: + - mountPoint: / + subvolume: /@ + - mountPoint: /home + subvolume: /@home + - mountPoint: /root + subvolume: /@root + - mountPoint: /srv + subvolume: /@srv + - mountPoint: /var/cache + subvolume: /@cache + - mountPoint: /var/cache/pacman/pkg + subvolume: /@pkg + - mountPoint: /var/tmp + subvolume: /@tmp + - mountPoint: /var/log + subvolume: /@log + +# The name of the btrfs subvolume holding the swapfile. This only used when +# a swapfile is selected and the root filesystem is btrfs +# +btrfsSwapSubvol: /@swap + +# The mount options used to mount each filesystem. +# +# filesystem contains the name of the filesystem or on of three special +# values, "default", efi" and "btrfs_swap". The logic is applied in this manner: +# - If the partition is the EFI partition, the "efi" entry will be used +# - If the fs is btrfs and the subvolume is for the swapfile, +# the "btrfs_swap" entry is used +# - If the filesystem is an exact match for filesystem, that entry is used +# - If no match is found in the above, the default entry is used +# - If there is no match and no default entry, "defaults" is used +# - If the mountOptions key is not present, "defaults" is used +# +# Each filesystem entry contains 3 keys, all of which are optional +# options - An array of mount options that is used on all disk types +# ssdOptions - An array of mount options combined with options for ssds +# hddOptions - An array of mount options combined with options for hdds +# If combining these options results in an empty array, "defaults" is used +# +# Example 1 +# In this example, there are specific options for ext4 and btrfs filesystems, +# the EFI partition and the subvolume holding the btrfs swapfile. All other +# filesystems use the default entry. For the btrfs filesystem, there are +# additional options specific to hdds and ssds +# +# mountOptions: +# - filesystem: default +# options: [ defaults ] +# - filesystem: efi +# options: [ defaults, umask=0077 ] +# - filesystem: ext4 +# options: [ defaults ] +# - filesystem: btrfs +# options: [ defaults, compress=zstd:1 ] +# ssdOptions: [ discard=async ] +# hddOptions: [ autodefrag ] +# - filesystem: btrfs_swap +# options: [ defaults, noatime ] +# +# Example 2 +# In this example there is a single default used by all filesystems +# +# mountOptions: +# - filesystem: default +# options: [ defaults ] +# +mountOptions: + - filesystem: default + options: [ defaults, noatime ] + - filesystem: efi + options: [ defaults, umask=0077 ] + - filesystem: btrfs + options: [ defaults, noatime, compress=zstd:1, space_cache=v2, commit=120 ] + ssdOptions: [ discard=async ] + hddOptions: [ autodefrag ] + - filesystem: btrfs_swap + options: [ defaults, noatime ] + - filesystem: ext4 + options: [ defaults, noatime, commit=60 ] + - filesystem: xfs + options: [ defaults, lazytime, noatime, attr2, inode64, logbsize=256k, noquota ] + - filesystem: f2fs + options: [ defaults, compress_algorithm=lz4, compress_chksum, gc_merge, lazytime ] diff --git a/src/modules/netinstall/build/_base_and_developer_edition.yaml b/src/modules/netinstall/build/_base_and_developer_edition.yaml new file mode 100644 index 0000000..3dad75c --- /dev/null +++ b/src/modules/netinstall/build/_base_and_developer_edition.yaml @@ -0,0 +1,1344 @@ +- name: "Melawy Linux required (hidden) (base_system) (base_and_developer_edition) (full netinstall)" + description: "needed Melawy Linux packages" + hidden: true + expanded: false + selected: true + critical: true + packages: + - archlinux-keyring + - melawy-linux-keyring + - melawy-linux-mirrorlist + - cachyos-keyring + - cachyos-mirrorlist + - arcolinux-keyring + - arcolinux-mirrorlist-git + - chaotic-keyring + - chaotic-mirrorlist + - endeavouros-keyring + - endeavouros-mirrorlist + - manjaro-keyring + + - linux-atm + - linux-firmware + - linux-firmware-marvell + - linux-api-headers + - linux-cachyos + - linux-cachyos-headers + + - base + - base-devel + - appstream + - busybox + - edk2-shell + - chwd + - dracut + - gptfdisk + - iptables-nft + + - r8168-dkms + - rtl8821cu-morrownr-dkms-git + + - aic94xx-firmware + - ast-firmware + + - upd72020x-fw + - wd719x-firmware + + - pacman + - pacman-contrib + - pacman-mirrorlist + - pacseek + - pacutils + - plymouth + - refind + - systemd-ukify + - xf86-input-elographics + - xf86-input-evdev + - xf86-input-synaptics + - xf86-input-void + - xf86-video-fbdev + - fwupd + - fwupd-efi + + - melawy-branding + - melawy-check-reboot-required + - melawy-dracut-initramfs + - melawy-dracut-ukify + - melawy-etc-skel-std-powerman-kvantum + - melawy-skel-root + - melawy-refind-menu-generator + - melawy-welcome + +- name: "Performance (base_system) (base_and_developer_edition) (full netinstall)" + description: "needed Melawy Linux packages" + hidden: true + expanded: false + selected: true + critical: true + packages: + # - irqbalance + # - performance-tweaks + # - uksmd + # - uksmdstats + - ananicy-cpp + - cachyos-ananicy-rules-git + - bpftune + - cachyos-settings + - dbus-broker + - lua-filesystem + - powersave-tweaks + - preload + - realtime-privileges + - systemd-oomd-defaults + - zram-generator + +- name: "Terminal-Base + Common packages" + description: "Recommended. Don't change unless you know what you're doing." + hidden: true + expanded: false + selected: true + critical: true + subgroups: + + - name: "CPU specific microcode update packages (base_system) (base_and_developer_edition) (full netinstall)" + description: "Microcode update image for AMD and Intel CPUs" + selected: true + critical: true + packages: + - amd-ucode + - intel-ucode + + - name: "Virtual machines (base_system) (base_and_developer_edition) (full netinstall)" + description: "Required if OS run in virtual environment" + selected: true + packages: + - hyperv + - libvirt + - open-vm-tools + - qemu-guest-agent + - spice-vdagent + - virtualbox-guest-utils + - xf86-input-vmmouse + - xf86-video-qxl + - xf86-video-vmware + + - name: "Filesystem (base_system) (base_and_developer_edition) (full netinstall)" + description: "Filesystem tools and applications" + selected: true + packages: + - bcachefs-tools + - btrfs-progs + - cryfs + - dosfstools + - e2fsprogs + - efibootmgr + - efitools + - encfs + - exfatprogs + - f2fs-tools + - fatresize + - gocryptfs + - haveged + - jfsutils + - kpmcore + - kpmcore-bcachefs + - lvm2 + - mtpfs + - nfs-utils + - nilfs-utils + - ntfs-3g + - nvme-cli + - open-iscsi + - pcsclite + - reiserfsprogs + - samba-support + - sbsigntools + - smartmontools + - testdisk + - tracker3-miners + - udftools + - udiskie + - udisks2 + - usbmuxd + - xfsprogs + + - name: "BTRFS filesystem (base_system) (base_and_developer_edition) (full netinstall)" + description: "BTRFS filesystem tools and applications" + selected: true + packages: + - btrfs-assistant + - btrfs-snapshots + - btrfsmaintenance + - timeshift + - timeshift-autosnap + + - name: "Hardware (base_system) (base_and_developer_edition) (full netinstall)" + description: "Hardware support libs and firmware" + selected: true + packages: + - dmidecode + - dmraid + - edid-decode-git + - hdparm + - lsscsi + - mtools + - sdparm + - sg3_utils + - sof-firmware + + - name: "Power (base_system) (base_and_developer_edition) (full netinstall)" + description: "Powermanagement support" + selected: true + packages: + - cpupower + - power-profiles-daemon + - upower + + - name: "Terminal applications (base_system) (base_and_developer_edition) (full netinstall)" + description: "General terminal tools and applications" + selected: true + packages: + - bash-completion + - bat + - beep + - btop + - cloud-init + - cronie + - cryptsetup + - device-mapper + - dex + - dialog + - diffutils + - duf + - expect + - fastfetch + - find-the-command + - findutils + - fsarchiver + - git + - glances + - gpm + - hardinfo2 + - htop + - hw-probe + - hwdetect + - hwinfo + - iftop + - inetutils + - intltool + - inxi + - iotop-c + - less + - libfido2 + - libusb-compat + - logrotate + - lolcat + - lsb-release + - lshw + - lynx + - man-db + - man-pages + - mc + - mdadm + - mlocate + - most + - nano + - nano-syntax-highlighting + - neofetch + - neovim + - nmap + - ntp + - openbsd-netcat + - parallel + - powerline + - powerline-common + - powerline-fonts + - procps-ng + - pv + - python-defusedxml + - python-packaging + - python-pyparted + - ripgrep + - rsync + - s-nail + - screen + - screenfetch + - sed + - sshpass + - sudo + - sysfsutils + - syslog-ng + - tcpdump + - terminus-font + - texinfo + - the_silver_searcher + - tldr + - tmux + - tpm2-tools + - tpm2-tss + - translate-shell + - tree + - ttf-terminus-nerd + - unace + - unrar + - unzip + - usbutils + - ventoy-bin + - wget + - wget2 + - which + - xed + - xmlstarlet + - xz + - yad + - zenity + + - name: "Network (base_system) (base_and_developer_edition) (full netinstall)" + description: "Network apps drivers and tools" + selected: true + packages: + - avahi + - b43-fwcutter + - bridge-utils + - broadcom-wl-dkms + - darkhttpd + - dhclient + - dhcpcd + - dnsmasq + - dnsutils + - ethtool + - iw + - iwd + - ldns + - lftp + - libmicrohttpd + - libmtp + - mbedtls + - mbedtls2 + - mobile-broadband-provider-info + - modemmanager + - nbd + - ndisc6 + - net-tools + - netctl + - networkmanager + - networkmanager-openconnect + - networkmanager-openvpn + - networkmanager-pptp + - networkmanager-qt5 + - networkmanager-vpnc + - nss-mdns + - openconnect + - openssh + - openvpn + - ppp + - pptpclient + - rp-pppoe + - sequoia-sq + - shadowsocks-electron-bin + - smbclient + - systemd-resolvconf + - traceroute + - usb_modeswitch + - vpnc + - whois + - wireguard-tools + - wireless-regdb + - wireless_tools + - wpa_supplicant + - wvdial + - xl2tpd + + - name: "Audio (base_system) (base_and_developer_edition) (full netinstall)" + description: "Audio handling tools apps and libs" + selected: true + packages: + - alsa-firmware + - alsa-lib + - alsa-plugins + - alsa-utils + - lib32-pipewire + - pavucontrol + - pipewire + - pipewire-alsa + - pipewire-jack + - pipewire-pulse + - pipewire-support + - rtkit + - wireplumber + + - name: "X11-system (base_system) (base_and_developer_edition) (full netinstall)" + description: "Default X11 system" + selected: true + packages: + - libwnck3 + - mesa + - mesa-utils + - xf86-input-libinput + - xorg-server + - xorg-xdpyinfo + - xorg-xhost + - xorg-xinit + - xorg-xinput + - xorg-xkill + - xorg-xrandr + - xorg-xrdb + - xsettingsd + + - name: "V4L2 drivers (base_system) (base_and_developer_edition) (full netinstall)" + description: "V4L2 video, webcamera drivers" + selected: true + packages: + - v4l2loopback-dkms + + - name: "Firewall (base_system) (base_and_developer_edition) (full netinstall)" + description: "Firewall installed and enabled" + selected: true + critical: true + packages: + - firewalld + - python-capng + - python-pyqt5 + + - name: "Fonts (base_system) (base_and_developer_edition) (full netinstall)" + description: "Melawy Linux font selection" + selected: true + packages: + - awesome-terminal-fonts + - cantarell-fonts + - freetype2 + - noto-color-emoji-fontconfig + - noto-fonts + - noto-fonts-cjk + - noto-fonts-emoji + - noto-fonts-extra + - opendesktop-fonts + - ttf-droid + - ttf-font-awesome + - ttf-hack + - ttf-hack-nerd + - ttf-ms-fonts + - ttf-noto-nerd + - ttf-twemoji + + - name: "Fonts (base_system) (base_and_developer_edition) (full netinstall)" + description: "Melawy Linux font selection" + selected: true + packages: + - adobe-source-code-pro-fonts + - adobe-source-han-sans-cn-fonts + - adobe-source-han-sans-jp-fonts + - adobe-source-han-sans-kr-fonts + - awesome-terminal-fonts + - cantarell-fonts + - freetype2 + - noto-color-emoji-fontconfig + - noto-fonts + - noto-fonts-cjk + - noto-fonts-emoji + - otf-fira-mono + - otf-fira-sans + - otf-firamono-nerd + - ttf-bitstream-vera + - ttf-dejavu + - ttf-dejavu-nerd + - ttf-fira-code + - ttf-fira-sans + - ttf-firacode-nerd + - ttf-hack + - ttf-hack-nerd + - ttf-jetbrains-mono + - ttf-jetbrains-mono-nerd + - ttf-liberation + - ttf-liberation-mono-nerd + - ttf-ms-fonts + - ttf-nerd-fonts-symbols + - ttf-nerd-fonts-symbols-common + - ttf-nerd-fonts-symbols-mono + - ttf-noto-nerd + - ttf-opensans + - ttf-roboto + - ttf-roboto-mono + - ttf-roboto-mono-nerd + - ttf-sourcecodepro-nerd + - ttf-twemoji + - ttf-ubuntu-font-family + - ttf-ubuntu-mono-nerd + - ttf-ubuntu-nerd + + - name: "Spell (base_system) (base_and_developer_edition) (full netinstall)" + description: "Spell apps" + selected: true + packages: + - aspell + - aspell-$LOCALE + - aspell-en + - hunspell + - hunspell-$LOCALE + - hunspell-en_us + +- name: "Melawy Linux branding" + description: "Needed Melawy Linux packages" + hidden: true + selected: true + subgroups: + + - name: "Refind (base_system) (base_and_developer_edition) (full netinstall)" + description: "Boot loader screen" + selected: true + packages: + - melawy-refind-theme-fenek + - melawy-refind-theme-lera-sugar + - melawy-refind-theme-nier-a2 + + - name: "Plymouth (base_system) (base_and_developer_edition) (full netinstall)" + description: "Boot screen" + selected: true + packages: + - melawy-plymouth-theme-fenek + - melawy-plymouth-theme-lera-sugar + - melawy-plymouth-theme-nier-a2 + + - name: "Plymouth select (1 from list)" + description: "Boot screen" + selected: true + subgroups: + + - name: "Nier A2 theme" + selected: true + packages: + - melawy-plymouth-theme-hard-install-nier-a2 + - melawy-refind-theme-hard-install-nier-a2 + + - name: "Lera sugar theme" + selected: false + packages: + - melawy-plymouth-theme-hard-install-lera-sugar + - melawy-refind-theme-hard-install-lera-sugar + + - name: "Fenek theme" + selected: false + packages: + - melawy-plymouth-theme-hard-install-fenek + - melawy-refind-theme-hard-install-fenek + + - name: "Window decorators (base_system) (base_and_developer_edition) (full netinstall)" + selected: true + packages: + - klassy + - klassy-qt5 + - lightly-kf6-git + - lightlyshaders + - roundedsbe + + - name: "Base desktop theme (base_system) (base_and_developer_edition) (full netinstall)" + selected: true + packages: + - melawy-icon-theme-kde6 + - melawy-theme-kde6 + - melawy-plymouth-theme + - melawy-refind-theme + + - name: "Desktop theme Win11 (full netinstall)" + selected: false + packages: + - melawy-win11-icon-theme + - melawy-win11-icon-theme-special + - melawy-win11-icon-theme-white + - melawy-kde-theme-win11-kde6 + - melawy-kde-theme-win12-kde6 + + - name: "Desktop theme Colloid (full netinstall)" + selected: false + packages: + - colloid-cursors-git + - colloid-icon-theme-git + - colloid-gtk-theme-git + - colloid-kde-theme-git + + - name: "SDDM, KDE Plasma Look-and-feel, Wallpapers (base_system) (base_and_developer_edition) (full netinstall)" + selected: true + packages: + - melawy-kde-theme-nier-a2-kde6 + - melawy-kde-theme-lera-sugar-kde6 + - melawy-kde-theme-fenek-kde6 + + - name: "Cursors (base_system) (base_and_developer_edition) (full netinstall)" + selected: true + packages: + - melawy-purple-dark-cursors + - melawy-purple-dark-default-cursors + - melawy-purple-light-cursors + - melawy-purple-light-default-cursors + - melawy-red-dark-cursors + - melawy-red-dark-default-cursors + - melawy-red-light-cursors + - melawy-red-light-default-cursors + + # - name: "Start menu (base_system) (base_and_developer_edition) (full netinstall)" + # selected: true + # packages: + # - melawy-plasma-plasmoid-Menu11 + # - melawy-plasma-plasmoid-DittoMenu + # - melawy-plasma-plasmoid-OnzeMenuKDE + + - name: "Plasmoids (base_system) (base_and_developer_edition) (full netinstall)" + selected: true + packages: + - melawy-plasma-plasmoid-wallpaper-blur-effect-kde6 + - melawy-plasma-plasmoid-win7showdesktop-kde6 + + # - name: "Wallpapers YouTube" + # selected: false + # packages: + # - melawy-wallpapers-from-youtube + + - name: "Updater (base_system) (base_and_developer_edition) (full netinstall)" + selected: true + packages: + - melawy-arch-linux-updater + - melawy-arch-linux-updater-tray-icon + +- name: "Desktop integration" + description: "Useful helper tools and libs for desktop usage" + expanded: true + selected: true + subgroups: + + - name: "Fix applications style (base_system) (base_and_developer_edition) (full netinstall)" + description: "Desktop environment" + selected: true + packages: + # - adwaita-qt5 + # - adwaita-qt6 + - adw-gtk-theme + - adw-gtk3 + - gnome-settings-daemon + - gnome-themes-extra + - gsettings-desktop-schemas + - gsettings-qt + - gtk-engine-murrine + - kde-gtk-config + - lxappearance-gtk3 + - xdg-desktop-portal + - xdg-desktop-portal-kde + - hardcode-fixer-git + + - name: "KDE Plasma (base_system) (base_and_developer_edition) (full netinstall)" + description: "Desktop environment" + selected: true + packages: + - accountsservice + - akonadi + - akonadi-calendar + - akonadi-calendar-tools + - akonadi-contacts + - akonadi-import-wizard + - akonadi-notes + - akonadi-search + - akonadiconsole + - ark + - audiocd-kio + - blueberry + - bluedevil + - breeze + - breeze-gtk + - dolphin + - dolphin-plugins + - drkonqi + - feh + - ffmpegthumbnailer + - ffmpegthumbs + - file-roller + - flatpak-kcm + - flatpak-xdg-utils + - galculator + - gksu + - glfw + - gnome-firmware + - gnome-keyring + - gparted + - grsync + - gst-libav + - gst-plugin-pipewire + - gst-plugins-bad + - gst-plugins-base + - gst-plugins-good + - gst-plugins-ugly + - gstreamer + - gstreamer-meta + - gwenview + - karchive5 + - kate + - kcalc + - kde-cli-tools + - kde-gtk-config + - kde-system-meta + - kdeconnect + - kdegraphics-thumbnailers + - kdenetwork-filesharing + - kdeplasma-addons + - kfind + - kgamma + - kimageformats + - kimageformats5 + - kinfocenter + - kinit + - kio + - kio-admin + - kio-extras + - kio-fuse + - kmail + - kmail-account-wizard + - konsole + - kscreen + - ksshaskpass + - ksystemlog + - kvantum + - kwallet-pam + - kwalletmanager + - kwayland-integration + - kwin-effect-rounded-corners-git + - libappindicator-gtk3 + - malcontent + - maliit-keyboard + - mintstick-git + - network-manager-applet + - okular + - p7zip + - partitionmanager + - plasma + - plasma-browser-integration + - plasma-desktop + - plasma-disks + - plasma-firewall + - plasma-integration + - plasma-nm + - plasma-pa + - plasma-systemmonitor + - plasma-thunderbolt + - plasma-vault + - plasma-wayland-protocols + - plasma-workspace + - plasma-workspace-wallpapers + - plasma5-integration + - plymouth-kcm + - polkit + - polkit-kde-agent + - polkit-qt5 + - polkit-qt6 + - poppler-glib + - poppler-qt5 + - poppler-qt6 + - powerdevil + - qt5-imageformats + - qt5ct + - qt6-imageformats + - sddm + - sddm-kcm + - solid + - spectacle + - systemd-kcm + - tumbler + - variety + - xdg-desktop-portal + - xdg-desktop-portal-kde + - xdg-user-dirs + - xdg-user-dirs-gtk + - xdg-utils + - xwaylandvideobridge + + - name: "Package management (base_system) (base_and_developer_edition) (full netinstall)" + description: "Packages tools" + selected: true + packages: + - appimagelauncher + - downgrade + - expac + - flatpak + - libpamac-full + - melawy-pamac-helper + - ocs-url + - pace + - packagekit-qt5 + - packagekit-qt6 + - paclast + - pamac-all + - pamac-cli + - paru + - pkgfile + - rate-mirrors + - rebuild-detector + - reflector + - snapd + - snapd-glib + - sofirem-git + - topgrade + - yay + + - name: "Browsers and language package" + description: "Add firefox and language pack if possible and other browsers" + expanded: true + selected: true + subgroups: + + - name: "Firefox (base_system) (base_and_developer_edition) (full netinstall)" + description: "Add firefox and language pack" + selected: true + packages: + - firefox + - firefox-i18n-$LOCALE + - profile-sync-daemon + + - name: "Firefox (full netinstall)" + description: "Add firefox and language pack" + selected: false + packages: + - firefox-developer-edition + - firefox-developer-edition-i18n-$LOCALE + - profile-sync-daemon + + - name: "Other (full netinstall)" + description: "Add browsers" + selected: false + packages: + - google-chrome + - brave-bin + - profile-sync-daemon + + - name: "Other other ... (full netinstall)" + description: "Add browsers" + selected: false + packages: + - opera + - vivaldi + - profile-sync-daemon + + - name: "Office" + description: "Add the office applications" + expanded: true + selected: true + subgroups: + + - name: "LibreOffice (base_system) (base_and_developer_edition) (full netinstall)" + selected: true + packages: + - libreoffice-fresh + - libreoffice-fresh-$LOCALE + - libreoffice-extension-languagetool + + - name: "OnlyOffice (full netinstall)" + selected: false + packages: + - onlyoffice-bin + + - name: "FreeOffice (full netinstall)" + selected: false + packages: + - freeoffice + + - name: "Media players (base_system) (base_and_developer_edition) (full netinstall)" + description: "Add the audio players" + selected: true + packages: + - ffmpeg-obs + - vlc-luajit + + - name: "Media players (base_system) (base_and_developer_edition) (full netinstall)" + description: "Add the audio players" + selected: true + packages: + - audacious + - elisa + - ffmpeg-obs + - vlc-luajit + + - name: "Picture editors (base_system) (base_and_developer_edition) (full netinstall)" + description: "Add the photo and picture editors" + selected: true + packages: + - gimp + - gimp-help-$LOCALE + - gvfs + - gvfs-afc + - gvfs-goa + - gvfs-google + - gvfs-gphoto2 + - gvfs-mtp + - gvfs-nfs + - gvfs-smb + - inkscape + - libdvdcss + - libgsf + - libopenraw + + - name: "Audio recorder (base_system) (base_and_developer_edition) (full netinstall)" + description: "Add the audio recorders" + selected: true + packages: + - audacity + - audio-recorder + + - name: "Video editors (base_system) (base_and_developer_edition) (full netinstall)" + description: "Add the video editors" + selected: true + packages: + - avidemux-cli + - avidemux-qt + + - name: "Media editors (full netinstall)" + description: "Add the photo and picture editors" + selected: false + packages: + - blender + - kdenlive + - krita + - openshot + - pinta + - pitivi + + - name: "Code IDE and programming language package (base_and_developer_edition) (full netinstall)" + description: "Add Code IDE and programming language package" + selected: true + packages: + - ansible-language-server + - base-devel + - bash-language-server + - boost + - boost-libs + - bpython + - ccache + - ckbcomp + - clang + - cmake + - codelldb + - dbeaver + - doxygen + - eslint-language-server + - extra-cmake-modules + - fakeroot + - gcc + - gcc-libs + - gdb + - git + - git-lfs + - icu69 + - jdk-openjdk + - jq + - lld + - lldb + - llvm + - llvm-libs + - lua-language-server + - make + - mypy + - nodejs + - npm + - perl + - python + - python-lsp-server + - python-pip + - python-poetry + - python-pytest-ruff + - python-ruff + - ruff + - ruff-lsp + - rust-analyzer + - rust-musl + - rustup + - sccache + - sqlitebrowser + - sublime-text-4 + - tailwindcss-language-server + - typescript + - typescript-language-server + - uv + - visual-studio-code-bin + - vscode-json-languageserver + - vue-language-server + - yaml-language-server + + - name: "Code IDE and programming language package (full netinstall)" + description: "Add Code IDE and programming language package" + selected: false + packages: + - github-cli + - github-desktop + + - name: "Mail applications" + description: "Add the mail applications" + expanded: true + selected: true + subgroups: + + - name: "Mailspring (base_system) (base_and_developer_edition) (full netinstall)" + description: "Add the mailspring" + selected: false + packages: + - mailspring + + - name: "Thunderbird (full netinstall)" + description: "Add the thunderbird" + selected: false + packages: + - thunderbird + - thunderbird-i18n-$LOCALE + + - name: "Chat applications (base_system) (base_and_developer_edition) (full netinstall)" + description: "Add the mail applications" + selected: true + packages: + - discord + - telegram-desktop + - zoom + + - name: "Chat applications (full netinstall)" + description: "Add the mail applications" + selected: false + packages: + - skypeforlinux-bin + + - name: "Passwords / keys applications (base_system) (base_and_developer_edition) (full netinstall)" + description: "Add the mail applications" + selected: true + packages: + - keepassxc + - kleopatra + + - name: "Desktop applications (base_and_developer_edition) (full netinstall)" + description: "Add the desktop applications" + selected: true + packages: + - buildtorrent + - mktorrent + + - name: "Desktop applications (base_system) (base_and_developer_edition) (full netinstall)" + description: "Add the desktop applications" + selected: true + packages: + - obsidian + - qbittorrent + - transmission-qt + - yakuake + + - name: "Desktop applications (full netinstall)" + description: "Add the desktop applications" + selected: false + packages: + - corectrl + - gwe + + - name: "Desktop applications (base_and_developer_edition) (full netinstall)" + description: "Add the desktop applications" + selected: true + packages: + - filezilla + - meld + + - name: "Desktop applications (base_system) (base_and_developer_edition) (full netinstall)" + description: "Add the desktop applications" + selected: true + packages: + - anydesk-bin + - ffmpeg-obs + - obs-studio-tytan652 + - qbittorrent + - vlc-luajit + - yakuake + - yandex-disk + - yandex-disk-indicator + + - name: "Bluetooth (base_system) (base_and_developer_edition) (full netinstall)" + description: "Bluetooth support" + selected: true + packages: + - bluetooth-support + - bluez + - bluez-hid2hci + - bluez-libs + - bluez-utils + + - name: "Printing support (base_system) (base_and_developer_edition) (full netinstall)" + description: "Support for printing (Cups)" + selected: true + packages: + - cups + - cups-browsed + - cups-filters + - cups-pdf + - foomatic-db + - foomatic-db-engine + - foomatic-db-gutenprint-ppds + - foomatic-db-nonfree + - foomatic-db-nonfree-ppds + - foomatic-db-ppds + - ghostscript + - gsfonts + - gutenprint + - hplip + - print-manager + - printer-support + - splix + - system-config-printer + + - name: "HP printer/scanner support (full netinstall)" + description: "Packages for HP printer/scanner" + selected: false + packages: + - hplip + - python-pyqt5 + - python-reportlab + - scanner-support + - simple-scan + - xsane + + - name: "Containers" + description: "Add the Docker, etc" + expanded: true + selected: true + subgroups: + + - name: "QEMU (base_and_developer_edition) (full netinstall)" + description: "Add the Docker, etc" + selected: true + packages: + - qemu-desktop + - virt-manager + - virt-viewer + - edk2-shell + - bridge-utils + - udiskie + - udisks2 + - networkmanager + - firewalld + + - name: "Docker (base_and_developer_edition) (full netinstall)" + description: "Add the Docker, etc" + selected: true + packages: + - docker + - docker-compose + - docker-machine + - docker-scan + - docker-buildx + - bridge-utils + - udiskie + - udisks2 + - networkmanager + - firewalld + + - name: "Portainer (full netinstall)" + description: "Add the Docker, etc" + selected: false + packages: + - portainer-bin + - udiskie + - udisks2 + - networkmanager + - firewalld + + - name: "Containers (full netinstall)" + description: "Add the Docker, etc" + selected: false + packages: + - podman + - podman-dnsname + - podman-compose + - podman-docker + - buildah + - cni-plugins + - netavark + - fuse-overlayfs + - udiskie + - udisks2 + - networkmanager + - firewalld + + - name: "VirtualBox (full netinstall)" + description: "Add the Docker, etc" + selected: false + packages: + - virtualbox + - virtualbox-host-dkms + - virtualbox-host-modules-arch + + - name: "Vagrant (full netinstall)" + description: "Add the Docker, etc" + selected: false + packages: + - vagrant + - udiskie + - udisks2 + - networkmanager + - firewalld + + - name: "Cockpit (full netinstall)" + description: "Admin panel" + selected: false + packages: + - cockpit + - cockpit-machines + - cockpit-pcp + - cockpit-podman + - cockpit-storaged + - udiskie + - udisks2 + - networkmanager + - firewalld + + - name: "Support (base_system) (base_and_developer_edition) (full netinstall)" + description: "Packages for other support" + selected: true + packages: + - input-devices-support + - laptop-detect + +- name: "GPU drivers" + description: "Recommended. Don't change unless you know what you're doing." + expanded: true + selected: true + critical: true + subgroups: + + - name: "Intel drivers (base_system) (base_and_developer_edition) (full netinstall)" + description: "Graphics hardware drivers" + selected: true + packages: + - libva-intel-driver + - libva-utils + + - name: "AMD drivers AMDGPU (base_system) (base_and_developer_edition) (full netinstall)" + description: "Graphics hardware drivers" + selected: true + packages: + - xf86-video-amdgpu + + - name: "AMD drivers ATI (manual choice)" + description: "Graphics hardware drivers" + selected: false + packages: + - xf86-video-ati + + - name: "NVIDIA drivers - Latest (202X) (base_system) (base_and_developer_edition) (full netinstall)" + description: "NVIDIA graphics hardware drivers: GeForce GTX TITAN X - NVIDIA GeForce RTX X090" + selected: true + packages: + - nvidia-dkms + - nvidia-settings + - nvidia-utils + - opencl-nvidia + + - name: "NVIDIA drivers - 525 (2023) (manual choice)" + description: "NVIDIA graphics hardware drivers: NVS 810 - NVIDIA RTX 6000 Ada Generation" + selected: false + packages: + - nvidia-525xx-dkms + - nvidia-525xx-settings + - nvidia-525xx-utils + + - name: "NVIDIA drivers - 470 (2021) (manual choice)" + description: "NVIDIA graphics hardware drivers: NVS 510 - NVIDIA RTX A6000" + selected: false + packages: + - nvidia-470xx-dkms + - nvidia-470xx-settings + - nvidia-470xx-utils + + - name: "NVIDIA drivers - 390 (2018) (manual choice)" + description: "NVIDIA graphics hardware drivers: GeForce GTX TITAN Z - GeForce GTX 1080 Ti)" + selected: false + packages: + - nvidia-390-settings + - nvidia-390xx-dkms + - nvidia-390xx-utils + + - name: "NVIDIA drivers - 340 (2014) (manual choice)" + description: "NVIDIA graphics hardware drivers: GeForce 8200M - GeForce GTX 880M" + selected: false + packages: + - nvidia-340xx-dkms + - nvidia-340xx-settings + - nvidia-340xx-utils + +- name: "Additional packages" + description: "Additional packages" + expanded: true + selected: false + subgroups: + + - name: "Kernel in addition (manual choice)" + description: "Adding kernel in addition to main one" + selected: false + critical: true + packages: + - linux-lts + - linux-lts-headers + + - linux + - linux-headers + + - linux-hardened + - linux-hardened-headers + + - linux-lqx + - linux-lqx-headers + + - linux-xanmod-lts + - linux-xanmod-lts-headers + + - linux-xanmod + - linux-xanmod-headers + + - linux-xanmod-anbox + - linux-xanmod-anbox-headers + + - linux-zen + - linux-zen-headers + + - name: "Desktop terminal (manual choice)" + description: "Add the desktop applications" + selected: false + packages: + - alacritty + - alacritty-themes + - kitty + - kitty-shell-integration + - kitty-terminfo + + - name: "Terminal applications (manual choice)" + description: "General terminal tools and applications" + selected: false + packages: + - browsh + - elinks + - links + - w3m + - glances + - micro + - xterm + + - name: "Media players" + description: "Add the audio players" + selected: false + packages: + - haruna + - mpv + + - name: "Package management (manual choice)" + description: "Packages tools" + selected: false + packages: + - discover + - octopi + - octopi-notifier-frameworks + +- name: "Accessibility Tools (manual choice)" + description: "Screen reader and mouse tweaks (impaired vision)" + selected: true + critical: true + packages: + - brltty + - espeak-ng + - imwheel + - mousetweaks + - orca diff --git a/src/modules/netinstall/build/_base_system.yaml b/src/modules/netinstall/build/_base_system.yaml new file mode 100644 index 0000000..dc75d99 --- /dev/null +++ b/src/modules/netinstall/build/_base_system.yaml @@ -0,0 +1,1344 @@ +- name: "Melawy Linux required (hidden) (base_system) (base_and_developer_edition) (full netinstall)" + description: "needed Melawy Linux packages" + hidden: true + expanded: false + selected: true + critical: true + packages: + - archlinux-keyring + - melawy-linux-keyring + - melawy-linux-mirrorlist + - cachyos-keyring + - cachyos-mirrorlist + - arcolinux-keyring + - arcolinux-mirrorlist-git + - chaotic-keyring + - chaotic-mirrorlist + - endeavouros-keyring + - endeavouros-mirrorlist + - manjaro-keyring + + - linux-atm + - linux-firmware + - linux-firmware-marvell + - linux-api-headers + - linux-cachyos + - linux-cachyos-headers + + - base + - base-devel + - appstream + - busybox + - edk2-shell + - chwd + - dracut + - gptfdisk + - iptables-nft + + - r8168-dkms + - rtl8821cu-morrownr-dkms-git + + - aic94xx-firmware + - ast-firmware + + - upd72020x-fw + - wd719x-firmware + + - pacman + - pacman-contrib + - pacman-mirrorlist + - pacseek + - pacutils + - plymouth + - refind + - systemd-ukify + - xf86-input-elographics + - xf86-input-evdev + - xf86-input-synaptics + - xf86-input-void + - xf86-video-fbdev + - fwupd + - fwupd-efi + + - melawy-branding + - melawy-check-reboot-required + - melawy-dracut-initramfs + - melawy-dracut-ukify + - melawy-etc-skel-std-powerman-kvantum + - melawy-skel-root + - melawy-refind-menu-generator + - melawy-welcome + +- name: "Performance (base_system) (base_and_developer_edition) (full netinstall)" + description: "needed Melawy Linux packages" + hidden: true + expanded: false + selected: true + critical: true + packages: + # - irqbalance + # - performance-tweaks + # - uksmd + # - uksmdstats + - ananicy-cpp + - cachyos-ananicy-rules-git + - bpftune + - cachyos-settings + - dbus-broker + - lua-filesystem + - powersave-tweaks + - preload + - realtime-privileges + - systemd-oomd-defaults + - zram-generator + +- name: "Terminal-Base + Common packages" + description: "Recommended. Don't change unless you know what you're doing." + hidden: true + expanded: false + selected: true + critical: true + subgroups: + + - name: "CPU specific microcode update packages (base_system) (base_and_developer_edition) (full netinstall)" + description: "Microcode update image for AMD and Intel CPUs" + selected: true + critical: true + packages: + - amd-ucode + - intel-ucode + + - name: "Virtual machines (base_system) (base_and_developer_edition) (full netinstall)" + description: "Required if OS run in virtual environment" + selected: true + packages: + - hyperv + - libvirt + - open-vm-tools + - qemu-guest-agent + - spice-vdagent + - virtualbox-guest-utils + - xf86-input-vmmouse + - xf86-video-qxl + - xf86-video-vmware + + - name: "Filesystem (base_system) (base_and_developer_edition) (full netinstall)" + description: "Filesystem tools and applications" + selected: true + packages: + - bcachefs-tools + - btrfs-progs + - cryfs + - dosfstools + - e2fsprogs + - efibootmgr + - efitools + - encfs + - exfatprogs + - f2fs-tools + - fatresize + - gocryptfs + - haveged + - jfsutils + - kpmcore + - kpmcore-bcachefs + - lvm2 + - mtpfs + - nfs-utils + - nilfs-utils + - ntfs-3g + - nvme-cli + - open-iscsi + - pcsclite + - reiserfsprogs + - samba-support + - sbsigntools + - smartmontools + - testdisk + - tracker3-miners + - udftools + - udiskie + - udisks2 + - usbmuxd + - xfsprogs + + - name: "BTRFS filesystem (base_system) (base_and_developer_edition) (full netinstall)" + description: "BTRFS filesystem tools and applications" + selected: true + packages: + - btrfs-assistant + - btrfs-snapshots + - btrfsmaintenance + - timeshift + - timeshift-autosnap + + - name: "Hardware (base_system) (base_and_developer_edition) (full netinstall)" + description: "Hardware support libs and firmware" + selected: true + packages: + - dmidecode + - dmraid + - edid-decode-git + - hdparm + - lsscsi + - mtools + - sdparm + - sg3_utils + - sof-firmware + + - name: "Power (base_system) (base_and_developer_edition) (full netinstall)" + description: "Powermanagement support" + selected: true + packages: + - cpupower + - power-profiles-daemon + - upower + + - name: "Terminal applications (base_system) (base_and_developer_edition) (full netinstall)" + description: "General terminal tools and applications" + selected: true + packages: + - bash-completion + - bat + - beep + - btop + - cloud-init + - cronie + - cryptsetup + - device-mapper + - dex + - dialog + - diffutils + - duf + - expect + - fastfetch + - find-the-command + - findutils + - fsarchiver + - git + - glances + - gpm + - hardinfo2 + - htop + - hw-probe + - hwdetect + - hwinfo + - iftop + - inetutils + - intltool + - inxi + - iotop-c + - less + - libfido2 + - libusb-compat + - logrotate + - lolcat + - lsb-release + - lshw + - lynx + - man-db + - man-pages + - mc + - mdadm + - mlocate + - most + - nano + - nano-syntax-highlighting + - neofetch + - neovim + - nmap + - ntp + - openbsd-netcat + - parallel + - powerline + - powerline-common + - powerline-fonts + - procps-ng + - pv + - python-defusedxml + - python-packaging + - python-pyparted + - ripgrep + - rsync + - s-nail + - screen + - screenfetch + - sed + - sshpass + - sudo + - sysfsutils + - syslog-ng + - tcpdump + - terminus-font + - texinfo + - the_silver_searcher + - tldr + - tmux + - tpm2-tools + - tpm2-tss + - translate-shell + - tree + - ttf-terminus-nerd + - unace + - unrar + - unzip + - usbutils + - ventoy-bin + - wget + - wget2 + - which + - xed + - xmlstarlet + - xz + - yad + - zenity + + - name: "Network (base_system) (base_and_developer_edition) (full netinstall)" + description: "Network apps drivers and tools" + selected: true + packages: + - avahi + - b43-fwcutter + - bridge-utils + - broadcom-wl-dkms + - darkhttpd + - dhclient + - dhcpcd + - dnsmasq + - dnsutils + - ethtool + - iw + - iwd + - ldns + - lftp + - libmicrohttpd + - libmtp + - mbedtls + - mbedtls2 + - mobile-broadband-provider-info + - modemmanager + - nbd + - ndisc6 + - net-tools + - netctl + - networkmanager + - networkmanager-openconnect + - networkmanager-openvpn + - networkmanager-pptp + - networkmanager-qt5 + - networkmanager-vpnc + - nss-mdns + - openconnect + - openssh + - openvpn + - ppp + - pptpclient + - rp-pppoe + - sequoia-sq + - shadowsocks-electron-bin + - smbclient + - systemd-resolvconf + - traceroute + - usb_modeswitch + - vpnc + - whois + - wireguard-tools + - wireless-regdb + - wireless_tools + - wpa_supplicant + - wvdial + - xl2tpd + + - name: "Audio (base_system) (base_and_developer_edition) (full netinstall)" + description: "Audio handling tools apps and libs" + selected: true + packages: + - alsa-firmware + - alsa-lib + - alsa-plugins + - alsa-utils + - lib32-pipewire + - pavucontrol + - pipewire + - pipewire-alsa + - pipewire-jack + - pipewire-pulse + - pipewire-support + - rtkit + - wireplumber + + - name: "X11-system (base_system) (base_and_developer_edition) (full netinstall)" + description: "Default X11 system" + selected: true + packages: + - libwnck3 + - mesa + - mesa-utils + - xf86-input-libinput + - xorg-server + - xorg-xdpyinfo + - xorg-xhost + - xorg-xinit + - xorg-xinput + - xorg-xkill + - xorg-xrandr + - xorg-xrdb + - xsettingsd + + - name: "V4L2 drivers (base_system) (base_and_developer_edition) (full netinstall)" + description: "V4L2 video, webcamera drivers" + selected: true + packages: + - v4l2loopback-dkms + + - name: "Firewall (base_system) (base_and_developer_edition) (full netinstall)" + description: "Firewall installed and enabled" + selected: true + critical: true + packages: + - firewalld + - python-capng + - python-pyqt5 + + - name: "Fonts (base_system) (base_and_developer_edition) (full netinstall)" + description: "Melawy Linux font selection" + selected: true + packages: + - awesome-terminal-fonts + - cantarell-fonts + - freetype2 + - noto-color-emoji-fontconfig + - noto-fonts + - noto-fonts-cjk + - noto-fonts-emoji + - noto-fonts-extra + - opendesktop-fonts + - ttf-droid + - ttf-font-awesome + - ttf-hack + - ttf-hack-nerd + - ttf-ms-fonts + - ttf-noto-nerd + - ttf-twemoji + + - name: "Fonts (base_system) (base_and_developer_edition) (full netinstall)" + description: "Melawy Linux font selection" + selected: true + packages: + - adobe-source-code-pro-fonts + - adobe-source-han-sans-cn-fonts + - adobe-source-han-sans-jp-fonts + - adobe-source-han-sans-kr-fonts + - awesome-terminal-fonts + - cantarell-fonts + - freetype2 + - noto-color-emoji-fontconfig + - noto-fonts + - noto-fonts-cjk + - noto-fonts-emoji + - otf-fira-mono + - otf-fira-sans + - otf-firamono-nerd + - ttf-bitstream-vera + - ttf-dejavu + - ttf-dejavu-nerd + - ttf-fira-code + - ttf-fira-sans + - ttf-firacode-nerd + - ttf-hack + - ttf-hack-nerd + - ttf-jetbrains-mono + - ttf-jetbrains-mono-nerd + - ttf-liberation + - ttf-liberation-mono-nerd + - ttf-ms-fonts + - ttf-nerd-fonts-symbols + - ttf-nerd-fonts-symbols-common + - ttf-nerd-fonts-symbols-mono + - ttf-noto-nerd + - ttf-opensans + - ttf-roboto + - ttf-roboto-mono + - ttf-roboto-mono-nerd + - ttf-sourcecodepro-nerd + - ttf-twemoji + - ttf-ubuntu-font-family + - ttf-ubuntu-mono-nerd + - ttf-ubuntu-nerd + + - name: "Spell (base_system) (base_and_developer_edition) (full netinstall)" + description: "Spell apps" + selected: true + packages: + - aspell + - aspell-$LOCALE + - aspell-en + - hunspell + - hunspell-$LOCALE + - hunspell-en_us + +- name: "Melawy Linux branding" + description: "Needed Melawy Linux packages" + hidden: true + selected: true + subgroups: + + - name: "Refind (base_system) (base_and_developer_edition) (full netinstall)" + description: "Boot loader screen" + selected: true + packages: + - melawy-refind-theme-fenek + - melawy-refind-theme-lera-sugar + - melawy-refind-theme-nier-a2 + + - name: "Plymouth (base_system) (base_and_developer_edition) (full netinstall)" + description: "Boot screen" + selected: true + packages: + - melawy-plymouth-theme-fenek + - melawy-plymouth-theme-lera-sugar + - melawy-plymouth-theme-nier-a2 + + - name: "Plymouth select (1 from list)" + description: "Boot screen" + selected: true + subgroups: + + - name: "Nier A2 theme" + selected: true + packages: + - melawy-plymouth-theme-hard-install-nier-a2 + - melawy-refind-theme-hard-install-nier-a2 + + - name: "Lera sugar theme" + selected: false + packages: + - melawy-plymouth-theme-hard-install-lera-sugar + - melawy-refind-theme-hard-install-lera-sugar + + - name: "Fenek theme" + selected: false + packages: + - melawy-plymouth-theme-hard-install-fenek + - melawy-refind-theme-hard-install-fenek + + - name: "Window decorators (base_system) (base_and_developer_edition) (full netinstall)" + selected: true + packages: + - klassy + - klassy-qt5 + - lightly-kf6-git + - lightlyshaders + - roundedsbe + + - name: "Base desktop theme (base_system) (base_and_developer_edition) (full netinstall)" + selected: true + packages: + - melawy-icon-theme-kde6 + - melawy-theme-kde6 + - melawy-plymouth-theme + - melawy-refind-theme + + - name: "Desktop theme Win11 (full netinstall)" + selected: false + packages: + - melawy-win11-icon-theme + - melawy-win11-icon-theme-special + - melawy-win11-icon-theme-white + - melawy-kde-theme-win11-kde6 + - melawy-kde-theme-win12-kde6 + + - name: "Desktop theme Colloid (full netinstall)" + selected: false + packages: + - colloid-cursors-git + - colloid-icon-theme-git + - colloid-gtk-theme-git + - colloid-kde-theme-git + + - name: "SDDM, KDE Plasma Look-and-feel, Wallpapers (base_system) (base_and_developer_edition) (full netinstall)" + selected: true + packages: + - melawy-kde-theme-nier-a2-kde6 + - melawy-kde-theme-lera-sugar-kde6 + - melawy-kde-theme-fenek-kde6 + + - name: "Cursors (base_system) (base_and_developer_edition) (full netinstall)" + selected: true + packages: + - melawy-purple-dark-cursors + - melawy-purple-dark-default-cursors + - melawy-purple-light-cursors + - melawy-purple-light-default-cursors + - melawy-red-dark-cursors + - melawy-red-dark-default-cursors + - melawy-red-light-cursors + - melawy-red-light-default-cursors + + # - name: "Start menu (base_system) (base_and_developer_edition) (full netinstall)" + # selected: true + # packages: + # - melawy-plasma-plasmoid-Menu11 + # - melawy-plasma-plasmoid-DittoMenu + # - melawy-plasma-plasmoid-OnzeMenuKDE + + - name: "Plasmoids (base_system) (base_and_developer_edition) (full netinstall)" + selected: true + packages: + - melawy-plasma-plasmoid-wallpaper-blur-effect-kde6 + - melawy-plasma-plasmoid-win7showdesktop-kde6 + + # - name: "Wallpapers YouTube" + # selected: false + # packages: + # - melawy-wallpapers-from-youtube + + - name: "Updater (base_system) (base_and_developer_edition) (full netinstall)" + selected: true + packages: + - melawy-arch-linux-updater + - melawy-arch-linux-updater-tray-icon + +- name: "Desktop integration" + description: "Useful helper tools and libs for desktop usage" + expanded: true + selected: true + subgroups: + + - name: "Fix applications style (base_system) (base_and_developer_edition) (full netinstall)" + description: "Desktop environment" + selected: true + packages: + # - adwaita-qt5 + # - adwaita-qt6 + - adw-gtk-theme + - adw-gtk3 + - gnome-settings-daemon + - gnome-themes-extra + - gsettings-desktop-schemas + - gsettings-qt + - gtk-engine-murrine + - kde-gtk-config + - lxappearance-gtk3 + - xdg-desktop-portal + - xdg-desktop-portal-kde + - hardcode-fixer-git + + - name: "KDE Plasma (base_system) (base_and_developer_edition) (full netinstall)" + description: "Desktop environment" + selected: true + packages: + - accountsservice + - akonadi + - akonadi-calendar + - akonadi-calendar-tools + - akonadi-contacts + - akonadi-import-wizard + - akonadi-notes + - akonadi-search + - akonadiconsole + - ark + - audiocd-kio + - blueberry + - bluedevil + - breeze + - breeze-gtk + - dolphin + - dolphin-plugins + - drkonqi + - feh + - ffmpegthumbnailer + - ffmpegthumbs + - file-roller + - flatpak-kcm + - flatpak-xdg-utils + - galculator + - gksu + - glfw + - gnome-firmware + - gnome-keyring + - gparted + - grsync + - gst-libav + - gst-plugin-pipewire + - gst-plugins-bad + - gst-plugins-base + - gst-plugins-good + - gst-plugins-ugly + - gstreamer + - gstreamer-meta + - gwenview + - karchive5 + - kate + - kcalc + - kde-cli-tools + - kde-gtk-config + - kde-system-meta + - kdeconnect + - kdegraphics-thumbnailers + - kdenetwork-filesharing + - kdeplasma-addons + - kfind + - kgamma + - kimageformats + - kimageformats5 + - kinfocenter + - kinit + - kio + - kio-admin + - kio-extras + - kio-fuse + - kmail + - kmail-account-wizard + - konsole + - kscreen + - ksshaskpass + - ksystemlog + - kvantum + - kwallet-pam + - kwalletmanager + - kwayland-integration + - kwin-effect-rounded-corners-git + - libappindicator-gtk3 + - malcontent + - maliit-keyboard + - mintstick-git + - network-manager-applet + - okular + - p7zip + - partitionmanager + - plasma + - plasma-browser-integration + - plasma-desktop + - plasma-disks + - plasma-firewall + - plasma-integration + - plasma-nm + - plasma-pa + - plasma-systemmonitor + - plasma-thunderbolt + - plasma-vault + - plasma-wayland-protocols + - plasma-workspace + - plasma-workspace-wallpapers + - plasma5-integration + - plymouth-kcm + - polkit + - polkit-kde-agent + - polkit-qt5 + - polkit-qt6 + - poppler-glib + - poppler-qt5 + - poppler-qt6 + - powerdevil + - qt5-imageformats + - qt5ct + - qt6-imageformats + - sddm + - sddm-kcm + - solid + - spectacle + - systemd-kcm + - tumbler + - variety + - xdg-desktop-portal + - xdg-desktop-portal-kde + - xdg-user-dirs + - xdg-user-dirs-gtk + - xdg-utils + - xwaylandvideobridge + + - name: "Package management (base_system) (base_and_developer_edition) (full netinstall)" + description: "Packages tools" + selected: true + packages: + - appimagelauncher + - downgrade + - expac + - flatpak + - libpamac-full + - melawy-pamac-helper + - ocs-url + - pace + - packagekit-qt5 + - packagekit-qt6 + - paclast + - pamac-all + - pamac-cli + - paru + - pkgfile + - rate-mirrors + - rebuild-detector + - reflector + - snapd + - snapd-glib + - sofirem-git + - topgrade + - yay + + - name: "Browsers and language package" + description: "Add firefox and language pack if possible and other browsers" + expanded: true + selected: true + subgroups: + + - name: "Firefox (base_system) (base_and_developer_edition) (full netinstall)" + description: "Add firefox and language pack" + selected: true + packages: + - firefox + - firefox-i18n-$LOCALE + - profile-sync-daemon + + - name: "Firefox (full netinstall)" + description: "Add firefox and language pack" + selected: false + packages: + - firefox-developer-edition + - firefox-developer-edition-i18n-$LOCALE + - profile-sync-daemon + + - name: "Other (full netinstall)" + description: "Add browsers" + selected: false + packages: + - google-chrome + - brave-bin + - profile-sync-daemon + + - name: "Other other ... (full netinstall)" + description: "Add browsers" + selected: false + packages: + - opera + - vivaldi + - profile-sync-daemon + + - name: "Office" + description: "Add the office applications" + expanded: true + selected: true + subgroups: + + - name: "LibreOffice (base_system) (base_and_developer_edition) (full netinstall)" + selected: true + packages: + - libreoffice-fresh + - libreoffice-fresh-$LOCALE + - libreoffice-extension-languagetool + + - name: "OnlyOffice (full netinstall)" + selected: false + packages: + - onlyoffice-bin + + - name: "FreeOffice (full netinstall)" + selected: false + packages: + - freeoffice + + - name: "Media players (base_system) (base_and_developer_edition) (full netinstall)" + description: "Add the audio players" + selected: true + packages: + - ffmpeg-obs + - vlc-luajit + + - name: "Media players (base_system) (base_and_developer_edition) (full netinstall)" + description: "Add the audio players" + selected: true + packages: + - audacious + - elisa + - ffmpeg-obs + - vlc-luajit + + - name: "Picture editors (base_system) (base_and_developer_edition) (full netinstall)" + description: "Add the photo and picture editors" + selected: true + packages: + - gimp + - gimp-help-$LOCALE + - gvfs + - gvfs-afc + - gvfs-goa + - gvfs-google + - gvfs-gphoto2 + - gvfs-mtp + - gvfs-nfs + - gvfs-smb + - inkscape + - libdvdcss + - libgsf + - libopenraw + + - name: "Audio recorder (base_system) (base_and_developer_edition) (full netinstall)" + description: "Add the audio recorders" + selected: true + packages: + - audacity + - audio-recorder + + - name: "Video editors (base_system) (base_and_developer_edition) (full netinstall)" + description: "Add the video editors" + selected: true + packages: + - avidemux-cli + - avidemux-qt + + - name: "Media editors (full netinstall)" + description: "Add the photo and picture editors" + selected: false + packages: + - blender + - kdenlive + - krita + - openshot + - pinta + - pitivi + + - name: "Code IDE and programming language package (base_and_developer_edition) (full netinstall)" + description: "Add Code IDE and programming language package" + selected: false + packages: + - ansible-language-server + - base-devel + - bash-language-server + - boost + - boost-libs + - bpython + - ccache + - ckbcomp + - clang + - cmake + - codelldb + - dbeaver + - doxygen + - eslint-language-server + - extra-cmake-modules + - fakeroot + - gcc + - gcc-libs + - gdb + - git + - git-lfs + - icu69 + - jdk-openjdk + - jq + - lld + - lldb + - llvm + - llvm-libs + - lua-language-server + - make + - mypy + - nodejs + - npm + - perl + - python + - python-lsp-server + - python-pip + - python-poetry + - python-pytest-ruff + - python-ruff + - ruff + - ruff-lsp + - rust-analyzer + - rust-musl + - rustup + - sccache + - sqlitebrowser + - sublime-text-4 + - tailwindcss-language-server + - typescript + - typescript-language-server + - uv + - visual-studio-code-bin + - vscode-json-languageserver + - vue-language-server + - yaml-language-server + + - name: "Code IDE and programming language package (full netinstall)" + description: "Add Code IDE and programming language package" + selected: false + packages: + - github-cli + - github-desktop + + - name: "Mail applications" + description: "Add the mail applications" + expanded: true + selected: true + subgroups: + + - name: "Mailspring (base_system) (base_and_developer_edition) (full netinstall)" + description: "Add the mailspring" + selected: false + packages: + - mailspring + + - name: "Thunderbird (full netinstall)" + description: "Add the thunderbird" + selected: false + packages: + - thunderbird + - thunderbird-i18n-$LOCALE + + - name: "Chat applications (base_system) (base_and_developer_edition) (full netinstall)" + description: "Add the mail applications" + selected: true + packages: + - discord + - telegram-desktop + - zoom + + - name: "Chat applications (full netinstall)" + description: "Add the mail applications" + selected: false + packages: + - skypeforlinux-bin + + - name: "Passwords / keys applications (base_system) (base_and_developer_edition) (full netinstall)" + description: "Add the mail applications" + selected: true + packages: + - keepassxc + - kleopatra + + - name: "Desktop applications (base_and_developer_edition) (full netinstall)" + description: "Add the desktop applications" + selected: false + packages: + - buildtorrent + - mktorrent + + - name: "Desktop applications (base_system) (base_and_developer_edition) (full netinstall)" + description: "Add the desktop applications" + selected: true + packages: + - obsidian + - qbittorrent + - transmission-qt + - yakuake + + - name: "Desktop applications (full netinstall)" + description: "Add the desktop applications" + selected: false + packages: + - corectrl + - gwe + + - name: "Desktop applications (base_and_developer_edition) (full netinstall)" + description: "Add the desktop applications" + selected: false + packages: + - filezilla + - meld + + - name: "Desktop applications (base_system) (base_and_developer_edition) (full netinstall)" + description: "Add the desktop applications" + selected: true + packages: + - anydesk-bin + - ffmpeg-obs + - obs-studio-tytan652 + - qbittorrent + - vlc-luajit + - yakuake + - yandex-disk + - yandex-disk-indicator + + - name: "Bluetooth (base_system) (base_and_developer_edition) (full netinstall)" + description: "Bluetooth support" + selected: true + packages: + - bluetooth-support + - bluez + - bluez-hid2hci + - bluez-libs + - bluez-utils + + - name: "Printing support (base_system) (base_and_developer_edition) (full netinstall)" + description: "Support for printing (Cups)" + selected: true + packages: + - cups + - cups-browsed + - cups-filters + - cups-pdf + - foomatic-db + - foomatic-db-engine + - foomatic-db-gutenprint-ppds + - foomatic-db-nonfree + - foomatic-db-nonfree-ppds + - foomatic-db-ppds + - ghostscript + - gsfonts + - gutenprint + - hplip + - print-manager + - printer-support + - splix + - system-config-printer + + - name: "HP printer/scanner support (full netinstall)" + description: "Packages for HP printer/scanner" + selected: false + packages: + - hplip + - python-pyqt5 + - python-reportlab + - scanner-support + - simple-scan + - xsane + + - name: "Containers" + description: "Add the Docker, etc" + expanded: true + selected: true + subgroups: + + - name: "QEMU (base_and_developer_edition) (full netinstall)" + description: "Add the Docker, etc" + selected: false + packages: + - qemu-desktop + - virt-manager + - virt-viewer + - edk2-shell + - bridge-utils + - udiskie + - udisks2 + - networkmanager + - firewalld + + - name: "Docker (base_and_developer_edition) (full netinstall)" + description: "Add the Docker, etc" + selected: false + packages: + - docker + - docker-compose + - docker-machine + - docker-scan + - docker-buildx + - bridge-utils + - udiskie + - udisks2 + - networkmanager + - firewalld + + - name: "Portainer (full netinstall)" + description: "Add the Docker, etc" + selected: false + packages: + - portainer-bin + - udiskie + - udisks2 + - networkmanager + - firewalld + + - name: "Containers (full netinstall)" + description: "Add the Docker, etc" + selected: false + packages: + - podman + - podman-dnsname + - podman-compose + - podman-docker + - buildah + - cni-plugins + - netavark + - fuse-overlayfs + - udiskie + - udisks2 + - networkmanager + - firewalld + + - name: "VirtualBox (full netinstall)" + description: "Add the Docker, etc" + selected: false + packages: + - virtualbox + - virtualbox-host-dkms + - virtualbox-host-modules-arch + + - name: "Vagrant (full netinstall)" + description: "Add the Docker, etc" + selected: false + packages: + - vagrant + - udiskie + - udisks2 + - networkmanager + - firewalld + + - name: "Cockpit (full netinstall)" + description: "Admin panel" + selected: false + packages: + - cockpit + - cockpit-machines + - cockpit-pcp + - cockpit-podman + - cockpit-storaged + - udiskie + - udisks2 + - networkmanager + - firewalld + + - name: "Support (base_system) (base_and_developer_edition) (full netinstall)" + description: "Packages for other support" + selected: true + packages: + - input-devices-support + - laptop-detect + +- name: "GPU drivers" + description: "Recommended. Don't change unless you know what you're doing." + expanded: true + selected: true + critical: true + subgroups: + + - name: "Intel drivers (base_system) (base_and_developer_edition) (full netinstall)" + description: "Graphics hardware drivers" + selected: true + packages: + - libva-intel-driver + - libva-utils + + - name: "AMD drivers AMDGPU (base_system) (base_and_developer_edition) (full netinstall)" + description: "Graphics hardware drivers" + selected: true + packages: + - xf86-video-amdgpu + + - name: "AMD drivers ATI (manual choice)" + description: "Graphics hardware drivers" + selected: false + packages: + - xf86-video-ati + + - name: "NVIDIA drivers - Latest (202X) (base_system) (base_and_developer_edition) (full netinstall)" + description: "NVIDIA graphics hardware drivers: GeForce GTX TITAN X - NVIDIA GeForce RTX X090" + selected: true + packages: + - nvidia-dkms + - nvidia-settings + - nvidia-utils + - opencl-nvidia + + - name: "NVIDIA drivers - 525 (2023) (manual choice)" + description: "NVIDIA graphics hardware drivers: NVS 810 - NVIDIA RTX 6000 Ada Generation" + selected: false + packages: + - nvidia-525xx-dkms + - nvidia-525xx-settings + - nvidia-525xx-utils + + - name: "NVIDIA drivers - 470 (2021) (manual choice)" + description: "NVIDIA graphics hardware drivers: NVS 510 - NVIDIA RTX A6000" + selected: false + packages: + - nvidia-470xx-dkms + - nvidia-470xx-settings + - nvidia-470xx-utils + + - name: "NVIDIA drivers - 390 (2018) (manual choice)" + description: "NVIDIA graphics hardware drivers: GeForce GTX TITAN Z - GeForce GTX 1080 Ti)" + selected: false + packages: + - nvidia-390-settings + - nvidia-390xx-dkms + - nvidia-390xx-utils + + - name: "NVIDIA drivers - 340 (2014) (manual choice)" + description: "NVIDIA graphics hardware drivers: GeForce 8200M - GeForce GTX 880M" + selected: false + packages: + - nvidia-340xx-dkms + - nvidia-340xx-settings + - nvidia-340xx-utils + +- name: "Additional packages" + description: "Additional packages" + expanded: true + selected: false + subgroups: + + - name: "Kernel in addition (manual choice)" + description: "Adding kernel in addition to main one" + selected: false + critical: true + packages: + - linux-lts + - linux-lts-headers + + - linux + - linux-headers + + - linux-hardened + - linux-hardened-headers + + - linux-lqx + - linux-lqx-headers + + - linux-xanmod-lts + - linux-xanmod-lts-headers + + - linux-xanmod + - linux-xanmod-headers + + - linux-xanmod-anbox + - linux-xanmod-anbox-headers + + - linux-zen + - linux-zen-headers + + - name: "Desktop terminal (manual choice)" + description: "Add the desktop applications" + selected: false + packages: + - alacritty + - alacritty-themes + - kitty + - kitty-shell-integration + - kitty-terminfo + + - name: "Terminal applications (manual choice)" + description: "General terminal tools and applications" + selected: false + packages: + - browsh + - elinks + - links + - w3m + - glances + - micro + - xterm + + - name: "Media players" + description: "Add the audio players" + selected: false + packages: + - haruna + - mpv + + - name: "Package management (manual choice)" + description: "Packages tools" + selected: false + packages: + - discover + - octopi + - octopi-notifier-frameworks + +- name: "Accessibility Tools (manual choice)" + description: "Screen reader and mouse tweaks (impaired vision)" + selected: true + critical: true + packages: + - brltty + - espeak-ng + - imwheel + - mousetweaks + - orca diff --git a/src/modules/netinstall/build/_netinstall_only.yaml b/src/modules/netinstall/build/_netinstall_only.yaml new file mode 100644 index 0000000..920da09 --- /dev/null +++ b/src/modules/netinstall/build/_netinstall_only.yaml @@ -0,0 +1,1344 @@ +- name: "Melawy Linux required (hidden) (base_system) (base_and_developer_edition) (full netinstall)" + description: "needed Melawy Linux packages" + hidden: true + expanded: false + selected: true + critical: true + packages: + - archlinux-keyring + - melawy-linux-keyring + - melawy-linux-mirrorlist + - cachyos-keyring + - cachyos-mirrorlist + - arcolinux-keyring + - arcolinux-mirrorlist-git + - chaotic-keyring + - chaotic-mirrorlist + - endeavouros-keyring + - endeavouros-mirrorlist + - manjaro-keyring + + - linux-atm + - linux-firmware + - linux-firmware-marvell + - linux-api-headers + - linux-cachyos + - linux-cachyos-headers + + - base + - base-devel + - appstream + - busybox + - edk2-shell + - chwd + - dracut + - gptfdisk + - iptables-nft + + - r8168-dkms + - rtl8821cu-morrownr-dkms-git + + - aic94xx-firmware + - ast-firmware + + - upd72020x-fw + - wd719x-firmware + + - pacman + - pacman-contrib + - pacman-mirrorlist + - pacseek + - pacutils + - plymouth + - refind + - systemd-ukify + - xf86-input-elographics + - xf86-input-evdev + - xf86-input-synaptics + - xf86-input-void + - xf86-video-fbdev + - fwupd + - fwupd-efi + + - melawy-branding + - melawy-check-reboot-required + - melawy-dracut-initramfs + - melawy-dracut-ukify + - melawy-etc-skel-std-powerman-kvantum + - melawy-skel-root + - melawy-refind-menu-generator + - melawy-welcome + +- name: "Performance (base_system) (base_and_developer_edition) (full netinstall)" + description: "needed Melawy Linux packages" + hidden: true + expanded: false + selected: true + critical: true + packages: + # - irqbalance + # - performance-tweaks + # - uksmd + # - uksmdstats + - ananicy-cpp + - cachyos-ananicy-rules-git + - bpftune + - cachyos-settings + - dbus-broker + - lua-filesystem + - powersave-tweaks + - preload + - realtime-privileges + - systemd-oomd-defaults + - zram-generator + +- name: "Terminal-Base + Common packages" + description: "Recommended. Don't change unless you know what you're doing." + hidden: true + expanded: false + selected: true + critical: true + subgroups: + + - name: "CPU specific microcode update packages (base_system) (base_and_developer_edition) (full netinstall)" + description: "Microcode update image for AMD and Intel CPUs" + selected: true + critical: true + packages: + - amd-ucode + - intel-ucode + + - name: "Virtual machines (base_system) (base_and_developer_edition) (full netinstall)" + description: "Required if OS run in virtual environment" + selected: true + packages: + - hyperv + - libvirt + - open-vm-tools + - qemu-guest-agent + - spice-vdagent + - virtualbox-guest-utils + - xf86-input-vmmouse + - xf86-video-qxl + - xf86-video-vmware + + - name: "Filesystem (base_system) (base_and_developer_edition) (full netinstall)" + description: "Filesystem tools and applications" + selected: true + packages: + - bcachefs-tools + - btrfs-progs + - cryfs + - dosfstools + - e2fsprogs + - efibootmgr + - efitools + - encfs + - exfatprogs + - f2fs-tools + - fatresize + - gocryptfs + - haveged + - jfsutils + - kpmcore + - kpmcore-bcachefs + - lvm2 + - mtpfs + - nfs-utils + - nilfs-utils + - ntfs-3g + - nvme-cli + - open-iscsi + - pcsclite + - reiserfsprogs + - samba-support + - sbsigntools + - smartmontools + - testdisk + - tracker3-miners + - udftools + - udiskie + - udisks2 + - usbmuxd + - xfsprogs + + - name: "BTRFS filesystem (base_system) (base_and_developer_edition) (full netinstall)" + description: "BTRFS filesystem tools and applications" + selected: true + packages: + - btrfs-assistant + - btrfs-snapshots + - btrfsmaintenance + - timeshift + - timeshift-autosnap + + - name: "Hardware (base_system) (base_and_developer_edition) (full netinstall)" + description: "Hardware support libs and firmware" + selected: true + packages: + - dmidecode + - dmraid + - edid-decode-git + - hdparm + - lsscsi + - mtools + - sdparm + - sg3_utils + - sof-firmware + + - name: "Power (base_system) (base_and_developer_edition) (full netinstall)" + description: "Powermanagement support" + selected: true + packages: + - cpupower + - power-profiles-daemon + - upower + + - name: "Terminal applications (base_system) (base_and_developer_edition) (full netinstall)" + description: "General terminal tools and applications" + selected: true + packages: + - bash-completion + - bat + - beep + - btop + - cloud-init + - cronie + - cryptsetup + - device-mapper + - dex + - dialog + - diffutils + - duf + - expect + - fastfetch + - find-the-command + - findutils + - fsarchiver + - git + - glances + - gpm + - hardinfo2 + - htop + - hw-probe + - hwdetect + - hwinfo + - iftop + - inetutils + - intltool + - inxi + - iotop-c + - less + - libfido2 + - libusb-compat + - logrotate + - lolcat + - lsb-release + - lshw + - lynx + - man-db + - man-pages + - mc + - mdadm + - mlocate + - most + - nano + - nano-syntax-highlighting + - neofetch + - neovim + - nmap + - ntp + - openbsd-netcat + - parallel + - powerline + - powerline-common + - powerline-fonts + - procps-ng + - pv + - python-defusedxml + - python-packaging + - python-pyparted + - ripgrep + - rsync + - s-nail + - screen + - screenfetch + - sed + - sshpass + - sudo + - sysfsutils + - syslog-ng + - tcpdump + - terminus-font + - texinfo + - the_silver_searcher + - tldr + - tmux + - tpm2-tools + - tpm2-tss + - translate-shell + - tree + - ttf-terminus-nerd + - unace + - unrar + - unzip + - usbutils + - ventoy-bin + - wget + - wget2 + - which + - xed + - xmlstarlet + - xz + - yad + - zenity + + - name: "Network (base_system) (base_and_developer_edition) (full netinstall)" + description: "Network apps drivers and tools" + selected: true + packages: + - avahi + - b43-fwcutter + - bridge-utils + - broadcom-wl-dkms + - darkhttpd + - dhclient + - dhcpcd + - dnsmasq + - dnsutils + - ethtool + - iw + - iwd + - ldns + - lftp + - libmicrohttpd + - libmtp + - mbedtls + - mbedtls2 + - mobile-broadband-provider-info + - modemmanager + - nbd + - ndisc6 + - net-tools + - netctl + - networkmanager + - networkmanager-openconnect + - networkmanager-openvpn + - networkmanager-pptp + - networkmanager-qt5 + - networkmanager-vpnc + - nss-mdns + - openconnect + - openssh + - openvpn + - ppp + - pptpclient + - rp-pppoe + - sequoia-sq + - shadowsocks-electron-bin + - smbclient + - systemd-resolvconf + - traceroute + - usb_modeswitch + - vpnc + - whois + - wireguard-tools + - wireless-regdb + - wireless_tools + - wpa_supplicant + - wvdial + - xl2tpd + + - name: "Audio (base_system) (base_and_developer_edition) (full netinstall)" + description: "Audio handling tools apps and libs" + selected: true + packages: + - alsa-firmware + - alsa-lib + - alsa-plugins + - alsa-utils + - lib32-pipewire + - pavucontrol + - pipewire + - pipewire-alsa + - pipewire-jack + - pipewire-pulse + - pipewire-support + - rtkit + - wireplumber + + - name: "X11-system (base_system) (base_and_developer_edition) (full netinstall)" + description: "Default X11 system" + selected: true + packages: + - libwnck3 + - mesa + - mesa-utils + - xf86-input-libinput + - xorg-server + - xorg-xdpyinfo + - xorg-xhost + - xorg-xinit + - xorg-xinput + - xorg-xkill + - xorg-xrandr + - xorg-xrdb + - xsettingsd + + - name: "V4L2 drivers (base_system) (base_and_developer_edition) (full netinstall)" + description: "V4L2 video, webcamera drivers" + selected: true + packages: + - v4l2loopback-dkms + + - name: "Firewall (base_system) (base_and_developer_edition) (full netinstall)" + description: "Firewall installed and enabled" + selected: true + critical: true + packages: + - firewalld + - python-capng + - python-pyqt5 + + - name: "Fonts (base_system) (base_and_developer_edition) (full netinstall)" + description: "Melawy Linux font selection" + selected: true + packages: + - awesome-terminal-fonts + - cantarell-fonts + - freetype2 + - noto-color-emoji-fontconfig + - noto-fonts + - noto-fonts-cjk + - noto-fonts-emoji + - noto-fonts-extra + - opendesktop-fonts + - ttf-droid + - ttf-font-awesome + - ttf-hack + - ttf-hack-nerd + - ttf-ms-fonts + - ttf-noto-nerd + - ttf-twemoji + + - name: "Fonts (base_system) (base_and_developer_edition) (full netinstall)" + description: "Melawy Linux font selection" + selected: false + packages: + - adobe-source-code-pro-fonts + - adobe-source-han-sans-cn-fonts + - adobe-source-han-sans-jp-fonts + - adobe-source-han-sans-kr-fonts + - awesome-terminal-fonts + - cantarell-fonts + - freetype2 + - noto-color-emoji-fontconfig + - noto-fonts + - noto-fonts-cjk + - noto-fonts-emoji + - otf-fira-mono + - otf-fira-sans + - otf-firamono-nerd + - ttf-bitstream-vera + - ttf-dejavu + - ttf-dejavu-nerd + - ttf-fira-code + - ttf-fira-sans + - ttf-firacode-nerd + - ttf-hack + - ttf-hack-nerd + - ttf-jetbrains-mono + - ttf-jetbrains-mono-nerd + - ttf-liberation + - ttf-liberation-mono-nerd + - ttf-ms-fonts + - ttf-nerd-fonts-symbols + - ttf-nerd-fonts-symbols-common + - ttf-nerd-fonts-symbols-mono + - ttf-noto-nerd + - ttf-opensans + - ttf-roboto + - ttf-roboto-mono + - ttf-roboto-mono-nerd + - ttf-sourcecodepro-nerd + - ttf-twemoji + - ttf-ubuntu-font-family + - ttf-ubuntu-mono-nerd + - ttf-ubuntu-nerd + + - name: "Spell (base_system) (base_and_developer_edition) (full netinstall)" + description: "Spell apps" + selected: true + packages: + - aspell + - aspell-$LOCALE + - aspell-en + - hunspell + - hunspell-$LOCALE + - hunspell-en_us + +- name: "Melawy Linux branding" + description: "Needed Melawy Linux packages" + hidden: true + selected: true + subgroups: + + - name: "Refind (base_system) (base_and_developer_edition) (full netinstall)" + description: "Boot loader screen" + selected: true + packages: + - melawy-refind-theme-fenek + - melawy-refind-theme-lera-sugar + - melawy-refind-theme-nier-a2 + + - name: "Plymouth (base_system) (base_and_developer_edition) (full netinstall)" + description: "Boot screen" + selected: true + packages: + - melawy-plymouth-theme-fenek + - melawy-plymouth-theme-lera-sugar + - melawy-plymouth-theme-nier-a2 + + - name: "Plymouth select (1 from list)" + description: "Boot screen" + selected: true + subgroups: + + - name: "Nier A2 theme" + selected: true + packages: + - melawy-plymouth-theme-hard-install-nier-a2 + - melawy-refind-theme-hard-install-nier-a2 + + - name: "Lera sugar theme" + selected: false + packages: + - melawy-plymouth-theme-hard-install-lera-sugar + - melawy-refind-theme-hard-install-lera-sugar + + - name: "Fenek theme" + selected: false + packages: + - melawy-plymouth-theme-hard-install-fenek + - melawy-refind-theme-hard-install-fenek + + - name: "Window decorators (base_system) (base_and_developer_edition) (full netinstall)" + selected: true + packages: + - klassy + - klassy-qt5 + - lightly-kf6-git + - lightlyshaders + - roundedsbe + + - name: "Base desktop theme (base_system) (base_and_developer_edition) (full netinstall)" + selected: true + packages: + - melawy-icon-theme-kde6 + - melawy-theme-kde6 + - melawy-plymouth-theme + - melawy-refind-theme + + - name: "Desktop theme Win11 (full netinstall)" + selected: false + packages: + - melawy-win11-icon-theme + - melawy-win11-icon-theme-special + - melawy-win11-icon-theme-white + - melawy-kde-theme-win11-kde6 + - melawy-kde-theme-win12-kde6 + + - name: "Desktop theme Colloid (full netinstall)" + selected: false + packages: + - colloid-cursors-git + - colloid-icon-theme-git + - colloid-gtk-theme-git + - colloid-kde-theme-git + + - name: "SDDM, KDE Plasma Look-and-feel, Wallpapers (base_system) (base_and_developer_edition) (full netinstall)" + selected: true + packages: + - melawy-kde-theme-nier-a2-kde6 + - melawy-kde-theme-lera-sugar-kde6 + - melawy-kde-theme-fenek-kde6 + + - name: "Cursors (base_system) (base_and_developer_edition) (full netinstall)" + selected: true + packages: + - melawy-purple-dark-cursors + - melawy-purple-dark-default-cursors + - melawy-purple-light-cursors + - melawy-purple-light-default-cursors + - melawy-red-dark-cursors + - melawy-red-dark-default-cursors + - melawy-red-light-cursors + - melawy-red-light-default-cursors + + # - name: "Start menu (base_system) (base_and_developer_edition) (full netinstall)" + # selected: true + # packages: + # - melawy-plasma-plasmoid-Menu11 + # - melawy-plasma-plasmoid-DittoMenu + # - melawy-plasma-plasmoid-OnzeMenuKDE + + - name: "Plasmoids (base_system) (base_and_developer_edition) (full netinstall)" + selected: true + packages: + - melawy-plasma-plasmoid-wallpaper-blur-effect-kde6 + - melawy-plasma-plasmoid-win7showdesktop-kde6 + + # - name: "Wallpapers YouTube" + # selected: false + # packages: + # - melawy-wallpapers-from-youtube + + - name: "Updater (base_system) (base_and_developer_edition) (full netinstall)" + selected: true + packages: + - melawy-arch-linux-updater + - melawy-arch-linux-updater-tray-icon + +- name: "Desktop integration" + description: "Useful helper tools and libs for desktop usage" + expanded: true + selected: true + subgroups: + + - name: "Fix applications style (base_system) (base_and_developer_edition) (full netinstall)" + description: "Desktop environment" + selected: true + packages: + # - adwaita-qt5 + # - adwaita-qt6 + - adw-gtk-theme + - adw-gtk3 + - gnome-settings-daemon + - gnome-themes-extra + - gsettings-desktop-schemas + - gsettings-qt + - gtk-engine-murrine + - kde-gtk-config + - lxappearance-gtk3 + - xdg-desktop-portal + - xdg-desktop-portal-kde + - hardcode-fixer-git + + - name: "KDE Plasma (base_system) (base_and_developer_edition) (full netinstall)" + description: "Desktop environment" + selected: true + packages: + - accountsservice + - akonadi + - akonadi-calendar + - akonadi-calendar-tools + - akonadi-contacts + - akonadi-import-wizard + - akonadi-notes + - akonadi-search + - akonadiconsole + - ark + - audiocd-kio + - blueberry + - bluedevil + - breeze + - breeze-gtk + - dolphin + - dolphin-plugins + - drkonqi + - feh + - ffmpegthumbnailer + - ffmpegthumbs + - file-roller + - flatpak-kcm + - flatpak-xdg-utils + - galculator + - gksu + - glfw + - gnome-firmware + - gnome-keyring + - gparted + - grsync + - gst-libav + - gst-plugin-pipewire + - gst-plugins-bad + - gst-plugins-base + - gst-plugins-good + - gst-plugins-ugly + - gstreamer + - gstreamer-meta + - gwenview + - karchive5 + - kate + - kcalc + - kde-cli-tools + - kde-gtk-config + - kde-system-meta + - kdeconnect + - kdegraphics-thumbnailers + - kdenetwork-filesharing + - kdeplasma-addons + - kfind + - kgamma + - kimageformats + - kimageformats5 + - kinfocenter + - kinit + - kio + - kio-admin + - kio-extras + - kio-fuse + - kmail + - kmail-account-wizard + - konsole + - kscreen + - ksshaskpass + - ksystemlog + - kvantum + - kwallet-pam + - kwalletmanager + - kwayland-integration + - kwin-effect-rounded-corners-git + - libappindicator-gtk3 + - malcontent + - maliit-keyboard + - mintstick-git + - network-manager-applet + - okular + - p7zip + - partitionmanager + - plasma + - plasma-browser-integration + - plasma-desktop + - plasma-disks + - plasma-firewall + - plasma-integration + - plasma-nm + - plasma-pa + - plasma-systemmonitor + - plasma-thunderbolt + - plasma-vault + - plasma-wayland-protocols + - plasma-workspace + - plasma-workspace-wallpapers + - plasma5-integration + - plymouth-kcm + - polkit + - polkit-kde-agent + - polkit-qt5 + - polkit-qt6 + - poppler-glib + - poppler-qt5 + - poppler-qt6 + - powerdevil + - qt5-imageformats + - qt5ct + - qt6-imageformats + - sddm + - sddm-kcm + - solid + - spectacle + - systemd-kcm + - tumbler + - variety + - xdg-desktop-portal + - xdg-desktop-portal-kde + - xdg-user-dirs + - xdg-user-dirs-gtk + - xdg-utils + - xwaylandvideobridge + + - name: "Package management (base_system) (base_and_developer_edition) (full netinstall)" + description: "Packages tools" + selected: true + packages: + - appimagelauncher + - downgrade + - expac + - flatpak + - libpamac-full + - melawy-pamac-helper + - ocs-url + - pace + - packagekit-qt5 + - packagekit-qt6 + - paclast + - pamac-all + - pamac-cli + - paru + - pkgfile + - rate-mirrors + - rebuild-detector + - reflector + - snapd + - snapd-glib + - sofirem-git + - topgrade + - yay + + - name: "Browsers and language package" + description: "Add firefox and language pack if possible and other browsers" + expanded: true + selected: true + subgroups: + + - name: "Firefox (base_system) (base_and_developer_edition) (full netinstall)" + description: "Add firefox and language pack" + selected: true + packages: + - firefox + - firefox-i18n-$LOCALE + - profile-sync-daemon + + - name: "Firefox (full netinstall)" + description: "Add firefox and language pack" + selected: false + packages: + - firefox-developer-edition + - firefox-developer-edition-i18n-$LOCALE + - profile-sync-daemon + + - name: "Other (full netinstall)" + description: "Add browsers" + selected: false + packages: + - google-chrome + - brave-bin + - profile-sync-daemon + + - name: "Other other ... (full netinstall)" + description: "Add browsers" + selected: false + packages: + - opera + - vivaldi + - profile-sync-daemon + + - name: "Office" + description: "Add the office applications" + expanded: true + selected: true + subgroups: + + - name: "LibreOffice (base_system) (base_and_developer_edition) (full netinstall)" + selected: false + packages: + - libreoffice-fresh + - libreoffice-fresh-$LOCALE + - libreoffice-extension-languagetool + + - name: "OnlyOffice (full netinstall)" + selected: false + packages: + - onlyoffice-bin + + - name: "FreeOffice (full netinstall)" + selected: false + packages: + - freeoffice + + - name: "Media players (base_system) (base_and_developer_edition) (full netinstall)" + description: "Add the audio players" + selected: true + packages: + - ffmpeg-obs + - vlc-luajit + + - name: "Media players (base_system) (base_and_developer_edition) (full netinstall)" + description: "Add the audio players" + selected: false + packages: + - audacious + - elisa + - ffmpeg-obs + - vlc-luajit + + - name: "Picture editors (base_system) (base_and_developer_edition) (full netinstall)" + description: "Add the photo and picture editors" + selected: false + packages: + - gimp + - gimp-help-$LOCALE + - gvfs + - gvfs-afc + - gvfs-goa + - gvfs-google + - gvfs-gphoto2 + - gvfs-mtp + - gvfs-nfs + - gvfs-smb + - inkscape + - libdvdcss + - libgsf + - libopenraw + + - name: "Audio recorder (base_system) (base_and_developer_edition) (full netinstall)" + description: "Add the audio recorders" + selected: false + packages: + - audacity + - audio-recorder + + - name: "Video editors (base_system) (base_and_developer_edition) (full netinstall)" + description: "Add the video editors" + selected: false + packages: + - avidemux-cli + - avidemux-qt + + - name: "Media editors (full netinstall)" + description: "Add the photo and picture editors" + selected: false + packages: + - blender + - kdenlive + - krita + - openshot + - pinta + - pitivi + + - name: "Code IDE and programming language package (base_and_developer_edition) (full netinstall)" + description: "Add Code IDE and programming language package" + selected: false + packages: + - ansible-language-server + - base-devel + - bash-language-server + - boost + - boost-libs + - bpython + - ccache + - ckbcomp + - clang + - cmake + - codelldb + - dbeaver + - doxygen + - eslint-language-server + - extra-cmake-modules + - fakeroot + - gcc + - gcc-libs + - gdb + - git + - git-lfs + - icu69 + - jdk-openjdk + - jq + - lld + - lldb + - llvm + - llvm-libs + - lua-language-server + - make + - mypy + - nodejs + - npm + - perl + - python + - python-lsp-server + - python-pip + - python-poetry + - python-pytest-ruff + - python-ruff + - ruff + - ruff-lsp + - rust-analyzer + - rust-musl + - rustup + - sccache + - sqlitebrowser + - sublime-text-4 + - tailwindcss-language-server + - typescript + - typescript-language-server + - uv + - visual-studio-code-bin + - vscode-json-languageserver + - vue-language-server + - yaml-language-server + + - name: "Code IDE and programming language package (full netinstall)" + description: "Add Code IDE and programming language package" + selected: false + packages: + - github-cli + - github-desktop + + - name: "Mail applications" + description: "Add the mail applications" + expanded: true + selected: true + subgroups: + + - name: "Mailspring (base_system) (base_and_developer_edition) (full netinstall)" + description: "Add the mailspring" + selected: false + packages: + - mailspring + + - name: "Thunderbird (full netinstall)" + description: "Add the thunderbird" + selected: false + packages: + - thunderbird + - thunderbird-i18n-$LOCALE + + - name: "Chat applications (base_system) (base_and_developer_edition) (full netinstall)" + description: "Add the mail applications" + selected: false + packages: + - discord + - telegram-desktop + - zoom + + - name: "Chat applications (full netinstall)" + description: "Add the mail applications" + selected: false + packages: + - skypeforlinux-bin + + - name: "Passwords / keys applications (base_system) (base_and_developer_edition) (full netinstall)" + description: "Add the mail applications" + selected: true + packages: + - keepassxc + - kleopatra + + - name: "Desktop applications (base_and_developer_edition) (full netinstall)" + description: "Add the desktop applications" + selected: false + packages: + - buildtorrent + - mktorrent + + - name: "Desktop applications (base_system) (base_and_developer_edition) (full netinstall)" + description: "Add the desktop applications" + selected: true + packages: + - obsidian + - qbittorrent + - transmission-qt + - yakuake + + - name: "Desktop applications (full netinstall)" + description: "Add the desktop applications" + selected: false + packages: + - corectrl + - gwe + + - name: "Desktop applications (base_and_developer_edition) (full netinstall)" + description: "Add the desktop applications" + selected: false + packages: + - filezilla + - meld + + - name: "Desktop applications (base_system) (base_and_developer_edition) (full netinstall)" + description: "Add the desktop applications" + selected: true + packages: + - anydesk-bin + - ffmpeg-obs + - obs-studio-tytan652 + - qbittorrent + - vlc-luajit + - yakuake + - yandex-disk + - yandex-disk-indicator + + - name: "Bluetooth (base_system) (base_and_developer_edition) (full netinstall)" + description: "Bluetooth support" + selected: true + packages: + - bluetooth-support + - bluez + - bluez-hid2hci + - bluez-libs + - bluez-utils + + - name: "Printing support (base_system) (base_and_developer_edition) (full netinstall)" + description: "Support for printing (Cups)" + selected: false + packages: + - cups + - cups-browsed + - cups-filters + - cups-pdf + - foomatic-db + - foomatic-db-engine + - foomatic-db-gutenprint-ppds + - foomatic-db-nonfree + - foomatic-db-nonfree-ppds + - foomatic-db-ppds + - ghostscript + - gsfonts + - gutenprint + - hplip + - print-manager + - printer-support + - splix + - system-config-printer + + - name: "HP printer/scanner support (full netinstall)" + description: "Packages for HP printer/scanner" + selected: false + packages: + - hplip + - python-pyqt5 + - python-reportlab + - scanner-support + - simple-scan + - xsane + + - name: "Containers" + description: "Add the Docker, etc" + expanded: true + selected: true + subgroups: + + - name: "QEMU (base_and_developer_edition) (full netinstall)" + description: "Add the Docker, etc" + selected: false + packages: + - qemu-desktop + - virt-manager + - virt-viewer + - edk2-shell + - bridge-utils + - udiskie + - udisks2 + - networkmanager + - firewalld + + - name: "Docker (base_and_developer_edition) (full netinstall)" + description: "Add the Docker, etc" + selected: false + packages: + - docker + - docker-compose + - docker-machine + - docker-scan + - docker-buildx + - bridge-utils + - udiskie + - udisks2 + - networkmanager + - firewalld + + - name: "Portainer (full netinstall)" + description: "Add the Docker, etc" + selected: false + packages: + - portainer-bin + - udiskie + - udisks2 + - networkmanager + - firewalld + + - name: "Containers (full netinstall)" + description: "Add the Docker, etc" + selected: false + packages: + - podman + - podman-dnsname + - podman-compose + - podman-docker + - buildah + - cni-plugins + - netavark + - fuse-overlayfs + - udiskie + - udisks2 + - networkmanager + - firewalld + + - name: "VirtualBox (full netinstall)" + description: "Add the Docker, etc" + selected: false + packages: + - virtualbox + - virtualbox-host-dkms + - virtualbox-host-modules-arch + + - name: "Vagrant (full netinstall)" + description: "Add the Docker, etc" + selected: false + packages: + - vagrant + - udiskie + - udisks2 + - networkmanager + - firewalld + + - name: "Cockpit (full netinstall)" + description: "Admin panel" + selected: false + packages: + - cockpit + - cockpit-machines + - cockpit-pcp + - cockpit-podman + - cockpit-storaged + - udiskie + - udisks2 + - networkmanager + - firewalld + + - name: "Support (base_system) (base_and_developer_edition) (full netinstall)" + description: "Packages for other support" + selected: true + packages: + - input-devices-support + - laptop-detect + +- name: "GPU drivers" + description: "Recommended. Don't change unless you know what you're doing." + expanded: true + selected: true + critical: true + subgroups: + + - name: "Intel drivers (base_system) (base_and_developer_edition) (full netinstall)" + description: "Graphics hardware drivers" + selected: true + packages: + - libva-intel-driver + - libva-utils + + - name: "AMD drivers AMDGPU (base_system) (base_and_developer_edition) (full netinstall)" + description: "Graphics hardware drivers" + selected: true + packages: + - xf86-video-amdgpu + + - name: "AMD drivers ATI (manual choice)" + description: "Graphics hardware drivers" + selected: false + packages: + - xf86-video-ati + + - name: "NVIDIA drivers - Latest (202X) (base_system) (base_and_developer_edition) (full netinstall)" + description: "NVIDIA graphics hardware drivers: GeForce GTX TITAN X - NVIDIA GeForce RTX X090" + selected: true + packages: + - nvidia-dkms + - nvidia-settings + - nvidia-utils + - opencl-nvidia + + - name: "NVIDIA drivers - 525 (2023) (manual choice)" + description: "NVIDIA graphics hardware drivers: NVS 810 - NVIDIA RTX 6000 Ada Generation" + selected: false + packages: + - nvidia-525xx-dkms + - nvidia-525xx-settings + - nvidia-525xx-utils + + - name: "NVIDIA drivers - 470 (2021) (manual choice)" + description: "NVIDIA graphics hardware drivers: NVS 510 - NVIDIA RTX A6000" + selected: false + packages: + - nvidia-470xx-dkms + - nvidia-470xx-settings + - nvidia-470xx-utils + + - name: "NVIDIA drivers - 390 (2018) (manual choice)" + description: "NVIDIA graphics hardware drivers: GeForce GTX TITAN Z - GeForce GTX 1080 Ti)" + selected: false + packages: + - nvidia-390-settings + - nvidia-390xx-dkms + - nvidia-390xx-utils + + - name: "NVIDIA drivers - 340 (2014) (manual choice)" + description: "NVIDIA graphics hardware drivers: GeForce 8200M - GeForce GTX 880M" + selected: false + packages: + - nvidia-340xx-dkms + - nvidia-340xx-settings + - nvidia-340xx-utils + +- name: "Additional packages" + description: "Additional packages" + expanded: true + selected: false + subgroups: + + - name: "Kernel in addition (manual choice)" + description: "Adding kernel in addition to main one" + selected: false + critical: true + packages: + - linux-lts + - linux-lts-headers + + - linux + - linux-headers + + - linux-hardened + - linux-hardened-headers + + - linux-lqx + - linux-lqx-headers + + - linux-xanmod-lts + - linux-xanmod-lts-headers + + - linux-xanmod + - linux-xanmod-headers + + - linux-xanmod-anbox + - linux-xanmod-anbox-headers + + - linux-zen + - linux-zen-headers + + - name: "Desktop terminal (manual choice)" + description: "Add the desktop applications" + selected: false + packages: + - alacritty + - alacritty-themes + - kitty + - kitty-shell-integration + - kitty-terminfo + + - name: "Terminal applications (manual choice)" + description: "General terminal tools and applications" + selected: false + packages: + - browsh + - elinks + - links + - w3m + - glances + - micro + - xterm + + - name: "Media players" + description: "Add the audio players" + selected: false + packages: + - haruna + - mpv + + - name: "Package management (manual choice)" + description: "Packages tools" + selected: false + packages: + - discover + - octopi + - octopi-notifier-frameworks + +- name: "Accessibility Tools (manual choice)" + description: "Screen reader and mouse tweaks (impaired vision)" + selected: true + critical: true + packages: + - brltty + - espeak-ng + - imwheel + - mousetweaks + - orca diff --git a/src/modules/netinstall/netinstall.conf b/src/modules/netinstall/netinstall.conf new file mode 100644 index 0000000..43344e7 --- /dev/null +++ b/src/modules/netinstall/netinstall.conf @@ -0,0 +1,382 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# +### Netinstall module +# +# The netinstall module allows distribution maintainers to ship minimal ISOs +# with only a basic set of preinstalled packages. At installation time, the +# user is presented with the choice to install groups of packages from a +# predefined list. +# +# Calamares will then use the *packages* module to install the packages. +# Without a *packages* module in the exec phase somewhere **after** +# this netinstall, nothing will actually get installed. The packages +# module must be correctly configured **and** the package manager must +# be runnable from within the installed system at the point where it +# is invoked, otherwise you'll get nothing. +# +# There are two basic deployment schemes: +# - static package lists; the packages do not change for this release. +# In this case, the package list file may be on the ISO-image itself +# as a separate file, **or** included in this configuration file. +# Either will do; separate file is easier to update independently +# of the Calamares configuration, while merged configurations use +# fewer files overall and are closer to self-documenting. +# - online package lists; the package list is fetched from a remote +# URL and handled otherwise like a static list. This can be useful +# if the package list needs updating during the lifetime of an ISO- +# image, e.g. packages are added or renamed. +# +# There is only one required key for this module, *groupsUrl*. +# +# This module supports multiple instances through the *label* key, +# which allows you to distinguish them in the UI. +--- +# The *groupsUrl* determines where the data for the netinstall groups-and- +# packages comes from. The value of the key may be: +# +# - a single string (this is treated as a list with just that string in it) +# - a list of strings +# +# Each string is treated as a URL (see below for special cases. The +# list is examined **in order** and each URL is tried in turn. The +# first URL to load successfully -- even if it yields 0 packages -- +# ends the process. This allows using a network URL and a (fallback) +# local URL for package lists, or for using multiple mirrors of +# netinstall data. +# +# The URL must point to a YAML file that follows the format described +# below at the key *groups* -- except for the special case URL "local". +# Note that the contents of the groups file is the **important** +# part of the configuration of this module. It specifies what +# groups and packages the user may select (and so what commands are to +# be run to install them). +# +# The format of the groups file is the same as the format of the +# *groups* key described below, **except** that a stand-alone +# groups file does not have to have the top-level *groups* key. +# (It **may** have one, though, for instance when you copy +# this configuration file to `netinstall.yaml` and key *groups* +# must have a list-of-groups as value; if the file does not have +# a top-level key *groups*, then the file must contain only a list of groups. +# +# Each item in the list *groupsUrl* may be: +# - A remote URL like `http://example.org/netinstall.php` +# - A local file URL like `file:///usr/share/calamares/netinstall.yaml` +# - The special-case literal string `local` +# +# Non-special case URLs are loaded as YAML; if the load succeeds, then +# they are interpreted like the *groups* key below. The special case +# `local` loads the data directly from **this** file. +# +#groupsUrl: local + +# Alternate form: +# groupsUrl: [ local ] + +# sets default netinstall package groups list, first fetches from the net. +# second will be used as fallback if fetching fails + +# groupsUrl: +# - https://raw.githubusercontent.com/CachyOS/cachyos-calamares/cachyos-refind/src/modules/netinstall/netinstall.yaml +# - file:///etc/calamares/modules/netinstall.yaml + +# Net-based package list, with fallback to local file +# groupsUrl: +# - http://example.com/calamares/netinstall.yaml +# - file:///etc/calamares/modules/netinstall.yaml + +# groupsUrl: +# - file:///etc/calamares/modules/netinstall.yaml + +groupsUrl: + - https://git.melawy.ru/Installer/melawy-calamares-qt6-3.3.6-stable/raw/branch/calamares/src/modules/netinstall/netinstall.yaml + - file:///etc/calamares/modules/netinstall.yaml + +# If the installation can proceed without netinstall (e.g. the Live CD +# can create a working installed system, but netinstall is preferred +# to bring it up-to-date or extend functionality) leave this set to +# false (the default). If set to true, the netinstall data is required. +# +# This only has an effect if the netinstall data cannot be retrieved, +# or is corrupt: having "required" set, means the install cannot proceed. +# For local or file: type *groupsUrl* settings, this setting is not +# really meaningful. + +required: true + +# To support multiple instances of this module, +# some strings are configurable and translatable here. +# Sub-keys under *label* are used for the user interface. +# - *sidebar* This is the name of the module in the progress-tree / sidebar +# in Calamares. +# - *title* This is displayed above the list of packages. +# If no *sidebar* values are provided, defaults to "Package selection" +# and existing translations. If no *title* values are provided, no string +# is displayed. +# +# Translations are handled through `[ll]` notation, much like in +# `.desktop` files. The string associated with `key[ll]` is used for +# *key* when when the language *ll* (language-code, like *nl* or *en_GB* +# or *ja*) is used. +# +# The following strings are **already** known to Calamares and can be +# listed here in *untranslated* form (e.g. as value of *sidebar*) +# without bothering with the translations: they are picked up from +# the regular translation framework: +# - "Package selection" +# - "Office software" +# - "Office package" +# - "Browser software" +# - "Browser package" +# - "Web browser" +# - "Kernel" +# - "Services" +# - "Login" +# - "Desktop" +# - "Applications" +# - "Communication" +# - "Development" +# - "Office" +# - "Multimedia" +# - "Internet" +# - "Theming" +# - "Gaming" +# - "Utilities" + +# Other strings should follow the translations format. +label: + sidebar: "Packages" + sidebar[de]: "Pakete" + sidebar[fi]: "Paketit" + sidebar[fr]: "Paquets" + sidebar[it]: "Pacchetti" + sidebar[sp]: "Paquetes" + sidebar[ru]: "Пакеты" + sidebar[zh_CN]: "软件包" + sidebar[ja]: "パッケージ" + sidebar[sv]: "Paket" + sidebar[pt_BR]: "Pacotes" + sidebar[tr]: "Paketler" + sidebar[ro]: "Pachete" + sidebar[ko]: "꾸러미" + title: "Packages (overview of packages to install and a possibility to refine your selection)" + title[de]: "Pakete (Übersicht der zu installierenden Pakete und eine Möglichkeit deine Auswahl zu verfeinern)" + title[fi]: "Paketit (yleiskatsaus asennettavista paketeista ja mahdollisuus tarkentaa valintoja)" + title[fr]: "Paquets (aperçu des paquets à installer et possibilité d'affiner ta sélection)" + title[it]: "Pacchetti (panoramica dei pacchetti da installare e possibilità di raffinare la selezione)" + title[es]: "Paquetes (resumen de los paquetes a instalar y posibilidad de afinar la selección)" + title[ru]: "Пакеты (обзор устанавливаемых пакетов и возможность уточнить свой выбор)" + title[zh_CN]: "软件包(要安装的软件包的概述,并有可能完善你的选择)" + title[ja]: "パッケージ (インストールされるパッケージの概要と、選択内容を絞り込むことができます)" + title[sv]: "Paket (översikt av paket att installera och en möjlighet att ändra dina val" + title[pt_BR]: "Pacotes (visão geral dos pacotes a instalar e possibilidade de refinar a sua seleção)" + title[tr]: "Paketler (yüklenecek paketlere genel bakış ve seçiminizi iyileştirme imkanı)" + title[ro]: "Pachete (un rezumat al pachetelor care urmează să fie instalate și posibilitatea de a ajusta fin selecția lor)" + title[ko]: "꾸러미 (설치할 꾸러미를 살펴보고 선택을 할 수 있습니다)" + +# If, and only if, *groupsUrl* is set to the literal string `local`, +# groups data is read from this file. The value of *groups* must be +# a list. Each item in the list is a group (of packages, or subgroups, +# or both). A standalone groups file contains just the list, +# (without the top-level *groups* key, or just the top-level *groups* +# key and with the list as its value, like in this file). +# +# Using `local` is recommended only for small static package lists. +# Here it is used for documentation purposes. +# +# +### Groups Format +# +# Each item in the list describes one group. The following keys are +# required for each group: +# +# - *name* of the group; short and human-readable. Shown in the first +# column of the UI. +# - *description* of the group; longer and human-readable. Shown in the +# second column of the UI. This is one of the things that visually +# distinguishes groups (with descriptions) from packages (without). +# - *packages*, a list of packages that belong to this group. +# The items of the *packages* list are actual package names +# as passed to the package manager (e.g. `qt5-creator-dev`). +# This list may be empty (e.g. if your group contains only +# subgroups). This key isn't **really** required, either -- +# one of *subgroups* or *packages* is. +# +# The following keys are **optional** for a group: +# +# - *hidden*: if true, do not show the group on the page. Defaults to false. +# - *selected*: if true, display the group as selected. Defaults to the +# parent group's value, if there is a parent group; top-level groups +# are set to true by default. +# - *critical*: if true, make the installation process fail if installing +# any of the packages in the group fails. Otherwise, just log a warning. +# Defaults to false. If not set in a subgroup (see below), inherits from +# the parent group. +# - *immutable*: if true, the state of the group (and all its subgroups) +# cannot be changed; no packages can be selected or deselected. No +# checkboxes are show for the group. Setting *immutable* to true +# really only makes sense in combination with *selected* set to true, +# so that the packages will be installed. (Setting a group to immutable +# can be seen as removing it from the user-interface.) +# - *noncheckable*: if true, the entire group cannot be selected or +# deselected by a single click. This does not affect any subgroups +# or child packages +# - *expanded*: if true, the group is shown in an expanded form (that is, +# not-collapsed) in the treeview on start. This only affects the user- +# interface. Only top-level groups are show expanded-initially. +# - *subgroups*: if present this follows the same structure as the top level +# groups, allowing sub-groups of packages to an arbitary depth. +# - *pre-install*: an optional command to run within the new system before +# the group's packages are installed. It will run before **each** package in +# the group is installed. +# - *post-install*: an optional command to run within the new system after +# the group's packages are installed. It will run after **each** package in +# the group is installed. +# +# If you set both *hidden* and *selected* for a top-level group, you are +# creating a "default" group of packages which will always be installed +# in the user's system. Hidden selected subgroups are installed if their +# parent is selected. Setting *hidden* to true without *selected*, or with +# *selected* set to false, is kind of pointless and will generate a warning. +# +# The *pre-install* and *post-install* commands are **not** passed to +# a shell; see the **packages** module configuration (i.e. `packages.conf`) +# for details. To use a full shell pipeline, call the shell explicitly. +# +# Non-critical groups are installed by calling the package manager +# individually, once for each package (and ignoring errors), while +# critical packages are installed in one single call to the package +# manager (and errors cause the installation to terminate). +# +# +# +# The *groups* key below contains some common patterns for packages +# and sub-groups, with documentation. + + +# groups: +# # This group is hidden, so the name and description are not really +# # important. Since it is selected, these packages will be installed. +# # It's non-critical, so they are installed one-by-one. +# # +# # This is a good approach for something you want up-to-date installed +# # in the target system every time. +# - name: "Default" +# description: "Default group" +# hidden: true +# selected: true +# critical: false +# packages: +# - base +# - chakra-live-skel +# # The Shells group contains only subgroups, no packages itself. +# # The *critical* value is set for the subgroups that do not +# # override it; *selected* is set to false but because one of +# # the subgroups sets *selected* to true, the overall state of +# # **this** group is partly-selected. +# # +# # Each of the sub-groups lists a bunch of packages that can +# # be individually selected, so a user can pick (for instance) +# # just one of the ZSH packages if they like. +# - name: "Shells" +# description: "Shells" +# hidden: false +# selected: false +# critical: true +# subgroups: +# - name: "Bash" +# description: "Bourne Again Shell" +# selected: true +# packages: +# - bash +# - bash-completion +# - name: "Zsh" +# description: "Zee shell, boss" +# packages: +# - zsh +# - zsh-completion +# - zsh-extensions +# # The kernel group has no checkbox, because it is immutable. +# # It can be (manually) expanded, and the packages inside it +# # will be shown, also without checkboxes. This is a way to +# # inform users that something will always be installed, +# # sort of like a hidden+selected group but visible. +# - name: "Kernel" +# description: "Kernel bits" +# hidden: false +# selected: true +# critical: true +# immutable: true +# packages: +# - kernel +# - kernel-debugsym +# - kernel-nvidia +# # *selected* defaults to true for top-level +# - name: Communications +# description: "Communications Software" +# packages: +# - ruqola +# - konversation +# - nheko +# - quaternion +# # Setting *selected* is supported. Here we also show off "rich" +# # packages: ones with a package-name (for the package-manager) +# # and a description (for the human). +# - name: Editors +# description: "Editing" +# selected: false +# packages: +# - vi +# - emacs +# - nano +# - name: kate-git +# description: Kate (unstable) +# - name: kate +# description: KDE's text editor +# # The "bare" package names can be intimidating, so you can use subgroups +# # to provide human-readable names while hiding the packages themselves. +# # This also allows you you group related packages -- suppose you feel +# # that KDevelop should be installed always with PHP and Python support, +# # but that support is split into multiple packages. +# # +# # So this subgroup (IDE) contains subgroups, one for each "package" +# # we want to install. Each of those subgroups (Emacs, KDevelop) +# # in turn contains **one** bogus subgroup, which then has the list +# # of relevant packages. This extra-level-of-subgrouping allows us +# # to list packages, while giving human-readable names. +# # +# # The name of the internal subgroup doesn't matter -- it is hidden +# # from the user -- so we can give them all bogus names and +# # descriptions, even the same name. Here, we use "Bogus". You +# # can re-use the subgroup name, it doesn't really matter. +# # +# # Each internal subgroup is set to *hidden*, so it does not show up +# # as an entry in the list, and it is set to *selected*, +# # so that if you select its parent subgroup, the packages from +# # the subgroup are selected with it and get installed. +# - name: IDE +# description: "Development Environment" +# selected: false +# subgroups: +# - name: Emacs +# description: LISP environment and editor +# subgroups: +# - name: Bogus +# description: Bogus +# hidden: true +# selected: true +# packages: +# - emacs +# - name: KDevelop +# description: KDE's C++, PHP and Python environment +# subgroups: +# - name: Bogus +# description: Bogus +# hidden: true +# selected: true +# packages: +# - kdevelop +# - kdevelop-dev +# - kdev-php +# - kdev-python diff --git a/src/modules/netinstall/netinstall.yaml b/src/modules/netinstall/netinstall.yaml new file mode 100644 index 0000000..f4300f3 --- /dev/null +++ b/src/modules/netinstall/netinstall.yaml @@ -0,0 +1,1344 @@ +- name: "Melawy Linux required (hidden) (base_system) (base_and_developer_edition) (full netinstall)" + description: "needed Melawy Linux packages" + hidden: true + expanded: false + selected: true + critical: true + packages: + - archlinux-keyring + - melawy-linux-keyring + - melawy-linux-mirrorlist + - cachyos-keyring + - cachyos-mirrorlist + - arcolinux-keyring + - arcolinux-mirrorlist-git + - chaotic-keyring + - chaotic-mirrorlist + - endeavouros-keyring + - endeavouros-mirrorlist + - manjaro-keyring + + - linux-atm + - linux-firmware + - linux-firmware-marvell + - linux-api-headers + - linux-cachyos + - linux-cachyos-headers + + - base + - base-devel + - appstream + - busybox + - edk2-shell + - chwd + - dracut + - gptfdisk + - iptables-nft + + - r8168-dkms + - rtl8821cu-morrownr-dkms-git + + - aic94xx-firmware + - ast-firmware + + - upd72020x-fw + - wd719x-firmware + + - pacman + - pacman-contrib + - pacman-mirrorlist + - pacseek + - pacutils + - plymouth + - refind + - systemd-ukify + - xf86-input-elographics + - xf86-input-evdev + - xf86-input-synaptics + - xf86-input-void + - xf86-video-fbdev + - fwupd + - fwupd-efi + + - melawy-branding + - melawy-check-reboot-required + - melawy-dracut-initramfs + - melawy-dracut-ukify + - melawy-etc-skel-std-powerman-kvantum + - melawy-skel-root + - melawy-refind-menu-generator + - melawy-welcome + +- name: "Performance (base_system) (base_and_developer_edition) (full netinstall)" + description: "needed Melawy Linux packages" + hidden: true + expanded: false + selected: true + critical: true + packages: + # - irqbalance + # - performance-tweaks + # - uksmd + # - uksmdstats + - ananicy-cpp + - cachyos-ananicy-rules-git + - bpftune + - cachyos-settings + - dbus-broker + - lua-filesystem + - powersave-tweaks + - preload + - realtime-privileges + - systemd-oomd-defaults + - zram-generator + +- name: "Terminal-Base + Common packages" + description: "Recommended. Don't change unless you know what you're doing." + hidden: true + expanded: false + selected: true + critical: true + subgroups: + + - name: "CPU specific microcode update packages (base_system) (base_and_developer_edition) (full netinstall)" + description: "Microcode update image for AMD and Intel CPUs" + selected: true + critical: true + packages: + - amd-ucode + - intel-ucode + + - name: "Virtual machines (base_system) (base_and_developer_edition) (full netinstall)" + description: "Required if OS run in virtual environment" + selected: true + packages: + - hyperv + - libvirt + - open-vm-tools + - qemu-guest-agent + - spice-vdagent + - virtualbox-guest-utils + - xf86-input-vmmouse + - xf86-video-qxl + - xf86-video-vmware + + - name: "Filesystem (base_system) (base_and_developer_edition) (full netinstall)" + description: "Filesystem tools and applications" + selected: true + packages: + - bcachefs-tools + - btrfs-progs + - cryfs + - dosfstools + - e2fsprogs + - efibootmgr + - efitools + - encfs + - exfatprogs + - f2fs-tools + - fatresize + - gocryptfs + - haveged + - jfsutils + - kpmcore + - kpmcore-bcachefs + - lvm2 + - mtpfs + - nfs-utils + - nilfs-utils + - ntfs-3g + - nvme-cli + - open-iscsi + - pcsclite + - reiserfsprogs + - samba-support + - sbsigntools + - smartmontools + - testdisk + - tracker3-miners + - udftools + - udiskie + - udisks2 + - usbmuxd + - xfsprogs + + - name: "BTRFS filesystem (base_system) (base_and_developer_edition) (full netinstall)" + description: "BTRFS filesystem tools and applications" + selected: true + packages: + - btrfs-assistant + - btrfs-snapshots + - btrfsmaintenance + - timeshift + - timeshift-autosnap + + - name: "Hardware (base_system) (base_and_developer_edition) (full netinstall)" + description: "Hardware support libs and firmware" + selected: true + packages: + - dmidecode + - dmraid + - edid-decode-git + - hdparm + - lsscsi + - mtools + - sdparm + - sg3_utils + - sof-firmware + + - name: "Power (base_system) (base_and_developer_edition) (full netinstall)" + description: "Powermanagement support" + selected: true + packages: + - cpupower + - power-profiles-daemon + - upower + + - name: "Terminal applications (base_system) (base_and_developer_edition) (full netinstall)" + description: "General terminal tools and applications" + selected: true + packages: + - bash-completion + - bat + - beep + - btop + - cloud-init + - cronie + - cryptsetup + - device-mapper + - dex + - dialog + - diffutils + - duf + - expect + - fastfetch + - find-the-command + - findutils + - fsarchiver + - git + - glances + - gpm + - hardinfo2 + - htop + - hw-probe + - hwdetect + - hwinfo + - iftop + - inetutils + - intltool + - inxi + - iotop-c + - less + - libfido2 + - libusb-compat + - logrotate + - lolcat + - lsb-release + - lshw + - lynx + - man-db + - man-pages + - mc + - mdadm + - mlocate + - most + - nano + - nano-syntax-highlighting + - neofetch + - neovim + - nmap + - ntp + - openbsd-netcat + - parallel + - powerline + - powerline-common + - powerline-fonts + - procps-ng + - pv + - python-defusedxml + - python-packaging + - python-pyparted + - ripgrep + - rsync + - s-nail + - screen + - screenfetch + - sed + - sshpass + - sudo + - sysfsutils + - syslog-ng + - tcpdump + - terminus-font + - texinfo + - the_silver_searcher + - tldr + - tmux + - tpm2-tools + - tpm2-tss + - translate-shell + - tree + - ttf-terminus-nerd + - unace + - unrar + - unzip + - usbutils + - ventoy-bin + - wget + - wget2 + - which + - xed + - xmlstarlet + - xz + - yad + - zenity + + - name: "Network (base_system) (base_and_developer_edition) (full netinstall)" + description: "Network apps drivers and tools" + selected: true + packages: + - avahi + - b43-fwcutter + - bridge-utils + - broadcom-wl-dkms + - darkhttpd + - dhclient + - dhcpcd + - dnsmasq + - dnsutils + - ethtool + - iw + - iwd + - ldns + - lftp + - libmicrohttpd + - libmtp + - mbedtls + - mbedtls2 + - mobile-broadband-provider-info + - modemmanager + - nbd + - ndisc6 + - net-tools + - netctl + - networkmanager + - networkmanager-openconnect + - networkmanager-openvpn + - networkmanager-pptp + - networkmanager-qt5 + - networkmanager-vpnc + - nss-mdns + - openconnect + - openssh + - openvpn + - ppp + - pptpclient + - rp-pppoe + - sequoia-sq + - shadowsocks-electron-bin + - smbclient + - systemd-resolvconf + - traceroute + - usb_modeswitch + - vpnc + - whois + - wireguard-tools + - wireless-regdb + - wireless_tools + - wpa_supplicant + - wvdial + - xl2tpd + + - name: "Audio (base_system) (base_and_developer_edition) (full netinstall)" + description: "Audio handling tools apps and libs" + selected: true + packages: + - alsa-firmware + - alsa-lib + - alsa-plugins + - alsa-utils + - lib32-pipewire + - pavucontrol + - pipewire + - pipewire-alsa + - pipewire-jack + - pipewire-pulse + - pipewire-support + - rtkit + - wireplumber + + - name: "X11-system (base_system) (base_and_developer_edition) (full netinstall)" + description: "Default X11 system" + selected: true + packages: + - libwnck3 + - mesa + - mesa-utils + - xf86-input-libinput + - xorg-server + - xorg-xdpyinfo + - xorg-xhost + - xorg-xinit + - xorg-xinput + - xorg-xkill + - xorg-xrandr + - xorg-xrdb + - xsettingsd + + - name: "V4L2 drivers (base_system) (base_and_developer_edition) (full netinstall)" + description: "V4L2 video, webcamera drivers" + selected: true + packages: + - v4l2loopback-dkms + + - name: "Firewall (base_system) (base_and_developer_edition) (full netinstall)" + description: "Firewall installed and enabled" + selected: true + critical: true + packages: + - firewalld + - python-capng + - python-pyqt5 + + - name: "Fonts (base_system) (base_and_developer_edition) (full netinstall)" + description: "Melawy Linux font selection" + selected: true + packages: + - awesome-terminal-fonts + - cantarell-fonts + - freetype2 + - noto-color-emoji-fontconfig + - noto-fonts + - noto-fonts-cjk + - noto-fonts-emoji + - noto-fonts-extra + - opendesktop-fonts + - ttf-droid + - ttf-font-awesome + - ttf-hack + - ttf-hack-nerd + - ttf-ms-fonts + - ttf-noto-nerd + - ttf-twemoji + + - name: "Fonts (base_system) (base_and_developer_edition) (full netinstall)" + description: "Melawy Linux font selection" + selected: true + packages: + - adobe-source-code-pro-fonts + - adobe-source-han-sans-cn-fonts + - adobe-source-han-sans-jp-fonts + - adobe-source-han-sans-kr-fonts + - awesome-terminal-fonts + - cantarell-fonts + - freetype2 + - noto-color-emoji-fontconfig + - noto-fonts + - noto-fonts-cjk + - noto-fonts-emoji + - otf-fira-mono + - otf-fira-sans + - otf-firamono-nerd + - ttf-bitstream-vera + - ttf-dejavu + - ttf-dejavu-nerd + - ttf-fira-code + - ttf-fira-sans + - ttf-firacode-nerd + - ttf-hack + - ttf-hack-nerd + - ttf-jetbrains-mono + - ttf-jetbrains-mono-nerd + - ttf-liberation + - ttf-liberation-mono-nerd + - ttf-ms-fonts + - ttf-nerd-fonts-symbols + - ttf-nerd-fonts-symbols-common + - ttf-nerd-fonts-symbols-mono + - ttf-noto-nerd + - ttf-opensans + - ttf-roboto + - ttf-roboto-mono + - ttf-roboto-mono-nerd + - ttf-sourcecodepro-nerd + - ttf-twemoji + - ttf-ubuntu-font-family + - ttf-ubuntu-mono-nerd + - ttf-ubuntu-nerd + + - name: "Spell (base_system) (base_and_developer_edition) (full netinstall)" + description: "Spell apps" + selected: true + packages: + - aspell + - aspell-$LOCALE + - aspell-en + - hunspell + - hunspell-$LOCALE + - hunspell-en_us + +- name: "Melawy Linux branding" + description: "Needed Melawy Linux packages" + hidden: true + selected: true + subgroups: + + - name: "Refind (base_system) (base_and_developer_edition) (full netinstall)" + description: "Boot loader screen" + selected: true + packages: + - melawy-refind-theme-fenek + - melawy-refind-theme-lera-sugar + - melawy-refind-theme-nier-a2 + + - name: "Plymouth (base_system) (base_and_developer_edition) (full netinstall)" + description: "Boot screen" + selected: true + packages: + - melawy-plymouth-theme-fenek + - melawy-plymouth-theme-lera-sugar + - melawy-plymouth-theme-nier-a2 + + - name: "Plymouth select (1 from list)" + description: "Boot screen" + selected: true + subgroups: + + - name: "Nier A2 theme" + selected: true + packages: + - melawy-plymouth-theme-hard-install-nier-a2 + - melawy-refind-theme-hard-install-nier-a2 + + - name: "Lera sugar theme" + selected: false + packages: + - melawy-plymouth-theme-hard-install-lera-sugar + - melawy-refind-theme-hard-install-lera-sugar + + - name: "Fenek theme" + selected: false + packages: + - melawy-plymouth-theme-hard-install-fenek + - melawy-refind-theme-hard-install-fenek + + - name: "Window decorators (base_system) (base_and_developer_edition) (full netinstall)" + selected: true + packages: + - klassy + - klassy-qt5 + - lightly-kf6-git + - lightlyshaders + - roundedsbe + + - name: "Base desktop theme (base_system) (base_and_developer_edition) (full netinstall)" + selected: true + packages: + - melawy-icon-theme-kde6 + - melawy-theme-kde6 + - melawy-plymouth-theme + - melawy-refind-theme + + - name: "Desktop theme Win11 (full netinstall)" + selected: true + packages: + - melawy-win11-icon-theme + - melawy-win11-icon-theme-special + - melawy-win11-icon-theme-white + - melawy-kde-theme-win11-kde6 + - melawy-kde-theme-win12-kde6 + + - name: "Desktop theme Colloid (full netinstall)" + selected: true + packages: + - colloid-cursors-git + - colloid-icon-theme-git + - colloid-gtk-theme-git + - colloid-kde-theme-git + + - name: "SDDM, KDE Plasma Look-and-feel, Wallpapers (base_system) (base_and_developer_edition) (full netinstall)" + selected: true + packages: + - melawy-kde-theme-nier-a2-kde6 + - melawy-kde-theme-lera-sugar-kde6 + - melawy-kde-theme-fenek-kde6 + + - name: "Cursors (base_system) (base_and_developer_edition) (full netinstall)" + selected: true + packages: + - melawy-purple-dark-cursors + - melawy-purple-dark-default-cursors + - melawy-purple-light-cursors + - melawy-purple-light-default-cursors + - melawy-red-dark-cursors + - melawy-red-dark-default-cursors + - melawy-red-light-cursors + - melawy-red-light-default-cursors + + # - name: "Start menu (base_system) (base_and_developer_edition) (full netinstall)" + # selected: true + # packages: + # - melawy-plasma-plasmoid-Menu11 + # - melawy-plasma-plasmoid-DittoMenu + # - melawy-plasma-plasmoid-OnzeMenuKDE + + - name: "Plasmoids (base_system) (base_and_developer_edition) (full netinstall)" + selected: true + packages: + - melawy-plasma-plasmoid-wallpaper-blur-effect-kde6 + - melawy-plasma-plasmoid-win7showdesktop-kde6 + + # - name: "Wallpapers YouTube" + # selected: true + # packages: + # - melawy-wallpapers-from-youtube + + - name: "Updater (base_system) (base_and_developer_edition) (full netinstall)" + selected: true + packages: + - melawy-arch-linux-updater + - melawy-arch-linux-updater-tray-icon + +- name: "Desktop integration" + description: "Useful helper tools and libs for desktop usage" + expanded: true + selected: true + subgroups: + + - name: "Fix applications style (base_system) (base_and_developer_edition) (full netinstall)" + description: "Desktop environment" + selected: true + packages: + # - adwaita-qt5 + # - adwaita-qt6 + - adw-gtk-theme + - adw-gtk3 + - gnome-settings-daemon + - gnome-themes-extra + - gsettings-desktop-schemas + - gsettings-qt + - gtk-engine-murrine + - kde-gtk-config + - lxappearance-gtk3 + - xdg-desktop-portal + - xdg-desktop-portal-kde + - hardcode-fixer-git + + - name: "KDE Plasma (base_system) (base_and_developer_edition) (full netinstall)" + description: "Desktop environment" + selected: true + packages: + - accountsservice + - akonadi + - akonadi-calendar + - akonadi-calendar-tools + - akonadi-contacts + - akonadi-import-wizard + - akonadi-notes + - akonadi-search + - akonadiconsole + - ark + - audiocd-kio + - blueberry + - bluedevil + - breeze + - breeze-gtk + - dolphin + - dolphin-plugins + - drkonqi + - feh + - ffmpegthumbnailer + - ffmpegthumbs + - file-roller + - flatpak-kcm + - flatpak-xdg-utils + - galculator + - gksu + - glfw + - gnome-firmware + - gnome-keyring + - gparted + - grsync + - gst-libav + - gst-plugin-pipewire + - gst-plugins-bad + - gst-plugins-base + - gst-plugins-good + - gst-plugins-ugly + - gstreamer + - gstreamer-meta + - gwenview + - karchive5 + - kate + - kcalc + - kde-cli-tools + - kde-gtk-config + - kde-system-meta + - kdeconnect + - kdegraphics-thumbnailers + - kdenetwork-filesharing + - kdeplasma-addons + - kfind + - kgamma + - kimageformats + - kimageformats5 + - kinfocenter + - kinit + - kio + - kio-admin + - kio-extras + - kio-fuse + - kmail + - kmail-account-wizard + - konsole + - kscreen + - ksshaskpass + - ksystemlog + - kvantum + - kwallet-pam + - kwalletmanager + - kwayland-integration + - kwin-effect-rounded-corners-git + - libappindicator-gtk3 + - malcontent + - maliit-keyboard + - mintstick-git + - network-manager-applet + - okular + - p7zip + - partitionmanager + - plasma + - plasma-browser-integration + - plasma-desktop + - plasma-disks + - plasma-firewall + - plasma-integration + - plasma-nm + - plasma-pa + - plasma-systemmonitor + - plasma-thunderbolt + - plasma-vault + - plasma-wayland-protocols + - plasma-workspace + - plasma-workspace-wallpapers + - plasma5-integration + - plymouth-kcm + - polkit + - polkit-kde-agent + - polkit-qt5 + - polkit-qt6 + - poppler-glib + - poppler-qt5 + - poppler-qt6 + - powerdevil + - qt5-imageformats + - qt5ct + - qt6-imageformats + - sddm + - sddm-kcm + - solid + - spectacle + - systemd-kcm + - tumbler + - variety + - xdg-desktop-portal + - xdg-desktop-portal-kde + - xdg-user-dirs + - xdg-user-dirs-gtk + - xdg-utils + - xwaylandvideobridge + + - name: "Package management (base_system) (base_and_developer_edition) (full netinstall)" + description: "Packages tools" + selected: true + packages: + - appimagelauncher + - downgrade + - expac + - flatpak + - libpamac-full + - melawy-pamac-helper + - ocs-url + - pace + - packagekit-qt5 + - packagekit-qt6 + - paclast + - pamac-all + - pamac-cli + - paru + - pkgfile + - rate-mirrors + - rebuild-detector + - reflector + - snapd + - snapd-glib + - sofirem-git + - topgrade + - yay + + - name: "Browsers and language package" + description: "Add firefox and language pack if possible and other browsers" + expanded: true + selected: true + subgroups: + + - name: "Firefox (base_system) (base_and_developer_edition) (full netinstall)" + description: "Add firefox and language pack" + selected: true + packages: + - firefox + - firefox-i18n-$LOCALE + - profile-sync-daemon + + - name: "Firefox (full netinstall)" + description: "Add firefox and language pack" + selected: true + packages: + - firefox-developer-edition + - firefox-developer-edition-i18n-$LOCALE + - profile-sync-daemon + + - name: "Other (full netinstall)" + description: "Add browsers" + selected: true + packages: + - google-chrome + - brave-bin + - profile-sync-daemon + + - name: "Other other ... (full netinstall)" + description: "Add browsers" + selected: true + packages: + - opera + - vivaldi + - profile-sync-daemon + + - name: "Office" + description: "Add the office applications" + expanded: true + selected: true + subgroups: + + - name: "LibreOffice (base_system) (base_and_developer_edition) (full netinstall)" + selected: true + packages: + - libreoffice-fresh + - libreoffice-fresh-$LOCALE + - libreoffice-extension-languagetool + + - name: "OnlyOffice (full netinstall)" + selected: false + packages: + - onlyoffice-bin + + - name: "FreeOffice (full netinstall)" + selected: false + packages: + - freeoffice + + - name: "Media players (base_system) (base_and_developer_edition) (full netinstall)" + description: "Add the audio players" + selected: true + packages: + - ffmpeg-obs + - vlc-luajit + + - name: "Media players (base_system) (base_and_developer_edition) (full netinstall)" + description: "Add the audio players" + selected: true + packages: + - audacious + - elisa + - ffmpeg-obs + - vlc-luajit + + - name: "Picture editors (base_system) (base_and_developer_edition) (full netinstall)" + description: "Add the photo and picture editors" + selected: true + packages: + - gimp + - gimp-help-$LOCALE + - gvfs + - gvfs-afc + - gvfs-goa + - gvfs-google + - gvfs-gphoto2 + - gvfs-mtp + - gvfs-nfs + - gvfs-smb + - inkscape + - libdvdcss + - libgsf + - libopenraw + + - name: "Audio recorder (base_system) (base_and_developer_edition) (full netinstall)" + description: "Add the audio recorders" + selected: true + packages: + - audacity + - audio-recorder + + - name: "Video editors (base_system) (base_and_developer_edition) (full netinstall)" + description: "Add the video editors" + selected: true + packages: + - avidemux-cli + - avidemux-qt + + - name: "Media editors (full netinstall)" + description: "Add the photo and picture editors" + selected: false + packages: + - blender + - kdenlive + - krita + - openshot + - pinta + - pitivi + + - name: "Code IDE and programming language package (base_and_developer_edition) (full netinstall)" + description: "Add Code IDE and programming language package" + selected: true + packages: + - ansible-language-server + - base-devel + - bash-language-server + - boost + - boost-libs + - bpython + - ccache + - ckbcomp + - clang + - cmake + - codelldb + - dbeaver + - doxygen + - eslint-language-server + - extra-cmake-modules + - fakeroot + - gcc + - gcc-libs + - gdb + - git + - git-lfs + - icu69 + - jdk-openjdk + - jq + - lld + - lldb + - llvm + - llvm-libs + - lua-language-server + - make + - mypy + - nodejs + - npm + - perl + - python + - python-lsp-server + - python-pip + - python-poetry + - python-pytest-ruff + - python-ruff + - ruff + - ruff-lsp + - rust-analyzer + - rust-musl + - rustup + - sccache + - sqlitebrowser + - sublime-text-4 + - tailwindcss-language-server + - typescript + - typescript-language-server + - uv + - visual-studio-code-bin + - vscode-json-languageserver + - vue-language-server + - yaml-language-server + + - name: "Code IDE and programming language package (full netinstall)" + description: "Add Code IDE and programming language package" + selected: true + packages: + - github-cli + - github-desktop + + - name: "Mail applications" + description: "Add the mail applications" + expanded: true + selected: true + subgroups: + + - name: "Mailspring (base_system) (base_and_developer_edition) (full netinstall)" + description: "Add the mailspring" + selected: true + packages: + - mailspring + + - name: "Thunderbird (full netinstall)" + description: "Add the thunderbird" + selected: true + packages: + - thunderbird + - thunderbird-i18n-$LOCALE + + - name: "Chat applications (base_system) (base_and_developer_edition) (full netinstall)" + description: "Add the mail applications" + selected: true + packages: + - discord + - telegram-desktop + - zoom + + - name: "Chat applications (full netinstall)" + description: "Add the mail applications" + selected: true + packages: + - skypeforlinux-bin + + - name: "Passwords / keys applications (base_system) (base_and_developer_edition) (full netinstall)" + description: "Add the mail applications" + selected: true + packages: + - keepassxc + - kleopatra + + - name: "Desktop applications (base_and_developer_edition) (full netinstall)" + description: "Add the desktop applications" + selected: true + packages: + - buildtorrent + - mktorrent + + - name: "Desktop applications (base_system) (base_and_developer_edition) (full netinstall)" + description: "Add the desktop applications" + selected: true + packages: + - obsidian + - qbittorrent + - transmission-qt + - yakuake + + - name: "Desktop applications (full netinstall)" + description: "Add the desktop applications" + selected: true + packages: + - corectrl + - gwe + + - name: "Desktop applications (base_and_developer_edition) (full netinstall)" + description: "Add the desktop applications" + selected: true + packages: + - filezilla + - meld + + - name: "Desktop applications (base_system) (base_and_developer_edition) (full netinstall)" + description: "Add the desktop applications" + selected: true + packages: + - anydesk-bin + - ffmpeg-obs + - obs-studio-tytan652 + - qbittorrent + - vlc-luajit + - yakuake + - yandex-disk + - yandex-disk-indicator + + - name: "Bluetooth (base_system) (base_and_developer_edition) (full netinstall)" + description: "Bluetooth support" + selected: true + packages: + - bluetooth-support + - bluez + - bluez-hid2hci + - bluez-libs + - bluez-utils + + - name: "Printing support (base_system) (base_and_developer_edition) (full netinstall)" + description: "Support for printing (Cups)" + selected: true + packages: + - cups + - cups-browsed + - cups-filters + - cups-pdf + - foomatic-db + - foomatic-db-engine + - foomatic-db-gutenprint-ppds + - foomatic-db-nonfree + - foomatic-db-nonfree-ppds + - foomatic-db-ppds + - ghostscript + - gsfonts + - gutenprint + - hplip + - print-manager + - printer-support + - splix + - system-config-printer + + - name: "HP printer/scanner support (full netinstall)" + description: "Packages for HP printer/scanner" + selected: true + packages: + - hplip + - python-pyqt5 + - python-reportlab + - scanner-support + - simple-scan + - xsane + + - name: "Containers" + description: "Add the Docker, etc" + expanded: true + selected: true + subgroups: + + - name: "QEMU (base_and_developer_edition) (full netinstall)" + description: "Add the Docker, etc" + selected: true + packages: + - qemu-desktop + - virt-manager + - virt-viewer + - edk2-shell + - bridge-utils + - udiskie + - udisks2 + - networkmanager + - firewalld + + - name: "Docker (base_and_developer_edition) (full netinstall)" + description: "Add the Docker, etc" + selected: true + packages: + - docker + - docker-compose + - docker-machine + - docker-scan + - docker-buildx + - bridge-utils + - udiskie + - udisks2 + - networkmanager + - firewalld + + - name: "Portainer (full netinstall)" + description: "Add the Docker, etc" + selected: false + packages: + - portainer-bin + - udiskie + - udisks2 + - networkmanager + - firewalld + + - name: "Containers (full netinstall)" + description: "Add the Docker, etc" + selected: false + packages: + - podman + - podman-dnsname + - podman-compose + - podman-docker + - buildah + - cni-plugins + - netavark + - fuse-overlayfs + - udiskie + - udisks2 + - networkmanager + - firewalld + + - name: "VirtualBox (full netinstall)" + description: "Add the Docker, etc" + selected: false + packages: + - virtualbox + - virtualbox-host-dkms + - virtualbox-host-modules-arch + + - name: "Vagrant (full netinstall)" + description: "Add the Docker, etc" + selected: false + packages: + - vagrant + - udiskie + - udisks2 + - networkmanager + - firewalld + + - name: "Cockpit (full netinstall)" + description: "Admin panel" + selected: false + packages: + - cockpit + - cockpit-machines + - cockpit-pcp + - cockpit-podman + - cockpit-storaged + - udiskie + - udisks2 + - networkmanager + - firewalld + + - name: "Support (base_system) (base_and_developer_edition) (full netinstall)" + description: "Packages for other support" + selected: true + packages: + - input-devices-support + - laptop-detect + +- name: "GPU drivers" + description: "Recommended. Don't change unless you know what you're doing." + expanded: true + selected: true + critical: true + subgroups: + + - name: "Intel drivers (base_system) (base_and_developer_edition) (full netinstall)" + description: "Graphics hardware drivers" + selected: true + packages: + - libva-intel-driver + - libva-utils + + - name: "AMD drivers AMDGPU (base_system) (base_and_developer_edition) (full netinstall)" + description: "Graphics hardware drivers" + selected: true + packages: + - xf86-video-amdgpu + + - name: "AMD drivers ATI (manual choice)" + description: "Graphics hardware drivers" + selected: false + packages: + - xf86-video-ati + + - name: "NVIDIA drivers - Latest (202X) (base_system) (base_and_developer_edition) (full netinstall)" + description: "NVIDIA graphics hardware drivers: GeForce GTX TITAN X - NVIDIA GeForce RTX X090" + selected: true + packages: + - nvidia-dkms + - nvidia-settings + - nvidia-utils + - opencl-nvidia + + - name: "NVIDIA drivers - 525 (2023) (manual choice)" + description: "NVIDIA graphics hardware drivers: NVS 810 - NVIDIA RTX 6000 Ada Generation" + selected: false + packages: + - nvidia-525xx-dkms + - nvidia-525xx-settings + - nvidia-525xx-utils + + - name: "NVIDIA drivers - 470 (2021) (manual choice)" + description: "NVIDIA graphics hardware drivers: NVS 510 - NVIDIA RTX A6000" + selected: false + packages: + - nvidia-470xx-dkms + - nvidia-470xx-settings + - nvidia-470xx-utils + + - name: "NVIDIA drivers - 390 (2018) (manual choice)" + description: "NVIDIA graphics hardware drivers: GeForce GTX TITAN Z - GeForce GTX 1080 Ti)" + selected: false + packages: + - nvidia-390-settings + - nvidia-390xx-dkms + - nvidia-390xx-utils + + - name: "NVIDIA drivers - 340 (2014) (manual choice)" + description: "NVIDIA graphics hardware drivers: GeForce 8200M - GeForce GTX 880M" + selected: false + packages: + - nvidia-340xx-dkms + - nvidia-340xx-settings + - nvidia-340xx-utils + +- name: "Additional packages" + description: "Additional packages" + expanded: true + selected: false + subgroups: + + - name: "Kernel in addition (manual choice)" + description: "Adding kernel in addition to main one" + selected: false + critical: true + packages: + - linux-lts + - linux-lts-headers + + - linux + - linux-headers + + - linux-hardened + - linux-hardened-headers + + - linux-lqx + - linux-lqx-headers + + - linux-xanmod-lts + - linux-xanmod-lts-headers + + - linux-xanmod + - linux-xanmod-headers + + - linux-xanmod-anbox + - linux-xanmod-anbox-headers + + - linux-zen + - linux-zen-headers + + - name: "Desktop terminal (manual choice)" + description: "Add the desktop applications" + selected: false + packages: + - alacritty + - alacritty-themes + - kitty + - kitty-shell-integration + - kitty-terminfo + + - name: "Terminal applications (manual choice)" + description: "General terminal tools and applications" + selected: false + packages: + - browsh + - elinks + - links + - w3m + - glances + - micro + - xterm + + - name: "Media players" + description: "Add the audio players" + selected: false + packages: + - haruna + - mpv + + - name: "Package management (manual choice)" + description: "Packages tools" + selected: false + packages: + - discover + - octopi + - octopi-notifier-frameworks + +- name: "Accessibility Tools (manual choice)" + description: "Screen reader and mouse tweaks (impaired vision)" + selected: true + critical: true + packages: + - brltty + - espeak-ng + - imwheel + - mousetweaks + - orca diff --git a/src/modules/packagechooserq/BIOS.qml b/src/modules/packagechooserq/BIOS.qml new file mode 100644 index 0000000..2903c90 --- /dev/null +++ b/src/modules/packagechooserq/BIOS.qml @@ -0,0 +1,163 @@ +/* === This file is part of Calamares - === + * + * SPDX-FileCopyrightText: 2021 Anke Boersma + * SPDX-License-Identifier: GPL-3.0-or-later + * + * Calamares is Free Software: see the License-Identifier above. + * + */ + +import io.calamares.core 1.0 +import io.calamares.ui 1.0 + +import QtQuick 2.15 +import QtQuick.Controls 2.15 +import QtQuick.Layouts 1.3 + +Column { + id: column + anchors.centerIn: parent + spacing: 5 + + ButtonGroup { + id: switchGroup + } + + Component.onCompleted: { + config.packageChoice = "grub" + } + + Rectangle { + //id: rectangle + width: 700 + height: 50 + color: "#22272e" + border.width: 0 + Text { + height: 25 + anchors.centerIn: parent + text: qsTr("Please select a bootloader option for your install, or leave the already selected default option, GRUB.") + font.pointSize: 11 + color: "#96c5f6" + wrapMode: Text.WordWrap + } + } + + Rectangle { + width: 700 + height: 150 + color: "#1b1e20" + radius: 5 + border.width: 1 + border.color: "#646b75" + Text { + width: 600 + height: 104 + anchors.centerIn: parent + text: qsTr("Grub Bootloader

The GRand Unified Bootloader is the reference implementation
of the Free Software Foundation's Multiboot Specification,
which provides a user the choice
to boot one of multiple operating systems installed on a computer.") + font.pointSize: 10 + color: "#96c5f6" + anchors.verticalCenterOffset: 0 + anchors.horizontalCenterOffset: -20.0 + wrapMode: Text.WordWrap + } + + Switch { + id: element2 + x: 500 + y: 110 + width: 187 + height: 14 + text: qsTr("GRUB") + checked: true + hoverEnabled: true + ButtonGroup.group: switchGroup + + indicator: Rectangle { + implicitWidth: 40 + implicitHeight: 14 + radius: 10 + color: element2.checked ? "#3498db" : "#B9B9B9" + border.color: element2.checked ? "#3498db" : "#cccccc" + + Rectangle { + x: element2.checked ? parent.width - width : 0 + y: (parent.height - height) / 2 + width: 20 + height: 20 + radius: 10 + color: element2.down ? "#cccccc" : "#ffffff" + border.color: element2.checked ? (element2.down ? "#3498db" : "#3498db") : "#999999" + } + } + + onCheckedChanged: { + if (! checked) { + print("grub not used") + } else { + config.packageChoice = "grub" + print(config.packageChoice) + } + } + } + } + + Rectangle { + width: 700 + height: 150 + color: "#1b1e20" + radius: 5 + border.width: 1 + border.color: "#646b75" + Text { + width: 600 + height: 104 + anchors.centerIn: parent + text: qsTr("No Bootloader

Selecting no bootloader might result in an un-bootable system,
If you don't already have a bootloader that you can add this install to.") + font.pointSize: 10 + color: "#96c5f6" + anchors.verticalCenterOffset: 0 + anchors.horizontalCenterOffset: -20.0 + wrapMode: Text.WordWrap + } + + Switch { + id: element3 + x: 500 + y: 110 + width: 187 + height: 14 + text: qsTr("No bootloader") + checked: false + hoverEnabled: true + ButtonGroup.group: switchGroup + + indicator: Rectangle { + implicitWidth: 40 + implicitHeight: 14 + radius: 10 + color: element3.checked ? "#3498db" : "#B9B9B9" + border.color: element3.checked ? "#3498db" : "#cccccc" + + Rectangle { + x: element3.checked ? parent.width - width : 0 + y: (parent.height - height) / 2 + width: 20 + height: 20 + radius: 10 + color: element3.down ? "#cccccc" : "#ffffff" + border.color: element3.checked ? (element3.down ? "#3498db" : "#3498db") : "#999999" + } + } + + onCheckedChanged: { + if (! checked) { + print("no btl not checked") + } else { + print("no bootloader") + config.packageChoice = "none" + } + } + } + } +} diff --git a/src/modules/packagechooserq/UEFI.qml b/src/modules/packagechooserq/UEFI.qml new file mode 100644 index 0000000..f12f400 --- /dev/null +++ b/src/modules/packagechooserq/UEFI.qml @@ -0,0 +1,280 @@ +/* === This file is part of Calamares - === + * + * SPDX-FileCopyrightText: 2021 Anke Boersma + * SPDX-License-Identifier: GPL-3.0-or-later + * + * Calamares is Free Software: see the License-Identifier above. + * + */ + +import io.calamares.core 1.0 +import io.calamares.ui 1.0 + +import QtQuick 2.15 +import QtQuick.Controls 2.15 +import QtQuick.Layouts 1.3 + +Column { + id: column + anchors.centerIn: parent + spacing: 7 + + ButtonGroup { + id: switchGroup + } + + Rectangle { + //id: rectangle + width: 700 + height: 50 + color: "#22272e" + border.width: 0 + Text { + height: 25 + anchors.centerIn: parent + text: qsTr("Please select a bootloader option for your install, or leave the already selected default option, rEFInd.") + font.pointSize: 11 + color: "#96c5f6" + wrapMode: Text.WordWrap + } + } + + Rectangle { + width: 700 + height: 135 + color: "#1b1e20" + radius: 5 + border.width: 1 + border.color: "#646b75" + Text { + width: 600 + height: 90 + anchors.centerIn: parent + + text: qsTr("rEFInd

UEFI bootloader capable of running EFISTUB kernels.
It is built around the idea of being cross-platform and making it easier
+ to boot multiple operating systems.
This is one of the recommended default options for Melawy Linux.") + font.pointSize: 10 + color: "#96c5f6" + anchors.verticalCenterOffset: 0 + anchors.horizontalCenterOffset: -20.0 + wrapMode: Text.WordWrap + } + + Switch { + id: element1 + x: 500 + y: 90 + width: 187 + height: 14 + text: qsTr("rEFInd") + checked: true + hoverEnabled: true + ButtonGroup.group: switchGroup + + indicator: Rectangle { + implicitWidth: 40 + implicitHeight: 14 + radius: 10 + color: element1.checked ? "#3498db" : "#B9B9B9" + border.color: element1.checked ? "#3498db" : "#cccccc" + + Rectangle { + x: element1.checked ? parent.width - width : 0 + y: (parent.height - height) / 2 + width: 20 + height: 20 + radius: 10 + color: element1.down ? "#cccccc" : "#ffffff" + border.color: element1.checked ? (element1.down ? "#3498db" : "#3498db") : "#999999" + } + } + + onCheckedChanged: { + if (! checked) { + print("refind not used") + } else { + config.packageChoice = "refind" + print(config.packageChoice) + } + } + } + } + + Rectangle { + width: 700 + height: 135 + color: "#1b1e20" + radius: 5 + border.width: 1 + border.color: "#646b75" + Text { + width: 600 + height: 90 + anchors.centerIn: parent + text: qsTr("Systemd-boot

provides a simple experience
which will work for most circumstances.
This is one of the recommended default options for Melawy Linux.") + font.pointSize: 10 + color: "#96c5f6" + anchors.verticalCenterOffset: 0 + anchors.horizontalCenterOffset: -20.0 + wrapMode: Text.WordWrap + } + + Switch { + id: element2 + x: 500 + y: 90 + width: 187 + height: 14 + text: qsTr("Systemd-boot") + checked: true + hoverEnabled: true + ButtonGroup.group: switchGroup + + indicator: Rectangle { + implicitWidth: 40 + implicitHeight: 14 + radius: 10 + color: element2.checked ? "#3498db" : "#B9B9B9" + border.color: element2.checked ? "#3498db" : "#cccccc" + + Rectangle { + x: element2.checked ? parent.width - width : 0 + y: (parent.height - height) / 2 + width: 20 + height: 20 + radius: 10 + color: element2.down ? "#cccccc" : "#ffffff" + border.color: element2.checked ? (element2.down ? "#3498db" : "#3498db") : "#999999" + } + } + + onCheckedChanged: { + if (! checked) { + print("systemd not used") + } else { + config.packageChoice = "systemd-boot" + print(config.packageChoice) + } + } + } + } + + Rectangle { + width: 700 + height: 135 + color: "#1b1e20" + radius: 5 + border.width: 1 + border.color: "#646b75" + Text { + width: 600 + height: 90 + anchors.centerIn: parent + text: qsTr("Grub Bootloader

A longstanding bootloader for Linux.
It is the best choice for individuals wanting to boot off of btrfs snapshots,
or need to use a smaller EFI partition.") + font.pointSize: 10 + color: "#96c5f6" + anchors.verticalCenterOffset: 0 + anchors.horizontalCenterOffset: -20.0 + wrapMode: Text.WordWrap + } + + Switch { + id: element3 + x: 500 + y: 90 + width: 187 + height: 14 + text: qsTr("Grub") + checked: false + hoverEnabled: true + ButtonGroup.group: switchGroup + + + indicator: Rectangle { + implicitWidth: 40 + implicitHeight: 14 + radius: 10 + color: element3.checked ? "#3498db" : "#B9B9B9" + border.color: element3.checked ? "#3498db" : "#cccccc" + + Rectangle { + x: element3.checked ? parent.width - width : 0 + y: (parent.height - height) / 2 + width: 20 + height: 20 + radius: 10 + color: element3.down ? "#cccccc" : "#ffffff" + border.color: element3.checked ? (element3.down ? "#3498db" : "#3498db") : "#999999" + } + } + + onCheckedChanged: { + if (! checked) { + print("Grub not used") + } else { + print("Grub") + config.packageChoice = "grub" + } + } + } + } + + Rectangle { + width: 700 + height: 135 + color: "#1b1e20" + radius: 5 + border.width: 1 + border.color: "#646b75" + Text { + width: 600 + height: 90 + anchors.centerIn: parent + text: qsTr("No Bootloader

Selecting no bootloader might result in an un-bootable system,
If you don't already have a bootloader that you can add this install to.") + font.pointSize: 10 + color: "#96c5f6" + anchors.verticalCenterOffset: 0 + anchors.horizontalCenterOffset: -20.0 + wrapMode: Text.WordWrap + } + + Switch { + id: element4 + x: 500 + y: 90 + width: 187 + height: 14 + text: qsTr("No bootloader") + checked: false + hoverEnabled: true + ButtonGroup.group: switchGroup + + indicator: Rectangle { + implicitWidth: 40 + implicitHeight: 14 + radius: 10 + color: element4.checked ? "#ff8585" : "#B9B9B9" + border.color: element4.checked ? "#ff8585" : "#cccccc" + + Rectangle { + x: element4.checked ? parent.width - width : 0 + y: (parent.height - height) / 2 + width: 20 + height: 20 + radius: 10 + color: element4.down ? "#cccccc" : "#ffffff" + border.color: element4.checked ? (element4.down ? "#ff8585" : "#ff8585") : "#999999" + } + } + + onCheckedChanged: { + if (! checked) { + print("no btl not checked") + } else { + print("no bootloader") + config.packageChoice = "none" + } + } + } + } +} diff --git a/src/modules/packagechooserq/packagechooserq-qt6.qml b/src/modules/packagechooserq/packagechooserq-qt6.qml new file mode 120000 index 0000000..c59dd7e --- /dev/null +++ b/src/modules/packagechooserq/packagechooserq-qt6.qml @@ -0,0 +1 @@ +packagechooserq.qml \ No newline at end of file diff --git a/src/modules/packagechooserq/packagechooserq-qt6.qrc b/src/modules/packagechooserq/packagechooserq-qt6.qrc new file mode 120000 index 0000000..9845305 --- /dev/null +++ b/src/modules/packagechooserq/packagechooserq-qt6.qrc @@ -0,0 +1 @@ +packagechooserq.qrc \ No newline at end of file diff --git a/src/modules/packagechooserq/packagechooserq.conf b/src/modules/packagechooserq/packagechooserq.conf new file mode 100644 index 0000000..5eb0c14 --- /dev/null +++ b/src/modules/packagechooserq/packagechooserq.conf @@ -0,0 +1,77 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# +# Configuration for the low-density software chooser, QML implementation +# +# The example QML implementation uses single-selection, rather than +# a model for the available packages. That makes it simpler: the +# QML itself codes the available options, descriptions and images +# -- after all, this is **low density** selection, so a custom UI +# can make sense for the few choices that need to be made. +# +# + +--- +# Software installation method: +# +# - "legacy" or "custom" or "contextualprocess" +# When set to "legacy", writes a GlobalStorage value for the choice that +# has been made. The key is *packagechooser_*. The module's +# instance name is used; see the *instances* section of `settings.conf`. +# If there is just one packagechooserq module, and no special instance is set, +# resulting GS key is probably *packagechooser_packagechooserq*. +# (Do note that the prefix of the GS key remains "packagechooser_") +# +# The GS value is a comma-separated list of the IDs of the selected +# packages, or an empty string if none is selected. +# +# With "legacy" installation, you should have a contextualprocess or similar +# module somewhere in the `exec` phase to process the GlobalStorage key +# and actually **do** something for the packages. +# +# - "packages" +# When set to "packages", writes GlobalStorage values suitable for +# consumption by the *packages* module (which should appear later +# in the `exec` section. These package settings will then be handed +# off to whatever package manager is configured there. +# +# There is no need to put this module in the `exec` section. There +# are no jobs that this module provides. You should put **other** +# modules, either *contextualprocess* or *packages* or some custom +# module, in the `exec` section to do the actual work. +# +method: legacy + +# Human-visible strings in this module. These are all optional. +# The following translated keys are used: +# - *step*, used in the overall progress view (left-hand pane) +# +# Each key can have a [locale] added to it, which is used as +# the translated string for that locale. For the strings +# associated with the "no-selection" item, see *items*, below +# with the explicit item-*id* "". +# +labels: + step: "Bootloader" + step[de]: "Bootloader" + step[fi]: "Käynnistyksenlataaja" + step[fr]: "Chargeur" + step[it]: "Caricatore" + step[sp]: "Cargador" + step[ru]: "Загрузчик" + step[zh_CN]: "引导程序" + step[ja]: "ブートローダー" + step[sv]: "Uppstartshanterare" + step[pt_BR]: "Bootloader" + step[tr]: "Önyükleyici" + step[ro]: "Manager de pornire" + step[ko]: "부트로더" + +# The *packageChoice* value is used for setting the default selection +# in the QML view; this should match one of the keys used in the QML +# module for package names. +# +# (e.g. the sample QML uses "no_office_suite", "minimal_install" and +# "libreoffice" as possible choices). + +packageChoice: refind diff --git a/src/modules/packagechooserq/packagechooserq.qml b/src/modules/packagechooserq/packagechooserq.qml new file mode 100644 index 0000000..b929eba --- /dev/null +++ b/src/modules/packagechooserq/packagechooserq.qml @@ -0,0 +1,35 @@ +/* === This file is part of Calamares - === + * + * SPDX-FileCopyrightText: 2021 Anke Boersma + * SPDX-License-Identifier: GPL-3.0-or-later + * + * Calamares is Free Software: see the License-Identifier above. + * + */ + +import io.calamares.core 1.0 +import io.calamares.ui 1.0 + +import QtQuick +import QtQuick.Controls +import QtQuick.Layouts + +Item { + width: parent.width + height: parent.height + + Rectangle { + anchors.fill: parent + color: "#2a2e32" + + ButtonGroup { + id: switchGroup + } + + Loader { + anchors.centerIn: parent + source: Global.value("firmwareType") === "efi" ? "UEFI.qml" : "BIOS.qml" + } + } + +} diff --git a/src/modules/packagechooserq/packagechooserq.qrc b/src/modules/packagechooserq/packagechooserq.qrc new file mode 100644 index 0000000..2461956 --- /dev/null +++ b/src/modules/packagechooserq/packagechooserq.qrc @@ -0,0 +1,7 @@ + + + BIOS.qml + UEFI.qml + packagechooserq.qml + + diff --git a/src/modules/packages/packages.conf b/src/modules/packages/packages.conf new file mode 100644 index 0000000..b1adb37 --- /dev/null +++ b/src/modules/packages/packages.conf @@ -0,0 +1,214 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# +# The configuration for the package manager starts with the +# *backend* key, which picks one of the backends to use. +# In `main.py` there is a base class `PackageManager`. +# Implementations must subclass that and set a (class-level) +# property *backend* to the name of the backend (e.g. "dummy"). +# That property is used to match against the *backend* key here. +# +# You will have to add such a class for your package manager. +# It is fairly simple Python code. The API is described in the +# abstract methods in class `PackageManager`. Mostly, the only +# trick is to figure out the correct commands to use, and in particular, +# whether additional switches are required or not. Some package managers +# have more installer-friendly defaults than others, e.g., DNF requires +# passing --disablerepo=* -C to allow removing packages without Internet +# connectivity, and it also returns an error exit code if the package did +# not exist to begin with. +--- +# +# Which package manager to use, options are: +# - apk - Alpine Linux package manager +# - apt - APT frontend for DEB and RPM +# - dnf - DNF, the new RPM frontend +# - dnf5 - DNF5, the newer new RPM frontend +# - entropy - Sabayon package manager (is being deprecated) +# - luet - Sabayon package manager (next-gen) +# - packagekit - PackageKit CLI tool +# - pacman - Pacman +# - pamac - Manjaro package manager +# - portage - Gentoo package manager +# - yum - Yum RPM frontend +# - zypp - Zypp RPM frontend +# +# Not actually a package manager, but suitable for testing: +# - dummy - Dummy manager, only logs +# +backend: pamac + +# +# Often package installation needs an internet connection. +# Since you may allow system installation without a connection +# and want to offer OPTIONAL package installation, it's +# possible to have no internet, yet have this packages module +# enabled in settings. +# +# You can skip the whole module when there is no internet +# by setting "skip_if_no_internet" to true. +# +# You can run a package-manager specific update procedure +# before installing packages (for instance, to update the +# list of packages and dependencies); this is done only if there +# is an internet connection. +# +# Set "update_db" to 'true' for refreshing the database on the +# target system. On target installations, which got installed by +# unsquashing, a full system update may be needed. Otherwise +# post-installing additional packages may result in conflicts. +# Therefore set also "update_system" to 'true'. +# +skip_if_no_internet: false +update_db: true +update_system: false + +# pacman specific options +# +# *num_retries* should be a positive integer which specifies the +# number of times the call to pacman will be retried in the event of a +# failure. If it is missing, it will be set to 0. +# +# *disable_download_timeout* is a boolean that, when true, includes +# the flag --disable-download-timeout on calls to pacman. When missing, +# false is assumed. +# +# *needed_only* is a boolean that includes the pacman argument --needed +# when set to true. If missing, false is assumed. +pacman: + num_retries: 6 + disable_download_timeout: true + needed_only: true + +# +# List of maps with package operations such as install or remove. +# Distro developers can provide a list of packages to remove +# from the installed system (for instance packages meant only +# for the live system). +# +# A job implementing a distro specific logic to determine other +# packages that need to be installed or removed can run before +# this one. Distro developers may want to install locale packages +# or remove drivers not needed on the installed system. +# Such a job would populate a list of dictionaries in the global +# storage called "packageOperations" and that list is processed +# after the static list in the job configuration (i.e. the list +# that is in this configuration file). +# +# Allowed package operations are: +# - *install*, *try_install*: will call the package manager to +# install one or more packages. The install target will +# abort the whole installation if package-installation +# fails, while try_install carries on. Packages may be +# listed as (localized) names, or as (localized) package-data. +# See below for the description of the format. +# - *localInstall*: this is used to call the package manager +# to install a package from a path-to-a-package. This is +# useful if you have a static package archive on the install media. +# The *pacman* package manager is the only one to specially support +# this operation (all others treat this the same as *install*). +# - *remove*, *try_remove*: will call the package manager to +# remove one or more packages. The remove target will +# abort the whole installation if package-removal fails, +# while try_remove carries on. Packages may be listed as +# (localized) names. +# One additional key is recognized, to help netinstall out: +# - *source*: ignored, does get logged +# Any other key is ignored, and logged as a warning. +# +# There are two formats for naming packages: as a name or as package-data, +# which is an object notation providing package-name, as well as pre- and +# post-install scripts. +# +# Here are both formats, for installing vi. The first one just names the +# package for vi (using the naming of the installed package manager), while +# the second contains three data-items; the pre-script is run before invoking +# the package manager, and the post-script runs once it is done. +# +# - install +# - vi +# - package: vi +# pre-script: touch /tmp/installing-vi +# post-script: rm -f /tmp/installing-vi +# +# The pre- and post-scripts are optional, but you cannot leave both out +# if you do use the *package* key: using "package: vi" with neither script +# option will trick Calamares into trying to install a package named +# "package: vi", which is unlikely to work. +# +# The pre- and post-scripts are **not** executed by a shell unless you +# explicitly invoke `/bin/sh` in them. The command-lines are passed +# to exec(), which does not understand shell syntax. In other words: +# +# pre-script: ls | wc -l +# +# Will fail, because `|` is passed as a command-line argument to ls, +# as are `wc`, and `-l`. No shell pipeline is set up, and ls is likely +# to complain. Invoke the shell explicitly: +# +# pre-script: /bin/sh -c \"ls | wc -l\" +# +# The above note on shell-expansion applies to versions up-to-and-including +# Calamares 3.2.12, but will change in future. +# +# Any package name may be localized; this is used to install localization +# packages for software based on the selected system locale. By including +# the string `LOCALE` in the package name, the following happens: +# +# - if the system locale is English (any variety), then the package is not +# installed at all, +# - otherwise `$LOCALE` or `${LOCALE}` is replaced by the 'lower-cased' BCP47 +# name of the 'language' part of the selected system locale (not the +# country/region/dialect part), e.g. selecting "nl_BE" will use "nl" +# here. +# +# Take care that just plain `LOCALE` will not be replaced, so `foo-LOCALE` will +# be left unchanged, while `foo-$LOCALE` will be changed. However, `foo-LOCALE` +# **will** be removed from the list of packages (i.e. not installed), if +# English is selected. If a non-English locale is selected, then `foo-LOCALE` +# will be installed, unchanged (no language-name-substitution occurs). +# +# The following installs localizations for vi, if they are relevant; if +# there is no localization, installation continues normally. +# +# - install +# - vi-$LOCALE +# - package: vi-${LOCALE} +# pre-script: touch /tmp/installing-vi +# post-script: rm -f /tmp/installing-vi +# +# When installing packages, Calamares will invoke the package manager +# with a list of package names if it can; package-data prevents this because +# of the scripts that need to run. In other words, this: +# +# - install: +# - vi +# - binutils +# - package: wget +# pre-script: touch /tmp/installing-wget +# +# This will invoke the package manager three times, once for each package, +# because not all of them are simple package names. You can speed up the +# process if you have only a few pre-scripts, by using multiple install targets: +# +# - install: +# - vi +# - binutils +# - install: +# - package: wget +# pre-script: touch /tmp/installing-wget +# +# This will call the package manager once with the package-names "vi" and +# "binutils", and then a second time for "wget". When installing large numbers +# of packages, this can lead to a considerable time savings. +# +#operations: +# - install: +# - vi +# - vi-${LOCALE} +# - wget +# - binutils +# - remove: +# - vi +# - wget +# - binutils diff --git a/src/modules/packages/packages_offline.conf b/src/modules/packages/packages_offline.conf new file mode 100644 index 0000000..cca1944 --- /dev/null +++ b/src/modules/packages/packages_offline.conf @@ -0,0 +1,10 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# +# sets pacman options for package handling. +--- + +backend: pacman +skip_if_no_internet: true +update_db: false +update_system: false diff --git a/src/modules/packages/packages_online.conf b/src/modules/packages/packages_online.conf new file mode 100644 index 0000000..c4122ce --- /dev/null +++ b/src/modules/packages/packages_online.conf @@ -0,0 +1,15 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# +# sets pacman options for package handling. +--- + +backend: pacman +skip_if_no_internet: false +update_db: true +update_system: true + +pacman: + num_retries: 6 + disable_download_timeout: true + needed_only: true diff --git a/src/modules/pacstrap/main.py b/src/modules/pacstrap/main.py new file mode 100755 index 0000000..392779e --- /dev/null +++ b/src/modules/pacstrap/main.py @@ -0,0 +1,118 @@ +#!/usr/bin/env python3 + +import os +import subprocess +import shutil +import time + +import libcalamares +from libcalamares.utils import gettext_path, gettext_languages + +import gettext + +_translation = gettext.translation("calamares-python", + localedir=gettext_path(), + languages=gettext_languages(), + fallback=True) +_ = _translation.gettext +_n = _translation.ngettext + +custom_status_message = None +status_update_time = 0 + + +class PacmanError(Exception): + """Exception raised when the call to pacman returns a non-zero exit code + + Attributes: + message -- explanation of the error + """ + + def __init__(self, message): + self.message = message + + +def pretty_name(): + return _("Install base system") + + +def pretty_status_message(): + if custom_status_message is not None: + return custom_status_message + + +def line_cb(line): + """ + Writes every line to the debug log and displays it in calamares + :param line: The line of output text from the command + """ + global custom_status_message + custom_status_message = line.strip() + libcalamares.utils.debug("pacstrap: " + line.strip()) + libcalamares.job.setprogress(0) + + +def run_in_host(command, line_func): + proc = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, universal_newlines=True, + bufsize=1) + for line in proc.stdout: + if line.strip(): + line_func(line) + proc.wait() + if proc.returncode != 0: + raise PacmanError("Failed to run pacman") + + +def run(): + """ + Installs the base system packages and copies files post-installation + + """ + root_mount_point = libcalamares.globalstorage.value("rootMountPoint") + + if not root_mount_point: + return ("No mount point for root partition in globalstorage", + "globalstorage does not contain a \"rootMountPoint\" key, " + "doing nothing") + + if not os.path.exists(root_mount_point): + return ("Bad mount point for root partition in globalstorage", + "globalstorage[\"rootMountPoint\"] is \"{}\", which does not " + "exist, doing nothing".format(root_mount_point)) + + if libcalamares.job.configuration: + if "basePackages" in libcalamares.job.configuration: + base_packages = libcalamares.job.configuration["basePackages"] + else: + return "Package List Missing", "Cannot continue without list of packages to install" + else: + return "No configuration found", "Aborting due to missing configuration" + + # run the pacstrap + pacstrap_command = ["/etc/calamares/scripts/pacstrap_calamares", "-c", root_mount_point] + base_packages + + try: + run_in_host(pacstrap_command, line_cb) + except subprocess.CalledProcessError as cpe: + return "Failed to run pacstrap", "Pacstrap failed with error {!s}".format(cpe.stderr) + except PacmanError as pe: + return "Failed to run pacstrap", format(pe) + + # copy files post install + if "postInstallFiles" in libcalamares.job.configuration: + files_to_copy = libcalamares.job.configuration["postInstallFiles"] + for source_file in files_to_copy: + if os.path.exists(source_file): + try: + libcalamares.utils.debug("Copying file {!s}".format(source_file)) + dest = os.path.normpath(root_mount_point + source_file) + os.makedirs(os.path.dirname(dest), exist_ok=True) + shutil.copy2(source_file, dest) + except Exception as e: + libcalamares.utils.warning("Failed to copy file {!s}, error {!s}".format(source_file, e)) + + libcalamares.globalstorage.insert("online", True) + + libcalamares.job.setprogress(1.0) + + return None diff --git a/src/modules/pacstrap/module.desc b/src/modules/pacstrap/module.desc new file mode 100644 index 0000000..bfe390d --- /dev/null +++ b/src/modules/pacstrap/module.desc @@ -0,0 +1,7 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +--- +type: "job" +name: "pacstrap" +interface: "python" +script: "main.py" diff --git a/src/modules/pacstrap/pacstrap.conf b/src/modules/pacstrap/pacstrap.conf new file mode 100644 index 0000000..2eedb8e --- /dev/null +++ b/src/modules/pacstrap/pacstrap.conf @@ -0,0 +1,154 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# +### pacstrap Module +# +# This module installs the base system and then copies files +# into the installation that will be used in the installed system +# + +--- +# basePackages is an array of package names to pass to pacstrap + +basePackages: + - base + - base-devel + + - archlinux-keyring + - melawy-linux-keyring + - melawy-linux-mirrorlist + - cachyos-keyring + - cachyos-mirrorlist + - arcolinux-keyring + - arcolinux-mirrorlist-git + - chaotic-keyring + - chaotic-mirrorlist + - endeavouros-keyring + - endeavouros-mirrorlist + - manjaro-keyring + + - linux-atm + - linux-firmware + - linux-firmware-marvell + - linux-api-headers + - linux-cachyos + - linux-cachyos-headers + + - btrfs-progs + - chwd + - cryptsetup + - device-mapper + - diffutils + - dosfstools + - dracut + - e2fsprogs + - efibootmgr + - exfatprogs + - f2fs-tools + - inetutils + - iptables-nft + - jfsutils + - less + - logrotate + - lsb-release + - lvm2 + - man-db + - man-pages + - mdadm + - mkinitcpio + - nano + - netctl + - ntfs-3g + - os-prober + - perl + - plymouth + - python + - refind + - reiserfsprogs + - s-nail + - sudo + - sysfsutils + - systemd-sysvcompat + - texinfo + - usbutils + - which + - xfsprogs + - xterm + +# postInstallFiles is an array of file names which will be copied into the system +# +# The paths should be relative to the host and the files will be copied to the +# location in the installed system + +postInstallFiles: + # - "/etc/modules-load.d/zfs.conf" + # - "/usr/lib/modprobe.d/nvidia-utils.conf" + # - "/usr/lib/modules-load.d/nvidia-utils.conf" + - "/etc/NetworkManager/NetworkManager.conf" + - "/etc/NetworkManager/conf.d/20-ipv4-dad.conf" + - "/etc/NetworkManager/dispatcher.d/09-timezone" + - "/etc/X11/xorg.conf.d/30-touchpad.conf" + - "/etc/dracut.conf.d/amdgpu.conf" + - "/etc/dracut.conf.d/defaults.conf" + - "/etc/dracut.conf.d/plymouth.conf" + - "/etc/environment" + - "/etc/fonts/local.conf" + - "/etc/issue" + - "/etc/locale.conf" + - "/etc/locale.gen" + - "/etc/lsb-release" + - "/etc/makepkg-clang-without-lto.conf" + - "/etc/makepkg-clang.conf" + - "/etc/makepkg-gcc-without-lto.conf" + - "/etc/makepkg-gcc.conf" + - "/etc/makepkg.conf" + - "/etc/motd" + - "/etc/nsswitch.conf" + - "/etc/pamac.conf" + - "/etc/plymouth/plymouthd.conf" + - "/etc/polkit-1/rules.d/10-timedate.rules" + - "/etc/refind-menu-generator/theme.conf" + - "/etc/reflector-simple.conf" + - "/etc/sddm.conf" + - "/etc/sddm.conf.d/10-wayland.conf" + - "/etc/sddm.conf.d/kde_settings.conf" + - "/etc/skel/.bashrc" + - "/etc/sysctl.d/99-local.conf" + - "/etc/systemd/journald.conf" + - "/etc/systemd/logind.conf" + - "/etc/systemd/network/20-ethernet.network" + - "/etc/systemd/network/20-wlan.network" + - "/etc/systemd/network/20-wwan.network" + - "/etc/systemd/timesyncd.conf" + - "/etc/systemd/zram-generator.conf" + - "/etc/vconsole.conf" + - "/etc/xdg/reflector/reflector.conf" + - "/usr/bin/GPU-Intel-installer" + - "/usr/local/bin/Installation_guide" + - "/usr/local/bin/calamares-offline" + - "/usr/local/bin/calamares-online" + - "/usr/local/bin/calamares-online.sh" + - "/usr/local/bin/choose-mirror" + - "/usr/local/bin/chrooted-cleaner-script" + - "/usr/local/bin/cleaner-script" + - "/usr/local/bin/connection-checker" + - "/usr/local/bin/copy-refind-theme_v1" + - "/usr/local/bin/copy-refind-theme_v2" + - "/usr/local/bin/create-pacman-keyring" + - "/usr/local/bin/dmcheck" + - "/usr/local/bin/fix-key" + - "/usr/local/bin/fix-keys" + - "/usr/local/bin/fixkey" + - "/usr/local/bin/fixkeys" + - "/usr/local/bin/livecd-sound" + - "/usr/local/bin/online-install-nvidia-drivers" + - "/usr/local/bin/prepare-live-desktop" + - "/usr/local/bin/prepare-live-desktop.sh" + - "/usr/local/bin/remove-nvidia" + - "/usr/local/bin/remove-ucode" + - "/usr/local/bin/remove-unneeded" + - "/usr/local/bin/removeun" + - "/usr/local/bin/removeun-online" + - "/usr/local/bin/update-mirrorlist" + - "/usr/share/X11/xorg.conf.d/30-touchpad.conf" + - "/var/lib/sddm/.config/kcminputrc" diff --git a/src/modules/pacstrap/pacstrap.schema.yaml b/src/modules/pacstrap/pacstrap.schema.yaml new file mode 100644 index 0000000..efa9e06 --- /dev/null +++ b/src/modules/pacstrap/pacstrap.schema.yaml @@ -0,0 +1,8 @@ +--- +$schema: https://json-schema.org/schema# +$id: https://calamares.io/schemas/umount +additionalProperties: false +type: object +properties: + basePackages: { type: array } + postInstallFiles: { type: array } diff --git a/src/modules/partition/core/ColorUtils.cpp b/src/modules/partition/core/ColorUtils.cpp new file mode 100644 index 0000000..c16eb6c --- /dev/null +++ b/src/modules/partition/core/ColorUtils.cpp @@ -0,0 +1,197 @@ +/* === This file is part of Calamares - === + * + * SPDX-FileCopyrightText: 2014 Aurélien Gâteau + * SPDX-FileCopyrightText: 2015-2016 Teo Mrnjavac + * SPDX-License-Identifier: GPL-3.0-or-later + * + * Calamares is Free Software: see the License-Identifier above. + * + */ + +#include "core/ColorUtils.h" + +#include "core/KPMHelpers.h" + +#include "partition/PartitionIterator.h" +#include "partition/PartitionQuery.h" +#include "utils/Logger.h" + +// KPMcore +#include +#include + +// Qt +#include +#include + +using Calamares::Partition::isPartitionFreeSpace; +using Calamares::Partition::isPartitionNew; +using Calamares::Partition::PartitionIterator; + +static const int NUM_PARTITION_COLORS = 5; +static const int NUM_NEW_PARTITION_COLORS = 4; +//Let's try to use the Breeze palette +static const QColor PARTITION_COLORS[ NUM_PARTITION_COLORS ] = { + "#2980b9", //Dark Plasma Blue + "#7f3fbf", //Dark Purple + "#ff5454", //Orange + "#3daee9", //Plasma Blue + "#9b59b6", //Purple +}; +static const QColor NEW_PARTITION_COLORS[ NUM_NEW_PARTITION_COLORS ] = { + "#c0392b", //Dark Icon Red + "#3b3b81", //Dark Blue + "#615c5d", //Light Salmon + "#ff8585", //Light Orange +}; +static QColor FREE_SPACE_COLOR = "#6969ea"; +static QColor EXTENDED_COLOR = "#6e5151"; +static QColor UNKNOWN_DISKLABEL_COLOR = "#4d4151"; + +static QMap< QString, QColor > s_partitionColorsCache; + + +namespace ColorUtils +{ + +QColor +freeSpaceColor() +{ + return FREE_SPACE_COLOR; +} + +QColor +unknownDisklabelColor() +{ + return UNKNOWN_DISKLABEL_COLOR; +} + +PartitionNode* +_findRootForPartition( PartitionNode* partition ) +{ + if ( partition->isRoot() || !partition->parent() ) + { + return partition; + } + + return _findRootForPartition( partition->parent() ); +} + +QColor +colorForPartition( Partition* partition ) +{ + if ( !partition ) + { + cWarning() << "NULL partition"; + return FREE_SPACE_COLOR; + } + + if ( isPartitionFreeSpace( partition ) ) + { + return FREE_SPACE_COLOR; + } + if ( partition->roles().has( PartitionRole::Extended ) ) + { + return EXTENDED_COLOR; + } + + if ( partition->fileSystem().supportGetUUID() != FileSystem::cmdSupportNone + && !partition->fileSystem().uuid().isEmpty() ) + { + if ( partition->fileSystem().type() == FileSystem::Luks || partition->fileSystem().type() == FileSystem::Luks2 ) + { + FS::luks& luksFs = dynamic_cast< FS::luks& >( partition->fileSystem() ); + if ( !luksFs.outerUuid().isEmpty() && s_partitionColorsCache.contains( luksFs.outerUuid() ) ) + { + return s_partitionColorsCache[ luksFs.outerUuid() ]; + } + } + + if ( s_partitionColorsCache.contains( partition->fileSystem().uuid() ) ) + { + return s_partitionColorsCache[ partition->fileSystem().uuid() ]; + } + } + + // No partition-specific color needed, pick one from our list, but skip + // free space: we don't want a partition to change colors if space before + // it is inserted or removed + PartitionNode* parent = _findRootForPartition( partition ); + PartitionTable* table = dynamic_cast< PartitionTable* >( parent ); + Q_ASSERT( table ); + int colorIdx = 0; + int newColorIdx = 0; + for ( PartitionIterator it = PartitionIterator::begin( table ); it != PartitionIterator::end( table ); ++it ) + { + Partition* child = *it; + if ( child == partition ) + { + break; + } + if ( !isPartitionFreeSpace( child ) && !child->hasChildren() ) + { + if ( isPartitionNew( child ) ) + { + ++newColorIdx; + } + ++colorIdx; + } + } + + if ( isPartitionNew( partition ) ) + { + return NEW_PARTITION_COLORS[ newColorIdx % NUM_NEW_PARTITION_COLORS ]; + } + + if ( partition->fileSystem().supportGetUUID() != FileSystem::cmdSupportNone + && !partition->fileSystem().uuid().isEmpty() ) + { + if ( partition->fileSystem().type() == FileSystem::Luks || partition->fileSystem().type() == FileSystem::Luks2 ) + { + FS::luks& luksFs = dynamic_cast< FS::luks& >( partition->fileSystem() ); + if ( !luksFs.outerUuid().isEmpty() ) + { + s_partitionColorsCache.insert( luksFs.outerUuid(), + PARTITION_COLORS[ colorIdx % NUM_PARTITION_COLORS ] ); + } + } + else + { + s_partitionColorsCache.insert( partition->fileSystem().uuid(), + PARTITION_COLORS[ colorIdx % NUM_PARTITION_COLORS ] ); + } + } + return PARTITION_COLORS[ colorIdx % NUM_PARTITION_COLORS ]; +} + + +QColor +colorForPartitionInFreeSpace( Partition* partition ) +{ + PartitionNode* parent = _findRootForPartition( partition ); + PartitionTable* table = dynamic_cast< PartitionTable* >( parent ); + Q_ASSERT( table ); + int newColorIdx = 0; + for ( PartitionIterator it = PartitionIterator::begin( table ); it != PartitionIterator::end( table ); ++it ) + { + Partition* child = *it; + if ( child == partition ) + { + break; + } + if ( !isPartitionFreeSpace( child ) && !child->hasChildren() && isPartitionNew( child ) ) + { + ++newColorIdx; + } + } + return NEW_PARTITION_COLORS[ newColorIdx % NUM_NEW_PARTITION_COLORS ]; +} + + +void +invalidateCache() +{ + s_partitionColorsCache.clear(); +} + +} // namespace ColorUtils diff --git a/src/modules/partition/partition.conf b/src/modules/partition/partition.conf new file mode 100644 index 0000000..f724760 --- /dev/null +++ b/src/modules/partition/partition.conf @@ -0,0 +1,341 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# + +# Options for EFI system partition. +# +# - *mountPoint* +# This setting specifies the mount point of the EFI system partition. Some +# distributions (Fedora, Debian, Manjaro, etc.) use /boot/efi, others (KaOS, +# etc.) use just /boot. +# +# Defaults to "/boot/efi", may be empty (but weird effects ensue) +# - *recommendedSize* +# This optional setting specifies the size of the EFI system partition. +# If nothing is specified, the default size of 300MiB will be used. +# When writing quantities here, M is treated as MiB, and if you really +# want one-million (10^6) bytes, use MB. +# - *minimumSize* +# This optional setting specifies the absolute minimum size of the EFI +# system partition. If nothing is specified, the *recommendedSize* +# is used instead. +# - *label* +# This optional setting specifies the name of the EFI system partition (see +# PARTLABEL; gpt only; requires KPMCore >= 4.2.0). +# If nothing is specified, the partition name is left unset. +# +# Going below the *recommended* size is allowed, but the user will +# get a warning that it might not work. Going below the *minimum* +# size is not allowed and the user will be told it will not work. +# +# Both quantities must be at least 32MiB, this is enforced by the EFI +# spec. If minimum is not specified, it defaults to the recommended +# size. Distro's that allow more user latitude can set the minimum lower. +efi: + mountPoint: "/boot/efi" + recommendedSize: 4096MiB + minimumSize: 4096MiB + label: "EFI" + +# Deprecated alias of efi.mountPoint +# efiSystemPartition: "/boot/efi" + +# Deprecated alias of efi.recommendedSize +# efiSystemPartitionSize: 4096MiB + +# Deprecated alias of efi.label +# efiSystemPartitionName: EFI + +# In autogenerated partitioning, allow the user to select a swap size? +# If there is exactly one choice, no UI is presented, and the user +# cannot make a choice -- this setting is used. If there is more than +# one choice, a UI is presented. +# +# Legacy settings *neverCreateSwap* and *ensureSuspendToDisk* correspond +# to values of *userSwapChoices* as follows: +# - *neverCreateSwap* is true, means [none] +# - *neverCreateSwap* is false, *ensureSuspendToDisk* is false, [small] +# - *neverCreateSwap* is false, *ensureSuspendToDisk* is true, [suspend] +# +# Autogenerated swap sizes are as follows: +# - *suspend*: Swap is always at least total memory size, +# and up to 4GiB RAM follows the rule-of-thumb 2 * memory; +# from 4GiB to 8 GiB it stays steady at 8GiB, and over 8 GiB memory +# swap is the size of main memory. +# - *small*: Follows the rules above, but Swap is at +# most 8GiB, and no more than 10% of available disk. +# In both cases, a fudge factor (usually 10% extra) is applied so that there +# is some space for administrative overhead (e.g. 8 GiB swap will allocate +# 8.8GiB on disk in the end). +# +# If *file* is enabled here, make sure to have the *fstab* module +# as well (later in the exec phase) so that the swap file is +# actually created. +userSwapChoices: + - none # Create no swap, use no swap + - small # Up to 4GB + - suspend # At least main memory size + # - reuse # Re-use existing swap, but don't create any (unsupported right now) + - file # To swap file instead of partition + +# This optional setting specifies the name of the swap partition (see +# PARTLABEL; gpt only; requires KPMCore >= 4.2.0). +# If nothing is specified, the partition name is left unset. +swapPartitionName: swap + +# LEGACY SETTINGS (these will generate a warning) +# ensureSuspendToDisk: true +# neverCreateSwap: false + +# This setting specifies the LUKS generation (i.e LUKS1, LUKS2) used internally by +# cryptsetup when creating an encrypted partition. +# +# This option is set to luks1 by default, as grub doesn't support LUKS2 + Argon2id +# currently. On the other hand grub does support LUKS2 with PBKDF2 and could therefore be +# also set to luks2. Also there are some patches for grub and Argon2. +# See: https://aur.archlinux.org/packages/grub-improved-luks2-git +# +# Choices: luks1, luks2 (in addition, "luks" means "luks1") +# +# The default is luks1 +# +luksGeneration: luks2 + +# This setting determines if encryption should be allowed when using zfs. This +# setting has no effect unless zfs support is provided. +# +# This setting is to handle the fact that some bootloaders(such as grub) do not +# support zfs encryption. +# +# The default is true +# +allowZfsEncryption: true + +# Correctly draw nested (e.g. logical) partitions as such. +drawNestedPartitions: false + +# Show/hide partition labels on manual partitioning page. +alwaysShowPartitionLabels: true + +# Allow manual partitioning. +# +# When set to false, this option hides the "Manual partitioning" button, +# limiting the user's choice to "Erase", "Replace" or "Alongside". +# This can be useful when using a custom partition layout we don't want +# the user to modify. +# +# If nothing is specified, manual partitioning is enabled. +allowManualPartitioning: true + +# Show not encrypted boot partition warning. +# +# When set to false, this option does not show the +# "Boot partition not encrypted" warning when encrypting the +# root partition but not /boot partition. +# +# If nothing is specified, the warning is shown. +showNotEncryptedBootMessage: false + +# Initial selection on the Choice page +# +# There are four radio buttons (in principle: erase, replace, alongside, manual), +# and you can pick which of them, if any, is initially selected. For most +# installers, "none" is the right choice: it makes the user pick something specific, +# rather than accidentally being able to click past an important choice (in particular, +# "erase" is a dangerous choice). +# +# The default is "none" +# +initialPartitioningChoice: none +# +# Similarly, some of the installation choices may offer a choice of swap; +# the available choices depend on *userSwapChoices*, above, and this +# setting can be used to pick a specific one. +# +# The default is "none" (no swap) if that is one of the enabled options, otherwise +# one of the items from the options. +initialSwapChoice: suspend + +# armInstall +# +# Leaves 16MB empty at the start of a drive when partitioning +# where usually the u-boot loader goes +# +# armInstall: false + +# Default partition table type, used when a "erase" disk is made. +# +# When erasing a disk, a new partition table is created on disk. +# In other cases, e.g. Replace and Alongside, as well as when using +# manual partitioning, this partition table exists already on disk +# and it is left unmodified. +# +# Suggested values: gpt, msdos +# If nothing is specified, Calamares defaults to "gpt" if system is +# efi or "msdos". +# +# Names are case-sensitive and defined by KPMCore. +# defaultPartitionTableType: msdos + +# Requirement for partition table type +# +# Restrict the installation on disks that match the type of partition +# tables that are specified. +# +# Possible values: msdos, gpt. Names are case-sensitive and defined by KPMCore. +# +# If nothing is specified, Calamares defaults to both "msdos" and "gpt". +# +# requiredPartitionTableType: gpt +requiredPartitionTableType: + - msdos + - gpt + +# Default filesystem type, used when a "new" partition is made. +# +# When replacing a partition, the new filesystem type will be from the +# defaultFileSystemType value. In other cases, e.g. Erase and Alongside, +# as well as when using manual partitioning and creating a new +# partition, this filesystem type is pre-selected. Note that +# editing a partition in manual-creation mode will not automatically +# change the filesystem type to this default value -- it is not +# creating a new partition. +# +# Suggested values: ext2, ext3, ext4, reiser, xfs, jfs, btrfs +# If nothing is specified, Calamares defaults to "ext4". +# +# Names are case-sensitive and defined by KPMCore. +defaultFileSystemType: "btrfs" + +# Selectable filesystem type, used when "erase" is done. +# +# When erasing the disk, the *defaultFileSystemType* is used (see +# above), but it is also possible to give users a choice: +# list suitable filesystems here. A drop-down is provided +# to pick which is the filesystems will be used. +# +# The value *defaultFileSystemType* is added to this list (with a warning) +# if not present; the default pick is the *defaultFileSystemType*. +# +# If not specified at all, uses *defaultFileSystemType* without a +# warning (this matches traditional no-choice-available behavior best). +availableFileSystemTypes: ["btrfs","ext4","xfs","f2fs", "zfs"] + +# Show/hide LUKS related functionality in automated partitioning modes. +# Disable this if you choose not to deploy early unlocking support in GRUB2 +# and/or your distribution's initramfs solution. +# +# BIG FAT WARNING: +# +# This option is unsupported, as it cuts out a crucial security feature. +# Disabling LUKS and shipping Calamares without a correctly configured GRUB2 +# and initramfs is considered suboptimal use of the Calamares software. The +# Calamares team will not provide user support for any potential issue that +# may arise as a consequence of setting this option to false. +# It is strongly recommended that system integrators put in the work to support +# LUKS unlocking support in GRUB2 and initramfs/dracut/mkinitcpio/etc. +# For more information on setting up GRUB2 for Calamares with LUKS, see +# https://github.com/calamares/calamares/wiki/Deploy-LUKS +# +# If nothing is specified, LUKS is enabled in automated modes. +#enableLuksAutomatedPartitioning: true + +# When enableLuksAutomatedPartitioning is true, this option will pre-check +# encryption checkbox. This option is only usefull to help people to not forget +# to cypher their disk when installing in enterprise (for exemple). +#preCheckEncryption: false + +# Partition layout. +# +# This optional setting specifies a custom partition layout. +# +# If nothing is specified, the default partition layout is a single partition +# for root that uses 100% of the space and uses the filesystem defined by +# defaultFileSystemType. +# +# Note: the EFI system partition is prepended automatically to the layout if +# needed; the swap partition is appended to the layout if enabled (selections +# "small" or "suspend" in *userSwapChoices*). +# +# Otherwise, the partition layout is defined as follow: +# +# partitionLayout: +# - name: "rootfs" +# type: "4f68bce3-e8cd-4db1-96e7-fbcaf984b709" +# filesystem: "ext4" +# noEncrypt: false +# mountPoint: "/" +# size: 20% +# minSize: 500M +# maxSize: 10G +# attributes: 0xffff000000000003 +# - name: "home" +# type: "933ac7e1-2eb4-4f13-b844-0e14e2aef915" +# filesystem: "ext4" +# noEncrypt: false +# mountPoint: "/home" +# size: 3G +# minSize: 1.5G +# features: +# 64bit: false +# casefold: true +# - name: "data" +# filesystem: "fat32" +# mountPoint: "/data" +# features: +# sector-size: 4096 +# sectors-per-cluster: 128 +# size: 100% + +partitionLayout: + - name: "Boot" + filesystem: "ext4" + mountPoint: "/boot" + size: 10G + noEncrypt: true + - name: "Melawy Linux" + filesystem: "unknown" + mountPoint: "/" + size: 100G + - name: "Home" + filesystem: "unknown" + mountPoint: "/home" + size: 100% + +# There can be any number of partitions, each entry having the following attributes: +# - name: filesystem label +# and +# partition name (gpt only; since KPMCore 4.2.0) +# - uuid: partition uuid (optional parameter; gpt only; requires KPMCore >= 4.2.0) +# - type: partition type (optional parameter; gpt only; requires KPMCore >= 4.2.0) +# - attributes: partition attributes (optional parameter; gpt only; requires KPMCore >= 4.2.0) +# - filesystem: filesystem type (optional parameter) +# - if not set at all, treat as "unformatted" +# - if "unformatted", no filesystem will be created +# - if "unknown" (or an unknown FS name, like "elephant") then the +# default filesystem type, or the user's choice, will be applied instead +# of "unknown" (e.g. the user might pick ext4, or xfs). +# - noEncrypt: whether this partition is exempt from encryption if enabled (optional parameter; default is false) +# - mountPoint: partition mount point (optional parameter; not mounted if unset) +# - size: partition size in bytes (append 'K', 'M' or 'G' for KiB, MiB or GiB) +# or +# % of the available drive space if a '%' is appended to the value +# - minSize: minimum partition size (optional parameter) +# - maxSize: maximum partition size (optional parameter) +# - features: filesystem features (optional parameter; requires KPMCore >= 4.2.0) +# name: boolean or integer or string + +# Checking for available storage +# +# This overlaps with the setting of the same name in the welcome module's +# requirements section. If nothing is set by the welcome module, this +# value is used instead. It is still a problem if there is no required +# size set at all, and the replace and resize options will not be offered +# if no required size is set. +# +# The value is in Gibibytes (GiB). +# +# BIG FAT WARNING: except for OEM-phase-0 use, you should be using +# the welcome module, **and** configure this value in +# `welcome.conf`, not here. +# requiredStorage: 3.5 diff --git a/src/modules/preservefiles/preservefiles.conf b/src/modules/preservefiles/preservefiles.conf new file mode 100644 index 0000000..6be5aa5 --- /dev/null +++ b/src/modules/preservefiles/preservefiles.conf @@ -0,0 +1,69 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# +# Configuration for the preserve-files job +# +# The *files* key contains a list of files to preserve. Each element of +# the list should have one of these forms: +# +# - an absolute path (probably within the host system). This will be preserved +# as the same path within the target system (chroot). If, globally, +# *dontChroot* is true, then these items will be ignored (since the +# destination is the same as the source). +# - a map with a *dest* key. The *dest* value is a path interpreted in the +# target system (if the global *dontChroot* is true, then the host is the +# target as well). Relative paths are not recommended. There are two +# ways to select the source data for the file: +# - *from*, which must have one of the values, below; it is used to +# preserve files whose pathname is known to Calamares internally. +# - *src*, to refer to a path interpreted in the host system. Relative +# paths are not recommended, and are interpreted relative to where +# Calamares is being run. +# Exactly one of the two source keys (either *from* or *src*) must be set. +# +# Special values for the key *from* are: +# - *log*, for the complete log file (up to the moment the preservefiles +# module is run), +# - *config*, for a JSON dump of the contents of global storage. +# Note that this may contain sensitive information, and should be +# given restrictive permissions. +# +# A map with a *dest* key can have these additional fields: +# - *perm*, is a colon-separated tuple of :: +# where is in octal (e.g. 4777 for wide-open, 0400 for read-only +# by owner). If set, the file's ownership and permissions are set to +# those values within the target system; if not set, no permissions +# are changed. +# - *optional*, is a boolean; if this is set to `true` then failure to +# preserve the file will **not** be counted as a failure of the +# module, and installation will proceed. Set this for files that might +# not exist in the host system (e.g. nvidia configuration files that +# are created in some boot scenarios and not in others). +# +# The target path (*dest*) is modified by expanding variables in `${}`: +# - `ROOT` is replaced by the path to the target root (may be /). +# There is never any reason to use this, since the *dest* is already +# interpreted in the target system. +# - `USER` is replaced by the username entered by on the user +# page (may be empty, for instance if no user page is enabled) +# +# +# +dontChroot: true + +files: + - from: log + dest: /var/log/Calamares.log + perm: root:wheel:600 + - from: config + dest: /var/log/Calamares-install.json + perm: root:wheel:600 +# - src: /var/log/nvidia.conf +# dest: /var/log/Calamares-nvidia.conf +# optional: true + +# The *perm* key contains a default value to apply to all files listed +# above that do not have a *perm* key of their own. If not set, +# root:root:0400 (highly restrictive) is used. +# +# perm: "root:root:0400" diff --git a/src/modules/removeuser/removeuser.conf b/src/modules/removeuser/removeuser.conf new file mode 100644 index 0000000..14755f5 --- /dev/null +++ b/src/modules/removeuser/removeuser.conf @@ -0,0 +1,13 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# +# Removes a single user (with userdel) from the system. +# This is typically used in OEM setups or if the live user +# spills into the target system. +# +# The module never fails; if userdel fails, this is logged +# but the module still reports success and installation / setup +# continues as normal. +--- +# Username in the target system to be removed. +username: liveuser diff --git a/src/modules/services-systemd/services-systemd.conf b/src/modules/services-systemd/services-systemd.conf new file mode 100644 index 0000000..1e59da5 --- /dev/null +++ b/src/modules/services-systemd/services-systemd.conf @@ -0,0 +1,195 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# +# Systemd units manipulation. +# +# This module can perform actions using systemd units, +# (for example, enabling, disabling, or masking services, sockets, paths, etc.) +--- + +# There is one key for this module: *units*. Its value is a list of entries. +# Each entry has three keys: +# - *name* is the (string) name of the systemd unit that is being changed. +# Use quotes. You can use any valid systemd unit here (for example, +# "NetworkManager.service", "cups.socket", "lightdm", "gdm", etc.) +# - *action* is the (string) action that you want to perform over the unit +# (for example, "enable", "disable", "mask", "unmask", etc.). Please +# ensure that the action can actually run under chroot (otherwise it is +# pointless) +# - *mandatory* is a boolean option, which states whether the change +# must be done successfully. If systemd reports an error while changing +# a mandatory entry, the installation will fail. When mandatory is false, +# errors for that systemd unit are ignored. If mandatory +# is not specified, the default is false. +# +# The order of operations is the same as the order in which entries +# appear in the list + +# # This example enables NetworkManager.service (and fails if it can't), +# # disables cups.socket (and ignores failure). Then it enables the +# # graphical target (e.g. so that SDDM runs for login), and +# # finally masks pacman-init (an ArchLinux-only service). +# # +# units: +# - name: "NetworkManager.service" +# action: "enable" +# mandatory: true +# +# - name: "cups.socket" +# action: "disable" +# # The property "mandatory" is taken to be false by default here +# # because it is not specified +# +# - name: "graphical.target" +# action: "enable" +# # The property "mandatory" is taken to be false by default here +# # because it is not specified +# +# - name: "pacman-init.service" +# action: "mask" +# # The property "mandatory" is taken to be false by default here +# # because it is not specified + +# By default, no changes are made. +# units: [] + +units: + - name: "NetworkManager" + action: "enable" + mandatory: false + + - name: "cups" + action: "enable" + mandatory: false + + - name: "avahi-daemon" + action: "enable" + mandatory: false + + - name: "systemd-timesyncd" + action: "enable" + mandatory: false + + - name: "vboxservice" + action: "enable" + mandatory: false + + - name: "vmtoolsd" + action: "enable" + mandatory: false + + - name: "vmware-vmblock-fuse" + action: "enable" + mandatory: false + + - name: "ananicy-cpp" + action: "enable" + mandatory: false + + - name: "dbus-broker" + action: "enable" + mandatory: false + + - name: "bpftune" + action: "enable" + mandatory: false + + - name: "systemd-oomd" + action: "enable" + mandatory: false + + - name: "irqbalance" + action: "disable" + mandatory: false + + - name: "preload" + action: "enable" + mandatory: false + + - name: "systemd-resolved" + action: "enable" + mandatory: false + + - name: "systemd-networkd" + action: "enable" + mandatory: false + + - name: "ntpd" + action: "disable" + mandatory: false + + - name: "bluetooth" + action: "enable" + mandatory: false + + - name: "reflector" + action: "enable" + mandatory: false + + - name: "power-profiles-daemon" + action: "enable" + mandatory: false + + - name: "gdm" + action: "enable" + mandatory: false + + - name: "lightdm" + action: "enable" + mandatory: false + + - name: "sddm" + action: "enable" + mandatory: false + + - name: "lxdm" + action: "enable" + mandatory: false + + - name: "ly" + action: "enable" + mandatory: false + + - name: "greetd" + action: "enable" + mandatory: false + + - name: "firewalld" + action: "enable" + mandatory: false + + - name: "ufw" + action: "enable" + mandatory: false + + - name: "zfs-import-cache" + action: "enable" + mandatory: false + + - name: "zfs-mount" + action: "enable" + mandatory: false + + - name: "zfs-import.target" + action: "enable" + mandatory: false + + - name: "zfs.target" + action: "enable" + mandatory: false + + - name: "fstrim.timer" + action: "enable" + mandatory: false + + - name: "pacman-init" + action: "disable" + mandatory: false + + - name: "multi-user.target" + action: "disable" + mandatory: false + + - name: "graphical.target" + action: "set-default" + mandatory: false diff --git a/src/modules/shellprocess/shellprocess_build_dracut_kernels_and_menu_chrooted.conf b/src/modules/shellprocess/shellprocess_build_dracut_kernels_and_menu_chrooted.conf new file mode 100644 index 0000000..9491e40 --- /dev/null +++ b/src/modules/shellprocess/shellprocess_build_dracut_kernels_and_menu_chrooted.conf @@ -0,0 +1,20 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 + +--- + +i18n: + name: "Creating a boot image of the operating system kernel and boot menu" + name[ru]: "Создание загрузочного образа ядра операционной системы и меню загрузки" + +dontChroot: false + +script: + - command: "-/usr/bin/dracut-ukify -a" + timeout: 3600 + + - command: "-/usr/bin/dracut-initramfs -a" + timeout: 3600 + + - command: "-/usr/bin/refind-menu-generator" + timeout: 1200 diff --git a/src/modules/shellprocess/shellprocess_copy_install_logs_dont_chroot.conf b/src/modules/shellprocess/shellprocess_copy_install_logs_dont_chroot.conf new file mode 100644 index 0000000..a139435 --- /dev/null +++ b/src/modules/shellprocess/shellprocess_copy_install_logs_dont_chroot.conf @@ -0,0 +1,14 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 + +--- + +i18n: + name: "Copy logs and files from host to target" + name[ru]: "Копирование журналов установки и файлы с хоста на цель" + +dontChroot: true + +script: + - "-cp /home/liveuser/melawy-install.log ${ROOT}/var/log/melawy-install.log" + - "-chmod 0600 ${ROOT}/var/log/melawy-install.log" diff --git a/src/modules/shellprocess/shellprocess_copy_packages_dont_chroot.conf b/src/modules/shellprocess/shellprocess_copy_packages_dont_chroot.conf new file mode 100644 index 0000000..03b1643 --- /dev/null +++ b/src/modules/shellprocess/shellprocess_copy_packages_dont_chroot.conf @@ -0,0 +1,19 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 + +--- + +i18n: + name: "Copy software packages" + name[ru]: "Копирование пакетов программ" + +dontChroot: true + +timeout: 3600 + +script: + - "-mkdir -p ${ROOT}/usr/share/packages" + - "-cp -a /usr/share/packages ${ROOT}/usr/share/" + + - "-mkdir -p ${ROOT}/opt/extra-drivers" + - "-cp -a /opt/extra-drivers ${ROOT}/opt/" diff --git a/src/modules/shellprocess/shellprocess_copy_pacman_std_conf_dont_chroot.conf b/src/modules/shellprocess/shellprocess_copy_pacman_std_conf_dont_chroot.conf new file mode 100644 index 0000000..c86680b --- /dev/null +++ b/src/modules/shellprocess/shellprocess_copy_pacman_std_conf_dont_chroot.conf @@ -0,0 +1,17 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# +# shellprocess_initialize_pacman.conf +# generate pacman keyring, mirrorlist and copy them into target system +# used for online +--- + +i18n: + name: "Сopy standart pacman config" + name[ru]: "Копирование стандартного конфига pacman" + +dontChroot: true + +script: + - "-mkdir -p ${ROOT}/etc" + - "cp /etc/pacman-std.conf ${ROOT}/etc/pacman.conf" diff --git a/src/modules/shellprocess/shellprocess_copy_refind_theme_chrooted.conf b/src/modules/shellprocess/shellprocess_copy_refind_theme_chrooted.conf new file mode 100644 index 0000000..9a54bcc --- /dev/null +++ b/src/modules/shellprocess/shellprocess_copy_refind_theme_chrooted.conf @@ -0,0 +1,17 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 + +--- + +i18n: + name: "Copying the theme for the boot menu" + name[ru]: "Копирование темы оформления для загрузочного меню" + +dontChroot: false + +script: + - command: "-/usr/local/bin/copy-refind-theme_v1" + timeout: 3600 + + - command: "-/usr/local/bin/copy-refind-theme_v2" + timeout: 3600 diff --git a/src/modules/shellprocess/shellprocess_final_chrooted.conf b/src/modules/shellprocess/shellprocess_final_chrooted.conf new file mode 100644 index 0000000..ef5354c --- /dev/null +++ b/src/modules/shellprocess/shellprocess_final_chrooted.conf @@ -0,0 +1,149 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# +# Configuration for the shell process job. +# +# Executes a list of commands found under the key *script*. +# If the top-level key *dontChroot* is true, then the commands +# are executed in the context of the live system, otherwise +# in the context of the target system. In all of the commands, +# the following variable expansions will take place: +# - `ROOT` is replaced by the root mount point of the **target** +# system from the point of view of the command (when run in the target +# system, e.g. when *dontChroot* is false, that will be `/`). +# - `USER` is replaced by the username, set on the user page. +# +# Variables are written as `${var}`, e.g. `${ROOT}`. +# +# The (global) timeout for the command list can be set with +# the *timeout* key. The value is a time in seconds, default +# is 30 seconds if not set. The timeout **must** be tuned, either +# globally or per-command (see below in the description of *script*), +# to the load or expected running-time of the command. +# +# - Setting a timeout of 30 for a `touch` command is probably exessive +# - Setting a timeout of 1 for a `touch` command might be low, +# on a slow disk where touch needs to be loaded from CDROM +# - Setting a timeout of 30 for a 1GB download is definitely low +# - Setting a timeout of 3600 for a 1GB download is going to leave +# the user in uncertainty for a loooong time. +# +# If a command starts with "-" (a single minus sign), then the +# return value of the command following the - is ignored; otherwise, +# a failing command will abort the installation. This is much like +# make's use of - in a command. +# +# The value of *script* may be: +# - a single string; this is one command that is executed. +# - a single object (this is not useful). +# - a list of items; these are executed one at a time, by +# separate shells (/bin/sh -c is invoked for each command). +# Each list item may be: +# - a single string; this is one command that is executed. +# - a single object, specifying a key *command* and (optionally) +# a key *timeout* to set the timeout for this specific +# command differently from the global setting. +# +# Using a single object is not useful because the same effect can +# be obtained with a single string and a global timeout, but when +# there are multiple commands to execute, one of them might have +# a different timeout than the others. +# +# To change the description of the job, set the *name* entries in *i18n*. +--- +# Set to true to run in host, rather than target system +# dontChroot: false +# Tune this for the commands you're actually running +# timeout: 10 + +# Script may be a single string (because false returns an error exit +# code, this will trigger a failure in the installation): +# +# script: "/usr/bin/false" + +# Script may be a list of strings (because false returns an error exit +# code, **but** the command starts with a "-", the error exit is +# ignored and installation continues): +# +# script: +# - "-/usr/bin/false" +# - "/bin/ls" +# - "/usr/bin/true" + +# Script may be a list of items (if the touch command fails, it is +# ignored; the slowloris command has a different timeout from the +# other commands in the list): +# script: +# - "-touch ${ROOT}/tmp/thingy" +# - "/usr/bin/true" +# - command: "/usr/local/bin/slowloris" +# timeout: 3600 + +# You can change the description of the job (as it is displayed in the +# progress bar during installation) by defining an *i18n* key, which +# has a *name* field and optionally, translations as *name[lang]*. +# +# Without a translation here, the default name from the source code +# is used, "Shell Processes Job". +# + +i18n: + name: "Final cleaning" + name[ru]: "Финальная очистка" + +dontChroot: false + +timeout: 3600 + +script: + # - "-rm /root/.config/{qt5ct,Kvantum,dconf}" + # - "-rm /root/{,.[!.],..?}*" + # + # - "-rm /etc/resolv.conf" + # - "-ln -sf /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf" + # - "-touch /etc/resolv.conf" + # - "-rm /etc/skel/.bash_profile" + # - "-rm /home/${USER}/.bash_profile" + - "-rm -rf /etc/pacman-cache.conf" + - "-rm -rf /etc/pacman-std.conf" + - "-rm -rf /etc/systemd/journald.conf.d" + - "-rm -rf /etc/systemd/logind.conf.d" + - "-rm -rf /etc/systemd/system/getty@tty1.service.d" + - "-rm -rf /home/liveuser" + - "-rm -rf /opt/extra-drivers" + - "-rm -rf /usr/local/share/livecd-sound" + - "-rm -rf /usr/share/packages" + - "-rm /etc/initcpio" + - "-rm /etc/polkit-1/rules.d/49-nopasswd-calamares.rules" + - "-rm /etc/polkit-1/rules.d/49-nopasswd_global.rules" + - "-rm /etc/skel/{.xsession,.xprofile,.xinitrc}" + - "-rm /etc/sudoers.d/g_wheel" + - "-rm /etc/systemd/system/display-manager.service" + - "-rm /etc/systemd/system/etc-pacman.d-gnupg.mount" + - "-rm /etc/systemd/system/intel.service" + - "-rm /root/{.automated_script.sh,.zlogin,.xinitrc,.xsession,.xprofile,.wget-hsts,.screenrc,.ICEauthority}" + - "-rm /usr/bin/GPU-Intel-installer" + - "-rm /var/lib/NetworkManager/NetworkManager.state" + - "-rm /version" + - "-rm /{gpg.conf,gpg-agent.conf,pubring.gpg,secring.gpg}" + + - "-runuser ${USER} -c 'cp -rf /etc/skel/. /home/${USER}/.'" + - "-runuser ${USER} -c 'rm -rf /home/${USER}/{.xsession,.xprofile,.xinitrc}'" + + - '-sed -e "/HandleSuspendKey=ignore/d" -e "/HandleHibernateKey=ignore/d" -e "/HandleLidSwitch=ignore/d" -i /etc/systemd/logind.conf' + - '-sed -e "s/.*pam_wheel\.so/#&/" -i /etc/pam.d/su' + - '-sed -e "s/volatile/auto/g" -i /etc/systemd/journald.conf 2>>/tmp/.errlog' + + - "-rm /etc/mkinitcpio-archiso.conf" + - "-rm /etc/ssh/sshd_config.d/10-archiso.conf" + - "-rm /etc/systemd/resolved.conf.d/archiso.conf" + - "-rm /etc/systemd/system/reflector.service.d/archiso.conf" + - "-rm /etc/mkinitcpio.conf.d/archiso.conf" + - '-find /usr/lib/initcpio -name archiso* -type f -exec rm "{}" \;' + + - "-rm -rf /root/archives" + - "-rm -rf /root/packages" + + - command: "-/usr/local/bin/dmcheck" + - "-rm -rf /usr/local/bin/*" + diff --git a/src/modules/shellprocess/shellprocess_initialize_pacman_dont_chroot_offline.conf b/src/modules/shellprocess/shellprocess_initialize_pacman_dont_chroot_offline.conf new file mode 100644 index 0000000..210252b --- /dev/null +++ b/src/modules/shellprocess/shellprocess_initialize_pacman_dont_chroot_offline.conf @@ -0,0 +1,27 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# +# shellprocess_initialize_pacman.conf +# generate pacman keyring, mirrorlist and copy them into target system +# used for offline +--- + +i18n: + name: "Initialize pacman ... copy pacman mirrorlist and keyring to target ..." + name[ru]: "Инициализация pacman ... копирование списка зеркал pacman и связок ключей ..." + +dontChroot: true + +script: + - "-mkdir -p ${ROOT}/etc" + - "cp /etc/pacman.conf ${ROOT}/etc/pacman.conf" + - "cp /etc/pacman.d/mirrorlist ${ROOT}/etc/pacman.d/" + - "-cp /etc/pacman.d/melawy-linux-mirrorlist ${ROOT}/etc/pacman.d/" + - "-cp /etc/pacman.d/cachyos-mirrorlist ${ROOT}/etc/pacman.d/" + - "-cp /etc/pacman.d/arcolinux-mirrorlist ${ROOT}/etc/pacman.d/" + - "-cp /etc/pacman.d/chaotic-mirrorlist ${ROOT}/etc/pacman.d/" + - "-cp /etc/pacman.d/endeavouros-mirrorlist ${ROOT}/etc/pacman.d/" + - "cp -a /etc/pacman.d/gnupg ${ROOT}/etc/pacman.d/" + + - command: "/usr/local/bin/create-pacman-keyring" + timeout: 3600 diff --git a/src/modules/shellprocess/shellprocess_initialize_pacman_dont_chroot_online.conf b/src/modules/shellprocess/shellprocess_initialize_pacman_dont_chroot_online.conf new file mode 100644 index 0000000..7cbc6a1 --- /dev/null +++ b/src/modules/shellprocess/shellprocess_initialize_pacman_dont_chroot_online.conf @@ -0,0 +1,47 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# +# shellprocess_initialize_pacman.conf +# generate pacman keyring, mirrorlist and copy them into target system +# used for online +--- + +i18n: + name: "Initialize pacman ... ranking mirrors ... copy pacman mirrorlist and keyring to target ..." + name[ru]: "Инициализация pacman ... ранжирование зеркал ... копирование списка зеркал pacman и связок ключей ..." + +dontChroot: true + +script: + - "-mkdir -p ${ROOT}/etc" + - "cp /etc/pacman.conf ${ROOT}/etc/pacman.conf" + - "mkdir -p ${ROOT}/etc/pacman.d/" + - "cp /etc/pacman.d/mirrorlist ${ROOT}/etc/pacman.d/" + - "-cp /etc/pacman.d/melawy-linux-mirrorlist ${ROOT}/etc/pacman.d/" + - "-cp /etc/pacman.d/cachyos-mirrorlist ${ROOT}/etc/pacman.d/" + - "-cp /etc/pacman.d/arcolinux-mirrorlist ${ROOT}/etc/pacman.d/" + - "-cp /etc/pacman.d/chaotic-mirrorlist ${ROOT}/etc/pacman.d/" + - "-cp /etc/pacman.d/endeavouros-mirrorlist ${ROOT}/etc/pacman.d/" + - "cp -a /etc/pacman.d/gnupg ${ROOT}/etc/pacman.d/" + - "cp /etc/resolv.conf ${ROOT}/etc/" + + - command: "/usr/local/bin/update-mirrorlist" + timeout: 3600 + + - command: "pacman -Sy --noconfirm --needed archlinux-keyring" + timeout: 3600 + + - command: "pacman -Sy --noconfirm --needed melawy-linux-keyring" + timeout: 3600 + + - command: "pacman -Sy --noconfirm --needed cachyos-keyring" + timeout: 3600 + + - command: "pacman -Sy --noconfirm --needed arcolinux-keyring" + timeout: 3600 + + - command: "pacman -Sy --noconfirm --needed chaotic-keyring" + timeout: 3600 + + - command: "pacman -Sy --noconfirm --needed endeavouros-keyring" + timeout: 3600 diff --git a/src/modules/shellprocess/shellprocess_install_intel_drivers_chrooted.conf b/src/modules/shellprocess/shellprocess_install_intel_drivers_chrooted.conf new file mode 100644 index 0000000..ec8fc4c --- /dev/null +++ b/src/modules/shellprocess/shellprocess_install_intel_drivers_chrooted.conf @@ -0,0 +1,15 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 + +--- + +i18n: + name: "Installing Intel Video Drivers" + name[ru]: "Установка видеодрайверов Intel" + +dontChroot: false + +timeout: 3600 + +script: + - command: "-/usr/bin/GPU-Intel-installer" diff --git a/src/modules/shellprocess/shellprocess_install_nvidia_drivers_chrooted.conf b/src/modules/shellprocess/shellprocess_install_nvidia_drivers_chrooted.conf new file mode 100644 index 0000000..8aec50f --- /dev/null +++ b/src/modules/shellprocess/shellprocess_install_nvidia_drivers_chrooted.conf @@ -0,0 +1,15 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 + +--- + +i18n: + name: "Installing Nvidia video Drivers" + name[ru]: "Установка видеодрайверов Nvidia" + +dontChroot: false + +timeout: 3600 + +script: + - command: "-/usr/local/bin/online-install-nvidia-drivers" diff --git a/src/modules/shellprocess/shellprocess_remove_ucode_chrooted.conf b/src/modules/shellprocess/shellprocess_remove_ucode_chrooted.conf new file mode 100644 index 0000000..07efc89 --- /dev/null +++ b/src/modules/shellprocess/shellprocess_remove_ucode_chrooted.conf @@ -0,0 +1,15 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 + +--- + +i18n: + name: "Remove unneeded ucode" + name[ru]: "Удаление лишних прошивок процессора" + +dontChroot: false + +timeout: 3600 + +script: + - command: "-/usr/local/bin/remove-ucode" diff --git a/src/modules/shellprocess/shellprocess_remove_unneeded_nvidia_and_virt_machine_and_packages_chrooted.conf b/src/modules/shellprocess/shellprocess_remove_unneeded_nvidia_and_virt_machine_and_packages_chrooted.conf new file mode 100644 index 0000000..aa15ed7 --- /dev/null +++ b/src/modules/shellprocess/shellprocess_remove_unneeded_nvidia_and_virt_machine_and_packages_chrooted.conf @@ -0,0 +1,15 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 + +--- + +i18n: + name: "Removing unnecessary drivers: Nvidia, virtual machines and programms" + name[ru]: "Удаление лишних драйверов: Nvidia, виртуальных машин и программ" + +dontChroot: false + +timeout: 3600 + +script: + - command: "-/usr/local/bin/remove-unneeded" diff --git a/src/modules/shellprocess/shellprocess_reset_systemd_multiuser_chrooted.conf b/src/modules/shellprocess/shellprocess_reset_systemd_multiuser_chrooted.conf new file mode 100644 index 0000000..126f8f4 --- /dev/null +++ b/src/modules/shellprocess/shellprocess_reset_systemd_multiuser_chrooted.conf @@ -0,0 +1,15 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 + +--- + +i18n: + name: "Cleaning multi-user.target.wants" + name[ru]: "Очистка multi-user.target.wants" + +dontChroot: false + +timeout: 3600 + +script: + - "-rm /etc/systemd/system/multi-user.target.wants/*" diff --git a/src/modules/unpackfs/unpackfs.conf b/src/modules/unpackfs/unpackfs.conf new file mode 100644 index 0000000..7f4f645 --- /dev/null +++ b/src/modules/unpackfs/unpackfs.conf @@ -0,0 +1,96 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# +# Unsquash / unpack a filesystem. Multiple sources are supported, and +# they may be squashed or plain filesystems. +# +# Configuration: +# +# from globalstorage: rootMountPoint +# from job.configuration: the path to where to mount the source image(s) +# for copying an ordered list of unpack mappings for image file <-> +# target dir relative to rootMountPoint. + +--- +# Each list item is unpacked, in order, to the target system. +# +# Each list item has the following **mandatory** attributes: +# - *source* path relative to the live / intstalling system to the image +# - *sourcefs* the type of the source files; valid entries are +# - `ext4` (copies the filesystem contents) +# - `squashfs` (unsquashes) +# - `file` (copies a file or directory) +# - (may be others if mount supports it) +# - *destination* path relative to rootMountPoint (so in the target +# system) where this filesystem is unpacked. It may be an +# empty string, which effectively is / (the root) of the target +# system. +# +# Each list item **optionally** can include the following attributes: +# - *exclude* is a list of values that is expanded into --exclude +# arguments for rsync (each entry in exclude gets its own --exclude). +# - *excludeFile* is a single file that is passed to rsync as an +# --exclude-file argument. This should be a full pathname +# inside the **host** filesystem. +# - *weight* is useful when the entries take wildly different +# times to unpack (e.g. with a squashfs, and one single file) +# and the total weight of this module should be distributed +# differently between the entries. (This is only relevant when +# there is more than one entry; by default all the entries +# have the same weight, 1) +# +# EXAMPLES +# +# Usually you list a filesystem image to unpack; you can use +# squashfs or an ext4 image. An empty destination is equivalent to "/", +# the root of the target system. The destination directory must exist +# in the target system. +# +# - source: "/path/to/filesystem.sqfs" +# sourcefs: "squashfs" +# destination: "" +# +# Multiple entries are unpacked in-order; if there is more than one +# item then only the first must exist beforehand -- it's ok to +# create directories with one unsquash and then to use those +# directories as a target from a second unsquash. +# +# - source: "/path/to/another/filesystem.img" +# sourcefs: "ext4" +# destination: "" +# - source: "/path/to/another/filesystem2.img" +# sourcefs: "ext4" +# destination: "/usr/lib/extra" +# +# You can list filesystem source paths relative to the Calamares run +# directory, if you use -d (this is only useful for testing, though). +# +# - source: ./example.sqfs +# sourcefs: squashfs +# destination: "" +# +# You can list individual files (copied one-by-one), or directories +# (the files inside this directory are copied directly to the destination, +# so no "dummycpp/" subdirectory is created in this example). +# Do note that the target directory must exist already (e.g. from +# extracting some other filesystem). +# +# - source: ../CHANGES +# sourcefs: file +# destination: "/tmp/derp" +# - source: ../src/modules/dummycpp +# sourcefs: file +# destination: "/tmp/derp" +# +# The *destination* and *source* are handed off to rsync, so the semantics +# of trailing slashes apply. In order to *rename* a file as it is +# copied, specify one single file (e.g. CHANGES) and a full pathname +# for its destination name, as in the example below. + +unpack: + - source: "/run/archiso/bootmnt/arch/x86_64/airootfs.sfs" + sourcefs: "squashfs" + destination: "" + - source: "/run/archiso/bootmnt/arch/boot/x86_64/vmlinuz-linux-cachyos" + sourcefs: "file" + destination: "/boot/vmlinuz-linux-cachyos" diff --git a/src/modules/users/users.conf b/src/modules/users/users.conf new file mode 100644 index 0000000..4083f99 --- /dev/null +++ b/src/modules/users/users.conf @@ -0,0 +1,285 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# +# Configuration for the one-user-system user module. +# +# Besides these settings, the users module also places the following +# keys into the Global Storage area, based on user input in the view step. +# +# - hostname +# - username +# - password (obscured) +# - autologinUser (if enabled, set to username) +# +# These Global Storage keys are set when the configuration for this module +# is read and when they are modified in the UI. +--- +### GROUPS CONFIGURATION +# +# The system has groups of uses. Some special groups must be +# created during installation. Optionally, there are special +# groups for users who can use sudo and for supporting autologin. + +# Used as default groups for the created user. +# Adjust to your Distribution defaults. +# +# Each entry in the *defaultGroups* list is either: +# - a string, naming a group; this is a **non**-system group +# which does not need to exist in the target system; if it +# does not exist, it will be created. +# - an entry with subkeys *name*, *must_exist* and *system*; +# if the group *must_exist* and does not, an error is thrown +# and the installation fails. +# +# The group is created if it does not exist, and it is +# created as a system group (GID < 1000) or user group +# (GID >= 1000) depending on the value of *system*. +defaultGroups: + - wheel + - rfkill + - sys + - name: users + must_exist: true + system: true + - lp + - video + - network + - storage + - name: wheel + must_exist: false + system: true + - audio + - realtime + +# When *sudoersGroup* is set to a non-empty string, Calamares creates a +# sudoers file for the user. This file is located at: +# `/etc/sudoers.d/10-installer` +# Remember to add the (value of) *sudoersGroup* to *defaultGroups*. +# +# If your Distribution already sets up a group of sudoers in its packaging, +# remove this setting (delete or comment out the line below). Otherwise, +# the setting will be duplicated in the `/etc/sudoers.d/10-installer` file, +# potentially confusing users. +sudoersGroup: wheel + +# Some Distributions require a 'autologin' group for the user. +# Autologin causes a user to become automatically logged in to +# the desktop environment on boot. +# Disable when your Distribution does not require such a group. +autologinGroup: autologin + + +### ROOT AND SUDO +# +# Some distributions have a root user enabled for login. Others +# rely entirely on sudo or similar mechanisms to raise privileges. + +# If set to `false` (the default), writes a sudoers file with `ALL=(ALL)` +# so that commands can be run as any user. If set to `true`, writes +# `ALL=(ALL:ALL)` so that any user and any group can be chosen. +sudoersConfigureWithGroup: false + +# Setting this to false, causes the root account to be disabled. +# When disabled, hides the "Use the same password for administrator" +# checkbox. Also hides the "Choose a password" and associated text-inputs. +setRootPassword: true + +# You can control the initial state for the 'reuse password for root' +# checkbox here. Possible values are: +# - true to check or +# - false to uncheck +# +# When checked, the user password is used for the root account too. +# +# NOTE: *doReusePassword* requires *setRootPassword* to be enabled. +doReusePassword: true + + +### PASSWORDS AND LOGIN +# +# Autologin is convenient for single-user systems, but depends on +# the location of the machine if it is practical. "Password strength" +# measures measures might improve security by enforcing hard-to-guess +# passwords, or might encourage a post-it-under-the-keyboard approach. +# Distributions are free to steer their users to one kind of password +# or another. Weak(er) passwords may be allowed, may cause a warning, +# or may be forbidden entirely. + +# You can control the initial state for the 'autologin checkbox' here. +# Possible values are: +# - true to check or +# - false to uncheck +# These set the **initial** state of the checkbox. +doAutologin: false + +# These are optional password-requirements that a distro can enforce +# on the user. The values given in this sample file set only very weak +# validation settings. +# +# Calamares itself supports two checks: +# - minLength +# - maxLength +# In this sample file, the values are set to -1 which means "no +# minimum", "no maximum". This allows any password at all. +# No effort is done to ensure that the checks are consistent +# (e.g. specifying a maximum length less than the minimum length +# will annoy users). +# +# Calamares supports password checking through libpwquality. +# The libpwquality check relies on the (optional) libpwquality library. +# The value for libpwquality is a list of configuration statements like +# those found in pwquality.conf. The statements are handed off to the +# libpwquality parser for evaluation. The check is ignored if +# libpwquality is not available at build time (generates a warning in +# the log). The Calamares password check rejects passwords with a +# score of < 40 with the given libpwquality settings. +# +# (additional checks may be implemented in CheckPWQuality.cpp and +# wired into UsersPage.cpp) +# +# To disable all password validations: +# - comment out the relevant 'passwordRequirements' keys below, +# or set minLength and maxLength to -1. +# - disable libpwquality at build-time. +# To allow all passwords, but provide warnings: +# - set both 'allowWeakPasswords' and 'allowWeakPasswordsDefault' to true. +# (That will show the box *Allow weak passwords* in the user- +# interface, and check it by default). +# - configure password-checking however you wish. +# To require specific password characteristics: +# - set 'allowWeakPasswords' to false (the default) +# - configure password-checking, e.g. with NIST settings + + +# These are very weak -- actually, none at all -- requirements +passwordRequirements: + nonempty: true + minLength: -1 # Password at least this many characters + maxLength: -1 # Password at most this many characters + libpwquality: + - minlen=0 + - minclass=0 + +# These are "you must have a password, any password" -- requirements +# +# passwordRequirements: +# minLength: 1 + +# These are requirements the try to follow the suggestions from +# https://pages.nist.gov/800-63-3/sp800-63b.html , "Digital Identity Guidelines". +# Note that requiring long and complex passwords has its own cost, +# because the user has to come up with one at install time. +# Setting 'allowWeakPasswords' to false and 'doAutologin' to false +# will require a strong password and prevent (graphical) login +# without the password. It is likely to be annoying for casual users. +# +# passwordRequirements: +# minLength: 8 +# maxLength: 64 +# libpwquality: +# - minlen=8 +# - maxrepeat=3 +# - maxsequence=3 +# - usersubstr=4 +# - badwords=linux + +# You can control the visibility of the 'strong passwords' checkbox here. +# Possible values are: +# - true to show or +# - false to hide (default) +# the checkbox. This checkbox allows the user to choose to disable +# password-strength-checks. By default the box is **hidden**, so +# that you have to pick a password that satisfies the checks. +allowWeakPasswords: true +# You can control the initial state for the 'strong passwords' checkbox here. +# Possible values are: +# - true to uncheck or +# - false to check (default) +# the checkbox by default. Since the box is labeled to enforce strong +# passwords, in order to **allow** weak ones by default, the box needs +# to be unchecked. +allowWeakPasswordsDefault: true + + +# User settings +# +# The user can enter a username, but there are some other +# hidden settings for the user which are configurable in Calamares. +# +# Key *user* has the following sub-keys: +# +# - *shell* Shell to be used for the regular user of the target system. +# There are three possible kinds of settings: +# - unset (i.e. commented out, the default), act as if set to /bin/bash +# - empty (explicit), don't pass shell information to useradd at all +# and rely on a correct configuration file in /etc/default/useradd +# - set, non-empty, use that path as shell. No validation is done +# that the shell actually exists or is executable. +# - *forbidden_names* Login names that may not be used. This list always +# contains "root" and "nobody", but may be extended to list other special +# names for a given distro (eg. "video", or "mysql" might not be a valid +# end-user login name). +user: + shell: /bin/bash + forbidden_names: [ root ] + + +# Hostname settings +# +# The user can enter a hostname; this is configured into the system +# in some way. There are settings for how a hostname is guessed (as +# a default / suggestion) and where (or how) the hostname is set in +# the target system. +# +# Key *hostname* has the following sub-keys: +# +# - *location* How the hostname is set in the target system: +# - *None*, to not set the hostname at all +# - *EtcFile*, to write to `/etc/hostname` directly +# - *Etc*, identical to above +# - *Hostnamed*, to use systemd hostnamed(1) over DBus +# - *Transient*, to remove `/etc/hostname` from the target +# The default is *EtcFile*. Setting this to *None* or *Transient* will +# hide the hostname field. +# - *writeHostsFile* Should /etc/hosts be written with a hostname for +# this machine (also adds localhost and some ipv6 standard entries). +# Defaults to *true*. +# - *template* Is a simple template for making a suggestion for the +# hostname, based on user data. The default is "${first}-${product}". +# This is used only if the hostname field is shown. KMacroExpander is +# used; write `${key}` where `key` is one of the following: +# - *first* User's first name (whatever is first in the User Name field, +# which is first-in-order but not necessarily a "first name" as in +# "given name" or "name by which you call someone"; beware of western bias) +# - *name* All the text in the User Name field. +# - *login* The login name (which may be suggested based on User Name) +# - *product* The hardware product, based on DMI data +# - *product2* The product as described by Qt +# - *cpu* CPU name +# - *host* Current hostname (which may be a transient hostname) +# Literal text in the template is preserved. Calamares tries to map +# `${key}` values to something that will fit in a hostname, but does not +# apply the same to literal text in the template. Do not use invalid +# characters in the literal text, or no suggeston will be done. +# - *forbidden_names* lists hostnames that may not be used. This list +# always contains "localhost", but may list others that are unsuitable +# or broken in special ways. +hostname: + location: EtcFile + writeHostsFile: true + template: "melawy-linux-${first}" + forbidden_names: [ localhost ] + +# Enable Active Directory enrollment support (opt-in) +# +# This uses realmd to enroll the machine in an Active Directory server +# It requires realmd as a runtime dependency of Calamares, if enabled +allowActiveDirectory: false + +presets: + fullName: + # value: "OEM User" + editable: true + loginName: + # value: "oem" + editable: true diff --git a/src/modules/welcome/welcome.conf b/src/modules/welcome/welcome.conf new file mode 100644 index 0000000..bcf6b50 --- /dev/null +++ b/src/modules/welcome/welcome.conf @@ -0,0 +1,138 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# +# Configuration for the welcome module. The welcome page +# displays some information from the branding file. +# Which parts it displays can be configured through +# the show* variables. +# +# In addition to displaying the welcome page, this module +# can check requirements for installation. +--- +# Display settings for various buttons on the welcome page. +# The URLs themselves come from `branding.desc`. Each button +# is show if the corresponding *show* setting +# here is "true". If the setting is "false", the button is hidden. +# Empty or not-set is interpreted as "false". +# +# TODO:3.3 Remove the URL fallback here; URLs only in `branding.desc` +# +# The setting can also be a full URL which will then be used +# instead of the one from the branding file. +showSupportUrl: false +showKnownIssuesUrl: false +showReleaseNotesUrl: false +# TODO:3.3 Move to branding, keep only a bool here +showDonateUrl: false + +# Requirements checking. These are general, generic, things +# that are checked. They may not match with the actual requirements +# imposed by other modules in the system. +requirements: + # Amount of available disk, in GiB. Floating-point is allowed here. + # Note that this does not account for *usable* disk, so it is possible + # to satisfy this requirement, yet have no space to install to. + requiredStorage: 150.0 + + # Amount of available RAM, in GiB. Floating-point is allowed here. + requiredRam: 4.0 + + # To check for internet connectivity, Calamares does a HTTP GET + # on this URL; on success (e.g. HTTP code 200) internet is OK. + # Use a privacy-respecting URL here, preferably in your distro's domain. + # + # The URL is only used if "internet" is in the *check* list below. + internetCheckUrl: + - https://melawy.ru/installation + - https://google.com + # + # This may be a single URL, or a list or URLs, in which case the + # URLs will be checked one-by-one; if any of them returns data, + # internet is assumed to be OK. This can be used to check via + # a number of places, where some domains may be down or blocked. + # + # To use a list of URLs, just use YAML list syntax (e.g. + # + # internetCheckUrl: + # - http://www.kde.org + # - http://www.freebsd.org + # + # or short-form + # + # internetCheckUrl: [ http://www.kde.org, http://www.freebsd.org ] + + # List conditions to check. Each listed condition will be + # probed in some way, and yields true or false according to + # the host system satisfying the condition. + # + # This sample file lists all the conditions that are known. + # + # Note that the last three checks are for testing-purposes only, + # and shouldn't be used in production (they are only available + # when building Calamares in development mode). There are five + # special checks: + # - *false* is a check that is always false (unsatisfied) + # - *true* is a check that is always true (satisfied) + # - *slow-false* takes 3 seconds, and then is false; use this one to + # show off the waiting-spinner before the first results come in + # - *slow-true* takes 3 seconds, and then is true + # - *snark* is a check that is only satisfied once it has been checked + # at least three times ("what I tell you three times is true"). + # Keep in mind that "true" and "false" are YAML keywords for + # boolean values, so should be quoted. + check: + - storage + - ram + - power + - internet + - root + - screen + + # List conditions that **must** be satisfied (from the list + # of conditions, above) for installation to proceed. + # If any of these conditions are not met, the user cannot + # continue past the welcome page. + required: + - storage + - ram + - root + - internet + +# GeoIP checking +# +# This can be used to pre-select a language based on the country +# the user is currently in. It *assumes* that there's internet +# connectivity, though. Configuration is like in the locale module, +# but remember to use a URL that returns full data **and** to +# use a selector that will pick the country, not the timezone. +# +# To disable GeoIP checking, either comment-out the entire geoip section, +# or set the *style* key to an unsupported format (e.g. `none`). +# Also, note the analogous feature in `src/modules/locale/locale.conf`, +# which is where you will find complete documentation. +# +# For testing, the *style* may be set to `fixed`, any URL that +# returns data (e.g. `http://example.com`) and then *selector* +# sets the data that is actually returned (e.g. "DE" to simulate +# the machine being in Germany). +# +# NOTE: the *selector* must pick the country code from the GeoIP +# data. Timezone, city, or other data will not be recognized. +# +geoip: + style: "xml" + url: "https://geoip.kde.org/v1/ubiquity" # extended XML format + selector: "CountryCode" # blank uses default, which is wrong + +# User interface +# +# The "select language" icon is an international standard, but it +# might not theme very well with your desktop environment. +# Fill in an icon name (following FreeDesktop standards) to +# use that named icon instead of the usual one. +# +# Leave blank or unset to use the international standard. +# +# Known icons in this space are "set-language" and "config-language". +# +# languageIcon: set-language diff --git a/src/modules/welcome/welcome_offline.conf b/src/modules/welcome/welcome_offline.conf new file mode 100644 index 0000000..f0103f0 --- /dev/null +++ b/src/modules/welcome/welcome_offline.conf @@ -0,0 +1,132 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# +# Configuration for the welcome module. The welcome page +# displays some information from the branding file. +# Which parts it displays can be configured through +# the show* variables. +# +# In addition to displaying the welcome page, this module +# can check requirements for installation. +--- +# Display settings for various buttons on the welcome page. +# The URLs themselves come from `branding.desc`. Each button +# is show if the corresponding *show* setting +# here is "true". If the setting is "false", the button is hidden. +# Empty or not-set is interpreted as "false". +showSupportUrl: false +showKnownIssuesUrl: false +showReleaseNotesUrl: false +showDonateUrl: false + +# Requirements checking. These are general, generic, things +# that are checked. They may not match with the actual requirements +# imposed by other modules in the system. +requirements: + # Amount of available disk, in GiB. Floating-point is allowed here. + # Note that this does not account for *usable* disk, so it is possible + # to satisfy this requirement, yet have no space to install to. + requiredStorage: 150.0 + + # Amount of available RAM, in GiB. Floating-point is allowed here. + requiredRam: 4.0 + + # To check for internet connectivity, Calamares does a HTTP GET + # on this URL; on success (e.g. HTTP code 200) internet is OK. + # Use a privacy-respecting URL here, preferably in your distro's domain. + # + # The URL is only used if "internet" is in the *check* list below. + internetCheckUrl: + - https://melawy.ru/installation + - https://google.com + # + # This may be a single URL, or a list or URLs, in which case the + # URLs will be checked one-by-one; if any of them returns data, + # internet is assumed to be OK. This can be used to check via + # a number of places, where some domains may be down or blocked. + # + # To use a list of URLs, just use YAML list syntax (e.g. + # + # internetCheckUrl: + # - http://www.kde.org + # - http://www.freebsd.org + # + # or short-form + # + # internetCheckUrl: [ http://www.kde.org, http://www.freebsd.org ] + + # List conditions to check. Each listed condition will be + # probed in some way, and yields true or false according to + # the host system satisfying the condition. + # + # This sample file lists all the conditions that are known. + # + # Note that the last three checks are for testing-purposes only, + # and shouldn't be used in production (they are only available + # when building Calamares in development mode). There are five + # special checks: + # - *false* is a check that is always false (unsatisfied) + # - *true* is a check that is always true (satisfied) + # - *slow-false* takes 3 seconds, and then is false; use this one to + # show off the waiting-spinner before the first results come in + # - *slow-true* takes 3 seconds, and then is true + # - *snark* is a check that is only satisfied once it has been checked + # at least three times ("what I tell you three times is true"). + # Keep in mind that "true" and "false" are YAML keywords for + # boolean values, so should be quoted. + check: + - storage + - ram + - power + #- internet + - root + - screen + + # List conditions that **must** be satisfied (from the list + # of conditions, above) for installation to proceed. + # If any of these conditions are not met, the user cannot + # continue past the welcome page. + required: + - storage + - ram + - root + #- internet + +# GeoIP checking +# +# This can be used to pre-select a language based on the country +# the user is currently in. It *assumes* that there's internet +# connectivity, though. Configuration is like in the locale module, +# but remember to use a URL that returns full data **and** to +# use a selector that will pick the country, not the timezone. +# +# To disable GeoIP checking, either comment-out the entire geoip section, +# or set the *style* key to an unsupported format (e.g. `none`). +# Also, note the analogous feature in `src/modules/locale/locale.conf`, +# which is where you will find complete documentation. +# +# For testing, the *style* may be set to `fixed`, any URL that +# returns data (e.g. `http://example.com`) and then *selector* +# sets the data that is actually returned (e.g. "DE" to simulate +# the machine being in Germany). +# +# NOTE: the *selector* must pick the country code from the GeoIP +# data. Timezone, city, or other data will not be recognized. +# +geoip: + style: "xml" + url: "https://geoip.kde.org/v1/ubiquity" # extended XML format + selector: "CountryCode" # blank uses default, which is wrong + +# User interface +# +# The "select language" icon is an international standard, but it +# might not theme very well with your desktop environment. +# Fill in an icon name (following FreeDesktop standards) to +# use that named icon instead of the usual one. +# +# Leave blank or unset to use the international standard. +# +# Known icons in this space are "set-language" and "config-language". +# +# languageIcon: set-language diff --git a/src/modules/welcome/welcome_online.conf b/src/modules/welcome/welcome_online.conf new file mode 100644 index 0000000..896f4b2 --- /dev/null +++ b/src/modules/welcome/welcome_online.conf @@ -0,0 +1,132 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# +# Configuration for the welcome module. The welcome page +# displays some information from the branding file. +# Which parts it displays can be configured through +# the show* variables. +# +# In addition to displaying the welcome page, this module +# can check requirements for installation. +--- +# Display settings for various buttons on the welcome page. +# The URLs themselves come from `branding.desc`. Each button +# is show if the corresponding *show* setting +# here is "true". If the setting is "false", the button is hidden. +# Empty or not-set is interpreted as "false". +showSupportUrl: false +showKnownIssuesUrl: false +showReleaseNotesUrl: false +showDonateUrl: false + +# Requirements checking. These are general, generic, things +# that are checked. They may not match with the actual requirements +# imposed by other modules in the system. +requirements: + # Amount of available disk, in GiB. Floating-point is allowed here. + # Note that this does not account for *usable* disk, so it is possible + # to satisfy this requirement, yet have no space to install to. + requiredStorage: 150.0 + + # Amount of available RAM, in GiB. Floating-point is allowed here. + requiredRam: 4.0 + + # To check for internet connectivity, Calamares does a HTTP GET + # on this URL; on success (e.g. HTTP code 200) internet is OK. + # Use a privacy-respecting URL here, preferably in your distro's domain. + # + # The URL is only used if "internet" is in the *check* list below. + internetCheckUrl: + - https://melawy.ru/installation + - https://google.com + # + # This may be a single URL, or a list or URLs, in which case the + # URLs will be checked one-by-one; if any of them returns data, + # internet is assumed to be OK. This can be used to check via + # a number of places, where some domains may be down or blocked. + # + # To use a list of URLs, just use YAML list syntax (e.g. + # + # internetCheckUrl: + # - http://www.kde.org + # - http://www.freebsd.org + # + # or short-form + # + # internetCheckUrl: [ http://www.kde.org, http://www.freebsd.org ] + + # List conditions to check. Each listed condition will be + # probed in some way, and yields true or false according to + # the host system satisfying the condition. + # + # This sample file lists all the conditions that are known. + # + # Note that the last three checks are for testing-purposes only, + # and shouldn't be used in production (they are only available + # when building Calamares in development mode). There are five + # special checks: + # - *false* is a check that is always false (unsatisfied) + # - *true* is a check that is always true (satisfied) + # - *slow-false* takes 3 seconds, and then is false; use this one to + # show off the waiting-spinner before the first results come in + # - *slow-true* takes 3 seconds, and then is true + # - *snark* is a check that is only satisfied once it has been checked + # at least three times ("what I tell you three times is true"). + # Keep in mind that "true" and "false" are YAML keywords for + # boolean values, so should be quoted. + check: + - storage + - ram + - power + - internet + - root + - screen + + # List conditions that **must** be satisfied (from the list + # of conditions, above) for installation to proceed. + # If any of these conditions are not met, the user cannot + # continue past the welcome page. + required: + - storage + - ram + - root + - internet + +# GeoIP checking +# +# This can be used to pre-select a language based on the country +# the user is currently in. It *assumes* that there's internet +# connectivity, though. Configuration is like in the locale module, +# but remember to use a URL that returns full data **and** to +# use a selector that will pick the country, not the timezone. +# +# To disable GeoIP checking, either comment-out the entire geoip section, +# or set the *style* key to an unsupported format (e.g. `none`). +# Also, note the analogous feature in `src/modules/locale/locale.conf`, +# which is where you will find complete documentation. +# +# For testing, the *style* may be set to `fixed`, any URL that +# returns data (e.g. `http://example.com`) and then *selector* +# sets the data that is actually returned (e.g. "DE" to simulate +# the machine being in Germany). +# +# NOTE: the *selector* must pick the country code from the GeoIP +# data. Timezone, city, or other data will not be recognized. +# +geoip: + style: "xml" + url: "https://geoip.kde.org/v1/ubiquity" # extended XML format + selector: "CountryCode" # blank uses default, which is wrong + +# User interface +# +# The "select language" icon is an international standard, but it +# might not theme very well with your desktop environment. +# Fill in an icon name (following FreeDesktop standards) to +# use that named icon instead of the usual one. +# +# Leave blank or unset to use the international standard. +# +# Known icons in this space are "set-language" and "config-language". +# +# languageIcon: set-language diff --git a/src/scripts/pacstrap_calamares b/src/scripts/pacstrap_calamares new file mode 100755 index 0000000..3bd25b0 --- /dev/null +++ b/src/scripts/pacstrap_calamares @@ -0,0 +1,363 @@ +#!/bin/bash + +# auto mount removed since calamares already does the job, pacstrap-old get error "/proc already mounted" for example. + +# +# Assumptions: +# 1) User has partitioned, formatted, and mounted partitions on /mnt +# 2) Network is functional +# 3) Arguments passed to the script are valid pacman targets +# 4) A valid mirror appears in /etc/pacman.d/mirrorlist +# + +shopt -s extglob + +# generated from util-linux source: libmount/src/utils.c +declare -A pseudofs_types=([anon_inodefs]=1 + [autofs]=1 + [bdev]=1 + [bpf]=1 + [binfmt_misc]=1 + [cgroup]=1 + [cgroup2]=1 + [configfs]=1 + [cpuset]=1 + [debugfs]=1 + [devfs]=1 + [devpts]=1 + [devtmpfs]=1 + [dlmfs]=1 + [efivarfs]=1 + [fuse.gvfs-fuse-daemon]=1 + [fusectl]=1 + [hugetlbfs]=1 + [mqueue]=1 + [nfsd]=1 + [none]=1 + [pipefs]=1 + [proc]=1 + [pstore]=1 + [ramfs]=1 + [rootfs]=1 + [rpc_pipefs]=1 + [securityfs]=1 + [sockfs]=1 + [spufs]=1 + [sysfs]=1 + [tmpfs]=1) + +# generated from: pkgfile -vbr '/fsck\..+' | awk -F. '{ print $NF }' | sort +declare -A fsck_types=([btrfs]=1 + [cramfs]=1 + [exfat]=1 + [ext2]=1 + [ext3]=1 + [ext4]=1 + [ext4dev]=1 + [f2fs]=1 + [jfs]=1 + [minix]=1 + [msdos]=1 + [reiserfs]=1 + [vfat]=1 + [xfs]=1 + [zfs]=1) + +out() { printf "$1 $2\n" "${@:3}"; } +error() { out "==> ERROR:" "$@"; } >&2 +warning() { out "==> WARNING:" "$@"; } >&2 +msg() { out "==>" "$@"; } +msg2() { out " ->" "$@";} +die() { error "$@"; exit 1; } + +ignore_error() { + "$@" 2>/dev/null + return 0 +} + +in_array() { + local i + for i in "${@:2}"; do + [[ $1 = "$i" ]] && return 0 + done + return 1 +} + +chroot_add_mount() { + mount "$@" && CHROOT_ACTIVE_MOUNTS=("$2" "${CHROOT_ACTIVE_MOUNTS[@]}") +} + +chroot_maybe_add_mount() { + local cond=$1; shift + if eval "$cond"; then + chroot_add_mount "$@" + fi +} + +chroot_setup() { + CHROOT_ACTIVE_MOUNTS=() + [[ $(trap -p EXIT) ]] && die '(BUG): attempting to overwrite existing EXIT trap' + trap 'chroot_teardown' EXIT + +} + +chroot_teardown() { + if (( ${#CHROOT_ACTIVE_MOUNTS[@]} )); then + umount "${CHROOT_ACTIVE_MOUNTS[@]}" + fi + unset CHROOT_ACTIVE_MOUNTS +} + +try_cast() ( + _=$(( $1#$2 )) +) 2>/dev/null + +valid_number_of_base() { + local base=$1 len=${#2} i= + + for (( i = 0; i < len; i++ )); do + try_cast "$base" "${2:i:1}" || return 1 + done + + return 0 +} + +mangle() { + local i= chr= out= + local {a..f}= {A..F}= + + for (( i = 0; i < ${#1}; i++ )); do + chr=${1:i:1} + case $chr in + [[:space:]\\]) + printf -v chr '%03o' "'$chr" + out+=\\ + ;; + esac + out+=$chr + done + + printf '%s' "$out" +} + +unmangle() { + local i= chr= out= len=$(( ${#1} - 4 )) + local {a..f}= {A..F}= + + for (( i = 0; i < len; i++ )); do + chr=${1:i:1} + case $chr in + \\) + if valid_number_of_base 8 "${1:i+1:3}" || + valid_number_of_base 16 "${1:i+1:3}"; then + printf -v chr '%b' "${1:i:4}" + (( i += 3 )) + fi + ;; + esac + out+=$chr + done + + printf '%s' "$out${1:i}" +} + +optstring_match_option() { + local candidate pat patterns + + IFS=, read -ra patterns <<<"$1" + for pat in "${patterns[@]}"; do + if [[ $pat = *=* ]]; then + # "key=val" will only ever match "key=val" + candidate=$2 + else + # "key" will match "key", but also "key=anyval" + candidate=${2%%=*} + fi + + [[ $pat = "$candidate" ]] && return 0 + done + + return 1 +} + +optstring_remove_option() { + local o options_ remove=$2 IFS=, + + read -ra options_ <<<"${!1}" + + for o in "${!options_[@]}"; do + optstring_match_option "$remove" "${options_[o]}" && unset 'options_[o]' + done + + declare -g "$1=${options_[*]}" +} + +optstring_normalize() { + local o options_ norm IFS=, + + read -ra options_ <<<"${!1}" + + # remove empty fields + for o in "${options_[@]}"; do + [[ $o ]] && norm+=("$o") + done + + # avoid empty strings, reset to "defaults" + declare -g "$1=${norm[*]:-defaults}" +} + +optstring_append_option() { + if ! optstring_has_option "$1" "$2"; then + declare -g "$1=${!1},$2" + fi + + optstring_normalize "$1" +} + +optstring_prepend_option() { + local options_=$1 + + if ! optstring_has_option "$1" "$2"; then + declare -g "$1=$2,${!1}" + fi + + optstring_normalize "$1" +} + +optstring_get_option() { + local opts o + + IFS=, read -ra opts <<<"${!1}" + for o in "${opts[@]}"; do + if optstring_match_option "$2" "$o"; then + declare -g "$o" + return 0 + fi + done + + return 1 +} + +optstring_has_option() { + local "${2%%=*}" + + optstring_get_option "$1" "$2" +} + +dm_name_for_devnode() { + read dm_name <"/sys/class/block/${1#/dev/}/dm/name" + if [[ $dm_name ]]; then + printf '/dev/mapper/%s' "$dm_name" + else + # don't leave the caller hanging, just print the original name + # along with the failure. + print '%s' "$1" + error 'Failed to resolve device mapper name for: %s' "$1" + fi +} + +fstype_is_pseudofs() { + (( pseudofs_types["$1"] )) +} + +fstype_has_fsck() { + (( fsck_types["$1"] )) +} + + +hostcache=0 +copykeyring=1 +copymirrorlist=1 + +usage() { + cat < Use an alternate config file for pacman + -c Use the package cache on the host, rather than the target + -G Avoid copying the host's pacman keyring to the target + -i Prompt for package confirmation when needed (run interactively) + -M Avoid copying the host's mirrorlist to the target + + -h Print this help message + +pacstrap installs packages to the specified new root directory. If no packages +are given, pacstrap defaults to the "base" group. + +EOF +} + +if [[ -z $1 || $1 = @(-h|--help) ]]; then + usage + exit $(( $# ? 0 : 1 )) +fi + +(( EUID == 0 )) || die 'This script must be run with root privileges' + +while getopts ':C:cdGiM' flag; do + case $flag in + C) + pacman_config=$OPTARG + ;; + d) + # retired flag. does nothing. + ;; + c) + hostcache=1 + ;; + i) + interactive=1 + ;; + G) + copykeyring=0 + ;; + M) + copymirrorlist=0 + ;; + :) + die '%s: option requires an argument -- '\''%s'\' "${0##*/}" "$OPTARG" + ;; + ?) + die '%s: invalid option -- '\''%s'\' "${0##*/}" "$OPTARG" + ;; + esac +done +shift $(( OPTIND - 1 )) + +(( $# )) || die "No root directory specified" +newroot=$1; shift +pacman_args=("${@:-base}") + +if (( ! hostcache )); then + pacman_args+=(--cachedir="$newroot/var/cache/pacman/pkg") +fi + +if (( ! interactive )); then + pacman_args+=(--noconfirm) + pacman_args+=(--overwrite=*) +fi + +if [[ $pacman_config ]]; then + pacman_args+=(--config="$pacman_config") +fi + +[[ -d $newroot ]] || die "%s is not a directory" "$newroot" + +# create obligatory directories +msg 'Creating install root at %s' "$newroot" +mkdir -m 0755 -p "$newroot"/var/{cache/pacman/pkg,lib/pacman,log} "$newroot"/{dev,run,etc/pacman.d} +mkdir -m 1777 -p "$newroot"/tmp +mkdir -m 0555 -p "$newroot"/{sys,proc} + +# mount API filesystems +chroot_setup "$newroot" || die "failed to setup chroot %s" "$newroot" + + +msg 'Installing packages to %s' "$newroot" +if ! pacman -r "$newroot" -Sy "${pacman_args[@]}"; then + die 'Failed to install packages to new root' +fi + + +# vim: et ts=2 sw=2 ft=sh: