Commit graph

77 commits

Author SHA1 Message Date
Andreas Kling
6e78279614 keymap: Add back a tiny utility for setting the system keyboard layout
This patch removes the setuid-root flag from the KeyboardSettings GUI
application and adds back the old "keymap" program.

It doesn't feel very safe and sound to have a GUI program runnable
as setuid-root, so in the next patch I'll be making KeyboardSettings
call out to the "keymap" program to do its bidding.
2020-06-18 22:19:57 +02:00
Andreas Kling
c45c5ded34 WebContent: Start work on browser process separation :^)
The "WebContent" service provides a very restricted instance of LibWeb
running as an unprivileged user account. This will be used to implement
process separation in Browser, among other things.

This first cut of the service only spawns a single WebContent process
when someone connects to /tmp/portal/webcontent. We will soon switch
this over to spawning a new process for each connection.

Since this feature is very immature, we'll be bringing it up inside of
Demos/WebView as a separate demo program. Eventually this will become
a reusable widget that anyone can embed and easily get out-of-process
web content in their GUI.

This is pretty, pretty cool! :^)
2020-06-17 20:09:44 +02:00
Andreas Kling
723f4e5ee6 Meta: Scale back overly informal user-facing strings
We were getting a little overly memey in some places, so let's scale
things back to business-casual.

Informal language is fine in comments, commits and debug logs,
but let's keep the runtime nice and presentable. :^)
2020-06-17 18:35:49 +02:00
Sergey Bugaev
8ecac16c03 Base+Meta: Rename the wheel group to goodboys :^) 2020-06-17 15:02:03 +02:00
Matthew Olsson
e8e728454c AK: JsonParser improvements
- Parsing invalid JSON no longer asserts
    Instead of asserting when coming across malformed JSON,
    JsonParser::parse now returns an Optional<JsonValue>.
- Disallow trailing commas in JSON objects and arrays
- No longer parse 'undefined', as that is a purely JS thing
- No longer allow non-whitespace after anything consumed by the initial
  parse() call. Examples of things that were valid and no longer are:
    - undefineddfz
    - {"foo": 1}abcd
    - [1,2,3]4
- JsonObject.for_each_member now iterates in original insertion order
2020-06-13 12:43:22 +02:00
Andreas Kling
5448a670c0 Base: Symlink /dev/urandom to /dev/random
Some software expects to find /dev/urandom so we might as well provide.
Gets rid of one dropbear patch. :^)
2020-06-08 21:42:33 +02:00
Hüseyin ASLITÜRK
ddeb0ab1ad Applications: Add new KeyboardSettings application
GUI application to manage Keyboard settings.
2020-06-08 09:28:18 +02:00
AnotherTest
40829b849a Meta: Run Crypto tests in CI
We skip the tests that are not self-contained (TLS) to avoid adding
extra variables to the tests.
2020-06-07 19:29:40 +02:00
Nico Weber
7675812efd build-root-filesystem: Explicitly add +rX for group and others to copied files.
This lets Serenity boot even when the repository is cloned with a
umask of 027.
2020-06-05 09:30:42 +02:00
Nico Weber
309a91847f build-root-filesystem: Move "cp -R" block up.
I want to add a "chmod -R" right after the cp command.
This needs to happen before all the other chmods, to not
undo their effect.
2020-06-05 09:30:42 +02:00
Nico Weber
1539a976c8 run.sh: Pass -drive instead of -hda to qemu.
run.sh currently makes qemu print this as the very first output:

WARNING: Image format was not specified for '_disk_image' and probing guessed raw.
         Automatically detecting the format is dangerous for raw images, write operations on block 0 will be restricted.
         Specify the 'raw' format explicitly to remove the restrictions.

This is scary for people who don't know that this is normal, and
write operations to block 0 being restricted could be confusing
for some operations happening from within serenity too at some point.

So specify the 'raw' format explicitly, like the warning suggests.
Requires using -drive instead of -hda.

From `man qemu-system`:

    Instead of -hda, -hdb, -hdc, -hdd, you can use:
        qemu-system-x86_64 -drive file=file,index=0,media=disk

So use that, and also pass format=raw.
2020-06-05 09:29:02 +02:00
Andreas Kling
1c6e4e04a8 Meta: Time for a new screenshot! :^)
This one is pretty similar to the previous one, but the increase in
polish is noticeable.
2020-06-02 19:29:31 +02:00
Sergey Bugaev
80f671e16c Lagom: Fix target name 2020-06-01 17:37:44 +02:00
Emanuele Torre
d963be795d Meta: update lint-shell-scripts.sh so that it does not search in Build/
We now use git-ls-files(1) instead of find(1).
2020-05-29 07:59:45 +02:00
Emanuele Torre
937d0be762 Meta: Add a script check the presence of "#pragma once" in header files
.. and make travis run it.

