summaryrefslogtreecommitdiff
path: root/Meta/build-root-filesystem.sh
AgeCommit message (Collapse)Author
2023-05-20Base: Move user nona from group 200 into existing group usersBen Wiederhake
It seems that group 200 never existed, and group 100=users always did: 90bab5ea717682d819609e9238ab6785a450b696
2023-05-13Userland+Meta: Add new helper program for network settingsFabian Dellwing
This little program allows us to take the NetworkSettings app away from being an elevated GUI app. It receives a JsonObject on STDIN and writes it to the global Network configuration file. If the write was successfull it will apply the changes.
2023-05-09Userland: Show "Ladybird" instead of "Browser" in titles, menus, etcAndreas Kling
While the binary is still called "Browser" for now, let's make it clear that we're converging on a single name for this application.
2023-03-04Base+Meta: Remove invalid symlinks from Base for more and envAndrew Kaster
These symlinks' only purpose was to be copied into the rootfs along with the rest of Base. Instead of storing symlinks to files that either don't exist in the Base directory, or point to an absolute path outside of the serenity folder, move these symlinks into the build-root-filesystem.sh script.
2023-02-08Meta: Allow creating disk image without installing kernel into itTimon Kruiper
This change allows for creating smaller disk images, which is useful for creating a disk image that will be put into ram.
2023-01-25Meta: Unify installing GCC dependencies in disk imageTimon Kruiper
This makes sure that the aarch64 disk image also contains the correct dynamic shared objects, specifically libgcc_s.so.1, as that one is a dynamic dependency of every aarch64 executable. To unify the x86_64 and aarch64 code paths, this commit just installs everything from the compilers lib directory into the disk image lib directory. This also happens for the Clang toolchain. This copies a few extra files related to libsupc++ and libstdc++, increasing the size of the disk image by 1.6MB. However, we were already copying libstdc++.a manually anyway.
2022-12-14Meta+CMake: Extract Wasm spec tests into the binary directoryAndrew Kaster
Clean up the Wasm spec tests CMake rules to extract and compile the wat files into wasm files in the LibWasm binary directory instead of its source directory. Also make the rules more robust to missing host tools, and use more CMake install rules for the test files rather than relying on build-root-filesystem.sh. Add some FIXMEs for later, we really shouldn't be doing installation of test files into /home/anon at the build-root-filesystem stage in $CURRENT_YEAR. Tests go in /usr/Tests
2022-10-14Meta: Get rid of /res/version.inikleines Filmröllchen
There are no more users of this legacy version API. :yakgone:
2022-10-14Escalator: Add new method to privilege escalate within GUIne0ndrag0n
2022-10-03Meta: Make x86-64 target the defaultLiav A
This is a preparation to check if our users find noticeable bugs in the x86-64 target, before we can decide if we want to remove the i686 target for good.
2022-07-10Meta: Make utmp start out as an empty object instead of empty stringLuke Wilde
The reason empty string was treated as JSON null was to paper over an issue where UTMP would start out as the empty string and presumably cause errors when trying to parse it as JSON. This was added in commit a409b832. This changes that by making UTMP start out as an empty JSON object instead of the empty string.
2022-07-07Meta: Don't overwrite newer files when building the root filesystemTim Schumacher
2022-05-21LibCodeComprehension: Re-organize code comprehension related codeItamar
This moves all code comprehension-related code to a new library, LibCodeComprehension. This also moves some types related to code comprehension tasks (such as autocomplete, find declaration) out of LibGUI and into LibCodeComprehension.
2022-04-23Toolchain+Ports: Update LLVM to 14.0.1Daniel Bertalan
Besides a version bump, the following changes have been made to our toolchain infrastructure: - LLVM/Clang is now built with -march=native if the host compiler supports it. An exception to this is CI, as the toolchain cache is shared among many different machines there. - The LLVM tarball is not re-extracted if the hash of the applied patches doesn't differ. - The patches have been split up into atomic chunks. - Port-specific patches have been integrated into the main patches, which will aid in the work towards self-hosting. - <sysroot>/usr/local/lib is now appended to the linker's search path by default. - --pack-dyn-relocs=relr is appended to the linker command line by default, meaning ports take advantage of RELR relocations without any patches or additional compiler flags. The formatting of LLVM port's package.sh has been bothering me, so I also indented the arguments to the CMake invocation.
2022-04-17Meta: Keep timestamps of manually copied toolchain outputTim Schumacher
2022-03-20Everywhere: Move js/web/wasm tests under /home/anon/TestsBrian Gianforcaro
2022-03-20Everywhere: Move cpp-tests under /home/anon/TestsBrian Gianforcaro
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