diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 23aeaeaed..1c03bcefb 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -124,26 +124,26 @@ If you don't know programming: - Test the [daily images](https://static.redox-os.org/img/) on your computer and add the report on the [Hardware Compatibility](https://gitlab.redox-os.org/redox-os/redox/-/blob/master/HARDWARE.md) list - Monitor and warn developers if the [daily images](https://static.redox-os.org/img/) are outdated -- Use and test Redox, and file issues for bugs or needed features (please check for duplicates first) +- Use/test Redox and create issues for bugs or needed features (please check for duplicates first) - Fix and write documentation - Find or fix typos in configuration -If you don't know how to code in Rust, but know other programming languages: +If you don't know how to code in Rust but know other programming languages: -- Web development on the website (we don't accept JavaScript code) +- Web development on the website (we only accept minimal JavaScript code to preserve performance) - Write unit tests (may require minimal knowledge of Rust) -- Port C/C++ programs to Redox (read the `TODO`s of the recipes on the [WIP category](https://gitlab.redox-os.org/redox-os/cookbook/-/tree/master/recipes/wip?ref_type=heads)) +- Port C/C++ programs to Redox (read the `TODO`s of the recipes on the [WIP category](https://gitlab.redox-os.org/redox-os/cookbook/-/tree/master/recipes/wip)) - Port programs to Redox -If you know how to code in Rust, but don't know operating system development: +If you know how to code in Rust but don't know operating system development: - See the [easy](https://gitlab.redox-os.org/groups/redox-os/-/issues/?label_name[]=easy) issues - See the "[good first issue](https://gitlab.redox-os.org/groups/redox-os/-/issues/?label_name[]=good%20first%20issue)" issues - See the [help wanted](https://gitlab.redox-os.org/groups/redox-os/-/issues/?label_name[]=help%20wanted) issues (it's worth noting the skill level varies between projects, but a large subset of these should be approachable by contributors familiar with regular Rust/Unix application programming) -- Improve the package manager, or other meta-tools like `redoxer` or `installer` +- Improve the package manager, or build system tooling like `redoxer` or `installer` - Improve the [Ion](https://gitlab.redox-os.org/redox-os/ion) shell, or other high-level or mid-level projects -- Port Rust programs to Redox, possibly including dependencies, and C library extensions if necessary (also look for issues with the `port` label) -- Improve program compatibility in relibc by e.g. implementing missing APIs +- Port Rust programs (also look for issues with the `port` label) +- Improve application compatibility in relibc by e.g. implementing missing POSIX/Linux functions If you know how to code in Rust, and have experience with systems software/OS development: @@ -157,10 +157,9 @@ If you know how to code in Rust, and have experience with systems software/OS de - Improve, profile, and optimize code, especially in the kernel, filesystem, and network stack - Improve or write device drivers -For those who want to contribute to the Redox GUI, our GUI strategy has recently changed. +For those who want to contribute to the Redox GUI, our GUI strategy has changed. - We are improving the [Orbital](https://gitlab.redox-os.org/redox-os/orbital) display server and window manager, you can read more about it on [this tracking issue](https://gitlab.redox-os.org/redox-os/redox/-/issues/1430). -- Redox is in the process of adopting other Rust-written GUI toolkits, such as [Iced](https://iced.rs) and [Slint](https://slint-ui.com/). Please check out those projects if this is your area of interest. - OrbTk is in maintenance mode, and its developers have moved to other projects such as the ones below. There is currently no Redox-specific GUI development underway. ## Priorities @@ -234,7 +233,7 @@ You can find important tips on the [Development Tips](https://doc.redox-os.org/b We maintain a list of wikis, articles and videos to learn Rust, OS development and computer science on the [References](https://doc.redox-os.org/book/references.html) page. -If you are skilled there's a possibility that they could improve your knowledge in some way. +If you are skilled/experienced there's still a possibility that they could improve your knowledge in some way. ## Other Ways to Contribute diff --git a/HARDWARE.md b/HARDWARE.md index 6a419b9c2..a348a4153 100644 --- a/HARDWARE.md +++ b/HARDWARE.md @@ -13,13 +13,13 @@ This document tracks the current hardware compatibility of Redox. ## Why hardware reports are needed? -Each computer model have different hardware interface/firmware implementations and devices, which can cause the following problems: +Each computer model have different hardware interfaces, firmware implementations and devices, which can cause the following problems: - Boot bugs - Lack of device support - Performance degradation -These reports helps us to fix the problems above. +These reports helps us to fix the problems above, your report may help to fix many computers affected by the same bugs or missing drivers. ## What if my computer is customized? diff --git a/config/aarch64/tests.toml b/config/aarch64/tests.toml new file mode 100644 index 000000000..9af06ab91 --- /dev/null +++ b/config/aarch64/tests.toml @@ -0,0 +1,14 @@ +# Configuration for testing + +include = ["../tests.toml"] + +# Override the default settings here + +# General settings +[general] +# Filesystem size in MiB +# filesystem_size = 10000 + +# Package settings +[packages] +# example = {} diff --git a/config/dev.toml b/config/dev.toml index c3fa5bf94..8f92fb2cc 100644 --- a/config/dev.toml +++ b/config/dev.toml @@ -12,44 +12,4 @@ prompt = false # Package settings [packages] dev-redox = {} - -[[files]] -path = "/home/user/test.rs" -data = """ -fn main() { - println!("Hello, Redox!"); -} -""" - -[[files]] -path = "/home/user/test.c" -data = """ -#include - -int main(void) { - printf("Hello, Redox!\\n"); -} -""" - -[[files]] -path = "/home/user/test.cpp" -data = """ -#include - -int main() -{ - std::cout << "Hello, Redox!" << std::endl; -} -""" - -[[files]] -path = "/home/user/test.py" -data = """ -print("Hello, Redox!") -""" - -[[files]] -path = "/home/user/test.lua" -data = """ -print("Hello, Redox!") -""" +hello-redox = {} diff --git a/config/i686/tests.toml b/config/i686/tests.toml new file mode 100644 index 000000000..9af06ab91 --- /dev/null +++ b/config/i686/tests.toml @@ -0,0 +1,14 @@ +# Configuration for testing + +include = ["../tests.toml"] + +# Override the default settings here + +# General settings +[general] +# Filesystem size in MiB +# filesystem_size = 10000 + +# Package settings +[packages] +# example = {} diff --git a/config/net.toml b/config/net.toml index a6a472e37..87497b760 100644 --- a/config/net.toml +++ b/config/net.toml @@ -5,6 +5,7 @@ include = ["base.toml"] # Package settings [packages] +netdb = {} netutils = {} ## Network init diff --git a/config/riscv64gc/tests.toml b/config/riscv64gc/tests.toml new file mode 100644 index 000000000..9af06ab91 --- /dev/null +++ b/config/riscv64gc/tests.toml @@ -0,0 +1,14 @@ +# Configuration for testing + +include = ["../tests.toml"] + +# Override the default settings here + +# General settings +[general] +# Filesystem size in MiB +# filesystem_size = 10000 + +# Package settings +[packages] +# example = {} diff --git a/config/server.toml b/config/server.toml index e5dd11790..d4ead4413 100644 --- a/config/server.toml +++ b/config/server.toml @@ -21,10 +21,8 @@ git = {} installer = {} ion = {} kibi = {} -netdb = {} pkgutils = {} redoxfs = {} -resist = {} [[files]] path = "/usr/lib/init.d/30_console" diff --git a/config/tests.toml b/config/tests.toml new file mode 100644 index 000000000..f47a0c72f --- /dev/null +++ b/config/tests.toml @@ -0,0 +1,22 @@ +# Configuration for testing + +include = ["server.toml"] + +# General settings +[general] +# Filesystem size in MiB +filesystem_size = 10000 +# Do not prompt if settings are not defined +prompt = false + +# Package settings +[packages] +acid = {} +resist = {} +relibc-tests = {} +os-test = {} +openposixtestsuite = {} +redox-posix-tests = {} +vttest = {} +benchmarks = {} +hello-redox = {} diff --git a/config/x11.toml b/config/x11.toml index 0fab62709..6731a0532 100644 --- a/config/x11.toml +++ b/config/x11.toml @@ -12,6 +12,7 @@ filesystem_size = 2048 # Package settings [packages] gtk3 = {} +htop = {} libnettle = {} llvm18 = {} mesa-x11 = {} diff --git a/config/x86_64/ci.toml b/config/x86_64/ci.toml index a1d61ca86..ad4d8792f 100644 --- a/config/x86_64/ci.toml +++ b/config/x86_64/ci.toml @@ -27,6 +27,7 @@ base-initfs = {} bash = {} binutils = {} bootloader = {} +bottom = {} bzip2 = {} ca-certificates = {} cairo = {} @@ -87,6 +88,7 @@ gnu-make = {} #harfbuzz = {} # depends on glib which does not build #hematite = {} # needs crate patches for redox-unix hicolor-icon-theme = {} +htop = {} installer = {} installer-gui = {} intel-one-mono = {} diff --git a/config/x86_64/demo.toml b/config/x86_64/demo.toml index f951724c4..80d222a9a 100644 --- a/config/x86_64/demo.toml +++ b/config/x86_64/demo.toml @@ -16,9 +16,11 @@ periodictable = {} intel-one-mono = {} # Shell Apps +bottom = {} curl = {} git = {} gnu-grep = {} +htop = {} ripgrep = {} sodium = {} terminfo = {} diff --git a/config/x86_64/server-demo.toml b/config/x86_64/server-demo.toml index 42d7c5bff..53c3d1773 100644 --- a/config/x86_64/server-demo.toml +++ b/config/x86_64/server-demo.toml @@ -12,6 +12,7 @@ filesystem_size = 4096 # Daemons openssh = {} nginx = {} +rustysd = {} # Backends php84 = {} @@ -28,11 +29,84 @@ rsync = {} vim = {} sqlite3 = {} # tmux = {} -# htop = {} +htop = {} # Content website = {} + +[[files]] +# Undocumented usage of rsdctl, pointing to notifications dir +path = "/usr/lib/init.d/19_rustyd" +data = """ +export RSDCTL_ADDR /var/run/rustysd/control.socket +""" + +[[files]] +path = "/usr/lib/init.d/98_keygen_sh" +data = """ +bash /root/keygen.sh +""" + +[[files]] +path = "/usr/lib/init.d/99_rustysd" +data = """ +rustysd --conf /etc/rustysd +""" + +[[files]] +path = "/etc/rustysd/system/network-online.target" +data = """ +[Unit] +Description=The target after networks has online + +[Install] +WantedBy=default.target +""" + +[[files]] +path = "/etc/rustysd/system/multi-user.target" +data = """ +[Unit] +Description=The target after user administrations has online + +[Install] +WantedBy=default.target +""" + +[[files]] +path = "/etc/rustysd/system/nginx.service" +data = """ +[Unit] +Description=The nginx HTTP and reverse proxy server +After=network-online.target + +[Service] +Type=notify +ExecStart=/usr/bin/nginx +TimeoutStopSec=5 + +[Install] +WantedBy=multi-user.target +""" + + +[[files]] +path = "/etc/rustysd/system/ssh.service" +data = """ +[Unit] +Description=OpenBSD Secure Shell server +After=network-online.target + +[Service] +Type=notify +ExecStart=/usr/bin/sshd +TimeoutStopSec=5 + +[Install] +WantedBy=multi-user.target +""" + [[files]] path = "/home/user/public_html/index.php" data = """ @@ -169,6 +243,19 @@ shell = "/usr/bin/ion" #TODO: nologin? password = "" shell = "/usr/bin/ion" #TODO: nologin? +[[files]] +path = "/root/keygen.sh" +data = """ +#!/usr/bin/env bash + +if [ ! -f /etc/ssh/ssh_host_dsa_key ]; then +ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key -N "" +ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key -N "" +ssh-keygen -t ed25519 -f /etc/ssh/ssh_host_ed25519_key -N "" +ssh-keygen -t ecdsa -f /etc/ssh/ssh_host_ecdsa_key -N "" +fi +""" + [[files]] path = "/home/user/server.sh" data = """ @@ -194,6 +281,9 @@ data = """ # To start the daemon, run # > sudo bash server.sh # +# A WIP port of rustysd is available, you can try start it manually +# > sudo rustysd --conf /etc/rustysd +# # The server will start port 22 (ssh), 80 (static web) and 8080 (php) ############################################################################## """ diff --git a/config/x86_64/tests.toml b/config/x86_64/tests.toml new file mode 100644 index 000000000..9af06ab91 --- /dev/null +++ b/config/x86_64/tests.toml @@ -0,0 +1,14 @@ +# Configuration for testing + +include = ["../tests.toml"] + +# Override the default settings here + +# General settings +[general] +# Filesystem size in MiB +# filesystem_size = 10000 + +# Package settings +[packages] +# example = {} diff --git a/cookbook b/cookbook index ae06273f8..8851a304e 160000 --- a/cookbook +++ b/cookbook @@ -1 +1 @@ -Subproject commit ae06273f81ac0eb488c8b8b5d85f5deb38df72cc +Subproject commit 8851a304e6710b953b4974bd714fdce4411e2e50 diff --git a/mk/ci.mk b/mk/ci.mk index 0eed1f6dc..89ee4ca33 100644 --- a/mk/ci.mk +++ b/mk/ci.mk @@ -46,10 +46,10 @@ else "prefix/$(TARGET)/gcc-install.tar.gz" \ "prefix/$(TARGET)/relibc-install.tar.gz" \ "prefix/$(TARGET)/rust-install.tar.gz" - rm -rf "build/toolchain/$(TARGET)" - mkdir -p "build/toolchain/$(TARGET)" - cp "prefix/$(TARGET)/gcc-install.tar.gz" "build/toolchain/$(TARGET)/gcc-install.tar.gz" - cp "prefix/$(TARGET)/relibc-install.tar.gz" "build/toolchain/$(TARGET)/relibc-install.tar.gz" - cp "prefix/$(TARGET)/rust-install.tar.gz" "build/toolchain/$(TARGET)/rust-install.tar.gz" - cd "build/toolchain/$(TARGET)" && sha256sum -b * > SHA256SUM + rm -rf "build/toolchain/$(HOST_TARGET)/$(TARGET)" + mkdir -p "build/toolchain/$(HOST_TARGET)/$(TARGET)" + cp "prefix/$(TARGET)/gcc-install.tar.gz" "build/toolchain/$(HOST_TARGET)/$(TARGET)/gcc-install.tar.gz" + cp "prefix/$(TARGET)/relibc-install.tar.gz" "build/toolchain/$(HOST_TARGET)/$(TARGET)/relibc-install.tar.gz" + cp "prefix/$(TARGET)/rust-install.tar.gz" "build/toolchain/$(HOST_TARGET)/$(TARGET)/rust-install.tar.gz" + cd "build/toolchain/$(HOST_TARGET)/$(TARGET)" && sha256sum -b * > SHA256SUM endif diff --git a/mk/config.mk b/mk/config.mk index a4e2db051..38f10bc83 100644 --- a/mk/config.mk +++ b/mk/config.mk @@ -46,12 +46,19 @@ CONTAINERFILE?=podman/redox-base-containerfile export NPROC=nproc export REDOX_MAKE=make -ifneq ($(PODMAN_BUILD),1) HOST_TARGET := $(shell env -u RUSTUP_TOOLCHAIN rustc -vV | grep host | cut -d: -f2 | tr -d " ") +# x86_64 linux hosts have all toolchains ifneq ($(HOST_TARGET),x86_64-unknown-linux-gnu) - $(info The binary prefix is only built for x86_64 Linux hosts) - PREFIX_BINARY=0 -endif + ifeq ($(ARCH),aarch64) + # aarch64 linux hosts have aarch64 toolchain + ifneq ($(HOST_TARGET),aarch64-unknown-linux-gnu) + $(info The $(ARCH) binary prefix is only built for x86_64 and aarch64 Linux hosts) + PREFIX_BINARY=0 + endif + else + $(info The $(ARCH) binary prefix is only built for x86_64 Linux hosts) + PREFIX_BINARY=0 + endif endif ifeq ($(SCCACHE_BUILD),1) diff --git a/mk/disk.mk b/mk/disk.mk index 268c7809c..7cbae0d9e 100644 --- a/mk/disk.mk +++ b/mk/disk.mk @@ -58,6 +58,12 @@ mount_extra: $(HOST_FSTOOLS) FORCE sleep 2 pgrep redoxfs +mount_live: $(HOST_FSTOOLS) FORCE + mkdir -p $(MOUNT_DIR) + $(REDOXFS) $(BUILD)/redox-live.iso $(MOUNT_DIR) + sleep 2 + pgrep redoxfs + unmount: FORCE sync -$(FUMOUNT) $(MOUNT_DIR) || true diff --git a/mk/fstools.mk b/mk/fstools.mk index 125b8cbf7..3781d26e8 100644 --- a/mk/fstools.mk +++ b/mk/fstools.mk @@ -1,6 +1,6 @@ # Configuration file for redox-installer, Cookbook and RedoxFS FUSE -fstools: $(FSTOOLS_TAG) +fstools: $(FSTOOLS_TAG) $(HOST_FSTOOLS) # These tools run inside Podman if it is used, or on the host if Podman is not used $(FSTOOLS_TAG): cookbook installer $(CONTAINER_TAG) diff --git a/mk/prefix.mk b/mk/prefix.mk index c0e790e8f..f00f7d31c 100644 --- a/mk/prefix.mk +++ b/mk/prefix.mk @@ -176,7 +176,7 @@ else ifeq ($(PREFIX_BINARY),1) $(PREFIX)/rust-install.tar.gz: mkdir -p "$(@D)" #TODO: figure out why rust-install.tar.gz is missing /lib/rustlib/$(HOST_TARGET)/lib - wget -O $@.partial "https://static.redox-os.org/toolchain/$(TARGET)/relibc-install.tar.gz" + wget -O $@.partial "https://static.redox-os.org/toolchain/$(HOST_TARGET)/$(TARGET)/relibc-install.tar.gz" mv $@.partial $@ $(PREFIX)/rust-install: $(PREFIX)/rust-install.tar.gz diff --git a/podman/redox-base-containerfile b/podman/redox-base-containerfile index 682dd7c40..2eef72761 100644 --- a/podman/redox-base-containerfile +++ b/podman/redox-base-containerfile @@ -1,6 +1,6 @@ # Configuration file to install the recipe dependencies inside the Podman container -FROM debian:trixie +FROM docker.io/library/debian:trixie # _UID_ must be replaced with the user's uid on host # podman root is mapped to your user id on host during build, @@ -36,7 +36,6 @@ RUN useradd --create-home --no-log-init --uid _UID_ poduser \ gtk-doc-tools \ help2man \ intltool \ - libc6-dev-i386 \ libexpat-dev \ libfontconfig1-dev \ libfuse3-dev \ @@ -72,7 +71,6 @@ RUN useradd --create-home --no-log-init --uid _UID_ poduser \ ruby \ scons \ ssh \ - syslinux-utils \ texinfo \ unifdef \ unzip \ @@ -84,4 +82,9 @@ RUN useradd --create-home --no-log-init --uid _UID_ poduser \ xxd \ zip \ zlib1g-dev \ - zstd + zstd \ + && if [ "$(uname -m)" = "x86_64" ]; then \ + apt-get install -y --no-install-recommends \ + libc6-dev-i386 \ + syslinux-utils \ + ; fi diff --git a/podman_bootstrap.sh b/podman_bootstrap.sh old mode 100755 new mode 100644 index 55b689f42..2cfc492a4 --- a/podman_bootstrap.sh +++ b/podman_bootstrap.sh @@ -280,7 +280,7 @@ fedora() fi # Use rpm -q to check if it's already installed - PKGS=$(for pkg in podman curl make fuse3 fuse-overlayfs slirp4netns gdb; do rpm -q $pkg > /dev/null || echo $pkg; done) + PKGS=$(for pkg in podman curl make fuse3 fuse3-devel fuse-overlayfs slirp4netns gdb; do rpm -q $pkg > /dev/null || echo $pkg; done) # If the list of packages is not empty, install missing COUNT=$(echo $PKGS | wc -w) if [ $COUNT -ne 0 ]; then diff --git a/relibc b/relibc index 7ed934a01..56386f1e2 160000 --- a/relibc +++ b/relibc @@ -1 +1 @@ -Subproject commit 7ed934a01d2ac8ab603b6dc24e918d8197192068 +Subproject commit 56386f1e260a95eedd7448cded44cbbcc207cbb7 diff --git a/scripts/dual-boot.sh b/scripts/dual-boot.sh index dbbd6ed8d..f189693aa 100755 --- a/scripts/dual-boot.sh +++ b/scripts/dual-boot.sh @@ -20,16 +20,17 @@ fi if [ -z "${ARCH}" ] then - export ARCH=x86_64 + export ARCH="$(uname -m)" fi if [ -z "${CONFIG_NAME}" ] then - export CONFIG_NAME=demo + export CONFIG_NAME=desktop fi IMAGE="build/${ARCH}/${CONFIG_NAME}/filesystem.img" set -x +rm -f "${IMAGE}" make "${IMAGE}" sudo popsicle "${IMAGE}" "${DISK}" set +x