Commit graph

404 commits

Author SHA1 Message Date
Eric Butler 1a48609c6b Meta: Always try genext2fs as fallback to build disk image
If mounting disk image fails (e.g. fuse is not available on macos),
always try using genext2fs before giving up.
2021-05-09 15:34:12 +02:00
Dylan Katz 984b6e08cf LibSQL: Add a syntax highlighter 2021-05-09 09:39:05 +02:00
Ali Mohammad Pur aa4d8d26b9 LibWasm: Start implementing a basic WebAssembly binary format parser
This can currently parse a really simple module.
Note that it cannot parse the DataCount section, and it's still missing
almost all of the instructions.
This commit also adds a 'wasm' test utility that tries to parse a given
webassembly binary file.
It currently does nothing but exit when the parse fails, but it's a
start :^)
2021-05-08 22:14:39 +02:00
Ali Mohammad Pur 62af7c4bdf AK+LibCpp: Remove DEBUG_SPAM in favour of per-application defines
What happens if one file defines DEBUG_SPAM, and another doesn't,
then we link them together and get ODR violations? -- @ADKaster
2021-05-08 22:14:39 +02:00
Jesse Buhagiar 4807d32139 LibGL: Implement a basic OpenGL 1.x compatible library
This currently (obviously) doesn't support any actual 3D hardware,
hence all calls are done via software rendering.

Note that any modern constructs such as shaders are unsupported,
as this driver only implements Fixed Function Pipeline functionality.

The library is split into a base GLContext interface and a software
based renderer implementation of said interface. The global glXXX
functions serve as an OpenGL compatible c-style interface to the
currently bound context instance.

Co-authored-by: Stephan Unverwerth <s.unverwerth@gmx.de>
2021-05-08 10:13:22 +02:00
Brian Gianforcaro 7e28ecc305 Meta + Lagom: Fix paths after movement of tests to Tests/
Not sure how this didn't cause a build break when I originally
moved them in #6891. Better fix them now.
2021-05-08 00:04:10 +01:00
Brian Gianforcaro 1162e71a5c Meta: Remove AK/Tests from check-newlines-at-eof.py
The json file was removed a while back, and now AK/Tests has been
moved to Tests/AK. So this is wrong and out of date in every way.
2021-05-08 00:04:10 +01:00
Brian Gianforcaro 9720ad3901 Tests: Move Userland/Utilities/test-js to Tests/LibJS 2021-05-08 00:04:10 +01:00
Linus Groh 867072c7d8 Meta: Improve man.serenityos.org titles and link names
Index page:
- Change links from "Man 1" to "Section 1"

Section index pages:
- Change title from "1" to "Section 1 - SerenityOS man pages"
- Change links from "foo" to "foo(1)"

Man pages:
- Change title from "foo" to "foo(1) - SerenityOS man pages"
2021-05-07 22:28:33 +02:00
Linus Groh db06b106ae Meta: Fix error in lint-ports.py
The data structures here were changed from sets to dicts at some point,
with the sets now having different names - this would crash trying to
subtract two dicts.
2021-05-07 20:08:45 +01:00
Brian Gianforcaro dd633b9dd1 Meta: Fix Fuzzers CMakeLists.txt and ReadMe.md to use CXX_COMPILER_ID
Previously the directions omitted that you have to specify
`-CMAKE_CXX_COMPILER` when building the Fuzzers. This
would cause all kinds of weird problems at compilation and
link time. You can't specify one or the other, they must
both be pointing at clang in order for things to work as
experted. Fix this by updating the documentation to specify
that the user should specify both the C and CXX compiler explicitly
to be safe, as well as forcing the cmake clang argument handling
to modify the CXX compiler variable instead of the C version.
2021-05-07 15:19:48 +01:00
Andreas Kling f142b43e89 Base: Make the /bin/TextEditor desktop shortcut say "Text Editor" :^) 2021-05-06 17:54:36 +02:00
Brian Gianforcaro 83dca542bb Meta: Enable linting of shell scripts under Toolchain
Now that everything under Toolchain is shellcheck clean,
remove it from the exception list.
2021-05-05 21:26:37 +02:00
Idan Horowitz b9c367e13b Meta: Add action to tweet each commit on push 2021-05-05 21:12:09 +02:00
Idan Horowitz fbc93a3a2f
Meta: Remove link to man6 from man.serenityos.org
We don't currently have any man6 entries.
2021-05-04 22:02:50 +01:00
Idan Horowitz 8cc6372b14 Meta: Strip man prefix from generated man page directories 2021-05-04 22:05:12 +02:00
Idan Horowitz d29f17e882 Meta: Use correct hrefs for man pages in man.serenityos.org/index.html 2021-05-04 22:05:12 +02:00
Ali Mohammad Pur 8449521064 Meta: Remove existing test directories before copying new ones in
Previously, we would end up with `js-tests/Tests` and `web-tests/Tests`
because the previous directories were already there.
2021-05-04 21:55:30 +02:00
Idan Horowitz d29e2dd2d7 Meta: Add workflow that deploys man page updates to man.serenityos.org 2021-05-04 20:58:25 +02:00
Idan Horowitz 028dad6e87 Meta: Add a post-commit commit message linter hook
This should help with getting commit messages tidy before they pass
through CI's commit linter :^)