I renamed check-license-headers.sh to check-style.sh and expanded it so
that it now also checks for the presence of "#pragma once" in .h files.

It also checks the presence of a (single) blank line above and below the
"#pragma once" line.

I also added "#pragma once" to all the files that need it: even the ones
we are not check.
I also added/removed blank lines in order to make the script not fail.

I also ran clang-format on the files I modified.
2020-05-29 07:59:45 +02:00
etaIneLp
330aecb5d8
Build: Use a separate byproduct name for the GRUB disk image (#2424)
The grub-image target no longer conflicts with normal image target.
This unbreaks using CMake with Ninja.

Fixes #2423.
2020-05-28 10:08:38 +02:00
etaIneLp
7bc871ca8d Kernel: Stop bootloader from setting video mode with Multiboot
Meta: Update INSTALL.md and grub configs for new boot_mode option
2020-05-28 00:50:55 +02:00
etaIneLp
2ec07655cf Meta: Grub configs use correct kernel image name 2020-05-28 00:50:55 +02:00
etaIneLp
0c1ed0ebf3 Meta: build-image-grub.sh looks for grub configs in the right place 2020-05-28 00:50:55 +02:00
Andreas Kling
5f9de61bf2 Lagom: Build LibCrypto, LibTLS and test-crypto :^) 2020-05-27 12:28:39 +02:00
Nick Vella
e53fa97cfb LibGUI, About: Implement system-wide W2k-esque About dialog
The new About dialog reads version information from /res/version.ini,
which is generated at build time.
2020-05-27 11:44:19 +02:00
Itamar
773ed930cb Debugger: Re-introduce the sdb alias 2020-05-24 10:42:21 +02:00
Yonatan Goldschmidt
00c0650f96 Build: Add Dockerfile 2020-05-22 01:19:15 +02:00
Andreas Kling
58fa9c6e89 PixelPaint: Rename from PaintBrush :^) 2020-05-20 20:35:35 +02:00
Devashish
e4f7080bbd Meta: Update CLion and WSL configuration documentations
This commit updates CLionConfiguration.md and NotesOnWSL.md so that
they comply with new build system. In addition to that, the WSL doc
is updated to include instructions to run qemu (and serenity) natively
on Windows, without needing an X-window server.
2020-05-17 23:07:35 +02:00
Shannon Booth
2ffbdf5680 Toolchain/Ports: Update to gcc 10.1.0 2020-05-16 09:51:31 +02:00
Linus Groh
33defef267 LibJS: Let parser keep track of errors
Rather than printing them to stderr directly the parser now keeps a
Vector<Error>, which allows the "owner" of the parser to consume them
individually after parsing.

The Error struct has a message, line number, column number and a
to_string() helper function to format this information into a meaningful
error message.

