summaryrefslogtreecommitdiff
path: root/repo
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2022-03-02 16:24:16 +0000
committerdavidovski <david@davidovski.xyz>2022-03-02 16:24:16 +0000
commit6b3593e13e688d558be05846d1e2d9acf6e97c71 (patch)
tree6e0cdcd42b5d5aef366ac5d066da856e82c9a649 /repo
parente8213fac46bfcb8068a883cb88b2bb1587f190f9 (diff)
added s6 init
Diffstat (limited to 'repo')
-rw-r--r--repo/system/bootscripts.xibuild23
-rw-r--r--repo/system/cacerts.xibuild2
-rw-r--r--repo/system/coreutils.xibuild20
-rw-r--r--repo/system/elogind.xibuild32
-rw-r--r--repo/system/findutils.xibuild1
-rw-r--r--repo/system/libpng.xibuild4
-rw-r--r--repo/system/s6-linux-init.xibuild26
-rw-r--r--repo/system/s6-linux-utils.xibuild20
-rw-r--r--repo/system/s6-portable-utils.xibuild23
-rw-r--r--repo/system/s6-rc.xibuild25
-rw-r--r--repo/system/s6.xibuild24
-rw-r--r--repo/system/sbase.xibuild36
-rw-r--r--repo/system/sysvinit.xibuild25
-rw-r--r--repo/system/ubase.xibuild25
14 files changed, 222 insertions, 64 deletions
diff --git a/repo/system/bootscripts.xibuild b/repo/system/bootscripts.xibuild
index 6aaa485..72121f9 100644
--- a/repo/system/bootscripts.xibuild
+++ b/repo/system/bootscripts.xibuild
@@ -1,14 +1,13 @@
#!/bin/sh
-MAKEDEPS="make "
-DEPS="sh eudev"
+MAKEDEPS="make s6-linux-init s6-rc"
+DEPS="sh eudev s6 s6-rc s6-linux-utils s6-protable-utils s6-linux-init"
-PKG_VER=20210608
-SOURCE=https://www.linuxfromscratch.org/lfs/downloads/development/lfs-bootscripts-$PKG_VER.tar.xz
-DESC="Bootscripts to initiate the system on boot (from lfs)"
+SOURCE=https://xi.davidovski.xyz/git/bootscripts.git
+DESC="Bootscripts to initiate the system on boot"
package () {
- make DESTDIR=$PKG_DEST install
+ make DESTDIR=$PKG_DEST bootscripts
cat > $PKG_DEST/etc/inittab << "EOF"
# Begin /etc/inittab
@@ -39,5 +38,17 @@ su:S016:once:/sbin/sulogin
# End /etc/inittab
EOF
+ # Compile a basic database for boot
+ s6-rc-compile /etc/s6/db/basic /etc/s6/sv
+ ln -s /etc/s6/db/basic /etc/s6/db/current
+
+ # initialize s6 init base.
+ s6-linux-init-maker -1 -t 2 -L \
+ -f $PKG_DEST/etc/s6linux-init/skel \
+ -p "/usr/bin:/usr/sbin:/bin:/sbin" \
+ -D default \
+ -G "/sbin/agetty -L -8 tty1 115200" \
+ -c $PKG_DEST/etc/s6/base -u root -U utmp $PKG_DEST/etc/s6/base
+
}
diff --git a/repo/system/cacerts.xibuild b/repo/system/cacerts.xibuild
index 320e986..40a37f5 100644
--- a/repo/system/cacerts.xibuild
+++ b/repo/system/cacerts.xibuild
@@ -1,6 +1,6 @@
#!/bin/sh
-MAKEDEPS="coreutils sed"
+MAKEDEPS="sbase sed"
DEPS="libnghttp"
PKG_VER=1.7
diff --git a/repo/system/coreutils.xibuild b/repo/system/coreutils.xibuild
deleted file mode 100644
index 150787b..0000000
--- a/repo/system/coreutils.xibuild
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/sh
-
-MAKEDEPS="make "
-DEPS="musl acl attr gmp"
-
-SOURCE=https://git.suckless.org/sbase
-DESC="sbase from suckless.org"
-
-build () {
- make
-}
-
-package () {
- make PREFIX=/usr DESTDIR=$PKG_DEST install
-
- for p in tar sed; do
- rm $PKG_DEST/usr/bin/$p
- rm $PKG_DEST/usr/share/man/man1/$p.1
- done
-}
diff --git a/repo/system/elogind.xibuild b/repo/system/elogind.xibuild
index 5d69055..9543945 100644
--- a/repo/system/elogind.xibuild
+++ b/repo/system/elogind.xibuild
@@ -1,14 +1,24 @@
#!/bin/sh
-MAKEDEPS="make docbook4-xml docbook-xsl docbook-dtd libxslt"
+MAKEDEPS="make docbook4-xml docbook-xsl docbook-dtd libxslt ubase glib acl m4"
DEPS="pam gperf eudev"
PKG_VER=246.10
SOURCE=https://github.com/elogind/elogind/archive/v$PKG_VER/elogind-$PKG_VER.tar.gz
+ADDITIONAL="
+https://raw.githubusercontent.com/void-linux/void-packages/master/srcpkgs/elogind/patches/id-nobody.patch
+https://raw.githubusercontent.com/void-linux/void-packages/master/srcpkgs/elogind/patches/mips.patch
+https://raw.githubusercontent.com/void-linux/void-packages/master/srcpkgs/elogind/patches/ppc64-bad-tuple.patch
+https://raw.githubusercontent.com/void-linux/void-packages/master/srcpkgs/elogind/patches/ppcle.patch
+"
DESC="The standalone logind daemon"
prepare () {
sed -i '/Disable polkit/,+8 d' meson.build
+
+ for p in *.patch; do
+ patch -Np1 -i $p
+ done
}
build () {
@@ -16,19 +26,23 @@ build () {
cd build &&
# TODO re-enable BUILD_MANS
- meson --prefix=/usr \
- --buildtype=release \
- -Dcgroup-controller=elogind \
- -Ddbuspolicydir=/etc/dbus-1/system.d \
- -DBUILD_MANS=false \
- .. &&
+ meson \
+ -Dcgroup-controller=elogind \
+ -Dhalt-path=/sbin/halt \
+ -Drootlibexecdir=/usr/libexec/elogind \
+ -Dreboot-path=/sbin/reboot \
+ -Ddefault-hierarchy=hybrid \
+ -Ddefault-kill-user-processes=false \
+ -Dpolkit=true \
+ -Dman=true \
+ ..
ninja
}
package () {
DESTDIR=$PKG_DEST ninja install &&
- ln -sfv libelogind.pc $PKG_DEST/usr/lib/pkgconfig/libsystemd.pc &&
- ln -sfvn elogind $PKG_DEST/usr/include/systemd
+ ln -sf libelogind.pc $PKG_DEST/usr/lib/pkgconfig/libsystemd.pc &&
+ ln -sfn elogind $PKG_DEST/usr/include/systemd
sed -e '/\[Login\]/a KillUserProcesses=no' \
diff --git a/repo/system/findutils.xibuild b/repo/system/findutils.xibuild
index fcbadba..6850095 100644
--- a/repo/system/findutils.xibuild
+++ b/repo/system/findutils.xibuild
@@ -12,7 +12,6 @@ build () {
i?86) TIME_T_32_BIT_OK=yes ./configure --prefix=/usr --localstatedir=/var/lib/locate ;;
x86_64) ./configure --prefix=/usr --localstatedir=/var/lib/locate ;;
esac
-
make
}
diff --git a/repo/system/libpng.xibuild b/repo/system/libpng.xibuild
index beba2f9..bd39b4c 100644
--- a/repo/system/libpng.xibuild
+++ b/repo/system/libpng.xibuild
@@ -15,7 +15,7 @@ build () {
package () {
make DESTDIR=$PKG_DEST install
- mkdir -v /usr/share/doc/libpng-$PKG_VER &&
- cp -v README libpng-manual.txt /usr/share/doc/libpng-$PKG_VER
+ mkdir /usr/share/doc/libpng-$PKG_VER &&
+ cp README libpng-manual.txt /usr/share/doc/libpng-$PKG_VER
}
diff --git a/repo/system/s6-linux-init.xibuild b/repo/system/s6-linux-init.xibuild
new file mode 100644
index 0000000..737aed3
--- /dev/null
+++ b/repo/system/s6-linux-init.xibuild
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+MAKEDEPS="make"
+DEPS="s6 skalibs"
+
+PKG_VER=1.0.7.0
+SOURCE=https://skarnet.org/software/s6-linux-init/s6-linux-init-$PKG_VER.tar.gz
+DESC="Small suite of programs for UNIX, designed to allow process supervision"
+
+build () {
+ ./configure --enable-shared \
+ --enable-static \
+ --enable-nsss \
+ --enable-allstatic \
+ --enable-static-libc \
+ --libdir=/usr/lib \
+ --libexecdir=/usr/lib/s6-linux-init \
+ --with-dynlib=/usr/lib \
+ --enable-utmps ${OPARG}
+
+ make
+}
+
+package () {
+ make DESTDIR=$PKG_DEST install
+}
diff --git a/repo/system/s6-linux-utils.xibuild b/repo/system/s6-linux-utils.xibuild
new file mode 100644
index 0000000..8d2d358
--- /dev/null
+++ b/repo/system/s6-linux-utils.xibuild
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+MAKEDEPS="make"
+DEPS="skalibs s6"
+
+PKG_VER=2.11.0.1
+SOURCE=https://skarnet.org/software/s6-linux-utils/s6-linux-utils-2.5.1.7.tar.gz
+DESC="Minimalistic Linux-specific system utilities"
+
+build () {
+ ./configure --disable-allstatic \
+ --prefix=/usr \
+ --with=dynlib=/usr/lib
+
+ make
+}
+
+package () {
+ make DESTDIR=$PKG_DEST install
+}
diff --git a/repo/system/s6-portable-utils.xibuild b/repo/system/s6-portable-utils.xibuild
new file mode 100644
index 0000000..a0e0956
--- /dev/null
+++ b/repo/system/s6-portable-utils.xibuild
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+MAKEDEPS="make"
+DEPS="skalibs s6"
+
+PKG_VER=2.2.3.4
+SOURCE=https://skarnet.org/software/s6-portable-utils/s6-portable-utils-$PKG_VER.tar.gz
+DESC="Tiny portable generic utilities"
+
+build () {
+ ./configure --enable-shared \
+ --enable-static \
+ --enable-allstatic \
+ --enable-static-libc \
+ --libdir=/usr/lib \
+ --libexecdir=/usr/lib/s6-portable-utils \
+ --with-dynlib=/usr/lib
+ make
+}
+
+package () {
+ make DESTDIR=$PKG_DEST install
+}
diff --git a/repo/system/s6-rc.xibuild b/repo/system/s6-rc.xibuild
new file mode 100644
index 0000000..bbda0e8
--- /dev/null
+++ b/repo/system/s6-rc.xibuild
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+MAKEDEPS="make"
+DEPS="skalibs s6"
+
+PKG_VER=0.5.3.0
+SOURCE=https://skarnet.org/software/s6-rc/s6-rc-$PKG_VER.tar.gz
+
+DESC="Service manager of the s6 init system"
+
+build () {
+ ./configure --enable-shared \
+ --enable-static \
+ --enable-allstatic \
+ --enable-static-libc \
+ --libdir=/usr/lib \
+ --libexecdir=/usr/lib/s6-rc \
+ --with-dynlib=/usr/lib
+
+ make
+}
+
+package () {
+ make DESTDIR=$PKG_DEST install
+}
diff --git a/repo/system/s6.xibuild b/repo/system/s6.xibuild
new file mode 100644
index 0000000..66598dc
--- /dev/null
+++ b/repo/system/s6.xibuild
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+MAKEDEPS="make"
+DEPS="skalibs"
+
+PKG_VER=2.11.0.1
+SOURCE=https://skarnet.org/software/s6/s6-$PKG_VER.tar.gz
+DESC="Small suite of programs for UNIX, designed to allow process supervision"
+
+build () {
+ ./configure --enable-shared \
+ --enable-static \
+ --enable-allstatic \
+ --enable-static-libc \
+ --libdir=/usr/lib \
+ --libexecdir=/usr/lib/s6 \
+ --with-dynlib=/usr/lib
+
+ make
+}
+
+package () {
+ make DESTDIR=$PKG_DEST install
+}
diff --git a/repo/system/sbase.xibuild b/repo/system/sbase.xibuild
new file mode 100644
index 0000000..03e8f86
--- /dev/null
+++ b/repo/system/sbase.xibuild
@@ -0,0 +1,36 @@
+#!/bin/sh
+
+MAKEDEPS="make "
+DEPS="musl acl attr gmp"
+
+SOURCE=https://git.suckless.org/sbase
+
+DESC="sbase from suckless.org"
+
+prepare () {
+ # add uname -o since some packages need it
+
+ sed -i "39i case 'o':" uname.c
+ sed -i "40i sflag = 1;" uname.c
+ sed -i "41i break;" uname.c
+}
+
+build () {
+ make
+}
+
+package () {
+ make PREFIX=/usr DESTDIR=$PKG_DEST install
+
+ for p in tar sed find; do
+ rm $PKG_DEST/usr/bin/$p
+ rm $PKG_DEST/usr/share/man/man1/$p.1
+ done
+
+ # quick and dirty realpath replacement
+ realpath=$PKG_DEST/usr/bin/realpath
+
+ echo '#!/bin/bash' > $realpath
+ echo '[[ $1 = /* ]] && echo "$1" || echo "$PWD/${1#./}"' >> $realpath
+ chmod +x $realpath
+}
diff --git a/repo/system/sysvinit.xibuild b/repo/system/sysvinit.xibuild
deleted file mode 100644
index f585b61..0000000
--- a/repo/system/sysvinit.xibuild
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh
-
-MAKEDEPS="make patch"
-DEPS="sh musl"
-
-PKG_VER=3.01
-SOURCE=http://download.savannah.nongnu.org/releases/sysvinit/sysvinit-$PKG_VER.tar.xz
-ADDITIONAL="
- https://www.linuxfromscratch.org/patches/lfs/development/sysvinit-$PKG_VER-consolidated-1.patch
- "
-
-DESC="The sysvinit system for controlling startup, running and shutdown of the system"
-
-
-prepare () {
- patch -Np1 -i sysvinit-$PKG_VER-consolidated-1.patch
-}
-
-build () {
- make
-}
-
-package () {
- make ROOT=$PKG_DEST install
-}
diff --git a/repo/system/ubase.xibuild b/repo/system/ubase.xibuild
new file mode 100644
index 0000000..2e029a7
--- /dev/null
+++ b/repo/system/ubase.xibuild
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+MAKEDEPS="make "
+DEPS="musl"
+
+SOURCE=https://git.suckless.org/ubase
+
+DESC="ubase from suckless.org"
+
+prepare () {
+ /usr/bin/find -type 'f' -name '*.c' | xargs sed -i "s@#include <sys/types.h>@#include <sys/sysmacros.h>@g"
+}
+
+build () {
+ make
+}
+
+package () {
+ make PREFIX=/usr DESTDIR=$PKG_DEST install
+
+ #for p in todo; do
+ # rm $PKG_DEST/usr/bin/$p
+ # rm $PKG_DEST/usr/share/man/man1/$p.1
+ #done
+}