Commit graph

42140 commits

Author SHA1 Message Date
Tim Schumacher
032ef1b461 Meta: Define SUDO for all the image building scripts
Back when adding support for `pls` as a `sudo` replacement,
`build-image-qemu` dynamically set the `SUDO` variable depending on what
system it was running on and used the contents of that variable to call
the correct elevation utility.

During recent changes to the elevation error message, that usage of the
variable was replicated across all of our scripts, but without also
replicating the logic to set that variable in the first place.

Add back the variable setting logic to all the other scripts to keep
them from running into unset variables.
2022-10-16 23:39:45 +02:00
Andrew Kaster
2f439327ac LibThreading: Only set pthread name on Serenity
pthread_setname_np is a can of worms for portability. Linux, macOS,
and the BSDs all do it differently.

Also skip adding the tid as an inspectable Core::Object property on
systems where pthread_t is known to be a pointer.
2022-10-16 15:39:00 -06:00
Paul Herman
d989c50c90 AK: Document the non-standard extensions in TRY
I'm not sure there's a material improvement from this patch. However,
I've been reading the error handling code from multiple projects and
was excited to see Serenity being able to handle assignment
(`auto x = TRY(make_x())`) the same way as actions (`TRY(do_x())`).
I think it's worth documenting that this is only possible due to
non-standard extensions.
2022-10-16 22:05:42 +02:00
Timothy Flynn
9fad23018a Meta: Remove unused "prefix" variable from invoke_generator() helper
This became unused after 1ae0cfd.
2022-10-16 21:16:48 +02:00
Jelle Raaijmakers
0cf3cb6279 LibGL: Immediately dereference vertex attribute data in display lists
According to the spec, pointers to client data need to be dereferenced
immediately when adding calls such as `glDrawElements` or
`glArrayElement` to a display list. We were trying to support display
lists for these calls but since they only invoke _other_ calls that also
support display lists, we can simply defer the display list
functionality to them.

This fixes the rendering of the ClassiCube port by cflip.
2022-10-16 21:12:15 +02:00
Linus Groh
0ea4d228e6 LibWeb: Add missing body has_value() check in XMLHttpRequest::send() 2022-10-16 18:04:46 +02:00
demostanis
1c979889b2 Meta: Print error if cmake does not exist 2022-10-16 17:49:18 +02:00
Liav A
b9dca3300e Kernel: Use more fine-grained content data block granularity in TmpFS
Instead of just having a giant KBuffer that is not resizeable easily, we
use multiple AnonymousVMObjects in one Vector to store them.
The idea is to not have to do giant memcpy or memset each time we need
to allocate or de-allocate memory for TmpFS inodes, but instead, we can
allocate only the desired block range when trying to write to it.
Therefore, it is also possible to have data holes in the inode content
in case of skipping an entire set of one data block or more when writing
to the inode content, thus, making memory usage much more efficient.

To ensure we don't run out of virtual memory range, don't allocate a
Region in advance to each TmpFSInode, but instead try to allocate a
Region on IO operation, and then use that Region to map the VMObjects
in IO loop.
2022-10-16 17:46:40 +02:00
Julian Offenhäuser
e8bdd885a3 Base: Add a PDF document to test Adobe Type 1 font rendering
It also tests a subset of PDF version 1.5 functionality, such as
compressed object streams.
2022-10-16 17:44:54 +02:00
Julian Offenhäuser
b14f0950a5 LibPDF: Add very basic support for Adobe Type 1 font rendering
Previously we would draw all text, no matter what font type, as
Liberation Serif, which results in things like ugly character spacing.

We now have partial support for drawing Type 1 glyphs, which are part of
a PostScript font program. We completely ignore hinting for now, which
results in ugly looking characters at low resolutions, but gain support
for a large number of typefaces, including most of the default fonts
used in TeX.
2022-10-16 17:44:54 +02:00
Julian Offenhäuser
e6f29302a7 LibPDF: Add glyph drawing and type info methods to PDFFont
A PDFFont can now be asked for its specific type and whether it is part
of the standard 14 fonts. It now also contains a method to draw a
glyph, which is stubbed-out for now.

