From 534e9554ccc7cf3a65cb10c96839f344c2a5590d Mon Sep 17 00:00:00 2001 From: Djonatan Altenrath Date: Fri, 23 Oct 2026 22:01:50 -0300 Subject: [PATCH] feat: extract standalone desktop profile with experimental Fedora support - Separate desktop builds from Debian-specific OS components - Add libseat integration and Wayland session entry - Add RPM packaging and Fedora CI - Validate builds, installation and headless startup - Document migration scope and remaining hardware validation --- .github/workflows/desktop-fedora.yml | 16 +++ .gitignore | 3 + Makefile | 17 +++ README.md | 179 +++++++++++---------------- apps/settings/General.jsx | 10 +- apps/settings/Sharing.jsx | 3 +- apps/settings/index.jsx | 11 +- apps/store/host.jsx | 22 ++++ apps/store/index.jsx | 11 +- assets/locales/en/settings.json | 1 + assets/locales/en/store.json | 3 + assets/locales/es/settings.json | 1 + assets/locales/es/store.json | 3 + assets/locales/pt/settings.json | 1 + assets/locales/pt/store.json | 3 + docs/STANDALONE.md | 69 +++++++++++ package-lock.json | 4 +- package.json | 6 +- packaging/desktop/lord-de.desktop.in | 6 + packaging/rpm/lord-de.spec | 60 +++++++++ sdk/index.js | 1 + sdk/platform.js | 2 + sdk/smart.js | 2 + sdk/updates.js | 3 +- server/Makefile | 55 +++++++- server/src/drmcard.h | 12 ++ server/src/input.c | 44 ++++++- server/src/input.h | 2 + server/src/kms.c | 9 +- server/src/main.c | 57 ++++++++- server/src/net/state.c | 3 + server/src/platform/admin.c | 30 +++++ server/src/platform/net.c | 5 + server/src/platform/seat.c | 82 ++++++++++++ server/src/platform/seat.h | 16 +++ server/src/term/pty.c | 7 +- server/src/ui/js.c | 4 + server/src/ui/js_sys.c | 16 ++- server/tests/platform_admin_test.c | 19 +++ server/tests/seat_test.c | 72 +++++++++++ tools/build-theme.mjs | 38 +++++- tools/desktop/check.py | 76 ++++++++++++ tools/desktop/dist.sh | 33 +++++ tools/desktop/install.py | 89 +++++++++++++ tools/desktop/lord-de-session.in | 19 +++ 45 files changed, 965 insertions(+), 160 deletions(-) create mode 100644 .github/workflows/desktop-fedora.yml create mode 100644 Makefile create mode 100644 apps/store/host.jsx create mode 100644 docs/STANDALONE.md create mode 100644 packaging/desktop/lord-de.desktop.in create mode 100644 packaging/rpm/lord-de.spec create mode 100644 sdk/platform.js create mode 100644 server/src/platform/admin.c create mode 100644 server/src/platform/net.c create mode 100644 server/src/platform/seat.c create mode 100644 server/src/platform/seat.h create mode 100644 server/tests/platform_admin_test.c create mode 100644 server/tests/seat_test.c create mode 100644 tools/desktop/check.py create mode 100644 tools/desktop/dist.sh create mode 100644 tools/desktop/install.py create mode 100644 tools/desktop/lord-de-session.in diff --git a/.github/workflows/desktop-fedora.yml b/.github/workflows/desktop-fedora.yml new file mode 100644 index 00000000..e06883fe --- /dev/null +++ b/.github/workflows/desktop-fedora.yml @@ -0,0 +1,16 @@ +name: Standalone desktop (Fedora) +on: + push: + pull_request: +jobs: + desktop: + runs-on: ubuntu-latest + container: registry.fedoraproject.org/fedora:44 + steps: + - name: Build dependencies + run: dnf install -y git gcc make binutils python3 pkgconf-pkg-config wayland-devel wayland-protocols-devel libxkbcommon-devel libxcrypt-devel libseat-devel openssl-devel nodejs npm + - uses: actions/checkout@v4 + - run: npm ci + - run: make -j2 check CFLAGS='-O2 -g -D_FORTIFY_SOURCE=3 -fstack-protector-strong' + - name: Stage installation + run: make install PREFIX=/usr DESTDIR="$RUNNER_TEMP/lord-de" diff --git a/.gitignore b/.gitignore index 6439c107..7be14615 100644 --- a/.gitignore +++ b/.gitignore @@ -18,6 +18,9 @@ assets/locales/*.tgz logs/ /code-manifest.json /code-manifest.sig +/build-profile.json +*.rpm +/dist/ # the desktop imager's builds (desktop/imager, docs/IMAGER.md) desktop/imager/target/ desktop/imager/dist/ diff --git a/Makefile b/Makefile new file mode 100644 index 00000000..5ae5af67 --- /dev/null +++ b/Makefile @@ -0,0 +1,17 @@ +PREFIX ?= /usr/local +LIBEXECDIR ?= $(PREFIX)/libexec +PYTHON ?= python3 + +.PHONY: all themes server check test install clean +all: themes server +themes: + LORD_PROFILE=desktop npm run build +server: + $(MAKE) -C server PROFILE=desktop +check test: all + $(MAKE) -C server PROFILE=desktop test-platform + $(PYTHON) tools/desktop/check.py +install: + $(PYTHON) tools/desktop/install.py --prefix '$(PREFIX)' --libexecdir '$(LIBEXECDIR)' --destdir '$(DESTDIR)' +clean: + $(MAKE) -C server clean diff --git a/README.md b/README.md index 5b080253..d0ed3214 100644 --- a/README.md +++ b/README.md @@ -1,127 +1,86 @@ -

- - LordOS - LordOS - -

- -

The free, fast and secure Linux desktop.

- -

- lordos.org · - Download · - Features · - Gallery · - Paper · - FAQ · - Docs -

- -LordOS is a free GNU/Linux distribution based on Debian, with its own desktop environment: -a display server and Wayland compositor written in C, its own interface engine, and native apps -made to feel calm, clear and private. It runs on 64-bit PCs and on the Raspberry Pi 5, and the -Linux apps you already use (Chromium, Firefox, GTK and Qt apps) run alongside the native ones. - -

- The LordOS desktop - The LordOS desktop in dark mode -

- -## Everything you need. Nothing you don't. - -| | | -|---|---| -| **[A desktop of its own](https://lordos.org/features/own-desktop/)** | Its own display server and Wayland compositor in C and its own interface engine, on a solid Debian base. Smooth on any 64-bit PC (amd64), and light enough for the Raspberry Pi 5 (arm64). | -| **[Private by design](https://lordos.org/features/private-by-design/)** | Installable LordOS apps run isolated and ask before using your camera, microphone, files or network. You decide. | -| **[A firewall you can see](https://lordos.org/features/visible-firewall/)** | Watch every connection on a live world map, then allow or block it per app, by domain, address or network, and restrict camera, microphone, files and more. | -| **[Passwords built in](https://lordos.org/features/passwords/)** | A vault for passwords, 2FA codes and cards that unlocks with a password or a USB key. | -| **[Mail, Calendar, Contacts](https://lordos.org/features/mail-calendar/)** | Native apps for your accounts, with remote images blocked until you say so. | -| **[Your Linux apps too](https://lordos.org/features/linux-apps/)** | Chromium, Firefox and GTK apps fit right in, with the same window frame and dark mode. | - -Measured, not promised: the whole system idles at **465–487 MB of RAM**, of which `lord-server` -(the display server with the whole desktop) is **32–36 MB**, and boots in about **16 s** (see -[`docs/ISO.md`](docs/ISO.md), "Final ISO test"). What is isolated today, exactly, is in -[`docs/PRIVACY.md`](docs/PRIVACY.md). - -## Get LordOS - -Releases are signed and published on [GitHub Releases](https://github.com/lordbasex/LordOS/releases) -and on [lordos.org](https://lordos.org/#download). - -- **PC (64-bit):** a live and installable ISO. Try it without installing. -- **Raspberry Pi 5:** a ready-to-flash image for SD card or NVMe, with fan control and our own - kernel. The Raspberry Pi 5 is the only supported board. -- **Already on Debian 13?** Install LordOS on top of your current system with one command: - - ```sh - curl -fsSL https://lordos.org/install.sh | sh - ``` - -**Verify your download.** `SHA256SUMS` is signed with the LordOS release key (Ed25519), -fingerprint `c7155b8e6bbbb180f907381994d06af76d333016cd6f3facf67cadd053ea108e`. See -[code signing](https://lordos.org/legal/code-signing/) and [`docs/SIGNING.md`](docs/SIGNING.md). - -Status: **beta**. See [`CHANGELOG.md`](CHANGELOG.md) and [`docs/ROADMAP.md`](docs/ROADMAP.md). - -## Documentation - -- [`docs/README.md`](docs/README.md): the index of every document. -- [The paper](https://lordos.org/paper/) ([`docs/PAPER.md`](docs/PAPER.md)): vision, architecture, - security model, performance and roadmap, with links to the source files. -- [`docs/ARCHITECTURE.md`](docs/ARCHITECTURE.md): components, processes and dependencies. - -## Repository map - -- `server/`: `lord-server` (display server and Wayland compositor: DRM/KMS and evdev straight - from the kernel, without X11, libdrm or libinput) plus `lord-sessiond`, `lord-netd`, - `lord-netperm`, `lord-fand` and the sandboxed helpers (`lord-media`, `lord-doc`, `lord-vault`, - `lord-maild`). -- `runtime/`: `@lordos/runtime`, the React renderer for lord-server. -- `sdk/`: `@lordos/sdk`, the API for themes and apps. -- `apps/`: the native apps. See [`apps/README.md`](apps/README.md). -- `themes/`: complete desktops in React, swappable live. See [`themes/README.md`](themes/README.md). -- `assets/`: fonts, icons, the brand and Lumo, and the UI texts per language. -- `tools/`: ISO and Raspberry Pi image builders, the Debian installer, release signing, the website. -- `web/`: the [lordos.org](https://lordos.org) website. -- `third_party/`: QuickJS, stb, Monocypher and word lists, vendored (see [`THIRD_PARTY.md`](THIRD_PARTY.md)). - -## Building from source - -On the development machine (needs Node.js): +# Lord DE + +Fork do [LordOS](https://github.com/lordbasex/LordOS) dedicado a extrair e desenvolver seu ambiente de desktop como um projeto independente da distribuição. Fedora é a primeira plataforma de integração deste fork. + +O compositor Wayland em C, o motor gráfico, o runtime React, os temas e os aplicativos nativos continuam sendo os componentes do desktop. A distribuição fornece o kernel, o login, a rede, o áudio e o gerenciamento dos pacotes do sistema. + +**Estado: experimental.** A compilação e a inicialização sem monitor são verificáveis em contêiner Fedora. A sessão física com logind/seatd ainda precisa ser validada em hardware, incluindo troca de TTY, GPU, suspensão e SELinux. + +## Compilar no Fedora + +```sh +sudo dnf install gcc make binutils python3 pkgconf-pkg-config \ + wayland-devel wayland-protocols-devel libxkbcommon-devel \ + libxcrypt-devel libseat-devel openssl-devel nodejs npm +npm ci +make -j4 +make check +``` + +Node.js e npm são usados apenas para compilar os temas. A execução do desktop não depende deles. O caminho padrão usa a composição por CPU quando as bibliotecas Mesa de desenvolvimento estão ausentes. A composição por GPU continua opcional: + +```sh +sudo dnf install mesa-libgbm-devel mesa-libEGL-devel mesa-libGLES-devel +make -j4 +``` + +Documentação dos pacotes: [Wayland](https://packages.fedoraproject.org/pkgs/wayland/wayland-devel/), [libxkbcommon](https://packages.fedoraproject.org/pkgs/libxkbcommon/libxkbcommon/), [libseat](https://packages.fedoraproject.org/pkgs/seatd/libseat-devel/), [Node.js](https://developer.fedoraproject.org/tech/languages/nodejs/nodejs.html). + +## Instalar e executar + +Para inspecionar a instalação sem alterar o sistema: + +```sh +make install PREFIX=/usr DESTDIR="$PWD/build/stage" +``` + +Para uma instalação local com entrada no gerenciador de login: ```sh -npm install && npm run build # bundles every theme with the SDK and the apps +sudo make install PREFIX=/usr ``` -On Debian 13 (see [`docs/VM-SETUP.md`](docs/VM-SETUP.md) for the full list of packages): +A instalação adiciona `lord-de-session`, os arquivos em `/usr/libexec/lord-de` e a sessão **Lord DE (experimental)**. Não habilita serviços nem substitui o gerenciador de login. Encerre a sessão atual e selecione essa entrada no login, ou execute `lord-de-session` em uma TTY local livre. Execute o desktop como seu usuário normal, **sem sudo**. O acesso a DRM e evdev passa por libseat com logind ou seatd. + +Para verificar a inicialização sem monitor, dentro do checkout: + +```sh +cd server +./build/lord-server --headless 800x600 --timeout 2 +``` + +Esse modo não abre uma janela dentro do GNOME/KDE. `Ctrl+Alt+Backspace` encerra a sessão física; `Ctrl+Alt+F1` a `F10` solicita a troca de TTY ao provedor de sessão. + +## RPM local ```sh -make -C server -j4 && make -C server test +sudo dnf install rpm-build +sh tools/desktop/dist.sh +mkdir -p build/rpmbuild/SOURCES +cp dist/lord-de-*.tar.gz build/rpmbuild/SOURCES/ +rpmbuild -ba --define "_topdir $PWD/build/rpmbuild" packaging/rpm/lord-de.spec ``` -Images: [`docs/ISO.md`](docs/ISO.md) (PC) and [`docs/RASPBERRY.md`](docs/RASPBERRY.md) (Raspberry Pi 5). +O arquivo fonte inclui os temas compilados a partir do lockfile; o build do RPM compila o C sem acessar a rede. É um pacote local experimental, ainda sem preparação para submissão aos repositórios oficiais do Fedora. O RPM usa a composição por CPU para manter suas dependências pequenas. -## Contributing and security +## Separação entre desktop e SO -- [`CONTRIBUTING.md`](CONTRIBUTING.md) and the [code of conduct](CODE_OF_CONDUCT.md). -- Found a vulnerability? Please read [`SECURITY.md`](SECURITY.md) and don't open a public issue. -- Bugs and ideas: [how to report](https://lordos.org/legal/issues/). +O perfil padrão `desktop` não compila o gerenciador Debian, o instalador do SO, o helper administrativo privilegiado, `lord-netd`, `lord-sessiond`, `lord-netperm` ou `lord-fand`. A loja administra aplicativos `.lpk` e oferece abrir o gerenciador de software da distribuição quando disponível. Pacotes RPM/DNF não são tratados como pacotes Debian. -## Support the project +Rede e VPN, usuários, SSH, ventoinhas, formatação de discos e outras operações administrativas do antigo helper ficam com o sistema hospedeiro. As páginas que ainda dependem dele têm funcionalidades limitadas. Áudio usa o protocolo PulseAudio, incluindo PipeWire; Bluetooth e outras integrações existentes continuam usando D-Bus. -LordOS is free and open source. If it makes your computer better, help us keep building it: -[lordos.org/#support](https://lordos.org/#support). +O código e os scripts de distribuição do upstream permanecem no repositório como legado, fora da instalação da DE. Para trabalhar explicitamente no perfil antigo: `make -C server PROFILE=os` e `LORD_PROFILE=os npm run build`. Esse perfil continua específico do LordOS/Debian e não foi convertido em uma distribuição Fedora. -## Made by iPERFEX +Veja [a arquitetura da extração e os próximos passos](docs/STANDALONE.md). A [documentação original](docs/README.md) descreve o LordOS upstream; seus comandos de ISO, instalação e administração não se aplicam automaticamente a este fork. -LordOS is developed by [iPERFEX](https://www.iperfex.com/?lang=en). Meet Lumo, the guardian of -LordOS, in the [brand guide](docs/LORDOS-BRAND.md). To work with us on LordOS (sponsorship, -collaborations, custom apps or support), see [lordos.org/about](https://lordos.org/about/). +## Estrutura -## License +- `server/`: compositor, motor gráfico, helpers de aplicativos e camada `src/platform/`. +- `runtime/`, `sdk/`, `themes/`, `apps/`: interface e aplicativos nativos. +- `tools/desktop/`: instalação, verificação e arquivo fonte para empacotamento. +- `packaging/desktop/`, `packaging/rpm/`: integração da sessão e pacote Fedora. +- `tools/iso/`, `tools/rpi/`, `packaging/debian/`: legado da distribuição original. -MIT for LordOS's code (see [`LICENSE`](LICENSE)). Each third-party component keeps its own -license (see [`THIRD_PARTY.md`](THIRD_PARTY.md) and [`docs/COMPLIANCE.md`](docs/COMPLIANCE.md)). -The LordOS name, logo and Lumo are covered by the [trademark policy](https://lordos.org/legal/trademark/). +## Origem e licenças -Copyright © 2026 [iPERFEX](https://www.iperfex.com/?lang=en). All rights reserved for the website, brand and content; the code is free software under the MIT license. +O código deriva do LordOS, desenvolvido pela iPERFEX. Créditos e avisos de copyright originais são preservados. Consulte [LICENSE](LICENSE) e [THIRD_PARTY.md](THIRD_PARTY.md) para o código e seus componentes. Este fork não é uma versão oficial do LordOS. diff --git a/apps/settings/General.jsx b/apps/settings/General.jsx index f2fe8ee3..33b4aa7d 100644 --- a/apps/settings/General.jsx +++ b/apps/settings/General.jsx @@ -1,7 +1,7 @@ // Settings → General (machine and software details) and Updates (Debian and LordOS). import { View, Text, Button, useTheme, useLocale, useSystemInfo, useServerStats, lordosVersion, screen, formatBytes, formatDuration, formatNumber, - admin, wm, LordOSLogo, LordOSWordmark, spacing, typeScale, + admin, wm, LordOSLogo, LordOSWordmark, spacing, typeScale, standaloneDesktop, } from '@lordos/sdk'; import { useState, version as reactVersion } from 'react'; import { Stack, Section, ValueRow, Note, Message, Actions } from './ui.jsx'; @@ -58,6 +58,12 @@ export function Updates() { const pkg = typeof lord.pkg !== 'undefined' && lord.pkg.available(); const ups = pkg ? lord.pkg.upgrades() : []; const at = pkg ? lord.pkg.lastUpdate() : 0; + if (standaloneDesktop) return ( + + {tr('store.host.description')} +