├── docs ├── glossary.md ├── scripts.md ├── boot.md ├── systemd.md ├── partitions.md ├── system-updates.md └── packages.md ├── README.md └── LICENSE /docs/glossary.md: -------------------------------------------------------------------------------- 1 | # Glossary of Terms and Codenames 2 | 3 | * **steamcl**: Steam Chainloader - Initial boot EFI mechanism 4 | -------------------------------------------------------------------------------- /docs/scripts.md: -------------------------------------------------------------------------------- 1 | # Custom System Scripts 2 | 3 | SteamOS comes with a large number of handy utility scripts located under `/usr/bin`. These scripts all come from the `steamos-customizations` package: 4 | 5 | ## Logging & Debug Utilities 6 | 7 | * `/usr/bin/steamos-debug` 8 | * Writes a message and optionally shows a message to the splash screen. 9 | * `/usr/bin/steamos-critical` 10 | * Writes a message and optionally shows a message to the splash screen. 11 | * `/usr/bin/steamos-emergency` 12 | * Writes a message and optionally shows a message to the splash screen. 13 | * `/usr/bin/steamos-error` 14 | * Writes a message and optionally shows a message to the splash screen. 15 | * `/usr/bin/steamos-info` 16 | * Writes a message and optionally shows a message to the splash screen. 17 | * `/usr/bin/steamos-fatal` 18 | * Writes a message and optionally shows a message to the splash screen. 19 | * `/usr/bin/steamos-notice` 20 | * Writes a message and optionally shows a message to the splash screen. 21 | * `/usr/bin/steamos-warning` 22 | * Writes a message and optionally shows a message to the splash screen. 23 | 24 | ## Misc System Management 25 | 26 | * `/usr/bin/gpd-xorg-rotation-config` 27 | * Writes `/etc/X11/xorg.conf.d/40-rotation-quirk.conf` if device type equals certain specs, otherwise it deletes the file. 28 | * This might be a leftover artifact from a dev who was testing on a ThinkPad X220 😊 29 | * `/usr/bin/grub-install` 30 | * Shortcut to a standard `grub-install` command with custom args 31 | * `/usr/bin/grub-mkimage` 32 | * Generates the GRUB boot files (See [here](boot.md)) 33 | * `/usr/bin/mkswapfile` 34 | * Creates a swapfile at `$1` with size `$2` (in MB) 35 | * `/usr/bin/mount.steamos` 36 | * Utility script to mount SteamOS partitions to a target location for a given disk and partition set (A/B) 37 | * `/usr/bin/steamos-boot-install` 38 | * `/usr/bin/steamos-chroot` 39 | * `/usr/bin/steamos-factory-reset` 40 | * `/usr/bin/steamos-factory-reset-config` 41 | * Creates a config file for factory reset, containing UUIDs of the relevant partitions 42 | * `/usr/bin/steamos-finalize-install` 43 | * `/usr/bin/steamos-halt` 44 | * `/usr/bin/steamos-logger` 45 | * `/usr/bin/steamos-ls` 46 | * `/usr/bin/steamos-mount` 47 | * `/usr/bin/steamos-partsets` 48 | * `/usr/bin/steamos-poweroff` 49 | * `/usr/bin/steamos-readonly` 50 | * `/usr/bin/steamos-reboot` 51 | * `/usr/bin/steamos-set-bootmode` 52 | * `/usr/bin/steamos-settings-importer` 53 | * `/usr/bin/steamos-update-os` 54 | * `/usr/bin/steamos-verity` 55 | * `/usr/bin/update-dracut` 56 | * `/usr/bin/update-grub` 57 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # steamos-teardown 2 | 3 | An **UNOFFICIAL** repository of information about SteamOS 3, the system powering the Valve Steam Deck. 4 | 5 | **Pull Requests Are Welcome!** 6 | 7 | * The contents of this repository are not endorsed or verified by Valve in any way. 8 | * I make no guarantees of accuracy or correctness: 9 | * Follow the advice and instructions in this repository at your own risk. 10 | * SteamOS is a moving target, and the contents of this repository may not necessarily match the current release. 11 | * This repository is aimed at a technical audience already familiar with Linux system administration, particularly on Arch. 12 | * All materials are based on public information and by inspection of a running SteamOS install. 13 | * All material and opinions expressed are solely my own and do not express the views or opinions of my employer. 14 | 15 | **The focus is on SteamOS. The Steam Client is proprietary software and is out of scope for this repository.** 16 | 17 | ## Topics 18 | 19 | ### SteamOS Customizations 20 | 21 | SteamOS 3 is built upon [Arch Linux](https://wiki.archlinux.org/), but applies heavy customizations that deviate from a plain Arch install in significant ways. This section aims to document these differences for any tinkerers interested in customizing the OS. 22 | 23 | * [Partition Layout and the Read-Only OS Implementation](docs/partitions.md) 24 | * [Booting SteamOS](docs/boot.md) 25 | * [SteamOS Update Mechanism](docs/system-updates.md) 26 | * System Folders, Scripts, and Services 27 | * [Custom System Scripts](docs/scripts.md) 28 | * [Custom SystemD Units](docs/systemd.md) 29 | * [Default System Packages](docs/packages.md) 30 | * Desktop Environment and X config - TODO 31 | * Security Considerations - TODO 32 | * Default Background Services - TODO 33 | * [Glossary of Terms and Codenames](docs/glossary.md) 34 | 35 | ### Guides & Other Resources 36 | 37 | These are third-party guides I've found helpful in my explorations. Follow these at your own risk! 38 | 39 | * User [evlaV](https://gitlab.com/evlaV) on GitLab maintains a series of repos with the sources of custom SteamOS binaries. 40 | * [Running the Steam Deck’s OS in a virtual machine using QEMU](https://blogs.igalia.com/berto/2022/07/05/running-the-steam-decks-os-in-a-virtual-machine-using-qemu/) 41 | 42 | ## License 43 | 44 | All text in this repository is licensed under the `LGPL-2.1+` in order to match the licensing of script files found in SteamOS 3. See [LICENSE](LICENSE) for more details. This repository may contain reproductions or snippets of SteamOS files licensed under `LGPL-2.1+`. 45 | 46 | SteamOS 3 is governed by the terms of the `STEAM® END USER LICENSE AGREEMENT` found at the [SteamOS download page](https://store.steampowered.com/steamos/download/?ver=steamdeck&snr=). 47 | -------------------------------------------------------------------------------- /docs/boot.md: -------------------------------------------------------------------------------- 1 | # Booting SteamOS 2 | 3 | **Pre-Reads**: 4 | 5 | * [Partition Layout and the Read-Only OS Implementation](docs/partitions.md) 6 | 7 | The SteamOS boot process is a three-staged UEFI affair. 8 | 9 | ## Stage 1: Steam Chainloader 10 | 11 | The first EFI entrypoint is located in `/dev/vda1`, which is responsible for chaining to the configured A/B image and maintaining some basic stats about how often each image was booted. 12 | 13 | The contents of this boot partition is very simple: 14 | 15 | ``` 16 | /dev/vda1 17 | ├── [2.0K] efi 18 | │   ├── [2.0K] boot 19 | │   │   ├── [123K] bootx64.efi => Initial EFI boot image 20 | │   │   └── [ 0] steamcl-restricted => Empty 'flag file', tells the chainloader not to check other devices for SteamOS images 21 | │   └── [2.0K] steamos 22 | │   ├── [123K] steamcl.efi => Same file as 'bootx64.efi' above 23 | │   ├── [ 0] steamcl-restricted => Same flag file as above 24 | │   ├── [ 76] steamcl-version => Simple version string plus the SHA256 of 'bootx64.efi' 25 | │   └── [897K] steamos-bootconf => Identical to `/usr/bin/steamos-bootconf` 26 | └── [2.0K] SteamOS 27 | └── [2.0K] conf 28 | ├── [ 233] A.conf => bootconf file for Image A 29 | └── [ 296] B.conf => bootconf file for Image B 30 | ``` 31 | 32 | The files `A.conf` and `B.conf` are known internally to the chainloader as bootconf files. The information provided in them helps the chainloader determine which image to boot. Specifically, the chainloader sorts all bootconf files oldest to newest based on the `boot-requested-at` entry in each bootconf that contains datestamps (formatted `YYYYmmDDHHMMSS`). If `image-invalid` is set, indicating that the image is damaged, the bootconf is considered older than any bootconf that doesn't have it set, reducing its priority in boot. 33 | 34 | Then each bootconf is looped through starting with the newest first. If `boot-other` is set, the bootconf is skipped, if not, then it's chosen to boot. 35 | 36 | The bootconf files are used in part to handle [rollback logic in the case of a failed update](system-updates.md#32-rauc-bootloader-backend). An example contents of `B.conf` is as follows: 37 | 38 | ``` 39 | boot-requested-at: 0 40 | boot-other: 0 41 | boot-other-disabled: 0 42 | boot-attempts: 0 43 | boot-count: 8 44 | boot-time: 20220728043451 45 | image-invalid: 0 46 | update: 0 47 | update-disabled: 0 48 | update-window-start: 0 49 | update-window-end: 0 50 | loader: 51 | partitions: 52 | title: B 53 | comment: [2022-07-27 21:34:51 -0700] bootconf mode: boot-ok 54 | ``` 55 | 56 | ## Stage 2: GRUB 57 | 58 | The stage 2 EFI image is specific to each image, and is located at `/dev/vda2` (A) and `/dev/vda3` (B). The files here are generated via `/usr/bin/grub-mkimage`. This stage contains grub and little else: 59 | 60 | ``` 61 | /dev/vda2 62 | ├── [2.0K] EFI 63 | │   └── [2.0K] steamos 64 | │   ├── [5.5K] grub.cfg => GRUB configuration 65 | │   └── [656K] grubx64.efi => GRUB EFI image 66 | └── [2.0K] SteamOS 67 | └── [2.0K] partsets => Text files containing disk UUIDs 68 | ├── [ 126] A 69 | ├── [ 347] all 70 | ├── [ 126] B 71 | ├── [ 126] other 72 | ├── [ 126] self 73 | └── [ 83] shared 74 | ``` 75 | 76 | The grub config is mostly standard and contains a single boot option (The 'Advanced Options' menu is the exact same as the main entry): 77 | 78 | ``` 79 | menuentry 'SteamOS' --class steamos --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-293b8cff-e33d-4aad-9385-d4be2891df75' { 80 | recordfail 81 | load_video 82 | gfxmode $linux_gfx_mode 83 | insmod steamenv 84 | insmod gzio 85 | if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi 86 | insmod part_gpt 87 | insmod btrfs 88 | search --no-floppy --fs-uuid --set=root 293b8cff-e33d-4aad-9385-d4be2891df75 89 | steamenv_boot linux /boot/vmlinuz-linux-neptune console=tty1 rd.luks=0 rd.lvm=0 rd.md=0 rd.dm=0 rd.systemd.gpt_auto=no loglevel=3 quiet splash plymouth.ignore-serial-consoles module_blacklist=tpm amd_iommu=off amdgpu.gttsize=8128 spi_amd.speed_dev=1 audit=0 fbcon=vc:4-6 fbcon=rotate:1 90 | initrd /boot/amd-ucode.img /boot/initramfs-linux-neptune.img 91 | } 92 | ``` 93 | 94 | One interesting note is the `steamenv_boot` command, which is a non-standard extension presumably implemented directly inside `grubx64.efi`. 95 | 96 | The files in the `SteamOS/partsets` directory contain the disk partition UUIDs for each partition. How these are used during boot is unknown, but they are used in numerous system utilities such as during updates. For instance, the `all` file contains: 97 | 98 | ``` 99 | esp 910fa777-03cd-7142-9f3f-bead6d122f49 100 | efi-A 2702b34c-84c1-ec4c-af28-a4cff0c23bf9 101 | efi-B 2a97b5d2-7392-774a-a168-1429b98e7982 102 | rootfs-A eac2d34a-cd2e-354e-ac0a-6e6121ed8535 103 | rootfs-B 428fb1e5-c1e4-de4c-ac22-d46b3167c7bc 104 | var-A 5da106b6-3fe1-1941-b935-6ade27da6f1b 105 | var-B 0357eecb-944b-c446-b76b-3781832d918c 106 | home 997a28d3-92e9-8b41-ab97-72b9bdb55386 107 | ``` 108 | 109 | ## Stage 3: Linux Kernel 110 | 111 | At last, we get to boot the Linux kernel itself. The `initramfs` and kernel image is stored on `/boot` on the root partition. There's a symlink `/boot/efi => /efi` linking to the Stage 2 GRUB partition of the selected A/B image. 112 | 113 | * Initramfs path: `/boot/initramfs-linux-neptune.img` 114 | * Kernel path: `/boot/vmlinuz-linux-neptune` 115 | 116 | Initramfs contains the following hooks (configured at `/etc/ostree-mkinitcpio.conf`): 117 | 118 | ``` 119 | HOOKS="base systemd ostree autodetect modconf block filesystems keyboard fsck" 120 | ``` -------------------------------------------------------------------------------- /docs/systemd.md: -------------------------------------------------------------------------------- 1 | # Custom SystemD Units 2 | 3 | SteamOS comes packaged with a number of SystemD services, predominantly stored under `/usr/lib/systemd/system`. These services all come from the `steamos-customizations` package: 4 | 5 | * `steamos-offload.target` 6 | * **Name**: `SteamOS Offload` 7 | * Still no idea what "offload" means 8 | * `steamos-update-os.target` 9 | * **Name**: `SteamOS Update Mode` 10 | * It's unclear if this is the trigger for an update, or part of the update chain itself. 11 | * `screen-rotation-quirks.service` 12 | * **Name**: `Adds or removes device-specific rotation-quirk Xorg configuration` 13 | * **Runs**: ??? ("`sysinit.target`") 14 | * Runs `/usr/bin/gpd-xorg-rotation-config` 15 | * `steamos-boot.service` 16 | * **Name**: `SteamOS Boot Registration` 17 | * **Runs**: At boot and during the update process. (Oneshot) 18 | * Runs `/usr/bin/steamos-bootconf set-mode booted` once the system boots up, presumably to update statistics. 19 | * `steamos-cfs-debugfs-tunings.service` 20 | * **Name**: `set multiple CFS tunings in sched debugfs` 21 | * **Runs**: At boot. (Oneshot) 22 | * Runs `/usr/lib/steamos/steamos-cfs-debugfs-settings`. 23 | * `steamos-create-homedir.service` 24 | * **Name**: `Create UID 1000 homedir on first boot/after factory reset` 25 | * **Runs**: At boot. (Oneshot) 26 | * Runs `/usr/lib/steamos/steamos-create-homedir 1000` 27 | * `steamos-devkit-service.service` 28 | * **Name**: `SteamOS Devkit Service` 29 | * **Runs**: At boot. (Oneshot) 30 | * Runs `/usr/lib/steamos/steamos-devkit-service` 31 | * Lets devs debug software from their PC 32 | * See https://gitlab.steamos.cloud/devkit 33 | * `steamos-finish-oobe-migration.service` 34 | * **Name**: `Finish migration from OOBE build` 35 | * **Runs**: At boot. (Oneshot) 36 | * Only runs when the `/home/doorstop` directory is present. 37 | * `steamos-glx-backend.service` 38 | * **Name**: `Choose a GLX backend on boot` 39 | * **Runs**: At boot. (Oneshot) 40 | * Runs `/usr/lib/steamos/steamos-glx-backend` 41 | * `steamos-install-grub.service` 42 | * **Name**: `SteamOS GRUB2 Installation` 43 | * **Runs**: ??? ("`sysinit.target`") 44 | * Runs `/usr/bin/grub-install` and `/usr/bin/grub-install` 45 | * `steamos-install-steamcl.service` 46 | * **Name**: `SteamOS Chainloader Installation` 47 | * **Runs**: ??? ("`sysinit.target`") 48 | * Runs `/usr/bin/steamcl-install` 49 | * `steamos-mkvarboot.service` 50 | * **Name**: `Create SteamOS /var/boot Directory` 51 | * **Runs**: ??? 52 | * Copies `/boot` to `/var/boot`, excluding `/boot/grub`. 53 | * `steamos-settings-importer.service` 54 | * **Name**: `SteamOS Settings Importer` 55 | * **Runs**: At boot. (Oneshot) 56 | * Runs `/usr/bin/steamos-settings-importer` 57 | * `steamos-update-os-plymouth.service` 58 | * **Name**: `SteamOS Update Operating System Plymouth` 59 | * **Runs**: During Update. (Oneshot) 60 | * Runs `/usr/lib/steamos/steamos-update-os-progress` 61 | * `steamos-update-os.service` 62 | * **Name**: `SteamOS Update Operating System` 63 | * **Runs**: During Update. (Oneshot) 64 | * Runs `/usr/bin/steamos-update-os now` 65 | * Immediately triggers a system update 66 | 67 | ## Appendix 68 | 69 | ### steamos-customizations - systemd system 70 | 71 | ```bash 72 | (deck@deck etc)$ grep -r 'steamos-customizations is free software' /usr/lib/systemd/system/ 73 | /usr/lib/systemd/system/etc.mount:# steamos-customizations is free software; you can redistribute it and/or 74 | /usr/lib/systemd/system/home-swapfile.swap:# steamos-customizations is free software; you can redistribute it and/or 75 | /usr/lib/systemd/system/opt.mount:# steamos-customizations is free software; you can redistribute it and/or 76 | /usr/lib/systemd/system/root.mount:# steamos-customizations is free software; you can redistribute it and/or 77 | /usr/lib/systemd/system/srv.mount:# steamos-customizations is free software; you can redistribute it and/or 78 | /usr/lib/systemd/system/steamos-boot.service:# steamos-customizations is free software; you can redistribute it and/or 79 | /usr/lib/systemd/system/steamos-cfs-debugfs-tunings.service:# steamos-customizations is free software; you can redistribute it and/or 80 | /usr/lib/systemd/system/steamos-create-homedir.service:# steamos-customizations is free software; you can redistribute it and/or 81 | /usr/lib/systemd/system/steamos-finish-oobe-migration.service:# steamos-customizations is free software; you can redistribute it and/or 82 | /usr/lib/systemd/system/steamos-install-grub.service:# steamos-customizations is free software; you can redistribute it and/or 83 | /usr/lib/systemd/system/steamos-install-steamcl.service:# steamos-customizations is free software; you can redistribute it and/or 84 | /usr/lib/systemd/system/steamos-offload.target:# steamos-customizations is free software; you can redistribute it and/or 85 | /usr/lib/systemd/system/steamos-settings-importer.service:# steamos-customizations is free software; you can redistribute it and/or modify 86 | /usr/lib/systemd/system/steamos-update-os-plymouth.service:# steamos-customizations is free software; you can redistribute it and/or 87 | /usr/lib/systemd/system/steamos-update-os.service:# steamos-customizations is free software; you can redistribute it and/or 88 | /usr/lib/systemd/system/steamos-update-os.target:# steamos-customizations is free software; you can redistribute it and/or 89 | /usr/lib/systemd/system/swapfile.service:# steamos-customizations is free software; you can redistribute it and/or 90 | /usr/lib/systemd/system/usr-lib-debug.mount:# steamos-customizations is free software; you can redistribute it and/or 91 | /usr/lib/systemd/system/usr-local.mount:# steamos-customizations is free software; you can redistribute it and/or 92 | /usr/lib/systemd/system/var-cache-pacman.mount:# steamos-customizations is free software; you can redistribute it and/or 93 | /usr/lib/systemd/system/var-lib-docker.mount:# steamos-customizations is free software; you can redistribute it and/or 94 | /usr/lib/systemd/system/var-lib-flatpak.mount:# steamos-customizations is free software; you can redistribute it and/or 95 | /usr/lib/systemd/system/var-lib-systemd-coredump.mount:# steamos-customizations is free software; you can redistribute it and/or 96 | /usr/lib/systemd/system/var-log.mount:# steamos-customizations is free software; you can redistribute it and/or 97 | /usr/lib/systemd/system/var-tmp.mount:# steamos-customizations is free software; you can redistribute it and/or 98 | /usr/lib/systemd/system/rauc.service.d/override.conf:# steamos-customizations is free software; you can redistribute it and/or 99 | /usr/lib/systemd/system/sddm.service.d/steamos-customizations.conf:# steamos-customizations is free software; you can redistribute it and/or 100 | ``` 101 | -------------------------------------------------------------------------------- /docs/partitions.md: -------------------------------------------------------------------------------- 1 | # Partition Layout and the Read-Only OS Implementation 2 | 3 | ## Two System Copies 4 | 5 | **SteamOS is comprised of two full copies, called 'Image A' and 'Image B'.** 6 | 7 | The system will have one of the images chosen as the 'active' side, and will consistently boot from that image until it is told to swap via `steamos-bootconf`. Each image has its own set of system root, EFI, and configuration partitions. The `/home` partition is shared across both sides, though files in the `/var` partition are synced under normal operation. 8 | 9 | * Which image is currently active can be found using `steamos-bootconf list-images` or `findmnt -no partlabel /`. 10 | * We can reboot into the 'other' image using the `steamos-set-bootmode reboot-other` command. However, this is not recommended. 11 | * Unlike most other SteamOS commands, this one is a binary application as it's a `suid` application. 12 | * We see how this setup maps to the idea of "slots" in the [RAUC Update mechanism used by SteamOS](system-updates.md). 13 | 14 | This setup is ultimately there to support the [SteamOS Atomic Update mechanism](system-updates.md), and despite initial appearances is *not* there for redundancy. 15 | 16 | ## Partition Table 17 | 18 | SteamOS is divided into eight partitions, laid out in the following fashion: 19 | 20 | ``` 21 | /dev/vda1 => EFI (early boot) [VFAT, 64MB, Not Mounted by Default] 22 | 23 | OS Image A: 24 | /dev/vda2 => EFI (A) [VFAT, 32MB, Not Mounted by Default] 25 | /dev/vda4 => Root (A) [BTRFS, 5GB, RO] 26 | /dev/vda6 => /var (A) [EXT4, 256MB, RW] 27 | 28 | OS Image B: 29 | /dev/vda3 => EFI (B) [VFAT, 32MB, Not Mounted by Default] 30 | /dev/vda5 => Root (B) [BTRFS, 5GB, RO] 31 | /dev/vda7 => /var (B) [EXT4, 256MB, RW] 32 | 33 | /dev/vda8 => /home [EXT4, , RW] 34 | Numerous system directories are bind mounted to folders under /home/.steamos: 35 | -> /opt => /home/.steamos/offload/opt 36 | -> /root => /home/.steamos/offload/root 37 | -> /srv => /home/.steamos/offload/srv 38 | -> /var/cache/pacman => /home/.steamos/offload/var/cache/pacman 39 | -> /var/lib/docker => /home/.steamos/offload/var/lib/docker 40 | -> /var/lib/flatpak => /home/.steamos/offload/var/lib/flatpak 41 | -> /var/lib/systemd/coredump => /home/.steamos/offload/var/lib/systemd/coredump 42 | -> /var/log => /home/.steamos/offload/var/log 43 | -> /var/tmp => /home/.steamos/offload/var/tmp 44 | ``` 45 | 46 | ## Read-Only OS 47 | 48 | **`/home` is the preferred safe and persistent storage (or one of the 'offload'-bound paths pointing to `/home`).** 49 | 50 | * This means that user-specific configuration, application settings, documents, etc are safely stored and will not be removed upon system updates. 51 | * Flatpaks are stored in `/var/lib/flatpak` and will be similarly persisted. 52 | * Software installed into `/opt` will also be persisted, presenting a potential avenue for installing non-flatpak applications. 53 | * Interestingly, `/var/lib/docker` is also persisted despite Docker and its alternatives not being installed. 54 | * Logs and coredumps are persisted if they are saved to the appropriate locations in `/var/lib`. `/tmp` is a ramdisk and will be cleared on reboot. 55 | 56 | **Despite initial appearances, `/var` is persistent** 57 | 58 | * During system update, there is a post-update hook to sync the two `/var` partitions. 59 | * Changes made to `/var` in the time between a successful system update and a reboot are at risk of being deleted (except for the bind-mounted directories). 60 | 61 | **`/etc` is writable.** 62 | 63 | * `/etc` is implemented as an `overlayfs` overlay between the read-only root partition and the `/var/lib/overlays/etc/upper` directory, which is a writable partition. 64 | * See the section on `/var` for warnings about when changes might get lost. 65 | 66 | **Writing to the root partition is possible via the `steamos-readonly` utility**, which is a wrapper around standard Linux commands to remount a BTRFS root as RW or RO. However as Valve has consistently pointed out, any changes here is *will* be lost upon system updates. 67 | 68 | ## OSTree 69 | 70 | SteamOS uses `flatpak`, which in turn uses `ostree`. There are several indications that it does (i.e. `/etc/ostree-mkinitcpio.conf`), but it does not use standard update mechanisms (`/etc/ostree` is entirely empty). 71 | 72 | ## Misc Outputs 73 | 74 | ### `fdisk`: 75 | 76 | ``` 77 | Disk /dev/vda: 64 GiB, 68719476736 bytes, 134217728 sectors 78 | Units: sectors of 1 * 512 = 512 bytes 79 | Sector size (logical/physical): 512 bytes / 512 bytes 80 | I/O size (minimum/optimal): 512 bytes / 512 bytes 81 | Disklabel type: gpt 82 | Disk identifier: 2EBDF9DF-1584-0042-8EBF-DDC54D426457 83 | 84 | Device Start End Sectors Size Type 85 | /dev/vda1 2048 133119 131072 64M EFI System 86 | /dev/vda2 133120 198655 65536 32M Microsoft basic data 87 | /dev/vda3 198656 264191 65536 32M Microsoft basic data 88 | /dev/vda4 264192 10749951 10485760 5G Linux root (x86-64) 89 | /dev/vda5 10749952 21235711 10485760 5G Linux root (x86-64) 90 | /dev/vda6 21235712 21759999 524288 256M Linux variable data 91 | /dev/vda7 21760000 22284287 524288 256M Linux variable data 92 | /dev/vda8 22284288 134217694 111933407 53.4G Linux home 93 | ``` 94 | 95 | ### `findmnt`: 96 | 97 | ``` 98 | TARGET SOURCE FSTYPE OPTIONS 99 | / /dev/vda5 btrfs rw,relatime,space_cache=v2,subvolid=5,subvol=/ 100 | ├─/proc proc proc rw,nosuid,nodev,noexec,relatime 101 | │ └─/proc/sys/fs/binfmt_misc systemd-1 autofs rw,relatime,fd=30,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=16444 102 | ├─/sys sysfs sysfs rw,nosuid,nodev,noexec,relatime 103 | │ ├─/sys/kernel/security securityfs securityfs rw,nosuid,nodev,noexec,relatime 104 | │ ├─/sys/fs/cgroup cgroup2 cgroup2 rw,nosuid,nodev,noexec,relatime,nsdelegate,memory_recursiveprot 105 | │ ├─/sys/fs/pstore pstore pstore rw,nosuid,nodev,noexec,relatime 106 | │ ├─/sys/firmware/efi/efivars 107 | │ │ efivarfs efivarfs rw,nosuid,nodev,noexec,relatime 108 | │ ├─/sys/fs/bpf none bpf rw,nosuid,nodev,noexec,relatime,mode=700 109 | │ ├─/sys/kernel/debug debugfs debugfs rw,nosuid,nodev,noexec,relatime 110 | │ ├─/sys/kernel/tracing tracefs tracefs rw,nosuid,nodev,noexec,relatime 111 | │ ├─/sys/kernel/config configfs configfs rw,nosuid,nodev,noexec,relatime 112 | │ └─/sys/fs/fuse/connections fusectl fusectl rw,nosuid,nodev,noexec,relatime 113 | ├─/dev devtmpfs devtmpfs rw,nosuid,size=4032420k,nr_inodes=1008105,mode=755,inode64 114 | │ ├─/dev/shm tmpfs tmpfs rw,nosuid,nodev,inode64 115 | │ ├─/dev/pts devpts devpts rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000 116 | │ ├─/dev/mqueue mqueue mqueue rw,nosuid,nodev,noexec,relatime 117 | │ └─/dev/hugepages hugetlbfs hugetlbfs rw,relatime,pagesize=2M 118 | ├─/run tmpfs tmpfs rw,nosuid,nodev,size=1627980k,nr_inodes=819200,mode=755,inode64 119 | │ └─/run/user/1000 tmpfs tmpfs rw,nosuid,nodev,relatime,size=813988k,nr_inodes=203497,mode=700,uid=1000,gid=1000,inode64 120 | ├─/efi systemd-1 autofs rw,relatime,fd=46,pgrp=1,timeout=60,minproto=5,maxproto=5,direct,pipe_ino=14555 121 | ├─/esp systemd-1 autofs rw,relatime,fd=47,pgrp=1,timeout=60,minproto=5,maxproto=5,direct,pipe_ino=14557 122 | ├─/var /dev/vda7 ext4 rw,relatime 123 | │ ├─/var/cache/pacman /dev/vda8[/.steamos/offload/var/cache/pacman] 124 | │ │ ext4 rw,relatime 125 | │ ├─/var/lib/docker /dev/vda8[/.steamos/offload/var/lib/docker] 126 | │ │ ext4 rw,relatime 127 | │ ├─/var/lib/flatpak /dev/vda8[/.steamos/offload/var/lib/flatpak] 128 | │ │ ext4 rw,relatime 129 | │ ├─/var/lib/systemd/coredump 130 | │ │ /dev/vda8[/.steamos/offload/var/lib/systemd/coredump] 131 | │ │ ext4 rw,relatime 132 | │ ├─/var/log /dev/vda8[/.steamos/offload/var/log] 133 | │ │ ext4 rw,relatime 134 | │ └─/var/tmp /dev/vda8[/.steamos/offload/var/tmp] 135 | │ ext4 rw,relatime 136 | ├─/home /dev/vda8 ext4 rw,relatime 137 | ├─/etc overlay overlay rw,relatime,lowerdir=/sysroot/etc,upperdir=/sysroot/var/lib/overlays/etc/upper,workdir=/sysroot/var/lib/overlays/etc/wor 138 | ├─/opt /dev/vda8[/.steamos/offload/opt] 139 | │ ext4 rw,relatime 140 | ├─/root /dev/vda8[/.steamos/offload/root] 141 | │ ext4 rw,relatime 142 | ├─/srv /dev/vda8[/.steamos/offload/srv] 143 | │ ext4 rw,relatime 144 | └─/tmp tmpfs tmpfs rw,nosuid,nodev,size=4069944k,nr_inodes=1048576,inode64 145 | └─/tmp/a /dev/vda1 vfat rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro 146 | ``` 147 | -------------------------------------------------------------------------------- /docs/system-updates.md: -------------------------------------------------------------------------------- 1 | # SteamOS Update Mechanism 2 | 3 | SteamOS updates are performed largely via standard open-source mechanisms, 4 | tied together with custom logic to handle the OS' unique layout and to give 5 | users increased flexibility. 6 | 7 | At a high level, the updater uses [RAUC](https://rauc.io/index.html) to write a complete root partition image into the *opposite* [OS Image](partitions.md#redundant-system-copies), then reboots into that image. The system then clones the contents of the `/var` partition over to the updated image, which by extension will also copy over `/etc` changes. 8 | 9 | But you're here because you're interested in the gory details. Let's begin. 10 | 11 | ## 1. Triggering The Update 12 | 13 | Triggering an update from the terminal is done via the `steamos-update-os` command. 14 | While there are multiple other similarly-named commands and utilities on the device, 15 | directly invoking those is not recommended as they can jump into the middle of the 16 | chain of events that comprise an update. 17 | 18 | The `steamos-update-os` command support two run modes: 19 | 20 | 1. `now` triggers an immediate update, prompting the user to restart when complete. 21 | 1. `after-reboot` executes `steamos-set-bootmode update-other` to add `systemd.unit=steamos-update-os.target` into the kernel command line in grub, ensuring that the next reboot enters "SteamOS Update Mode". Update Mode is a bare-bones mode that simply runs `steamos-update-os now` and displays a nice progress bar. Execution then continues as though the user chose to update `now`. 22 | 23 | `steamos-update-os now` simply runs `steamos-atomupd-client`, which is a basic wrapper around the Python package 24 | `steamosatomupd`, installed via `steamos-atomupd-client-git`. 25 | 26 | * Interestingly, this package also contains the source for the update server itself is at `/usr/lib/python3.10/site-packages/steamosatomupd/server.py`. 27 | * While this is not used by the Deck, it makes hosting a custom update server quite easy! 28 | * The server uses some neat logic to de-dupe common chunks of data across multiple update files, but this is outside the scope of this project. 29 | 30 | The main logic begins at `/usr/lib/python3.10/site-packages/steamosatomupd/client.py`, in the `main` function. 31 | 32 | ## 2 Configuring Which Update To Install 33 | 34 | The first step is to load a series of configuration files, most of which can be overwritten via arguments to `steamos-update-os`: 35 | 36 | ``` 37 | usage: steamos-atomupd-client [-h] [-c FILE] [-q] [-d] [--query-only] [--estimate-download-size] [--manifest-file FILE] [--mk-manifest-file] 38 | [--update-file UPDATE_FILE] [--update-from-url UPDATE_FROM_URL] [--update-version UPDATE_VERSION] 39 | [--variant VARIANT] 40 | 41 | SteamOS Update Client 42 | 43 | options: 44 | -h, --help show this help message and exit 45 | -c FILE, --config FILE 46 | configuration file (default: /etc/steamos-atomupd/client.conf) 47 | -q, --quiet hide output 48 | -d, --debug show debug messages 49 | --query-only only query if an update is available 50 | --estimate-download-size 51 | Include in the update file the estimated download size for each image candidate 52 | --manifest-file FILE manifest file (default: /etc/steamos-atomupd/manifest.json) 53 | --mk-manifest-file don't use existing manifest file, make one instead 54 | --update-file UPDATE_FILE 55 | update from given file, instead of downloading it from server 56 | --update-from-url UPDATE_FROM_URL 57 | update to a specific RAUC bundle image 58 | --update-version UPDATE_VERSION 59 | update to a specific buildid version. It will fail if either the update file doesn't contain this buildid or if it 60 | requires a base image that is newer than the current one 61 | --variant VARIANT use this 'variant' value instead of the one parsed from the manifest file 62 | ``` 63 | 64 | The ultimate goal of all these options is to determine the URL of an [RAUC](https://rauc.io/index.html) update bundle, if one exists. The logic used and precedence between these flags is not obvious, so this is the actual logic from top to bottom: 65 | 66 | 1. If `--update-from-url` is provided, download and install from that URL and skip the rest of the logic below. 67 | 1. If `--update-file` is provided, install from this file and skip the rest of the logic below. 68 | 1. If `--mk-manifest-file` is provided, skip all manifest parsing and generate an 'Image' specification based on the `/etc/os-release` file. 69 | 1. If `--manifest-file` is provided, read a custom manifest from the provided path. Ignore the default - it's applied later. 70 | 1. Otherwise, load a manifest from the `[Host]/Manifest` key in the config file provided via `-c` (or the default). 71 | * This needs to be a local file path. 72 | * This key is normally missing in the default config file. 73 | 1. Otherwise, load a default manifest from `/etc/steamos-atomupd/manifest.json` 74 | 1. Parse the manifest to create an 'Image' specification. Override the 'variant' field using `--variant` if provided. 75 | 1. Encode the 'Image' specification as a dictionary and fetch an update file (if any) from the `[Server]/QueryUrl` specified in the config. 76 | * Credentials to the update server are loaded from `~/.netrc`. 77 | 1. Apply `--update-version` restrictions. 78 | 79 | At this point, we have a RAUC update bundle. See [this documentation](https://rauc.readthedocs.io/en/latest/using.html#creating-bundles) for more details on RAUC bundles. 80 | 81 | ## 3. Download and Install Update Via RAUC 82 | 83 | RAUC supports multiple ways of downloading update files specified in the bundle. The default (and the one in use) is called [casync](https://github.com/systemd/casync), a Linux utility to sync large files across two systems. 84 | 85 | * There is a (disabled) option to use a different syncing mechanism known as [desync](https://github.com/folbricht/desync). This is configured via the `[casync]/use-desync` option in `/etc/rauc/system.conf`. 86 | * The custom logic powering this looks quite hairy, so it's probably a good idea to keep that off for now. 87 | * The logic suggests a future mechanism to only download a delta between the data on disk versus the update, massively decreasing update sizes. 88 | 89 | RAUC will be using `/tmp`, and it seems that Valve has hit issues with this before. Just before running RAUC, they increase the `/tmp` ramdisk limits to allow 100% of RAM and up to 1 Billion inodes. 90 | 91 | * In practice it uses less than half of the 16GB RAM available, but it's probably best to have some free RAM before starting an update. 92 | 93 | RAUC is finally triggered via `rauc install `. 94 | 95 | ### 3.1 RAUC Config 96 | 97 | RAUC is configured to download update data to `/tmp` and verify files using a public key located in `/etc/rauc/keyring.pem`. 98 | 99 | * Self-signed certificate 100 | * `Issuer: C = US, ST = Washington, L = Bellevue, O = Valve Corp, CN = steamdeck-images` 101 | 102 | RAUC works on the idea of "[slots](https://rauc.readthedocs.io/en/latest/basic.html#slots)", where each slot is something that can be updated. In this case, a slot is a raw disk partition. Each of the two root partitions are present as slots in this configuration. (There's also a third "dev" slot which we'll ignore.) 103 | 104 | RAUC is also in charge of changing which slot the system boots from. Valve has installed a custom bootloader backend, along with pre and post install scripts to perform additional tasks. 105 | 106 | * The `pre` script (at `/usr/lib/rauc/pre-install.sh`) is quite simple: 107 | * Sanity checks the update to ensure it won't cause a UUID collision with the currently mounted system partition. 108 | * Disables all systemd timers to avoid disruptions. 109 | * The `post` script (at `/usr/lib/rauc/post-install.sh`) is much more complex, and is documented below. 110 | * Some community members have already explored [using these pre/post scripts to customize a system install](https://github.com/icedream/steamos-permanent-mods). 111 | 112 | ### 3.2 RAUC Bootloader Backend 113 | 114 | Much of the magic happens in RAUC itself, but it needs to interact with SteamOS' custom boot mechanism. This is handled by a custom bootloader backend located at `/usr/lib/rauc/bootloader-custom-backend.sh`. This script implements a standard RAUC API and is in charge of: 115 | 116 | * Fetching what A/B slot is the "current" system image. 117 | * Configuring what A/B slot the system will reboot into next. 118 | * Fetch whether the last boot was successful on a particular A/B slot. 119 | 120 | The bootloader itself is simply an interface to get and set information. The actual logic of what gets updated is handled by RAUC. Between the [RAUC logic](https://rauc.readthedocs.io/en/latest/reference.html#rauc-s-basic-update-procedure) and the bootloader backend, the following behavior arises: 121 | 122 | * The update will install into the *opposite* slot of the currently-running system. 123 | * The system will reboot into a previously-working slot if the update resulted in a boot failure. 124 | * The update process clears the kernel cmdline flags set by the `steamos-update-os after-reboot` command to ensure we exit Update Mode on next reboot. 125 | 126 | ## 4. Final Steps 127 | 128 | Final update steps are implemented via the `/usr/lib/rauc/post-install.sh` script. This script: 129 | 130 | * Re-enables systemd timers. 131 | * Regenerates files containing the UUIDs of system partitions. Partition UUIDs are update-specific, and change with each update. 132 | * Copies the contents of the `/var` partition for the currently-running OS side into the one for the newly updated side: 133 | * It first *reformats* the `/var` partition of the newly updated OS side. 134 | * The contents of the current `/var` partition is then `rsync`ed over to the new partition. 135 | * This means that any changes to `/var` from this point on will be lost. 136 | * Regenerates GRUB for both Image A and Image B. 137 | * Writes the current set of network configurations to the newly updated slot. It's unknown why this is necessary as `/var` (and by extension `/etc` is already synced). 138 | 139 | And we're done! Execution finally returns to `steamos-update-os`. If it detects we're currently in Update Mode, it automatically reboots the system after 5 seconds. Otherwise, it nicely asks the user to reboot. 140 | 141 | ## Other Notes 142 | 143 | * Once triggered, RAUC runs as a system daemon. If the terminal process is aborted via `Ctrl+C`, you may need to run `systemctl stop rauc` or `killall rauc` to actually abort the update. 144 | * A failed update often leaves the running system in an odd state, as some things that were temporarily mounted do not get unmounted. A reboot is often needed before retrying an update. 145 | * Error messages get logged to `journald`. Use `journalctl --unit=rauc` to see them. 146 | * If you enter "Update Mode" when there's no update available, it's theoretically possible to get stuck as the relevant kernel cmd is only cleared upon a successful update. 147 | * If you're playing around in a VM and can't get updates to work, run the following two commands, reboot, and try again. 148 | * `steamos-chroot --partset A -- mkdir -p /var/lib/overlays/etc/upper/NetworkManager/system-connections/` 149 | * `steamos-chroot --partset B -- mkdir -p /var/lib/overlays/etc/upper/NetworkManager/system-connections/` 150 | 151 | ## Misc Outputs 152 | 153 | ### Sample Manifest 154 | 155 | ```json 156 | { 157 | "product": "steamos", 158 | "release": "holo", 159 | "variant": "steamdeck", 160 | "arch": "amd64", 161 | "version": "snapshot", 162 | "buildid": "20220425.2", 163 | "checkpoint": false, 164 | "estimated_size": 0 165 | } 166 | ``` 167 | 168 | ### Sample `/etc/os-release` 169 | 170 | ``` 171 | NAME="SteamOS" 172 | PRETTY_NAME="SteamOS" 173 | VERSION_CODENAME=holo 174 | ID=steamos 175 | ID_LIKE=arch 176 | ANSI_COLOR="1;35" 177 | HOME_URL="https://www.steampowered.com/" 178 | DOCUMENTATION_URL="https://support.steampowered.com/" 179 | SUPPORT_URL="https://support.steampowered.com/" 180 | BUG_REPORT_URL="https://support.steampowered.com/" 181 | LOGO=steamos 182 | VARIANT_ID=steamdeck 183 | BUILD_ID=20220425.2 184 | VERSION_ID=3.1 185 | ``` 186 | -------------------------------------------------------------------------------- /docs/packages.md: -------------------------------------------------------------------------------- 1 | # Default System Packages 2 | 3 | SteamOS comes with the following packages pre-installed. All but ten are standard ArchLinux packages: 4 | 5 | ``` 6 | jupiter-hw-support 7 | jupiter-legacy-support 8 | steam-im-modules 9 | steam-jupiter-stable => Steam Client 10 | steamdeck-kde-presets => Self explanatory 11 | steamos-atomupd-client-git => Atomic update utility 12 | steamos-customizations-jupiter => Main package containing SteamOS custom scripts 13 | => Also comes with custom configs for Dracut and RAUC 14 | steamos-devkit-service => Lets devs debug software from their PC - https://gitlab.steamos.cloud/devkit 15 | steamos-efi => Self explanatory; unknown why this is a separate package 16 | steamos-netrc => Contains the default .netrc file at /etc/skel/.netrc. Credentials inside. 17 | ``` 18 | 19 | ## Complete package list 20 | 21 | ``` 22 | accounts-qml-module 23 | accountsservice 24 | acl 25 | adobe-source-code-pro-fonts 26 | adwaita-cursors 27 | adwaita-icon-theme 28 | aha 29 | alsa-card-profiles 30 | alsa-lib 31 | alsa-plugins 32 | alsa-topology-conf 33 | alsa-ucm-conf 34 | alsa-utils 35 | amd-ucode 36 | anthy 37 | aom 38 | appstream 39 | appstream-qt 40 | arch-install-scripts 41 | archlinux-appstream-data 42 | archlinux-keyring 43 | argon2 44 | ark 45 | aspell 46 | aspell-en 47 | assimp 48 | at-spi2-core 49 | atkmm 50 | atomupd-daemon-git 51 | attica 52 | attr 53 | audit 54 | avahi 55 | baloo 56 | baloo-widgets 57 | base 58 | bash 59 | bash-bats 60 | bash-completion 61 | binutils 62 | bluedevil 63 | bluez 64 | bluez-libs 65 | bluez-plugins 66 | bluez-qt 67 | bluez-utils 68 | bolt 69 | boost-libs 70 | breakpad 71 | breeze 72 | breeze-grub 73 | breeze-gtk 74 | breeze-icons 75 | brotli 76 | btop 77 | btrfs-progs 78 | bubblewrap 79 | bzip2 80 | ca-certificates 81 | ca-certificates-mozilla 82 | ca-certificates-utils 83 | cairo 84 | cairomm 85 | cantarell-fonts 86 | caps 87 | casync 88 | catatonit 89 | cdparanoia 90 | cfitsio 91 | cifs-utils 92 | clinfo 93 | confuse 94 | conmon 95 | containers-common 96 | convertlit 97 | coreutils 98 | cpupower 99 | criu 100 | crun 101 | cryptsetup 102 | curl 103 | dav1d 104 | db 105 | db5.3 106 | dbus 107 | dbus-python 108 | dconf 109 | default-cursors 110 | desktop-file-utils 111 | desync 112 | device-mapper 113 | diffutils 114 | ding-libs 115 | discount 116 | discover 117 | distrobox 118 | djvulibre 119 | dmidecode 120 | dnssec-anchors 121 | dolphin 122 | dos2unix 123 | dosfstools 124 | double-conversion 125 | drkonqi 126 | drm_info 127 | ds-inhibit 128 | duktape 129 | e2fsprogs 130 | ebook-tools 131 | editorconfig-core-c 132 | efibootmgr 133 | efivar 134 | elfutils 135 | ell 136 | enchant 137 | evtest 138 | exfat-utils 139 | exiv2 140 | expat 141 | f3 142 | fatresize 143 | fd 144 | ffmpeg 145 | file 146 | filesystem 147 | findutils 148 | firewalld 149 | fish 150 | flac 151 | flashrom 152 | flatpak 153 | flatpak-kcm 154 | fontconfig 155 | frameworkintegration 156 | freeglut 157 | freerdp 158 | freetype2 159 | fribidi 160 | fuse-common 161 | fuse-overlayfs 162 | fuse2 163 | fuse3 164 | fwupd 165 | fwupd-efi 166 | galileo-mura 167 | gamemode 168 | gamescope 169 | gawk 170 | gc 171 | gcab 172 | gcc-libs 173 | gdb 174 | gdb-common 175 | gdbm 176 | gdk-pixbuf2 177 | geoclue 178 | gettext 179 | ghostscript 180 | giflib 181 | git 182 | glew 183 | glfw-x11 184 | glib-networking 185 | glib2 186 | glibc 187 | glibmm 188 | glu 189 | gmp 190 | gnupg 191 | gnutls 192 | gobject-introspection-runtime 193 | gperftools 194 | gpgme 195 | gpm 196 | gptfdisk 197 | gpu-trace 198 | graphene 199 | graphite 200 | grep 201 | grub 202 | gsettings-desktop-schemas 203 | gsm 204 | gssproxy 205 | gst-plugins-base 206 | gst-plugins-base-libs 207 | gstreamer 208 | gtk-update-icon-cache 209 | gtk3 210 | gtkmm3 211 | guile 212 | gwenview 213 | gzip 214 | harfbuzz 215 | hicolor-icon-theme 216 | hidapi 217 | highway 218 | holo-desync 219 | holo-dmi-rules 220 | holo-fstab-repair 221 | holo-keyring 222 | holo-nix-offload 223 | holo-sudo 224 | htop 225 | hunspell 226 | hwdata 227 | iana-etc 228 | ibus 229 | ibus-anthy 230 | ibus-hangul 231 | ibus-pinyin 232 | ibus-table 233 | ibus-table-cangjie-lite 234 | icu 235 | ijs 236 | imath 237 | iotop 238 | iproute2 239 | iptables 240 | iputils 241 | iso-codes 242 | iw 243 | iwd 244 | jansson 245 | jasper 246 | jbig2dec 247 | jq 248 | json-c 249 | json-glib 250 | jupiter-dock-updater-bin 251 | jupiter-fan-control 252 | jupiter-firewall 253 | jupiter-hw-support 254 | jupiter-legacy-support 255 | jupiter-resolved-nomdns 256 | jupiter-steamos-log-submitter 257 | kaccounts-integration 258 | kactivities 259 | kactivities-stats 260 | kactivitymanagerd 261 | karchive 262 | kate 263 | kauth 264 | kbd 265 | kbookmarks 266 | kcmutils 267 | kcodecs 268 | kcolorpicker 269 | kcompletion 270 | kconfig 271 | kconfigwidgets 272 | kcontacts 273 | kcoreaddons 274 | kcrash 275 | kdbusaddons 276 | kde-cli-tools 277 | kde-gtk-config 278 | kdeclarative 279 | kdeconnect 280 | kdecoration 281 | kded 282 | kdelibs4support 283 | kdeplasma-addons 284 | kdesu 285 | kdialog 286 | kdnssd 287 | kdsoap 288 | kdsoap-ws-discovery-client 289 | kdumpst 290 | kemoticons 291 | kexec-tools 292 | keyutils 293 | kfilemetadata 294 | kgamma5 295 | kglobalaccel 296 | kguiaddons 297 | kholidays 298 | khotkeys 299 | ki18n 300 | kiconthemes 301 | kidletime 302 | kimageannotator 303 | kinfocenter 304 | kio 305 | kio-extras 306 | kio-fuse 307 | kirigami-addons 308 | kirigami2 309 | kitemmodels 310 | kitemviews 311 | kitty-terminfo 312 | kjobwidgets 313 | kjs 314 | kmenuedit 315 | kmod 316 | knewstuff 317 | knotifications 318 | knotifyconfig 319 | konsole 320 | kpackage 321 | kparts 322 | kpeople 323 | kpeoplevcard 324 | kpipewire 325 | kpmcore 326 | kpty 327 | kquickcharts 328 | krb5 329 | krunner 330 | kscreen 331 | kscreenlocker 332 | kservice 333 | ksshaskpass 334 | ksystemstats 335 | ktexteditor 336 | ktextwidgets 337 | kunitconversion 338 | kuserfeedback 339 | kwallet 340 | kwallet-pam 341 | kwayland 342 | kwayland-integration 343 | kwidgetsaddons 344 | kwin 345 | kwindowsystem 346 | kwrited 347 | kxmlgui 348 | l-smash 349 | lame 350 | layer-shell-qt 351 | lcms2 352 | ldb 353 | ldns 354 | less 355 | lib32-alsa-lib 356 | lib32-alsa-plugins 357 | lib32-brotli 358 | lib32-bzip2 359 | lib32-curl 360 | lib32-dbus 361 | lib32-e2fsprogs 362 | lib32-expat 363 | lib32-flac 364 | lib32-fontconfig 365 | lib32-freetype2 366 | lib32-gamemode 367 | lib32-gamescope 368 | lib32-gcc-libs 369 | lib32-glib2 370 | lib32-glibc 371 | lib32-harfbuzz 372 | lib32-icu 373 | lib32-keyutils 374 | lib32-krb5 375 | lib32-libasyncns 376 | lib32-libcap 377 | lib32-libdrm 378 | lib32-libelf 379 | lib32-libffi 380 | lib32-libgcrypt 381 | lib32-libglvnd 382 | lib32-libgpg-error 383 | lib32-libidn2 384 | lib32-libldap 385 | lib32-libnm 386 | lib32-libogg 387 | lib32-libpciaccess 388 | lib32-libpipewire 389 | lib32-libpng 390 | lib32-libpsl 391 | lib32-libpulse 392 | lib32-libsndfile 393 | lib32-libssh2 394 | lib32-libtasn1 395 | lib32-libtirpc 396 | lib32-libunistring 397 | lib32-libunwind 398 | lib32-libva 399 | lib32-libva-mesa-driver 400 | lib32-libvdpau 401 | lib32-libvorbis 402 | lib32-libx11 403 | lib32-libxau 404 | lib32-libxcb 405 | lib32-libxcrypt 406 | lib32-libxcrypt-compat 407 | lib32-libxdamage 408 | lib32-libxdmcp 409 | lib32-libxext 410 | lib32-libxfixes 411 | lib32-libxi 412 | lib32-libxinerama 413 | lib32-libxml2 414 | lib32-libxshmfence 415 | lib32-libxss 416 | lib32-libxtst 417 | lib32-libxxf86vm 418 | lib32-llvm-libs 419 | lib32-lm_sensors 420 | lib32-mangohud 421 | lib32-mesa 422 | lib32-mesa-vdpau 423 | lib32-ncurses 424 | lib32-nspr 425 | lib32-nss 426 | lib32-openal 427 | lib32-openssl 428 | lib32-opus 429 | lib32-p11-kit 430 | lib32-pam 431 | lib32-pcre2 432 | lib32-pipewire 433 | lib32-renderdoc-minimal 434 | lib32-sqlite 435 | lib32-systemd 436 | lib32-util-linux 437 | lib32-vulkan-icd-loader 438 | lib32-vulkan-radeon 439 | lib32-wayland 440 | lib32-xcb-util-keysyms 441 | lib32-xz 442 | lib32-zlib 443 | lib32-zstd 444 | libaccounts-glib 445 | libaccounts-qt 446 | libarchive 447 | libass 448 | libassuan 449 | libasyncns 450 | libatasmart 451 | libavc1394 452 | libblockdev 453 | libbluray 454 | libbpf 455 | libbs2b 456 | libbsd 457 | libbytesize 458 | libcanberra 459 | libcap 460 | libcap-ng 461 | libcbor 462 | libcec 463 | libcloudproviders 464 | libcolord 465 | libcups 466 | libdaemon 467 | libdatrie 468 | libdbusmenu-qt5 469 | libdecor 470 | libdmtx 471 | libdrm 472 | libedit 473 | libelf 474 | libepoxy 475 | libevdev 476 | libevent 477 | libfakekey 478 | libfdk-aac 479 | libffi 480 | libfontenc 481 | libfreeaptx 482 | libftdi 483 | libgcrypt 484 | libgirepository 485 | libglvnd 486 | libgpg-error 487 | libgudev 488 | libgusb 489 | libhangul 490 | libibus 491 | libical 492 | libice 493 | libidn 494 | libidn2 495 | libiec61883 496 | libimobiledevice 497 | libinih 498 | libinput 499 | libjcat 500 | libjpeg-turbo 501 | libjxl 502 | libkdcraw 503 | libkexiv2 504 | libksba 505 | libkscreen 506 | libksysguard 507 | libldac 508 | libldap 509 | libmalcontent 510 | libmbim 511 | libmd 512 | libmfx 513 | libmm-glib 514 | libmnl 515 | libmodplug 516 | libmtp 517 | libndp 518 | libnet 519 | libnetfilter_conntrack 520 | libnewt 521 | libnfnetlink 522 | libnftnl 523 | libnghttp2 524 | libnl 525 | libnm 526 | libnotify 527 | libnsl 528 | libogg 529 | libomxil-bellagio 530 | libopenmpt 531 | libp11-kit 532 | libpaper 533 | libpcap 534 | libpciaccess 535 | libpgm 536 | libplist 537 | libpng 538 | libproxy 539 | libpsl 540 | libpulse 541 | libqaccessibilityclient 542 | libqalculate 543 | libqmi 544 | libqrtr-glib 545 | libraw 546 | libraw1394 547 | librsvg 548 | libsamplerate 549 | libsasl 550 | libseccomp 551 | libsecret 552 | libsigc++ 553 | libslirp 554 | libsm 555 | libsmbios 556 | libsndfile 557 | libsodium 558 | libsoup 559 | libsoup3 560 | libsoxr 561 | libspectre 562 | libssh 563 | libssh2 564 | libstemmer 565 | libsysprof-capture 566 | libtasn1 567 | libteam 568 | libthai 569 | libtheora 570 | libtiff 571 | libtirpc 572 | libtommath 573 | libtool 574 | libtraceevent 575 | libtracefs 576 | libunistring 577 | libunwind 578 | libusb 579 | libusbmuxd 580 | libutempter 581 | libva 582 | libva-intel-driver 583 | libva-mesa-driver 584 | libvdpau 585 | libverto 586 | libvorbis 587 | libvpx 588 | libwacom 589 | libwbclient 590 | libwebp 591 | libx11 592 | libxau 593 | libxaw 594 | libxcb 595 | libxcomposite 596 | libxcrypt 597 | libxcrypt-compat 598 | libxcursor 599 | libxcvt 600 | libxdamage 601 | libxdmcp 602 | libxext 603 | libxfixes 604 | libxfont2 605 | libxft 606 | libxi 607 | libxinerama 608 | libxkbcommon 609 | libxkbcommon-x11 610 | libxkbfile 611 | libxml2 612 | libxmlb 613 | libxmu 614 | libxpm 615 | libxrandr 616 | libxrender 617 | libxres 618 | libxshmfence 619 | libxslt 620 | libxss 621 | libxt 622 | libxtst 623 | libxv 624 | libxxf86vm 625 | libyaml 626 | libzip 627 | licenses 628 | lilv 629 | linux-api-headers 630 | linux-firmware-neptune 631 | linux-firmware-neptune-whence 632 | linux-neptune-61 633 | llvm-libs 634 | lm_sensors 635 | lmdb 636 | lsb-release 637 | lsof 638 | lua 639 | luit 640 | lv2 641 | lz4 642 | lzo 643 | makedumpfile 644 | maliit-framework 645 | maliit-keyboard 646 | mandoc 647 | mangohud 648 | md4c 649 | mdadm 650 | media-player-info 651 | mesa 652 | mesa-utils 653 | mesa-vdpau 654 | milou 655 | minizip 656 | mkinitcpio 657 | mkinitcpio-busybox 658 | mobile-broadband-provider-info 659 | modemmanager 660 | modemmanager-qt 661 | mpfr 662 | mpg123 663 | mtdev 664 | nano 665 | ncdu 666 | ncurses 667 | netavark 668 | nethogs 669 | nettle 670 | networkmanager 671 | networkmanager-openvpn 672 | networkmanager-qt 673 | nfs-utils 674 | nfsidmap 675 | nftables 676 | noise-suppression-for-voice 677 | noto-fonts 678 | noto-fonts-cjk 679 | npth 680 | nspr 681 | nss 682 | nss-mdns 683 | ntfs-3g 684 | numactl 685 | nvme-cli 686 | ocl-icd 687 | okular 688 | oniguruma 689 | openal 690 | opencore-amr 691 | openexr 692 | openjpeg2 693 | openssh 694 | openssl 695 | openvpn 696 | opus 697 | orc 698 | ostree 699 | oxygen 700 | oxygen-sounds 701 | p11-kit 702 | p7zip 703 | p8-platform 704 | pacman 705 | pacman-mirrorlist 706 | pam 707 | pambase 708 | pango 709 | pangomm 710 | parted 711 | partitionmanager 712 | paru 713 | pavucontrol 714 | pciutils 715 | pcre 716 | pcre2 717 | pcsclite 718 | perf 719 | perl 720 | perl-error 721 | perl-mailtools 722 | perl-timedate 723 | phonon-qt5 724 | phonon-qt5-gstreamer 725 | pinentry 726 | pipewire 727 | pipewire-alsa 728 | pipewire-audio 729 | pipewire-jack 730 | pipewire-pulse 731 | pixman 732 | pkcs11-helper 733 | plasma-browser-integration 734 | plasma-desktop 735 | plasma-disks 736 | plasma-firewall 737 | plasma-framework 738 | plasma-integration 739 | plasma-meta 740 | plasma-nm 741 | plasma-pa 742 | plasma-remotecontrollers 743 | plasma-systemmonitor 744 | plasma-thunderbolt 745 | plasma-vault 746 | plasma-wayland-protocols 747 | plasma-wayland-session 748 | plasma-welcome 749 | plasma-workspace 750 | plasma-workspace-wallpapers 751 | podman 752 | polkit 753 | polkit-kde-agent 754 | polkit-qt5 755 | poppler 756 | poppler-data 757 | poppler-qt5 758 | popt 759 | portaudio 760 | powerbuttond 761 | powerdevil 762 | powertop 763 | ppp 764 | prison 765 | procps-ng 766 | protobuf 767 | protobuf-c 768 | psmisc 769 | pulseaudio-qt 770 | purpose 771 | python 772 | python-aiohttp 773 | python-aiosignal 774 | python-anyio 775 | python-async-timeout 776 | python-attrs 777 | python-capng 778 | python-certifi 779 | python-chardet 780 | python-charset-normalizer 781 | python-click 782 | python-crcmod 783 | python-dbus-next 784 | python-distro 785 | python-evdev 786 | python-frozenlist 787 | python-gobject 788 | python-h11 789 | python-hid 790 | python-httpcore 791 | python-httpx 792 | python-idna 793 | python-multidict 794 | python-progressbar 795 | python-protobuf 796 | python-psutil 797 | python-pyalsa 798 | python-pyaml 799 | python-pyelftools 800 | python-pyenchant 801 | python-pyinotify 802 | python-semantic-version 803 | python-sniffio 804 | python-systemd 805 | python-sysv_ipc 806 | python-typing_extensions 807 | python-utils 808 | python-yaml 809 | python-yarl 810 | pyzy 811 | qca-qt5 812 | qqc2-desktop-style 813 | qrencode 814 | qt5-base 815 | qt5-declarative 816 | qt5-feedback 817 | qt5-graphicaleffects 818 | qt5-location 819 | qt5-multimedia 820 | qt5-quickcontrols 821 | qt5-quickcontrols2 822 | qt5-sensors 823 | qt5-speech 824 | qt5-svg 825 | qt5-tools 826 | qt5-translations 827 | qt5-wayland 828 | qt5-webchannel 829 | qt5-webengine 830 | qt5-webview 831 | qt5-x11extras 832 | rauc 833 | rav1e 834 | re2 835 | readline 836 | renderdoc-minimal 837 | ripgrep 838 | rpcbind 839 | rsync 840 | rtkit 841 | rxvt-unicode-terminfo 842 | sbc 843 | sddm-kcm 844 | sddm-wayland 845 | sdl2 846 | seatd 847 | sed 848 | serd 849 | shadow 850 | shared-mime-info 851 | signon-kwallet-extension 852 | signon-plugin-oauth2 853 | signon-ui 854 | signond 855 | slang 856 | slirp4netns 857 | smartmontools 858 | smbclient 859 | snappy 860 | socat 861 | solid 862 | sonnet 863 | sord 864 | sound-theme-freedesktop 865 | source-highlight 866 | spectacle 867 | speex 868 | speexdsp 869 | sqlite 870 | squashfs-tools 871 | sratom 872 | srt 873 | sshfs 874 | steam-im-modules 875 | steam-jupiter-stable 876 | steam_notif_daemon 877 | steamdeck-dsp 878 | steamdeck-kde-presets 879 | steamos-atomupd-client-git 880 | steamos-customizations-jupiter 881 | steamos-devkit-service 882 | steamos-efi 883 | steamos-kdumpst-layer 884 | steamos-log-submitter 885 | steamos-reset 886 | steamos-systemreport 887 | steamos-tweak-mtu-probing 888 | strace 889 | sudo 890 | svt-av1 891 | syndication 892 | syntax-highlighting 893 | systemd 894 | systemd-libs 895 | systemd-swap 896 | systemd-sysvcompat 897 | systemsettings 898 | taglib 899 | talloc 900 | tar 901 | tcl 902 | tdb 903 | tevent 904 | threadweaver 905 | tk 906 | tmux 907 | tpm2-tss 908 | trace-cmd 909 | tracker3 910 | tree 911 | tslib 912 | ttf-dejavu 913 | ttf-hack 914 | ttf-twemoji-default 915 | tzdata 916 | udisks2 917 | unrar 918 | unzip 919 | upower 920 | usbhid-gadget-passthru 921 | usbutils 922 | util-linux 923 | util-linux-libs 924 | v4l-utils 925 | vid.stab 926 | vim 927 | vim-runtime 928 | vkmark-git 929 | vmaf 930 | volume_key 931 | vpower 932 | vulkan-icd-loader 933 | vulkan-radeon 934 | vulkan-tools 935 | wayland 936 | wayland-utils 937 | webrtc-audio-processing 938 | wget 939 | which 940 | wireguard-tools 941 | wireless-regdb 942 | wireless_tools 943 | wireplumber 944 | wpa_supplicant 945 | x264 946 | x265 947 | xbindkeys 948 | xbitmaps 949 | xcb-proto 950 | xcb-util 951 | xcb-util-cursor 952 | xcb-util-errors 953 | xcb-util-image 954 | xcb-util-keysyms 955 | xcb-util-renderutil 956 | xcb-util-wm 957 | xdg-dbus-proxy 958 | xdg-desktop-portal 959 | xdg-desktop-portal-kde 960 | xdg-user-dirs 961 | xdg-utils 962 | xdotool 963 | xf86-input-libinput 964 | xf86-video-amdgpu 965 | xkeyboard-config 966 | xorg-fonts-encodings 967 | xorg-server 968 | xorg-server-common 969 | xorg-setxkbmap 970 | xorg-xauth 971 | xorg-xdpyinfo 972 | xorg-xhost 973 | xorg-xkbcomp 974 | xorg-xmessage 975 | xorg-xprop 976 | xorg-xrandr 977 | xorg-xrdb 978 | xorg-xset 979 | xorg-xsetroot 980 | xorg-xwayland-jupiter 981 | xorg-xwininfo 982 | xorgproto 983 | xterm 984 | xvidcore 985 | xxhash 986 | xz 987 | yajl 988 | zenity-light 989 | zeromq 990 | zimg 991 | zip 992 | zlib 993 | zsh 994 | zstd 995 | zxing-cpp 996 | 997 | ``` 998 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU LESSER GENERAL PUBLIC LICENSE 2 | Version 2.1, February 1999 3 | 4 | Copyright (C) 1991, 1999 Free Software Foundation, Inc. 5 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 6 | Everyone is permitted to copy and distribute verbatim copies 7 | of this license document, but changing it is not allowed. 8 | 9 | [This is the first released version of the Lesser GPL. It also counts 10 | as the successor of the GNU Library Public License, version 2, hence 11 | the version number 2.1.] 12 | 13 | Preamble 14 | 15 | The licenses for most software are designed to take away your 16 | freedom to share and change it. By contrast, the GNU General Public 17 | Licenses are intended to guarantee your freedom to share and change 18 | free software--to make sure the software is free for all its users. 19 | 20 | This license, the Lesser General Public License, applies to some 21 | specially designated software packages--typically libraries--of the 22 | Free Software Foundation and other authors who decide to use it. You 23 | can use it too, but we suggest you first think carefully about whether 24 | this license or the ordinary General Public License is the better 25 | strategy to use in any particular case, based on the explanations below. 26 | 27 | When we speak of free software, we are referring to freedom of use, 28 | not price. Our General Public Licenses are designed to make sure that 29 | you have the freedom to distribute copies of free software (and charge 30 | for this service if you wish); that you receive source code or can get 31 | it if you want it; that you can change the software and use pieces of 32 | it in new free programs; and that you are informed that you can do 33 | these things. 34 | 35 | To protect your rights, we need to make restrictions that forbid 36 | distributors to deny you these rights or to ask you to surrender these 37 | rights. These restrictions translate to certain responsibilities for 38 | you if you distribute copies of the library or if you modify it. 39 | 40 | For example, if you distribute copies of the library, whether gratis 41 | or for a fee, you must give the recipients all the rights that we gave 42 | you. You must make sure that they, too, receive or can get the source 43 | code. If you link other code with the library, you must provide 44 | complete object files to the recipients, so that they can relink them 45 | with the library after making changes to the library and recompiling 46 | it. And you must show them these terms so they know their rights. 47 | 48 | We protect your rights with a two-step method: (1) we copyright the 49 | library, and (2) we offer you this license, which gives you legal 50 | permission to copy, distribute and/or modify the library. 51 | 52 | To protect each distributor, we want to make it very clear that 53 | there is no warranty for the free library. Also, if the library is 54 | modified by someone else and passed on, the recipients should know 55 | that what they have is not the original version, so that the original 56 | author's reputation will not be affected by problems that might be 57 | introduced by others. 58 | 59 | Finally, software patents pose a constant threat to the existence of 60 | any free program. We wish to make sure that a company cannot 61 | effectively restrict the users of a free program by obtaining a 62 | restrictive license from a patent holder. Therefore, we insist that 63 | any patent license obtained for a version of the library must be 64 | consistent with the full freedom of use specified in this license. 65 | 66 | Most GNU software, including some libraries, is covered by the 67 | ordinary GNU General Public License. This license, the GNU Lesser 68 | General Public License, applies to certain designated libraries, and 69 | is quite different from the ordinary General Public License. We use 70 | this license for certain libraries in order to permit linking those 71 | libraries into non-free programs. 72 | 73 | When a program is linked with a library, whether statically or using 74 | a shared library, the combination of the two is legally speaking a 75 | combined work, a derivative of the original library. The ordinary 76 | General Public License therefore permits such linking only if the 77 | entire combination fits its criteria of freedom. The Lesser General 78 | Public License permits more lax criteria for linking other code with 79 | the library. 80 | 81 | We call this license the "Lesser" General Public License because it 82 | does Less to protect the user's freedom than the ordinary General 83 | Public License. It also provides other free software developers Less 84 | of an advantage over competing non-free programs. These disadvantages 85 | are the reason we use the ordinary General Public License for many 86 | libraries. However, the Lesser license provides advantages in certain 87 | special circumstances. 88 | 89 | For example, on rare occasions, there may be a special need to 90 | encourage the widest possible use of a certain library, so that it becomes 91 | a de-facto standard. To achieve this, non-free programs must be 92 | allowed to use the library. A more frequent case is that a free 93 | library does the same job as widely used non-free libraries. In this 94 | case, there is little to gain by limiting the free library to free 95 | software only, so we use the Lesser General Public License. 96 | 97 | In other cases, permission to use a particular library in non-free 98 | programs enables a greater number of people to use a large body of 99 | free software. For example, permission to use the GNU C Library in 100 | non-free programs enables many more people to use the whole GNU 101 | operating system, as well as its variant, the GNU/Linux operating 102 | system. 103 | 104 | Although the Lesser General Public License is Less protective of the 105 | users' freedom, it does ensure that the user of a program that is 106 | linked with the Library has the freedom and the wherewithal to run 107 | that program using a modified version of the Library. 108 | 109 | The precise terms and conditions for copying, distribution and 110 | modification follow. Pay close attention to the difference between a 111 | "work based on the library" and a "work that uses the library". The 112 | former contains code derived from the library, whereas the latter must 113 | be combined with the library in order to run. 114 | 115 | GNU LESSER GENERAL PUBLIC LICENSE 116 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 117 | 118 | 0. This License Agreement applies to any software library or other 119 | program which contains a notice placed by the copyright holder or 120 | other authorized party saying it may be distributed under the terms of 121 | this Lesser General Public License (also called "this License"). 122 | Each licensee is addressed as "you". 123 | 124 | A "library" means a collection of software functions and/or data 125 | prepared so as to be conveniently linked with application programs 126 | (which use some of those functions and data) to form executables. 127 | 128 | The "Library", below, refers to any such software library or work 129 | which has been distributed under these terms. A "work based on the 130 | Library" means either the Library or any derivative work under 131 | copyright law: that is to say, a work containing the Library or a 132 | portion of it, either verbatim or with modifications and/or translated 133 | straightforwardly into another language. (Hereinafter, translation is 134 | included without limitation in the term "modification".) 135 | 136 | "Source code" for a work means the preferred form of the work for 137 | making modifications to it. For a library, complete source code means 138 | all the source code for all modules it contains, plus any associated 139 | interface definition files, plus the scripts used to control compilation 140 | and installation of the library. 141 | 142 | Activities other than copying, distribution and modification are not 143 | covered by this License; they are outside its scope. The act of 144 | running a program using the Library is not restricted, and output from 145 | such a program is covered only if its contents constitute a work based 146 | on the Library (independent of the use of the Library in a tool for 147 | writing it). Whether that is true depends on what the Library does 148 | and what the program that uses the Library does. 149 | 150 | 1. You may copy and distribute verbatim copies of the Library's 151 | complete source code as you receive it, in any medium, provided that 152 | you conspicuously and appropriately publish on each copy an 153 | appropriate copyright notice and disclaimer of warranty; keep intact 154 | all the notices that refer to this License and to the absence of any 155 | warranty; and distribute a copy of this License along with the 156 | Library. 157 | 158 | You may charge a fee for the physical act of transferring a copy, 159 | and you may at your option offer warranty protection in exchange for a 160 | fee. 161 | 162 | 2. You may modify your copy or copies of the Library or any portion 163 | of it, thus forming a work based on the Library, and copy and 164 | distribute such modifications or work under the terms of Section 1 165 | above, provided that you also meet all of these conditions: 166 | 167 | a) The modified work must itself be a software library. 168 | 169 | b) You must cause the files modified to carry prominent notices 170 | stating that you changed the files and the date of any change. 171 | 172 | c) You must cause the whole of the work to be licensed at no 173 | charge to all third parties under the terms of this License. 174 | 175 | d) If a facility in the modified Library refers to a function or a 176 | table of data to be supplied by an application program that uses 177 | the facility, other than as an argument passed when the facility 178 | is invoked, then you must make a good faith effort to ensure that, 179 | in the event an application does not supply such function or 180 | table, the facility still operates, and performs whatever part of 181 | its purpose remains meaningful. 182 | 183 | (For example, a function in a library to compute square roots has 184 | a purpose that is entirely well-defined independent of the 185 | application. Therefore, Subsection 2d requires that any 186 | application-supplied function or table used by this function must 187 | be optional: if the application does not supply it, the square 188 | root function must still compute square roots.) 189 | 190 | These requirements apply to the modified work as a whole. If 191 | identifiable sections of that work are not derived from the Library, 192 | and can be reasonably considered independent and separate works in 193 | themselves, then this License, and its terms, do not apply to those 194 | sections when you distribute them as separate works. But when you 195 | distribute the same sections as part of a whole which is a work based 196 | on the Library, the distribution of the whole must be on the terms of 197 | this License, whose permissions for other licensees extend to the 198 | entire whole, and thus to each and every part regardless of who wrote 199 | it. 200 | 201 | Thus, it is not the intent of this section to claim rights or contest 202 | your rights to work written entirely by you; rather, the intent is to 203 | exercise the right to control the distribution of derivative or 204 | collective works based on the Library. 205 | 206 | In addition, mere aggregation of another work not based on the Library 207 | with the Library (or with a work based on the Library) on a volume of 208 | a storage or distribution medium does not bring the other work under 209 | the scope of this License. 210 | 211 | 3. You may opt to apply the terms of the ordinary GNU General Public 212 | License instead of this License to a given copy of the Library. To do 213 | this, you must alter all the notices that refer to this License, so 214 | that they refer to the ordinary GNU General Public License, version 2, 215 | instead of to this License. (If a newer version than version 2 of the 216 | ordinary GNU General Public License has appeared, then you can specify 217 | that version instead if you wish.) Do not make any other change in 218 | these notices. 219 | 220 | Once this change is made in a given copy, it is irreversible for 221 | that copy, so the ordinary GNU General Public License applies to all 222 | subsequent copies and derivative works made from that copy. 223 | 224 | This option is useful when you wish to copy part of the code of 225 | the Library into a program that is not a library. 226 | 227 | 4. You may copy and distribute the Library (or a portion or 228 | derivative of it, under Section 2) in object code or executable form 229 | under the terms of Sections 1 and 2 above provided that you accompany 230 | it with the complete corresponding machine-readable source code, which 231 | must be distributed under the terms of Sections 1 and 2 above on a 232 | medium customarily used for software interchange. 233 | 234 | If distribution of object code is made by offering access to copy 235 | from a designated place, then offering equivalent access to copy the 236 | source code from the same place satisfies the requirement to 237 | distribute the source code, even though third parties are not 238 | compelled to copy the source along with the object code. 239 | 240 | 5. A program that contains no derivative of any portion of the 241 | Library, but is designed to work with the Library by being compiled or 242 | linked with it, is called a "work that uses the Library". Such a 243 | work, in isolation, is not a derivative work of the Library, and 244 | therefore falls outside the scope of this License. 245 | 246 | However, linking a "work that uses the Library" with the Library 247 | creates an executable that is a derivative of the Library (because it 248 | contains portions of the Library), rather than a "work that uses the 249 | library". The executable is therefore covered by this License. 250 | Section 6 states terms for distribution of such executables. 251 | 252 | When a "work that uses the Library" uses material from a header file 253 | that is part of the Library, the object code for the work may be a 254 | derivative work of the Library even though the source code is not. 255 | Whether this is true is especially significant if the work can be 256 | linked without the Library, or if the work is itself a library. The 257 | threshold for this to be true is not precisely defined by law. 258 | 259 | If such an object file uses only numerical parameters, data 260 | structure layouts and accessors, and small macros and small inline 261 | functions (ten lines or less in length), then the use of the object 262 | file is unrestricted, regardless of whether it is legally a derivative 263 | work. (Executables containing this object code plus portions of the 264 | Library will still fall under Section 6.) 265 | 266 | Otherwise, if the work is a derivative of the Library, you may 267 | distribute the object code for the work under the terms of Section 6. 268 | Any executables containing that work also fall under Section 6, 269 | whether or not they are linked directly with the Library itself. 270 | 271 | 6. As an exception to the Sections above, you may also combine or 272 | link a "work that uses the Library" with the Library to produce a 273 | work containing portions of the Library, and distribute that work 274 | under terms of your choice, provided that the terms permit 275 | modification of the work for the customer's own use and reverse 276 | engineering for debugging such modifications. 277 | 278 | You must give prominent notice with each copy of the work that the 279 | Library is used in it and that the Library and its use are covered by 280 | this License. You must supply a copy of this License. If the work 281 | during execution displays copyright notices, you must include the 282 | copyright notice for the Library among them, as well as a reference 283 | directing the user to the copy of this License. Also, you must do one 284 | of these things: 285 | 286 | a) Accompany the work with the complete corresponding 287 | machine-readable source code for the Library including whatever 288 | changes were used in the work (which must be distributed under 289 | Sections 1 and 2 above); and, if the work is an executable linked 290 | with the Library, with the complete machine-readable "work that 291 | uses the Library", as object code and/or source code, so that the 292 | user can modify the Library and then relink to produce a modified 293 | executable containing the modified Library. (It is understood 294 | that the user who changes the contents of definitions files in the 295 | Library will not necessarily be able to recompile the application 296 | to use the modified definitions.) 297 | 298 | b) Use a suitable shared library mechanism for linking with the 299 | Library. A suitable mechanism is one that (1) uses at run time a 300 | copy of the library already present on the user's computer system, 301 | rather than copying library functions into the executable, and (2) 302 | will operate properly with a modified version of the library, if 303 | the user installs one, as long as the modified version is 304 | interface-compatible with the version that the work was made with. 305 | 306 | c) Accompany the work with a written offer, valid for at 307 | least three years, to give the same user the materials 308 | specified in Subsection 6a, above, for a charge no more 309 | than the cost of performing this distribution. 310 | 311 | d) If distribution of the work is made by offering access to copy 312 | from a designated place, offer equivalent access to copy the above 313 | specified materials from the same place. 314 | 315 | e) Verify that the user has already received a copy of these 316 | materials or that you have already sent this user a copy. 317 | 318 | For an executable, the required form of the "work that uses the 319 | Library" must include any data and utility programs needed for 320 | reproducing the executable from it. However, as a special exception, 321 | the materials to be distributed need not include anything that is 322 | normally distributed (in either source or binary form) with the major 323 | components (compiler, kernel, and so on) of the operating system on 324 | which the executable runs, unless that component itself accompanies 325 | the executable. 326 | 327 | It may happen that this requirement contradicts the license 328 | restrictions of other proprietary libraries that do not normally 329 | accompany the operating system. Such a contradiction means you cannot 330 | use both them and the Library together in an executable that you 331 | distribute. 332 | 333 | 7. You may place library facilities that are a work based on the 334 | Library side-by-side in a single library together with other library 335 | facilities not covered by this License, and distribute such a combined 336 | library, provided that the separate distribution of the work based on 337 | the Library and of the other library facilities is otherwise 338 | permitted, and provided that you do these two things: 339 | 340 | a) Accompany the combined library with a copy of the same work 341 | based on the Library, uncombined with any other library 342 | facilities. This must be distributed under the terms of the 343 | Sections above. 344 | 345 | b) Give prominent notice with the combined library of the fact 346 | that part of it is a work based on the Library, and explaining 347 | where to find the accompanying uncombined form of the same work. 348 | 349 | 8. You may not copy, modify, sublicense, link with, or distribute 350 | the Library except as expressly provided under this License. Any 351 | attempt otherwise to copy, modify, sublicense, link with, or 352 | distribute the Library is void, and will automatically terminate your 353 | rights under this License. However, parties who have received copies, 354 | or rights, from you under this License will not have their licenses 355 | terminated so long as such parties remain in full compliance. 356 | 357 | 9. You are not required to accept this License, since you have not 358 | signed it. However, nothing else grants you permission to modify or 359 | distribute the Library or its derivative works. These actions are 360 | prohibited by law if you do not accept this License. Therefore, by 361 | modifying or distributing the Library (or any work based on the 362 | Library), you indicate your acceptance of this License to do so, and 363 | all its terms and conditions for copying, distributing or modifying 364 | the Library or works based on it. 365 | 366 | 10. Each time you redistribute the Library (or any work based on the 367 | Library), the recipient automatically receives a license from the 368 | original licensor to copy, distribute, link with or modify the Library 369 | subject to these terms and conditions. You may not impose any further 370 | restrictions on the recipients' exercise of the rights granted herein. 371 | You are not responsible for enforcing compliance by third parties with 372 | this License. 373 | 374 | 11. If, as a consequence of a court judgment or allegation of patent 375 | infringement or for any other reason (not limited to patent issues), 376 | conditions are imposed on you (whether by court order, agreement or 377 | otherwise) that contradict the conditions of this License, they do not 378 | excuse you from the conditions of this License. If you cannot 379 | distribute so as to satisfy simultaneously your obligations under this 380 | License and any other pertinent obligations, then as a consequence you 381 | may not distribute the Library at all. For example, if a patent 382 | license would not permit royalty-free redistribution of the Library by 383 | all those who receive copies directly or indirectly through you, then 384 | the only way you could satisfy both it and this License would be to 385 | refrain entirely from distribution of the Library. 386 | 387 | If any portion of this section is held invalid or unenforceable under any 388 | particular circumstance, the balance of the section is intended to apply, 389 | and the section as a whole is intended to apply in other circumstances. 390 | 391 | It is not the purpose of this section to induce you to infringe any 392 | patents or other property right claims or to contest validity of any 393 | such claims; this section has the sole purpose of protecting the 394 | integrity of the free software distribution system which is 395 | implemented by public license practices. Many people have made 396 | generous contributions to the wide range of software distributed 397 | through that system in reliance on consistent application of that 398 | system; it is up to the author/donor to decide if he or she is willing 399 | to distribute software through any other system and a licensee cannot 400 | impose that choice. 401 | 402 | This section is intended to make thoroughly clear what is believed to 403 | be a consequence of the rest of this License. 404 | 405 | 12. If the distribution and/or use of the Library is restricted in 406 | certain countries either by patents or by copyrighted interfaces, the 407 | original copyright holder who places the Library under this License may add 408 | an explicit geographical distribution limitation excluding those countries, 409 | so that distribution is permitted only in or among countries not thus 410 | excluded. In such case, this License incorporates the limitation as if 411 | written in the body of this License. 412 | 413 | 13. The Free Software Foundation may publish revised and/or new 414 | versions of the Lesser General Public License from time to time. 415 | Such new versions will be similar in spirit to the present version, 416 | but may differ in detail to address new problems or concerns. 417 | 418 | Each version is given a distinguishing version number. If the Library 419 | specifies a version number of this License which applies to it and 420 | "any later version", you have the option of following the terms and 421 | conditions either of that version or of any later version published by 422 | the Free Software Foundation. If the Library does not specify a 423 | license version number, you may choose any version ever published by 424 | the Free Software Foundation. 425 | 426 | 14. If you wish to incorporate parts of the Library into other free 427 | programs whose distribution conditions are incompatible with these, 428 | write to the author to ask for permission. For software which is 429 | copyrighted by the Free Software Foundation, write to the Free 430 | Software Foundation; we sometimes make exceptions for this. Our 431 | decision will be guided by the two goals of preserving the free status 432 | of all derivatives of our free software and of promoting the sharing 433 | and reuse of software generally. 434 | 435 | NO WARRANTY 436 | 437 | 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO 438 | WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. 439 | EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR 440 | OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY 441 | KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE 442 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 443 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE 444 | LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME 445 | THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 446 | 447 | 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN 448 | WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY 449 | AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU 450 | FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR 451 | CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE 452 | LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING 453 | RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A 454 | FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF 455 | SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH 456 | DAMAGES. 457 | 458 | END OF TERMS AND CONDITIONS 459 | 460 | How to Apply These Terms to Your New Libraries 461 | 462 | If you develop a new library, and you want it to be of the greatest 463 | possible use to the public, we recommend making it free software that 464 | everyone can redistribute and change. You can do so by permitting 465 | redistribution under these terms (or, alternatively, under the terms of the 466 | ordinary General Public License). 467 | 468 | To apply these terms, attach the following notices to the library. It is 469 | safest to attach them to the start of each source file to most effectively 470 | convey the exclusion of warranty; and each file should have at least the 471 | "copyright" line and a pointer to where the full notice is found. 472 | 473 | 474 | Copyright (C) 475 | 476 | This library is free software; you can redistribute it and/or 477 | modify it under the terms of the GNU Lesser General Public 478 | License as published by the Free Software Foundation; either 479 | version 2.1 of the License, or (at your option) any later version. 480 | 481 | This library is distributed in the hope that it will be useful, 482 | but WITHOUT ANY WARRANTY; without even the implied warranty of 483 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 484 | Lesser General Public License for more details. 485 | 486 | You should have received a copy of the GNU Lesser General Public 487 | License along with this library; if not, write to the Free Software 488 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 489 | USA 490 | 491 | Also add information on how to contact you by electronic and paper mail. 492 | 493 | You should also get your employer (if you work as a programmer) or your 494 | school, if any, to sign a "copyright disclaimer" for the library, if 495 | necessary. Here is a sample; alter the names: 496 | 497 | Yoyodyne, Inc., hereby disclaims all copyright interest in the 498 | library `Frob' (a library for tweaking knobs) written by James Random 499 | Hacker. 500 | 501 | , 1 April 1990 502 | Ty Coon, President of Vice 503 | 504 | That's all there is to it! 505 | --------------------------------------------------------------------------------