shit
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
# <file system> <dir> <type> <options> <dump> <pass>
|
||||
proc /proc proc nosuid,noexec,nodev 0 0
|
||||
sysfs /sys sysfs nosuid,noexec,nodev 0 0
|
||||
devtmpfs /dev devtmpfs nosuid 0 0
|
||||
devpts /dev/pts devpts gid=5,mode=620 0 0
|
||||
tmpfs /run tmpfs nosuid,nodev 0 0
|
||||
tmpfs /dev/shm tmpfs nosuid,nodev 0 0
|
||||
@@ -0,0 +1,12 @@
|
||||
root:x:0:
|
||||
tty:x:5:user
|
||||
disk:x:6:
|
||||
kmem:x:9:
|
||||
wheel:x:10:user
|
||||
kvm:x:24:user
|
||||
video:x:27:user
|
||||
input:x:28:user
|
||||
seat:x:29:user
|
||||
render:x:30:user
|
||||
nobody:x:65534:
|
||||
user:x:1000:
|
||||
@@ -0,0 +1 @@
|
||||
orchid
|
||||
@@ -0,0 +1,3 @@
|
||||
/lib
|
||||
/usr/lib
|
||||
/usr/lib64
|
||||
@@ -0,0 +1,5 @@
|
||||
NAME="Orchid"
|
||||
PRETTY_NAME="Orchid Linux"
|
||||
ID=orchid
|
||||
ANSI_COLOR="0;35"
|
||||
HOME_URL="https://example.invalid/"
|
||||
@@ -0,0 +1,3 @@
|
||||
root:x:0:0:root:/root:/bin/bash
|
||||
user:x:1000:1000:Orchid User:/home/user:/bin/bash
|
||||
nobody:x:65534:65534:Nobody:/:/usr/bin/nologin
|
||||
@@ -0,0 +1,9 @@
|
||||
# System-wide shell profile (POSIX sh / bash login shells).
|
||||
export PATH=/usr/local/bin:/usr/bin:/bin
|
||||
export PAGER=less
|
||||
umask 022
|
||||
|
||||
for _f in /etc/profile.d/*.sh; do
|
||||
[ -r "$_f" ] && . "$_f"
|
||||
done
|
||||
unset _f
|
||||
@@ -0,0 +1,12 @@
|
||||
# Launch Weston automatically after autologin on the first VT.
|
||||
# seatd (running as a service) grants access to DRM/input devices, and
|
||||
# XDG_RUNTIME_DIR is created here since there is no logind to do it.
|
||||
if [ "$(tty)" = "/dev/tty1" ] && [ -z "${WAYLAND_DISPLAY:-}" ] && [ -z "${DISPLAY:-}" ]; then
|
||||
export XDG_RUNTIME_DIR="/run/user/$(id -u)"
|
||||
if [ ! -d "$XDG_RUNTIME_DIR" ]; then
|
||||
mkdir -p "$XDG_RUNTIME_DIR"
|
||||
fi
|
||||
chmod 0700 "$XDG_RUNTIME_DIR"
|
||||
export XDG_SESSION_TYPE=wayland
|
||||
exec weston
|
||||
fi
|
||||
@@ -0,0 +1,3 @@
|
||||
root:!:19700:0:99999:7:::
|
||||
user::19700:0:99999:7:::
|
||||
nobody:!:19700:0:99999:7:::
|
||||
@@ -0,0 +1,16 @@
|
||||
[core]
|
||||
idle-time=0
|
||||
require-input=false
|
||||
xwayland=false
|
||||
|
||||
[shell]
|
||||
background-color=0xff1e1e2e
|
||||
panel-position=top
|
||||
locking=false
|
||||
|
||||
[keyboard]
|
||||
keymap_layout=us
|
||||
|
||||
[terminal]
|
||||
font=DejaVu Sans Mono
|
||||
font-size=14
|
||||
@@ -0,0 +1,41 @@
|
||||
version = "0.1"
|
||||
revision = 1
|
||||
description = "Base filesystem layout, accounts and system configuration"
|
||||
license = "MIT"
|
||||
url = "https://example.invalid/"
|
||||
# Config-only package: no upstream source, just static files + an install phase.
|
||||
# Install the full target set (`orchid install <dest>`) to get a bootable system;
|
||||
# this package supplies the glue (accounts, fstab, /sbin/init, weston.ini).
|
||||
host_deps = []
|
||||
# bash provides the system shell; base-files points /usr/bin/sh at it.
|
||||
deps = ["bash"]
|
||||
|
||||
|
||||
def install(self):
|
||||
d = self.dest_dir
|
||||
self.run(
|
||||
"sh",
|
||||
"-c",
|
||||
"set -e; "
|
||||
f"install -d -m0755 '{d}/etc' '{d}/etc/profile.d' '{d}/etc/xdg/weston' "
|
||||
f"'{d}/etc/udev/rules.d' '{d}/sbin' '{d}/usr/bin' '{d}/root' '{d}/home/user' "
|
||||
f"'{d}/run' '{d}/var' '{d}/proc' '{d}/sys' '{d}/dev'; "
|
||||
# POSIX shell for #!/bin/sh scripts (dinit services, etc.).
|
||||
f"ln -sf bash '{d}/usr/bin/sh'; "
|
||||
# Static config tree from files/.
|
||||
f"cp -rp '{self.files}/etc/.' '{d}/etc/'; "
|
||||
# dinit as PID 1 (boot with kernel cmdline init=/sbin/init).
|
||||
f"ln -sf /usr/bin/dinit '{d}/sbin/init'; "
|
||||
# Conventional compat symlinks: the ELF interpreter is /lib64/ld-linux,
|
||||
# but glibc lives in /lib; programs/shells live in /usr/bin.
|
||||
f"ln -sf lib '{d}/lib64'; "
|
||||
f"ln -sf usr/bin '{d}/bin'; "
|
||||
# /var/run -> /run (dinit binds its control socket at /var/run/dinitctl).
|
||||
f"ln -sf /run '{d}/var/run'; "
|
||||
# Ownership + sensitive perms.
|
||||
f"chown -R 0:0 '{d}/etc' '{d}/root'; "
|
||||
f"chmod 0600 '{d}/etc/shadow'; "
|
||||
f"chmod 0700 '{d}/root'; "
|
||||
f"chown -R 1000:1000 '{d}/home/user'; "
|
||||
f"chmod 0755 '{d}/home/user'",
|
||||
)
|
||||
Reference in New Issue
Block a user