This will be useful for the renderer to take into consideration when
drawing text, since we don't include replacements for the standard set
of fonts yet, but still want to make use of embedded fonts when
available.
2022-10-16 17:44:54 +02:00
Julian Offenhäuser
36f83cecab LibPDF: Allow page objects to inherit the MediaBox and Resources entries 2022-10-16 17:44:54 +02:00
Julian Offenhäuser
2f71e0f09a LibPDF: Allow text operator sequences to start with whitespace 2022-10-16 17:44:54 +02:00
Julian Offenhäuser
7ecd420b03 LibPDF: Parse floating point numbers that omit a leading zero correctly 2022-10-16 17:44:54 +02:00
Liav A
67d0f5686d SystemServer: Make system-mode=text the default in case of read failure
In case of failure when trying to read the system_mode global node, just
use as a default the text mode, so we have bootable system with degraded
functionality.
2022-10-16 17:43:20 +02:00
Gunnar Beutner
69efded562 Kernel: Add more stubs needed for Thread.cpp 2022-10-16 17:35:37 +02:00
Gunnar Beutner
1e3edb3b76 Kernel: Don't directly include <Kernel/Arch/x86/TrapFrame.h>
This adds a new arch-independent header which in turn includes the
correct header for the build architecture.
2022-10-16 17:35:37 +02:00
Gunnar Beutner
918fdf9e2c Kernel: Add VALIDATE_IS_AARCH64 guard macro 2022-10-16 17:35:37 +02:00
Gunnar Beutner
dfee6f73d2 Kernel: Replace VERIFY_NOT_REACHED with TODO_AARCH64
This makes it easier to differentiate between cases where certain
functionality is not implemented vs. cases where a code location
should really be unreachable.
2022-10-16 17:35:37 +02:00
Idan Horowitz
9f3de0be6a Fuzzers: Add fuzzer for the Tar parser 2022-10-16 18:34:48 +03:00
Linus Groh
9e6475d76d LibJS: Add spec comments to RegExpObject
Also fix the evaluation order of ToString for pattern and flags while
we're here, and improve some of the variable names.
2022-10-16 17:32:02 +02:00
Linus Groh
eb5be649a5 LibJS: Add spec comments to RegExpConstructor 2022-10-16 17:32:02 +02:00
Linus Groh
1da66b5879 LibJS: Implement the RegExpAlloc AO 2022-10-16 17:32:02 +02:00
Gunnar Beutner
db31c22491 Meta: Add a few more e-mail addresses to the .mailmap file 2022-10-16 17:30:53 +02:00
Liav A
462802ef0c Kernel/SysFS: Expose file size of ACPI tables in /sys/firmware/acpi
It costs us nothing, and some utilities (such as the known file utility)
rely on the exposed file size (after doing lstat on it), to show
anything useful besides saying the file is "empty".
2022-10-16 17:26:35 +02:00
Liav A
11a5f2c508 Kernel: Initialize primitive class member of ACPISysFSComponent to zero 2022-10-16 17:26:35 +02:00
Andrew Kaster
aacc49bab5 Lagom: Remove unecessary _lagom suffix from test and executable names
We needed this back when we included Lagom into the main serenity build,
but it has been unecessary since the superbuild.
2022-10-16 16:36:39 +02:00
Andrew Kaster
1ae0cfd08b CMake+Userland: Use CMakeLists from Userland to build Lagom Libraries
Also do this for Shell.

This greatly simplifies the CMakeLists in Lagom, replacing many glob
patterns with a big list of libraries. There are still a few special
libraries that need some help to conform to the pattern, like LibELF and
LibWebView.

It also lets us remove essentially all of the Serenity or Lagom binary
directory detection logic from code generators, as now both projects
directories enter the generator logic from the same place.
2022-10-16 16:36:39 +02:00
Andrew Kaster
a01c0e81f3 Meta: Use add_serenity_directory for LibTimeZone
This lets us eliminate the "meta prefix" for the LibTimeZone generators.
2022-10-16 16:36:39 +02:00
Andrew Kaster
f7f92f104f Lagom+LibCore: Build LibCore, AK, and LibMain with add_subdirectory
By deferring to the CMakeLists in each of these libraries' directories,
we can get rid of a lot of curious GLOB patterns and list removals in
the Lagom CMakeLists.
2022-10-16 16:36:39 +02:00
Andrew Kaster
2a218ebb9d DynamicLoader: Use fewer GLOB patterns for arch-specific files
There's still a GLOB pattern for the LibC assembly files, but orgaizing
the patterns to use ${SERENITY_ARCH} instead of a big if-else chain
makes the patterns easier to understand.
2022-10-16 16:36:39 +02:00
Andrew Kaster
1ca48a2aec AK+Userland: Use a CMake variable for AK_SOURCES instead of GLOB
This lets us remove a glob pattern from LibC, the DynamicLoader, and,
later, Lagom. The Kernel already has its own separate list of AK files
that it wants, which is only a subset of all AK files.
2022-10-16 16:36:39 +02:00
Tobias Christiansen
a34f8c444b WebDriver: Implement GET /session/{id}/cookie/{name} endpoint 2022-10-16 16:32:59 +02:00
Linus Groh
b6f101f1c0 LibJS: Fix TemporalCalendarString ambiguity
This is a normative change in the Temporal spec.