For this hook to work pre-commit has to be explicitly installed via:
`pre-commit install --hook-type commit-msg`
2021-05-02 16:28:01 +02:00
Idan Horowitz 5c385d06e8 Lagom/Fuzzers: Add fuzzers for Windows-1251 and Windows-1255 decoders 2021-05-01 17:59:08 +02:00
Carlos César Neves Enumo 69e2431c64 Lagom/CMake: Add -fconstexpr-steps for AppleClang 2021-05-01 07:38:43 +02:00
Linus Groh 4d697855ea Meta: Use author username for pull request IRC notifications
Just 'github.actor' may or may not be the actual PR author, but
especially since action runs have to be approved for first-time
contributors, it's been giving us a lot of incorrect results.
2021-04-30 23:11:12 +02:00
Brian Gianforcaro f91bfe8009 Meta: pre-commit should run lint-ports.py only when Ports change
Most of the existing lint-ing shell scripts have the ability
to only run on the files which have actually changed.
The new port lint-ing script doesn't have this functionality
unfortunately. This forces us to lint ALL the ports on every
single change to any other file in the system if you have
the pre-commit hook setup for your git clone locally.

Instead we can use pre-commit's feature to only run a hook
if certain files have changed to reduce the situations in
which we would run the Meta/lint-ports.py script.
2021-04-30 21:24:22 +02:00
Andreas Kling 7ae7170d61 Everywhere: "file name" => "filename" 2021-04-29 22:16:18 +02:00
Andreas Kling def1f1444a WindowServer: Move configuration file to /etc/WindowServer.ini
This was in the /etc/WindowServer/ directory which had nothing else in
it, so let's just get rid of the directory and move this up one step.
2021-04-29 22:16:18 +02:00
Gunnar Beutner b861259098 Meta: Ensure the tap device is removed before trying to create it again
Sometimes the tap device isn't destroyed depending on how the script
exits. Running the script again then fails to create the device
again.
2021-04-29 20:26:13 +02:00
Idan Horowitz 33fdd402b5 Meta: Increase fconstexpr-steps for Clang Lagom builds
Clang's default constexpr-steps limit is 1048576, which is not enough
for LibGfx's generation of the unicode bidirectional class lookup table
while GCC doesn't have any limit at all, so this patch increases the
limit to an arbitrarily larger value.
2021-04-29 10:36:23 +02:00
Linus Groh da72c6987f Meta: Make copyright header check more strict 2021-04-29 00:59:26 +02:00
Gunnar Beutner 6652ce15a4 Meta: Don't run qemu as root
This currently only supports Linux but I don't think anyone else
ran this yet because they'd have run into the E1000 bug I fixed
in #6669
2021-04-27 12:00:12 +02:00
Gunnar Beutner 1117b6d833 Meta: Make sure traceroot and ping belong to the root user 2021-04-26 21:10:05 +02:00
Gunnar Beutner 4aaf6386ae Meta: Only allow sha256 and sig for auth_type in ports 2021-04-25 13:30:18 +02:00
Andrew Kaster 35c0a6c54d AK+Userland: Move AK/TestSuite.h into LibTest and rework Tests' CMake
As many macros as possible are moved to Macros.h, while the
macros to create a test case are moved to TestCase.h. TestCase is now
the only user-facing header for creating a test case. TestSuite and its
helpers have moved into a .cpp file. Instead of requiring a TEST_MAIN
macro to be instantiated into the test file, a TestMain.cpp file is
provided instead that will be linked against each test. This has the
side effect that, if we wanted to have test cases split across multiple
files, it's as simple as adding them all to the same executable.

The test main should be portable to kernel mode as well, so if
there's a set of tests that should be run in self-test mode in kernel
space, we can accomodate that.

