3672 Commits

Author SHA1 Message Date
MacDue
ab76043248 Meta: Only disable SPICE on QEMU 10.1
The kernel panic is only present on QEMU 10.1. The cause was fixed in
QEMU 10.2, as the QEMU change (see #26210), also caused regressions for
the Windows SPICE agent.

See: 4be62d3117
2026-04-18 19:17:49 -04:00
Nico Weber
4f7b1aed44 Meta: Port recent changes to the GN build
75f4597628 LibGfx/JPEGXL: Move JPEG XL secondary files to own folder
1d193fea6f LibGfx/JPEGXL: Read the HfGlobal bundle
ee48ee8ac7 SSHServer: Add the start of an ssh server implementation
ff75e05bbd LibLine: Write history file atomically
2026-04-15 22:21:30 -04:00
Nico Weber
640a54261d Meta: Port Mac SDK header patching to the GN build
This ports

631ed53082 Meta: Patch up Apple SDK headers to work with C++26

from #26524. As this is not fully mechanical, I'm putting it into
its own commit.
2026-04-15 22:21:30 -04:00
Nico Weber
d434c94018 Lagom: Move Mac SDK header patch stamp file creation into script
No behavior change.
2026-04-15 22:21:30 -04:00
Sönke Holz
6075be9543 Meta: Don't write .pcap USB traffic dump for UAS drives
This appears to be leftover debugging code.
2026-04-12 14:07:34 +02:00
Sönke Holz
e834fbaf43 Meta: Use the "max" QEMU CPU for RISC-V
The "max" CPU has been supported by the QEMU RISC-V target since version
8.2. The latest Ubuntu LTS and Debian Stable releases both have newer
versions packaged, so it should be safe to require QEMU 8.2.

This enables extensions like Zkr, which support was added for in the
previous commit.
2026-04-12 14:07:26 +02:00
Sönke Holz
77f058c32e Everywhere: Remove iOS support
Now that ladybird was hard-forked from SerenityOS, there's no good
reason to keep supporting iOS.

Ladybird only still exists in the SerenityOS repo to make testing LibWeb
easier.
2026-04-06 15:44:56 +02:00
Sönke Holz
64aa3560b9 Meta+Userland: Remove leftovers from Android support
These were missed in bb2d80a2bb.
2026-04-06 15:44:56 +02:00
Ali Mohammad Pur
6b6c16abc4 Meta: Refer to serenity source include paths from SerenityOS_SOURCE_DIR
Lagom's built with a differeny source dir in CI, which breaks this on
macos.
2026-03-30 13:00:52 +02:00
Ali Mohammad Pur
ffb9ea56dc Meta+Userland: Update Jakt to latest
This version fixes clang 22 errors on build.
2026-03-30 13:00:52 +02:00
Lucas Chollet
ee48ee8ac7 SSHServer: Add the start of an ssh server implementation
For the moment, the server starts listening on port 22 and then do the
protocol string exchange on connection. It aborts on any subsequent byte
received.

With the SSH_DEBUG macro set and connecting from my host, it prints:
```
Client protocol string: SSH-2.0-OpenSSH_10.0p2 Ubuntu-5ubuntu5
error: Draw the rest of the owl
```

I decided to add a LibSSH library, this will allow us to share some
code with an ssh client but for now, the main point is to easily be
able to add tests.
2026-03-14 10:44:09 +01:00
Lucas Chollet
cc0939a666 Everywhere: Stop using pc in our target triples
While `pc` is not particularly wrong on x86_64, it's nonsensical on
other supported platforms, namely aarch64 and riscv64.

For consistency, we now don't use this vendor anymore, regardless of the
platform.

Within the LLVM project, we now build as `$arch-serenity`. This is
enough in most cases, the only place where we have to specify a vendor
is the target .cfg file where we use `$arch-unknown-serenity`.

When building GCC and friends, again we simply identify as
`$arch-serenity` and this is enough.

As a result, the tools in Toolchain/Local/$arch/bin are now named after
this pattern: `$arch-serenity-$tool`.

These changes affect the toolchain build scripts, serenity's build
scripts and the Ports.

The last place where we should see `x86_64-pc-serenity` is the output of
`config.sub`, which assume the vendor is `pc` on vendor-less `x86*`
triples. So `x86_64-serenity` is expanded to `x86_64-pc-serenity`,
luckily enough and AFAICT, the whole GNU ecosystem considers `pc`,
`unknown` and vendor-less target triples the same. So `configure`
shouldn't have an issue finding the right tools anyway.

The gn files were edited with sed and are not tested.

This commit also includes a check in `Meta/serenity.sh` to give a nicer
error message when trying to build the system with an old toolchain.

----

To test this patch, on a clean tree I:
 - Ran `./Meta/serenity.sh x86_64 GNU`
 - Ran `./Toolchain/BuildJakt.sh`
 - Tested these ports: python3(configure based), libjxl(cmake based) and
   rizin(meson based)
 - Also booted on aarch64 and risv64

I also repeated the steps above with a Clang toolchain.

On a working tree I tested all the affected ports, the results are:
 - tinycc build fine but can't compile programs, I observed the same on
   master.
 - gdb and epsilon don't build but report the same errors as on master.
 - I manually edited the libgpg-error, and it builds fine.
 - The gcc port works fine.
2026-03-13 20:59:49 +01:00
Lucas Chollet
20c2100676 Meta: Avoid grep failures in scripts that include shell_include.sh
In environments without any `SERENITY*` variables, grep returns an exit
status of 1. This patch ensures that the subcommand exits with status 0
regardless of whether grep finds a match. This prevents the script
from bailing out when `set -eo pipefail` is enabled.
2026-03-01 11:49:12 +01:00
Sönke Holz
18f72ce16b Meta: Factor out host architecture detection into shell_include.sh 2026-03-01 10:41:51 +01:00
Sönke Holz
e06f968199 Meta+Kernel: Stop building with -Wno-address-of-packed-member
Previously, we only enabled this warning when building the kernel with
Clang.

We seem to have started disabling this warning in c73aa662bb with no
explicit reason.
This warning seems sensible, so let's stop disabling it.
2026-02-21 12:39:39 +01:00
Nico Weber
e335b909f6 MacVideoPlayer: Show decoding errors 2026-02-17 19:57:16 -05:00
Nico Weber
981d3ac37e MacVideoPlayer: On first open, use video dimensions for window size
On restore, it remembers the previously used window size instead
(this is default AppKit behavior).

On Retina screens, one video pixel takes up one view unit (i.e.
2x2 pixels).
2026-02-17 19:57:16 -05:00
Nico Weber
0f6a5b4a21 MacVideoPlayer: Actually show video frames
This adds EventLoopImplementation, and tweaks it to work in
MacVideoPlayer, mostly by tweaking include paths. It also moves
timers to kCFRunLoopCommonModes, so that videos continue playing
during window resizes.

main.mm now uses a Core::EventLoop instead of calling
NSApplicationMain, which means we now have to do a few things
manually that NSApplicationMain usually does (mostly loading
MainMenu.nib from the bundle).

NSDocument can be destroyed on a background thread, so we have to
be careful to post destruction of PlaybackManager to the main thread.

ns_from_gfx() is copied from MacPDF. Maybe it could be extracted
into a a shared Meta/Lagom/Contrib/LibMac in the future.
2026-02-17 19:57:16 -05:00
Nico Weber
9a83f94d75 MacVideoPlayer: Copy in EventLoopImplementation from Ladybird
This is a copy instead of pulling it into a shared library to make
possible future merges to Ladybird a bit easier.

Not yet hooked up to the build.
2026-02-17 19:57:16 -05:00
Nico Weber
eb8704ddf5 MacVideoPlayer: Add custom view, plumb playback manager to it
xib changes: Remove the default label, add a custom view of type
"View" and autoresizing mask to match window size, connect it to
File Owner's `_view` outlet.

(I couldn't figure out how to tell Xcode that `Document` has a `_view`
outlet without making a dummy empty project and copying the xib file
as well as Document.h/mm in. So that's what I did, and then I copied
the xib file out again after making the change ¯\_(ツ)_/¯)

With this, after opening a webm file, we get a black window instead
of a gray one saying "Your document contents here" in black text.
2026-02-17 19:57:16 -05:00
Nico Weber
6db8c63491 MacVideoPlayer: Create PlaybackManager for opened files
Not connected to anything yet, so nothing's visible yet.
2026-02-17 19:57:16 -05:00
Nico Weber
2917c66710 MacPDF: Make readFromData: less branchy
No behavior change.
2026-02-17 19:57:16 -05:00
Nico Weber
da51a62846 Meta: Add MacVideoPlayer skeleton
Similar to MacPDF, this is for working on LibVideo.

The code is the output of Xcode's "New Project" -> macOS ->
"Document App" wizard, with some changes:
* Added the standard copyright notice to files
* Instead of having a build step for Info.plist, pasted in the
  keys added by it to the file, based on MacPDF's contents
* Put xib files outside of Base.lproj
* Added a CMakeLists.txt, similar to MacPDF's
* Added CocoaWrapper.h and replaced Cocoa.h includes with it
* Ran clang-format
* Added `#pragma once` to .h files
2026-02-17 19:57:16 -05:00
Nico Weber
61e36ae654 Meta: Make zip buildable on lagom
Useful for profiling compression performance.
2026-02-16 19:04:49 -05:00
Sönke Holz
52a88a8ea8 Everywhere: Stop building with -fsigned-char
Ports aren't guaranteed to compile with `-fsigned-char`, resulting in
them using a different incompatible ABI when using serenity libraries.
I think we should rather follow the target architecture ABI than
assuming that `char` is signed.

Building without `-fsigned-char` only required a couple of small changes
to prevent -Wtype-limits warnings.
2026-02-08 15:51:33 +01:00
Nico Weber
eaa713e22f Meta: Add a PR to lb-cherry-picks.py 2026-01-22 19:55:50 -05:00
Nico Weber
1961d12f5b Meta+Toolchain+Ports: Update CMake to 3.30.0, set it as minimum version
CMake learned which gcc flag to translate `set(CMAKE_CXX_STANDARD 26)`
to in CMake 3.30.0:
https://gitlab.kitware.com/cmake/cmake/-/merge_requests/9434

Using earlier versions leads to

    ...requires the language dialect "CXX26" .  But the
    current compiler "GCC" does not support this, or CMake does not know
    the flags to enable it.

errors after #26524.
2026-01-22 16:19:29 -05:00
Nico Weber
d064d59791 Meta: Add matroska to lagom 2026-01-22 08:09:40 +01:00
Lucas CHOLLET
7ab4fc1fff Meta: Prefer sudo's --preserve-env over -E
The `-E` option is not supported by `sudo-rs` so give it the list of all
our environment variables.

Fix building on Ubuntu 25.10.
2026-01-18 15:33:24 -05:00
Eduardo Casadei
9804b92ce5 LibTimeZone: Improve the handling of outdated timezone rules
The previous method simply picked the last rule when all of them were
outside the time range, causing the timezone to be permanently in the
wrong offset when the last rule didn't have an offset of 0.

One of the affected timezones was America/Sao_Paulo, because Brazil's
DST rules end in 2019 and its last rule is setting the start of DST
for 2018, which (due to the behavior described above) causes the
timezone to be stuck in Daylight Saving Time.

This surfaced an error in two of the test cases for Europe/Moscow,
they were using the incorrect daylight and standard time names for the
period being tested.
2026-01-07 17:42:29 +01:00
Sönke Holz
4c5bb357b2 Kernel/Input: Create our own header for evdev definitions
Instead of using a quite large FreeBSD header, which doesn't match our
code style, roll our own header for the few definitions that we need.

These are essentially API definitions, so it shouldn't be a problem
that the original linux evdev definitions this is based on are under
the GPL.
2026-01-04 23:19:25 +01:00
Sönke Holz
3c8233af08 Everywhere: Move to C++26 2026-01-04 13:47:22 +01:00
Sönke Holz
ddeebc09a5 Meta: Require at least GCC 14
This will be necessary for moving to C++26.
2026-01-04 13:47:22 +01:00
Nico Weber
631ed53082 Meta: Patch up Apple SDK headers to work with C++26 2026-01-04 13:47:22 +01:00
Nico Weber
9877ee85c6 MacPDF+Ladybird/AppKit: Omit ColorSyncDeprecated.h from build
QD/ColorSyncDeprecated.h, normally pulled in by Cocoa.h, contains
many enums triggering

    "invalid arithmetic between different enumeration types"

in C++26. Omit it from the build by hackily defining its include
guard macro.
2026-01-04 13:47:22 +01:00
Nico Weber
7813075538 MacPDF: Add explicit enum cast required by C++26
No behavior change.
2026-01-04 13:47:22 +01:00
Nico Weber
fba6f5d3de MacPDF: Consistently include Cocoa.h via CocoaWrapper.h
main.mm used to not do this as it didn't include AK headers.
We're about to put another workaround in CocoaWrapper.h that's
needed here too though.

No behavior change.
2026-01-04 13:47:22 +01:00
Tim Schumacher
a12631aedc Meta: Correct the Jakt library directory for Lagom
Otherwise, it will not be able to find
`libjakt_main_x86_64-unknown-linux-unknown.a`.
2026-01-04 13:44:44 +01:00
Sönke Holz
103d5528ca Meta: Support SERENITY_RUN=ci on AArch64 and RISC-V
On AArch64 and RISC-V we need to use two serial ports (the built-in one
and now additionally a PCI-connected one) because QEMU doesn't have
something similar to the x86 isa-debugcon for these architectures.
2025-12-08 13:16:22 +01:00
Sönke Holz
72c7a5fa77 Meta: Remove a useless if statement
This if is always True since config.machine_type can't be both a
Raspberry Pi machine and MachineType.CI.

This code is a leftover from using the QEMU raspi3b machine in CI.
2025-12-08 13:16:22 +01:00
Ali Mohammad Pur
b476fcd733 LibLine: Correctly count multi-code-point glyphs towards line length
This also adds some tests to make sure things don't break.
2025-12-06 14:18:02 -05:00
Ali Mohammad Pur
30630e5ae0 Meta: Sort and properly format LibTest test subdirectories 2025-12-06 14:18:02 -05:00
Linus Groh
65609194cf Meta: Update cacert.pem to 2025-12-02 2025-12-06 14:15:52 -05:00
Lucas CHOLLET
1c65cbcac4 CI: Remove the notify_twitter job
This stopped working a good while ago, the last tweet was in
July 2023.
https://nitter.net/OsCommits/status/1681345406205149195
2025-12-03 20:56:44 -05:00
Sujit-Hiwale
62df4ca385 Meta: Expand compiler detection to clang 17–21 2025-12-03 07:32:55 -05:00
Lucas CHOLLET
03558acb35 Meta: Download a more recent prepare-code-coverage-artifact.py
Doesn't bring much except not having to worry about a bug caused by an
out-of-date version.
2025-12-02 12:25:37 -05:00
Lucas CHOLLET
67e02a2e15 Meta: Automatically compute the number of inodes in the filesystem
This allows the user to specify a disk size through
SERENITY_DISK_SIZE_BYTES without having to worry about inodes.

The way we compute the number of inode is based on the current ratio of
bytes per inode, rounded up to a product of 1024.
2025-12-02 12:25:37 -05:00
Nico Weber
33f1c58afd Meta+Tests/LibGfx: Make check-jbig2-json.sh call compile.sh
That way, it picks up the recent speed-up in compile.sh.

To make this work, let compile.sh optionally take the path to
jbig2-from-json as first argument.

Takes the time to run Meta/check-jbig2-json.sh from 1.7s to 0.29s
on my system.
2025-11-25 22:28:59 -05:00
Nico Weber
15866aab43 Meta: Prevent "HOMEBREW_PREFIX: unbound variable" in shell_include.sh
...when this is used in scripts that `set -u`.

No intended behavior change.
2025-11-25 22:28:59 -05:00
Nico Weber
cadda391df Meta: Make check-jbig2-json.sh verify all jbig2 files are json-generated
Now that all our jbig2 test files are json-generated,
let's keep it that way :^)
2025-11-25 22:28:59 -05:00