The Function() constructor will now include an error message when
throwing a SyntaxError.
2020-05-15 09:53:52 +02:00
Sergey Bugaev
450a2a0f9c Build: Switch to CMake :^)
Closes https://github.com/SerenityOS/serenity/issues/2080
2020-05-14 20:15:18 +02:00
Linus Groh
358694567f Meta: Add script to enforce license headers & run it on Travis 2020-05-09 23:55:58 +02:00
Linus Groh
82cb751907 Lagom: Add missing copyright header to FuzzJS.cpp 2020-05-09 23:45:16 +02:00
Andreas Kling
cf3b58fbe8 Services: Renamed from Servers
It didn't feel right to have a "DHCPClient" in a "Servers" directory.
Rename this to Services to better reflect the type of programs we'll
be putting in there.
2020-05-08 21:57:44 +02:00
Emanuele Torre
21712ed0a3 Meta: We don't need to ignore run-tests in lint-shell-scripts.sh 2020-05-07 12:20:41 +02:00
Devashish
f22c973ba3 Meta: Add configuration for setting up project in CLion
This commit adds a CMakeLists.txt file that will be used by CLion to
configure the project and documentation explaining the steps to follow.
Configuring CLion this way enables important features like code
completion and file search. The configuration isn't perfect. There are
source files for which CLion cannot pick up the headers and asks to
manually include them from certain directories. But for the most part,
it works all right.
2020-05-04 09:50:45 +02:00
Linus Groh
660fd04063 Meta: Build Lagom js and run LibJS tests on Travis 2020-04-20 22:44:13 +02:00
Andreas Kling
32d83fdee4 LibX86: Add an X86 instruction decoder library + basic disassembler
This will be very useful for developer tools like ProfileView, and also
for future tools like debuggers and such. :^)
2020-04-11 13:16:17 +02:00
Paul Redmond
7291d5c86f
Lagom: Add fuzz testing for LibJS using libFuzzer (#1692)
Note: clang only (see https://llvm.org/docs/LibFuzzer.html)

- add FuzzJs which will run the LibJS parser on random javascript inputs
- added a basic dictionary of javascript tokens

To use fuzzer:
CC=/usr/bin/clang CXX=/usr/bin/clang++ cmake -DENABLE_FUZZER_SANITIZER=1 ..
Fuzzers/FuzzJs -dict=../Fuzzers/FuzzJs.dict
2020-04-08 10:40:02 +02:00
Brian Gianforcaro
1e67efc5c1 Lagom: Add clang address/memory/undefined-behavior analyzer support
Adding the ability to turn on Clang analyzer support in the Lagom build.
Right now the following are working warning free on the LibJS test suite:

 -DENABLE_MEMORY_SANITIZER:BOOL=ON

 -DENABLE_ADDRESS_SANITIZER:BOOL=ON

The following analyzer produces errors when running the LibJS test suite:

 -DENABLE_UNDEFINED_SANITIZER:BOOL=ON
2020-04-05 12:49:06 +02:00
Andreas Kling
6529b78d08 Lagom: Build LibLine since "js" depends on it 2020-03-31 18:58:59 +02:00
Andreas Kling
faa3bf195a Meta: Ignore the LibJS test runner script when linting
Making this work in the absence of bash is more cumbersome than simply
skipping it at the moment.
2020-03-25 16:30:58 +01:00
Andreas Kling
e31dac3ba4 Lagom: Build LibJS + "js" test program
You can now get a full Linux build of the "js" test program by simply
building in Meta/Lagom :^)
2020-03-23 13:15:32 +01:00
Shannon Booth
084e67f267 Meta: Integrate Shellcheck into Travis
lint-shell-scripts searches over the repository looking for shell
scripts. On those found, shellcheck is run against them. If any linting
fails print those warnings and exit with a non-zero exit code.

Run this script automatically in Travis.
2020-02-10 10:46:25 +01:00
Shannon Booth
fe668db999 Meta: Fix shellcheck warnings in various scripts
Warnings fixed:
 * SC2086: Double quote to prevent globbing and word splitting.
 * SC2006: Use $(...) notation instead of legacy backticked `...`
 * SC2039: In POSIX sh, echo flags are undefined
 * SC2209: Use var=$(command) to assign output (or quote to assign string)
 * SC2164: Use 'cd ... || exit' or 'cd ... || return' in case cd fails
 * SC2166: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
 * SC2034: i appears unused. Verify use (or export if used externally)
 * SC2046: Quote this to prevent word splitting.
 * SC2236: Use -z instead of ! -n.

There are still a lot of warnings in Kernel/run about:
 - SC2086: Double quote to prevent globbing and word splitting.

However, splitting on space is intentional in this case, and not trivial to
change. Therefore ignore the warning for now - but we should fix this in
the future.
2020-02-10 10:46:25 +01:00
Andreas Kling
5f4d81ff55 Lagom: Add a tiny JSON test app 2020-02-06 19:32:34 +01:00
Andreas Kling
be6a31dde1 Lagom: Remove the bitrotted SimpleIPC test program 2020-02-06 19:23:18 +01:00
Andreas Kling
d17e23bd27 LibCore: Remove leading C from filenames 2020-02-06 15:04:03 +01:00
Andreas Kling
2d39da5405 LibCore: Put all classes in the Core namespace and remove the leading C
I've been wanting to do this for a long time. It's time we start being
consistent about how this stuff works.

The new convention is:

- "LibFoo" is a userspace library that provides the "Foo" namespace.

That's it :^) This was pretty tedious to convert and I didn't even
start on LibGUI yet. But it's coming up next.
2020-02-02 15:15:30 +01:00
Emanuel Sprung
462e223c3d Meta: Fix typo + suggest value of export variable.
The variable is not set anymore by the UseIt.sh script, so if a user doesn't
have it set in the .bashrc or .zshrc file already, it's not working properly.
2020-01-25 09:09:52 +01:00
Andreas Kling
94ca55cefd Meta: Add license header to source files
As suggested by Joshua, this commit adds the 2-clause BSD license as a
comment block to the top of every source file.

For the first pass, I've just added myself for simplicity. I encourage
everyone to add themselves as copyright holders of any file they've
added or modified in some significant way. If I've added myself in
error somewhere, feel free to replace it with the appropriate copyright
holder instead.

Going forward, all new source files should include a license header.
2020-01-18 09:45:54 +01:00
anon
d058a9319d Meta: refresh-serenity-qtcreator.sh now checks if SERENITY_ROOT is set 2019-12-24 11:12:00 +01:00
Andreas Kling
06ee24263c Meta: The Qt Creator .files refresh script should pick up .c files 2019-11-23 16:50:21 +01:00