From d3f3ccbb11a9b027d9e722ee9bcff9a9455a69c9 Mon Sep 17 00:00:00 2001 From: Matheus Date: Wed, 28 Aug 2024 21:49:08 -0300 Subject: [PATCH] distro-files: small rework add files to /etc/skel and /home/astral, move DOOM1.WAD and id1 to /usr/share/games folders and create symlinks to them in the recipe --- distro-files/etc/group | 2 +- distro-files/etc/rc | 4 ++++ distro-files/etc/skel/.Xdefaults | 2 ++ distro-files/etc/skel/.curlrc | 1 + distro-files/etc/skel/hello.asm | 13 +++++++++++++ distro-files/etc/skel/hello.c | 5 +++++ distro-files/etc/skel/hello.cpp | 6 ++++++ distro-files/etc/skel/hello.sh | 1 + distro-files/home/astral/.Xdefaults | 2 ++ distro-files/home/astral/.curlrc | 1 + distro-files/home/astral/hello.asm | 13 +++++++++++++ distro-files/home/astral/hello.c | 5 +++++ distro-files/home/astral/hello.cpp | 6 ++++++ distro-files/home/astral/hello.sh | 1 + .../{root => usr/share/games/doom}/DOOM1.WAD | Bin .../share/games/quake}/id1/pak0.pak | Bin recipes/distro-files | 16 ++++++++++++++++ recipes/xorg-server | 1 - 18 files changed, 77 insertions(+), 2 deletions(-) create mode 100644 distro-files/etc/skel/.Xdefaults create mode 100644 distro-files/etc/skel/.curlrc create mode 100644 distro-files/etc/skel/hello.asm create mode 100644 distro-files/etc/skel/hello.c create mode 100644 distro-files/etc/skel/hello.cpp create mode 100644 distro-files/etc/skel/hello.sh create mode 100644 distro-files/home/astral/.Xdefaults create mode 100644 distro-files/home/astral/.curlrc create mode 100644 distro-files/home/astral/hello.asm create mode 100644 distro-files/home/astral/hello.c create mode 100644 distro-files/home/astral/hello.cpp create mode 100644 distro-files/home/astral/hello.sh rename distro-files/{root => usr/share/games/doom}/DOOM1.WAD (100%) rename distro-files/{root => usr/share/games/quake}/id1/pak0.pak (100%) diff --git a/distro-files/etc/group b/distro-files/etc/group index 6a8f2d1b..1612d333 100644 --- a/distro-files/etc/group +++ b/distro-files/etc/group @@ -1,4 +1,4 @@ root::0:root sshd::100:sshd unknown::999:unknown -astral::999:astral +astral::1000:astral diff --git a/distro-files/etc/rc b/distro-files/etc/rc index 358fc1bd..9763373e 100644 --- a/distro-files/etc/rc +++ b/distro-files/etc/rc @@ -12,3 +12,7 @@ mount /tmp tmpfs chmod 1777 /tmp chmod 0755 /dev/pts + +# required to be owned by root and sticky for rootless Xorg. +mkdir -p /tmp/.X11-unix +chmod 1777 /tmp/.X11-unix diff --git a/distro-files/etc/skel/.Xdefaults b/distro-files/etc/skel/.Xdefaults new file mode 100644 index 00000000..c7562ee9 --- /dev/null +++ b/distro-files/etc/skel/.Xdefaults @@ -0,0 +1,2 @@ +xterm*background: black +xterm*foreground: white diff --git a/distro-files/etc/skel/.curlrc b/distro-files/etc/skel/.curlrc new file mode 100644 index 00000000..c12f51a7 --- /dev/null +++ b/distro-files/etc/skel/.curlrc @@ -0,0 +1 @@ +--ipv4 diff --git a/distro-files/etc/skel/hello.asm b/distro-files/etc/skel/hello.asm new file mode 100644 index 00000000..f086e676 --- /dev/null +++ b/distro-files/etc/skel/hello.asm @@ -0,0 +1,13 @@ +section .text +global _start +_start: + mov rax, 7 + mov rdi, 1 + mov rsi, msg + mov rdx, 14 + syscall + mov rax, 13 + xor rdi, rdi + syscall +section .data +msg: db "Hello, world!", 0xA diff --git a/distro-files/etc/skel/hello.c b/distro-files/etc/skel/hello.c new file mode 100644 index 00000000..ee60af46 --- /dev/null +++ b/distro-files/etc/skel/hello.c @@ -0,0 +1,5 @@ +#include + +int main(){ + printf("Hello, world!\n"); +} diff --git a/distro-files/etc/skel/hello.cpp b/distro-files/etc/skel/hello.cpp new file mode 100644 index 00000000..d002ccca --- /dev/null +++ b/distro-files/etc/skel/hello.cpp @@ -0,0 +1,6 @@ +#include + +int main(){ + std::cout << "Hello, world!" << std::endl; + return 0; +} diff --git a/distro-files/etc/skel/hello.sh b/distro-files/etc/skel/hello.sh new file mode 100644 index 00000000..8fbf7fa4 --- /dev/null +++ b/distro-files/etc/skel/hello.sh @@ -0,0 +1 @@ +echo Hello, World! diff --git a/distro-files/home/astral/.Xdefaults b/distro-files/home/astral/.Xdefaults new file mode 100644 index 00000000..c7562ee9 --- /dev/null +++ b/distro-files/home/astral/.Xdefaults @@ -0,0 +1,2 @@ +xterm*background: black +xterm*foreground: white diff --git a/distro-files/home/astral/.curlrc b/distro-files/home/astral/.curlrc new file mode 100644 index 00000000..c12f51a7 --- /dev/null +++ b/distro-files/home/astral/.curlrc @@ -0,0 +1 @@ +--ipv4 diff --git a/distro-files/home/astral/hello.asm b/distro-files/home/astral/hello.asm new file mode 100644 index 00000000..f086e676 --- /dev/null +++ b/distro-files/home/astral/hello.asm @@ -0,0 +1,13 @@ +section .text +global _start +_start: + mov rax, 7 + mov rdi, 1 + mov rsi, msg + mov rdx, 14 + syscall + mov rax, 13 + xor rdi, rdi + syscall +section .data +msg: db "Hello, world!", 0xA diff --git a/distro-files/home/astral/hello.c b/distro-files/home/astral/hello.c new file mode 100644 index 00000000..ee60af46 --- /dev/null +++ b/distro-files/home/astral/hello.c @@ -0,0 +1,5 @@ +#include + +int main(){ + printf("Hello, world!\n"); +} diff --git a/distro-files/home/astral/hello.cpp b/distro-files/home/astral/hello.cpp new file mode 100644 index 00000000..d002ccca --- /dev/null +++ b/distro-files/home/astral/hello.cpp @@ -0,0 +1,6 @@ +#include + +int main(){ + std::cout << "Hello, world!" << std::endl; + return 0; +} diff --git a/distro-files/home/astral/hello.sh b/distro-files/home/astral/hello.sh new file mode 100644 index 00000000..8fbf7fa4 --- /dev/null +++ b/distro-files/home/astral/hello.sh @@ -0,0 +1 @@ +echo Hello, World! diff --git a/distro-files/root/DOOM1.WAD b/distro-files/usr/share/games/doom/DOOM1.WAD similarity index 100% rename from distro-files/root/DOOM1.WAD rename to distro-files/usr/share/games/doom/DOOM1.WAD diff --git a/distro-files/root/id1/pak0.pak b/distro-files/usr/share/games/quake/id1/pak0.pak similarity index 100% rename from distro-files/root/id1/pak0.pak rename to distro-files/usr/share/games/quake/id1/pak0.pak diff --git a/recipes/distro-files b/recipes/distro-files index 9481fe26..f7d977ee 100644 --- a/recipes/distro-files +++ b/recipes/distro-files @@ -5,5 +5,21 @@ from_source=distro-files package() { cp -r ${source_dir}/* ${dest_dir} mkdir -p ${dest_dir}/root/.fvwm + mkdir -p ${dest_dir}/home/astral/.fvwm + mkdir -p ${dest_dir}/etc/skel/.fvwm + + # fvwm background ln -fvs /usr/share/fvwm3/default-config/images/background/bg3.png ${dest_dir}/root/.fvwm/.BGdefault + ln -fvs /usr/share/fvwm3/default-config/images/background/bg3.png ${dest_dir}/home/astral/.fvwm/.BGdefault + ln -fvs /usr/share/fvwm3/default-config/images/background/bg3.png ${dest_dir}/etc/skel/.fvwm/.BGdefault + + # quake files + ln -fvs /usr/share/games/quake/id1 ${dest_dir}/root/id1 + ln -fvs /usr/share/games/quake/id1 ${dest_dir}/home/astral/id1 + ln -fvs /usr/share/games/quake/id1 ${dest_dir}/etc/skel + + # doom files + ln -fvs /usr/share/games/doom/DOOM1.WAD ${dest_dir}/root/DOOM1.WAD + ln -fvs /usr/share/games/doom/DOOM1.WAD ${dest_dir}/home/astral/DOOM1.WAD + ln -fvs /usr/share/games/doom/DOOM1.WAD ${dest_dir}/etc/skel/DOOM1.WAD } diff --git a/recipes/xorg-server b/recipes/xorg-server index 92e82d42..78dab161 100644 --- a/recipes/xorg-server +++ b/recipes/xorg-server @@ -8,7 +8,6 @@ deps="mlibc libxcvt pixman xorgproto xtrans xkbfile libxfont2 fontutil libgcrypt build() { ${source_dir}/configure --prefix=${prefix} --host=x86_64-astral --disable-pciaccess --disable-libdrm --disable-glx --disable-int10-module --disable-glamor --disable-vgahw --disable-dri3 --disable-dri2 --disable-dri --disable-xephyr --disable-xwayland --disable-xnest --disable-dmx --with-fontrootdir=${prefix}/share/fonts/X11 make -j${parallelism} - } package() {