A small selection of OpenBSD userland utilities ported to Linux.
Currently included: cat, echo, pwd, md5, mkdir.
The quickest way to build is to run everything inside a throwaway Docker container, mounting the project at /playground.
-
Clone the repo and move to the project's parent directory:
git clone [email protected]:tutorin-tech/playground.git cd playground -
Start an Ubuntu container with the project mounted:
docker run --rm -it -v ".:/playground" ubuntu:24.04 bash -
Inside the container, install dependencies and build:
# as root apt update apt install -y build-essential cmake pkg-config libmd-dev # as ubuntu user su ubuntu cd /playground mkdir -p build cd build cmake .. cmake --build .
To make sure everything works as expected, you can run the included tests for each utility.
-
Install shUnit2 (if not already installed):
apt install shunit2
-
Run the tests for a specific command (for example,
echo):sh bin/echo/test.sh
Each utility has its own test.sh script in its directory. If all tests pass, you'll see a summary with "OK". If something fails, the output will help you track down the issue.
Clear, consistent commit messages make reviews easy and the history useful. Please follow these rules.
- Separate upstream imports from local changes.
- Batch mechanical edits of the same kind across files under a single
treewide:commit.
-
Format:
<scope>: <imperative verb ...>where
<scope>is the smallest meaningful area:cat,echo,pwd,md5. -
Keep it less or equal 72 chars, no trailing period, use present imperative ("add", "fix", "guard", "link").
Good examples
Import cat from OpenBSD 7.7cat: do not use OpenBSD-specific pledge syscall
Avoid
fix stuffupdatelinux changesported md5 and misc tweaks(split into separate commits)