aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--al.getcryst.crystal/README.md3
-rw-r--r--al.getcryst.crystal/al.getcryst.crystal.yml54
-rw-r--r--al.getcryst.crystal/crystal.desktop10
-rw-r--r--al.getcryst.crystal/crystal.sh23
4 files changed, 90 insertions, 0 deletions
diff --git a/al.getcryst.crystal/README.md b/al.getcryst.crystal/README.md
new file mode 100644
index 0000000..03c6058
--- /dev/null
+++ b/al.getcryst.crystal/README.md
@@ -0,0 +1,3 @@
+# [Crystal Linux](https://getcryst.al)
+
+It's a crystal proot, works very well, heavily based on https://github.com/flathub/io.github.paledega.alpine-rootfs
diff --git a/al.getcryst.crystal/al.getcryst.crystal.yml b/al.getcryst.crystal/al.getcryst.crystal.yml
new file mode 100644
index 0000000..3ce9348
--- /dev/null
+++ b/al.getcryst.crystal/al.getcryst.crystal.yml
@@ -0,0 +1,54 @@
+app-id: al.getcryst.crystal
+runtime: org.freedesktop.Platform
+runtime-version: '22.08'
+sdk: org.freedesktop.Sdk
+command: crystal
+
+finish-args:
+ - --socket=fallback-x11
+ - --socket=wayland
+ - --share=network
+ - --share=ipc
+ - --device=dri
+ - --socket=pulseaudio
+ - --allow=devel
+
+modules:
+ - name: talloc
+ buildsystem: autotools
+ sources:
+ - type: archive
+ url: https://www.samba.org/ftp/talloc/talloc-2.3.4.tar.gz
+ sha256: 179f9ebe265e67e4ab2c26cad2b7de4b6a77c6c212f966903382869f06be6505
+
+ - name: proot
+ buildsystem: simple
+ build-commands:
+ - mv uthash/src/* src
+ - make -C src proot
+ - install -d /app/lib
+ - install -Dm755 src/proot -t /app/bin
+ sources:
+ - type: archive
+ url: https://github.com/troydhanson/uthash/archive/refs/tags/v2.3.0.tar.gz
+ sha256: e10382ab75518bad8319eb922ad04f907cb20cccb451a3aa980c9d005e661acc
+ dest: uthash
+ - type: git
+ url: https://github.com/termux/proot
+ commit: 5c462a6ecfddd629b1439f38fbb61216d6fcb359
+
+ - name: crystal
+ buildsystem: simple
+ sources:
+ - type: file
+ path: ./crystal.sh
+ - type: file
+ path: ./crystal.desktop
+ - type: file
+ url: https://github.com/crystal-linux/iso/releases/download/09-13-22-16-25/crystal-rootfs-09-13-22-16-25-x86_64.tar.gz
+ sha256: 487ddb1df4457adbb3df1b34490ca1000eaa15206d6684a513a2306598d91d00
+ build-commands:
+ - install -Dm755 crystal.sh /app/bin/crystal
+ - install -Dm755 crystal.desktop /app/share/applications/al.getcryst.crystal
+ - install -Dm755 crystal-rootfs-*.tar.gz /app/crystal.tar.gz
+
diff --git a/al.getcryst.crystal/crystal.desktop b/al.getcryst.crystal/crystal.desktop
new file mode 100644
index 0000000..e9040c9
--- /dev/null
+++ b/al.getcryst.crystal/crystal.desktop
@@ -0,0 +1,10 @@
+ktop Entry]
+Type=Application
+Version=1.0
+Name=Crystal
+GenericName=Crystal Linux
+Comment=Crystal Linux proot
+Exec=crystal
+Icon=al.getcryst.crystal
+Terminal=true
+Categories=System;
diff --git a/al.getcryst.crystal/crystal.sh b/al.getcryst.crystal/crystal.sh
new file mode 100644
index 0000000..39926c3
--- /dev/null
+++ b/al.getcryst.crystal/crystal.sh
@@ -0,0 +1,23 @@
+#!/bin/bash
+mkdir -p ~/.var/app/al.getcryst.crystal/rootfs
+DESTDIR=$(realpath ~/.var/app/al.getcryst.crystal/rootfs)
+if [[ ! -f ${DESTDIR}/etc/os-release ]]; then
+ rm -rf ${DESTDIR} || true
+ mkdir -p ${DESTDIR}/{dev,sys,proc}
+ cd ${DESTDIR}
+ tar --exclude dev --exclude sys --exclude proc -xf /app/crystal.tar.gz
+ chown ${USER} -R ${DESTDIR}/root.x86_64
+ chmod 755 -R ${DESTDIR}/root.x86_64
+ mv ${DESTDIR}/root.x86_64/* ${DESTDIR}
+ rm -rf ${DESTDIR}root.x86_64
+ cat /etc/resolv.conf > ${DESTDIR}/etc/resolv.conf
+ echo "crystal" > ${DESTDIR}/etc/hostname
+fi
+if [[ $1 == "" ]]; then
+ cmd="/bin/bash"
+fi
+exec env -i /app/bin/proot -r ${DESTDIR}/ -w / -0 -b /dev -b /sys -b /proc -b /run /bin/sh -c "
+ export PULSE_SERVER=127.0.0.1
+ export USER=root
+ . /etc/profile
+ exec $cmd $@"