summaryrefslogtreecommitdiff
path: root/Meta
AgeCommit message (Collapse)Author
2021-05-01Lagom/CMake: Add -fconstexpr-steps for AppleClangCarlos César Neves Enumo
2021-04-30Meta: Use author username for pull request IRC notificationsLinus Groh
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-30Meta: pre-commit should run lint-ports.py only when Ports changeBrian Gianforcaro
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-29Everywhere: "file name" => "filename"Andreas Kling
2021-04-29WindowServer: Move configuration file to /etc/WindowServer.iniAndreas Kling
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-29Meta: Ensure the tap device is removed before trying to create it againGunnar Beutner
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-29Meta: Increase fconstexpr-steps for Clang Lagom buildsIdan Horowitz
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-29Meta: Make copyright header check more strictLinus Groh
2021-04-27Meta: Don't run qemu as rootGunnar Beutner
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-26Meta: Make sure traceroot and ping belong to the root userGunnar Beutner
2021-04-25Meta: Only allow sha256 and sig for auth_type in portsGunnar Beutner
2021-04-25AK+Userland: Move AK/TestSuite.h into LibTest and rework Tests' CMakeAndrew Kaster
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-23Meta: Support using rsync to install the root filesystemGunnar Beutner
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-23Meta: Re-use existing disk image where possibleGunnar Beutner
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-23Ports: Detect more types of errors in the AvailablePorts.md fileGunnar Beutner
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-22Meta: Remove sync-local.sh move warning from build-root-filesystem.shLinus Groh
2021-04-22Everything: Move to SPDX license identifiers in all files.Brian Gianforcaro
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-22Meta: Add basic Zsh completions for serenity.shLinus Groh
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-22Meta: Add GDB pretty printersGunnar Beutner
2021-04-21Meta: Add an option to precompile some very common AK headersAli Mohammad Pur
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-21Tests: Reorganize LibCompress unit testsMarco Biscaro
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-20Lagom: Add sql utility and LibSQL unit testsTimothy Flynn
2021-04-20AK+Meta: Add a debug option for LibSQLTimothy Flynn
2021-04-20Ports: Update the lint-ports.py script to ignore missing auth_type for ↵Gunnar Beutner
SerenityOS repositories
2021-04-20Everywhere: Replace SERENITY_ROOT with SERENITY_SOURCE_DIRPanagiotis Vasilopoulos
2021-04-20Meta: Add a rebuild-world command to serenity.shBrian Gianforcaro
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-20Meta: Add allow-list for icon size detection in CMakeBrian Gianforcaro
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-19Meta: Remove references to Userland/Libraries/LibELF/exec_elf.hBrendan Coles
2021-04-18Meta: Mark x86 debug register macros as false positives for CIFalseHonesty
2021-04-18Meta: Replace /bin/env with /usr/bin/envin serenity.sh shebangLinus Groh
This is more portable.
2021-04-18Meta: Update check-style.sh to ignore CVS $id$ tagsGunnar Beutner
Userlands/Libraries/LibC/sys/exec_elf.h has an $id$ tag which fails this lint check.
2021-04-18LibC+LibELF: Implement support for the dl_iterate_phdr helperGunnar Beutner
This helper is used by libgcc_s to figure out where the .eh_frame sections are located for all loaded shared objects.
2021-04-17Meta: Remove stray newline from serenity.sh help textLinus Groh
2021-04-17Kernel: Add base support for VirtRNG (VirtIO based Hardware RNG)Idan Horowitz
This is a very basic implementation that only requests 4096 bytes of entropy from the host once, but its still high quality entropy so it should be a good fix for #4490 (boot-time entropy starvation) for virtualized environments. Co-authored-by: Sahan <sahan.h.fernando@gmail.com>
2021-04-17Kernel: Finish base implementation of VirtQueuesIdan Horowitz
This commit includes a lot of small changes and additions needed to finalize the base implementation of VirtIOQueues and VirtDevices: * The device specific driver implementation now has to handle setting up the queues it needs before letting the base device class know it finised initialization * Supplying buffers to VirtQueues is now done via ScatterGatherLists instead of arbitary buffer pointers - this ensures the pointers are physical and allows us to follow the specification in regards to the requirement that individual descriptors must point to physically contiguous buffers. This can be further improved in the future by implementating support for the Indirect-Descriptors feature (as defined by the specification) to reduce descriptor usage for very fragmented buffers. * When supplying buffers to a VirtQueue the driver must supply a (temporarily-)unique token (usually the supplied buffer's virtual address) to ensure the driver can discern which buffer has finished processing by the device in the case in which the device does not offer the F_IN_ORDER feature. * Device drivers now handle queue updates (supplied buffers being returned from the device) by implementing a single pure virtual method instead of setting a seperate callback for each queue * Two new VirtQueue methods were added to allow the device driver to either discard or get used/returned buffers from the device by cleanly removing them off the descriptor chain (This also allows the VirtQueue implementation to reuse those freed descriptors) This also includes the necessary changes to the VirtIOConsole implementation to match these interface changes. Co-authored-by: Sahan <sahan.h.fernando@gmail.com>
2021-04-17Kernel: Implement a naive version of virtconsole by memcpying to physical pageIdan Horowitz
This patch allocates a physical page for each of the virtqueues and memcpys to it when receiving a buffer to get a physical, aligned contiguous buffer as required by the virtio specification. Co-authored-by: Sahan <sahan.h.fernando@gmail.com>
2021-04-17Kernel: Add base support for VirtIO devicesIdan Horowitz
Based on pull #3236 by tomuta, this adds helper methods for generic device initialization, and partily-broken virtqueue helper methods Co-authored-by: Tom <tomut@yahoo.com> Co-authored-by: Sahan <sahan.h.fernando@gmail.com>
2021-04-17Meta: Allow serenity.sh to be used outside of assumed working directoryBrian Gianforcaro
This change fixes two bugs: 1) If you run `serenity.sh` outside of your serenity git clone, the `get_top_dir()` function won't be able to auto detect the serenity root dir and we'll error out. By allowing the script to use an existing $SERENITY_ROOT vlaue if it exists, we can solve this problem. 2) If tried to run a command which ends up calling `build_toolchain()` and you were outside of the root of the project, it should just fail. Fix this by utilizing `$SERENITY_ROOT`.
2021-04-16Meta: lint-ports: Check package files for required propertiesBrendan Coles
2021-04-15Meta: Use basename for serenity.sh help messageBrian Gianforcaro
I have this symlinked into ~/bin, when looking at the help/usage it would previously print the fully qualified path to the script making the help very difficult to read.
2021-04-12Meta: Add install-ports CMake targetPeter Elliott
install-ports copys the necessary files from Ports/ to /usr/Ports. Also refactor the compiler and destiation variables from .port_include.sh into .hosted_defs.sh. .hosted_defs.sh does not exists when ports are built in serenity
2021-04-11Everywhere: Update references from ReadMe.md => README.mdAndreas Kling
2021-04-04Meta: Update the screenshot in the ReadMe :^)Andreas Kling
It's been almost a year since the last one, and things look a bit different so let's add a new screenshot.
2021-04-03Kernel: Introduce a new HID subsystemLiav A
The end goal of this commit is to allow to boot on bare metal with no PS/2 device connected to the system. It turned out that the original code relied on the existence of the PS/2 keyboard, so VirtualConsole called it even though ACPI indicated the there's no i8042 controller on my real machine because I didn't plug any PS/2 device. The code is much more flexible, so adding HID support for other type of hardware (e.g. USB HID) could be much simpler. Briefly describing the change, we have a new singleton called HIDManagement, which is responsible to initialize the i8042 controller if exists, and to enumerate its devices. I also abstracted a bit things, so now every Human interface device is represented with the HIDDevice class. Then, there are 2 types of it - the MouseDevice and KeyboardDevice classes; both are responsible to handle the interface in the DevFS. PS2KeyboardDevice, PS2MouseDevice and VMWareMouseDevice classes are responsible for handling the hardware-specific interface they are assigned to. Therefore, they are inheriting from the IRQHandler class.
2021-04-02Meta: Resolve some pylint violations in Python lint scriptsBrendan Coles
Resolves: * all: consider-using-sys-exit * all: wrong-import-order * all: TODO: Require that a few keys are set? (fixme) * some: missing-function-docstring * some: line-too-long
2021-04-02LibJS: Add initial support for PromisesLinus Groh
Almost a year after first working on this, it's finally done: an implementation of Promises for LibJS! :^) The core functionality is working and closely following the spec [1]. I mostly took the pseudo code and transformed it into C++ - if you read and understand it, you will know how the spec implements Promises; and if you read the spec first, the code will look very familiar. Implemented functions are: - Promise() constructor - Promise.prototype.then() - Promise.prototype.catch() - Promise.prototype.finally() - Promise.resolve() - Promise.reject() For the tests I added a new function to test-js's global object, runQueuedPromiseJobs(), which calls vm.run_queued_promise_jobs(). By design, queued jobs normally only run after the script was fully executed, making it improssible to test handlers in individual test() calls by default [2]. Subsequent commits include integrations into LibWeb and js(1) - pretty-printing, running queued promise jobs when necessary. This has an unusual amount of dbgln() statements, all hidden behind the PROMISE_DEBUG flag - I'm leaving them in for now as they've been very useful while debugging this, things can get quite complex with so many asynchronously executed functions. I've not extensively explored use of these APIs for promise-based functionality in LibWeb (fetch(), Notification.requestPermission() etc.), but we'll get there in due time. [1]: https://tc39.es/ecma262/#sec-promise-objects [2]: https://tc39.es/ecma262/#sec-jobs-and-job-queues
2021-03-31Utilities: Add simple traceroute utilityIdan Horowitz
This utility traces the route packets take to a user specified host. QEMU user networking (the type of networking we currently have setup) does not support sending "real" raw IPv4 packets, and as such we cant specify a custom TTL value. As a result, this utility will only work on real hardware, qemu setup with tun networking (requires root) and other hypervisors that support bridged adapters (VirtualBox/VMWare).
2021-03-27Lagom/Fuzzers: Add fuzzer for zip file parserLuke
2021-03-24Meta: Pass arguments to 'serenity.sh run lagom' executableLinus Groh
2021-03-23LibGUI: Remove one ancient GMENU_DEBUG debug logAndreas Kling