summaryrefslogtreecommitdiff
path: root/Meta/build-root-filesystem.sh
AgeCommit message (Collapse)Author
2022-03-08Base+Meta: Make /usr/local read-writeDaniel Bertalan
This directory has to be writable if we want to install ports that have been built inside Serenity. It's owned by root anyway, so having it be read-only does not provide many security benefits.
2022-02-23LibTest+Spreadsheet: Add some basic spreadsheet runtime behaviour testsAli Mohammad Pur
As there's a somewhat active development going on, let's keep the expected behaviour under tests to make sure nothing blows up :^)
2022-01-23timezone: Add a command line utility to set the system time zoneTimothy Flynn
2022-01-13Meta: Use fuse2fs if available to avoid root when building imageChris Frey
The fuse2fs tool that is part of e2fsprogs-1.46 has a 'fakeroot' mount option. This allows a non-root users to modify file ownership and permissions without actually being root. This package is available in Debian bullseye and buster-backports. If available, the script assumes the user wants to use it. Otherwise, it falls back to the usual root requirements. Now that root is not required, the root check in build-root-filesystem.sh is not necessary. Since build-root-filesystem.sh has 'set -e' enabled, removing this check will not cause a change in functionality.
2021-11-28Meta: Copy libstdc++ into the disk imageDaniel Bertalan
With this, we can now compile C++ programs with the LLVM port without having to jump through hooks to build libc++ because it can't be cross-compiled with our GNU toolchain.
2021-11-28Meta: Copy libc++ headers into the disk imageDaniel Bertalan
If we do this, the LLVM port's Clang will pick up these paths, so we won't have to compile libc++ twice. This does increase the size of _disk_image by 5 MB, but that shouldn't be a problem.
2021-10-31Kernel: Write test that crashes ProcFSBen Wiederhake
2021-10-22Tests: Add a unit test to ensure the /dev/mem device works correctlyLiav A
To ensure everything works as expected, a unit test was added with multiple scenarios. This binary has to have the SetUID flag, and we also bind-mount the /usr/Tests directory to allow running of SetUID binaries.
2021-10-17Toolchain+Meta: Update LLVM version to 13.0.0Daniel Bertalan
This commit updates the Clang toolchain's version to 13.0.0, which comes with better C++20 support and improved handling of new features by clang-format. Due to the newly enabled `-Bsymbolic-functions` flag, our Clang binaries will only be 2-4% slower than if we dynamically linked them, but we save hundreds of megabytes of disk space. The `BuildClang.sh` script has been reworked to build the entire toolchain in just three steps: one for the compiler, one for GNU binutils, and one for the runtime libraries. This reduces the complexity of the build script, and will allow us to modify the CI configuration to only rebuild the libraries when our libc headers change. Most of the compile flags have been moved out to a separate CMake cache file, similarly to how the Android and Fuchsia toolchains are implemented within the LLVM repo. This provides a nicer interface than the heaps of command-line arguments. We no longer build separate toolchains for each architecture, as the same Clang binary can compile code for multiple targets. The horrible mess that `SERENITY_CLANG_ARCH` was, has been removed in this commit. Clang happily accepts an `i686-pc-serenity` target triple, which matches what our GCC toolchain accepts.
2021-09-15Meta: Switch to a SuperBuild that splits host and target buildsAndrew Kaster
Replace the old logic where we would start with a host build, and swap all the CMake compiler and target variables underneath it to trick CMake into building for Serenity after we configured and built the Lagom code generators. The SuperBuild creates two ExternalProjects, one for Lagom and one for Serenity. The Serenity project depends on the install stage for the Lagom build. The SuperBuild also generates a CMakeToolchain file for the Serenity build to use that replaces the old toolchain file that was only used for Ports. To ensure that code generators are rebuilt when core libraries such as AK and LibCore are modified, developers will need to direct their manual `ninja` invocations to the SuperBuild's binary directory instead of the Serenity binary directory. This commit includes warning coalescing and option style cleanup for the affected CMakeLists in the Kernel, top level, and runtime support libraries. A large part of the cleanup is replacing USE_CLANG_TOOLCHAIN with the proper CMAKE_CXX_COMPILER_ID variable, which will no longer be confused by a host clang compiler.
2021-08-28Meta: Make build-root-filesystem.sh omit libgcc_so.so in aarch64 buildsNico Weber
2021-08-22Meta: Add 'copy-src' command to serenity.shItamar
This command copies the project's source tree to /home/anon/Source/serenity in the built disk image. This will be useful for working on serenity inside serenity :^)
2021-08-14Tests: Add regression tests for the LibCpp preprocessorItamar
Similarly to the LibCpp parser regression tests, these tests run the preprocessor on the .cpp test files under Userland/LibCpp/Tests/preprocessor, and compare the output with existing .txt ground truth files.
2021-08-14LibCpp: Move parser tests to Userland/Libraries/LibCpp/Tests/parserItamar
2021-08-08Meta: Add Clang support to the CMake build scriptsDaniel Bertalan
2021-08-08Toolchain: Add LLVM patch and script for building itDaniel Bertalan
This contains all the bits and pieces necessary to build a Clang binary that will correctly compile SerenityOS. I had some trouble with getting LLVM building with a single command, so for now, I decided to build each LLVM component in a separate command invocation. In the future, we can also make the main llvm build step architecture-independent, but that would come with extra work to make library and include paths work. The binutils build invocation and related boilerplate is duplicated because we only use `objdump` from GNU binutils in the Clang toolchain, so most features can be disabled.
2021-07-30Meta: Make rsync a hard dependency and remove the fallback codeGunnar Beutner
Previously we'd fall back to using cp if rsync wasn't available. Not only is this considerably slower it also breaks when some of the files in the target directory are symlinks because cp tries to dereference them. Fixes #8672.
2021-07-18Kernel: Split debug symbols into a separate fileGunnar Beutner
This speeds up the boot process considerably when specifying the kernel image via -initrd.
2021-07-13Meta: Make sure files are installed with the right UID and GIDGunnar Beutner
Unfortunately we can't just use --chown everywhere because only rsync version 3.1 and newer support it and the default rsync on macOS is 2.6.9. Fixes #8711.
2021-06-29SystemServer+Meta: Use the new SysFSLiav A
We make SystemServer to mount the new SysFS in /sys.
2021-06-28Meta: Install 64-bit libgcc_s.so for x86_64 targetsGunnar Beutner
2021-06-17Meta: Allow building images without most utilitiesGunnar Beutner
Previously the build script assumed that certain utilities were always available.
2021-05-30pls: Drastically simplify this programAndreas Kling
Since this program is setuid-root, it should be as simple as possible. To that end, remove `/etc/plsusers` and use filesystem permissions to achieve the same thing. `/bin/pls` is now only executable by `root` or members of the `wheel` group. Also remove all the logic that went to great lengths to `unveil()` a minimal set of filesystem paths that may be used for the command. The complexity-to-benefit ratio did not seem justified, and I think we're better off keeping this simple. Finally, remove pledge promises the moment they are no longer needed.
2021-05-29Userland: Check sudoers file perms and owner in plsJesse Buhagiar
As per comment found in #6319 by @bcoles, `pls` should check the permissions and owner of the sudoers file to ensure that it hasn't been compromised.
2021-05-29Userland: Implement `pls`, a sudo cloneJesse Buhagiar
2021-05-27Base: Make desktop shortcuts owned by anon (#7495)Max Wipfli
This fixes #7492.
2021-05-21LibWasm+Meta: Add test-wasm and optionally test the conformance testsAli Mohammad Pur
This only tests "can it be parsed", but the goal of this commit is to provide a test framework that can be built upon :) The conformance tests are downloaded, compiled* and installed only if the INCLUDE_WASM_SPEC_TESTS cmake option is enabled. (*) Since we do not yet have a wast parser, the compilation is delegated to an external tool from binaryen, `wasm-as`, which is required for the test suite download/install to succeed. This *does* run the tests in CI, but it currently does not include the spec conformance tests.
2021-05-19LibCpp: Add regression tests for the parserItamar
For each .cpp file in the test suite data, there is a .ast file that represents the "known good" baseline of the parser result. Each .cpp file goes through the parser, and the result of invoking `ASTNode::dump()` on the root node is compared to the baseline to find regressions. We also check that there were no parser errors when parsing the .cpp files.
2021-05-19CppLanguageServer: Put cpp test files in /home/anon/cpp-tests/Itamar
This is similar to the LibJS test data that resides in /home/anon/js-tests. It's more convenient than storing the test programs as raw strings in the code.
2021-05-06Base: Make the /bin/TextEditor desktop shortcut say "Text Editor" :^)Andreas Kling
2021-05-04Meta: Remove existing test directories before copying new ones inAli Mohammad Pur
Previously, we would end up with `js-tests/Tests` and `web-tests/Tests` because the previous directories were already there.
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-26Meta: Make sure traceroot and ping belong to the root userGunnar Beutner
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-22Meta: Remove sync-local.sh move warning from build-root-filesystem.shLinus Groh
2021-04-20Everywhere: Replace SERENITY_ROOT with SERENITY_SOURCE_DIRPanagiotis Vasilopoulos
2021-04-11Everywhere: Update references from ReadMe.md => README.mdAndreas Kling
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-02-14Build: Sprinkle some portability, fix on OpenBSDjoshua stein
realpath(1) is specific to coreutils and its behavior can be had with readlink -f Create the Toolchain Build directory if it doesn't exist before calling readlink, since realpath(3) on at least OpenBSD will error on a non-existent path
2021-02-13HackStudio: Project templates and New Project dialogNick Vella
This commit adds a simple project template system to HackStudio, as well as a pretty New Project dialog, inspired by early VS.NET and MS Office.
2021-02-03Applications: Remove "Welcome" applicationAndreas Kling
This was a cute application for its time, but it's far too jokey and non-serious for how I'd like this project to treat itself.
2021-01-30Meta: Fix sync-local.sh file checkLinus Groh
Missing '{'. Thanks to @BenWiederhake for noticing!
2021-01-30Meta: Expect sync-local.sh script at repository rootLinus Groh
This used to be in Kernel/, next to the build-root-filesystem.sh script, which was then moved to Meta/ during the transition to CMake but has the working directory set to Build/, effectively expecting it there - which seems silly. TL;DR: Very confusing. Use an explicit path relative to SERENITY_ROOT instead and update the .gitignore files.
2021-01-22Base: More helpful Desktop selectionBen Wiederhake
If Serenity is ever used for more than a few days, the user will be more likely to want to interact with their home directory than just be dropped at '/'. Also, we have a Welcome program. Spotlight it! And finally, there was a missing newline in the build script.
2021-01-20Meta: Slightly improve image scriptBen Wiederhake
2021-01-12Libraries: Move to Userland/Libraries/Andreas Kling
2021-01-09LibCore+passwd+su+Base: Add /etc/shadow to hide hashes from users :^)Andreas Kling
This patch moves the user account password hashes from /etc/passwd, where they were world-readable, to /etc/shadow, where only root can access them. The Core::Account class is extended to support both authentication against, and modification of /etc/shadow. The default password for "anon" as of this commit is "foo" :^)
2021-01-01Base: Add a desktop shortcut to the root directoryAndreas Kling
2020-12-29Build: Support non-i686 toolchainsmeme
* Add SERENITY_ARCH option to CMake for selecting the target toolchain * Port all build scripts but continue to use i686 * Update GitHub Actions cache to include BuildIt.sh
2020-12-27Kernel: Introduce the DevFSLiav A
The DevFS along with DevPtsFS give a complete solution for populating device nodes in /dev. The main purpose of DevFS is to eliminate the need of device nodes generation when building the system. Later on, DevFS will assist with exposing disk partition nodes.