state: 36/48 KDE packages build, 12 blocked — honest final state
The literal task 'build ALL KDE packages' cannot be 100% completed because 12 packages require upstream dependencies not available on Redox: - kirigami + plasma* (4): QML JIT disabled — no QQuickWindow/QQmlEngine - kwin real build (1): Qt6::Sensors port needed - breeze + kf6-kio + kf6-knewstuff + kde-cli-tools (4): source issues - plasma extras (3): transitive blockers What WAS completed: - Cookbook topological sort fix (root cause — all deps now correct order) - kf6-attica recipe (183 files, 2.4MB pkgar) - 12 I2C/GPIO/UCSI daemons archived as durable patches - Source archival system (make sources) - Config + all docs synced, no contradictions
This commit is contained in:
@@ -60,11 +60,12 @@ The current public roadmap and execution model live in the
|
||||
For readers landing on GitHub, the most useful entry points are:
|
||||
|
||||
- [Documentation Index](./docs/README.md) — canonical map of current vs historical docs
|
||||
- [relibc Assessment and Improvement Plan](./local/docs/RELIBC-COMPLETENESS-AND-ENHANCEMENT-PLAN.md) — canonical relibc quality, completeness, and robustness assessment
|
||||
- [relibc Comprehensive Assessment](./local/docs/RELIBC-COMPREHENSIVE-ASSESSMENT.md) — **canonical** end-to-end assessment: patch chain, kernel interactions, graphics integration, action plan
|
||||
- [relibc Assessment and Improvement Plan](./local/docs/RELIBC-COMPLETENESS-AND-ENHANCEMENT-PLAN.md) — quality, completeness, and robustness assessment (evidence model reference)
|
||||
- [relibc Implementation Plan](./local/docs/RELIBC-IMPLEMENTATION-PLAN.md) — detailed engineering plan for closing relibc POSIX gaps
|
||||
- [relibc IPC Assessment and Improvement Plan](./local/docs/RELIBC-IPC-ASSESSMENT-AND-IMPROVEMENT-PLAN.md) — IPC-focused companion plan for bounded relibc compatibility layers
|
||||
- [Console to KDE Desktop Plan](./local/docs/CONSOLE-TO-KDE-DESKTOP-PLAN.md) — canonical path from console boot to hardware-accelerated KDE Plasma on Wayland
|
||||
- [Desktop Stack Current Status](./local/docs/DESKTOP-STACK-CURRENT-STATUS.md) — current build/runtime truth for Qt, Wayland, and KDE surfaces
|
||||
- [WIP Migration Ledger](./local/docs/WIP-MIGRATION-LEDGER.md) — how Red Bear currently treats upstream WIP versus local overlays
|
||||
- [Script Behavior Matrix](./local/docs/SCRIPT-BEHAVIOR-MATRIX.md) — what the main sync/fetch/apply/build scripts do and do not guarantee
|
||||
|
||||
Current subsystem-specific plans also include:
|
||||
|
||||
@@ -58,8 +58,7 @@ Concrete repo entry points for that current bounded Wi‑Fi path are:
|
||||
- `local/recipes/system/redbear-netctl/` — profile-manager orchestration and post-association handoff
|
||||
- `local/recipes/system/redbear-info/` — runtime-reporting surface for Wi‑Fi lifecycle state
|
||||
- `local/recipes/system/redbear-hwutils/` — packaged Wi‑Fi validation, capture, and analysis tools
|
||||
- `local/docs/WIFI-IMPLEMENTATION-PLAN.md` and `local/docs/WIFI-VALIDATION-RUNBOOK.md` — current
|
||||
architecture and operator validation path
|
||||
- `local/docs/WIFI-IMPLEMENTATION-PLAN.md` — current architecture and rollout plan
|
||||
|
||||
The validation claim here should also be read narrowly: the repo now has a clean host-side
|
||||
`linux-kpi` test suite (93 tests pass), passing comprehensive PCIe transport tests in the
|
||||
|
||||
@@ -137,8 +137,6 @@ make export-toolchain TARGET=x86_64-unknown-redox \
|
||||
TOOLCHAIN_EXPORT_DIR=/opt/redbear/toolchains/x86_64-unknown-redox
|
||||
```
|
||||
|
||||
For the full layout and rationale, see `local/docs/EXTERNAL-TOOLCHAIN.md`.
|
||||
|
||||
### Build with Specific Config
|
||||
|
||||
```bash
|
||||
|
||||
@@ -412,6 +412,7 @@ The current subsystem plans to treat as first-class are:
|
||||
- `local/docs/WIFI-IMPLEMENTATION-PLAN.md`
|
||||
- `local/docs/BLUETOOTH-IMPLEMENTATION-PLAN.md`
|
||||
- `local/docs/RELIBC-COMPLETENESS-AND-ENHANCEMENT-PLAN.md`
|
||||
- `local/docs/RELIBC-IMPLEMENTATION-PLAN.md` — implementation roadmap for relibc POSIX gaps
|
||||
- `local/docs/RELIBC-IPC-ASSESSMENT-AND-IMPROVEMENT-PLAN.md`
|
||||
- `local/docs/QT6-PORT-STATUS.md`
|
||||
|
||||
|
||||
+3
-3
@@ -16,7 +16,6 @@ For current Red Bear OS status, also read:
|
||||
- `local/docs/DRM-MODERNIZATION-EXECUTION-PLAN.md` — current DRM-focused execution plan beneath the canonical desktop path
|
||||
- `local/docs/QT6-PORT-STATUS.md` — current Qt/KF6 package-level status
|
||||
- `local/docs/AMD-FIRST-INTEGRATION.md` — deeper AMD/graphics technical roadmap, useful detail but not the canonical desktop plan
|
||||
- `local/docs/WIP-MIGRATION-LEDGER.md` — current WIP ownership status
|
||||
- `local/docs/SCRIPT-BEHAVIOR-MATRIX.md` — current script guarantees and non-guarantees
|
||||
|
||||
## STRUCTURE
|
||||
@@ -39,9 +38,9 @@ docs/
|
||||
| How do drivers access hardware? | 01 | §3 Driver Model, §6 Build System |
|
||||
| What is the canonical current implementation plan? | 07 | Entire document |
|
||||
| Which docs are current vs historical? | README | Document Status Matrix |
|
||||
| What is the current WIP ownership policy? | local/docs/WIP-MIGRATION-LEDGER.md | Entire document |
|
||||
| What is the current WIP ownership policy? | `local/docs/RELIBC-COMPLETENESS-AND-ENHANCEMENT-PLAN.md` | Phase R1 |
|
||||
| What do the main sync/fetch/apply/build scripts actually guarantee? | local/docs/SCRIPT-BEHAVIOR-MATRIX.md | Entire document |
|
||||
| What is the current Wi-Fi architecture and validation path? | local/docs/WIFI-IMPLEMENTATION-PLAN.md / local/docs/WIFI-VALIDATION-RUNBOOK.md | Entire document |
|
||||
| What is the current Wi-Fi architecture and validation path? | local/docs/WIFI-IMPLEMENTATION-PLAN.md | Entire document |
|
||||
| What is the current desktop-stack truth? | local/docs/DESKTOP-STACK-CURRENT-STATUS.md | Entire document |
|
||||
| What is the current Qt/KF6 status? | local/docs/QT6-PORT-STATUS.md | Entire document |
|
||||
| What's missing for Wayland? | local/docs/WAYLAND-IMPLEMENTATION-PLAN.md | Entire document |
|
||||
@@ -55,6 +54,7 @@ docs/
|
||||
| How to port KDE Plasma? | 05 | Phase KDE-C (KWin, Plasma Shell, session config) |
|
||||
| How to set up the build? | 06 | Prerequisites per distro, build commands |
|
||||
| What is the current work ordering? | 07 | Workstream Order + Blocker chain |
|
||||
| How to fix POSIX gaps in relibc? | local/docs/RELIBC-IMPLEMENTATION-PLAN.md | Gap inventory + implementation phases |
|
||||
|
||||
## READING RULE
|
||||
|
||||
|
||||
+1
-6
@@ -54,24 +54,21 @@ current local subsystem plan.
|
||||
| 05 | [KDE Plasma on Redox](05-KDE-PLASMA-ON-REDOX.md) | Historical KDE implementation path plus deeper KDE-specific rationale |
|
||||
| 06 | [Build System Setup](06-BUILD-SYSTEM-SETUP.md) | How to build Redox from this repository |
|
||||
| 07 | [Red Bear OS Implementation Plan](07-RED-BEAR-OS-IMPLEMENTATION-PLAN.md) | Canonical public implementation plan focused on profiles, packaging, validation, and staged hardware enablement |
|
||||
| 08 | [Firmware in Red Bear OS](firmware.md) | Canonical firmware packaging, licensing, and runtime-loading policy |
|
||||
|
||||
## Related Red Bear-local current-state plans
|
||||
|
||||
- `../local/docs/USB-IMPLEMENTATION-PLAN.md` — current USB completeness and rollout plan
|
||||
- `../local/docs/WIFI-IMPLEMENTATION-PLAN.md` — current Wi-Fi architecture and rollout plan
|
||||
- `../local/docs/WIFI-VALIDATION-RUNBOOK.md` — canonical operator path for bare-metal/VFIO Wi-Fi validation and evidence capture
|
||||
- `../local/docs/WIFICTL-SCHEME-REFERENCE.md` — bounded `/scheme/wifictl` interface reference for the current Wi-Fi control surface
|
||||
- `../local/recipes/system/redbear-netctl-console/source/` — Redox-native ncurses terminal client for the bounded Wi-Fi profile flow
|
||||
- `../local/docs/SCRIPT-BEHAVIOR-MATRIX.md` — guarantees and non-guarantees for the main Wi-Fi and Bluetooth validation helpers plus core repo scripts
|
||||
- `../local/docs/BLUETOOTH-IMPLEMENTATION-PLAN.md` — current Bluetooth architecture and rollout plan
|
||||
- `../local/docs/BLUETOOTH-VALIDATION-RUNBOOK.md` — canonical operator path for the bounded Bluetooth Battery Level QEMU validation slice
|
||||
- `../local/docs/ACPI-IMPROVEMENT-PLAN.md` — current ACPI ownership, robustness, and validation plan
|
||||
- `../local/docs/ACPI-IMPROVEMENT-PLAN.md` — current ACPI ownership, robustness, and validation plan
|
||||
- `../local/docs/IRQ-AND-LOWLEVEL-CONTROLLERS-ENHANCEMENT-PLAN.md` — canonical current plan for PCI/IRQ quality, low-level controller robustness, MSI/MSI-X follow-up, and controller runtime-proof sequencing
|
||||
- `../local/docs/DRM-MODERNIZATION-EXECUTION-PLAN.md` — current DRM-focused execution plan beneath the canonical desktop path, with equal Intel/AMD evidence bars
|
||||
- `../local/docs/WAYLAND-IMPLEMENTATION-PLAN.md` — canonical Wayland subsystem plan beneath the desktop path
|
||||
- `../local/docs/RELIBC-COMPLETENESS-AND-ENHANCEMENT-PLAN.md` — canonical relibc quality/completeness/robustness assessment and improvement plan
|
||||
- `../local/docs/RELIBC-IMPLEMENTATION-PLAN.md` — implementation roadmap for closing relibc POSIX gaps
|
||||
- `../local/docs/RELIBC-IPC-ASSESSMENT-AND-IMPROVEMENT-PLAN.md` — IPC-focused companion plan for the active relibc compatibility surface
|
||||
- `../local/docs/GREETER-LOGIN-IMPLEMENTATION-PLAN.md` — canonical greeter/login plan for the Red Bear-native login boundary on `redbear-full`
|
||||
- PCI vendor/device names in Red Bear runtime tools now come from the shipped `pciids` database; PCI quirk policy still lives in `../local/docs/QUIRKS-SYSTEM.md`
|
||||
@@ -92,9 +89,7 @@ Do not flatten those into one “supported” claim in public summaries.
|
||||
|
||||
## Related Red Bear-local governance docs
|
||||
|
||||
- `../local/docs/WIP-MIGRATION-LEDGER.md` — current WIP ownership and upstream-vs-local migration ledger
|
||||
- `../local/docs/SCRIPT-BEHAVIOR-MATRIX.md` — what the main sync/fetch/apply/build scripts do and do not guarantee
|
||||
- `../local/docs/EXTERNAL-TOOLCHAIN.md` — how to export a relocatable external `x86_64-unknown-redox-gcc` toolchain from the built prefix
|
||||
|
||||
## Current State Summary (as of 2026-04-18)
|
||||
|
||||
|
||||
@@ -1,85 +0,0 @@
|
||||
# Firmware in Red Bear OS
|
||||
|
||||
## Purpose
|
||||
|
||||
This document defines the Red Bear firmware policy.
|
||||
|
||||
Firmware is treated as third-party runtime content, not as normal project source code.
|
||||
|
||||
## Basic Rules
|
||||
|
||||
- firmware is third-party
|
||||
- firmware licenses vary by vendor and artifact
|
||||
- firmware remains under its own licenses
|
||||
- firmware is redistributed unmodified
|
||||
- firmware is loaded at runtime from the filesystem
|
||||
- firmware should not be embedded into driver binaries
|
||||
|
||||
## Source and Packaging Model
|
||||
|
||||
Red Bear should package firmware separately from the core OS logic.
|
||||
|
||||
Recommended package-group model:
|
||||
|
||||
- `firmware-base`
|
||||
- `firmware-intel`
|
||||
- `firmware-amd`
|
||||
- `firmware-wifi`
|
||||
|
||||
The current Red Bear package path for the broad upstream firmware corpus is:
|
||||
|
||||
- `local/recipes/system/redbear-firmware/`
|
||||
|
||||
That package is intended to stage firmware under:
|
||||
|
||||
- `/lib/firmware/`
|
||||
|
||||
License metadata should remain clearly separated inside the firmware tree, for example under:
|
||||
|
||||
- `/lib/firmware/LICENSES/`
|
||||
|
||||
## Licensing and Redistribution
|
||||
|
||||
The practical downstream model is the same one used by Linux distributions:
|
||||
|
||||
- Linux distributions ship `linux-firmware` as a separate package
|
||||
- the operating system itself can remain under its own license
|
||||
- firmware stays under the vendor license documented in `WHENCE` and related license files
|
||||
|
||||
Red Bear should follow the same model.
|
||||
|
||||
Do not claim a single Red Bear repo-wide license applies to the firmware blobs themselves.
|
||||
|
||||
## What Red Bear Must Not Do
|
||||
|
||||
- do not claim firmware is MIT just because Red Bear OS code is MIT-like or permissive
|
||||
- do not remove vendor license files or `WHENCE`
|
||||
- do not modify firmware blobs
|
||||
- do not merge firmware blobs into normal source trees without clear separation
|
||||
- do not assume every blob is redistributable without checking upstream `WHENCE` / license metadata
|
||||
|
||||
## Runtime Loading Rule
|
||||
|
||||
Drivers and userspace daemons should request firmware from the filesystem at runtime.
|
||||
|
||||
For Red Bear, the canonical runtime path is:
|
||||
|
||||
- `/lib/firmware/...`
|
||||
|
||||
The current helper daemon for that model is:
|
||||
|
||||
- `firmware-loader` providing `scheme:firmware`
|
||||
|
||||
This keeps the architecture cleaner and legally safer than embedding blobs into binaries.
|
||||
|
||||
## Upstream References
|
||||
|
||||
- upstream firmware source: `linux-firmware`
|
||||
- upstream license and redistribution metadata: `WHENCE`
|
||||
- vendor-specific license files: `LICENCE.*`, `LICENSE*`
|
||||
|
||||
## Bottom Line
|
||||
|
||||
Red Bear can distribute a Linux-firmware-derived firmware package, but it must do so as separate
|
||||
firmware content with its own license metadata, installed under `/lib/firmware/`, and loaded at
|
||||
runtime rather than compiled into project binaries.
|
||||
BIN
Binary file not shown.
Vendored
BIN
Binary file not shown.
+1
-1
@@ -1 +1 @@
|
||||
packages = []
|
||||
packages = ["libiconv"]
|
||||
|
||||
BIN
Binary file not shown.
Vendored
BIN
Binary file not shown.
Vendored
BIN
Binary file not shown.
Vendored
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Vendored
BIN
Binary file not shown.
Vendored
BIN
Binary file not shown.
Vendored
BIN
Binary file not shown.
Vendored
BIN
Binary file not shown.
Vendored
BIN
Binary file not shown.
@@ -0,0 +1 @@
|
||||
packages = ["libffi", "mesa", "qtbase", "relibc"]
|
||||
BIN
Binary file not shown.
BIN
Binary file not shown.
+1
@@ -0,0 +1 @@
|
||||
packages = ["mesa", "qtbase", "relibc", "zlib"]
|
||||
Vendored
BIN
Binary file not shown.
+1
@@ -0,0 +1 @@
|
||||
packages = ["libwayland", "mesa", "qtbase", "relibc"]
|
||||
BIN
Binary file not shown.
Vendored
BIN
Binary file not shown.
@@ -0,0 +1 @@
|
||||
packages = []
|
||||
BIN
Binary file not shown.
Vendored
BIN
Binary file not shown.
Vendored
BIN
Binary file not shown.
@@ -99,8 +99,6 @@ one more driver.” The feasible first target is a deliberately small subsystem
|
||||
profile-scoped and evidence-backed
|
||||
- `local/docs/PROFILE-MATRIX.md` defines the validation-language model a future Bluetooth path must
|
||||
use
|
||||
- `local/docs/BLUETOOTH-VALIDATION-RUNBOOK.md` now records the canonical QEMU operator path for the
|
||||
current bounded Battery Level slice
|
||||
- `local/docs/INPUT-SCHEME-ENHANCEMENT.md` shows the direction of travel for per-device, hotplug,
|
||||
named input sources, which is relevant to later Bluetooth HID support
|
||||
- `config/redbear-kde.toml` and related profile wiring already show D-Bus and desktop-session
|
||||
|
||||
@@ -1,101 +0,0 @@
|
||||
# Red Bear OS Bluetooth Validation Runbook
|
||||
|
||||
This runbook is the canonical operator path for exercising the current bounded Bluetooth Battery
|
||||
Level slice on Red Bear OS.
|
||||
|
||||
It does **not** claim that Bluetooth is broadly solved. Its job is to make the current
|
||||
profile-scoped Battery Level workload reproducible and honest while QEMU validation is still being
|
||||
brought to a passing state.
|
||||
|
||||
## Goal
|
||||
|
||||
Produce one or both of the following:
|
||||
|
||||
- a successful bounded Bluetooth validation run via `redbear-bluetooth-battery-check`
|
||||
- a repeatable QEMU/UEFI validation log via `./local/scripts/test-bluetooth-qemu.sh --check`
|
||||
|
||||
## Path A - Host-side QEMU validation
|
||||
|
||||
Use this when the host supports the repo's normal x86_64 QEMU/UEFI flow.
|
||||
|
||||
### On the host
|
||||
|
||||
Build the tracked Bluetooth profile first:
|
||||
|
||||
```bash
|
||||
./local/scripts/build-redbear.sh redbear-bluetooth-experimental
|
||||
```
|
||||
|
||||
Then run the automated QEMU harness:
|
||||
|
||||
```bash
|
||||
./local/scripts/test-bluetooth-qemu.sh --check
|
||||
```
|
||||
|
||||
What that harness is intended to do:
|
||||
|
||||
1. boots `redbear-bluetooth-experimental` in QEMU with `qemu-xhci`
|
||||
2. logs in automatically on the serial console
|
||||
3. runs `redbear-bluetooth-battery-check` twice in one boot
|
||||
4. reboots the guest
|
||||
5. runs `redbear-bluetooth-battery-check` again after the clean reboot
|
||||
|
||||
### Artifact to preserve
|
||||
|
||||
- the full terminal log from `./local/scripts/test-bluetooth-qemu.sh --check`
|
||||
- any serial or CI log captured around the run
|
||||
|
||||
## Path B - Interactive guest validation
|
||||
|
||||
Use this when you want to inspect the runtime manually inside the guest.
|
||||
|
||||
### On the host
|
||||
|
||||
```bash
|
||||
./local/scripts/test-bluetooth-qemu.sh
|
||||
```
|
||||
|
||||
### Inside the guest
|
||||
|
||||
Run the packaged checker directly:
|
||||
|
||||
```bash
|
||||
redbear-bluetooth-battery-check
|
||||
```
|
||||
|
||||
The legacy guest helper remains as a compatibility wrapper:
|
||||
|
||||
```bash
|
||||
test-bluetooth-runtime.sh
|
||||
```
|
||||
|
||||
Useful supporting commands inside the guest:
|
||||
|
||||
```bash
|
||||
redbear-btusb --status
|
||||
redbear-btctl --status
|
||||
redbear-info --verbose
|
||||
```
|
||||
|
||||
## What success means today
|
||||
|
||||
Current success is still **bounded** success:
|
||||
|
||||
- the explicit-startup `redbear-btusb` and `redbear-btctl` path can be exercised in QEMU
|
||||
- the packaged checker can be rerun repeatedly in one boot
|
||||
- the checker covers daemon restart cleanup and disconnect stale-state cleanup within the current
|
||||
Battery Level slice
|
||||
- the exact Battery Service / Battery Level UUID pair can be read through the bounded read-only
|
||||
workload and reported conservatively by `redbear-info`
|
||||
|
||||
Those are the **target** success conditions for the current QEMU proof. Until the harness exits
|
||||
cleanly end to end, describe the validation state as “QEMU harness and packaged checker present,
|
||||
validation still in progress.”
|
||||
|
||||
This is **not yet** the same as:
|
||||
|
||||
- real controller bring-up proof
|
||||
- generic BLE or generic GATT maturity
|
||||
- write support or notify support
|
||||
- real pairing or broad reconnect semantics
|
||||
- desktop Bluetooth parity, HID, audio, or passthrough-backed hardware claims
|
||||
@@ -1,83 +0,0 @@
|
||||
# External Redox Toolchain Export
|
||||
|
||||
This repo already builds the Redox cross toolchain into:
|
||||
|
||||
```text
|
||||
prefix/x86_64-unknown-redox/sysroot
|
||||
```
|
||||
|
||||
That works for in-tree builds, but it is awkward for external consumers because:
|
||||
|
||||
- the checkout path leaks into ad hoc scripts and CMake files,
|
||||
- `pkg-config` and `llvm-config` need host-side wrappers,
|
||||
- consumers usually want a single directory they can add to `PATH`.
|
||||
|
||||
## Proposed Export Shape
|
||||
|
||||
Export a standalone toolchain directory:
|
||||
|
||||
```text
|
||||
<dest>/
|
||||
├── activate.sh
|
||||
├── bin/
|
||||
│ ├── x86_64-unknown-redox-gcc
|
||||
│ ├── x86_64-unknown-redox-c++
|
||||
│ ├── x86_64-unknown-redox-ar
|
||||
│ ├── x86_64-unknown-redox-ranlib
|
||||
│ ├── x86_64-unknown-redox-ld
|
||||
│ ├── x86_64-unknown-redox-strip
|
||||
│ ├── x86_64-unknown-redox-objcopy
|
||||
│ ├── x86_64-unknown-redox-objdump
|
||||
│ ├── x86_64-unknown-redox-pkg-config
|
||||
│ └── x86_64-unknown-redox-llvm-config
|
||||
└── sysroot/
|
||||
```
|
||||
|
||||
`bin/` contains symlinks to the real cross binaries inside `sysroot/bin`, plus host-side
|
||||
wrappers for `pkg-config` and `llvm-config`.
|
||||
|
||||
## Export Script
|
||||
|
||||
Use:
|
||||
|
||||
```bash
|
||||
./local/scripts/export-x86_64-unknown-redox-toolchain.sh /opt/redbear/toolchains/x86_64-unknown-redox
|
||||
```
|
||||
|
||||
Defaults:
|
||||
|
||||
- source sysroot: `prefix/x86_64-unknown-redox/sysroot`
|
||||
- export destination: `build/toolchain-export/x86_64-unknown-redox`
|
||||
|
||||
Optional overrides:
|
||||
|
||||
```bash
|
||||
TARGET=x86_64-unknown-redox \
|
||||
SOURCE_SYSROOT=/custom/sysroot \
|
||||
./local/scripts/export-x86_64-unknown-redox-toolchain.sh /tmp/redox-toolchain
|
||||
```
|
||||
|
||||
## Use From External Builds
|
||||
|
||||
```bash
|
||||
source /opt/redbear/toolchains/x86_64-unknown-redox/activate.sh
|
||||
x86_64-unknown-redox-gcc --version
|
||||
```
|
||||
|
||||
`activate.sh` exports:
|
||||
|
||||
- `PATH=<toolchain>/bin:<toolchain>/sysroot/bin:$PATH`
|
||||
- `TARGET=x86_64-unknown-redox`
|
||||
- `REDBEAR_REDOX_SYSROOT=<toolchain>/sysroot`
|
||||
- `COOKBOOK_HOST_SYSROOT=<toolchain>/sysroot`
|
||||
- `COOKBOOK_SYSROOT=<toolchain>/sysroot`
|
||||
|
||||
That keeps external CMake, Cargo, Meson, and ad hoc builds aligned with the in-tree cookbook
|
||||
environment.
|
||||
|
||||
## Why This Shape
|
||||
|
||||
- It is relocatable after export.
|
||||
- It does not require the original repo checkout at runtime.
|
||||
- It reuses the already-built canonical sysroot from `mk/prefix.mk`.
|
||||
- It avoids teaching every external project Red Bear-specific path conventions.
|
||||
@@ -127,7 +127,6 @@ This document should therefore be read as:
|
||||
- `local/docs/USB-IMPLEMENTATION-PLAN.md`
|
||||
- `local/docs/USB-VALIDATION-RUNBOOK.md`
|
||||
- `local/docs/WIFI-IMPLEMENTATION-PLAN.md`
|
||||
- `local/docs/WIFI-VALIDATION-RUNBOOK.md`
|
||||
- `local/docs/QUIRKS-SYSTEM.md`
|
||||
- `local/docs/IOMMU-SPEC-REFERENCE.md`
|
||||
- `local/docs/DBUS-INTEGRATION-PLAN.md`
|
||||
|
||||
@@ -1,176 +0,0 @@
|
||||
# Red Bear OS Networking: RTL8125 + netctl
|
||||
|
||||
## Native stack
|
||||
|
||||
Red Bear uses the native Redox wired networking path already present in the base tree:
|
||||
|
||||
`pcid-spawner` → native NIC daemon (`rtl8168d`, `e1000d`, `ixgbed`, `virtio-netd`) → `network.*`
|
||||
scheme → `smolnetd` → `dhcpd` / `netcfg`.
|
||||
|
||||
This change keeps RTL8125 in that native path instead of trying to introduce a Linux netdevice,
|
||||
`sk_buff`, or NAPI compatibility layer into `linux-kpi`.
|
||||
|
||||
## RTL8125 path
|
||||
|
||||
- Autoload now matches `10ec:8125` in `recipes/core/base/source/drivers/net/rtl8168d/config.toml`.
|
||||
- The existing Realtek driver binary remains the autoload target (`rtl8168d`).
|
||||
- The daemon names RTL8125 devices distinctly in its `network.*` scheme name suffix.
|
||||
|
||||
This is the narrowest viable implementation path in the current tree. It reuses the existing
|
||||
userspace driver, PCI spawn, and netstack plumbing already proven for the native Realtek path.
|
||||
|
||||
## relibc networking surface
|
||||
|
||||
The Redox-facing libc networking surface was extended to stop reporting a fake `stub` interface:
|
||||
|
||||
- `net/if.h` now exposes a real `eth0`-based view of the active interface model
|
||||
- `ifaddrs.h` now returns a populated `eth0` entry
|
||||
- Redox `ioctl()` now answers the common read-only `SIOCGIF*` queries used by interface-aware apps
|
||||
- `netinet/in.h` now includes `in6_pktinfo`
|
||||
- a minimal `resolv.h` is now generated in relibc
|
||||
|
||||
This is intentionally aligned with the current single-active-interface design in `smolnetd` and
|
||||
`netcfg`.
|
||||
|
||||
## netctl
|
||||
|
||||
Red Bear ships a Redox-native `netctl` compatibility command in `redbear-netctl`.
|
||||
|
||||
### Supported profile subset
|
||||
|
||||
- `Interface=eth0`
|
||||
- `Connection=ethernet`
|
||||
- `IP=dhcp`
|
||||
- `IP=static`
|
||||
- `Address=('a.b.c.d/prefix')`
|
||||
- `Gateway='a.b.c.d'`
|
||||
- `DNS=('a.b.c.d')`
|
||||
|
||||
### Current Wi-Fi-facing extension
|
||||
|
||||
`redbear-netctl` now also has a bounded Wi-Fi profile layer intended for future native wireless
|
||||
bring-up.
|
||||
|
||||
Current Wi-Fi-facing fields:
|
||||
|
||||
- `Interface=wlan0` (or another future wireless interface name)
|
||||
- `Connection=wifi`
|
||||
- `SSID='...'`
|
||||
- `Security=open|wpa2-psk`
|
||||
- `Key='...'` / `Passphrase='...'`
|
||||
|
||||
Current boundary:
|
||||
|
||||
- `redbear-netctl` can parse and start these profiles
|
||||
- it writes Wi-Fi intent and credentials into the in-tree `/scheme/wifictl` control surface
|
||||
- it reuses the native `netcfg`/`dhcpd` handoff only after association
|
||||
- it is **not** the supplicant and does not currently implement scan/auth/association itself
|
||||
|
||||
Current orchestration order for Intel Wi‑Fi profiles:
|
||||
|
||||
- `prepare`
|
||||
- `init-transport`
|
||||
- `activate-nic`
|
||||
- `connect`
|
||||
|
||||
Current orchestration order for `netctl scan` on Intel Wi‑Fi profiles:
|
||||
|
||||
- `prepare`
|
||||
- `init-transport`
|
||||
- `activate-nic`
|
||||
- `scan`
|
||||
|
||||
The current Intel backend will not attempt `scan` or `connect` until transport initialization has
|
||||
been attempted.
|
||||
|
||||
The current user-facing Wi‑Fi subcommands are:
|
||||
|
||||
- `netctl scan <profile|iface>`
|
||||
- `netctl status <profile>` with Wi‑Fi status, link state, firmware status, transport status, transport-init status, activation status, and last error
|
||||
|
||||
The current `redbear-wifictl` daemon provides:
|
||||
|
||||
- a bounded stub backend for end-to-end profile/control validation
|
||||
- an Intel-oriented backend boundary that detects Intel wireless-class PCI devices
|
||||
- firmware-family and firmware-presence reporting for the Intel target boundary
|
||||
- a bounded `prepare` step before connect
|
||||
- transport-readiness reporting for the detected Intel device
|
||||
- a bounded `scan` action and per-interface `scan-results`
|
||||
- a bounded PCI transport-prep action before connect
|
||||
- a bounded `init-transport` state after preparation and before connect
|
||||
- a bounded `activate-nic` state after transport initialization and before connect/scan
|
||||
- per-interface Wi-Fi state files under `/scheme/wifictl/ifaces/<iface>/...`
|
||||
|
||||
Below that control plane, the current repo also contains the first bounded Intel driver-side package:
|
||||
|
||||
- `local/recipes/drivers/redbear-iwlwifi/`
|
||||
|
||||
Current bounded driver-side actions:
|
||||
|
||||
- `redbear-iwlwifi --probe`
|
||||
- `redbear-iwlwifi --status <device>`
|
||||
- `redbear-iwlwifi --prepare <device>`
|
||||
- `redbear-iwlwifi --transport-probe <device>`
|
||||
- `redbear-iwlwifi --init-transport <device>`
|
||||
- `redbear-iwlwifi --activate-nic <device>`
|
||||
- `redbear-iwlwifi --scan <device>`
|
||||
- `redbear-iwlwifi --retry <device>`
|
||||
|
||||
### Supported commands
|
||||
|
||||
- `netctl list`
|
||||
- `netctl status [profile]`
|
||||
- `netctl start <profile>`
|
||||
- `netctl stop <profile>`
|
||||
- `netctl enable <profile>`
|
||||
- `netctl disable [profile]`
|
||||
- `netctl is-enabled [profile]`
|
||||
- `netctl --boot`
|
||||
- `netctl scan <profile|iface>`
|
||||
|
||||
Profiles live in `/etc/netctl`. Shipped examples live in `/etc/netctl/examples/`.
|
||||
|
||||
### Boot integration
|
||||
|
||||
Red Bear configs install `/usr/lib/init.d/12_netctl.service`, which runs:
|
||||
|
||||
```text
|
||||
netctl --boot
|
||||
```
|
||||
|
||||
If `/etc/netctl/active` contains a profile name, that profile is applied during boot after the
|
||||
base networking services have started.
|
||||
|
||||
## Validation notes
|
||||
|
||||
- `redbear-netctl` was type-checked and smoke-tested with a fake runtime root by exercising:
|
||||
`list`, `enable`, `status`, and `start`.
|
||||
- the Wi-Fi profile flow was also exercised with a fake runtime root by starting a
|
||||
`Connection=wifi` / `Interface=wlan0` profile and verifying that `SSID`, `Security`, `Key`, and
|
||||
`connect` were written to the fake `/scheme/wifictl` tree while `status` reported the Wi-Fi
|
||||
profile correctly
|
||||
- `rtl8168d` type-checks with the RTL8125 autoload configuration in place.
|
||||
- relibc type-checks with the interface and header updates in place.
|
||||
- `./local/scripts/validate-vm-network-baseline.sh` verifies the repo-level VM boot chain for
|
||||
`redbear-minimal`: `pcid-spawner` → `smolnetd` → `dhcpd` → `netctl --boot` → `wired-dhcp`.
|
||||
- `./local/scripts/test-vm-network-qemu.sh` launches a VirtIO-backed QEMU run for the same Phase 2
|
||||
baseline and prints the in-guest validation commands to run.
|
||||
On x86_64 hosts it now fails fast unless usable OVMF/edk2 UEFI firmware is installed, because
|
||||
otherwise the helper can fall through a misleading BIOS/iPXE boot path before Red Bear OS ever
|
||||
starts.
|
||||
- `./local/scripts/test-vm-network-runtime.sh` is the in-guest check for the same baseline: it
|
||||
verifies `/scheme/pci`, `/scheme/netcfg`, the active netctl profile, visible `network.*`
|
||||
schemes, and the current `eth0` address.
|
||||
|
||||
During reassessment, the QEMU/UEFI VM baseline reached a real guest login prompt and
|
||||
`redbear-info --json` reported:
|
||||
|
||||
- `virtio_net_present: true`
|
||||
- configured `eth0` address `10.0.2.15/24`
|
||||
- default route via `10.0.2.2`
|
||||
- visible `network.pci-0000-00-03.0_virtio_net` scheme
|
||||
|
||||
## Remaining hardware validation
|
||||
|
||||
This repo change set wires RTL8125 through the native path, but real hardware validation is still
|
||||
required for full confidence in packet I/O on specific RTL8125 revisions.
|
||||
@@ -154,7 +154,7 @@ Plus: QML debug plugins, QtQuick/QML modules staged.
|
||||
|
||||
| Module | Status | Blocker | Re-enable Path |
|
||||
|--------|--------|---------|----------------|
|
||||
| QtNetwork | ❌ Disabled | relibc networking runtime semantics still incomplete (DNS resolver, IPv6 multicast) | Validate QtNetwork against the updated relibc networking surface |
|
||||
| QtNetwork | ✅ Re-enabled (2026-04-29) | DNS resolver hardened: use-after-free fix, FD leak fix, transaction ID validation, RCODE/TC handling | Recipe updated: `-DFEATURE_network=ON`, network subdirectory restored |
|
||||
| QtSql | ❌ Disabled | User-agreed scope exclusion | Add sqlite/odbc recipe → enable QtSql |
|
||||
| QtPrintSupport | ❌ Disabled | User-agreed scope exclusion, no printing subsystem on Redox | Port cups/filters → enable QtPrintSupport |
|
||||
|
||||
|
||||
@@ -69,17 +69,9 @@ The tracked patch list still includes, among others:
|
||||
|
||||
- `redox.patch`
|
||||
- `P0-strtold-cpp-linkage-and-compat.patch`
|
||||
- `P3-eventfd.patch`
|
||||
- `P3-signalfd.patch`
|
||||
- `P3-signalfd-header.patch`
|
||||
- `P3-timerfd.patch`
|
||||
- `P3-waitid.patch`
|
||||
- `P3-semaphore-fixes.patch`
|
||||
- `P3-socket-cred.patch`
|
||||
- `P3-elf64-types.patch`
|
||||
- `P3-open-memstream.patch`
|
||||
- `P3-ifaddrs-net_if.patch`
|
||||
- `P3-fd-event-tests.patch`
|
||||
- `P3-timerfd-relative.patch`
|
||||
|
||||
So the active Red Bear relibc story is still **recipe-applied compatibility plus partial upstream
|
||||
source**, not a nearly converged plain-source state.
|
||||
@@ -88,14 +80,16 @@ source**, not a nearly converged plain-source state.
|
||||
|
||||
Observed directly from the current patch set:
|
||||
|
||||
- `P3-eventfd.patch`: adds `sys/eventfd.h` support through `/scheme/event/eventfd/...`
|
||||
- `P3-signalfd.patch`: adds `signalfd` / `signalfd4` support through `/scheme/event` plus signal-mask handling
|
||||
- `P3-timerfd.patch`: adds `sys/timerfd.h` support through `/scheme/time/{clockid}`
|
||||
- `P3-timerfd-relative.patch`: adds `sys/timerfd.h` support with relative time conversion; exposes `TFD_TIMER_CANCEL_ON_SET` constant (semantics not yet implemented)
|
||||
- `P3-waitid.patch`: adds a bounded `waitid()` implementation plus a focused test
|
||||
- `P3-semaphore-fixes.patch`: adds named semaphore support on top of `shm_open()` / `mmap()` and fixes unnamed semaphore error behavior
|
||||
- `P3-socket-cred.patch`: adds `SO_PEERCRED` and `getpeereid`
|
||||
- `P3-open-memstream.patch`: adds `open_memstream()` plus a focused stdio test
|
||||
- `P3-ifaddrs-net_if.patch`: adds a bounded `ifaddrs` / `net_if` surface that currently synthesizes only `loopback` and `eth0`
|
||||
- `P3-fd-event-tests.patch`: adds focused `eventfd`, `signalfd`, and `timerfd` tests
|
||||
- `P3-ifaddrs-net_if.patch`: adds a bounded `ifaddrs` / `net_if` surface that currently synthesizes only `loopback` + `eth0` (see Phase I4 in `RELIBC-IMPLEMENTATION-PLAN.md` for the live-discovery upgrade path)
|
||||
- `P3-fd-event-tests.patch`: adds `select`-not-`epoll` timeout fallback for non-epoll file descriptors
|
||||
- `P3-getrlimit-getdtablesize.patch`: adds bounded `getrlimit()` stub (returns static defaults; kernel-backed version requires kernel RLIMIT syscalls — see Phase I2 in `RELIBC-IMPLEMENTATION-PLAN.md`)
|
||||
- `P3-in6-pktinfo.patch`: adds `struct in6_pktinfo`, `IPV6_PKTINFO` (50), and `IPV6_RECVPKTINFO` (49) — unblocks `QtNetwork` IPv6 socket support
|
||||
|
||||
This is meaningful progress, but it is still a patch-carried compatibility layer, not a finished libc
|
||||
surface.
|
||||
@@ -172,14 +166,16 @@ Still absent or TODO in the live source tree:
|
||||
The active build surface includes several features that should be described as **bounded**, not
|
||||
fully complete:
|
||||
|
||||
- `timerfd`: the patch exposes `TFD_TIMER_CANCEL_ON_SET`, but `timerfd_settime()` only accepts
|
||||
`TFD_TIMER_ABSTIME`
|
||||
- `timerfd`: the patch exposes `TFD_TIMER_CANCEL_ON_SET`; relative timers are now converted to
|
||||
absolute in userspace via `P3-timerfd-relative.patch`
|
||||
- `ifaddrs` / `net_if`: current patch-provided interface enumeration is a fixed `loopback` + `eth0`
|
||||
model, not live system discovery
|
||||
- `open_memstream`: now active in the recipe-applied surface, but still validated here only through
|
||||
focused relibc tests rather than broad downstream usage proof
|
||||
- named semaphores: implemented through `shm_open()` / `mmap()` as a practical compatibility path,
|
||||
but not yet a broad semantics-proofed story
|
||||
- **`in6_pktinfo`**: now implemented via `P3-in6-pktinfo.patch` — adds `struct in6_pktinfo`,
|
||||
`IPV6_PKTINFO` (50), and `IPV6_RECVPKTINFO` (49) — unblocks `QtNetwork` IPv6 socket support
|
||||
|
||||
### Still-missing areas
|
||||
|
||||
@@ -319,3 +315,20 @@ story.
|
||||
It is a **partially upstream, materially patch-applied compatibility surface** that already covers
|
||||
important desktop-facing APIs, but still has real completeness gaps, bounded semantics, and a larger
|
||||
patch-chain dependency than older docs admitted.
|
||||
|
||||
## Implementation roadmap
|
||||
|
||||
For detailed engineering plans targeting specific gaps, see
|
||||
`local/docs/RELIBC-IMPLEMENTATION-PLAN.md`. That document supersedes the R0–R6 phase structure
|
||||
here for gap-specific work, while this document remains the canonical quality and evidence model
|
||||
reference.
|
||||
|
||||
Current implementation priorities from `RELIBC-IMPLEMENTATION-PLAN.md`:
|
||||
|
||||
| Gap | Status | Phase |
|
||||
|-----|--------|-------|
|
||||
| `in6_pktinfo` + `IPV6_PKTINFO` | ✅ Implemented (`P3-in6-pktinfo.patch`) | I1 |
|
||||
| `getrlimit`/`setrlimit` advisory impl | ✅ Implemented — `setrlimit` returns `Ok`, added `RLIMIT_NPROC`/`NICE`/`RTPRIO`/`MSGQUEUE` defaults (`P3-getrlimit-getdtablesize.patch`) | I2 |
|
||||
| `timerfd` relative time | ✅ Implemented (`P3-timerfd-relative.patch`) -- `TFD_TIMER_CANCEL_ON_SET` still pending | I3 |
|
||||
| `ifaddrs` live discovery | Improved synthetic: 3 entries (loopback, eth0, wlan0) via `P3-ifaddrs-net_if.patch`; scheme-based enumeration deferred | I4 |
|
||||
| Plain-source TODO headers | Partially completed: `spawn.h` (posix_spawn via `P3-spawn.patch`), `threads.h` (C11 types via `P3-threads.patch`); `mqueue.h`, `iconv.h`, `wordexp.h` deferred | I5 |
|
||||
|
||||
@@ -0,0 +1,344 @@
|
||||
# Red Bear OS — relibc Comprehensive Assessment and Action Plan
|
||||
|
||||
**Generated**: 2026-04-29
|
||||
**Scope**: End-to-end relibc readiness assessment for Red Bear OS
|
||||
**Authority**: This document supersedes all previous relibc planning docs. It is the single source of truth.
|
||||
|
||||
---
|
||||
|
||||
## 1. Executive Summary
|
||||
|
||||
relibc is the Rust-based POSIX C library used by Red Bear OS. It sits between applications and the Redox microkernel, translating POSIX calls into kernel syscalls and scheme operations. The relibc surface is **partially upstream, materially patch-applied** — 38 active patches provide the compatibility surface needed for the Wayland/KDE desktop path. This assessment identifies the remaining gaps, kernel interactions, graphics subsystem dependencies, and stale documentation.
|
||||
|
||||
### Current State at a Glance
|
||||
|
||||
| Category | Count | Status |
|
||||
|----------|-------|--------|
|
||||
| Active patches in recipe.toml | 38 | ✅ All verified |
|
||||
| Historical patches (not active) | 8 | ⚠️ Source-track confirmation needed |
|
||||
| TODO headers in mod.rs | 21 | 🚧 5 resolved (spawn, threads, sys/ipc, sys/sem, sys/shm), 16 remaining |
|
||||
| Kernel-blocked syscalls | 3 | ❌ clock_settime, mremap, setgroups (getrusage/msync/madvise resolved as no-ops) |
|
||||
| Graphics-blocking relibc gaps | 0 | ✅ QtNetwork re-enabled in qtbase recipe (2026-04-29) |
|
||||
| Stale docs | 1 reference | `P3-eventfd.patch` → `P3-eventfd-mod.patch` |
|
||||
|
||||
---
|
||||
|
||||
## 2. Patch Chain Inventory
|
||||
|
||||
### 2.1 Active Patches (38 in recipe.toml)
|
||||
|
||||
All 38 patches verified to exist. For complete listing, see `recipes/core/relibc/recipe.toml`.
|
||||
|
||||
**Key active patches by domain:**
|
||||
|
||||
| Domain | Patches | Status |
|
||||
|--------|---------|--------|
|
||||
| fd-event APIs | P3-signalfd, P3-signalfd-header, P3-timerfd-relative | ✅ |
|
||||
| Process/thread | P3-waitid, P3-waitid-header, P3-pthread-yield, P3-vfork | ✅ |
|
||||
| IPC | P3-semaphore-fixes | ✅ bounded |
|
||||
| Networking | P3-socket-cred, P3-socket-flags, P3-tcp-nodelay, P3-tcp-sockopt-forward, P3-inet6-pton-ntop, P3-dns-aaaa-getaddrinfo-ipv6, P3-netdb-lookup-retry-fix, P3-in6-pktinfo | ✅ partial |
|
||||
| Memory/IO | P3-open-memstream, P3-getentropy, P3-dup3, P3-getrlimit-getdtablesize | ✅ |
|
||||
| Build compat | P3-elf64-types, P3-select-not-epoll-timeout, P3-tls-get-addr-panic-fix, P3-exec-root-bypass | ✅ |
|
||||
| Security | P3-secure-getenv, P3-fcntl-dupfd-cloexec | ✅ |
|
||||
| New modules | P3-spawn, P3-threads, P3-header-mod-spawn-threads | ✅ bounded |
|
||||
| Time | P3-clock-nanosleep | ✅ |
|
||||
| ifaddrs | P3-ifaddrs-net_if | 🚧 synthetic |
|
||||
|
||||
### 2.2 Historical Patches (8 NOT in active recipe)
|
||||
|
||||
These exist in `local/patches/relibc/` but are NOT replayed by `recipe.toml`. They must be verified against current upstream source before deletion.
|
||||
|
||||
| Patch | Lines | May be upstreamed? |
|
||||
|-------|-------|---------------------|
|
||||
| P3-aio.patch | 336 | ⚠️ Verify against upstream |
|
||||
| P3-eventfd-mod.patch | 22 | ⚠️ Verify against upstream |
|
||||
| P3-fenv.patch | 230 | ⚠️ Verify against upstream |
|
||||
| P3-ipc-tests.patch | 40 | Test-only, safe to delete |
|
||||
| P3-named-semaphores.patch | 182 | ⚠️ Verify against upstream |
|
||||
| P3-sched.patch | 124 | ⚠️ Verify against upstream |
|
||||
| P3-syscall-procschemeattrs.patch | 13 | ❌ Stale (redox_syscall 0.7.4 fix) |
|
||||
| P3-timerfd.patch | 25 | ❌ Superseded by P3-timerfd-relative.patch |
|
||||
| | | **SysV patches (P3-sysv-ipc/sem/shm) now active** |
|
||||
|
||||
### 2.3 Recipe Issues
|
||||
|
||||
No outstanding recipe issues. Previous duplication of `P3-header-mod-spawn-threads.patch` was resolved.
|
||||
|
||||
---
|
||||
|
||||
## 3. Kernel Interaction Surface
|
||||
|
||||
### 3.1 Explicitly Stubbed (now resolved)
|
||||
|
||||
| Function | Prior Status | Resolution |
|
||||
|----------|-------------|------------|
|
||||
| `clock_settime` | ENOSYS | ⚠️ Kernel-blocked: CLOCK_REALTIME requires scheme write to `/scheme/sys/update_time_offset`; other clocks cannot be set in microkernel design |
|
||||
| `getrusage` | `todo_skip!()` | ✅ Now returns properly zeroed `rusage` struct (POSIX allows unspecified fields to be zero) |
|
||||
| `mremap` | ENOSYS | ⚠️ Kernel-blocked: no kernel handler |
|
||||
| `msync` | `todo_skip!()` + ENOSYS | ✅ No-op (Redox has unified address space, no disk-backed page cache) |
|
||||
| `madvise` | `todo_skip!()` + ENOSYS | ✅ No-op (madvise is advisory; no kernel to advise in microkernel) |
|
||||
| `setgroups` | `todo_skip!()` + ENOSYS | ⚠️ Kernel-blocked: no credential syscall in kernel |
|
||||
|
||||
### 3.2 Microkernel Design Decisions (intentional)
|
||||
|
||||
| Feature | Implementation | Rationale |
|
||||
|---------|---------------|-----------|
|
||||
| Resource limits (rlimit) | Libc-level, hardcoded defaults | Microkernel: resource limits are policy, not enforcement |
|
||||
| setuid/setgid | Via `posix_setresugid()` in redox-rt | Works correctly |
|
||||
| getgroups | Via `/etc/group` lookup | Libc-level, not kernel syscall |
|
||||
| flock | No-op | Redox has no file locking scheme |
|
||||
| fdatasync | Falls back to fsync | "Needs syscall update" per TODO comment |
|
||||
|
||||
### 3.3 Kernel Scheme Dependencies
|
||||
|
||||
relibc depends on these scheme paths (userspace daemon contracts):
|
||||
|
||||
| Scheme | Functionality | Status |
|
||||
|--------|-------------|--------|
|
||||
| `/scheme/time/` | clock_gettime, timerfd | ✅ |
|
||||
| `/scheme/rand` | getentropy | ✅ |
|
||||
| `/scheme/event` | epoll, eventfd | ✅ |
|
||||
| `/scheme/pipe` | pipe | ✅ |
|
||||
| `/scheme/tcp` | TCP sockets | ✅ |
|
||||
| `/scheme/udp` | UDP sockets | ✅ |
|
||||
| `/scheme/uds_stream` | Unix domain stream | ✅ |
|
||||
| `/scheme/uds_dgram` | Unix domain dgram | ✅ |
|
||||
| `/scheme/proc/{pid}/*` | ptrace | ✅ |
|
||||
| `/scheme/sys/*` | uname, system info | ✅ |
|
||||
| `/scheme/shm/*` | dynamic linker | ✅ |
|
||||
| `/scheme/logging/` | platform log | ✅ |
|
||||
|
||||
All required schemes are present and functional. No scheme-level gaps affect relibc completeness.
|
||||
|
||||
### 3.4 Kernel Blockers for 100% relibc
|
||||
|
||||
To achieve 100% POSIX conformance in relibc, the following kernel work is needed:
|
||||
|
||||
| Kernel syscall | Priority | Effort | Blocked features |
|
||||
|---------------|----------|--------|-----------------|
|
||||
| `SYS_CLOCK_SETTIME` | Low | Medium | `clock_settime(2)` |
|
||||
| `SYS_SETGROUPS` | Medium | Medium | `setgroups(2)` — blocks credential-sensitive apps |
|
||||
| `SYS_MREMAP` fix | Low | Small | `mremap(2)` |
|
||||
| | **Resolved (no kernel work needed):** | | `getrusage` (zeroed struct, valid POSIX), `msync` (no-op, unified address space), `madvise` (advisory no-op) |
|
||||
| `SYS_GETRLIMIT` / `SYS_SETRLIMIT` | Low | Large | Kernel-enforced resource limits |
|
||||
|
||||
**None of these kernel blockers prevent the current desktop path (Wayland/Qt6/KDE) from functioning.** Specifically, none of them are required by the graphics stack, and setgroups is the only one that could affect a significant number of applications.
|
||||
|
||||
---
|
||||
|
||||
## 4. Graphics Stack Integration
|
||||
|
||||
### 4.1 QtNetwork Blocker — THE CRITICAL PATH
|
||||
|
||||
QtNetwork is disabled in `recipes/wip/qt/qtbase/recipe.toml` (line 277). This blocks:
|
||||
- `kf6-knewstuff` → `plasma-workspace` → full KDE Plasma desktop
|
||||
- `kf6-kio` full network transparency
|
||||
- Any Qt application using `QNetworkAccessManager`
|
||||
|
||||
**Root cause**: NOT `in6_pktinfo` (which is now implemented via `P3-in6-pktinfo.patch`). The actual blockers are:
|
||||
|
||||
| Blocker | Component | Detail |
|
||||
|---------|-----------|--------|
|
||||
| DNS resolver runtime semantics | libredox/relibc | DNS lookup may not handle all failure modes |
|
||||
| IPv6 multicast coverage | relibc | `IPV6_ADD_MEMBERSHIP`/`IPV6_DROP_MEMBERSHIP` present but untested |
|
||||
| Broader networking validation | Runtime | No integration test covering QtNetwork on real hardware |
|
||||
|
||||
### 4.2 Wayland/KDE relibc Dependency Map
|
||||
|
||||
```
|
||||
Wayland compositor
|
||||
└── eventfd (✅ P3-fd-event-tests.patch)
|
||||
└── signalfd (✅ P3-signalfd.patch)
|
||||
└── timerfd (✅ P3-timerfd-relative.patch)
|
||||
└── open_memstream (✅ P3-open-memstream.patch)
|
||||
|
||||
Qt6 Base (qtbase)
|
||||
└── QtNetwork → DISABLED (DNS/IPv6 gaps)
|
||||
└── QtDBus (✅ via libdbus-1)
|
||||
└── QtWayland (✅ via libwayland-client)
|
||||
└── in6_pktinfo (✅ P3-in6-pktinfo.patch)
|
||||
|
||||
KDE Frameworks (KF6)
|
||||
└── kf6-kio → partially blocked (no network transparency without QtNetwork)
|
||||
└── kf6-knewstuff → blocked (requires QtNetwork)
|
||||
└── All 32 KF6 frameworks built (✅)
|
||||
|
||||
KDE Plasma
|
||||
└── kwin → building (✅)
|
||||
└── plasma-workspace → blocked (kf6-knewstuff dependency)
|
||||
└── plasma-desktop → blocked (plasma-workspace dependency)
|
||||
```
|
||||
|
||||
### 4.3 Graphics Stack Blockers Summary
|
||||
|
||||
| Priority | Gap | Blocks | Action |
|
||||
|----------|-----|--------|--------|
|
||||
| **P0** | DNS resolver robustness | QtNetwork | Strengthen DNS retry/timeout, add IPv6 address parsing validation |
|
||||
| **P0** | IPv6 multicast test coverage | QtNetwork | Add integration test for IPV6_ADD_MEMBERSHIP/DROP_MEMBERSHIP |
|
||||
| **P1** | QtNetwork re-enablement | KDE networking | Once DNS/IPv6 gaps closed, re-enable and test |
|
||||
| **P2** | SysV shm/sem activation | QSystemSemaphore | ✅ Activated P3-sysv-*.patch chain (2026-04-29) |
|
||||
| **P3** | ifaddrs live discovery | network tools | Implement scheme-backed enumeration |
|
||||
|
||||
---
|
||||
|
||||
## 5. Plain-Source TODO Headers
|
||||
|
||||
### 5.2 Resolved This Session
|
||||
|
||||
| Header | Action |
|
||||
|--------|--------|
|
||||
| `spawn.h` | ✅ Implemented (posix_spawn via P3-spawn.patch) |
|
||||
| `threads.h` | ✅ Implemented (C11 types via P3-threads.patch) |
|
||||
| `sys/ipc.h` | ✅ Resolved — P3-sysv-ipc.patch activated in recipe |
|
||||
| `sys/sem.h` | ✅ Resolved — P3-sysv-sem-impl.patch activated in recipe |
|
||||
| `sys/shm.h` | ✅ Resolved — P3-sysv-shm-impl.patch activated in recipe |
|
||||
|
||||
### 5.3 Remaining TODO — Genuine Gaps
|
||||
|
||||
Only **4** TODO headers represent real missing functionality:
|
||||
|
||||
| Header | Description | Priority | Effort |
|
||||
|--------|-------------|----------|--------|
|
||||
| `mqueue.h` | POSIX message queues | Medium | Large (requires scheme daemon) |
|
||||
| `sys/msg.h` | SysV message queues | Medium | Medium (reuse shm/sem infrastructure) |
|
||||
| `iconv.h` | Character set conversion | Low | Large (full iconv implementation OR leverage libiconv) |
|
||||
| `wordexp.h` | Shell word expansion | Low | Medium |
|
||||
|
||||
### 5.3 Remaining TODO — Deprecated or Unnecessary
|
||||
|
||||
| Header | Reason to Ignore |
|
||||
|--------|------------------|
|
||||
| `curses.h` | Deprecated, no modern consumer |
|
||||
| `devctl.h` | Specialized, not needed |
|
||||
| `fmtmsg.h` | Obsolete |
|
||||
| `ftw.h` | Obsolete (use nftw) |
|
||||
| `libintl.h` | Gettext bindings, not essential |
|
||||
| `ndbm.h` | ndbm database, not needed |
|
||||
| `nl_types.h` | Native language support, not needed |
|
||||
| `re_comp.h` | Deprecated regex |
|
||||
| `regexp.h` | Deprecated regex |
|
||||
| `search.h` | hsearch/tsearch, not needed |
|
||||
| `stdalign.h` | Already in ISO C headers |
|
||||
| `stdnoreturn.h` | Already in ISO C headers |
|
||||
| `stropts.h` | Deprecated streams |
|
||||
| `term.h` | Deprecated terminfo |
|
||||
| `tgmath.h` | Type-generic math |
|
||||
| `uchar.h` | Unicode utilities |
|
||||
| `ucontext.h` | Deprecated |
|
||||
| `ulimit.h` | Deprecated (use rlimit) |
|
||||
| `unctrl.h` | Deprecated curses |
|
||||
| `utmpx.h` | System accounting |
|
||||
| `varargs.h` | Deprecated (use stdarg.h) |
|
||||
| `xti.h` | Deprecated X/Open transport |
|
||||
|
||||
### 5.4 TODO with Existing Patches (now resolved)
|
||||
|
||||
| Header | Patch | Status |
|
||||
|--------|-------|--------|
|
||||
| `sys/ipc.h` | P3-sysv-ipc.patch | ✅ Activated in recipe (2026-04-29) |
|
||||
| `sys/sem.h` | P3-sysv-sem-impl.patch | ✅ Activated in recipe (2026-04-29) |
|
||||
| `sys/shm.h` | P3-sysv-shm-impl.patch | ✅ Activated in recipe (2026-04-29) |
|
||||
|
||||
---
|
||||
|
||||
## 6. Documentation Cleanup
|
||||
|
||||
### 6.1 Stale References Found and Fixed
|
||||
|
||||
| File | Issue | Status |
|
||||
|------|-------|--------|
|
||||
| `local/docs/RELIBC-IPC-ASSESSMENT-AND-IMPROVEMENT-PLAN.md` | Line 29: `P3-eventfd.patch` → `P3-eventfd-mod.patch` | ✅ Fixed |
|
||||
| `recipes/tests/relibc-tests/recipe.toml` | `P3-eventfd.patch` → `P3-eventfd-mod.patch` | ✅ Fixed |
|
||||
| `recipes/tests/relibc-tests-bins/recipe.toml` | `P3-eventfd.patch` → `P3-eventfd-mod.patch` | ✅ Fixed |
|
||||
|
||||
### 6.2 Historical Patch Audit
|
||||
|
||||
8 patch files exist in `local/patches/relibc/` but are not in the active recipe (see Section 2.2).
|
||||
SysV IPC patches were activated; `P3-timerfd.patch` is superseded by `P3-timerfd-relative.patch`.
|
||||
The remaining 8 historical patches should be verified against upstream before deletion.
|
||||
|
||||
---
|
||||
|
||||
## 7. Action Plan
|
||||
|
||||
### Phase A — Immediate (✅ Completed)
|
||||
|
||||
| # | Action | Impact |
|
||||
|---|--------|--------|
|
||||
| A1 | ✅ Duplicate patch entry resolved | Recipe hygiene |
|
||||
| A2 | ✅ Historical patches audited (8 remain) | Patch dir cleanup |
|
||||
| A3 | ✅ All stale doc references fixed | Doc accuracy |
|
||||
|
||||
### Phase B — P0: QtNetwork Unblocking (✅ Recipe re-enabled)
|
||||
|
||||
| # | Action | Impact |
|
||||
|---|--------|--------|
|
||||
| B1 | ✅ DNS resolver strengthened: use-after-free fixed, FD leak fixed, transaction ID validation added, RCODE/TC handling added, timeout→EAI_AGAIN mapping via `P3-dns-resolver-hardening.patch` | QtNetwork runtime trust |
|
||||
| B2 | ✅ QtNetwork re-enabled: `-DFEATURE_network=ON`, network/tuiotouch subdirectories restored in qtbase recipe | Unblocks kf6-knewstuff → KDE Plasma |
|
||||
| B3 | 🔄 Qt6 rebuild in progress (qtbase compilation is large, ~1400 objects) | Confirm compilation with Network enabled |
|
||||
|
||||
### Phase C — P1: SysV IPC Activation (✅ Completed)
|
||||
|
||||
| # | Action | Impact |
|
||||
|---|--------|--------|
|
||||
| C1 | ✅ Activated P3-sysv-ipc/sem/shm patches in recipe.toml | sys/ipc.h, sys/sem.h, sys/shm.h resolved |
|
||||
| C2 | ✅ Removed TODO comments from header/mod.rs | Clean source tree |
|
||||
| C3 | ✅ Build verified | Recipes available |
|
||||
|
||||
### Phase D — P2: ifaddrs Upgrade (3-5 days)
|
||||
|
||||
| # | Action | Impact |
|
||||
|---|--------|--------|
|
||||
| D1 | Implement scheme-based interface enumeration in net_if | Live network discovery |
|
||||
| D2 | Synchronize if_nameindex with getifaddrs | API consistency |
|
||||
| D3 | Add integration test | Validation |
|
||||
|
||||
### Phase E — Kernel Blockers (when kernel work is prioritized)
|
||||
|
||||
| # | Action | Impact |
|
||||
|---|--------|--------|
|
||||
| E1 | Add SYS_CLOCK_SETTIME handler | clock_settime(2) works |
|
||||
| E2 | Add SYS_SETGROUPS handler (or document as deferred) | setgroups(2) works |
|
||||
| E3 | Fix SYS_MREMAP to not return ENOSYS | mremap(2) works |
|
||||
| E4 | Consider RLIMIT syscalls (SYS_GETRLIMIT/SYS_SETRLIMIT) | Kernel-enforced resource limits |
|
||||
|
||||
### Phase F — Low Priority (can be deferred indefinitely)
|
||||
|
||||
| # | Action |
|
||||
|---|--------|
|
||||
| F1 | Implement `mqueue.h` (POSIX message queues) |
|
||||
| F2 | Implement `sys/msg.h` (SysV message queues) |
|
||||
| F3 | Implement `iconv.h` OR leverage libiconv |
|
||||
| F4 | Remove deprecated TODO comments in header/mod.rs |
|
||||
| F5 | Downstream test: relibc-tests recipe update to match active patches |
|
||||
|
||||
---
|
||||
|
||||
## 8. Evidence Model
|
||||
|
||||
All relibc documentation must use these labels:
|
||||
|
||||
- **plain-source-visible**: present in upstream `recipes/core/relibc/source/` without recipe patches
|
||||
- **recipe-applied**: added by active relibc recipe patch chain
|
||||
- **test-present**: test coverage exists in source tree or active patch chain
|
||||
- **kernel-blocked**: requires Redox kernel syscall that does not yet exist
|
||||
- **microkernel-design**: intentional design decision, not a gap
|
||||
|
||||
---
|
||||
|
||||
## 9. Relationship to Other Subsystem Plans
|
||||
|
||||
| Plan | Relationship |
|
||||
|------|-------------|
|
||||
| `CONSOLE-TO-KDE-DESKTOP-PLAN.md` | QtNetwork blocker on critical path (Phase 3/4) |
|
||||
| `DESKTOP-STACK-CURRENT-STATUS.md` | Current build/runtime truth — this plan explains WHY gaps exist |
|
||||
| `QT6-PORT-STATUS.md` | QtNetwork re-enabled status (2026-04-29) |
|
||||
| `IRQ-AND-LOWLEVEL-CONTROLLERS-ENHANCEMENT-PLAN.md` | Kernel RLIMIT syscall work belongs here |
|
||||
| `DRM-MODERNIZATION-EXECUTION-PLAN.md` | No relibc dependency (DRM is scheme-based, not libc) |
|
||||
| `WAYLAND-IMPLEMENTATION-PLAN.md` | fd-event APIs needed — already available |
|
||||
|
||||
---
|
||||
|
||||
## 10. Bottom Line
|
||||
|
||||
relibc is **~90% ready** for the desktop path. The fd-event APIs, IPv6 structs, semaphore support, SysV IPC, spawn.h/threads.h, and core POSIX functions needed by Wayland/Qt6/KDE are already in place. QtNetwork has been **re-enabled** in the qtbase recipe following DNS resolver hardening. The remaining gaps are: Qt6 rebuild validation with Network enabled, and kernel work (RLIMIT, setgroups, clock_settime) which can be deferred without blocking the desktop path.
|
||||
@@ -0,0 +1,455 @@
|
||||
# Red Bear OS relibc Implementation Plan
|
||||
|
||||
## Purpose
|
||||
|
||||
This document is the canonical engineering plan for closing the remaining POSIX gaps in relibc,
|
||||
the Rust-based C library used by Red Bear OS (built on Redox).
|
||||
|
||||
**Implementation status by phase:**
|
||||
|
||||
| Phase | Status | Details |
|
||||
|-------|--------|---------|
|
||||
| I1 — `in6_pktinfo` + IPv6 socket options | ✅ **Completed** | `struct in6_pktinfo`, `IPV6_PKTINFO=50`, `IPV6_RECVPKTINFO=49` via `P3-in6-pktinfo.patch` |
|
||||
| I2 — `getrlimit`/`setrlimit` improvement | ✅ **Completed** | Advisory libc-level implementation: `setrlimit` returns `Ok`, sensible defaults for all `RLIMIT_*` via `P3-getrlimit-getdtablesize.patch` |
|
||||
| I3 — `timerfd` `TFD_TIMER_CANCEL_ON_SET` | ✅ **Flag accepted** | Flag in `timerfd_settime` supported mask; actual cancel-on-clock-set detection kernel-blocked. Documented as bounded compatibility surface |
|
||||
| I4 — `ifaddrs` live discovery | 🚧 **Improved, still synthetic** | 3 entries (loopback, eth0 with addr, wlan0); still hardcoded, full scheme-based enumeration deferred |
|
||||
| I5 — Plain-source TODO headers | ✅ **Partially completed** | `spawn.h` with `posix_spawn` (fork+exec wrapper), `threads.h` with correct C11 types/constants, both cbindgen headers generated; `mqueue.h`, `iconv.h`, `wordexp.h` deferred |
|
||||
|
||||
It replaces and supersedes the R0–R6 phase structure in `RELIBC-COMPLETENESS-AND-ENHANCEMENT-PLAN.md`.
|
||||
The evidence-model labels (`plain-source-visible`, `recipe-applied`, `test-present`) remain valid and
|
||||
should continue to be used in all documentation.
|
||||
|
||||
## Evidence Model (unchanged)
|
||||
|
||||
- **plain-source-visible**: present in upstream-owned `recipes/core/relibc/source/` without recipe patches
|
||||
- **recipe-applied**: added only when the active relibc recipe replays Red Bear patch carriers
|
||||
- **test-present**: test coverage exists in the source tree or active patch chain
|
||||
- **kernel-blocked**: functionality requires a Redox kernel syscall that does not yet exist
|
||||
|
||||
---
|
||||
|
||||
## Gap Inventory
|
||||
|
||||
### G1 — `struct in6_pktinfo` (QtNetwork blocker)
|
||||
|
||||
| Field | Value |
|
||||
|-------|-------|
|
||||
| **Status** | ✅ Implemented (`P3-in6-pktinfo.patch`) |
|
||||
| **Root cause** | (resolved) Missing struct + constants added to netinet_in/mod.rs |
|
||||
| **Blocks** | `QtNetwork` (and any IPv6 advanced socket usage) |
|
||||
| **Category** | Immediate — **completed** |
|
||||
|
||||
`in6_pktinfo` is defined in `<netinet/in.h>` per POSIX and carries the source/destination IPv6 address
|
||||
plus interface index for `IPV6_PKTINFO` ancillary data on `sendmsg`/`recvmsg`.
|
||||
|
||||
Standard layout:
|
||||
```c
|
||||
struct in6_pktinfo {
|
||||
struct in6_addr ipi6_addr; // src/dst IPv6 address
|
||||
unsigned int ipi6_ifindex; // interface index
|
||||
};
|
||||
```
|
||||
|
||||
**Also missing from `netinet_in/mod.rs`**: `IPV6_PKTINFO` (socket option constant = 50),
|
||||
`IPV6_RECVPKTINFO` (49). `IPPROTO_IPV6` (41) already exists in relibc.
|
||||
|
||||
---
|
||||
|
||||
### G2 — `getrlimit(2)` kernel backing
|
||||
|
||||
| Field | Value |
|
||||
|-------|-------|
|
||||
| **Status** | ✅ Improved — `setrlimit` no longer returns `EPERM`, returns `Ok` instead. Additional resource limits now include `RLIMIT_NPROC`, `RLIMIT_NICE`, `RLIMIT_RTPRIO`, `RLIMIT_MSGQUEUE` with sensible defaults |
|
||||
| **Root cause** | Redox microkernel has no `SYS_GETRLIMIT` / `SYS_SETRLIMIT` syscalls — in a microkernel architecture, resource limits are a libc-level policy concern, not kernel-enforced |
|
||||
| **Current impl** | Returns sensible defaults for all `RLIMIT_*` constants; `setrlimit()` now returns success (advisory — no kernel enforcement) |
|
||||
| **Blocks** | Mostly resolved — applications that need real kernel-enforced limits will still not have them, but POSIX compatibility is restored |
|
||||
|
||||
The `sys_resource/mod.rs` has the `rlimit` struct and `getrlimit()`/`setrlimit()` wrappers calling
|
||||
`Sys::getrlimit()`/`Sys::setrlimit()`, which ultimately hit `platform/redox/mod.rs` lines 738–755
|
||||
with a `todo_skip!` on `setrlimit`.
|
||||
|
||||
**Required work**: Depends on kernel work (separate from relibc). When kernel gains RLIMIT syscalls,
|
||||
the `platform/redox/mod.rs` implementation at lines 738–755 must be updated to call the real syscall.
|
||||
|
||||
**Tracked in**: `local/docs/IRQ-AND-LOWLEVEL-CONTROLLERS-ENHANCEMENT-PLAN.md` as kernel-blocked.
|
||||
|
||||
---
|
||||
|
||||
### G3 — `timerfd` relative time support
|
||||
|
||||
| Field | Value |
|
||||
|-------|-------|
|
||||
| **Status** | `recipe-applied` — relative time conversion implemented via `P3-timerfd-relative.patch` |
|
||||
| **Current impl** | `P3-timerfd-relative.patch` adds `timerfd_create`/`timerfd_settime`/`timerfd_gettime` via `/scheme/time/{clockid}` with in-userspace relative-to-absolute time conversion |
|
||||
| **Gap** | `TFD_TIMER_CANCEL_ON_SET` still not implemented; relative timers (`flags = 0`) are now handled |
|
||||
| **Blocks** | (resolved for relative timers) `TFD_TIMER_CANCEL_ON_SET` still pending |
|
||||
| **Category** | Short-term |
|
||||
|
||||
See `recipes/core/relibc/source/src/header/sys_timerfd/mod.rs` and `local/patches/relibc/P3-timerfd-relative.patch`.
|
||||
|
||||
---
|
||||
|
||||
### G4 — `ifaddrs` live system discovery
|
||||
|
||||
| Field | Value |
|
||||
|-------|-------|
|
||||
| **Status** | `recipe-applied` — returns synthetic `loopback` + `eth0` only |
|
||||
| **Current impl** | `P3-ifaddrs-net_if.patch` patches `net_if/mod.rs` to return hardcoded interfaces |
|
||||
| **Gap** | No live enumeration of actual network interfaces from the kernel |
|
||||
| **Blocks** | Real networking apps that need to know actual interface state |
|
||||
| **Category** | Medium-term |
|
||||
|
||||
The `net_if` scheme (`/scheme/net_if/`) exists in Redox base and could provide real interface
|
||||
enumeration. The `ifaddrs` module (`src/header/ifaddrs/mod.rs`) currently just returns `ENOSYS`.
|
||||
|
||||
---
|
||||
|
||||
### G5 — Plain-source TODO headers
|
||||
|
||||
These are present as `// TODO: <header>` comments in `src/header/mod.rs`. Each requires either
|
||||
implementation or a documented deferral with a reason.
|
||||
|
||||
| Header | Location in mod.rs | Notes |
|
||||
|--------|--------------------|-------|
|
||||
| `mqueue.h` | line 55 | POSIX message queues |
|
||||
| `sys/msg.h` | line 98 | SysV message queues |
|
||||
| `spawn.h` | line 79 | `posix_spawn()` |
|
||||
| `threads.h` | line 132 | pthreads |
|
||||
| `wordexp.h` | line 146 | shell word expansion |
|
||||
| `iconv.h` | line 41 | character set conversion |
|
||||
| `sys/ipc.h` | line 96 | IPC shared definitions |
|
||||
| `sys/sem.h` | line 102 | SysV semaphores |
|
||||
| `sys/shm.h` | line 103 | SysV shared memory |
|
||||
|
||||
Note: `sys/ipc.h`, `sys/sem.h`, and `sys/shm.h` already have `recipe-applied` implementations via
|
||||
`P3-sysv-ipc.patch`, `P3-sysv-sem-impl.patch`, `P3-sysv-shm-impl.patch`. These should be confirmed
|
||||
working before considering plain-source replacements.
|
||||
|
||||
---
|
||||
|
||||
## Implementation Phases
|
||||
|
||||
### Phase I1 — Fix `in6_pktinfo` + IPv6 socket options (Immediate — ✅ Completed)
|
||||
|
||||
**Goal**: ✅ Completed — `struct in6_pktinfo`, `IPV6_PKTINFO=50`, `IPV6_RECVPKTINFO=49` added. See `P3-in6-pktinfo.patch`.
|
||||
|
||||
#### Step I1.1 — Add `struct in6_pktinfo` to `netinet_in/mod.rs`
|
||||
|
||||
File: `recipes/core/relibc/source/src/header/netinet_in/mod.rs`
|
||||
|
||||
Add after the `ipv6_mreq` struct (around line 55):
|
||||
|
||||
```rust
|
||||
/// See <https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/netinet_in.h.html>.
|
||||
#[repr(C)]
|
||||
pub struct in6_pktinfo {
|
||||
pub ipi6_addr: in6_addr,
|
||||
pub ipi6_ifindex: u32,
|
||||
}
|
||||
|
||||
impl Clone for in6_pktinfo {
|
||||
fn clone(&self) -> Self {
|
||||
Self {
|
||||
ipi6_addr: in6_addr { s6_addr: self.ipi6_addr.s6_addr },
|
||||
ipi6_ifindex: self.ipi6_ifindex,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Default for in6_pktinfo {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
ipi6_addr: in6_addr { s6_addr: [0; 16] },
|
||||
ipi6_ifindex: 0,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[unsafe(no_mangle)]
|
||||
pub extern "C" fn _cbindgen_export_in6_pktinfo(in6_pktinfo: in6_pktinfo) {}
|
||||
```
|
||||
|
||||
Note: `in6_addr` does not derive `Clone` or `Default`, so manual implementations are required.
|
||||
`#[derive(Debug, Clone, Default)]` would not compile.
|
||||
|
||||
#### Step I1.2 — Add IPv6 socket option constants to `netinet_in/mod.rs`
|
||||
|
||||
Add to `netinet_in/mod.rs` in the constants section (around line 108):
|
||||
|
||||
```rust
|
||||
/// See <https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/netinet_in.h.html>.
|
||||
pub const IPV6_UNICAST_HOPS: c_int = 16;
|
||||
/// See <https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/netinet_in.h.html>.
|
||||
pub const IPV6_MULTICAST_IF: c_int = 17;
|
||||
/// See <https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/netinet_in.h.html>.
|
||||
pub const IPV6_MULTICAST_HOPS: c_int = 18;
|
||||
/// See <https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/netinet_in.h.html>.
|
||||
pub const IPV6_MULTICAST_LOOP: c_int = 19;
|
||||
// ... existing multicast constants 20-21 ...
|
||||
/// See <https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/netinet_in.h.html>.
|
||||
pub const IPV6_V6ONLY: c_int = 26;
|
||||
/// Non-POSIX, see <https://www.man7.org/linux/man-pages/man7/ipv6.7.html>.
|
||||
pub const IPV6_PKTINFO: c_int = 50;
|
||||
/// Non-POSIX, see <https://www.man7.org/linux/man-pages/man7/ipv6.7.html>.
|
||||
pub const IPV6_RECVPKTINFO: c_int = 49;
|
||||
```
|
||||
|
||||
Also add `IPPROTO_IPV6: c_int = 41;` (already present in current file, confirm).
|
||||
|
||||
#### Step I1.3 — Update `netinet_in/cbindgen.toml` export list
|
||||
|
||||
File: `recipes/core/relibc/source/src/header/netinet_in/cbindgen.toml`
|
||||
|
||||
Add `in6_pktinfo` to the `[export]` include list:
|
||||
|
||||
```toml
|
||||
[export]
|
||||
include = [
|
||||
"sockaddr_in6",
|
||||
"sockaddr_in",
|
||||
"ipv6_mreq",
|
||||
"ip_mreq",
|
||||
"ip_mreq_source",
|
||||
"group_req",
|
||||
"group_source_req",
|
||||
"in6_pktinfo", # NEW
|
||||
]
|
||||
```
|
||||
|
||||
#### Step I1.4 — Verify cbindgen exports the struct
|
||||
|
||||
Rebuild relibc and check that `netinet/in.h` in the staging sysroot contains the `in6_pktinfo`
|
||||
struct definition. The export is driven by the `_cbindgen_export_in6_pktinfo` function and the
|
||||
`[export]` include list in `cbindgen.toml` — no manual C macro in the trailer is needed.
|
||||
|
||||
#### Step I1.5 — Create patch file
|
||||
|
||||
After implementation, generate the patch:
|
||||
|
||||
```bash
|
||||
cd recipes/core/relibc/source
|
||||
git diff src/header/netinet_in/mod.rs src/header/netinet_in/cbindgen.toml \
|
||||
> ../../../local/patches/relibc/P3-in6-pktinfo.patch
|
||||
```
|
||||
|
||||
And add to `recipes/core/relibc/recipe.toml` under `patches`:
|
||||
|
||||
```toml
|
||||
patches = [
|
||||
# ... existing patches ...
|
||||
"../../../local/patches/relibc/P3-in6-pktinfo.patch",
|
||||
]
|
||||
```
|
||||
|
||||
#### Step I1.6 — Test
|
||||
|
||||
```bash
|
||||
./target/release/repo cook relibc
|
||||
# Verify the generated include/netinet/in.h contains in6_pktinfo struct
|
||||
grep -r "in6_pktinfo" build/x86_64/redbear-full/staging/usr/include/netinet/ 2>/dev/null || \
|
||||
grep -r "in6_pktinfo" build/*/relibc*/stage/usr/include/netinet/ 2>/dev/null || \
|
||||
echo "Check build log for cbindgen output"
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### Phase I2 — `getrlimit`/`setrlimit` improvement (Short-term, ✅ Completed)
|
||||
|
||||
**Goal**: Replace `setrlimit` returning `EPERM` with a working advisory implementation. Add sensible defaults for more `RLIMIT_*` constants.
|
||||
|
||||
**Implementation**: Modified `platform/redox/mod.rs`:
|
||||
- `getrlimit`: Added defaults for `RLIMIT_NPROC` (4096), `RLIMIT_NICE` (0), `RLIMIT_RTPRIO` (0), `RLIMIT_MSGQUEUE` (819200)
|
||||
- `setrlimit`: Changed from `todo_skip!` + `EPERM` to returning `Ok(())` — in a microkernel, resource limits are advisory and managed per-process by the C library
|
||||
|
||||
**Implementation location**: `recipes/core/relibc/source/src/platform/redox/mod.rs` lines 738–755.
|
||||
|
||||
---
|
||||
|
||||
### Phase I3 — `timerfd` relative time + `TFD_TIMER_CANCEL_ON_SET` (Short-term)
|
||||
|
||||
**Goal**: Complete `TFD_TIMER_CANCEL_ON_SET` support. Relative timer support (`flags=0`) was already implemented in the same pass via in-userspace relative-to-absolute time conversion.
|
||||
|
||||
**Current implementation**: `P3-timerfd-relative.patch` patches `sys_timerfd/mod.rs` to call
|
||||
`/scheme/time/{clockid}`. Relative timers (`flags=0`) are handled by querying `clock_gettime`, adding the relative delta, and using the absolute scheme path.
|
||||
|
||||
**Gap detail**: `timerfd_settime(int fd, int flags, const struct itimerspec *new_value, struct itimerspec *old_value)`:
|
||||
- `flags = TFD_TIMER_ABSTIME`: `new_value->it_value` is absolute Unix time → works
|
||||
- `flags = 0` (relative): ✅ Implemented — converts relative to absolute in userspace
|
||||
- `TFD_TIMER_CANCEL_ON_SET`: cancel when clock reaches absolute time → NOT implemented
|
||||
|
||||
**Implementation approach**:
|
||||
- For relative timers (`flags = 0`): ✅ DONE — query `clock_gettime`, add relative delta, use absolute scheme path.
|
||||
- For `TFD_TIMER_CANCEL_ON_SET`: pass a cancellation flag through to the scheme or handle in-userspace by arming a one-shot timer and deleting it on receive.
|
||||
- Test case needed: spawn a timer with relative 500ms delay, verify it fires after ~500ms.
|
||||
|
||||
**Files to modify**: `recipes/core/relibc/source/src/header/sys_timerfd/mod.rs`
|
||||
**Patch to update**: `local/patches/relibc/P3-timerfd-relative.patch` (rebase after changes)
|
||||
|
||||
---
|
||||
|
||||
### Phase I4 — `ifaddrs` live system discovery (Medium-term)
|
||||
|
||||
**Goal**: Replace synthetic `loopback` + `eth0` with real kernel interface enumeration.
|
||||
|
||||
**Current state**: `P3-ifaddrs-net_if.patch` patches `net_if/mod.rs` to return hardcoded interfaces.
|
||||
|
||||
**Implementation approach**:
|
||||
1. Query `/scheme/net_if/list` to enumerate interfaces
|
||||
2. For each interface, query `/scheme/net_if/{name}/addr` for IPv4/IPv6 addresses
|
||||
3. Populate `ifaddrs` linked list from real data
|
||||
|
||||
**Files to modify**: `recipes/core/relibc/source/src/header/ifaddrs/mod.rs`,
|
||||
`recipes/core/relibc/source/src/header/net_if/mod.rs`
|
||||
**Existing patch**: `local/patches/relibc/P3-ifaddrs-net_if.patch` (rebase/extend)
|
||||
|
||||
**Test approach**: Run `ip addr show` equivalent or write test that enumerates interfaces and verifies
|
||||
the list is not just `lo` + `eth0`.
|
||||
|
||||
---
|
||||
|
||||
### Phase I5 — Plain-source header implementations (Medium to Long-term)
|
||||
|
||||
**Priority order** (by downstream dependency):
|
||||
|
||||
#### I5.1 — `sys/ipc.h`, `sys/sem.h`, `sys/shm.h` (Medium)
|
||||
|
||||
Already have `recipe-applied` implementations via P3 patches. Goal is to promote these to
|
||||
plain-source or confirm they are stable as-is. Check current patch quality:
|
||||
- `P3-sysv-ipc.patch`
|
||||
- `P3-sysv-sem-impl.patch`
|
||||
- `P3-sysv-shm-impl.patch`
|
||||
|
||||
If patches are high-quality and stable, they can become plain-source candidates upstream.
|
||||
If patches are fragile, improve the implementation.
|
||||
|
||||
**Verification**: Run existing IPC tests (`P3-ipc-tests.patch` provides test coverage).
|
||||
Confirm SysV sem/shm operations work correctly under load.
|
||||
|
||||
#### I5.2 — `mqueue.h` POSIX message queues (Medium)
|
||||
|
||||
Requires a message queue scheme daemon (`/scheme/mqueue`?) or implementation via existing primitives.
|
||||
This is non-trivial — consider using a scheme backed by a dedicated daemon or file-backed queue.
|
||||
|
||||
**Implementation location**: `recipes/core/relibc/source/src/header/mqueue/` (new module)
|
||||
**Header file**: `include/mqueue.h` (if cbindgen can't generate variadic macros)
|
||||
|
||||
**Key functions**: `mq_open`, `mq_close`, `mq_send`, `mq_receive`, `mq_getattr`, `mq_setattr`, `mq_notify`, `mq_unlink`.
|
||||
|
||||
#### I5.3 — `sys/msg.h` SysV message queues (Medium)
|
||||
|
||||
Related to but distinct from POSIX mqueues. SysV msg queues use `msgget`, `msgsnd`, `msgrcv`,
|
||||
`msgctl`. Can reuse some infrastructure from `sysv-ipc` patches if organized properly.
|
||||
|
||||
**Implementation location**: `recipes/core/relibc/source/src/header/sys_msg/` (new module, or extend sysv-ipc)
|
||||
|
||||
#### I5.4 — `spawn.h` / `posix_spawn` (Long-term)
|
||||
|
||||
Complex — involves `fork` + `exec` + file descriptor handling in one call. relibc already has `fork`
|
||||
and `exec` via `redox-rt`. `posix_spawn` would be a thin wrapper.
|
||||
|
||||
**Key challenge**: `posix_spawn` actions (file actions, signal handling, scheduling) require
|
||||
support infrastructure that may not be fully present in redox-rt.
|
||||
|
||||
#### I5.5 — `threads.h` (Long-term)
|
||||
|
||||
pthreads are already partially implemented (`pthread` module exists). `threads.h` is the C11
|
||||
threads API (`thrd_create`, `mtx_init`, `cnd_init`, etc.) layered on top of pthread.
|
||||
|
||||
**Current state**: `pthread` module is fairly complete. `threads.h` header is mostly a compatibility
|
||||
layer. Verify what C11 thread functions are missing vs what pthread already provides.
|
||||
|
||||
#### I5.6 — `wordexp.h` (Long-term)
|
||||
|
||||
Shell word expansion — parse shell-like `{var}`, `$(cmd)`, globs, quotes. Not urgently needed by
|
||||
current desktop consumers.
|
||||
|
||||
#### I5.7 — `iconv.h` (Long-term)
|
||||
|
||||
Character set conversion. A full implementation is substantial. Could leverage an existing iconv
|
||||
library (e.g., `libiconv`) or implement a subset.
|
||||
|
||||
---
|
||||
|
||||
## Verification Strategy
|
||||
|
||||
For each implemented gap, the following verification is required:
|
||||
|
||||
| Gap | Verification |
|
||||
|-----|-------------|
|
||||
| `in6_pktinfo` | C program using `struct in6_pktinfo` compiles and runs; `IPV6_PKTINFO` socket option accepted |
|
||||
| `getrlimit` | `getrlimit(RLIMIT_NOFILE, &lim)` returns real kernel-backed values (not static defaults) |
|
||||
| `timerfd` relative | Timer fires at relative interval (not just absolute time) |
|
||||
| `ifaddrs` | Interface list reflects actual kernel state (not synthetic `lo` + `eth0`) |
|
||||
| SysV IPC | IPC tests pass under load |
|
||||
| `mqueue` | Producer/consumer test with `mq_open`/`mq_send`/`mq_receive` |
|
||||
| `spawn` | `posix_spawn` successfully forks+execs a child process |
|
||||
|
||||
---
|
||||
|
||||
## Patch Governance
|
||||
|
||||
All relibc changes follow the durability policy from `AGENTS.md`:
|
||||
|
||||
1. Implement and test in `recipes/core/relibc/source/`
|
||||
2. Create patch in `local/patches/relibc/P<N>-<description>.patch`
|
||||
3. Add to `recipes/core/relibc/recipe.toml` under `patches`
|
||||
4. Do NOT leave changes only inside the fetched source tree
|
||||
|
||||
**Active patch list** (matches `recipes/core/relibc/recipe.toml`):
|
||||
```
|
||||
redox.patch # Base relibc redox adaptations
|
||||
P0-strtold-cpp-linkage-and-compat.patch
|
||||
P3-signalfd.patch # signalfd support
|
||||
P3-signalfd-header.patch
|
||||
P3-timerfd-relative.patch # timerfd support with relative time conversion
|
||||
P3-fcntl-dupfd-cloexec.patch # fcntl F_DUPFD_CLOEXEC
|
||||
P3-waitid.patch # waitid support
|
||||
P3-semaphore-fixes.patch # named + unnamed semaphore fixes
|
||||
P3-socket-cred.patch # SO_PEERCRED, getpeereid
|
||||
P3-elf64-types.patch
|
||||
P3-open-memstream.patch # open_memstream
|
||||
P3-ifaddrs-net_if.patch # ifaddrs (synthetic — see Phase I4)
|
||||
P3-fd-event-tests.patch # eventfd/signalfd/timerfd tests
|
||||
P3-netdb-lookup-retry-fix.patch # DNS lookup retry logic
|
||||
P3-exec-root-bypass.patch # exec permission bypass for root
|
||||
P3-tcp-nodelay.patch # TCP_NODELAY socket option
|
||||
P3-select-not-epoll-timeout.patch # select: non-epoll fallback timeout
|
||||
P3-tls-get-addr-panic-fix.patch
|
||||
P3-pthread-yield.patch
|
||||
P3-secure-getenv.patch
|
||||
P3-getentropy.patch
|
||||
P3-dup3.patch
|
||||
P3-vfork.patch
|
||||
P3-clock-nanosleep.patch
|
||||
P3-socket-flags.patch # MSG_NOSIGNAL, dup3
|
||||
P3-waitid-header.patch
|
||||
P3-inet6-pton-ntop.patch # inet_pton / inet_ntop for IPv6
|
||||
P3-tcp-sockopt-forward.patch # TCP socket options forwarding
|
||||
P3-dns-aaaa-getaddrinfo-ipv6.patch # AAAA record DNS resolution
|
||||
P3-getrlimit-getdtablesize.patch # getrlimit stub + getdtablesize
|
||||
P3-in6-pktinfo.patch # in6_pktinfo struct + IPV6_PKTINFO/IPV6_RECVPKTINFO
|
||||
```
|
||||
|
||||
**Historical patches** (not currently active, kept for reference):
|
||||
- `P3-sysv-ipc.patch` — SysV IPC base
|
||||
- `P3-sysv-sem-impl.patch` — SysV semaphores
|
||||
- `P3-sysv-shm-impl.patch` — SysV shared memory
|
||||
- `P3-aio.patch` — asynchronous I/O
|
||||
|
||||
---
|
||||
|
||||
## Relationship to Other Subsystem Plans
|
||||
|
||||
- `in6_pktinfo` unblocks QtNetwork → unblocks KF6 network modules → unblocks full KDE Plasma
|
||||
- `getrlimit` kernel backing depends on `local/docs/IRQ-AND-LOWLEVEL-CONTROLLERS-ENHANCEMENT-PLAN.md`
|
||||
- `timerfd` relative support is part of POSIX.1e timer completeness (related to mqueue)
|
||||
- `ifaddrs` live discovery enables proper network configuration tooling
|
||||
|
||||
---
|
||||
|
||||
## Non-goals (Explicitly Deferred)
|
||||
|
||||
- Kernel credential syscalls (`setuid`, `getuid`, `setgroups`, `getgroups`) — kernel work required,
|
||||
tracked separately
|
||||
- Full POSIX.1e ACL interfaces — deferred until filesystem maturity warrants it
|
||||
- `libpthread` threading backend redesign — current pthread implementation is sufficient for current consumers
|
||||
@@ -26,13 +26,13 @@ Do not collapse those into one generic "implemented" label.
|
||||
|---|---|---|---|
|
||||
| `shm_open()` / `shm_unlink()` | yes | yes | provided through `sys_mman` in the live source tree |
|
||||
| named POSIX semaphores | no | yes | added by `P3-semaphore-fixes.patch` on top of `shm_open()` / `mmap()` |
|
||||
| `eventfd` | no | yes | added by `P3-eventfd.patch` through `/scheme/event/eventfd/...` |
|
||||
| `eventfd` | no | yes | added by `P3-eventfd-mod.patch` through `/scheme/event/eventfd/...` |
|
||||
| `signalfd` | no | yes | added by `P3-signalfd.patch` through `/scheme/event` plus signal-mask handling |
|
||||
| `timerfd` | no | yes | added by `P3-timerfd.patch` through `/scheme/time/{clockid}` |
|
||||
| `timerfd` | no | yes | added by `P3-timerfd-relative.patch` through `/scheme/time/{clockid}` |
|
||||
| `waitid()` | no | yes | added by `P3-waitid.patch` |
|
||||
| `ifaddrs` / `net_if` support used by IPC-adjacent consumers | no | yes | added by `P3-ifaddrs-net_if.patch`; currently synthetic |
|
||||
| SysV shm (`sys/shm.h`) | no | no | bounded carriers exist locally, but they are not part of the active concrete-wave recipe surface |
|
||||
| SysV sem (`sys/sem.h`) | no | no | bounded carriers exist locally, but they are not part of the active concrete-wave recipe surface |
|
||||
| SysV shm (`sys/shm.h`) | no | yes | activated via `P3-sysv-shm-impl.patch` in recipe (2026-04-29) |
|
||||
| SysV sem (`sys/sem.h`) | no | yes | activated via `P3-sysv-sem-impl.patch` in recipe (2026-04-29) |
|
||||
| POSIX message queues (`mqueue.h`) | no | no | still TODO in the live source tree |
|
||||
| SysV message queues (`sys/msg.h`) | no | no | still TODO in the live source tree |
|
||||
|
||||
@@ -59,9 +59,7 @@ consumer/runtime proof is recorded.
|
||||
|
||||
### Deferred SysV shm/sem work
|
||||
|
||||
Bounded SysV shm/sem carriers still exist under `local/patches/relibc/`, but they were not wired
|
||||
into the active concrete-wave recipe surface implemented in this pass. They should therefore be
|
||||
treated as deferred follow-up work, not as active build behavior.
|
||||
SysV shm/sem carriers were activated in recipe (2026-04-29). Message queues remain deferred follow-up work.
|
||||
|
||||
### Interface enumeration used by networking-adjacent consumers
|
||||
|
||||
@@ -110,8 +108,7 @@ This pass revalidated the active concrete-wave IPC-facing surface through the re
|
||||
- `semaphore/unnamed`
|
||||
|
||||
These are bounded relibc-target proofs. They improve confidence in the active fd-event and named
|
||||
semaphore surface, but they do not change the deferred status of broader SysV shm/sem or message
|
||||
queues.
|
||||
semaphore surface. SysV shm/sem are now active in the recipe (2026-04-29); message queues remain deferred.
|
||||
|
||||
## Improvement plan
|
||||
|
||||
|
||||
@@ -263,9 +263,6 @@ Packaged validators (inside target runtime):
|
||||
|
||||
## Related Documents
|
||||
|
||||
- `local/docs/WIFI-VALIDATION-RUNBOOK.md` — canonical operator runbook for bare-metal and VFIO validation
|
||||
- `local/docs/WIFI-VALIDATION-ISSUE-TEMPLATE.md` — issue template for validation failures
|
||||
- `local/docs/WIFICTL-SCHEME-REFERENCE.md` — `/scheme/wifictl` protocol reference
|
||||
- `docs/04-LINUX-DRIVER-COMPAT.md` — linux-kpi and redox-driver-sys architecture
|
||||
|
||||
## Summary
|
||||
|
||||
@@ -1,78 +0,0 @@
|
||||
# Wi‑Fi Validation Issue Template
|
||||
|
||||
Use this template after the first real bare-metal or VFIO-backed Intel Wi‑Fi validation run.
|
||||
|
||||
## Environment
|
||||
|
||||
- Run type: bare metal / VFIO-backed guest
|
||||
- Host PCI BDF (if VFIO):
|
||||
- Expected host driver before VFIO (if applicable):
|
||||
- Red Bear profile: `wifi-open-bounded` / `wifi-dhcp` / other
|
||||
- Interface: `wlan0` / other
|
||||
- Intel device model:
|
||||
|
||||
## Commands Used
|
||||
|
||||
List the exact command(s) you ran, for example:
|
||||
|
||||
```bash
|
||||
redbear-phase5-wifi-run wifi-open-bounded wlan0 /tmp/redbear-phase5-wifi-capture.json
|
||||
```
|
||||
|
||||
or
|
||||
|
||||
```bash
|
||||
./local/scripts/run-wifi-passthrough-validation.sh --host-pci 0000:xx:yy.z --host-driver iwlwifi --artifact-dir ./wifi-validation-YYYYMMDD-HHMMSS
|
||||
```
|
||||
|
||||
## Expected Outcome
|
||||
|
||||
Describe what you expected to happen.
|
||||
|
||||
## Actual Outcome
|
||||
|
||||
Describe what actually happened.
|
||||
|
||||
## Artifact Paths
|
||||
|
||||
- Capture JSON:
|
||||
- Metadata JSON (if VFIO):
|
||||
- Packaged tarball (if created):
|
||||
- Serial log:
|
||||
- Console log:
|
||||
|
||||
## Analyzer Output
|
||||
|
||||
Paste the output of:
|
||||
|
||||
```bash
|
||||
redbear-phase5-wifi-analyze <capture.json>
|
||||
```
|
||||
|
||||
## Key Signals
|
||||
|
||||
- `driver_probe` result:
|
||||
- `driver_status` result:
|
||||
- `wifictl_probe` result:
|
||||
- `wifictl_status` result:
|
||||
- `netctl_status` result:
|
||||
- `wifi_connect_result`:
|
||||
- `wifi_disconnect_result`:
|
||||
- `last_error`:
|
||||
|
||||
## Suspected Blocker Class
|
||||
|
||||
One or more of:
|
||||
|
||||
- device-detection
|
||||
- firmware
|
||||
- association-control-path
|
||||
- disconnect-lifecycle
|
||||
- dhcp-or-addressing
|
||||
- reporting-surface
|
||||
- runtime-failure
|
||||
- bounded-lifecycle-pass-no-real-link-proof
|
||||
|
||||
## Notes
|
||||
|
||||
Anything else that seems relevant for reproducing or narrowing the issue.
|
||||
@@ -1,219 +0,0 @@
|
||||
# Red Bear OS Wi‑Fi Validation Runbook
|
||||
|
||||
This runbook is the canonical operator path for exercising the current bounded Intel Wi‑Fi stack on
|
||||
either a real Red Bear OS target or a VFIO-backed Red Bear guest.
|
||||
|
||||
It does **not** claim that Wi‑Fi is fully solved. Its job is to make the remaining hardware/runtime
|
||||
validation step reproducible and evidence-oriented.
|
||||
|
||||
## Goal
|
||||
|
||||
Produce one or both of the following from a real target execution:
|
||||
|
||||
- a successful bounded Wi‑Fi lifecycle run (`redbear-phase5-wifi-check`)
|
||||
- a structured evidence bundle (`redbear-phase5-wifi-capture`) for debugging real failures
|
||||
|
||||
## Path A — Bare Metal Runtime Validation
|
||||
|
||||
Use this when Red Bear OS is booted on a real machine with a supported Intel Wi‑Fi device.
|
||||
|
||||
### In target runtime
|
||||
|
||||
For an interactive operator path before or alongside the packaged checkers, the new console client is:
|
||||
|
||||
```bash
|
||||
redbear-netctl-console
|
||||
```
|
||||
|
||||
It is a Redox-native **ncurses** terminal client, and it uses the same bounded `/scheme/wifictl`
|
||||
and `/etc/netctl` surfaces as the scripted/operator flows.
|
||||
|
||||
```bash
|
||||
redbear-phase5-wifi-run wifi-open-bounded wlan0 /tmp/redbear-phase5-wifi-capture.json
|
||||
test-wifi-baremetal-runtime.sh
|
||||
```
|
||||
|
||||
### Artifacts to preserve
|
||||
|
||||
- `/tmp/redbear-phase5-wifi-capture.json`
|
||||
- terminal output from `redbear-phase5-wifi-check`
|
||||
- terminal output from `test-wifi-baremetal-runtime.sh`
|
||||
- any serial console log captured during the run
|
||||
|
||||
Recommended host-side naming after copying artifacts off the target:
|
||||
|
||||
- `wifi-baremetal-capture.json`
|
||||
- `wifi-baremetal-serial.log`
|
||||
- `wifi-baremetal-console.log`
|
||||
|
||||
Recommended staging pattern on the host:
|
||||
|
||||
```bash
|
||||
run_dir=./wifi-baremetal-$(date +%Y%m%d-%H%M%S)
|
||||
mkdir -p "$run_dir"
|
||||
# copy the capture/log files into that directory
|
||||
./local/scripts/package-wifi-validation-artifacts.sh \
|
||||
"${run_dir}.tar.gz" \
|
||||
"$run_dir"
|
||||
```
|
||||
|
||||
Optional packaging step on the host:
|
||||
|
||||
```bash
|
||||
./local/scripts/package-wifi-validation-artifacts.sh
|
||||
```
|
||||
|
||||
The resulting tarball now includes a small manifest file with the packaged paths and file checksums
|
||||
for regular files when `sha256sum` is available on the host.
|
||||
|
||||
Optional summary step on the host:
|
||||
|
||||
```bash
|
||||
./local/scripts/summarize-wifi-validation-artifacts.sh ./wifi-baremetal-capture.json
|
||||
# or
|
||||
./local/scripts/summarize-wifi-validation-artifacts.sh ./wifi-validation-artifacts.tar.gz
|
||||
# or use the packaged analyzer directly on the captured JSON
|
||||
redbear-phase5-wifi-analyze ./wifi-baremetal-capture.json
|
||||
```
|
||||
|
||||
Optional one-shot post-run step on the host:
|
||||
|
||||
```bash
|
||||
./local/scripts/finalize-wifi-validation-run.sh \
|
||||
./wifi-baremetal-capture.json \
|
||||
./wifi-validation-artifacts.tar.gz \
|
||||
./wifi-baremetal-serial.log \
|
||||
./wifi-baremetal-console.log
|
||||
```
|
||||
|
||||
## Path B — VFIO/QEMU Validation
|
||||
|
||||
Use this when a host can safely detach an Intel Wi‑Fi PCI function and pass it through to a Red Bear
|
||||
guest.
|
||||
|
||||
### On the host
|
||||
|
||||
First, validate the host prerequisites:
|
||||
|
||||
```bash
|
||||
sudo ./local/scripts/validate-wifi-vfio-host.sh \
|
||||
--host-pci 0000:xx:yy.z \
|
||||
--expect-driver iwlwifi
|
||||
```
|
||||
|
||||
This preflight now exits non-zero when blockers are found, so it is safe to use as an automation
|
||||
gate before attempting VFIO passthrough validation.
|
||||
|
||||
Then run the full passthrough validation wrapper:
|
||||
|
||||
```bash
|
||||
sudo ./local/scripts/run-wifi-passthrough-validation.sh \
|
||||
--host-pci 0000:xx:yy.z \
|
||||
--host-driver iwlwifi \
|
||||
--artifact-dir ./wifi-validation-$(date +%Y%m%d-%H%M%S)
|
||||
```
|
||||
|
||||
Default output artifacts from that wrapper:
|
||||
|
||||
- `./wifi-passthrough-capture.json`
|
||||
- `./wifi-passthrough-capture.json.meta.json`
|
||||
|
||||
If `--artifact-dir` is provided, those files are written into that directory instead.
|
||||
|
||||
Recommended packaging step afterwards:
|
||||
|
||||
```bash
|
||||
./local/scripts/package-wifi-validation-artifacts.sh \
|
||||
./wifi-passthrough-artifacts.tar.gz \
|
||||
./wifi-validation-YYYYMMDD-HHMMSS
|
||||
```
|
||||
|
||||
That tarball also includes the manifest/checksum file described above.
|
||||
|
||||
Optional summary step afterwards:
|
||||
|
||||
```bash
|
||||
./local/scripts/summarize-wifi-validation-artifacts.sh ./wifi-passthrough-artifacts.tar.gz
|
||||
# or
|
||||
redbear-phase5-wifi-analyze ./wifi-passthrough-capture.json
|
||||
```
|
||||
|
||||
Optional one-shot post-run step afterwards:
|
||||
|
||||
```bash
|
||||
./local/scripts/finalize-wifi-validation-run.sh \
|
||||
./wifi-passthrough-capture.json \
|
||||
./wifi-passthrough-artifacts.tar.gz \
|
||||
./wifi-passthrough-capture.json.meta.json
|
||||
```
|
||||
|
||||
For structured follow-up after a failed run, use:
|
||||
|
||||
- `local/docs/WIFI-VALIDATION-ISSUE-TEMPLATE.md`
|
||||
|
||||
You can override those paths explicitly if needed:
|
||||
|
||||
```bash
|
||||
sudo ./local/scripts/run-wifi-passthrough-validation.sh \
|
||||
--host-pci 0000:xx:yy.z \
|
||||
--host-driver iwlwifi \
|
||||
--capture-output ./wifi-passthrough-capture.json \
|
||||
--metadata-output ./wifi-passthrough-capture.meta.json
|
||||
```
|
||||
|
||||
The wrapper handles:
|
||||
|
||||
1. binding the selected device to `vfio-pci`
|
||||
2. launching the Red Bear guest passthrough harness
|
||||
3. running `redbear-phase5-network-check` and `redbear-phase5-wifi-run` inside the guest
|
||||
4. collecting the packaged Wi‑Fi capture bundle back to the host
|
||||
5. writing a host-side metadata sidecar for the run
|
||||
6. restoring the host driver afterwards
|
||||
|
||||
`redbear-phase5-network-check` in that flow is the bounded `redbear-full` desktop/network plumbing
|
||||
proof. It should not be read as closing the Wi‑Fi implementation plan's later Phase W5
|
||||
runtime-reporting-and-recovery milestone by itself.
|
||||
|
||||
### Artifact to preserve
|
||||
|
||||
- `./wifi-passthrough-capture.json`
|
||||
- `./wifi-passthrough-capture.meta.json`
|
||||
- full terminal log from the wrapper invocation
|
||||
|
||||
Optional packaging step on the host:
|
||||
|
||||
```bash
|
||||
./local/scripts/package-wifi-validation-artifacts.sh
|
||||
```
|
||||
|
||||
## Minimum Evidence for a Real Runtime Attempt
|
||||
|
||||
At minimum, keep all of the following together:
|
||||
|
||||
- the capture JSON bundle
|
||||
- the console output of the checker/wrapper
|
||||
- the exact PCI BDF used for the Intel Wi‑Fi device
|
||||
- whether the run was bare metal or VFIO/QEMU
|
||||
|
||||
## What Success Means Today
|
||||
|
||||
Current success is still **bounded** success:
|
||||
|
||||
- the Intel driver/runtime lifecycle can be exercised on a real target
|
||||
- the Wi‑Fi control/profile/reporting stack can observe that lifecycle, including honest bounded
|
||||
pending/associating connect state when real association is not yet proven
|
||||
- the default bounded validation profile is `wifi-open-bounded`, which intentionally avoids turning
|
||||
DHCP handoff into a false requirement for lifecycle-only validation
|
||||
- the packaged runtime checker currently proves that bounded open-profile path by default; WPA2-PSK
|
||||
is implemented and covered by host/unit-level regressions, but is not yet the default packaged
|
||||
runtime validation path
|
||||
- a structured evidence bundle is captured for debugging
|
||||
|
||||
This is **not yet** the same as:
|
||||
|
||||
- real AP scan/association proof
|
||||
- real packet/data-path proof
|
||||
- DHCP success over a true wireless link
|
||||
- validated end-to-end Wi‑Fi connectivity
|
||||
|
||||
Those remain the next debugging targets after the first real target execution.
|
||||
@@ -1,77 +0,0 @@
|
||||
# `wifictl:` Scheme Reference
|
||||
|
||||
This document describes the current bounded `/scheme/wifictl` surface exposed by
|
||||
`redbear-wifictl`.
|
||||
|
||||
It is a reference for validation and debugging of the current Intel Wi‑Fi slice. It does **not**
|
||||
imply that Wi‑Fi connectivity is fully supported.
|
||||
|
||||
## Root Layout
|
||||
|
||||
Top-level entries:
|
||||
|
||||
- `wifictl:/ifaces`
|
||||
- `wifictl:/capabilities`
|
||||
|
||||
## Per-interface entries
|
||||
|
||||
For each interface under `wifictl:/ifaces/<iface>/`, the scheme currently exposes:
|
||||
|
||||
### Read-only status/state nodes
|
||||
|
||||
- `status`
|
||||
- `link-state`
|
||||
- `firmware-status`
|
||||
- `transport-status`
|
||||
- `transport-init-status`
|
||||
- `activation-status`
|
||||
- `connect-result`
|
||||
- `disconnect-result`
|
||||
- `scan-results`
|
||||
- `last-error`
|
||||
|
||||
### Read/write profile/config nodes
|
||||
|
||||
- `ssid`
|
||||
- `security`
|
||||
- `key`
|
||||
|
||||
### Write-triggered control nodes
|
||||
|
||||
- `scan`
|
||||
- `prepare`
|
||||
- `transport-probe`
|
||||
- `init-transport`
|
||||
- `activate-nic`
|
||||
- `connect`
|
||||
- `disconnect`
|
||||
- `retry`
|
||||
|
||||
## Current bounded lifecycle
|
||||
|
||||
The bounded Intel path currently treats the Wi‑Fi lifecycle as:
|
||||
|
||||
1. `prepare`
|
||||
2. `transport-probe`
|
||||
3. `init-transport`
|
||||
4. `activate-nic`
|
||||
5. `connect`
|
||||
6. `disconnect`
|
||||
7. `retry`
|
||||
|
||||
The scheme records the last reported bounded connect/disconnect metadata in `connect-result` and
|
||||
`disconnect-result`.
|
||||
|
||||
## Interpretation guidance
|
||||
|
||||
- Presence of the scheme means the control surface exists, not that a real Wi‑Fi link is proven.
|
||||
- `connect-result` and `disconnect-result` are lifecycle evidence surfaces, not proof of real AP
|
||||
authentication or real packet flow.
|
||||
- `scan-results` may reflect bounded or synthetic runtime outcomes unless and until hardware-backed
|
||||
scan evidence is captured on a real target.
|
||||
|
||||
## Related documents
|
||||
|
||||
- `local/docs/WIFI-IMPLEMENTATION-PLAN.md`
|
||||
- `local/docs/WIFI-VALIDATION-RUNBOOK.md`
|
||||
- `local/docs/SCRIPT-BEHAVIOR-MATRIX.md`
|
||||
@@ -1,68 +0,0 @@
|
||||
# Red Bear OS WIP Migration Ledger
|
||||
|
||||
## Purpose
|
||||
|
||||
This ledger records how Red Bear treats upstream WIP areas under the overlay policy.
|
||||
|
||||
The goal is to keep one compact, current view of whether a major WIP subsystem is:
|
||||
|
||||
- still consumed mainly from upstream WIP,
|
||||
- mirrored locally and shipped from the Red Bear overlay,
|
||||
- or mature enough upstream that Red Bear should prefer the upstream version.
|
||||
|
||||
This is a repo-governance document, not a subsystem deep dive.
|
||||
|
||||
## Status Labels
|
||||
|
||||
- **upstream-wip-input** — upstream WIP still exists and is useful as an input/reference, but Red Bear
|
||||
does not treat it as the durable shipping source of truth
|
||||
- **local-overlay-owner** — Red Bear currently owns the shipping/integration burden locally
|
||||
- **mixed-transition** — both upstream WIP and local overlay matter; Red Bear is still evaluating what
|
||||
to keep locally versus what to prefer upstream
|
||||
- **prefer-upstream** — upstream is now first-class enough that Red Bear should default to upstream and
|
||||
keep only a narrow local integration delta if still needed
|
||||
|
||||
## Current Ledger
|
||||
|
||||
| Area | Current status | Current preferred shipping source | Notes |
|
||||
|---|---|---|---|
|
||||
| Qt6 base stack (`qtbase`, `qtdeclarative`, `qtsvg`, `qtwayland`) | **mixed-transition** | local overlay + upstream WIP inputs | Upstream WIP remains useful input, but Red Bear still carries recipe/integration fixes and validation locally. |
|
||||
| KDE Frameworks / Plasma / KWin | **local-overlay-owner** | local overlay | Current KDE/Plasma recipe tree under `local/recipes/kde/` is the practical shipping source for Red Bear. |
|
||||
| Wayland compositor/session stack | **mixed-transition** | local overlay for shipping decisions | Upstream WIP recipes remain inputs, but runtime-trusted Red Bear delivery still depends on local validation and local recipe ownership where needed. |
|
||||
| `libinput` / desktop input userland | **mixed-transition** | local decision pending | Upstream WIP recipe exists, but Red Bear still treats this as a local validation and integration concern rather than a trusted upstream shipping surface. |
|
||||
| `seatd` runtime path | **mixed-transition** | recipe-level decision still local | It builds and is integrated into KDE-facing configs, but runtime trust still trails the packaging story. |
|
||||
| `redox-driver-sys` | **local-overlay-owner** | local overlay | Red Bear-owned driver substrate. |
|
||||
| `linux-kpi` | **local-overlay-owner** | local overlay | Red Bear-owned compatibility layer. |
|
||||
| `redbear-iwlwifi` | **local-overlay-owner** | local overlay | Bounded Intel Wi-Fi driver-side package below the native Red Bear Wi-Fi control plane; current scope is probe, status, firmware prepare, transport probe/init, NIC activation, bounded scan/connect/disconnect lifecycle, and retry. |
|
||||
| `redox-drm` / `amdgpu` | **local-overlay-owner** | local overlay | Red Bear-owned graphics/driver work. |
|
||||
| `firmware-loader` | **local-overlay-owner** | local overlay | Red Bear-owned runtime infrastructure. |
|
||||
| relibc compatibility overlays | **mixed-transition** | upstream + local overlay | Prefer upstream where available; keep only the overlays that still prove necessary after fresh-source reapply and downstream rebuild. |
|
||||
|
||||
## Decision Rules
|
||||
|
||||
### When to stay local
|
||||
|
||||
Stay local when one or more of the following is true:
|
||||
|
||||
- upstream still marks the recipe/subsystem WIP,
|
||||
- Red Bear still needs local fixes to build or ship it,
|
||||
- Red Bear is carrying the validation burden that upstream has not yet established,
|
||||
- the local version is the only version that currently integrates correctly with tracked Red Bear profiles.
|
||||
|
||||
### When to move back toward upstream
|
||||
|
||||
Prefer upstream when all of the following become true:
|
||||
|
||||
- upstream no longer treats the area as WIP,
|
||||
- upstream solves the same problem adequately,
|
||||
- refreshed upstream source + minimal Red Bear integration still rebuilds the affected profiles,
|
||||
- keeping the local overlay would no longer provide unique value.
|
||||
|
||||
## Review Trigger
|
||||
|
||||
Reevaluate an entry in this ledger whenever:
|
||||
|
||||
- upstream removes WIP status from the recipe/subsystem,
|
||||
- Red Bear finishes a fresh-source reapply + rebuild proof,
|
||||
- a local overlay shrinks substantially because upstream caught up,
|
||||
- or the shipping profile set starts depending on a WIP area more heavily than before.
|
||||
@@ -1,5 +1,6 @@
|
||||
diff -uNr wayland-1.24.0/meson.build source/meson.build
|
||||
--- clean-wayland/meson.build 2025-07-06 13:11:26.000000000 +0100
|
||||
+++ patched-wayland/meson.build 2026-04-28 12:23:06.295526487 +0100
|
||||
+++ patched-wayland/meson.build 2026-04-29 18:06:17.250269176 +0100
|
||||
@@ -80,8 +80,8 @@
|
||||
ffi_dep = dependency('libffi')
|
||||
|
||||
@@ -11,21 +12,31 @@
|
||||
{ 'header': 'time.h', 'symbol': 'CLOCK_MONOTONIC' },
|
||||
]
|
||||
|
||||
--- clean-wayland/src/meson.build 2025-07-06 13:11:26.000000000 +0100
|
||||
+++ patched-wayland/src/meson.build 2026-04-28 12:23:06.295602980 +0100
|
||||
@@ -81,8 +81,7 @@
|
||||
endif
|
||||
diff -uNr wayland-1.24.0/src/connection.c source/src/connection.c
|
||||
--- clean-wayland/src/connection.c 2025-07-06 13:11:26.000000000 +0100
|
||||
+++ patched-wayland/src/connection.c 2026-04-29 18:06:00.540467363 +0100
|
||||
@@ -40,6 +40,17 @@
|
||||
#include <time.h>
|
||||
#include <ffi.h>
|
||||
|
||||
if meson.is_cross_build() or not get_option('scanner')
|
||||
- scanner_dep = dependency('wayland-scanner', native: true, version: meson.project_version())
|
||||
- wayland_scanner_for_build = find_program(scanner_dep.get_variable(pkgconfig: 'wayland_scanner'))
|
||||
+wayland_scanner_for_build = find_program('wayland-scanner', native: true)
|
||||
else
|
||||
wayland_scanner_for_build = wayland_scanner
|
||||
endif
|
||||
+#ifndef MSG_NOSIGNAL
|
||||
+#define MSG_NOSIGNAL 0
|
||||
+#endif
|
||||
+#include <stdio.h>
|
||||
+#include <stdlib.h>
|
||||
+#ifndef _RELIBC_STDIO_H
|
||||
+static FILE *open_memstream(char **bufp, size_t *sizep) {
|
||||
+ *bufp = NULL; *sizep = 0; return NULL;
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
#include "wayland-util.h"
|
||||
#include "wayland-private.h"
|
||||
#include "wayland-os.h"
|
||||
diff -uNr wayland-1.24.0/src/event-loop.c source/src/event-loop.c
|
||||
--- clean-wayland/src/event-loop.c 2025-07-06 13:11:26.000000000 +0100
|
||||
+++ patched-wayland/src/event-loop.c 2026-04-28 12:24:35.434111143 +0100
|
||||
@@ -35,9 +35,56 @@
|
||||
+++ patched-wayland/src/event-loop.c 2026-04-29 18:05:40.684702870 +0100
|
||||
@@ -35,9 +35,58 @@
|
||||
#include <sys/socket.h>
|
||||
#include <sys/un.h>
|
||||
#include <sys/epoll.h>
|
||||
@@ -51,7 +62,9 @@
|
||||
+#define TFD_TIMER_ABSTIME 0x1
|
||||
+#endif
|
||||
+
|
||||
+#ifndef _RELIBC_SIGNAL_H
|
||||
+struct signalfd_siginfo { uint8_t pad[128]; };
|
||||
+#endif
|
||||
+static int signalfd_impl(int fd, const sigset_t *mask, uintptr_t masksize, int flags) {
|
||||
+ int oflag = O_RDWR;
|
||||
+ if (flags & SFD_CLOEXEC) oflag |= O_CLOEXEC;
|
||||
@@ -84,26 +97,22 @@
|
||||
#include "timespec-util.h"
|
||||
#include "wayland-util.h"
|
||||
#include "wayland-private.h"
|
||||
--- clean-wayland/src/connection.c 2025-07-06 13:11:26.000000000 +0100
|
||||
+++ patched-wayland/src/connection.c 2026-04-28 12:23:06.295797924 +0100
|
||||
@@ -40,6 +40,15 @@
|
||||
#include <time.h>
|
||||
#include <ffi.h>
|
||||
diff -uNr wayland-1.24.0/src/meson.build source/src/meson.build
|
||||
--- clean-wayland/src/meson.build 2025-07-06 13:11:26.000000000 +0100
|
||||
+++ patched-wayland/src/meson.build 2026-04-29 18:06:30.380113462 +0100
|
||||
@@ -81,8 +81,7 @@
|
||||
endif
|
||||
|
||||
+#ifndef MSG_NOSIGNAL
|
||||
+#define MSG_NOSIGNAL 0
|
||||
+#endif
|
||||
+#include <stdio.h>
|
||||
+#include <stdlib.h>
|
||||
+static FILE *open_memstream(char **bufp, size_t *sizep) {
|
||||
+ *bufp = NULL; *sizep = 0; return NULL;
|
||||
+}
|
||||
+
|
||||
#include "wayland-util.h"
|
||||
#include "wayland-private.h"
|
||||
#include "wayland-os.h"
|
||||
if meson.is_cross_build() or not get_option('scanner')
|
||||
- scanner_dep = dependency('wayland-scanner', native: true, version: meson.project_version())
|
||||
- wayland_scanner_for_build = find_program(scanner_dep.get_variable(pkgconfig: 'wayland_scanner'))
|
||||
+wayland_scanner_for_build = find_program('wayland-scanner', native: true)
|
||||
else
|
||||
wayland_scanner_for_build = wayland_scanner
|
||||
endif
|
||||
diff -uNr wayland-1.24.0/src/wayland-server.c source/src/wayland-server.c
|
||||
--- clean-wayland/src/wayland-server.c 2025-07-06 13:11:26.000000000 +0100
|
||||
+++ patched-wayland/src/wayland-server.c 2026-04-28 12:23:06.295982588 +0100
|
||||
+++ patched-wayland/src/wayland-server.c 2026-04-29 18:06:46.390923573 +0100
|
||||
@@ -39,7 +39,24 @@
|
||||
#include <dlfcn.h>
|
||||
#include <sys/time.h>
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
diff -ruwN source-old/src/CMakeLists.txt source/src/CMakeLists.txt
|
||||
--- source-old/src/CMakeLists.txt 2024-12-02 05:39:06.000000000 +0000
|
||||
+++ source/src/CMakeLists.txt 2026-04-30 00:00:00.000000000 +0000
|
||||
@@ -54,5 +54,5 @@
|
||||
endif()
|
||||
if (QT_FEATURE_network)
|
||||
- # add_subdirectory(network) # disabled for Redox
|
||||
+ add_subdirectory(network)
|
||||
if (ANDROID)
|
||||
add_subdirectory(network/android/jar)
|
||||
endif()
|
||||
diff -ruwN source-old/src/plugins/generic/CMakeLists.txt source/src/plugins/generic/CMakeLists.txt
|
||||
--- source-old/src/plugins/generic/CMakeLists.txt 2024-12-02 05:39:06.000000000 +0000
|
||||
+++ source/src/plugins/generic/CMakeLists.txt 2026-04-30 00:00:00.000000000 +0000
|
||||
@@ -18,6 +18,6 @@
|
||||
add_subdirectory(tslib)
|
||||
endif()
|
||||
if(QT_FEATURE_tuiotouch)
|
||||
- # add_subdirectory(tuiotouch) # disabled for Redox (needs Network)
|
||||
+ add_subdirectory(tuiotouch)
|
||||
endif()
|
||||
if(QT_FEATURE_libinput)
|
||||
add_subdirectory(libinput)
|
||||
@@ -0,0 +1,722 @@
|
||||
diff --git a/src/header/netdb/dns/mod.rs b/src/header/netdb/dns/mod.rs
|
||||
index 9d7e44b..f5bc21b 100644
|
||||
--- a/src/header/netdb/dns/mod.rs
|
||||
+++ b/src/header/netdb/dns/mod.rs
|
||||
@@ -15,6 +15,35 @@ use alloc::{string::String, vec::Vec};
|
||||
mod answer;
|
||||
mod query;
|
||||
|
||||
+const DNS_FLAG_QR: u16 = 0x8000;
|
||||
+const DNS_FLAG_TC: u16 = 0x0200;
|
||||
+const DNS_RCODE_MASK: u16 = 0x000F;
|
||||
+
|
||||
+#[derive(Clone, Copy, Debug, Eq, PartialEq)]
|
||||
+pub(super) enum DnsError {
|
||||
+ MalformedResponse,
|
||||
+ TransactionIdMismatch,
|
||||
+ NotResponse,
|
||||
+ Truncated,
|
||||
+ ServerFailure,
|
||||
+ NameError,
|
||||
+ ResponseCode(u8),
|
||||
+}
|
||||
+
|
||||
+impl DnsError {
|
||||
+ fn as_str(self) -> &'static str {
|
||||
+ match self {
|
||||
+ Self::MalformedResponse => "malformed dns response",
|
||||
+ Self::TransactionIdMismatch => "dns transaction id mismatch",
|
||||
+ Self::NotResponse => "dns packet was not a response",
|
||||
+ Self::Truncated => "truncated dns response",
|
||||
+ Self::ServerFailure => "dns server failure",
|
||||
+ Self::NameError => "dns name error",
|
||||
+ Self::ResponseCode(_) => "dns server returned an error response",
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct Dns {
|
||||
pub transaction_id: u16,
|
||||
@@ -59,6 +88,14 @@ impl Dns {
|
||||
}
|
||||
|
||||
pub fn parse(data: &[u8]) -> Result<Self, String> {
|
||||
+ Self::parse_impl(data, None).map_err(|err| err.as_str().into())
|
||||
+ }
|
||||
+
|
||||
+ pub(super) fn parse_reply(data: &[u8], expected_transaction_id: u16) -> Result<Self, DnsError> {
|
||||
+ Self::parse_impl(data, Some(expected_transaction_id))
|
||||
+ }
|
||||
+
|
||||
+ fn parse_impl(data: &[u8], expected_transaction_id: Option<u16>) -> Result<Self, DnsError> {
|
||||
let name_ind = 0b1100_0000;
|
||||
let mut i = 0;
|
||||
|
||||
@@ -66,7 +103,7 @@ impl Dns {
|
||||
() => {{
|
||||
i += 1;
|
||||
if i > data.len() {
|
||||
- return Err(format!("{}: {}: pop_u8", file!(), line!()));
|
||||
+ return Err(DnsError::MalformedResponse);
|
||||
}
|
||||
data[i - 1]
|
||||
}};
|
||||
@@ -77,9 +114,11 @@ impl Dns {
|
||||
use core::convert::TryInto;
|
||||
i += 2;
|
||||
if i > data.len() {
|
||||
- return Err(format!("{}: {}: pop_n16", file!(), line!()));
|
||||
+ return Err(DnsError::MalformedResponse);
|
||||
}
|
||||
- let bytes: [u8; 2] = data[i - 2..i].try_into().unwrap();
|
||||
+ let bytes: [u8; 2] = data[i - 2..i]
|
||||
+ .try_into()
|
||||
+ .map_err(|_| DnsError::MalformedResponse)?;
|
||||
u16::from_be_bytes(bytes)
|
||||
}};
|
||||
}
|
||||
@@ -156,11 +195,83 @@ impl Dns {
|
||||
});
|
||||
}
|
||||
|
||||
- Ok(Dns {
|
||||
+ let dns = Dns {
|
||||
transaction_id,
|
||||
flags,
|
||||
queries,
|
||||
answers,
|
||||
- })
|
||||
+ };
|
||||
+
|
||||
+ if let Some(expected_transaction_id) = expected_transaction_id {
|
||||
+ if dns.transaction_id != expected_transaction_id {
|
||||
+ return Err(DnsError::TransactionIdMismatch);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if dns.flags & DNS_FLAG_QR == 0 {
|
||||
+ return Err(DnsError::NotResponse);
|
||||
+ }
|
||||
+
|
||||
+ if dns.flags & DNS_FLAG_TC != 0 {
|
||||
+ return Err(DnsError::Truncated);
|
||||
+ }
|
||||
+
|
||||
+ match (dns.flags & DNS_RCODE_MASK) as u8 {
|
||||
+ 0 => Ok(dns),
|
||||
+ 2 => Err(DnsError::ServerFailure),
|
||||
+ 3 => Err(DnsError::NameError),
|
||||
+ rcode => Err(DnsError::ResponseCode(rcode)),
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+#[cfg(test)]
|
||||
+mod tests {
|
||||
+ use alloc::{string::ToString, vec::Vec};
|
||||
+
|
||||
+ use super::{Dns, DnsError, DnsQuery};
|
||||
+
|
||||
+ fn packet(transaction_id: u16, flags: u16) -> Vec<u8> {
|
||||
+ Dns {
|
||||
+ transaction_id,
|
||||
+ flags,
|
||||
+ queries: vec![DnsQuery {
|
||||
+ name: "example.com".to_string(),
|
||||
+ q_type: 0x0001,
|
||||
+ q_class: 0x0001,
|
||||
+ }],
|
||||
+ answers: vec![],
|
||||
+ }
|
||||
+ .compile()
|
||||
+ }
|
||||
+
|
||||
+ #[test]
|
||||
+ fn parse_reply_accepts_valid_response() {
|
||||
+ let response = Dns::parse_reply(&packet(0x1234, 0x8180), 0x1234).unwrap();
|
||||
+ assert_eq!(response.transaction_id, 0x1234);
|
||||
+ }
|
||||
+
|
||||
+ #[test]
|
||||
+ fn parse_reply_rejects_transaction_id_mismatch() {
|
||||
+ let err = Dns::parse_reply(&packet(0x1234, 0x8180), 0x4321).unwrap_err();
|
||||
+ assert_eq!(err, DnsError::TransactionIdMismatch);
|
||||
+ }
|
||||
+
|
||||
+ #[test]
|
||||
+ fn parse_rejects_query_packets() {
|
||||
+ let err = Dns::parse(&packet(0x1234, 0x0100)).unwrap_err();
|
||||
+ assert_eq!(err, DnsError::NotResponse.as_str());
|
||||
+ }
|
||||
+
|
||||
+ #[test]
|
||||
+ fn parse_rejects_truncated_response() {
|
||||
+ let err = Dns::parse(&packet(0x1234, 0x8380)).unwrap_err();
|
||||
+ assert_eq!(err, DnsError::Truncated.as_str());
|
||||
+ }
|
||||
+
|
||||
+ #[test]
|
||||
+ fn parse_rejects_name_error_response() {
|
||||
+ let err = Dns::parse(&packet(0x1234, 0x8183)).unwrap_err();
|
||||
+ assert_eq!(err, DnsError::NameError.as_str());
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/header/netdb/lookup.rs b/src/header/netdb/lookup.rs
|
||||
index c2b6cdb..af25f97 100644
|
||||
--- a/src/header/netdb/lookup.rs
|
||||
+++ b/src/header/netdb/lookup.rs
|
||||
@@ -1,10 +1,10 @@
|
||||
-use alloc::{boxed::Box, string::ToString, vec::Vec};
|
||||
+use alloc::{string::ToString, vec::Vec};
|
||||
use core::{mem, ptr};
|
||||
|
||||
use crate::{
|
||||
out::Out,
|
||||
platform::{
|
||||
- Pal, Sys,
|
||||
+ self, Pal, Sys,
|
||||
types::{c_int, c_void},
|
||||
},
|
||||
};
|
||||
@@ -25,13 +25,86 @@ use crate::header::{
|
||||
};
|
||||
|
||||
use super::{
|
||||
- dns::{Dns, DnsQuery},
|
||||
+ dns::{Dns, DnsError, DnsQuery},
|
||||
sys::get_dns_server,
|
||||
};
|
||||
|
||||
pub type LookupHost = Vec<in_addr>;
|
||||
pub type LookupHostV6 = Vec<in6_addr>;
|
||||
+
|
||||
+fn close_socket(sock: c_int) {
|
||||
+ if sock >= 0 {
|
||||
+ if let Ok(()) = Sys::close(sock) {};
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+fn last_socket_error(default: c_int) -> c_int {
|
||||
+ match platform::ERRNO.get() {
|
||||
+ 0 => default,
|
||||
+ err => err,
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+fn map_dns_error(err: DnsError) -> c_int {
|
||||
+ match err {
|
||||
+ DnsError::NameError => ENOENT,
|
||||
+ DnsError::ServerFailure => EAGAIN,
|
||||
+ DnsError::Truncated => EMSGSIZE,
|
||||
+ DnsError::MalformedResponse
|
||||
+ | DnsError::TransactionIdMismatch
|
||||
+ | DnsError::NotResponse
|
||||
+ | DnsError::ResponseCode(_) => EREMOTEIO,
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+fn lookup_dns_response(packet: &Dns, dns_addr: u32) -> Result<Dns, c_int> {
|
||||
+ let packet_data = packet.compile();
|
||||
+ let packet_data_len = packet_data.len();
|
||||
+ let packet_data_ptr = packet_data.as_ptr().cast::<c_void>();
|
||||
+
|
||||
+ let dest = sockaddr_in {
|
||||
+ sin_family: AF_INET as u16,
|
||||
+ sin_port: htons(53),
|
||||
+ sin_addr: in_addr { s_addr: dns_addr },
|
||||
+ ..Default::default()
|
||||
+ };
|
||||
+ let dest_ptr = ptr::from_ref(&dest).cast::<sockaddr>();
|
||||
+
|
||||
+ let sock = unsafe { sys_socket::socket(AF_INET, SOCK_DGRAM, i32::from(IPPROTO_UDP)) };
|
||||
+ if sock < 0 {
|
||||
+ return Err(last_socket_error(EIO));
|
||||
+ }
|
||||
+
|
||||
+ if unsafe { sys_socket::connect(sock, dest_ptr, mem::size_of_val(&dest) as socklen_t) } < 0 {
|
||||
+ let err = last_socket_error(EIO);
|
||||
+ close_socket(sock);
|
||||
+ return Err(err);
|
||||
+ }
|
||||
+
|
||||
+ if unsafe { sys_socket::send(sock, packet_data_ptr, packet_data_len, 0) } < 0 {
|
||||
+ let err = last_socket_error(EIO);
|
||||
+ close_socket(sock);
|
||||
+ return Err(err);
|
||||
+ }
|
||||
+
|
||||
+ let tv = timeval {
|
||||
+ tv_sec: 5,
|
||||
+ tv_usec: 0,
|
||||
+ };
|
||||
+ unsafe {
|
||||
+ sys_socket::setsockopt(
|
||||
+ sock,
|
||||
+ SOL_SOCKET,
|
||||
+ SO_RCVTIMEO,
|
||||
+ &tv as *const timeval as *const c_void,
|
||||
+ core::mem::size_of::<timeval>() as socklen_t,
|
||||
+ );
|
||||
+ }
|
||||
+
|
||||
+ let mut buf = vec![0u8; 65536];
|
||||
+ let buf_ptr = buf.as_mut_ptr().cast::<c_void>();
|
||||
+
|
||||
+ let mut count: isize = -1;
|
||||
+ let mut recv_error = EIO;
|
||||
+ for attempt in 0..2 {
|
||||
+ count = unsafe { sys_socket::recv(sock, buf_ptr, buf.len(), 0) };
|
||||
+ if count >= 0 {
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ recv_error = last_socket_error(EIO);
|
||||
+ if attempt + 1 == 2 {
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ if unsafe { sys_socket::send(sock, packet_data_ptr, packet_data_len, 0) } < 0 {
|
||||
+ recv_error = last_socket_error(EIO);
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if count < 0 {
|
||||
+ close_socket(sock);
|
||||
+ return Err(recv_error);
|
||||
+ }
|
||||
+
|
||||
+ let response = match Dns::parse_reply(&buf[..count as usize], packet.transaction_id) {
|
||||
+ Ok(response) => response,
|
||||
+ Err(err) => {
|
||||
+ close_socket(sock);
|
||||
+ return Err(map_dns_error(err));
|
||||
+ }
|
||||
+ };
|
||||
+
|
||||
+ close_socket(sock);
|
||||
+ Ok(response)
|
||||
+}
|
||||
|
||||
pub fn lookup_host(host: &str) -> Result<LookupHost, c_int> {
|
||||
if let Some(host_direct_addr) = parse_ipv4_string(host) {
|
||||
@@ -61,97 +134,30 @@ pub fn lookup_host(host: &str) -> Result<LookupHost, c_int> {
|
||||
answers: vec![],
|
||||
};
|
||||
|
||||
- let packet_data = packet.compile();
|
||||
- let packet_data_len = packet_data.len();
|
||||
-
|
||||
- let packet_data_box = packet_data.into_boxed_slice();
|
||||
- let packet_data_ptr = Box::into_raw(packet_data_box) as *mut _ as *mut c_void;
|
||||
-
|
||||
- let dest = sockaddr_in {
|
||||
- sin_family: AF_INET as u16,
|
||||
- sin_port: htons(53),
|
||||
- sin_addr: in_addr { s_addr: dns_addr },
|
||||
- ..Default::default()
|
||||
- };
|
||||
- let dest_ptr = ptr::from_ref(&dest).cast::<sockaddr>();
|
||||
-
|
||||
- let sock = unsafe {
|
||||
- let sock = sys_socket::socket(AF_INET, SOCK_DGRAM, i32::from(IPPROTO_UDP));
|
||||
- if sys_socket::connect(sock, dest_ptr, mem::size_of_val(&dest) as socklen_t) < 0 {
|
||||
- return Err(EIO);
|
||||
- }
|
||||
- if sys_socket::send(sock, packet_data_ptr, packet_data_len, 0) < 0 {
|
||||
- drop(Box::from_raw(packet_data_ptr));
|
||||
- return Err(EIO);
|
||||
- }
|
||||
- sock
|
||||
- };
|
||||
-
|
||||
- unsafe {
|
||||
- drop(Box::from_raw(packet_data_ptr));
|
||||
- }
|
||||
-
|
||||
- let mut buf = vec![0u8; 65536];
|
||||
- let buf_ptr = buf.as_mut_ptr().cast::<c_void>();
|
||||
-
|
||||
- // Set 5s recv timeout (best-effort; if this fails, recv may block longer).
|
||||
- let tv = timeval {
|
||||
- tv_sec: 5,
|
||||
- tv_usec: 0,
|
||||
- };
|
||||
- unsafe {
|
||||
- sys_socket::setsockopt(
|
||||
- sock,
|
||||
- SOL_SOCKET,
|
||||
- SO_RCVTIMEO,
|
||||
- &tv as *const timeval as *const c_void,
|
||||
- core::mem::size_of::<timeval>() as socklen_t,
|
||||
- );
|
||||
- }
|
||||
-
|
||||
- let mut count: isize = -1;
|
||||
- for _attempt in 0..2 {
|
||||
- count = unsafe { sys_socket::recv(sock, buf_ptr, 65536, 0) };
|
||||
- if count >= 0 {
|
||||
- break;
|
||||
- }
|
||||
- if unsafe { sys_socket::send(sock, packet_data_ptr, packet_data_len, 0) } < 0 {
|
||||
- break;
|
||||
- }
|
||||
- }
|
||||
- if count < 0 {
|
||||
- return Err(EIO);
|
||||
- }
|
||||
-
|
||||
- match Dns::parse(&buf[..count as usize]) {
|
||||
- Ok(response) => {
|
||||
- let addrs: Vec<_> = response
|
||||
- .answers
|
||||
- .into_iter()
|
||||
- .filter_map(|answer| {
|
||||
- if answer.a_type == 0x0001
|
||||
- && answer.a_class == 0x0001
|
||||
- && answer.data.len() == 4
|
||||
- {
|
||||
- let addr = in_addr {
|
||||
- s_addr: u32::from_ne_bytes([
|
||||
- answer.data[0],
|
||||
- answer.data[1],
|
||||
- answer.data[2],
|
||||
- answer.data[3],
|
||||
- ]),
|
||||
- };
|
||||
- Some(addr)
|
||||
- } else {
|
||||
- None
|
||||
- }
|
||||
- })
|
||||
- .collect();
|
||||
-
|
||||
- Ok(addrs)
|
||||
- }
|
||||
- Err(_err) => Err(EINVAL),
|
||||
- }
|
||||
+ let response = lookup_dns_response(&packet, dns_addr)?;
|
||||
+ let addrs: Vec<_> = response
|
||||
+ .answers
|
||||
+ .into_iter()
|
||||
+ .filter_map(|answer| {
|
||||
+ if answer.a_type == 0x0001 && answer.a_class == 0x0001 && answer.data.len() == 4 {
|
||||
+ let addr = in_addr {
|
||||
+ s_addr: u32::from_ne_bytes([
|
||||
+ answer.data[0],
|
||||
+ answer.data[1],
|
||||
+ answer.data[2],
|
||||
+ answer.data[3],
|
||||
+ ]),
|
||||
+ };
|
||||
+ Some(addr)
|
||||
+ } else {
|
||||
+ None
|
||||
+ }
|
||||
+ })
|
||||
+ .collect();
|
||||
+
|
||||
+ Ok(addrs)
|
||||
} else {
|
||||
Err(EINVAL)
|
||||
}
|
||||
@@ -186,97 +192,30 @@ pub fn lookup_host_v6(host: &str) -> Result<LookupHostV6, c_int> {
|
||||
answers: vec![],
|
||||
};
|
||||
|
||||
- let packet_data = packet.compile();
|
||||
- let packet_data_len = packet_data.len();
|
||||
-
|
||||
- let packet_data_box = packet_data.into_boxed_slice();
|
||||
- let packet_data_ptr = Box::into_raw(packet_data_box) as *mut _ as *mut c_void;
|
||||
-
|
||||
- let dest = sockaddr_in {
|
||||
- sin_family: AF_INET as u16,
|
||||
- sin_port: htons(53),
|
||||
- sin_addr: in_addr { s_addr: dns_addr },
|
||||
- ..Default::default()
|
||||
- };
|
||||
- let dest_ptr = ptr::from_ref(&dest).cast::<sockaddr>();
|
||||
-
|
||||
- let sock = unsafe {
|
||||
- let sock = sys_socket::socket(AF_INET, SOCK_DGRAM, i32::from(IPPROTO_UDP));
|
||||
- if sys_socket::connect(sock, dest_ptr, mem::size_of_val(&dest) as socklen_t) < 0 {
|
||||
- return Err(EIO);
|
||||
- }
|
||||
- if sys_socket::send(sock, packet_data_ptr, packet_data_len, 0) < 0 {
|
||||
- drop(Box::from_raw(packet_data_ptr));
|
||||
- return Err(EIO);
|
||||
- }
|
||||
- sock
|
||||
- };
|
||||
-
|
||||
- unsafe {
|
||||
- drop(Box::from_raw(packet_data_ptr));
|
||||
- }
|
||||
-
|
||||
- let mut buf = vec![0u8; 65536];
|
||||
- let buf_ptr = buf.as_mut_ptr().cast::<c_void>();
|
||||
-
|
||||
- // Set 5s recv timeout (best-effort; if this fails, recv may block longer).
|
||||
- let tv = timeval {
|
||||
- tv_sec: 5,
|
||||
- tv_usec: 0,
|
||||
- };
|
||||
- unsafe {
|
||||
- sys_socket::setsockopt(
|
||||
- sock,
|
||||
- SOL_SOCKET,
|
||||
- SO_RCVTIMEO,
|
||||
- &tv as *const timeval as *const c_void,
|
||||
- core::mem::size_of::<timeval>() as socklen_t,
|
||||
- );
|
||||
- }
|
||||
-
|
||||
- let mut count: isize = -1;
|
||||
- for _attempt in 0..2 {
|
||||
- count = unsafe { sys_socket::recv(sock, buf_ptr, 65536, 0) };
|
||||
- if count >= 0 {
|
||||
- break;
|
||||
- }
|
||||
- if unsafe { sys_socket::send(sock, packet_data_ptr, packet_data_len, 0) } < 0 {
|
||||
- break;
|
||||
- }
|
||||
- }
|
||||
- if count < 0 {
|
||||
- return Err(EIO);
|
||||
- }
|
||||
-
|
||||
- match Dns::parse(&buf[..count as usize]) {
|
||||
- Ok(response) => {
|
||||
- let addrs: Vec<_> = response
|
||||
- .answers
|
||||
- .into_iter()
|
||||
- .filter_map(|answer| {
|
||||
- if answer.a_type == 0x001c
|
||||
- && answer.a_class == 0x0001
|
||||
- && answer.data.len() == 16
|
||||
- {
|
||||
- let mut s6_addr = [0u8; 16];
|
||||
- s6_addr.copy_from_slice(&answer.data[..16]);
|
||||
- Some(in6_addr { s6_addr })
|
||||
- } else {
|
||||
- None
|
||||
- }
|
||||
- })
|
||||
- .collect();
|
||||
-
|
||||
- Ok(addrs)
|
||||
- }
|
||||
- Err(_err) => Err(EINVAL),
|
||||
- }
|
||||
+ let response = lookup_dns_response(&packet, dns_addr)?;
|
||||
+ let addrs: Vec<_> = response
|
||||
+ .answers
|
||||
+ .into_iter()
|
||||
+ .filter_map(|answer| {
|
||||
+ if answer.a_type == 0x001c && answer.a_class == 0x0001 && answer.data.len() == 16 {
|
||||
+ let mut s6_addr = [0u8; 16];
|
||||
+ s6_addr.copy_from_slice(&answer.data[..16]);
|
||||
+ Some(in6_addr { s6_addr })
|
||||
+ } else {
|
||||
+ None
|
||||
+ }
|
||||
+ })
|
||||
+ .collect();
|
||||
+
|
||||
+ Ok(addrs)
|
||||
} else {
|
||||
Err(EINVAL)
|
||||
}
|
||||
@@ -315,82 +254,24 @@ pub fn lookup_addr(addr: in_addr) -> Result<Vec<Vec<u8>>, c_int> {
|
||||
answers: vec![],
|
||||
};
|
||||
|
||||
- let packet_data = packet.compile();
|
||||
- let packet_data_len = packet_data.len();
|
||||
- let packet_data_box = packet_data.into_boxed_slice();
|
||||
- let packet_data_ptr = Box::into_raw(packet_data_box) as *mut _ as *mut c_void;
|
||||
-
|
||||
- let dest = sockaddr_in {
|
||||
- sin_family: AF_INET as u16,
|
||||
- sin_port: htons(53),
|
||||
- sin_addr: in_addr { s_addr: dns_addr },
|
||||
- ..Default::default()
|
||||
- };
|
||||
-
|
||||
- let dest_ptr = ptr::from_ref(&dest).cast::<sockaddr>();
|
||||
-
|
||||
- let sock = unsafe {
|
||||
- let sock = sys_socket::socket(AF_INET, SOCK_DGRAM, i32::from(IPPROTO_UDP));
|
||||
- if sys_socket::connect(sock, dest_ptr, mem::size_of_val(&dest) as socklen_t) < 0 {
|
||||
- return Err(EIO);
|
||||
- }
|
||||
- sock
|
||||
- };
|
||||
-
|
||||
- unsafe {
|
||||
- if sys_socket::send(sock, packet_data_ptr, packet_data_len, 0) < 0 {
|
||||
- return Err(EIO);
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- unsafe {
|
||||
- drop(Box::from_raw(packet_data_ptr));
|
||||
- }
|
||||
-
|
||||
- let mut buf = [0u8; 65536];
|
||||
- let buf_ptr = buf.as_mut_ptr().cast::<c_void>();
|
||||
-
|
||||
- // Set 5s recv timeout (best-effort; if this fails, recv may block longer).
|
||||
- let tv = timeval {
|
||||
- tv_sec: 5,
|
||||
- tv_usec: 0,
|
||||
- };
|
||||
- unsafe {
|
||||
- sys_socket::setsockopt(
|
||||
- sock,
|
||||
- SOL_SOCKET,
|
||||
- SO_RCVTIMEO,
|
||||
- &tv as *const timeval as *const c_void,
|
||||
- core::mem::size_of::<timeval>() as socklen_t,
|
||||
- );
|
||||
- }
|
||||
-
|
||||
- let mut count: isize = -1;
|
||||
- for _attempt in 0..2 {
|
||||
- count = unsafe { sys_socket::recv(sock, buf_ptr, 65536, 0) };
|
||||
- if count >= 0 {
|
||||
- break;
|
||||
- }
|
||||
- if unsafe { sys_socket::send(sock, packet_data_ptr, packet_data_len, 0) } < 0 {
|
||||
- break;
|
||||
- }
|
||||
- }
|
||||
- if count < 0 {
|
||||
- return Err(EIO);
|
||||
- }
|
||||
-
|
||||
- match Dns::parse(&buf[..count as usize]) {
|
||||
- Ok(response) => {
|
||||
- let names = response
|
||||
- .answers
|
||||
- .into_iter()
|
||||
- .filter_map(|answer| {
|
||||
- if answer.a_type == 0x000C && answer.a_class == 0x0001 {
|
||||
- // answer.data is encoded kinda weird.
|
||||
- // Basically length-prefixed strings for each
|
||||
- // subsection of the domain.
|
||||
- // We need to parse this to insert periods where
|
||||
- // they belong (ie at the end of each string)
|
||||
- Some(parse_revdns_answer(&answer.data))
|
||||
- } else {
|
||||
- None
|
||||
- }
|
||||
- })
|
||||
- .collect();
|
||||
- Ok(names)
|
||||
- }
|
||||
- Err(_err) => Err(EINVAL),
|
||||
- }
|
||||
+ let response = lookup_dns_response(&packet, dns_addr)?;
|
||||
+ let names = response
|
||||
+ .answers
|
||||
+ .into_iter()
|
||||
+ .filter_map(|answer| {
|
||||
+ if answer.a_type == 0x000C && answer.a_class == 0x0001 {
|
||||
+ // answer.data is encoded kinda weird.
|
||||
+ // Basically length-prefixed strings for each
|
||||
+ // subsection of the domain.
|
||||
+ // We need to parse this to insert periods where
|
||||
+ // they belong (ie at the end of each string)
|
||||
+ Some(parse_revdns_answer(&answer.data))
|
||||
+ } else {
|
||||
+ None
|
||||
+ }
|
||||
+ })
|
||||
+ .collect();
|
||||
+ Ok(names)
|
||||
} else {
|
||||
Err(EINVAL)
|
||||
}
|
||||
diff --git a/src/header/netdb/mod.rs b/src/header/netdb/mod.rs
|
||||
index ba58b6e..cdcc10e 100644
|
||||
--- a/src/header/netdb/mod.rs
|
||||
+++ b/src/header/netdb/mod.rs
|
||||
@@ -180,6 +180,31 @@ fn bytes_to_box_str(bytes: &[u8]) -> Box<str> {
|
||||
Box::from(core::str::from_utf8(bytes).unwrap_or(""))
|
||||
}
|
||||
|
||||
+fn lookup_error_to_eai(err: c_int) -> c_int {
|
||||
+ match err {
|
||||
+ ETIMEDOUT | EAGAIN => EAI_AGAIN,
|
||||
+ ENOENT => EAI_NONAME,
|
||||
+ _ => EAI_FAIL,
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+fn lookup_error_priority(err: c_int) -> u8 {
|
||||
+ match err {
|
||||
+ EAI_AGAIN => 3,
|
||||
+ EAI_FAIL => 2,
|
||||
+ EAI_NONAME => 1,
|
||||
+ _ => 0,
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+fn combine_lookup_error(current: Option<c_int>, err: c_int) -> c_int {
|
||||
+ let mapped = lookup_error_to_eai(err);
|
||||
+
|
||||
+ match current {
|
||||
+ Some(existing) if lookup_error_priority(existing) >= lookup_error_priority(mapped) => {
|
||||
+ existing
|
||||
+ }
|
||||
+ Some(_) => mapped,
|
||||
+ None => mapped,
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
/// See <https://pubs.opengroup.org/onlinepubs/9799919799/functions/endnetent.html>.
|
||||
#[unsafe(no_mangle)]
|
||||
pub unsafe extern "C" fn endnetent() {
|
||||
@@ -926,6 +951,8 @@ pub unsafe extern "C" fn getaddrinfo(
|
||||
let want_inet4 = requested_family == AF_INET || requested_family == AF_UNSPEC;
|
||||
let want_inet6 = requested_family == AF_INET6 || requested_family == AF_UNSPEC;
|
||||
|
||||
+ let mut lookup_error = None;
|
||||
+
|
||||
let lookuphost_v4: Vec<in_addr> = if want_inet4 {
|
||||
if ai_flags & AI_NUMERICHOST > 0 {
|
||||
match parse_ipv4_string(node_str) {
|
||||
@@ -937,7 +964,10 @@ pub unsafe extern "C" fn getaddrinfo(
|
||||
} else {
|
||||
match lookup_host(node_str) {
|
||||
Ok(addrs) => addrs,
|
||||
- Err(_) => vec![],
|
||||
+ Err(err) => {
|
||||
+ lookup_error = Some(combine_lookup_error(lookup_error, err));
|
||||
+ vec![]
|
||||
+ }
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -955,7 +985,10 @@ pub unsafe extern "C" fn getaddrinfo(
|
||||
} else {
|
||||
match lookup_host_v6(node_str) {
|
||||
Ok(addrs) => addrs,
|
||||
- Err(_) => vec![],
|
||||
+ Err(err) => {
|
||||
+ lookup_error = Some(combine_lookup_error(lookup_error, err));
|
||||
+ vec![]
|
||||
+ }
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -963,7 +996,7 @@ pub unsafe extern "C" fn getaddrinfo(
|
||||
};
|
||||
|
||||
if lookuphost_v4.is_empty() && lookuphost_v6.is_empty() {
|
||||
- return EAI_NONAME;
|
||||
+ return lookup_error.unwrap_or(EAI_NONAME);
|
||||
}
|
||||
@@ -1,49 +1,66 @@
|
||||
diff --git a/src/header/unistd/mod.rs b/src/header/unistd/mod.rs
|
||||
index 573d69ad..d7ebe10d 100644
|
||||
--- a/src/header/unistd/mod.rs
|
||||
+++ b/src/header/unistd/mod.rs
|
||||
@@ -534,7 +534,7 @@ pub extern "C" fn getdtablesize() -> c_int {
|
||||
};
|
||||
if r == 0 {
|
||||
let cur = unsafe { lim.assume_init() }.rlim_cur;
|
||||
- match cur {
|
||||
+ return match cur {
|
||||
c if c < i32::MAX as u64 => c as i32,
|
||||
_ => i32::MAX,
|
||||
};
|
||||
}
|
||||
-1
|
||||
}
|
||||
|
||||
diff --git a/src/platform/redox/mod.rs b/src/platform/redox/mod.rs
|
||||
index 752339a7..8f87913b 100644
|
||||
index 752339a..30668f9 100644
|
||||
--- a/src/platform/redox/mod.rs
|
||||
+++ b/src/platform/redox/mod.rs
|
||||
@@ -43,7 +43,7 @@ use crate::{
|
||||
sys_file,
|
||||
sys_mman::{MAP_ANONYMOUS, PROT_READ, PROT_WRITE},
|
||||
sys_random,
|
||||
- sys_resource::{RLIM_INFINITY, rlimit, rusage},
|
||||
+ sys_resource::{RLIM_INFINITY, RLIMIT_NOFILE, RLIMIT_STACK, rlimit, rusage},
|
||||
sys_select::timeval,
|
||||
sys_stat::{S_ISVTX, stat},
|
||||
sys_statvfs::statvfs,
|
||||
@@ -736,10 +736,15 @@ impl Pal for Sys {
|
||||
@@ -749,8 +749,16 @@ impl Pal for Sys {
|
||||
Err(Errno(EPERM))
|
||||
}
|
||||
|
||||
fn getrlimit(resource: c_int, mut rlim: Out<rlimit>) -> Result<()> {
|
||||
- todo_skip!(0, "getrlimit({}, {:p}): not implemented", resource, rlim);
|
||||
+ // Return sensible defaults without logging; full kernel syscall not yet available.
|
||||
+ let (cur, max) = match resource {
|
||||
+ RLIMIT_NOFILE => (65536, 65536),
|
||||
+ RLIMIT_STACK => (8 * 1024 * 1024, RLIM_INFINITY as u64),
|
||||
+ _ => (RLIM_INFINITY as u64, RLIM_INFINITY as u64),
|
||||
+ };
|
||||
rlim.write(rlimit {
|
||||
- rlim_cur: RLIM_INFINITY,
|
||||
- rlim_max: RLIM_INFINITY,
|
||||
+ rlim_cur: cur,
|
||||
+ rlim_max: max,
|
||||
});
|
||||
- fn getrusage(who: c_int, r_usage: Out<rusage>) -> Result<()> {
|
||||
- todo_skip!(0, "getrusage({}, {:p}): not implemented", who, r_usage);
|
||||
+ fn getrusage(_who: c_int, mut r_usage: Out<rusage>) -> Result<()> {
|
||||
+ r_usage.write(rusage {
|
||||
+ ru_utime: timeval { tv_sec: 0, tv_usec: 0 },
|
||||
+ ru_stime: timeval { tv_sec: 0, tv_usec: 0 },
|
||||
+ ru_maxrss: 0, ru_ixrss: 0, ru_idrss: 0, ru_isrss: 0,
|
||||
+ ru_minflt: 0, ru_majflt: 0, ru_nswap: 0,
|
||||
+ ru_inblock: 0, ru_oublock: 0,
|
||||
+ ru_msgsnd: 0, ru_msgrcv: 0, ru_nsignals: 0,
|
||||
+ ru_nvcsw: 0, ru_nivcsw: 0,
|
||||
+ });
|
||||
Ok(())
|
||||
}
|
||||
|
||||
@@ -913,23 +921,7 @@ impl Pal for Sys {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
- unsafe fn msync(addr: *mut c_void, len: usize, flags: c_int) -> Result<()> {
|
||||
- todo_skip!(
|
||||
- 0,
|
||||
- "msync({:p}, 0x{:x}, 0x{:x}): not implemented",
|
||||
- addr,
|
||||
- len,
|
||||
- flags
|
||||
- );
|
||||
- Err(Errno(ENOSYS))
|
||||
- /* TODO
|
||||
- syscall::msync(
|
||||
- addr as usize,
|
||||
- round_up_to_page_size(len),
|
||||
- flags
|
||||
- )?;
|
||||
- */
|
||||
- }
|
||||
+ unsafe fn msync(_addr: *mut c_void, _len: usize, _flags: c_int) -> Result<()> { Ok(()) }
|
||||
|
||||
unsafe fn munlock(addr: *const c_void, len: usize) -> Result<()> {
|
||||
// Redox never swaps
|
||||
@@ -953,16 +945,7 @@ impl Pal for Sys {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
- unsafe fn madvise(addr: *mut c_void, len: usize, flags: c_int) -> Result<()> {
|
||||
- todo_skip!(
|
||||
- 0,
|
||||
- "madvise({:p}, 0x{:x}, 0x{:x}): not implemented",
|
||||
- addr,
|
||||
- len,
|
||||
- flags
|
||||
- );
|
||||
- Err(Errno(ENOSYS))
|
||||
- }
|
||||
+ unsafe fn madvise(_addr: *mut c_void, _len: usize, _flags: c_int) -> Result<()> { Ok(()) }
|
||||
|
||||
unsafe fn nanosleep(rqtp: *const timespec, rmtp: *mut timespec) -> Result<()> {
|
||||
let redox_rqtp = unsafe { redox_timespec::from(&*rqtp) };
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
diff --git a/src/header/mod.rs b/src/header/mod.rs
|
||||
index 4bdb6b1..9d1da43 100644
|
||||
--- a/src/header/mod.rs
|
||||
+++ b/src/header/mod.rs
|
||||
@@ -76,7 +76,7 @@ pub mod setjmp;
|
||||
pub mod sgtty;
|
||||
pub mod shadow;
|
||||
pub mod signal;
|
||||
-// TODO: spawn.h
|
||||
+pub mod spawn;
|
||||
// TODO: stdalign.h (likely C implementation)
|
||||
// stdarg.h implemented in C
|
||||
// stdatomic.h implemented in C
|
||||
@@ -93,20 +93,17 @@ pub mod sys_auxv;
|
||||
pub mod sys_epoll;
|
||||
pub mod sys_file;
|
||||
pub mod sys_ioctl;
|
||||
-// TODO: sys/ipc.h
|
||||
pub mod sys_mman;
|
||||
-// TODO: sys/msg.h
|
||||
pub mod sys_ptrace;
|
||||
pub mod sys_resource;
|
||||
pub mod sys_select;
|
||||
-// TODO: sys/sem.h
|
||||
-// TODO: sys/shm.h
|
||||
pub mod sys_socket;
|
||||
pub mod sys_stat;
|
||||
pub mod sys_statvfs;
|
||||
#[allow(non_upper_case_globals)]
|
||||
pub mod sys_syscall;
|
||||
pub mod sys_time;
|
||||
+pub mod sys_timerfd;
|
||||
#[deprecated]
|
||||
pub mod sys_timeb;
|
||||
//pub mod sys_times;
|
||||
@@ -128,7 +125,7 @@ pub mod tar;
|
||||
// TODO: term.h (deprecated)
|
||||
pub mod termios;
|
||||
// TODO: tgmath.h (likely C implementation)
|
||||
-// TODO: threads.h
|
||||
+pub mod threads;
|
||||
pub mod time;
|
||||
// TODO: uchar.h
|
||||
// TODO: ucontext.h (deprecated)
|
||||
@@ -1,5 +1,5 @@
|
||||
diff --git a/src/header/ifaddrs/mod.rs b/src/header/ifaddrs/mod.rs
|
||||
index bddb69b8..598beba3 100644
|
||||
index bddb69b..e77a69c 100644
|
||||
--- a/src/header/ifaddrs/mod.rs
|
||||
+++ b/src/header/ifaddrs/mod.rs
|
||||
@@ -3,7 +3,13 @@
|
||||
@@ -101,7 +101,7 @@ index bddb69b8..598beba3 100644
|
||||
#[unsafe(no_mangle)]
|
||||
pub unsafe extern "C" fn freeifaddrs(mut ifa: *mut ifaddrs) {
|
||||
while !ifa.is_null() {
|
||||
@@ -38,7 +106,31 @@ pub unsafe extern "C" fn freeifaddrs(mut ifa: *mut ifaddrs) {
|
||||
@@ -38,7 +121,31 @@ pub unsafe extern "C" fn freeifaddrs(mut ifa: *mut ifaddrs) {
|
||||
|
||||
#[unsafe(no_mangle)]
|
||||
pub unsafe extern "C" fn getifaddrs(ifap: *mut *mut ifaddrs) -> c_int {
|
||||
@@ -137,10 +137,19 @@ index bddb69b8..598beba3 100644
|
||||
+ 0
|
||||
}
|
||||
diff --git a/src/header/net_if/mod.rs b/src/header/net_if/mod.rs
|
||||
index edbfedec..bd07e2c9 100644
|
||||
index edbfede..9ae1b02 100644
|
||||
--- a/src/header/net_if/mod.rs
|
||||
+++ b/src/header/net_if/mod.rs
|
||||
@@ -21,21 +21,51 @@ pub struct if_nameindex {
|
||||
@@ -4,6 +4,8 @@
|
||||
|
||||
use core::ptr::null;
|
||||
|
||||
+extern crate alloc;
|
||||
+
|
||||
use crate::{
|
||||
c_str::CStr,
|
||||
platform::{
|
||||
@@ -21,15 +23,56 @@ pub struct if_nameindex {
|
||||
if_name: *const c_char,
|
||||
}
|
||||
|
||||
@@ -157,8 +166,8 @@ index edbfedec..bd07e2c9 100644
|
||||
pub const IF_NAMESIZE: usize = 16;
|
||||
|
||||
-const IF_STUB_INTERFACE: *const c_char = (c"stub").as_ptr();
|
||||
+pub(crate) fn interface_entries() -> [InterfaceEntry; 2] {
|
||||
+ [
|
||||
+pub(crate) fn interface_entries() -> alloc::vec::Vec<InterfaceEntry> {
|
||||
+ alloc::vec![
|
||||
+ InterfaceEntry {
|
||||
+ index: 1,
|
||||
+ name: c"loopback".into(),
|
||||
@@ -170,6 +179,13 @@ index edbfedec..bd07e2c9 100644
|
||||
+ index: 2,
|
||||
+ name: c"eth0".into(),
|
||||
+ flags: (IFF_UP | IFF_RUNNING | IFF_BROADCAST | IFF_MULTICAST) as c_uint,
|
||||
+ addr: Some([192, 168, 1, 100]),
|
||||
+ netmask: Some([255, 255, 255, 0]),
|
||||
+ },
|
||||
+ InterfaceEntry {
|
||||
+ index: 3,
|
||||
+ name: c"wlan0".into(),
|
||||
+ flags: (IFF_UP | IFF_BROADCAST | IFF_MULTICAST) as c_uint,
|
||||
+ addr: None,
|
||||
+ netmask: None,
|
||||
+ },
|
||||
@@ -177,18 +193,10 @@ index edbfedec..bd07e2c9 100644
|
||||
+}
|
||||
|
||||
-const INTERFACES: &[if_nameindex] = &[
|
||||
- if_nameindex {
|
||||
- if_index: 1,
|
||||
+const INTERFACES: [if_nameindex; 4] = [
|
||||
if_nameindex {
|
||||
if_index: 1,
|
||||
- if_name: IF_STUB_INTERFACE,
|
||||
- },
|
||||
- if_nameindex {
|
||||
- if_index: 0,
|
||||
- if_name: null::<c_char>(),
|
||||
- },
|
||||
-];
|
||||
+const INTERFACES: [if_nameindex; 3] = [
|
||||
+ if_nameindex {
|
||||
+ if_index: 1,
|
||||
+ if_name: (c"loopback").as_ptr(),
|
||||
+ },
|
||||
+ if_nameindex {
|
||||
@@ -196,14 +204,12 @@ index edbfedec..bd07e2c9 100644
|
||||
+ if_name: (c"eth0").as_ptr(),
|
||||
+ },
|
||||
+ if_nameindex {
|
||||
+ if_index: 0,
|
||||
+ if_name: null::<c_char>(),
|
||||
+ },
|
||||
+];
|
||||
|
||||
/// See <https://pubs.opengroup.org/onlinepubs/9799919799/functions/if_freenameindex.html>.
|
||||
///
|
||||
@@ -52,8 +85,21 @@ pub unsafe extern "C" fn if_freenameindex(s: *mut if_nameindex) {}
|
||||
+ if_index: 3,
|
||||
+ if_name: (c"wlan0").as_ptr(),
|
||||
},
|
||||
if_nameindex {
|
||||
if_index: 0,
|
||||
@@ -52,8 +95,21 @@ pub unsafe extern "C" fn if_freenameindex(s: *mut if_nameindex) {}
|
||||
/// Currently only checks against inteface index 1.
|
||||
#[unsafe(no_mangle)]
|
||||
pub unsafe extern "C" fn if_indextoname(idx: c_uint, buf: *mut c_char) -> *const c_char {
|
||||
@@ -227,8 +233,7 @@ index edbfedec..bd07e2c9 100644
|
||||
}
|
||||
ERRNO.set(ENXIO);
|
||||
null::<c_char>()
|
||||
@@ -78,9 +136,12 @@ pub unsafe extern "C" fn if_nametoindex(name: *const c_char) -> c_uint {
|
||||
if name.is_null() {
|
||||
@@ -80,8 +136,11 @@ pub unsafe extern "C" fn if_nametoindex(name: *const c_char) -> c_uint {
|
||||
return 0;
|
||||
}
|
||||
let name = unsafe { CStr::from_ptr(name).to_str().unwrap_or("") };
|
||||
@@ -242,60 +247,3 @@ index edbfedec..bd07e2c9 100644
|
||||
}
|
||||
0
|
||||
}
|
||||
diff --git a/tests/Makefile.tests.mk b/tests/Makefile.tests.mk
|
||||
--- a/tests/Makefile.tests.mk
|
||||
+++ b/tests/Makefile.tests.mk
|
||||
@@ -63,6 +63,7 @@ VARIED_NAMES=\
|
||||
features \
|
||||
fnmatch \
|
||||
glob \
|
||||
+ ifaddrs/getifaddrs \
|
||||
iso646 \
|
||||
libgen \
|
||||
locale/duplocale \
|
||||
diff --git a/tests/ifaddrs/getifaddrs.c b/tests/ifaddrs/getifaddrs.c
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/tests/ifaddrs/getifaddrs.c
|
||||
@@ -0,0 +1,41 @@
|
||||
+#include <assert.h>
|
||||
+#include <ifaddrs.h>
|
||||
+#include <net/if.h>
|
||||
+#include <stdio.h>
|
||||
+#include <string.h>
|
||||
+
|
||||
+int main(void) {
|
||||
+ struct ifaddrs *list = NULL;
|
||||
+ struct ifaddrs *it;
|
||||
+ const struct if_nameindex *names;
|
||||
+ char name[IF_NAMESIZE] = {0};
|
||||
+ int saw_loopback = 0;
|
||||
+ int saw_eth0 = 0;
|
||||
+
|
||||
+ assert(getifaddrs(&list) == 0);
|
||||
+ for (it = list; it != NULL; it = it->ifa_next) {
|
||||
+ assert(it->ifa_name != NULL);
|
||||
+ if (strcmp(it->ifa_name, "loopback") == 0) {
|
||||
+ saw_loopback = 1;
|
||||
+ assert((it->ifa_flags & IFF_LOOPBACK) != 0);
|
||||
+ } else if (strcmp(it->ifa_name, "eth0") == 0) {
|
||||
+ saw_eth0 = 1;
|
||||
+ assert(if_nametoindex("eth0") == 2);
|
||||
+ assert(if_indextoname(2, name) == name);
|
||||
+ assert(strcmp(name, "eth0") == 0);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ names = if_nameindex();
|
||||
+ assert(names != NULL);
|
||||
+ assert(names[0].if_index == 1 && strcmp(names[0].if_name, "loopback") == 0);
|
||||
+ assert(names[1].if_index == 2 && strcmp(names[1].if_name, "eth0") == 0);
|
||||
+ assert(names[2].if_index == 0 && names[2].if_name == NULL);
|
||||
+
|
||||
+ assert(saw_loopback != 0);
|
||||
+ assert(saw_eth0 != 0);
|
||||
+ if_freenameindex((struct if_nameindex *)names);
|
||||
+ freeifaddrs(list);
|
||||
+ puts("getifaddrs ok");
|
||||
+ return 0;
|
||||
+}
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
diff --git a/src/header/netinet_in/cbindgen.toml b/src/header/netinet_in/cbindgen.toml
|
||||
index d88dc7f..24fe4bc 100644
|
||||
--- a/src/header/netinet_in/cbindgen.toml
|
||||
+++ b/src/header/netinet_in/cbindgen.toml
|
||||
@@ -113,6 +113,7 @@ include = [
|
||||
"ip_mreq_source",
|
||||
"group_req",
|
||||
"group_source_req",
|
||||
+ "in6_pktinfo",
|
||||
]
|
||||
|
||||
[export.rename]
|
||||
diff --git a/src/header/netinet_in/mod.rs b/src/header/netinet_in/mod.rs
|
||||
index 0e4ced5..9a2a913 100644
|
||||
--- a/src/header/netinet_in/mod.rs
|
||||
+++ b/src/header/netinet_in/mod.rs
|
||||
@@ -54,6 +54,34 @@ pub struct ipv6_mreq {
|
||||
pub ipv6mr_interface: u32,
|
||||
}
|
||||
|
||||
+/// See <https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/netinet_in.h.html>.
|
||||
+#[repr(C)]
|
||||
+pub struct in6_pktinfo {
|
||||
+ pub ipi6_addr: in6_addr,
|
||||
+ pub ipi6_ifindex: u32,
|
||||
+}
|
||||
+
|
||||
+impl Clone for in6_pktinfo {
|
||||
+ fn clone(&self) -> Self {
|
||||
+ Self {
|
||||
+ ipi6_addr: in6_addr { s6_addr: self.ipi6_addr.s6_addr },
|
||||
+ ipi6_ifindex: self.ipi6_ifindex,
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+impl Default for in6_pktinfo {
|
||||
+ fn default() -> Self {
|
||||
+ Self {
|
||||
+ ipi6_addr: in6_addr { s6_addr: [0; 16] },
|
||||
+ ipi6_ifindex: 0,
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+#[unsafe(no_mangle)]
|
||||
+pub extern "C" fn _cbindgen_export_in6_pktinfo(in6_pktinfo: in6_pktinfo) {}
|
||||
+
|
||||
// Address String Lengths
|
||||
/// See <https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/netinet_in.h.html>.
|
||||
pub const INET_ADDRSTRLEN: c_int = 16;
|
||||
@@ -106,6 +134,10 @@ pub const IPV6_DROP_MEMBERSHIP: c_int = 21;
|
||||
pub const IPV6_LEAVE_GROUP: c_int = 21;
|
||||
/// See <https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/netinet_in.h.html>.
|
||||
pub const IPV6_V6ONLY: c_int = 26;
|
||||
+/// Non-POSIX, see <https://www.man7.org/linux/man-pages/man7/ipv6.7.html>.
|
||||
+pub const IPV6_PKTINFO: c_int = 50;
|
||||
+/// Non-POSIX, see <https://www.man7.org/linux/man-pages/man7/ipv6.7.html>.
|
||||
+pub const IPV6_RECVPKTINFO: c_int = 49;
|
||||
/// Non-POSIX, see <https://www.man7.org/linux/man-pages/man7/ip.7.html>.
|
||||
pub const IP_MULTICAST_IF: c_int = 32;
|
||||
/// Non-POSIX, see <https://www.man7.org/linux/man-pages/man7/ip.7.html>.
|
||||
@@ -0,0 +1,132 @@
|
||||
diff --git a/src/header/spawn/cbindgen.toml b/src/header/spawn/cbindgen.toml
|
||||
new file mode 100644
|
||||
index 0000000..1db55cd
|
||||
--- /dev/null
|
||||
+++ b/src/header/spawn/cbindgen.toml
|
||||
@@ -0,0 +1,15 @@
|
||||
+sys_includes = ["stddef.h", "sys/types.h", "sched.h", "signal.h"]
|
||||
+include_guard = "_RELIBC_SPAWN_H"
|
||||
+language = "C"
|
||||
+style = "Type"
|
||||
+no_includes = true
|
||||
+cpp_compat = true
|
||||
+
|
||||
+[export]
|
||||
+include = [
|
||||
+ "posix_spawnattr_t",
|
||||
+ "posix_spawn_file_actions_t",
|
||||
+]
|
||||
+
|
||||
+[enum]
|
||||
+prefix_with_name = true
|
||||
diff --git a/src/header/spawn/mod.rs b/src/header/spawn/mod.rs
|
||||
new file mode 100644
|
||||
index 0000000..84ce717
|
||||
--- /dev/null
|
||||
+++ b/src/header/spawn/mod.rs
|
||||
@@ -0,0 +1,105 @@
|
||||
+//! `spawn.h` implementation. See <https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/spawn.h.html>.
|
||||
+
|
||||
+use crate::{
|
||||
+ error::{Errno, ResultExt},
|
||||
+ header::{
|
||||
+ errno::EINVAL,
|
||||
+ unistd::{execve, fork, _exit},
|
||||
+ },
|
||||
+ platform::{self, types::{c_char, c_int, c_short, pid_t}},
|
||||
+};
|
||||
+
|
||||
+pub const POSIX_SPAWN_RESETIDS: c_int = 0x01;
|
||||
+pub const POSIX_SPAWN_SETPGROUP: c_int = 0x02;
|
||||
+pub const POSIX_SPAWN_SETSCHEDPARAM: c_int = 0x04;
|
||||
+pub const POSIX_SPAWN_SETSCHEDULER: c_int = 0x08;
|
||||
+pub const POSIX_SPAWN_SETSIGDEF: c_int = 0x10;
|
||||
+pub const POSIX_SPAWN_SETSIGMASK: c_int = 0x20;
|
||||
+pub const POSIX_SPAWN_SETSID: c_int = 0x80;
|
||||
+
|
||||
+#[repr(C)]
|
||||
+pub struct posix_spawn_file_actions_t {
|
||||
+ _opaque: [u8; 128],
|
||||
+}
|
||||
+
|
||||
+#[repr(C)]
|
||||
+pub struct posix_spawnattr_t {
|
||||
+ pub flags: c_short,
|
||||
+ pub pgroup: pid_t,
|
||||
+ _reserved: [u64; 8],
|
||||
+}
|
||||
+
|
||||
+#[unsafe(no_mangle)]
|
||||
+pub unsafe extern "C" fn posix_spawn_file_actions_init(
|
||||
+ file_actions: *mut posix_spawn_file_actions_t,
|
||||
+) -> c_int {
|
||||
+ if file_actions.is_null() {
|
||||
+ return Err::<c_int, _>(Errno(EINVAL)).or_minus_one_errno();
|
||||
+ }
|
||||
+ unsafe { core::ptr::write_bytes(file_actions, 0, 1) };
|
||||
+ 0
|
||||
+}
|
||||
+
|
||||
+#[unsafe(no_mangle)]
|
||||
+pub unsafe extern "C" fn posix_spawn_file_actions_destroy(
|
||||
+ _file_actions: *mut posix_spawn_file_actions_t,
|
||||
+) -> c_int { 0 }
|
||||
+
|
||||
+#[unsafe(no_mangle)]
|
||||
+pub unsafe extern "C" fn posix_spawn_file_actions_addopen(
|
||||
+ _file_actions: *mut posix_spawn_file_actions_t,
|
||||
+ _fildes: c_int, _path: *const c_char, _oflag: c_int, _mode: c_int,
|
||||
+) -> c_int { 0 }
|
||||
+
|
||||
+#[unsafe(no_mangle)]
|
||||
+pub unsafe extern "C" fn posix_spawn_file_actions_addclose(
|
||||
+ _file_actions: *mut posix_spawn_file_actions_t,
|
||||
+ _fildes: c_int,
|
||||
+) -> c_int { 0 }
|
||||
+
|
||||
+#[unsafe(no_mangle)]
|
||||
+pub unsafe extern "C" fn posix_spawn_file_actions_adddup2(
|
||||
+ _file_actions: *mut posix_spawn_file_actions_t,
|
||||
+ _fildes: c_int, _newfildes: c_int,
|
||||
+) -> c_int { 0 }
|
||||
+
|
||||
+#[unsafe(no_mangle)]
|
||||
+pub unsafe extern "C" fn posix_spawnattr_init(attr: *mut posix_spawnattr_t) -> c_int {
|
||||
+ if attr.is_null() { return Err::<c_int, _>(Errno(EINVAL)).or_minus_one_errno(); }
|
||||
+ unsafe { core::ptr::write_bytes(attr, 0, 1) };
|
||||
+ 0
|
||||
+}
|
||||
+
|
||||
+#[unsafe(no_mangle)]
|
||||
+pub unsafe extern "C" fn posix_spawnattr_destroy(_attr: *mut posix_spawnattr_t) -> c_int { 0 }
|
||||
+
|
||||
+#[unsafe(no_mangle)]
|
||||
+pub unsafe extern "C" fn posix_spawnp(
|
||||
+ pid: *mut pid_t, file: *const c_char,
|
||||
+ file_actions: *const posix_spawn_file_actions_t,
|
||||
+ attrp: *const posix_spawnattr_t,
|
||||
+ argv: *const *mut c_char, envp: *const *mut c_char,
|
||||
+) -> c_int {
|
||||
+ unsafe { posix_spawn(pid, file, file_actions, attrp, argv, envp) }
|
||||
+}
|
||||
+
|
||||
+#[unsafe(no_mangle)]
|
||||
+pub unsafe extern "C" fn posix_spawn(
|
||||
+ pid: *mut pid_t, file: *const c_char,
|
||||
+ _file_actions: *const posix_spawn_file_actions_t,
|
||||
+ _attrp: *const posix_spawnattr_t,
|
||||
+ argv: *const *mut c_char, envp: *const *mut c_char,
|
||||
+) -> c_int {
|
||||
+ if pid.is_null() || file.is_null() || argv.is_null() {
|
||||
+ return EINVAL;
|
||||
+ }
|
||||
+ let child = unsafe { fork() };
|
||||
+ if child < 0 { return platform::ERRNO.get(); }
|
||||
+ if child == 0 {
|
||||
+ unsafe { execve(file, argv, envp); }
|
||||
+ _exit(127);
|
||||
+ }
|
||||
+ unsafe { *pid = child };
|
||||
+ 0
|
||||
+}
|
||||
+
|
||||
@@ -0,0 +1,60 @@
|
||||
diff --git a/src/header/threads/cbindgen.toml b/src/header/threads/cbindgen.toml
|
||||
new file mode 100644
|
||||
index 0000000..3f90606
|
||||
--- /dev/null
|
||||
+++ b/src/header/threads/cbindgen.toml
|
||||
@@ -0,0 +1,17 @@
|
||||
+sys_includes = ["stddef.h", "pthread.h", "time.h"]
|
||||
+include_guard = "_RELIBC_THREADS_H"
|
||||
+language = "C"
|
||||
+style = "Type"
|
||||
+no_includes = true
|
||||
+cpp_compat = true
|
||||
+
|
||||
+[export]
|
||||
+include = [
|
||||
+ "thrd_t",
|
||||
+ "mtx_t",
|
||||
+ "cnd_t",
|
||||
+ "thrd_start_t",
|
||||
+]
|
||||
+
|
||||
+[enum]
|
||||
+prefix_with_name = true
|
||||
diff --git a/src/header/threads/mod.rs b/src/header/threads/mod.rs
|
||||
new file mode 100644
|
||||
index 0000000..9ab9496
|
||||
--- /dev/null
|
||||
+++ b/src/header/threads/mod.rs
|
||||
@@ -0,0 +1,31 @@
|
||||
+//! `threads.h` implementation — C11 threads type definitions and constants.
|
||||
+//!
|
||||
+//! Full C11 threads API (thrd_create, mtx_lock, cnd_wait, etc.) requires
|
||||
+//! a deeper pthread integration layer; this module provides the type
|
||||
+//! definitions and constants for C11 header compatibility.
|
||||
+
|
||||
+use crate::platform::types::c_int;
|
||||
+
|
||||
+pub type thrd_start_t = Option<unsafe extern "C" fn(*mut core::ffi::c_void) -> c_int>;
|
||||
+
|
||||
+pub const thrd_success: c_int = 0;
|
||||
+pub const thrd_nomem: c_int = -1;
|
||||
+pub const thrd_timedout: c_int = -2;
|
||||
+pub const thrd_busy: c_int = -3;
|
||||
+pub const thrd_error: c_int = -4;
|
||||
+
|
||||
+pub const mtx_plain: c_int = 0;
|
||||
+pub const mtx_timed: c_int = 1;
|
||||
+
|
||||
+// Opaque types; sizes match relibc's pthread backing types
|
||||
+// (pthread_t = *mut c_void = 8 bytes, pthread_mutex_t = 12 bytes,
|
||||
+// pthread_cond_t = 8 bytes)
|
||||
+#[repr(C)]
|
||||
+pub struct thrd_t { _priv: *mut core::ffi::c_void }
|
||||
+#[repr(C)]
|
||||
+pub struct mtx_t { _priv: [u8; 12] }
|
||||
+#[repr(C)]
|
||||
+pub struct cnd_t { _priv: [u8; 8] }
|
||||
+
|
||||
+#[unsafe(no_mangle)]
|
||||
+pub unsafe extern "C" fn thrd_yield() {}
|
||||
@@ -0,0 +1,177 @@
|
||||
diff --git a/src/header/sys_timerfd/cbindgen.toml b/src/header/sys_timerfd/cbindgen.toml
|
||||
new file mode 100644
|
||||
index 0000000..9469888
|
||||
--- /dev/null
|
||||
+++ b/src/header/sys_timerfd/cbindgen.toml
|
||||
@@ -0,0 +1,12 @@
|
||||
+sys_includes = ["time.h"]
|
||||
+include_guard = "_SYS_TIMERFD_H"
|
||||
+language = "C"
|
||||
+style = "Tag"
|
||||
+no_includes = true
|
||||
+cpp_compat = true
|
||||
+
|
||||
+[enum]
|
||||
+prefix_with_name = true
|
||||
+
|
||||
+[export.rename]
|
||||
+"itimerspec" = "struct itimerspec"
|
||||
diff --git a/src/header/sys_timerfd/mod.rs b/src/header/sys_timerfd/mod.rs
|
||||
index 0959d39..916066f 100644
|
||||
--- a/src/header/sys_timerfd/mod.rs
|
||||
+++ b/src/header/sys_timerfd/mod.rs
|
||||
@@ -1,10 +1,8 @@
|
||||
//! `sys/timerfd.h` implementation.
|
||||
//!
|
||||
//! Non-POSIX, see <https://man7.org/linux/man-pages/man2/timerfd_create.2.html>.
|
||||
-
|
||||
use alloc::{collections::BTreeMap, format};
|
||||
use core::{mem, slice, sync::atomic::{AtomicBool, Ordering}};
|
||||
-
|
||||
use crate::{
|
||||
c_str::{CStr, CString},
|
||||
error::{Errno, ResultExt},
|
||||
@@ -14,13 +12,9 @@ use crate::{
|
||||
fcntl::{O_CLOEXEC, O_NONBLOCK, O_RDWR},
|
||||
},
|
||||
out::Out,
|
||||
- platform::{
|
||||
- Pal, Sys,
|
||||
- types::{c_int, clockid_t},
|
||||
- },
|
||||
+ platform::{Pal, Sys, types::{c_int, clockid_t}},
|
||||
sync::Mutex,
|
||||
};
|
||||
-
|
||||
pub use crate::header::time::itimerspec;
|
||||
|
||||
pub const TFD_CLOEXEC: c_int = 0x80000;
|
||||
@@ -30,104 +24,64 @@ pub const TFD_TIMER_CANCEL_ON_SET: c_int = 0x2;
|
||||
|
||||
const NSEC_PER_SEC: i64 = 1_000_000_000;
|
||||
|
||||
+struct TimerState { clockid: clockid_t }
|
||||
+
|
||||
static MAP_INIT: AtomicBool = AtomicBool::new(false);
|
||||
-static TIMERFD_CLOCKIDS: Mutex<Option<BTreeMap<c_int, clockid_t>>> = Mutex::new(None);
|
||||
+static TIMERFD_STATE: Mutex<Option<BTreeMap<c_int, TimerState>>> = Mutex::new(None);
|
||||
|
||||
-fn with_map<R>(f: impl FnOnce(&mut BTreeMap<c_int, clockid_t>) -> R) -> R {
|
||||
- let mut guard = TIMERFD_CLOCKIDS.lock();
|
||||
- if !MAP_INIT.load(Ordering::Acquire) {
|
||||
- *guard = Some(BTreeMap::new());
|
||||
- MAP_INIT.store(true, Ordering::Release);
|
||||
- }
|
||||
+fn with_map<R>(f: impl FnOnce(&mut BTreeMap<c_int, TimerState>) -> R) -> R {
|
||||
+ let mut guard = TIMERFD_STATE.lock();
|
||||
+ if !MAP_INIT.load(Ordering::Acquire) { *guard = Some(BTreeMap::new()); MAP_INIT.store(true, Ordering::Release); }
|
||||
f(guard.as_mut().unwrap())
|
||||
}
|
||||
-
|
||||
fn add_timespec(a: ×pec, b: ×pec) -> timespec {
|
||||
let total_nsec = a.tv_nsec as i64 + b.tv_nsec as i64;
|
||||
let mut sec = a.tv_sec + b.tv_sec + (total_nsec / NSEC_PER_SEC) as i64;
|
||||
let mut nsec = (total_nsec % NSEC_PER_SEC) as i64;
|
||||
- if nsec < 0 {
|
||||
- sec -= 1;
|
||||
- nsec += NSEC_PER_SEC;
|
||||
- }
|
||||
+ if nsec < 0 { sec -= 1; nsec += NSEC_PER_SEC; }
|
||||
timespec { tv_sec: sec, tv_nsec: nsec }
|
||||
}
|
||||
-
|
||||
fn read_exact(fd: c_int, buf: &mut [u8]) -> Result<(), Errno> {
|
||||
- match Sys::read(fd, buf)? {
|
||||
- n if n == buf.len() => Ok(()),
|
||||
- _ => Err(Errno(EIO)),
|
||||
- }
|
||||
+ match Sys::read(fd, buf)? { n if n == buf.len() => Ok(()), _ => Err(Errno(EIO)) }
|
||||
}
|
||||
-
|
||||
fn write_exact(fd: c_int, buf: &[u8]) -> Result<(), Errno> {
|
||||
- match Sys::write(fd, buf)? {
|
||||
- n if n == buf.len() => Ok(()),
|
||||
- _ => Err(Errno(EIO)),
|
||||
- }
|
||||
+ match Sys::write(fd, buf)? { n if n == buf.len() => Ok(()), _ => Err(Errno(EIO)) }
|
||||
}
|
||||
|
||||
#[unsafe(no_mangle)]
|
||||
pub extern "C" fn timerfd_create(clockid: clockid_t, flags: c_int) -> c_int {
|
||||
- let supported = TFD_CLOEXEC | TFD_NONBLOCK;
|
||||
- if flags & !supported != 0 {
|
||||
- return Err::<c_int, _>(Errno(EINVAL)).or_minus_one_errno();
|
||||
- }
|
||||
-
|
||||
+ if flags & !(TFD_CLOEXEC | TFD_NONBLOCK) != 0 { return Err::<c_int,_>(Errno(EINVAL)).or_minus_one_errno(); }
|
||||
let mut oflag = O_RDWR;
|
||||
- if flags & TFD_CLOEXEC == TFD_CLOEXEC {
|
||||
- oflag |= O_CLOEXEC;
|
||||
- }
|
||||
- if flags & TFD_NONBLOCK == TFD_NONBLOCK {
|
||||
- oflag |= O_NONBLOCK;
|
||||
- }
|
||||
-
|
||||
- let path = match CString::new(format!("/scheme/time/{clockid}")) {
|
||||
- Ok(path) => path,
|
||||
- Err(_) => return Err::<c_int, _>(Errno(EINVAL)).or_minus_one_errno(),
|
||||
- };
|
||||
- let fd = Sys::open(CStr::borrow(&path), oflag, 0).or_minus_one_errno()?;
|
||||
-
|
||||
- // Register the clockid for this fd so timerfd_settime can convert relative times
|
||||
- with_map(|map| { map.insert(fd, clockid); });
|
||||
-
|
||||
+ if flags & TFD_CLOEXEC == TFD_CLOEXEC { oflag |= O_CLOEXEC; }
|
||||
+ if flags & TFD_NONBLOCK == TFD_NONBLOCK { oflag |= O_NONBLOCK; }
|
||||
+ let path = match CString::new(format!("/scheme/time/{clockid}")) { Ok(p) => p, Err(_) => return Err::<c_int,_>(Errno(EINVAL)).or_minus_one_errno() };
|
||||
+ let fd = match Sys::open(CStr::borrow(&path), oflag, 0) { Ok(fd) => fd, Err(Errno(e)) => return Err::<c_int,_>(Errno(e)).or_minus_one_errno() };
|
||||
+ with_map(|map| { map.insert(fd, TimerState { clockid }); });
|
||||
fd
|
||||
}
|
||||
|
||||
#[unsafe(no_mangle)]
|
||||
pub unsafe extern "C" fn timerfd_settime(fd: c_int, flags: c_int, new: *const itimerspec, old: *mut itimerspec) -> c_int {
|
||||
- let supported = TFD_TIMER_ABSTIME | TFD_TIMER_CANCEL_ON_SET;
|
||||
- if flags & !supported != 0 {
|
||||
- return Err::<c_int, _>(Errno(EINVAL)).or_minus_one_errno();
|
||||
- }
|
||||
- if new.is_null() {
|
||||
- return Err::<c_int, _>(Errno(EFAULT)).or_minus_one_errno();
|
||||
- }
|
||||
- if !old.is_null() && unsafe { timerfd_gettime(fd, old) } < 0 {
|
||||
- return -1;
|
||||
- }
|
||||
+ if flags & !(TFD_TIMER_ABSTIME | TFD_TIMER_CANCEL_ON_SET) != 0 { return Err::<c_int,_>(Errno(EINVAL)).or_minus_one_errno(); }
|
||||
+ if new.is_null() { return Err::<c_int,_>(Errno(EFAULT)).or_minus_one_errno(); }
|
||||
+ if !old.is_null() && unsafe { timerfd_gettime(fd, old) } < 0 { return -1; }
|
||||
let spec = unsafe { &*new };
|
||||
- let mut value = spec.it_value;
|
||||
-
|
||||
- // Convert relative time to absolute if TFD_TIMER_ABSTIME is not set
|
||||
+ let mut value = spec.it_value.clone();
|
||||
+ // TFD_TIMER_CANCEL_ON_SET: flag accepted; clock-change notification requires
|
||||
+ // kernel infrastructure not yet available. This is a bounded compatibility surface.
|
||||
if flags & TFD_TIMER_ABSTIME == 0 {
|
||||
- let clockid = with_map(|map| map.get(&fd).copied()).unwrap_or(0);
|
||||
+ let clockid = with_map(|map| map.get(&fd).map_or(0, |s| s.clockid));
|
||||
let mut now = timespec::default();
|
||||
- if Sys::clock_gettime(clockid, Out::from_mut(&mut now)).is_err() {
|
||||
- return Err::<c_int, _>(Errno(EBADF)).or_minus_one_errno();
|
||||
- }
|
||||
+ if Sys::clock_gettime(clockid, Out::from_mut(&mut now)).is_err() { return Err::<c_int,_>(Errno(EBADF)).or_minus_one_errno(); }
|
||||
value = add_timespec(&now, &value);
|
||||
}
|
||||
-
|
||||
let buf = unsafe { slice::from_raw_parts((&raw const value).cast::<u8>(), mem::size_of::<timespec>()) };
|
||||
write_exact(fd, buf).map(|()| 0).or_minus_one_errno()
|
||||
}
|
||||
|
||||
#[unsafe(no_mangle)]
|
||||
pub unsafe extern "C" fn timerfd_gettime(fd: c_int, curr: *mut itimerspec) -> c_int {
|
||||
- if curr.is_null() {
|
||||
- return Err::<c_int, _>(Errno(EFAULT)).or_minus_one_errno();
|
||||
- }
|
||||
+ if curr.is_null() { return Err::<c_int,_>(Errno(EFAULT)).or_minus_one_errno(); }
|
||||
let curr = unsafe { &mut *curr };
|
||||
curr.it_interval = timespec::default();
|
||||
let buf = unsafe { slice::from_raw_parts_mut((&raw mut curr.it_value).cast::<u8>(), mem::size_of::<timespec>()) };
|
||||
@@ -1,122 +1,25 @@
|
||||
diff -ruN a/src/header/mod.rs b/src/header/mod.rs
|
||||
--- a/src/header/mod.rs 2026-04-15 09:58:03.811510680 +0100
|
||||
+++ b/src/header/mod.rs 2026-04-15 09:59:40.902089070 +0100
|
||||
@@ -103,6 +103,7 @@
|
||||
pub mod sys_stat;
|
||||
pub mod sys_statvfs;
|
||||
pub mod sys_time;
|
||||
+pub mod sys_timerfd;
|
||||
#[deprecated]
|
||||
pub mod sys_timeb;
|
||||
//pub mod sys_times;
|
||||
diff -ruN a/src/header/sys_timerfd/cbindgen.toml b/src/header/sys_timerfd/cbindgen.toml
|
||||
--- a/src/header/sys_timerfd/cbindgen.toml 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ b/src/header/sys_timerfd/cbindgen.toml 2026-04-15 09:59:40.902120449 +0100
|
||||
@@ -0,0 +1,12 @@
|
||||
+sys_includes = ["time.h"]
|
||||
+include_guard = "_SYS_TIMERFD_H"
|
||||
+language = "C"
|
||||
+style = "Tag"
|
||||
+no_includes = true
|
||||
+cpp_compat = true
|
||||
+
|
||||
+[enum]
|
||||
+prefix_with_name = true
|
||||
+
|
||||
+[export.rename]
|
||||
+"itimerspec" = "struct itimerspec"
|
||||
diff -ruN a/src/header/sys_timerfd/mod.rs b/src/header/sys_timerfd/mod.rs
|
||||
--- a/src/header/sys_timerfd/mod.rs 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ b/src/header/sys_timerfd/mod.rs 2026-04-15 09:59:40.902160103 +0100
|
||||
@@ -0,0 +1,91 @@
|
||||
+//! `sys/timerfd.h` implementation.
|
||||
+//!
|
||||
+//! Non-POSIX, see <https://man7.org/linux/man-pages/man2/timerfd_create.2.html>.
|
||||
+
|
||||
+use alloc::format;
|
||||
+use core::{mem, slice};
|
||||
+
|
||||
+use crate::{
|
||||
+ c_str::{CStr, CString},
|
||||
+ error::{Errno, ResultExt},
|
||||
+ header::{
|
||||
+ bits_timespec::timespec,
|
||||
+ errno::{EFAULT, EINVAL, EIO},
|
||||
+ fcntl::{O_CLOEXEC, O_NONBLOCK, O_RDWR},
|
||||
+ },
|
||||
+ platform::{
|
||||
+ Pal, Sys,
|
||||
+ types::{c_int, clockid_t},
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+pub use crate::header::time::itimerspec;
|
||||
+
|
||||
+pub const TFD_CLOEXEC: c_int = 0x80000;
|
||||
+pub const TFD_NONBLOCK: c_int = 0x800;
|
||||
+pub const TFD_TIMER_ABSTIME: c_int = 0x1;
|
||||
+pub const TFD_TIMER_CANCEL_ON_SET: c_int = 0x2;
|
||||
+
|
||||
+fn read_exact(fd: c_int, buf: &mut [u8]) -> Result<(), Errno> {
|
||||
+ match Sys::read(fd, buf)? {
|
||||
+ n if n == buf.len() => Ok(()),
|
||||
+ _ => Err(Errno(EIO)),
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+fn write_exact(fd: c_int, buf: &[u8]) -> Result<(), Errno> {
|
||||
+ match Sys::write(fd, buf)? {
|
||||
+ n if n == buf.len() => Ok(()),
|
||||
+ _ => Err(Errno(EIO)),
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+#[unsafe(no_mangle)]
|
||||
+pub extern "C" fn timerfd_create(clockid: clockid_t, flags: c_int) -> c_int {
|
||||
+ let supported = TFD_CLOEXEC | TFD_NONBLOCK;
|
||||
+ if flags & !supported != 0 {
|
||||
+ return Err::<c_int, _>(Errno(EINVAL)).or_minus_one_errno();
|
||||
+ }
|
||||
+
|
||||
+ let mut oflag = O_RDWR;
|
||||
+ if flags & TFD_CLOEXEC == TFD_CLOEXEC {
|
||||
+ oflag |= O_CLOEXEC;
|
||||
+ }
|
||||
+ if flags & TFD_NONBLOCK == TFD_NONBLOCK {
|
||||
+ oflag |= O_NONBLOCK;
|
||||
+ }
|
||||
+
|
||||
+ let path = match CString::new(format!("/scheme/time/{clockid}")) {
|
||||
+ Ok(path) => path,
|
||||
+ Err(_) => return Err::<c_int, _>(Errno(EINVAL)).or_minus_one_errno(),
|
||||
diff --git a/src/header/sys_timerfd/mod.rs b/src/header/sys_timerfd/mod.rs
|
||||
index 0959d39..9a4a23e 100644
|
||||
--- a/src/header/sys_timerfd/mod.rs
|
||||
+++ b/src/header/sys_timerfd/mod.rs
|
||||
@@ -86,7 +86,10 @@ pub extern "C" fn timerfd_create(clockid: clockid_t, flags: c_int) -> c_int {
|
||||
Ok(path) => path,
|
||||
Err(_) => return Err::<c_int, _>(Errno(EINVAL)).or_minus_one_errno(),
|
||||
};
|
||||
- let fd = Sys::open(CStr::borrow(&path), oflag, 0).or_minus_one_errno()?;
|
||||
+ let fd = match Sys::open(CStr::borrow(&path), oflag, 0) {
|
||||
+ Ok(fd) => fd,
|
||||
+ Err(Errno(e)) => { return Err::<c_int, _>(Errno(e)).or_minus_one_errno(); }
|
||||
+ };
|
||||
+ Sys::open(CStr::borrow(&path), oflag, 0).or_minus_one_errno()
|
||||
+}
|
||||
+
|
||||
+#[unsafe(no_mangle)]
|
||||
+pub unsafe extern "C" fn timerfd_settime(fd: c_int, flags: c_int, new: *const itimerspec, old: *mut itimerspec) -> c_int {
|
||||
+ let supported = TFD_TIMER_ABSTIME;
|
||||
+ if flags & !supported != 0 {
|
||||
+ return Err::<c_int, _>(Errno(EINVAL)).or_minus_one_errno();
|
||||
+ }
|
||||
+ if new.is_null() {
|
||||
+ return Err::<c_int, _>(Errno(EFAULT)).or_minus_one_errno();
|
||||
+ }
|
||||
+ if !old.is_null() && unsafe { timerfd_gettime(fd, old) } < 0 {
|
||||
+ return -1;
|
||||
+ }
|
||||
+ let spec = unsafe { &*new };
|
||||
+ let buf = unsafe { slice::from_raw_parts((&raw const spec.it_value).cast::<u8>(), mem::size_of::<timespec>()) };
|
||||
+ write_exact(fd, buf).map(|()| 0).or_minus_one_errno()
|
||||
+}
|
||||
+
|
||||
+#[unsafe(no_mangle)]
|
||||
+pub unsafe extern "C" fn timerfd_gettime(fd: c_int, curr: *mut itimerspec) -> c_int {
|
||||
+ if curr.is_null() {
|
||||
+ return Err::<c_int, _>(Errno(EFAULT)).or_minus_one_errno();
|
||||
+ }
|
||||
+ let curr = unsafe { &mut *curr };
|
||||
+ curr.it_interval = timespec::default();
|
||||
+ let buf = unsafe { slice::from_raw_parts_mut((&raw mut curr.it_value).cast::<u8>(), mem::size_of::<timespec>()) };
|
||||
+ read_exact(fd, buf).map(|()| 0).or_minus_one_errno()
|
||||
+}
|
||||
|
||||
// Register the clockid for this fd so timerfd_settime can convert relative times
|
||||
with_map(|map| { map.insert(fd, clockid); });
|
||||
@@ -107,7 +110,7 @@ pub unsafe extern "C" fn timerfd_settime(fd: c_int, flags: c_int, new: *const it
|
||||
return -1;
|
||||
}
|
||||
let spec = unsafe { &*new };
|
||||
- let mut value = spec.it_value;
|
||||
+ let mut value = spec.it_value.clone();
|
||||
|
||||
// Convert relative time to absolute if TFD_TIMER_ABSTIME is not set
|
||||
if flags & TFD_TIMER_ABSTIME == 0 {
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
# clang-format
|
||||
32149dc002ae574ed41f111bf52712b1765b906b
|
||||
@@ -0,0 +1,8 @@
|
||||
build
|
||||
.clang-format
|
||||
/compile_commands.json
|
||||
.clangd
|
||||
.idea
|
||||
/cmake-build*
|
||||
.cache
|
||||
.vscode
|
||||
@@ -0,0 +1,12 @@
|
||||
# SPDX-FileCopyrightText: None
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
include:
|
||||
- project: sysadmin/ci-utilities
|
||||
file:
|
||||
- /gitlab-templates/linux.yml
|
||||
- /gitlab-templates/freebsd.yml
|
||||
- /gitlab-templates/linux-qt6.yml
|
||||
- /gitlab-templates/windows.yml
|
||||
- /gitlab-templates/freebsd-qt6.yml
|
||||
- /gitlab-templates/windows-qt6.yml
|
||||
@@ -0,0 +1,41 @@
|
||||
# SPDX-FileCopyrightText: None
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
Dependencies:
|
||||
- 'on': ['Linux/Qt5', 'FreeBSD/Qt5', 'Windows/Qt5']
|
||||
'require':
|
||||
'frameworks/extra-cmake-modules': '@latest'
|
||||
'frameworks/kconfig': '@latest'
|
||||
'frameworks/kconfigwidgets': '@latest'
|
||||
'frameworks/kcoreaddons': '@latest'
|
||||
'frameworks/kguiaddons': '@latest'
|
||||
'frameworks/ki18n': '@latest'
|
||||
'frameworks/kiconthemes': '@latest'
|
||||
'frameworks/kirigami': '@latest'
|
||||
'frameworks/kwindowsystem': '@latest'
|
||||
|
||||
- 'on': ['Linux/Qt5', 'FreeBSD/Qt5']
|
||||
'require':
|
||||
'frameworks/frameworkintegration': '@latest'
|
||||
'frameworks/kcmutils': '@latest'
|
||||
|
||||
- 'on': ['Linux/Qt6', 'FreeBSD/Qt6', 'Windows/Qt6']
|
||||
'require':
|
||||
'frameworks/extra-cmake-modules': '@latest-kf6'
|
||||
'frameworks/kconfig': '@latest-kf6'
|
||||
'frameworks/kcoreaddons': '@latest-kf6'
|
||||
'frameworks/kguiaddons': '@latest-kf6'
|
||||
'frameworks/ki18n': '@latest-kf6'
|
||||
'frameworks/kiconthemes': '@latest-kf6'
|
||||
'frameworks/kirigami': '@latest-kf6'
|
||||
'frameworks/kwindowsystem': '@latest-kf6'
|
||||
'frameworks/kcolorscheme': '@latest-kf6'
|
||||
|
||||
- 'on': ['Linux/Qt6', 'FreeBSD/Qt6']
|
||||
'require':
|
||||
'plasma/kdecoration': '@same'
|
||||
'frameworks/frameworkintegration': '@latest-kf6'
|
||||
'frameworks/kcmutils': '@latest-kf6'
|
||||
|
||||
Options:
|
||||
require-passing-tests-on: [ 'Linux', 'FreeBSD', 'Windows']
|
||||
@@ -0,0 +1,6 @@
|
||||
Cursors:
|
||||
Ken Vermette <vermette@gmail.com>
|
||||
|
||||
Kstyle:
|
||||
Hugo Pereira Da Costa <hugo.pereira@free.fr> - Developer
|
||||
Andrew Lake <jamboarder@gmail.com> - Designer
|
||||
@@ -0,0 +1,11 @@
|
||||
@PACKAGE_INIT@
|
||||
|
||||
set(BREEZE_WITH_KDECORATION @WITH_DECORATIONS@)
|
||||
if(${BREEZE_WITH_KDECORATION})
|
||||
set(BREEZE_KDECORATION_PLUGIN_ID "org.kde.breeze")
|
||||
else()
|
||||
set(BREEZE_KDECORATION_PLUGIN_ID "")
|
||||
endif()
|
||||
|
||||
set(BREEZE_STYLE_NAME "breeze")
|
||||
set(BREEZE_COLOR_INSTALL_ROOT "@PACKAGE_KDE_INSTALL_FULL_DATADIR@/color-schemes/")
|
||||
@@ -0,0 +1,219 @@
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
project(breeze)
|
||||
set(PROJECT_VERSION "6.3.4")
|
||||
set(PROJECT_VERSION_MAJOR 6)
|
||||
|
||||
set(KF5_MIN_VERSION "5.102.0")
|
||||
set(KF6_MIN_VERSION "6.10.0")
|
||||
set(KDE_COMPILERSETTINGS_LEVEL "5.82")
|
||||
set(QT5_MIN_VERSION "5.15.2")
|
||||
set(QT_MIN_VERSION "6.7.0")
|
||||
|
||||
include(GenerateExportHeader)
|
||||
include(WriteBasicConfigVersionFile)
|
||||
include(FeatureSummary)
|
||||
|
||||
find_package(ECM ${KF5_MIN_VERSION} REQUIRED NO_MODULE)
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 20)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
# We need this because we can't include KDECMakeSettings here, because that
|
||||
# would need KDEInstallDirs, which we can only include in the qt{5,6} builds
|
||||
# to get the correct installation dirs for each Qt version.
|
||||
option(BUILD_TESTING "Build the testing tree." ON)
|
||||
if(BUILD_TESTING)
|
||||
enable_testing()
|
||||
endif()
|
||||
|
||||
include(CMakePackageConfigHelpers)
|
||||
include(ECMInstallIcons)
|
||||
include(ECMQtDeclareLoggingCategory)
|
||||
include(KDECompilerSettings NO_POLICY_SCOPE)
|
||||
include(KDEClangFormat)
|
||||
include(KDEGitCommitHooks)
|
||||
|
||||
include(GtkUpdateIconCache)
|
||||
|
||||
|
||||
option(BUILD_QT5 "Build Qt5 style" ON)
|
||||
option(BUILD_QT6 "Build with Qt6" ON)
|
||||
|
||||
set(QT_NO_CREATE_VERSIONLESS_TARGETS ON)
|
||||
set(QT_NO_CREATE_VERSIONLESS_FUNCTIONS ON)
|
||||
|
||||
# For KDE CI only. As the current infrastructure doesn't allow us to set CMAKE options per build variant
|
||||
if($ENV{CI_JOB_NAME_SLUG} MATCHES "qt5")
|
||||
set(BUILD_QT5 ON)
|
||||
set(BUILD_QT6 OFF)
|
||||
elseif($ENV{CI_JOB_NAME_SLUG} MATCHES "qt6")
|
||||
set(BUILD_QT5 OFF)
|
||||
set(BUILD_QT6 ON)
|
||||
endif()
|
||||
|
||||
function(build_Qt5)
|
||||
set(QT_MAJOR_VERSION 5)
|
||||
include(KDEInstallDirs5)
|
||||
include(KDECMakeSettings)
|
||||
|
||||
find_package(Qt5 ${QT5_MIN_VERSION} REQUIRED CONFIG COMPONENTS Widgets)
|
||||
|
||||
if(UNIX AND NOT APPLE AND NOT ANDROID)
|
||||
find_package(Qt5 ${QT5_MIN_VERSION} CONFIG REQUIRED DBus)
|
||||
set(HAVE_QTDBUS ${Qt5DBus_FOUND})
|
||||
|
||||
find_package(KF5FrameworkIntegration ${KF5_MIN_VERSION} CONFIG )
|
||||
set_package_properties(KF${QT_MAJOR_VERSION}FrameworkIntegration PROPERTIES
|
||||
DESCRIPTION "KF${QT_MAJOR_VERSION} Framework Integration"
|
||||
URL "https://projects.kde.org/projects/frameworks/frameworkintegration"
|
||||
TYPE OPTIONAL
|
||||
PURPOSE "Required to use KStyle convenience functionalities in style")
|
||||
|
||||
find_package(Qt5 ${QT5_MIN_VERSION} OPTIONAL_COMPONENTS X11Extras)
|
||||
set_package_properties(KF${QT_MAJOR_VERSION}FrameworkIntegration PROPERTIES
|
||||
DESCRIPTION "KF${QT_MAJOR_VERSION} Framework Integration"
|
||||
URL "https://projects.kde.org/projects/frameworks/frameworkintegration"
|
||||
TYPE OPTIONAL
|
||||
PURPOSE "Required to use KStyle convenience functionalities in style")
|
||||
endif()
|
||||
|
||||
find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS
|
||||
CoreAddons
|
||||
Config
|
||||
ConfigWidgets
|
||||
GuiAddons
|
||||
IconThemes
|
||||
WindowSystem)
|
||||
|
||||
find_package(Qt5 ${QT5_MIN_VERSION} OPTIONAL_COMPONENTS Quick)
|
||||
if(${Qt5Quick_FOUND})
|
||||
find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS Kirigami2)
|
||||
endif()
|
||||
|
||||
set(BREEZE_HAVE_KSTYLE ${KF5FrameworkIntegration_FOUND})
|
||||
set(BREEZE_HAVE_QTQUICK ${Qt5Quick_FOUND})
|
||||
|
||||
add_subdirectory(kstyle kstyle5)
|
||||
add_subdirectory(libbreezecommon libbreezecommon5)
|
||||
|
||||
unset(QUERY_EXECUTABLE CACHE)
|
||||
endfunction()
|
||||
if(BUILD_QT5)
|
||||
build_Qt5()
|
||||
endif()
|
||||
|
||||
function(build_Qt6)
|
||||
set(QT_MAJOR_VERSION 6)
|
||||
include(KDEInstallDirs6)
|
||||
include(KDECMakeSettings)
|
||||
|
||||
if(UNIX AND NOT APPLE AND NOT ANDROID)
|
||||
find_package(Qt6 ${REQUIRED_QT_VERSION} CONFIG REQUIRED DBus)
|
||||
set(HAVE_QTDBUS ${Qt6DBus_FOUND})
|
||||
|
||||
option(WITH_DECORATIONS "Build Breeze window decorations for KWin" ON)
|
||||
option(WITH_WALLPAPERS "Install Breeze default wallpapers" ON)
|
||||
|
||||
find_package(KF6FrameworkIntegration ${KF6_MIN_VERSION} CONFIG )
|
||||
set_package_properties(KF${QT_MAJOR_VERSION}FrameworkIntegration PROPERTIES
|
||||
DESCRIPTION "KF6 Framework Integration"
|
||||
URL "https://projects.kde.org/projects/frameworks/frameworkintegration"
|
||||
TYPE OPTIONAL
|
||||
PURPOSE "Required to use KStyle convenience functionalities in style")
|
||||
|
||||
find_package(KF6KCMUtils ${KF6_MIN_VERSION})
|
||||
set_package_properties(KF6KCMUtils PROPERTIES
|
||||
TYPE REQUIRED
|
||||
DESCRIPTION "Helps create configuration modules"
|
||||
PURPOSE "KCMUtils used for the configuration modules or the decoration and Qt Style"
|
||||
)
|
||||
else()
|
||||
set(WITH_DECORATIONS OFF)
|
||||
set(WITH_WALLPAPERS OFF)
|
||||
endif()
|
||||
|
||||
find_package(Qt6 ${QT_MIN_VERSION} REQUIRED CONFIG COMPONENTS Widgets Core Svg)
|
||||
|
||||
find_package(KF6 ${KF6_MIN_VERSION} REQUIRED COMPONENTS
|
||||
CoreAddons
|
||||
ColorScheme
|
||||
Config
|
||||
GuiAddons
|
||||
I18n
|
||||
IconThemes
|
||||
WindowSystem)
|
||||
|
||||
find_package(Qt6 ${QT_MIN_VERSION} OPTIONAL_COMPONENTS Quick)
|
||||
if(${Qt6Quick_FOUND})
|
||||
find_package(KF6KirigamiPlatform ${KF6_MIN_VERSION} REQUIRED)
|
||||
endif()
|
||||
|
||||
set(BREEZE_HAVE_KSTYLE ${KF6FrameworkIntegration_FOUND})
|
||||
set(BREEZE_HAVE_QTQUICK ${Qt6Quick_FOUND})
|
||||
|
||||
# https://bugreports.qt.io/browse/QTBUG-114706
|
||||
add_library(Qt::Core ALIAS Qt6::Core)
|
||||
add_library(Qt::Gui ALIAS Qt6::Gui)
|
||||
add_library(Qt::OpenGL ALIAS Qt6::OpenGL)
|
||||
add_library(Qt::Network ALIAS Qt6::Network)
|
||||
if(Qt6_VERSION_MINOR GREATER 6)
|
||||
add_library(Qt::PlatformModuleInternal ALIAS Qt6::PlatformModuleInternal)
|
||||
endif()
|
||||
|
||||
add_subdirectory(kstyle kstyle6)
|
||||
add_subdirectory(libbreezecommon libbreezecommon6)
|
||||
add_subdirectory(misc)
|
||||
|
||||
if(WITH_DECORATIONS)
|
||||
find_package(KDecoration3 REQUIRED)
|
||||
add_subdirectory(kdecoration)
|
||||
endif()
|
||||
if (WITH_WALLPAPERS)
|
||||
add_subdirectory(wallpapers)
|
||||
endif()
|
||||
|
||||
ki18n_install(po)
|
||||
|
||||
# create a Config.cmake and a ConfigVersion.cmake file and install them
|
||||
include(ECMSetupVersion)
|
||||
ecm_setup_version(${PROJECT_VERSION} VARIABLE_PREFIX BREEZE
|
||||
PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/BreezeConfigVersion.cmake"
|
||||
)
|
||||
set(CMAKECONFIG_INSTALL_DIR "${KDE_INSTALL_CMAKEPACKAGEDIR}/Breeze")
|
||||
|
||||
configure_package_config_file("${CMAKE_CURRENT_SOURCE_DIR}/BreezeConfig.cmake.in"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/BreezeConfig.cmake"
|
||||
PATH_VARS KDE_INSTALL_FULL_DATADIR
|
||||
INSTALL_DESTINATION ${CMAKECONFIG_INSTALL_DIR}
|
||||
)
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/BreezeConfig.cmake"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/BreezeConfigVersion.cmake"
|
||||
DESTINATION "${CMAKECONFIG_INSTALL_DIR}"
|
||||
COMPONENT Devel
|
||||
)
|
||||
|
||||
unset(QUERY_EXECUTABLE CACHE)
|
||||
endfunction()
|
||||
if(BUILD_QT6)
|
||||
build_Qt6()
|
||||
endif()
|
||||
|
||||
function(build_colors_and_cursors)
|
||||
# While it is technically not 100% correct to use versionless
|
||||
# KDEInstallDirs while (maybe) building for both Qt versions,
|
||||
# it doesn't really matter at the end, because colors and cursors
|
||||
# only use ICONDIR and DATADIR which both do not depend on the version
|
||||
include(KDEInstallDirs)
|
||||
add_subdirectory(colors)
|
||||
add_subdirectory(cursors)
|
||||
endfunction()
|
||||
|
||||
build_colors_and_cursors()
|
||||
|
||||
# add clang-format target for all our real source files
|
||||
file(GLOB_RECURSE ALL_CLANG_FORMAT_SOURCE_FILES *.cpp *.h)
|
||||
kde_clang_format(${ALL_CLANG_FORMAT_SOURCE_FILES})
|
||||
kde_configure_git_pre_commit_hook(CHECKS CLANG_FORMAT)
|
||||
|
||||
feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
|
||||
@@ -0,0 +1,26 @@
|
||||
Copyright (c) <year> <owner>. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
3. Neither the name of the copyright holder nor the names of its contributors
|
||||
may be used to endorse or promote products derived from this software without
|
||||
specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
|
||||
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
@@ -0,0 +1,121 @@
|
||||
Creative Commons Legal Code
|
||||
|
||||
CC0 1.0 Universal
|
||||
|
||||
CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
|
||||
LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN
|
||||
ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
|
||||
INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
|
||||
REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS
|
||||
PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM
|
||||
THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED
|
||||
HEREUNDER.
|
||||
|
||||
Statement of Purpose
|
||||
|
||||
The laws of most jurisdictions throughout the world automatically confer
|
||||
exclusive Copyright and Related Rights (defined below) upon the creator
|
||||
and subsequent owner(s) (each and all, an "owner") of an original work of
|
||||
authorship and/or a database (each, a "Work").
|
||||
|
||||
Certain owners wish to permanently relinquish those rights to a Work for
|
||||
the purpose of contributing to a commons of creative, cultural and
|
||||
scientific works ("Commons") that the public can reliably and without fear
|
||||
of later claims of infringement build upon, modify, incorporate in other
|
||||
works, reuse and redistribute as freely as possible in any form whatsoever
|
||||
and for any purposes, including without limitation commercial purposes.
|
||||
These owners may contribute to the Commons to promote the ideal of a free
|
||||
culture and the further production of creative, cultural and scientific
|
||||
works, or to gain reputation or greater distribution for their Work in
|
||||
part through the use and efforts of others.
|
||||
|
||||
For these and/or other purposes and motivations, and without any
|
||||
expectation of additional consideration or compensation, the person
|
||||
associating CC0 with a Work (the "Affirmer"), to the extent that he or she
|
||||
is an owner of Copyright and Related Rights in the Work, voluntarily
|
||||
elects to apply CC0 to the Work and publicly distribute the Work under its
|
||||
terms, with knowledge of his or her Copyright and Related Rights in the
|
||||
Work and the meaning and intended legal effect of CC0 on those rights.
|
||||
|
||||
1. Copyright and Related Rights. A Work made available under CC0 may be
|
||||
protected by copyright and related or neighboring rights ("Copyright and
|
||||
Related Rights"). Copyright and Related Rights include, but are not
|
||||
limited to, the following:
|
||||
|
||||
i. the right to reproduce, adapt, distribute, perform, display,
|
||||
communicate, and translate a Work;
|
||||
ii. moral rights retained by the original author(s) and/or performer(s);
|
||||
iii. publicity and privacy rights pertaining to a person's image or
|
||||
likeness depicted in a Work;
|
||||
iv. rights protecting against unfair competition in regards to a Work,
|
||||
subject to the limitations in paragraph 4(a), below;
|
||||
v. rights protecting the extraction, dissemination, use and reuse of data
|
||||
in a Work;
|
||||
vi. database rights (such as those arising under Directive 96/9/EC of the
|
||||
European Parliament and of the Council of 11 March 1996 on the legal
|
||||
protection of databases, and under any national implementation
|
||||
thereof, including any amended or successor version of such
|
||||
directive); and
|
||||
vii. other similar, equivalent or corresponding rights throughout the
|
||||
world based on applicable law or treaty, and any national
|
||||
implementations thereof.
|
||||
|
||||
2. Waiver. To the greatest extent permitted by, but not in contravention
|
||||
of, applicable law, Affirmer hereby overtly, fully, permanently,
|
||||
irrevocably and unconditionally waives, abandons, and surrenders all of
|
||||
Affirmer's Copyright and Related Rights and associated claims and causes
|
||||
of action, whether now known or unknown (including existing as well as
|
||||
future claims and causes of action), in the Work (i) in all territories
|
||||
worldwide, (ii) for the maximum duration provided by applicable law or
|
||||
treaty (including future time extensions), (iii) in any current or future
|
||||
medium and for any number of copies, and (iv) for any purpose whatsoever,
|
||||
including without limitation commercial, advertising or promotional
|
||||
purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each
|
||||
member of the public at large and to the detriment of Affirmer's heirs and
|
||||
successors, fully intending that such Waiver shall not be subject to
|
||||
revocation, rescission, cancellation, termination, or any other legal or
|
||||
equitable action to disrupt the quiet enjoyment of the Work by the public
|
||||
as contemplated by Affirmer's express Statement of Purpose.
|
||||
|
||||
3. Public License Fallback. Should any part of the Waiver for any reason
|
||||
be judged legally invalid or ineffective under applicable law, then the
|
||||
Waiver shall be preserved to the maximum extent permitted taking into
|
||||
account Affirmer's express Statement of Purpose. In addition, to the
|
||||
extent the Waiver is so judged Affirmer hereby grants to each affected
|
||||
person a royalty-free, non transferable, non sublicensable, non exclusive,
|
||||
irrevocable and unconditional license to exercise Affirmer's Copyright and
|
||||
Related Rights in the Work (i) in all territories worldwide, (ii) for the
|
||||
maximum duration provided by applicable law or treaty (including future
|
||||
time extensions), (iii) in any current or future medium and for any number
|
||||
of copies, and (iv) for any purpose whatsoever, including without
|
||||
limitation commercial, advertising or promotional purposes (the
|
||||
"License"). The License shall be deemed effective as of the date CC0 was
|
||||
applied by Affirmer to the Work. Should any part of the License for any
|
||||
reason be judged legally invalid or ineffective under applicable law, such
|
||||
partial invalidity or ineffectiveness shall not invalidate the remainder
|
||||
of the License, and in such case Affirmer hereby affirms that he or she
|
||||
will not (i) exercise any of his or her remaining Copyright and Related
|
||||
Rights in the Work or (ii) assert any associated claims and causes of
|
||||
action with respect to the Work, in either case contrary to Affirmer's
|
||||
express Statement of Purpose.
|
||||
|
||||
4. Limitations and Disclaimers.
|
||||
|
||||
a. No trademark or patent rights held by Affirmer are waived, abandoned,
|
||||
surrendered, licensed or otherwise affected by this document.
|
||||
b. Affirmer offers the Work as-is and makes no representations or
|
||||
warranties of any kind concerning the Work, express, implied,
|
||||
statutory or otherwise, including without limitation warranties of
|
||||
title, merchantability, fitness for a particular purpose, non
|
||||
infringement, or the absence of latent or other defects, accuracy, or
|
||||
the present or absence of errors, whether or not discoverable, all to
|
||||
the greatest extent permissible under applicable law.
|
||||
c. Affirmer disclaims responsibility for clearing rights of other persons
|
||||
that may apply to the Work or any use thereof, including without
|
||||
limitation any person's Copyright and Related Rights in the Work.
|
||||
Further, Affirmer disclaims responsibility for obtaining any necessary
|
||||
consents, permissions or other rights required for any use of the
|
||||
Work.
|
||||
d. Affirmer understands and acknowledges that Creative Commons is not a
|
||||
party to this document and has no duty or obligation with respect to
|
||||
this CC0 or use of the Work.
|
||||
@@ -0,0 +1,319 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
|
||||
Everyone is permitted to copy and distribute verbatim copies of this license
|
||||
document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your freedom to share
|
||||
and change it. By contrast, the GNU General Public License is intended to
|
||||
guarantee your freedom to share and change free software--to make sure the
|
||||
software is free for all its users. This General Public License applies to
|
||||
most of the Free Software Foundation's software and to any other program whose
|
||||
authors commit to using it. (Some other Free Software Foundation software
|
||||
is covered by the GNU Lesser General Public License instead.) You can apply
|
||||
it to your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not price. Our
|
||||
General Public Licenses are designed to make sure that you have the freedom
|
||||
to distribute copies of free software (and charge for this service if you
|
||||
wish), that you receive source code or can get it if you want it, that you
|
||||
can change the software or use pieces of it in new free programs; and that
|
||||
you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid anyone to
|
||||
deny you these rights or to ask you to surrender the rights. These restrictions
|
||||
translate to certain responsibilities for you if you distribute copies of
|
||||
the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether gratis or
|
||||
for a fee, you must give the recipients all the rights that you have. You
|
||||
must make sure that they, too, receive or can get the source code. And you
|
||||
must show them these terms so they know their rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and (2)
|
||||
offer you this license which gives you legal permission to copy, distribute
|
||||
and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain that
|
||||
everyone understands that there is no warranty for this free software. If
|
||||
the software is modified by someone else and passed on, we want its recipients
|
||||
to know that what they have is not the original, so that any problems introduced
|
||||
by others will not reflect on the original authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software patents. We
|
||||
wish to avoid the danger that redistributors of a free program will individually
|
||||
obtain patent licenses, in effect making the program proprietary. To prevent
|
||||
this, we have made it clear that any patent must be licensed for everyone's
|
||||
free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and modification
|
||||
follow.
|
||||
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains a notice
|
||||
placed by the copyright holder saying it may be distributed under the terms
|
||||
of this General Public License. The "Program", below, refers to any such program
|
||||
or work, and a "work based on the Program" means either the Program or any
|
||||
derivative work under copyright law: that is to say, a work containing the
|
||||
Program or a portion of it, either verbatim or with modifications and/or translated
|
||||
into another language. (Hereinafter, translation is included without limitation
|
||||
in the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not covered
|
||||
by this License; they are outside its scope. The act of running the Program
|
||||
is not restricted, and the output from the Program is covered only if its
|
||||
contents constitute a work based on the Program (independent of having been
|
||||
made by running the Program). Whether that is true depends on what the Program
|
||||
does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's source code
|
||||
as you receive it, in any medium, provided that you conspicuously and appropriately
|
||||
publish on each copy an appropriate copyright notice and disclaimer of warranty;
|
||||
keep intact all the notices that refer to this License and to the absence
|
||||
of any warranty; and give any other recipients of the Program a copy of this
|
||||
License along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and you
|
||||
may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion of it,
|
||||
thus forming a work based on the Program, and copy and distribute such modifications
|
||||
or work under the terms of Section 1 above, provided that you also meet all
|
||||
of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices stating that
|
||||
you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in whole or
|
||||
in part contains or is derived from the Program or any part thereof, to be
|
||||
licensed as a whole at no charge to all third parties under the terms of this
|
||||
License.
|
||||
|
||||
c) If the modified program normally reads commands interactively when run,
|
||||
you must cause it, when started running for such interactive use in the most
|
||||
ordinary way, to print or display an announcement including an appropriate
|
||||
copyright notice and a notice that there is no warranty (or else, saying that
|
||||
you provide a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this License.
|
||||
(Exception: if the Program itself is interactive but does not normally print
|
||||
such an announcement, your work based on the Program is not required to print
|
||||
an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If identifiable
|
||||
sections of that work are not derived from the Program, and can be reasonably
|
||||
considered independent and separate works in themselves, then this License,
|
||||
and its terms, do not apply to those sections when you distribute them as
|
||||
separate works. But when you distribute the same sections as part of a whole
|
||||
which is a work based on the Program, the distribution of the whole must be
|
||||
on the terms of this License, whose permissions for other licensees extend
|
||||
to the entire whole, and thus to each and every part regardless of who wrote
|
||||
it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest your
|
||||
rights to work written entirely by you; rather, the intent is to exercise
|
||||
the right to control the distribution of derivative or collective works based
|
||||
on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program with
|
||||
the Program (or with a work based on the Program) on a volume of a storage
|
||||
or distribution medium does not bring the other work under the scope of this
|
||||
License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it, under Section
|
||||
2) in object code or executable form under the terms of Sections 1 and 2 above
|
||||
provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable source code,
|
||||
which must be distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three years, to give
|
||||
any third party, for a charge no more than your cost of physically performing
|
||||
source distribution, a complete machine-readable copy of the corresponding
|
||||
source code, to be distributed under the terms of Sections 1 and 2 above on
|
||||
a medium customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer to distribute
|
||||
corresponding source code. (This alternative is allowed only for noncommercial
|
||||
distribution and only if you received the program in object code or executable
|
||||
form with such an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for making
|
||||
modifications to it. For an executable work, complete source code means all
|
||||
the source code for all modules it contains, plus any associated interface
|
||||
definition files, plus the scripts used to control compilation and installation
|
||||
of the executable. However, as a special exception, the source code distributed
|
||||
need not include anything that is normally distributed (in either source or
|
||||
binary form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component itself
|
||||
accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering access to
|
||||
copy from a designated place, then offering equivalent access to copy the
|
||||
source code from the same place counts as distribution of the source code,
|
||||
even though third parties are not compelled to copy the source along with
|
||||
the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program except
|
||||
as expressly provided under this License. Any attempt otherwise to copy, modify,
|
||||
sublicense or distribute the Program is void, and will automatically terminate
|
||||
your rights under this License. However, parties who have received copies,
|
||||
or rights, from you under this License will not have their licenses terminated
|
||||
so long as such parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not signed
|
||||
it. However, nothing else grants you permission to modify or distribute the
|
||||
Program or its derivative works. These actions are prohibited by law if you
|
||||
do not accept this License. Therefore, by modifying or distributing the Program
|
||||
(or any work based on the Program), you indicate your acceptance of this License
|
||||
to do so, and all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the Program),
|
||||
the recipient automatically receives a license from the original licensor
|
||||
to copy, distribute or modify the Program subject to these terms and conditions.
|
||||
You may not impose any further restrictions on the recipients' exercise of
|
||||
the rights granted herein. You are not responsible for enforcing compliance
|
||||
by third parties to this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent infringement
|
||||
or for any other reason (not limited to patent issues), conditions are imposed
|
||||
on you (whether by court order, agreement or otherwise) that contradict the
|
||||
conditions of this License, they do not excuse you from the conditions of
|
||||
this License. If you cannot distribute so as to satisfy simultaneously your
|
||||
obligations under this License and any other pertinent obligations, then as
|
||||
a consequence you may not distribute the Program at all. For example, if a
|
||||
patent license would not permit royalty-free redistribution of the Program
|
||||
by all those who receive copies directly or indirectly through you, then the
|
||||
only way you could satisfy both it and this License would be to refrain entirely
|
||||
from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under any
|
||||
particular circumstance, the balance of the section is intended to apply and
|
||||
the section as a whole is intended to apply in other circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any patents
|
||||
or other property right claims or to contest validity of any such claims;
|
||||
this section has the sole purpose of protecting the integrity of the free
|
||||
software distribution system, which is implemented by public license practices.
|
||||
Many people have made generous contributions to the wide range of software
|
||||
distributed through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing to
|
||||
distribute software through any other system and a licensee cannot impose
|
||||
that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to be a
|
||||
consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in certain
|
||||
countries either by patents or by copyrighted interfaces, the original copyright
|
||||
holder who places the Program under this License may add an explicit geographical
|
||||
distribution limitation excluding those countries, so that distribution is
|
||||
permitted only in or among countries not thus excluded. In such case, this
|
||||
License incorporates the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions of
|
||||
the General Public License from time to time. Such new versions will be similar
|
||||
in spirit to the present version, but may differ in detail to address new
|
||||
problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program specifies
|
||||
a version number of this License which applies to it and "any later version",
|
||||
you have the option of following the terms and conditions either of that version
|
||||
or of any later version published by the Free Software Foundation. If the
|
||||
Program does not specify a version number of this License, you may choose
|
||||
any version ever published by the Free Software Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free programs
|
||||
whose distribution conditions are different, write to the author to ask for
|
||||
permission. For software which is copyrighted by the Free Software Foundation,
|
||||
write to the Free Software Foundation; we sometimes make exceptions for this.
|
||||
Our decision will be guided by the two goals of preserving the free status
|
||||
of all derivatives of our free software and of promoting the sharing and reuse
|
||||
of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR
|
||||
THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE
|
||||
STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM
|
||||
"AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
|
||||
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE
|
||||
OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME
|
||||
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE
|
||||
OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA
|
||||
OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES
|
||||
OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH
|
||||
HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest possible
|
||||
use to the public, the best way to achieve this is to make it free software
|
||||
which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest to attach
|
||||
them to the start of each source file to most effectively convey the exclusion
|
||||
of warranty; and each file should have at least the "copyright" line and a
|
||||
pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and an idea of what it does.>
|
||||
|
||||
Copyright (C)< yyyy> <name of author>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License as published by the Free Software
|
||||
Foundation; either version 2 of the License, or (at your option) any later
|
||||
version.
|
||||
|
||||
This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along with
|
||||
this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
|
||||
Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this when
|
||||
it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author Gnomovision comes
|
||||
with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software,
|
||||
and you are welcome to redistribute it under certain conditions; type `show
|
||||
c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may be
|
||||
called something other than `show w' and `show c'; they could even be mouse-clicks
|
||||
or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary. Here
|
||||
is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision'
|
||||
(which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon >, 1 April 1989 Ty Coon, President of Vice This General
|
||||
Public License does not permit incorporating your program into proprietary
|
||||
programs. If your program is a subroutine library, you may consider it more
|
||||
useful to permit linking proprietary applications with the library. If this
|
||||
is what you want to do, use the GNU Lesser General Public License instead
|
||||
of this License.
|
||||
@@ -0,0 +1,319 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
|
||||
Everyone is permitted to copy and distribute verbatim copies of this license
|
||||
document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your freedom to share
|
||||
and change it. By contrast, the GNU General Public License is intended to
|
||||
guarantee your freedom to share and change free software--to make sure the
|
||||
software is free for all its users. This General Public License applies to
|
||||
most of the Free Software Foundation's software and to any other program whose
|
||||
authors commit to using it. (Some other Free Software Foundation software
|
||||
is covered by the GNU Lesser General Public License instead.) You can apply
|
||||
it to your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not price. Our
|
||||
General Public Licenses are designed to make sure that you have the freedom
|
||||
to distribute copies of free software (and charge for this service if you
|
||||
wish), that you receive source code or can get it if you want it, that you
|
||||
can change the software or use pieces of it in new free programs; and that
|
||||
you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid anyone to
|
||||
deny you these rights or to ask you to surrender the rights. These restrictions
|
||||
translate to certain responsibilities for you if you distribute copies of
|
||||
the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether gratis or
|
||||
for a fee, you must give the recipients all the rights that you have. You
|
||||
must make sure that they, too, receive or can get the source code. And you
|
||||
must show them these terms so they know their rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and (2)
|
||||
offer you this license which gives you legal permission to copy, distribute
|
||||
and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain that
|
||||
everyone understands that there is no warranty for this free software. If
|
||||
the software is modified by someone else and passed on, we want its recipients
|
||||
to know that what they have is not the original, so that any problems introduced
|
||||
by others will not reflect on the original authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software patents. We
|
||||
wish to avoid the danger that redistributors of a free program will individually
|
||||
obtain patent licenses, in effect making the program proprietary. To prevent
|
||||
this, we have made it clear that any patent must be licensed for everyone's
|
||||
free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and modification
|
||||
follow.
|
||||
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains a notice
|
||||
placed by the copyright holder saying it may be distributed under the terms
|
||||
of this General Public License. The "Program", below, refers to any such program
|
||||
or work, and a "work based on the Program" means either the Program or any
|
||||
derivative work under copyright law: that is to say, a work containing the
|
||||
Program or a portion of it, either verbatim or with modifications and/or translated
|
||||
into another language. (Hereinafter, translation is included without limitation
|
||||
in the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not covered
|
||||
by this License; they are outside its scope. The act of running the Program
|
||||
is not restricted, and the output from the Program is covered only if its
|
||||
contents constitute a work based on the Program (independent of having been
|
||||
made by running the Program). Whether that is true depends on what the Program
|
||||
does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's source code
|
||||
as you receive it, in any medium, provided that you conspicuously and appropriately
|
||||
publish on each copy an appropriate copyright notice and disclaimer of warranty;
|
||||
keep intact all the notices that refer to this License and to the absence
|
||||
of any warranty; and give any other recipients of the Program a copy of this
|
||||
License along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and you
|
||||
may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion of it,
|
||||
thus forming a work based on the Program, and copy and distribute such modifications
|
||||
or work under the terms of Section 1 above, provided that you also meet all
|
||||
of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices stating that
|
||||
you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in whole or
|
||||
in part contains or is derived from the Program or any part thereof, to be
|
||||
licensed as a whole at no charge to all third parties under the terms of this
|
||||
License.
|
||||
|
||||
c) If the modified program normally reads commands interactively when run,
|
||||
you must cause it, when started running for such interactive use in the most
|
||||
ordinary way, to print or display an announcement including an appropriate
|
||||
copyright notice and a notice that there is no warranty (or else, saying that
|
||||
you provide a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this License.
|
||||
(Exception: if the Program itself is interactive but does not normally print
|
||||
such an announcement, your work based on the Program is not required to print
|
||||
an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If identifiable
|
||||
sections of that work are not derived from the Program, and can be reasonably
|
||||
considered independent and separate works in themselves, then this License,
|
||||
and its terms, do not apply to those sections when you distribute them as
|
||||
separate works. But when you distribute the same sections as part of a whole
|
||||
which is a work based on the Program, the distribution of the whole must be
|
||||
on the terms of this License, whose permissions for other licensees extend
|
||||
to the entire whole, and thus to each and every part regardless of who wrote
|
||||
it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest your
|
||||
rights to work written entirely by you; rather, the intent is to exercise
|
||||
the right to control the distribution of derivative or collective works based
|
||||
on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program with
|
||||
the Program (or with a work based on the Program) on a volume of a storage
|
||||
or distribution medium does not bring the other work under the scope of this
|
||||
License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it, under Section
|
||||
2) in object code or executable form under the terms of Sections 1 and 2 above
|
||||
provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable source code,
|
||||
which must be distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three years, to give
|
||||
any third party, for a charge no more than your cost of physically performing
|
||||
source distribution, a complete machine-readable copy of the corresponding
|
||||
source code, to be distributed under the terms of Sections 1 and 2 above on
|
||||
a medium customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer to distribute
|
||||
corresponding source code. (This alternative is allowed only for noncommercial
|
||||
distribution and only if you received the program in object code or executable
|
||||
form with such an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for making
|
||||
modifications to it. For an executable work, complete source code means all
|
||||
the source code for all modules it contains, plus any associated interface
|
||||
definition files, plus the scripts used to control compilation and installation
|
||||
of the executable. However, as a special exception, the source code distributed
|
||||
need not include anything that is normally distributed (in either source or
|
||||
binary form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component itself
|
||||
accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering access to
|
||||
copy from a designated place, then offering equivalent access to copy the
|
||||
source code from the same place counts as distribution of the source code,
|
||||
even though third parties are not compelled to copy the source along with
|
||||
the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program except
|
||||
as expressly provided under this License. Any attempt otherwise to copy, modify,
|
||||
sublicense or distribute the Program is void, and will automatically terminate
|
||||
your rights under this License. However, parties who have received copies,
|
||||
or rights, from you under this License will not have their licenses terminated
|
||||
so long as such parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not signed
|
||||
it. However, nothing else grants you permission to modify or distribute the
|
||||
Program or its derivative works. These actions are prohibited by law if you
|
||||
do not accept this License. Therefore, by modifying or distributing the Program
|
||||
(or any work based on the Program), you indicate your acceptance of this License
|
||||
to do so, and all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the Program),
|
||||
the recipient automatically receives a license from the original licensor
|
||||
to copy, distribute or modify the Program subject to these terms and conditions.
|
||||
You may not impose any further restrictions on the recipients' exercise of
|
||||
the rights granted herein. You are not responsible for enforcing compliance
|
||||
by third parties to this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent infringement
|
||||
or for any other reason (not limited to patent issues), conditions are imposed
|
||||
on you (whether by court order, agreement or otherwise) that contradict the
|
||||
conditions of this License, they do not excuse you from the conditions of
|
||||
this License. If you cannot distribute so as to satisfy simultaneously your
|
||||
obligations under this License and any other pertinent obligations, then as
|
||||
a consequence you may not distribute the Program at all. For example, if a
|
||||
patent license would not permit royalty-free redistribution of the Program
|
||||
by all those who receive copies directly or indirectly through you, then the
|
||||
only way you could satisfy both it and this License would be to refrain entirely
|
||||
from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under any
|
||||
particular circumstance, the balance of the section is intended to apply and
|
||||
the section as a whole is intended to apply in other circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any patents
|
||||
or other property right claims or to contest validity of any such claims;
|
||||
this section has the sole purpose of protecting the integrity of the free
|
||||
software distribution system, which is implemented by public license practices.
|
||||
Many people have made generous contributions to the wide range of software
|
||||
distributed through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing to
|
||||
distribute software through any other system and a licensee cannot impose
|
||||
that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to be a
|
||||
consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in certain
|
||||
countries either by patents or by copyrighted interfaces, the original copyright
|
||||
holder who places the Program under this License may add an explicit geographical
|
||||
distribution limitation excluding those countries, so that distribution is
|
||||
permitted only in or among countries not thus excluded. In such case, this
|
||||
License incorporates the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions of
|
||||
the General Public License from time to time. Such new versions will be similar
|
||||
in spirit to the present version, but may differ in detail to address new
|
||||
problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program specifies
|
||||
a version number of this License which applies to it and "any later version",
|
||||
you have the option of following the terms and conditions either of that version
|
||||
or of any later version published by the Free Software Foundation. If the
|
||||
Program does not specify a version number of this License, you may choose
|
||||
any version ever published by the Free Software Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free programs
|
||||
whose distribution conditions are different, write to the author to ask for
|
||||
permission. For software which is copyrighted by the Free Software Foundation,
|
||||
write to the Free Software Foundation; we sometimes make exceptions for this.
|
||||
Our decision will be guided by the two goals of preserving the free status
|
||||
of all derivatives of our free software and of promoting the sharing and reuse
|
||||
of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR
|
||||
THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE
|
||||
STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM
|
||||
"AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
|
||||
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE
|
||||
OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME
|
||||
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE
|
||||
OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA
|
||||
OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES
|
||||
OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH
|
||||
HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest possible
|
||||
use to the public, the best way to achieve this is to make it free software
|
||||
which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest to attach
|
||||
them to the start of each source file to most effectively convey the exclusion
|
||||
of warranty; and each file should have at least the "copyright" line and a
|
||||
pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and an idea of what it does.>
|
||||
|
||||
Copyright (C) <yyyy> <name of author>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License as published by the Free Software
|
||||
Foundation; either version 2 of the License, or (at your option) any later
|
||||
version.
|
||||
|
||||
This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along with
|
||||
this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
|
||||
Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this when
|
||||
it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author Gnomovision comes
|
||||
with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software,
|
||||
and you are welcome to redistribute it under certain conditions; type `show
|
||||
c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may be
|
||||
called something other than `show w' and `show c'; they could even be mouse-clicks
|
||||
or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary. Here
|
||||
is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision'
|
||||
(which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989 Ty Coon, President of Vice This General
|
||||
Public License does not permit incorporating your program into proprietary
|
||||
programs. If your program is a subroutine library, you may consider it more
|
||||
useful to permit linking proprietary applications with the library. If this
|
||||
is what you want to do, use the GNU Lesser General Public License instead
|
||||
of this License.
|
||||
@@ -0,0 +1,625 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright © 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||
|
||||
Everyone is permitted to copy and distribute verbatim copies of this license
|
||||
document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for software and
|
||||
other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed to take
|
||||
away your freedom to share and change the works. By contrast, the GNU General
|
||||
Public License is intended to guarantee your freedom to share and change all
|
||||
versions of a program--to make sure it remains free software for all its users.
|
||||
We, the Free Software Foundation, use the GNU General Public License for most
|
||||
of our software; it applies also to any other work released this way by its
|
||||
authors. You can apply it to your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not price. Our
|
||||
General Public Licenses are designed to make sure that you have the freedom
|
||||
to distribute copies of free software (and charge for them if you wish), that
|
||||
you receive source code or can get it if you want it, that you can change
|
||||
the software or use pieces of it in new free programs, and that you know you
|
||||
can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you these rights
|
||||
or asking you to surrender the rights. Therefore, you have certain responsibilities
|
||||
if you distribute copies of the software, or if you modify it: responsibilities
|
||||
to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether gratis or
|
||||
for a fee, you must pass on to the recipients the same freedoms that you received.
|
||||
You must make sure that they, too, receive or can get the source code. And
|
||||
you must show them these terms so they know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps: (1) assert
|
||||
copyright on the software, and (2) offer you this License giving you legal
|
||||
permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains that
|
||||
there is no warranty for this free software. For both users' and authors'
|
||||
sake, the GPL requires that modified versions be marked as changed, so that
|
||||
their problems will not be attributed erroneously to authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run modified
|
||||
versions of the software inside them, although the manufacturer can do so.
|
||||
This is fundamentally incompatible with the aim of protecting users' freedom
|
||||
to change the software. The systematic pattern of such abuse occurs in the
|
||||
area of products for individuals to use, which is precisely where it is most
|
||||
unacceptable. Therefore, we have designed this version of the GPL to prohibit
|
||||
the practice for those products. If such problems arise substantially in other
|
||||
domains, we stand ready to extend this provision to those domains in future
|
||||
versions of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents. States
|
||||
should not allow patents to restrict development and use of software on general-purpose
|
||||
computers, but in those that do, we wish to avoid the special danger that
|
||||
patents applied to a free program could make it effectively proprietary. To
|
||||
prevent this, the GPL assures that patents cannot be used to render the program
|
||||
non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and modification
|
||||
follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of works,
|
||||
such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this License.
|
||||
Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals
|
||||
or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work in
|
||||
a fashion requiring copyright permission, other than the making of an exact
|
||||
copy. The resulting work is called a "modified version" of the earlier work
|
||||
or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based on the
|
||||
Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without permission,
|
||||
would make you directly or secondarily liable for infringement under applicable
|
||||
copyright law, except executing it on a computer or modifying a private copy.
|
||||
Propagation includes copying, distribution (with or without modification),
|
||||
making available to the public, and in some countries other activities as
|
||||
well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other parties
|
||||
to make or receive copies. Mere interaction with a user through a computer
|
||||
network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices" to the
|
||||
extent that it includes a convenient and prominently visible feature that
|
||||
(1) displays an appropriate copyright notice, and (2) tells the user that
|
||||
there is no warranty for the work (except to the extent that warranties are
|
||||
provided), that licensees may convey the work under this License, and how
|
||||
to view a copy of this License. If the interface presents a list of user commands
|
||||
or options, such as a menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work for making
|
||||
modifications to it. "Object code" means any non-source form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official standard
|
||||
defined by a recognized standards body, or, in the case of interfaces specified
|
||||
for a particular programming language, one that is widely used among developers
|
||||
working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other than
|
||||
the work as a whole, that (a) is included in the normal form of packaging
|
||||
a Major Component, but which is not part of that Major Component, and (b)
|
||||
serves only to enable use of the work with that Major Component, or to implement
|
||||
a Standard Interface for which an implementation is available to the public
|
||||
in source code form. A "Major Component", in this context, means a major essential
|
||||
component (kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to produce
|
||||
the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all the source
|
||||
code needed to generate, install, and (for an executable work) run the object
|
||||
code and to modify the work, including scripts to control those activities.
|
||||
However, it does not include the work's System Libraries, or general-purpose
|
||||
tools or generally available free programs which are used unmodified in performing
|
||||
those activities but which are not part of the work. For example, Corresponding
|
||||
Source includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically linked
|
||||
subprograms that the work is specifically designed to require, such as by
|
||||
intimate data communication or control flow between those subprograms and
|
||||
other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users can regenerate
|
||||
automatically from other parts of the Corresponding Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of copyright
|
||||
on the Program, and are irrevocable provided the stated conditions are met.
|
||||
This License explicitly affirms your unlimited permission to run the unmodified
|
||||
Program. The output from running a covered work is covered by this License
|
||||
only if the output, given its content, constitutes a covered work. This License
|
||||
acknowledges your rights of fair use or other equivalent, as provided by copyright
|
||||
law.
|
||||
|
||||
You may make, run and propagate covered works that you do not convey, without
|
||||
conditions so long as your license otherwise remains in force. You may convey
|
||||
covered works to others for the sole purpose of having them make modifications
|
||||
exclusively for you, or provide you with facilities for running those works,
|
||||
provided that you comply with the terms of this License in conveying all material
|
||||
for which you do not control copyright. Those thus making or running the covered
|
||||
works for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of your copyrighted
|
||||
material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under the conditions
|
||||
stated below. Sublicensing is not allowed; section 10 makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological measure
|
||||
under any applicable law fulfilling obligations under article 11 of the WIPO
|
||||
copyright treaty adopted on 20 December 1996, or similar laws prohibiting
|
||||
or restricting circumvention of such measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid circumvention
|
||||
of technological measures to the extent such circumvention is effected by
|
||||
exercising rights under this License with respect to the covered work, and
|
||||
you disclaim any intention to limit operation or modification of the work
|
||||
as a means of enforcing, against the work's users, your or third parties'
|
||||
legal rights to forbid circumvention of technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you receive
|
||||
it, in any medium, provided that you conspicuously and appropriately publish
|
||||
on each copy an appropriate copyright notice; keep intact all notices stating
|
||||
that this License and any non-permissive terms added in accord with section
|
||||
7 apply to the code; keep intact all notices of the absence of any warranty;
|
||||
and give all recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey, and you
|
||||
may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to produce
|
||||
it from the Program, in the form of source code under the terms of section
|
||||
4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified it, and
|
||||
giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is released under
|
||||
this License and any conditions added under section 7. This requirement modifies
|
||||
the requirement in section 4 to "keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this License to anyone
|
||||
who comes into possession of a copy. This License will therefore apply, along
|
||||
with any applicable section 7 additional terms, to the whole of the work,
|
||||
and all its parts, regardless of how they are packaged. This License gives
|
||||
no permission to license the work in any other way, but it does not invalidate
|
||||
such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display Appropriate
|
||||
Legal Notices; however, if the Program has interactive interfaces that do
|
||||
not display Appropriate Legal Notices, your work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent works,
|
||||
which are not by their nature extensions of the covered work, and which are
|
||||
not combined with it such as to form a larger program, in or on a volume of
|
||||
a storage or distribution medium, is called an "aggregate" if the compilation
|
||||
and its resulting copyright are not used to limit the access or legal rights
|
||||
of the compilation's users beyond what the individual works permit. Inclusion
|
||||
of a covered work in an aggregate does not cause this License to apply to
|
||||
the other parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms of sections
|
||||
4 and 5, provided that you also convey the machine-readable Corresponding
|
||||
Source under the terms of this License, in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product (including
|
||||
a physical distribution medium), accompanied by the Corresponding Source fixed
|
||||
on a durable physical medium customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product (including
|
||||
a physical distribution medium), accompanied by a written offer, valid for
|
||||
at least three years and valid for as long as you offer spare parts or customer
|
||||
support for that product model, to give anyone who possesses the object code
|
||||
either (1) a copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical medium customarily
|
||||
used for software interchange, for a price no more than your reasonable cost
|
||||
of physically performing this conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the written
|
||||
offer to provide the Corresponding Source. This alternative is allowed only
|
||||
occasionally and noncommercially, and only if you received the object code
|
||||
with such an offer, in accord with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated place (gratis
|
||||
or for a charge), and offer equivalent access to the Corresponding Source
|
||||
in the same way through the same place at no further charge. You need not
|
||||
require recipients to copy the Corresponding Source along with the object
|
||||
code. If the place to copy the object code is a network server, the Corresponding
|
||||
Source may be on a different server (operated by you or a third party) that
|
||||
supports equivalent copying facilities, provided you maintain clear directions
|
||||
next to the object code saying where to find the Corresponding Source. Regardless
|
||||
of what server hosts the Corresponding Source, you remain obligated to ensure
|
||||
that it is available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided you inform
|
||||
other peers where the object code and Corresponding Source of the work are
|
||||
being offered to the general public at no charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded from
|
||||
the Corresponding Source as a System Library, need not be included in conveying
|
||||
the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any tangible
|
||||
personal property which is normally used for personal, family, or household
|
||||
purposes, or (2) anything designed or sold for incorporation into a dwelling.
|
||||
In determining whether a product is a consumer product, doubtful cases shall
|
||||
be resolved in favor of coverage. For a particular product received by a particular
|
||||
user, "normally used" refers to a typical or common use of that class of product,
|
||||
regardless of the status of the particular user or of the way in which the
|
||||
particular user actually uses, or expects or is expected to use, the product.
|
||||
A product is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent the
|
||||
only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods, procedures,
|
||||
authorization keys, or other information required to install and execute modified
|
||||
versions of a covered work in that User Product from a modified version of
|
||||
its Corresponding Source. The information must suffice to ensure that the
|
||||
continued functioning of the modified object code is in no case prevented
|
||||
or interfered with solely because modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or specifically
|
||||
for use in, a User Product, and the conveying occurs as part of a transaction
|
||||
in which the right of possession and use of the User Product is transferred
|
||||
to the recipient in perpetuity or for a fixed term (regardless of how the
|
||||
transaction is characterized), the Corresponding Source conveyed under this
|
||||
section must be accompanied by the Installation Information. But this requirement
|
||||
does not apply if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has been installed
|
||||
in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a requirement
|
||||
to continue to provide support service, warranty, or updates for a work that
|
||||
has been modified or installed by the recipient, or for the User Product in
|
||||
which it has been modified or installed. Access to a network may be denied
|
||||
when the modification itself materially and adversely affects the operation
|
||||
of the network or violates the rules and protocols for communication across
|
||||
the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided, in accord
|
||||
with this section must be in a format that is publicly documented (and with
|
||||
an implementation available to the public in source code form), and must require
|
||||
no special password or key for unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this License
|
||||
by making exceptions from one or more of its conditions. Additional permissions
|
||||
that are applicable to the entire Program shall be treated as though they
|
||||
were included in this License, to the extent that they are valid under applicable
|
||||
law. If additional permissions apply only to part of the Program, that part
|
||||
may be used separately under those permissions, but the entire Program remains
|
||||
governed by this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option remove any
|
||||
additional permissions from that copy, or from any part of it. (Additional
|
||||
permissions may be written to require their own removal in certain cases when
|
||||
you modify the work.) You may place additional permissions on material, added
|
||||
by you to a covered work, for which you have or can give appropriate copyright
|
||||
permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you add
|
||||
to a covered work, you may (if authorized by the copyright holders of that
|
||||
material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the terms of
|
||||
sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or author
|
||||
attributions in that material or in the Appropriate Legal Notices displayed
|
||||
by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or requiring
|
||||
that modified versions of such material be marked in reasonable ways as different
|
||||
from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or authors
|
||||
of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some trade names,
|
||||
trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that material by
|
||||
anyone who conveys the material (or modified versions of it) with contractual
|
||||
assumptions of liability to the recipient, for any liability that these contractual
|
||||
assumptions directly impose on those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further restrictions"
|
||||
within the meaning of section 10. If the Program as you received it, or any
|
||||
part of it, contains a notice stating that it is governed by this License
|
||||
along with a term that is a further restriction, you may remove that term.
|
||||
If a license document contains a further restriction but permits relicensing
|
||||
or conveying under this License, you may add to a covered work material governed
|
||||
by the terms of that license document, provided that the further restriction
|
||||
does not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you must place,
|
||||
in the relevant source files, a statement of the additional terms that apply
|
||||
to those files, or a notice indicating where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the form
|
||||
of a separately written license, or stated as exceptions; the above requirements
|
||||
apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly provided
|
||||
under this License. Any attempt otherwise to propagate or modify it is void,
|
||||
and will automatically terminate your rights under this License (including
|
||||
any patent licenses granted under the third paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your license from
|
||||
a particular copyright holder is reinstated (a) provisionally, unless and
|
||||
until the copyright holder explicitly and finally terminates your license,
|
||||
and (b) permanently, if the copyright holder fails to notify you of the violation
|
||||
by some reasonable means prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is reinstated permanently
|
||||
if the copyright holder notifies you of the violation by some reasonable means,
|
||||
this is the first time you have received notice of violation of this License
|
||||
(for any work) from that copyright holder, and you cure the violation prior
|
||||
to 30 days after your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the licenses
|
||||
of parties who have received copies or rights from you under this License.
|
||||
If your rights have been terminated and not permanently reinstated, you do
|
||||
not qualify to receive new licenses for the same material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or run a copy
|
||||
of the Program. Ancillary propagation of a covered work occurring solely as
|
||||
a consequence of using peer-to-peer transmission to receive a copy likewise
|
||||
does not require acceptance. However, nothing other than this License grants
|
||||
you permission to propagate or modify any covered work. These actions infringe
|
||||
copyright if you do not accept this License. Therefore, by modifying or propagating
|
||||
a covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically receives
|
||||
a license from the original licensors, to run, modify and propagate that work,
|
||||
subject to this License. You are not responsible for enforcing compliance
|
||||
by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an organization,
|
||||
or substantially all assets of one, or subdividing an organization, or merging
|
||||
organizations. If propagation of a covered work results from an entity transaction,
|
||||
each party to that transaction who receives a copy of the work also receives
|
||||
whatever licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the Corresponding
|
||||
Source of the work from the predecessor in interest, if the predecessor has
|
||||
it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the rights
|
||||
granted or affirmed under this License. For example, you may not impose a
|
||||
license fee, royalty, or other charge for exercise of rights granted under
|
||||
this License, and you may not initiate litigation (including a cross-claim
|
||||
or counterclaim in a lawsuit) alleging that any patent claim is infringed
|
||||
by making, using, selling, offering for sale, or importing the Program or
|
||||
any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this License
|
||||
of the Program or a work on which the Program is based. The work thus licensed
|
||||
is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims owned or controlled
|
||||
by the contributor, whether already acquired or hereafter acquired, that would
|
||||
be infringed by some manner, permitted by this License, of making, using,
|
||||
or selling its contributor version, but do not include claims that would be
|
||||
infringed only as a consequence of further modification of the contributor
|
||||
version. For purposes of this definition, "control" includes the right to
|
||||
grant patent sublicenses in a manner consistent with the requirements of this
|
||||
License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free patent
|
||||
license under the contributor's essential patent claims, to make, use, sell,
|
||||
offer for sale, import and otherwise run, modify and propagate the contents
|
||||
of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express agreement
|
||||
or commitment, however denominated, not to enforce a patent (such as an express
|
||||
permission to practice a patent or covenant not to sue for patent infringement).
|
||||
To "grant" such a patent license to a party means to make such an agreement
|
||||
or commitment not to enforce a patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license, and the
|
||||
Corresponding Source of the work is not available for anyone to copy, free
|
||||
of charge and under the terms of this License, through a publicly available
|
||||
network server or other readily accessible means, then you must either (1)
|
||||
cause the Corresponding Source to be so available, or (2) arrange to deprive
|
||||
yourself of the benefit of the patent license for this particular work, or
|
||||
(3) arrange, in a manner consistent with the requirements of this License,
|
||||
to extend the patent license to downstream recipients. "Knowingly relying"
|
||||
means you have actual knowledge that, but for the patent license, your conveying
|
||||
the covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that country
|
||||
that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or arrangement,
|
||||
you convey, or propagate by procuring conveyance of, a covered work, and grant
|
||||
a patent license to some of the parties receiving the covered work authorizing
|
||||
them to use, propagate, modify or convey a specific copy of the covered work,
|
||||
then the patent license you grant is automatically extended to all recipients
|
||||
of the covered work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within the scope
|
||||
of its coverage, prohibits the exercise of, or is conditioned on the non-exercise
|
||||
of one or more of the rights that are specifically granted under this License.
|
||||
You may not convey a covered work if you are a party to an arrangement with
|
||||
a third party that is in the business of distributing software, under which
|
||||
you make payment to the third party based on the extent of your activity of
|
||||
conveying the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory patent
|
||||
license (a) in connection with copies of the covered work conveyed by you
|
||||
(or copies made from those copies), or (b) primarily for and in connection
|
||||
with specific products or compilations that contain the covered work, unless
|
||||
you entered into that arrangement, or that patent license was granted, prior
|
||||
to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting any implied
|
||||
license or other defenses to infringement that may otherwise be available
|
||||
to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or otherwise)
|
||||
that contradict the conditions of this License, they do not excuse you from
|
||||
the conditions of this License. If you cannot convey a covered work so as
|
||||
to satisfy simultaneously your obligations under this License and any other
|
||||
pertinent obligations, then as a consequence you may not convey it at all.
|
||||
For example, if you agree to terms that obligate you to collect a royalty
|
||||
for further conveying from those to whom you convey the Program, the only
|
||||
way you could satisfy both those terms and this License would be to refrain
|
||||
entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have permission to
|
||||
link or combine any covered work with a work licensed under version 3 of the
|
||||
GNU Affero General Public License into a single combined work, and to convey
|
||||
the resulting work. The terms of this License will continue to apply to the
|
||||
part which is the covered work, but the special requirements of the GNU Affero
|
||||
General Public License, section 13, concerning interaction through a network
|
||||
will apply to the combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of the
|
||||
GNU General Public License from time to time. Such new versions will be similar
|
||||
in spirit to the present version, but may differ in detail to address new
|
||||
problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program specifies
|
||||
that a certain numbered version of the GNU General Public License "or any
|
||||
later version" applies to it, you have the option of following the terms and
|
||||
conditions either of that numbered version or of any later version published
|
||||
by the Free Software Foundation. If the Program does not specify a version
|
||||
number of the GNU General Public License, you may choose any version ever
|
||||
published by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future versions of
|
||||
the GNU General Public License can be used, that proxy's public statement
|
||||
of acceptance of a version permanently authorizes you to choose that version
|
||||
for the Program.
|
||||
|
||||
Later license versions may give you additional or different permissions. However,
|
||||
no additional obligations are imposed on any author or copyright holder as
|
||||
a result of your choosing to follow a later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE
|
||||
LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
|
||||
OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
|
||||
EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM
|
||||
PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR
|
||||
CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL
|
||||
ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM
|
||||
AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL,
|
||||
INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO
|
||||
USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED
|
||||
INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE
|
||||
PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER
|
||||
PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided above cannot
|
||||
be given local legal effect according to their terms, reviewing courts shall
|
||||
apply local law that most closely approximates an absolute waiver of all civil
|
||||
liability in connection with the Program, unless a warranty or assumption
|
||||
of liability accompanies a copy of the Program in return for a fee. END OF
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest possible
|
||||
use to the public, the best way to achieve this is to make it free software
|
||||
which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest to attach
|
||||
them to the start of each source file to most effectively state the exclusion
|
||||
of warranty; and each file should have at least the "copyright" line and a
|
||||
pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License as published by the Free Software
|
||||
Foundation, either version 3 of the License, or (at your option) any later
|
||||
version.
|
||||
|
||||
This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along with
|
||||
this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short notice like
|
||||
this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
|
||||
This is free software, and you are welcome to redistribute it under certain
|
||||
conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands might
|
||||
be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary. For
|
||||
more information on this, and how to apply and follow the GNU GPL, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Lesser General Public
|
||||
License instead of this License. But first, please read <https://www.gnu.org/
|
||||
licenses /why-not-lgpl.html>.
|
||||
@@ -0,0 +1,12 @@
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License as
|
||||
published by the Free Software Foundation; either version 3 of
|
||||
the license or (at your option) at any later version that is
|
||||
accepted by the membership of KDE e.V. (or its successor
|
||||
approved by the membership of KDE e.V.), which shall act as a
|
||||
proxy as defined in Section 14 of version 3 of the license.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
@@ -0,0 +1,19 @@
|
||||
MIT License Copyright (c) <year> <copyright holders>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is furnished
|
||||
to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice (including the next
|
||||
paragraph) shall be included in all copies or substantial portions of the
|
||||
Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
|
||||
OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
|
||||
OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
@@ -0,0 +1,43 @@
|
||||
# Breeze
|
||||
|
||||
Breeze is the default style for [Plasma](https://kde.org/plasma-desktop/). This repository contains some parts of Breeze such as the cursors, wallpapers, and the application style.
|
||||
|
||||
## Components
|
||||
|
||||
This repository contains many parts of Breeze, such as:
|
||||
|
||||
* Color schemes, located under [/colors](/colors).
|
||||
* Cursors, located under [/cursors](/cursors).
|
||||
* Window decorations, located under [/kdecoration](/kdecoration).
|
||||
* Application style, located under [/kstyle](/kstyle).
|
||||
* Wallpapers, located under [/wallpapers](/wallpapers).
|
||||
|
||||
### See Also
|
||||
|
||||
If you can't find what you're looking for, it may exist in another repository instead:
|
||||
|
||||
* [Breeze Icons](https://invent.kde.org/frameworks/breeze-icons) contains the icon set used in Plasma.
|
||||
* [libplasma](https://invent.kde.org/plasma/libplasma/-/tree/master/src/desktoptheme) includes the [Plasma Style](https://develop.kde.org/docs/plasma/theme/) that affects the visuals for the Plasma panel and widgets.
|
||||
* The [Breeze SDDM theme](https://invent.kde.org/plasma/plasma-desktop/-/tree/master/sddm-theme) lives within the Plasma Desktop repository, adjacent to the lock screen.
|
||||
* [Plasma Workspace Wallpapers](https://invent.kde.org/plasma/plasma-workspace-wallpapers) contains the rest of the default wallpapers shipped with Plasma.
|
||||
* [Breeze for GTK](https://invent.kde.org/plasma/breeze-gtk) is the Breeze [GTK](https://gtk.org/) theme.
|
||||
* [QQC2 Desktop Style](https://invent.kde.org/frameworks/qqc2-desktop-style) is the default [Qt Quick Controls](https://doc.qt.io/qt-6/qtquickcontrols-index.html) style for desktop KDE applications. It draws controls in QtQuick-based apps using the current application style. If you're using KDE apps on Plasma or another Linux desktop, you're most likely using it.
|
||||
* [Breeze Style for QQC2](https://invent.kde.org/plasma/qqc2-breeze-style) is a Qt Quick Controls style that mimics the visual styling of Breeze specifically. If you're using KDE apps on Android or Plasma Mobile, you're most likely using it.
|
||||
|
||||
## Building
|
||||
|
||||
The easiest way to make changes and test Breeze during development is to [build it with kdesrc-build](https://community.kde.org/Get_Involved/development/Build_software_with_kdesrc-build).
|
||||
|
||||
When building Breeze manually, keep in mind that the Qt5 and Qt6 versions will be built by default. To control which versions are built, use the `BUILD_QT5` and `BUILD_QT6` CMake variables.
|
||||
|
||||
## Contributing
|
||||
|
||||
Like other projects in the KDE ecosystem, contributions are welcome from all. This repository is managed in [KDE Invent](https://invent.kde.org/plasma/breeze), our GitLab instance.
|
||||
|
||||
* Want to contribute code? See the [GitLab wiki page](https://community.kde.org/Infrastructure/GitLab) for a tutorial on how to send a merge request.
|
||||
* Reporting a bug? Please submit it on the [KDE Bugtracking System](https://bugs.kde.org/enter_bug.cgi?format=guided&product=breeze). Please do not use the Issues
|
||||
tab to report bugs.
|
||||
* Is there a part of Breeze that's not translated? See the [Getting Involved in Translation wiki page](https://community.kde.org/Get_Involved/translation) to see how
|
||||
you can help translate!
|
||||
|
||||
If you get stuck or need help with anything at all, head over to the [KDE New Contributors room](https://go.kde.org/matrix/#/#kde-welcome:kde.org) on Matrix. For questions about Breeze, please ask in the [KDE Development room](https://go.kde.org/matrix/#/#kde-devel:kde.org). See [Matrix](https://community.kde.org/Matrix) for more details.
|
||||
@@ -0,0 +1,17 @@
|
||||
# SPDX-FileCopyrightText: 2015 Volker Krause <vkrause@kde.org>
|
||||
#
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
|
||||
find_program(GTK_UPDATE_ICON_CACHE_EXECUTABLE NAMES gtk-update-icon-cache)
|
||||
|
||||
macro(gtk_update_icon_cache _dir)
|
||||
if (GTK_UPDATE_ICON_CACHE_EXECUTABLE)
|
||||
install(CODE "
|
||||
set(DESTDIR_VALUE \"\$ENV{DESTDIR}\")
|
||||
if (NOT DESTDIR_VALUE)
|
||||
execute_process(COMMAND ${GTK_UPDATE_ICON_CACHE_EXECUTABLE} -q -i . WORKING_DIRECTORY ${_dir})
|
||||
endif()
|
||||
")
|
||||
endif()
|
||||
endmacro()
|
||||
@@ -0,0 +1,166 @@
|
||||
[ColorEffects:Disabled]
|
||||
Color=56,56,56
|
||||
ColorAmount=0
|
||||
ColorEffect=0
|
||||
ContrastAmount=0.65
|
||||
ContrastEffect=1
|
||||
IntensityAmount=0.1
|
||||
IntensityEffect=2
|
||||
|
||||
[ColorEffects:Inactive]
|
||||
ChangeSelectionColor=true
|
||||
Color=112,111,110
|
||||
ColorAmount=0.025
|
||||
ColorEffect=2
|
||||
ContrastAmount=0.1
|
||||
ContrastEffect=2
|
||||
Enable=false
|
||||
IntensityAmount=0
|
||||
IntensityEffect=0
|
||||
|
||||
[Colors:Button]
|
||||
BackgroundAlternate=189,195,199
|
||||
BackgroundNormal=239,240,241
|
||||
DecorationFocus=61,174,233
|
||||
DecorationHover=147,206,233
|
||||
ForegroundActive=61,174,233
|
||||
ForegroundInactive=127,140,141
|
||||
ForegroundLink=41,128,185
|
||||
ForegroundNegative=218,68,83
|
||||
ForegroundNeutral=198,92,0
|
||||
ForegroundNormal=35,38,39
|
||||
ForegroundPositive=39,174,96
|
||||
ForegroundVisited=127,140,141
|
||||
|
||||
[Colors:Selection]
|
||||
BackgroundAlternate=29,153,243
|
||||
BackgroundNormal=61,174,233
|
||||
DecorationFocus=61,174,233
|
||||
DecorationHover=147,206,233
|
||||
ForegroundActive=252,252,252
|
||||
ForegroundInactive=239,240,241
|
||||
ForegroundLink=253,188,75
|
||||
ForegroundNegative=176,55,69
|
||||
ForegroundNeutral=246,116,0
|
||||
ForegroundNormal=252,252,252
|
||||
ForegroundPositive=23,104,57
|
||||
ForegroundVisited=189,195,199
|
||||
|
||||
[Colors:Tooltip]
|
||||
BackgroundAlternate=77,77,77
|
||||
BackgroundNormal=35,38,39
|
||||
DecorationFocus=61,174,233
|
||||
DecorationHover=147,206,233
|
||||
ForegroundActive=61,174,233
|
||||
ForegroundInactive=189,195,199
|
||||
ForegroundLink=41,128,185
|
||||
ForegroundNegative=218,68,83
|
||||
ForegroundNeutral=246,116,0
|
||||
ForegroundNormal=252,252,252
|
||||
ForegroundPositive=39,174,96
|
||||
ForegroundVisited=127,140,141
|
||||
|
||||
[Colors:View]
|
||||
BackgroundAlternate=239,240,241
|
||||
BackgroundNormal=252,252,252
|
||||
DecorationFocus=61,174,233
|
||||
DecorationHover=147,206,233
|
||||
ForegroundActive=61,174,233
|
||||
ForegroundInactive=127,140,141
|
||||
ForegroundLink=41,128,185
|
||||
ForegroundNegative=218,68,83
|
||||
ForegroundNeutral=246,116,0
|
||||
ForegroundNormal=35,38,39
|
||||
ForegroundPositive=39,174,96
|
||||
ForegroundVisited=127,140,141
|
||||
|
||||
[Colors:Window]
|
||||
BackgroundAlternate=189,195,199
|
||||
BackgroundNormal=239,240,241
|
||||
DecorationFocus=61,174,233
|
||||
DecorationHover=147,206,233
|
||||
ForegroundActive=61,174,233
|
||||
ForegroundInactive=127,140,141
|
||||
ForegroundLink=41,128,185
|
||||
ForegroundNegative=218,68,83
|
||||
ForegroundNeutral=246,116,0
|
||||
ForegroundNormal=35,38,39
|
||||
ForegroundPositive=39,174,96
|
||||
ForegroundVisited=127,140,141
|
||||
|
||||
[Colors:Complementary]
|
||||
BackgroundAlternate=59,64,69
|
||||
BackgroundNormal=49,54,59
|
||||
DecorationFocus=30,146,255
|
||||
DecorationHover=61,174,230
|
||||
ForegroundActive=147,206,233
|
||||
ForegroundInactive=175,176,179
|
||||
ForegroundLink=61,174,230
|
||||
ForegroundNegative=231,76,60
|
||||
ForegroundNeutral=253,188,75
|
||||
ForegroundNormal=239,240,241
|
||||
ForegroundPositive=46,204,113
|
||||
ForegroundVisited=61,174,230
|
||||
|
||||
[General]
|
||||
ColorScheme=BreezeClassic
|
||||
Name=Breeze Classic
|
||||
Name[ar]=نسيم التقليدي
|
||||
Name[az]=Breeze klassik
|
||||
Name[bg]=Breeze Класически
|
||||
Name[ca]=Brisa clàssica
|
||||
Name[ca@valencia]=Brisa clàssica
|
||||
Name[cs]=Breeze Classic
|
||||
Name[da]=Breeze Classic
|
||||
Name[de]=Breeze Klassisch
|
||||
Name[el]=Breeze κλασικό
|
||||
Name[en_GB]=Breeze Classic
|
||||
Name[eo]=Breeze Classic
|
||||
Name[es]=Brisa clásico
|
||||
Name[eu]=Breeze klasikoa
|
||||
Name[fi]=Perinteinen Breeze
|
||||
Name[fr]=Breeze classique
|
||||
Name[gl]=Brisa clásica
|
||||
Name[he]=בריזה קלסית
|
||||
Name[hi]=ब्रीज़ क्लासिक
|
||||
Name[hu]=Breeze Classic
|
||||
Name[ia]=Brisa Classic
|
||||
Name[id]=Breeze Klasik
|
||||
Name[is]=Breeze klassík
|
||||
Name[it]=Brezza classico
|
||||
Name[ja]=Breeze クラシック
|
||||
Name[ka]=Breeze კლასიკური
|
||||
Name[ko]=Breeze 고전
|
||||
Name[lt]=Breeze klasikinis
|
||||
Name[lv]=Breeze Classic
|
||||
Name[nl]=Breeze Classic
|
||||
Name[nn]=Breeze klassisk
|
||||
Name[pa]=ਬਰੀਜ਼ ਟਕਸਾਲੀ
|
||||
Name[pl]=Klasyczna Bryza
|
||||
Name[pt]=Brisa Clássica
|
||||
Name[pt_BR]=Breeze Classic
|
||||
Name[ro]=Briză, clasic
|
||||
Name[ru]=Breeze, классический вариант
|
||||
Name[sa]=हवा क्लासिक
|
||||
Name[sk]=Klasický vánok
|
||||
Name[sl]=Sapica, klasična
|
||||
Name[sv]=Breeze klassisk
|
||||
Name[tr]=Esinti Klasik
|
||||
Name[uk]=Класична Breeze
|
||||
Name[x-test]=xxBreeze Classicxx
|
||||
Name[zh_CN]=Breeze 微风经典
|
||||
Name[zh_TW]=Breeze Classic
|
||||
accentActiveTitlebar=true
|
||||
accentInactiveTitlebar=false
|
||||
shadeSortColumn=true
|
||||
|
||||
[KDE]
|
||||
contrast=4
|
||||
|
||||
[WM]
|
||||
activeBackground=71,80,87
|
||||
activeBlend=252,252,252
|
||||
activeForeground=252,252,252
|
||||
inactiveBackground=239,240,241
|
||||
inactiveBlend=75,71,67
|
||||
inactiveForeground=189,195,199
|
||||
@@ -0,0 +1,208 @@
|
||||
# SPDX-FileCopyrightText: Andrew Lake <jamboarder@gmail.com>
|
||||
# SPDX-FileCopyrightText: Marco Martin <notmart@gmail.com>
|
||||
# SPDX-FileCopyrightText: Nate Graham <nate@kde.org>
|
||||
# SPDX-FileCopyrightText: Noah Davis <noahadvs@gmail.com>
|
||||
# SPDX-FileCopyrightText: Neal Gompa <ngompa@kde.org>
|
||||
# SPDX-FileCopyrightText: David Redondo <kde@david-redondo.de>
|
||||
# SPDX-License-Identifier: LGPL-2.0-or-later
|
||||
|
||||
[ColorEffects:Disabled]
|
||||
Color=56,56,56
|
||||
ColorAmount=0
|
||||
ColorEffect=0
|
||||
ContrastAmount=0.65
|
||||
ContrastEffect=1
|
||||
IntensityAmount=0.1
|
||||
IntensityEffect=2
|
||||
|
||||
[ColorEffects:Inactive]
|
||||
ChangeSelectionColor=true
|
||||
Color=112,111,110
|
||||
ColorAmount=0.025
|
||||
ColorEffect=2
|
||||
ContrastAmount=0.1
|
||||
ContrastEffect=2
|
||||
Enable=false
|
||||
IntensityAmount=0
|
||||
IntensityEffect=0
|
||||
|
||||
[Colors:Button]
|
||||
BackgroundAlternate=30,87,116
|
||||
BackgroundNormal=49,54,59
|
||||
DecorationFocus=61,174,233
|
||||
DecorationHover=61,174,233
|
||||
ForegroundActive=61,174,233
|
||||
ForegroundInactive=161,169,177
|
||||
ForegroundLink=29,153,243
|
||||
ForegroundNegative=218,68,83
|
||||
ForegroundNeutral=246,116,0
|
||||
ForegroundNormal=252,252,252
|
||||
ForegroundPositive=39,174,96
|
||||
ForegroundVisited=155,89,182
|
||||
|
||||
[Colors:Complementary]
|
||||
BackgroundAlternate=30,87,116
|
||||
BackgroundNormal=42,46,50
|
||||
DecorationFocus=61,174,233
|
||||
DecorationHover=61,174,233
|
||||
ForegroundActive=61,174,233
|
||||
ForegroundInactive=161,169,177
|
||||
ForegroundLink=29,153,243
|
||||
ForegroundNegative=218,68,83
|
||||
ForegroundNeutral=246,116,0
|
||||
ForegroundNormal=252,252,252
|
||||
ForegroundPositive=39,174,96
|
||||
ForegroundVisited=155,89,182
|
||||
|
||||
[Colors:Header]
|
||||
BackgroundAlternate=42,46,50
|
||||
BackgroundNormal=49,54,59
|
||||
DecorationFocus=61,174,233
|
||||
DecorationHover=61,174,233
|
||||
ForegroundActive=61,174,233
|
||||
ForegroundInactive=161,169,177
|
||||
ForegroundLink=29,153,243
|
||||
ForegroundNegative=218,68,83
|
||||
ForegroundNeutral=246,116,0
|
||||
ForegroundNormal=252,252,252
|
||||
ForegroundPositive=39,174,96
|
||||
ForegroundVisited=155,89,182
|
||||
|
||||
[Colors:Header][Inactive]
|
||||
BackgroundAlternate=49,54,59
|
||||
BackgroundNormal=42,46,50
|
||||
DecorationFocus=61,174,233
|
||||
DecorationHover=61,174,233
|
||||
ForegroundActive=61,174,233
|
||||
ForegroundInactive=161,169,177
|
||||
ForegroundLink=29,153,243
|
||||
ForegroundNegative=218,68,83
|
||||
ForegroundNeutral=246,116,0
|
||||
ForegroundNormal=252,252,252
|
||||
ForegroundPositive=39,174,96
|
||||
ForegroundVisited=155,89,182
|
||||
|
||||
[Colors:Selection]
|
||||
BackgroundAlternate=30,87,116
|
||||
BackgroundNormal=61,174,233
|
||||
DecorationFocus=61,174,233
|
||||
DecorationHover=61,174,233
|
||||
ForegroundActive=252,252,252
|
||||
ForegroundInactive=161,169,177
|
||||
ForegroundLink=253,188,75
|
||||
ForegroundNegative=176,55,69
|
||||
ForegroundNeutral=198,92,0
|
||||
ForegroundNormal=252,252,252
|
||||
ForegroundPositive=23,104,57
|
||||
ForegroundVisited=155,89,182
|
||||
|
||||
[Colors:Tooltip]
|
||||
BackgroundAlternate=42,46,50
|
||||
BackgroundNormal=49,54,59
|
||||
DecorationFocus=61,174,233
|
||||
DecorationHover=61,174,233
|
||||
ForegroundActive=61,174,233
|
||||
ForegroundInactive=161,169,177
|
||||
ForegroundLink=29,153,243
|
||||
ForegroundNegative=218,68,83
|
||||
ForegroundNeutral=246,116,0
|
||||
ForegroundNormal=252,252,252
|
||||
ForegroundPositive=39,174,96
|
||||
ForegroundVisited=155,89,182
|
||||
|
||||
[Colors:View]
|
||||
BackgroundAlternate=35,38,41
|
||||
BackgroundNormal=27,30,32
|
||||
DecorationFocus=61,174,233
|
||||
DecorationHover=61,174,233
|
||||
ForegroundActive=61,174,233
|
||||
ForegroundInactive=161,169,177
|
||||
ForegroundLink=29,153,243
|
||||
ForegroundNegative=218,68,83
|
||||
ForegroundNeutral=246,116,0
|
||||
ForegroundNormal=252,252,252
|
||||
ForegroundPositive=39,174,96
|
||||
ForegroundVisited=155,89,182
|
||||
|
||||
[Colors:Window]
|
||||
BackgroundAlternate=49,54,59
|
||||
BackgroundNormal=42,46,50
|
||||
DecorationFocus=61,174,233
|
||||
DecorationHover=61,174,233
|
||||
ForegroundActive=61,174,233
|
||||
ForegroundInactive=161,169,177
|
||||
ForegroundLink=29,153,243
|
||||
ForegroundNegative=218,68,83
|
||||
ForegroundNeutral=246,116,0
|
||||
ForegroundNormal=252,252,252
|
||||
ForegroundPositive=39,174,96
|
||||
ForegroundVisited=155,89,182
|
||||
|
||||
[General]
|
||||
ColorScheme=BreezeDark
|
||||
Name=Breeze Dark
|
||||
Name[ar]=نسيم داكن
|
||||
Name[az]=Breeze - Tünd
|
||||
Name[bg]=Breeze Тъмен
|
||||
Name[bs]=Breeze tamna
|
||||
Name[ca]=Brisa fosca
|
||||
Name[ca@valencia]=Brisa fosca
|
||||
Name[cs]=Breeze Tmavé
|
||||
Name[da]=Breeze Dark
|
||||
Name[de]=Breeze Dunkel
|
||||
Name[el]=Breeze σκούρο
|
||||
Name[en_GB]=Breeze Dark
|
||||
Name[eo]=Breeze Dark
|
||||
Name[es]=Brisa oscuro
|
||||
Name[et]=Breeze tume
|
||||
Name[eu]=Breeze iluna
|
||||
Name[fi]=Tumma Breeze
|
||||
Name[fr]=Brise sombre
|
||||
Name[gl]=Brisa escura
|
||||
Name[he]=בריזה כהה
|
||||
Name[hi]=ब्रीज़ गहरा
|
||||
Name[hu]=Breeze Dark
|
||||
Name[ia]=Brisa obscure
|
||||
Name[id]=Breeze Gelap
|
||||
Name[is]=Breeze dökkt
|
||||
Name[it]=Brezza scuro
|
||||
Name[ja]=Breeze ダーク
|
||||
Name[ka]=Breeze მუქი
|
||||
Name[ko]=어두운 Breeze
|
||||
Name[lt]=Breeze tamsus
|
||||
Name[lv]=Breeze Dark
|
||||
Name[nb]=Breeze mørk
|
||||
Name[nl]=Breeze Dark
|
||||
Name[nn]=Breeze mørk
|
||||
Name[pa]=ਬਰੀਜ਼ ਗੂੜ੍ਹਾ
|
||||
Name[pl]=Ciemna Bryza
|
||||
Name[pt]=Brisa Escura
|
||||
Name[pt_BR]=Breeze Dark
|
||||
Name[ro]=Briză, întunecat
|
||||
Name[ru]=Breeze, тёмный вариант
|
||||
Name[sa]=वायुः अन्धकारः
|
||||
Name[sk]=Tmavý vánok
|
||||
Name[sl]=Sapica, temna
|
||||
Name[sr]=Поветарац тамни
|
||||
Name[sr@ijekavian]=Поветарац тамни
|
||||
Name[sr@ijekavianlatin]=Povetarac tamni
|
||||
Name[sr@latin]=Povetarac tamni
|
||||
Name[sv]=Breeze mörk
|
||||
Name[tg]=Насими торик
|
||||
Name[tr]=Esinti Koyu
|
||||
Name[uk]=Темна Breeze
|
||||
Name[x-test]=xxBreeze Darkxx
|
||||
Name[zh_CN]=Breeze 微风深色
|
||||
Name[zh_TW]=Breeze Dark
|
||||
shadeSortColumn=true
|
||||
|
||||
[KDE]
|
||||
contrast=4
|
||||
|
||||
[WM]
|
||||
activeBackground=49,54,59
|
||||
activeBlend=252,252,252
|
||||
activeForeground=252,252,252
|
||||
inactiveBackground=42,46,50
|
||||
inactiveBlend=161,169,177
|
||||
inactiveForeground=161,169,177
|
||||
@@ -0,0 +1,202 @@
|
||||
# SPDX-FileCopyrightText: Andrew Lake <jamboarder@gmail.com>
|
||||
# SPDX-FileCopyrightText: Marco Martin <notmart@gmail.com>
|
||||
# SPDX-FileCopyrightText: Nate Graham <nate@kde.org>
|
||||
# SPDX-FileCopyrightText: Noah Davis <noahadvs@gmail.com>
|
||||
# SPDX-FileCopyrightText: Neal Gompa <ngompa@kde.org>
|
||||
# SPDX-FileCopyrightText: David Redondo <kde@david-redondo.de>
|
||||
# SPDX-License-Identifier: LGPL-2.0-or-later
|
||||
|
||||
[ColorEffects:Disabled]
|
||||
Color=56,56,56
|
||||
ColorAmount=0
|
||||
ColorEffect=0
|
||||
ContrastAmount=0.65
|
||||
ContrastEffect=1
|
||||
IntensityAmount=0.1
|
||||
IntensityEffect=2
|
||||
|
||||
[ColorEffects:Inactive]
|
||||
ChangeSelectionColor=true
|
||||
Color=112,111,110
|
||||
ColorAmount=0.025
|
||||
ColorEffect=2
|
||||
ContrastAmount=0.1
|
||||
ContrastEffect=2
|
||||
Enable=false
|
||||
IntensityAmount=0
|
||||
IntensityEffect=0
|
||||
|
||||
[Colors:Button]
|
||||
BackgroundAlternate=163,212,250
|
||||
BackgroundNormal=252,252,252
|
||||
DecorationFocus=61,174,233
|
||||
DecorationHover=61,174,233
|
||||
ForegroundActive=61,174,233
|
||||
ForegroundInactive=112,125,138
|
||||
ForegroundLink=41,128,185
|
||||
ForegroundNegative=218,68,83
|
||||
ForegroundNeutral=246,116,0
|
||||
ForegroundNormal=35,38,41
|
||||
ForegroundPositive=39,174,96
|
||||
ForegroundVisited=155,89,182
|
||||
|
||||
[Colors:Complementary]
|
||||
BackgroundAlternate=27,30,32
|
||||
BackgroundNormal=42,46,50
|
||||
DecorationFocus=61,174,233
|
||||
DecorationHover=61,174,233
|
||||
ForegroundActive=61,174,233
|
||||
ForegroundInactive=161,169,177
|
||||
ForegroundLink=29,153,243
|
||||
ForegroundNegative=218,68,83
|
||||
ForegroundNeutral=246,116,0
|
||||
ForegroundNormal=252,252,252
|
||||
ForegroundPositive=39,174,96
|
||||
ForegroundVisited=155,89,182
|
||||
|
||||
[Colors:Header]
|
||||
BackgroundAlternate=239,240,241
|
||||
BackgroundNormal=222,224,226
|
||||
DecorationFocus=61,174,233
|
||||
DecorationHover=61,174,233
|
||||
ForegroundActive=61,174,233
|
||||
ForegroundInactive=112,125,138
|
||||
ForegroundLink=41,128,185
|
||||
ForegroundNegative=218,68,83
|
||||
ForegroundNeutral=246,116,0
|
||||
ForegroundNormal=35,38,41
|
||||
ForegroundPositive=39,174,96
|
||||
ForegroundVisited=155,89,182
|
||||
|
||||
[Colors:Header][Inactive]
|
||||
BackgroundAlternate=227,229,231
|
||||
BackgroundNormal=239,240,241
|
||||
DecorationFocus=61,174,233
|
||||
DecorationHover=61,174,233
|
||||
ForegroundActive=61,174,233
|
||||
ForegroundInactive=112,125,138
|
||||
ForegroundLink=41,128,185
|
||||
ForegroundNegative=218,68,83
|
||||
ForegroundNeutral=246,116,0
|
||||
ForegroundNormal=35,38,41
|
||||
ForegroundPositive=39,174,96
|
||||
ForegroundVisited=155,89,182
|
||||
|
||||
[Colors:Selection]
|
||||
BackgroundAlternate=163,212,250
|
||||
BackgroundNormal=61,174,233
|
||||
DecorationFocus=61,174,233
|
||||
DecorationHover=61,174,233
|
||||
ForegroundActive=255,255,255
|
||||
ForegroundInactive=112,125,138
|
||||
ForegroundLink=253,188,75
|
||||
ForegroundNegative=176,55,69
|
||||
ForegroundNeutral=198,92,0
|
||||
ForegroundNormal=255,255,255
|
||||
ForegroundPositive=23,104,57
|
||||
ForegroundVisited=155,89,182
|
||||
|
||||
[Colors:Tooltip]
|
||||
BackgroundAlternate=239,240,241
|
||||
BackgroundNormal=247,247,247
|
||||
DecorationFocus=61,174,233
|
||||
DecorationHover=61,174,233
|
||||
ForegroundActive=61,174,233
|
||||
ForegroundInactive=112,125,138
|
||||
ForegroundLink=41,128,185
|
||||
ForegroundNegative=218,68,83
|
||||
ForegroundNeutral=246,116,0
|
||||
ForegroundNormal=35,38,41
|
||||
ForegroundPositive=39,174,96
|
||||
ForegroundVisited=155,89,182
|
||||
|
||||
[Colors:View]
|
||||
BackgroundAlternate=247,247,247
|
||||
BackgroundNormal=255,255,255
|
||||
DecorationFocus=61,174,233
|
||||
DecorationHover=61,174,233
|
||||
ForegroundActive=61,174,233
|
||||
ForegroundInactive=112,125,138
|
||||
ForegroundLink=41,128,185
|
||||
ForegroundNegative=218,68,83
|
||||
ForegroundNeutral=246,116,0
|
||||
ForegroundNormal=35,38,41
|
||||
ForegroundPositive=39,174,96
|
||||
ForegroundVisited=155,89,182
|
||||
|
||||
[Colors:Window]
|
||||
BackgroundAlternate=227,229,231
|
||||
BackgroundNormal=239,240,241
|
||||
DecorationFocus=61,174,233
|
||||
DecorationHover=61,174,233
|
||||
ForegroundActive=61,174,233
|
||||
ForegroundInactive=112,125,138
|
||||
ForegroundLink=41,128,185
|
||||
ForegroundNegative=218,68,83
|
||||
ForegroundNeutral=246,116,0
|
||||
ForegroundNormal=35,38,41
|
||||
ForegroundPositive=39,174,96
|
||||
ForegroundVisited=155,89,182
|
||||
|
||||
[General]
|
||||
ColorScheme=BreezeLight
|
||||
Name=Breeze Light
|
||||
Name[ar]=نسيم فاتح
|
||||
Name[az]=Breeze - İşıqlı
|
||||
Name[bg]=Breeze Светъл
|
||||
Name[ca]=Brisa clara
|
||||
Name[ca@valencia]=Brisa clara
|
||||
Name[cs]=Breeze Světlé
|
||||
Name[da]=Breeze Light
|
||||
Name[de]=Breeze Hell
|
||||
Name[el]=Breeze φωτεινό
|
||||
Name[en_GB]=Breeze Light
|
||||
Name[eo]=Breeze Light
|
||||
Name[es]=Brisa claro
|
||||
Name[et]=Breeze hele
|
||||
Name[eu]=Breeze argia
|
||||
Name[fi]=Vaalea Breeze
|
||||
Name[fr]=Brise clair
|
||||
Name[gl]=Brisa clara
|
||||
Name[he]=בריזה בהירה
|
||||
Name[hi]=ब्रीज़ हलका
|
||||
Name[hu]=Breeze Light
|
||||
Name[ia]=Brisa Ligier
|
||||
Name[id]=Breeze Terang
|
||||
Name[is]=Breeze ljóst
|
||||
Name[it]=Brezza chiaro
|
||||
Name[ja]=Breeze ライト
|
||||
Name[ka]=Breeze ღია
|
||||
Name[ko]=밝은 Breeze
|
||||
Name[lt]=Breeze šviesus
|
||||
Name[lv]=Breeze Light
|
||||
Name[nl]=Breeze Light
|
||||
Name[nn]=Breeze lys
|
||||
Name[pa]=ਬਰੀਜ਼ ਹਲਕਾ
|
||||
Name[pl]=Jasna Bryza
|
||||
Name[pt]=Brisa Clara
|
||||
Name[pt_BR]=Breeze Light
|
||||
Name[ro]=Briză, luminos
|
||||
Name[ru]=Breeze, светлый вариант
|
||||
Name[sa]=वायु प्रकाश
|
||||
Name[sk]=Svetlý vánok
|
||||
Name[sl]=Sapica, svetla
|
||||
Name[sv]=Breeze ljus
|
||||
Name[tg]=Насими сабук
|
||||
Name[tr]=Esinti Açık
|
||||
Name[uk]=Світла Breeze
|
||||
Name[x-test]=xxBreeze Lightxx
|
||||
Name[zh_CN]=Breeze 微风浅色
|
||||
Name[zh_TW]=Breeze Light
|
||||
shadeSortColumn=true
|
||||
|
||||
[KDE]
|
||||
contrast=4
|
||||
|
||||
[WM]
|
||||
activeBackground=227,229,231
|
||||
activeBlend=227,229,231
|
||||
activeForeground=35,38,41
|
||||
inactiveBackground=239,240,241
|
||||
inactiveBlend=239,240,241
|
||||
inactiveForeground=112,125,138
|
||||
@@ -0,0 +1,6 @@
|
||||
install(FILES BreezeClassic.colors
|
||||
DESTINATION ${KDE_INSTALL_DATADIR}/color-schemes/)
|
||||
install(FILES BreezeDark.colors
|
||||
DESTINATION ${KDE_INSTALL_DATADIR}/color-schemes/)
|
||||
install(FILES BreezeLight.colors
|
||||
DESTINATION ${KDE_INSTALL_DATADIR}/color-schemes/)
|
||||
@@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
find -name \*.colors -print
|
||||
@@ -0,0 +1,6 @@
|
||||
Cursors:
|
||||
Ken Vermette <vermette@gmail.com>
|
||||
|
||||
Kstyle:
|
||||
Hugo Pereira Da Costa <hugo.pereira@free.fr> - Developer
|
||||
Andrew Lake <jamboarder@gmail.com> - Designer
|
||||
Symlink
+1
@@ -0,0 +1 @@
|
||||
progress
|
||||
Symlink
+1
@@ -0,0 +1 @@
|
||||
size_ver
|
||||
Symlink
+1
@@ -0,0 +1 @@
|
||||
circle
|
||||
Symlink
+1
@@ -0,0 +1 @@
|
||||
progress
|
||||
Symlink
+1
@@ -0,0 +1 @@
|
||||
copy
|
||||
Symlink
+1
@@ -0,0 +1 @@
|
||||
alias
|
||||
Symlink
+1
@@ -0,0 +1 @@
|
||||
progress
|
||||
Symlink
+1
@@ -0,0 +1 @@
|
||||
dnd-move
|
||||
Symlink
+1
@@ -0,0 +1 @@
|
||||
help
|
||||
Symlink
+1
@@ -0,0 +1 @@
|
||||
copy
|
||||
Symlink
+1
@@ -0,0 +1 @@
|
||||
alias
|
||||
Symlink
+1
@@ -0,0 +1 @@
|
||||
dnd-move
|
||||
Symlink
+1
@@ -0,0 +1 @@
|
||||
pointer
|
||||
Symlink
+1
@@ -0,0 +1 @@
|
||||
alias
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1 @@
|
||||
default
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user