Jump to content

🍌: Difference between revisions

From KDE Community Wiki
Ngraham (talk | contribs)
Document policy on kernel modules
Sitter (talk | contribs)
port most readme content
Line 2: Line 2:


{{ Warning | This page serves as a design document, thus information presented here should be considered a snapshot of the ongoing discussion, not final decisions. }}
{{ Warning | This page serves as a design document, thus information presented here should be considered a snapshot of the ongoing discussion, not final decisions. }}
This page has lots to talk about, please consult the table of contents on the left :)


== Goals ==
== Goals ==
Line 87: Line 89:


The code is currently located [https://invent.kde.org/sitter/kde-linux here]. Note that it is '''not representative of the final product''' and exists as an experimental playground for now.
The code is currently located [https://invent.kde.org/sitter/kde-linux here]. Note that it is '''not representative of the final product''' and exists as an experimental playground for now.
=== Installation ===
* Download latest .raw http://kdeos.haraldsitter.eu/
* Attach USB drive
* `lsblk` to find the right `/dev/node`. e.g. `/dev/sda`
* `sudo dd if=kdeos.raw of=/dev/sda bs=4M`
* `sudo sync`
* reboot into USB stick
* no password on sddm
* run calamares via kickoff/krunner
==== Updates ====
Until discover gets support the following needs running
{{Input|1=<nowiki>
git clone https://invent.kde.org/sitter/kde-linux
cd kde-linux
sudo ./update.sh update
</nowiki>}}
=== VM ===
=== virt-manager ===
* File -> New VM
* Import existing disk image
* [Forward]
* Select from disk
* Set arch as OS
* [Forward]
* Set resources
* [Forward]
* [x] Customize configuration
* [Finish]
* Config window opens
* Make sure at the bottom it says Firmware: UEFI
* [Add Hardware]
* Add a storage of some reasonable size
* [Finish]
* In the boot options item:
* check VirtIO Disk 2 and move it above 1
* [Apply]
* [Begin installation]
=== Local Development ===
In order to speed up local builds, you can create a `mkosi.local.conf` file in the root of the repository with the following content:
{{Input|1=<nowiki>
[Content]
Environment=LOCALE_GEN="en_US.UTF-8 UTF-8" # replace with your locale`
Environment=MIRRORS_COUNTRY=us # replace with your country code`
Environment=PARALLEL_DOWNLOADS=50 # if your internet connection is fast
# Only uncomment this after you have done a complete build once
#Environment=KDE_BUILDER_ARGS="--no-src --install-only"
</nowiki>}}
Then (assuming you have docker with the BTRFS storage driver) you can run:
{{Input|1=<nowiki>
./build_docker.sh --incremental
</nowiki>}}


== Related projects ==
== Related projects ==

Revision as of 16:19, 11 October 2024

β€œKDE Linux” (codenamed β€œProject Banana”) is a work-in-progress name of a KDE-owned general-purpose Linux distribution proposed at Akademy 2024. Not to be confused with KDE Neon.

Warning

This page serves as a design document, thus information presented here should be considered a snapshot of the ongoing discussion, not final decisions.


This page has lots to talk about, please consult the table of contents on the left :)

Goals

Create a bulletproof OS showcasing the best of KDE that we can proudly recommend to users and OEMs, with a coherent "here's how you get it" story.

  • "The KDE operating system"
  • Quality experience
  • Doesn't break, or at least easy to recover
  • Keeping security in mind
  • No packaging knowledge needed
  • Focus on modern technologies
  • User-friendly
  • Attractive for our hardware partners
  • Can be used as the main system by our developers

Non-goals

Does not have to support the runtime installation of kernel modules. This will prevent the out-of-the-box installation of, for example:

  • Proprietary NVIDIA kernel driver (NVIDIA GPUs must either be new enough to use the open-source kernel modules that can be distributed in-tree, or else use Nouveau)
  • VirtualBox
  • Vendor-specific VPNs that require custom out-of-tree kernel modules that cannot be redistributed with the kernel due to license incompatibility

Target audience and use cases

It should have multiple editions suitable for different kinds of users. Ideas:

  • Developer edition: built from git master and released daily, including debugging tools and KDE dev environment. Like Neon Developer.
  • Enthusiast edition: ships released software, and releases to users on upstream KDE's schedule, like Neon User. Additionally, when there are any beta releases, ships the beta.
  • Stable edition: ships only released software on a delayed schedule, based on TBD quality metrics.

Architecture

Original architecture ideas for the project included the following:

  • Reproducible builds, must-pass CI, automated UI testing
  • Base OS is Arch-based. OS updates are some degree of rolling; snapshot based releases with relatively recent libraries
  • Systemd-boot as the bootloader with nice boot theming
  • Btrfs as the filesystem
  • Encryption of all mutable data (e.g. user homedir, and cache locations on /)
  • Included recovery partition
  • Read-only base system, like SteamOS, Kinoite, and MicroOS
  • Atomic image-based A/B updates with rollback functionality
  • Manual package installation happens transparently using a per-user or systemwide overlay
  • Apps are from Flatpak (and maybe also Snap if it's not too hard and the UX is okay)
  • Wayland by default
  • Automatic user data backup system using Btrfs snapshots, with a nice GUI around it like Apple's Time Machine
  • DConf-like configuration management UI suitable for enterprise and managed environments leveraging KConfigXT for everything
  • Simple input method configuration for CJK and more
  • "Troubleshooting hub" app

TODO: hardware support, software separation, security model, deployment, OEM mode; proposed solution, alternatives, trade-offs for each section

updates

systemd-sysext

systemd-sysext allows us to overlay developer content on top of /usr without impacting the base system.

Setup

# create directories
mkdir -p ~/kde/usr/lib/extension-release.d/
# create an extension-release file
cp /usr/lib/os-release ~/kde/usr/lib/extension-release.d/extension-release.kde
# make the ID ignored so updates don't break the extension
sed -i s%^ID=.*%ID=_any%g ~/kde/usr/lib/extension-release.d/extension-release.kde
# owned by root so it can't be removed
sudo chown root:root ~/kde/usr/lib/extension-release.d/extension-release.kde
# enable the extension
sudo mkdir /var/lib/extensions/
sudo ln -s $HOME/kde /var/lib/extensions/kde
sudo systemd-sysext merge
sudo systemd-sysext

Use

Use DESTDIR=~/kde to install stuff and then restart systemd-sysext. Beware that when changing polkit/dbus stuff you also want to restart those services as they don't necessarily pick up changes.

DESTDIR=~/kde ninja install && sudo systemctl restart systemd-sysext.service

Prototype

The code is currently located here. Note that it is not representative of the final product and exists as an experimental playground for now.

Installation

  • Download latest .raw http://kdeos.haraldsitter.eu/
  • Attach USB drive
  • `lsblk` to find the right `/dev/node`. e.g. `/dev/sda`
  • `sudo dd if=kdeos.raw of=/dev/sda bs=4M`
  • `sudo sync`
  • reboot into USB stick
  • no password on sddm
  • run calamares via kickoff/krunner

Updates

Until discover gets support the following needs running

git clone https://invent.kde.org/sitter/kde-linux
cd kde-linux
sudo ./update.sh update

VM

virt-manager

  • File -> New VM
  • Import existing disk image
  • [Forward]
  • Select from disk
  • Set arch as OS
  • [Forward]
  • Set resources
  • [Forward]
  • [x] Customize configuration
  • [Finish]
  • Config window opens
  • Make sure at the bottom it says Firmware: UEFI
  • [Add Hardware]
  • Add a storage of some reasonable size
  • [Finish]
  • In the boot options item:
  • check VirtIO Disk 2 and move it above 1
  • [Apply]
  • [Begin installation]

Local Development

In order to speed up local builds, you can create a `mkosi.local.conf` file in the root of the repository with the following content:

[Content]
Environment=LOCALE_GEN="en_US.UTF-8 UTF-8" # replace with your locale`
Environment=MIRRORS_COUNTRY=us # replace with your country code`
Environment=PARALLEL_DOWNLOADS=50 # if your internet connection is fast

# Only uncomment this after you have done a complete build once
#Environment=KDE_BUILDER_ARGS="--no-src --install-only"

Then (assuming you have docker with the BTRFS storage driver) you can run:

./build_docker.sh --incremental

Related projects

Differences from other immutable distros

(e.g. Kinoite, MicroOS, SteamOS)

Principally, that it is distributed by KDE. This has several advantages:

  • The chain of responsibility is never gated on a third party
  • KDE and KDE e.V. can have a direct relationship with third parties using it, e.g. hardware OEMs
  • KDE can explicitly recommend it without "picking favorites" from among other distro partners

TODO: differences on a technical level (e.g. another approach to updates / isolation? i.e. why this is not just a copy of Kinoite distributed by KDE)

Prior art

KDE Neon, KDE's first version of a self-made OS. Neon fulfills the "distributed by KDE" requirement, but fails on the reliability angle due to the Ubuntu LTS base that ironically becomes unstable because it needs to be tinkered with to get Plasma to build on it, breaking the LTS promise.

Roadmap

TODO (milestones)

Long-term maintenance

TODO (team and infrastructure requirements for long-term sustainability after release; update cycles; testing infrastructure; architectural future-proofness)

Governance

TODO

Promotion

TODO (name and branding, public image, effect on relations with other distros and hardware partners)

Communication

Ideas

See 🍌/Obstsalat

External Resources