See:
- https://github.com/tc39/proposal-temporal/commit/278d238
- https://github.com/tc39/proposal-temporal/commit/b73aea7
2022-10-16 15:20:23 +02:00
Linus Groh
484c66125d LibJS: Rename Get{IANA => Named}TimeZonePreviousTransition
This is an editorial change in the Temporal spec.

See: https://github.com/tc39/proposal-temporal/commit/6b759d1
2022-10-16 14:45:09 +02:00
Linus Groh
8cc260107d LibJS: Rename Get{IANA => Named}TimeZoneNextTransition
This is an editorial change in the Temporal spec.

See: https://github.com/tc39/proposal-temporal/commit/4b0246a
2022-10-16 14:45:09 +02:00
Idan Horowitz
d795f9c6cf LibJS: Change dateAdd to a required parameter of MoveRelativeDate
This is an editorial change in the Temporal spec.

See: https://github.com/tc39/proposal-temporal/commit/45d9079
2022-10-16 13:45:56 +02:00
Idan Horowitz
3c55643283 LibJS: Add dateAdd to all remaining MoveRelativeDate calls
This is a normative change in the Temporal spec.

See: https://github.com/tc39/proposal-temporal/commit/a48838a
2022-10-16 13:45:56 +02:00
Idan Horowitz
4e79ce4e7a LibJS: Add optional dateAdd parameter to MoveRelativeDate
This is a normative change in the Temporal spec.

See: https://github.com/tc39/proposal-temporal/commit/891060f
2022-10-16 13:45:56 +02:00
Luke Wilde
35c9e324b4 LibJS: Add fast path TimeZone conversion to PlainDate#toZonedDateTime
This is a normative chane in the Temporal spec.

See: https://github.com/tc39/proposal-temporal/commit/fcab1af
2022-10-16 13:40:21 +02:00
Luke Wilde
707f12f927 LibJS: Remove extra property check from Instant#toZonedDateTimeISO
This is a normative change in the Temporal spec.

See: https://github.com/tc39/proposal-temporal/commit/7dfbd80
2022-10-16 13:40:21 +02:00
Luke Wilde
f7bb79d6d1 LibJS: Fast-path ToTemporalTimeZone when the argument is a TimeZone
This is a normative change in the Temporal spec.

See: https://github.com/tc39/proposal-temporal/commit/54cea53
2022-10-16 13:40:21 +02:00
Luke Wilde
8c3512d6ce LibJS: Fast-path ToTemporalCalendar when the argument is a Calendar
This is a normative change in the Temporal spec.

See: https://github.com/tc39/proposal-temporal/commit/2a43b39
2022-10-16 13:40:21 +02:00
Liav A
4b27c6e688 Ports: Add lzop compression utility port 2022-10-16 13:37:50 +02:00
Liav A
d7eb6d8330 Ports: Add lzo library port 2022-10-16 13:37:50 +02:00
Liav A
b6861ee24c Ports: Add GNU tar port 2022-10-16 13:37:29 +02:00
Brian Gianforcaro
2079728a74 Kernel: Add formal Processor::verify_no_spinlocks_held() API
In a few places we check `!Processor::in_critical()` to validate
that the current processor doesn't hold any kernel spinlocks.

Instead lets provide it a first class name for readability.
I'll also be adding more of these, so I would rather add more
usages of a nice API instead of this implicit/assumed logic.
2022-10-16 02:29:14 -06:00
Liav A
1a1e0e6364 Base: Remove /proc/devices node
That node was removed in a previous commit so let's remove it from this
document too.
2022-10-16 02:24:43 -06:00
Liav A
40f35558b5 Kernel: Remove unused /proc/devices node
This node is not used anymore, so let's remove it.
2022-10-16 02:24:43 -06:00
Kenneth Myhra
f09e256328 LibWeb: Let LoadRequest::set_body() take by value
This changes the signature of LoadRequest::set_body() to take by value
and then use move semantics to move the contents of the ByteBuffer.

This is done to avoid the fallible copy constructor of ByteBuffer.
2022-10-16 02:06:29 +03:30