A new serenity_test CMake function streamlines adding a new test with
arguments for the test source file, subdirectory under /usr/Tests to
install the test application and an optional list of libraries to link
against the test application. To accomodate future test where the
provided TestMain.cpp is not suitable (e.g. test-js), a CUSTOM_MAIN
parameter can be passed to the function to not link against the
boilerplate main function.
2021-04-25 09:36:49 +02:00
Gunnar Beutner 511ffa8d68 Meta: Support using rsync to install the root filesystem
Using rsync is significantly faster when we're using an existing
image because we only have to copy files which are new or have
been updated. This cuts down the image creation time to about
a second or two assuming an old image exists.
2021-04-23 22:34:05 +02:00
Gunnar Beutner 479905be6c Meta: Re-use existing disk image where possible
This adds support for re-using and re-sizing existing disk images.
Disk images are checked with e2fsck prior to re-use and a new disk
image is automatically created when that check fails.
2021-04-23 22:34:05 +02:00
Gunnar Beutner b3db01e20e Ports: Detect more types of errors in the AvailablePorts.md file
This adds support for detecting incorrect version numbers and links
in the ports list.

Also, unlike before it doesn't parse the package.sh script but executes
it instead which allows us to detect syntax errors.
2021-04-23 16:11:48 +02:00
Linus Groh 43f56ced73 Meta: Remove sync-local.sh move warning from build-root-filesystem.sh 2021-04-22 23:08:20 +02:00
Brian Gianforcaro 1682f0b760 Everything: Move to SPDX license identifiers in all files.
SPDX License Identifiers are a more compact / standardized
way of representing file license information.

See: https://spdx.dev/resources/use/#identifiers

This was done with the `ambr` search and replace tool.

 ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *
2021-04-22 11:22:27 +02:00
Linus Groh 696f23d7a0 Meta: Add basic Zsh completions for serenity.sh
This patch adds a basic Zsh completion script for the commands and
targets provided by Meta/serenity.sh. There's some room for improvement
here, e.g. we could provide completion for available CMake targets -
currently completion stops after serenity.sh <command> <target>.

You can enable it by adding this to your .zshrc before completions are
loaded:

    fpath=($SERENITY_SOURCE_DIR/Meta/ShellCompletions/zsh $fpath)
2021-04-22 09:55:48 +02:00
Gunnar Beutner 232e64c10a Meta: Add GDB pretty printers 2021-04-22 00:45:43 +02:00
Ali Mohammad Pur 468ac11f29 Meta: Add an option to precompile some very common AK headers
Until we get the goodness that C++ modules are supposed to be, let's try
to shave off some parse time using precompiled headers.
This commit only adds some very common AK headers, only to binaries,
libraries and the kernel (tests are not covered due to incompatibility
with AK/TestSuite.h).
This option is on by default, but can be disabled by passing
`-DPRECOMPILE_COMMON_HEADERS=OFF` to cmake, which will disable all
header precompilations.
This makes the build about 30 seconds faster on my machine (about 7%).
2021-04-21 14:29:46 +02:00
Marco Biscaro 8124719c3d Tests: Reorganize LibCompress unit tests
Move LibCompress unit tests to LibCompress/Tests directory and register
them with CMake's add_test. This allows us to run these tests with
ninja test instead of running a separate executable.

Also split the existing tests in 3 test files that better follow the
source code structure (inspired by AK tests).
2021-04-21 08:00:32 +02:00
Timothy Flynn 110cd98c0a Lagom: Add sql utility and LibSQL unit tests 2021-04-20 18:28:34 +02:00
Timothy Flynn 55b7b8e930 AK+Meta: Add a debug option for LibSQL 2021-04-20 18:28:34 +02:00
Gunnar Beutner 2d62cf8b79 Ports: Update the lint-ports.py script to ignore missing auth_type for SerenityOS repositories 2021-04-20 17:04:51 +02:00
Panagiotis Vasilopoulos e45e0eeb47 Everywhere: Replace SERENITY_ROOT with SERENITY_SOURCE_DIR 2021-04-20 15:27:52 +02:00
Brian Gianforcaro 8f6a5a1c39 Meta: Add a rebuild-world command to serenity.sh
This was brought up as something that would be useful by
`RealKC` on the discord, and I happened to agree that it
would be useful. Especially given the abundance of Toolchain
changes recently.
2021-04-20 08:10:21 +02:00
Brian Gianforcaro c195ee6fd2 Meta: Add allow-list for icon size detection in CMake
The only icons we are currently warning about are designed
and rendered as small icons intentionally, as their only use
is in desktop applets, and thus are exempt to this rule.

This reduces build spam back down to a minimum.
I should have just done this in the first place, back in #4729
2021-04-20 08:10:21 +02:00
Brendan Coles 3c4dc5cb11 Meta: Remove references to Userland/Libraries/LibELF/exec_elf.h 2021-04-19 09:19:31 +02:00
FalseHonesty 969c73660b Meta: Mark x86 debug register macros as false positives for CI 2021-04-18 17:02:40 +02:00