added runit services

This commit is contained in:
emmett1
2022-11-12 23:52:03 +08:00
parent f72376c0e0
commit f9d9f0946c
25 changed files with 62 additions and 215 deletions

View File

@@ -1,2 +1,4 @@
51175f5cd413daf7009a80684c65113d alsa-utils-1.2.8.tar.bz2
265c33bc83a23f509addd4197ac9b13e finish
911d2befcbb52fdd62e79c954c9a537c rc.alsa
5e41af5d750e3f4b85bfe8f01b738669 run

View File

@@ -1,7 +1,11 @@
alsa-utils-1.2.8-1
alsa-utils-1.2.8-2
drwxr-xr-x root/root etc/
drwxr-xr-x root/root etc/rc.d/
-rwxr-xr-x root/root etc/rc.d/alsa
drwxr-xr-x root/root etc/sv/
drwxr-xr-x root/root etc/sv/alsa/
-rwxr-xr-x root/root etc/sv/alsa/finish
-rwxr-xr-x root/root etc/sv/alsa/run
drwxr-xr-x root/root lib/
drwxr-xr-x root/root lib/udev/
drwxr-xr-x root/root lib/udev/rules.d/
@@ -47,8 +51,6 @@ drwxr-xr-x root/root usr/share/man/man1/
-rw-r--r-- root/root usr/share/man/man1/alsactl.1.gz
-rw-r--r-- root/root usr/share/man/man1/alsaloop.1.gz
-rw-r--r-- root/root usr/share/man/man1/alsamixer.1.gz
-rw-r--r-- root/root usr/share/man/man1/alsatplg.1.gz
-rw-r--r-- root/root usr/share/man/man1/alsaucm.1.gz
-rw-r--r-- root/root usr/share/man/man1/amidi.1.gz
-rw-r--r-- root/root usr/share/man/man1/amixer.1.gz
-rw-r--r-- root/root usr/share/man/man1/aplay.1.gz

3
main/alsa-utils/finish Executable file
View File

@@ -0,0 +1,3 @@
#!/bin/sh
set -e
exec alsactl store

4
main/alsa-utils/run Executable file
View File

@@ -0,0 +1,4 @@
#!/bin/sh
set -e
alsactl restore
exec chpst -b alsa pause

View File

@@ -3,9 +3,10 @@
name=alsa-utils
version=1.2.8
release=1
release=2
source="ftp://ftp.alsa-project.org/pub/utils/$name-$version.tar.bz2
rc.alsa"
rc.alsa
run finish"
build() {
cd $name-$version
@@ -19,4 +20,8 @@ build() {
# rc service
install -Dm755 $SRC/rc.alsa $PKG/etc/rc.d/alsa
# runit service
install -Dm755 $SRC/run $PKG/etc/sv/alsa/run
install -Dm755 $SRC/finish $PKG/etc/sv/alsa/finish
}

View File

@@ -1,2 +1,3 @@
e36f0f160751fa7ce103782166852c6b dbus-1.14.4.tar.xz
fe2bdfbce1fc35a1f49b04e03764a8d7 rc.dbus
17ead63418e6d264b578bf7a35edbea9 run

View File

@@ -1,10 +1,13 @@
dbus-1.14.4-1
dbus-1.14.4-2
drwxr-xr-x root/root etc/
drwxr-xr-x root/root etc/dbus-1/
-rw-r--r-- root/root etc/dbus-1/session.conf
-rw-r--r-- root/root etc/dbus-1/system.conf
drwxr-xr-x root/root etc/rc.d/
-rwxr-xr-x root/root etc/rc.d/dbus
drwxr-xr-x root/root etc/sv/
drwxr-xr-x root/root etc/sv/dbus/
-rwxr-xr-x root/root etc/sv/dbus/run
drwxr-xr-x root/root usr/
drwxr-xr-x root/root usr/bin/
-rwxr-xr-x root/root usr/bin/dbus-cleanup-sockets

3
main/dbus/run Executable file
View File

@@ -0,0 +1,3 @@
#!/bin/sh
[ ! -d /run/dbus ] && install -m755 -g 18 -o 18 -d /run/dbus
exec dbus-daemon --system --nofork --nopidfile

View File

@@ -3,9 +3,10 @@
name=dbus
version=1.14.4
release=1
release=2
source="https://dbus.freedesktop.org/releases/$name/$name-$version.tar.xz
rc.$name"
rc.$name
run"
build() {
cd $name-$version
@@ -30,4 +31,7 @@ build() {
# rc service
install -Dm755 $SRC/rc.$name $PKG/etc/rc.d/$name
# runit service
install -Dm755 $SRC/run $PKG/etc/sv/$name/run
}

View File

@@ -1,2 +1,3 @@
9fb6294d06d6e7ebc3ead960f88a4459 NetworkManager-1.40.2.tar.xz
6dafed6f16ea2d29761be435cbedcae9 rc.networkmanager
dd33da73e2077c2a37a010854733592d run

View File

@@ -1,4 +1,4 @@
networkmanager-1.40.2-1
networkmanager-1.40.2-2
drwxr-xr-x root/root etc/
drwxr-xr-x root/root etc/NetworkManager/
-rw-r--r-- root/root etc/NetworkManager/NetworkManager.conf.spkgnew
@@ -12,6 +12,9 @@ drwxr-xr-x root/root etc/NetworkManager/dnsmasq.d/
drwxr-xr-x root/root etc/NetworkManager/system-connections/
drwxr-xr-x root/root etc/rc.d/
-rwxr-xr-x root/root etc/rc.d/networkmanager
drwxr-xr-x root/root etc/sv/
drwxr-xr-x root/root etc/sv/networkmanager/
-rwxr-xr-x root/root etc/sv/networkmanager/run
drwxr-xr-x root/root lib/
drwxr-xr-x root/root lib/udev/
drwxr-xr-x root/root lib/udev/rules.d/

3
main/networkmanager/run Executable file
View File

@@ -0,0 +1,3 @@
#!/bin/sh
sv check dbus >/dev/null || exit 1
exec NetworkManager -n > /dev/null 2>&1

View File

@@ -3,10 +3,11 @@
name=networkmanager
version=1.40.2
release=1
release=2
backup="etc/NetworkManager/NetworkManager.conf"
source="https://ftp.gnome.org/pub/gnome/sources/NetworkManager/${version%.*}/NetworkManager-$version.tar.xz
rc.$name"
rc.$name
run"
build() {
@@ -38,4 +39,7 @@ EOF
# rc service
install -Dm755 $SRC/rc.$name $PKG/etc/rc.d/$name
# runit service
install -Dm755 $SRC/run $PKG/etc/sv/$name/run
}

View File

@@ -1,3 +0,0 @@
652d673c04eae262db1d970176e98211 40b4b3892256a2e466686e1514253d70cc8f75d5.patch
ade8caad006d2544061d2dfbc6ac0fa0 Makefile
5f15c15fa3416d4a9c01d32bf9b094ce runit-rc-20200403.tar.gz

View File

@@ -1,70 +0,0 @@
runit-rc-20200403-2
drwxr-xr-x root/root etc/
drwxr-xr-x root/root etc/runit/
-rwxr-xr-x root/root etc/runit/1
-rwxr-xr-x root/root etc/runit/2
-rwxr-xr-x root/root etc/runit/3
-rwxr-xr-x root/root etc/runit/ctrlaltdel
-rwxr-xr-x root/root etc/runit/rc.shutdown
-rwxr-xr-x root/root etc/runit/rc.shutdown.local.spkgnew
-rwxr-xr-x root/root etc/runit/rc.startup
-rwxr-xr-x root/root etc/runit/rc.startup.local.spkgnew
---------- root/root etc/runit/reboot
-rw-r--r-- root/root etc/runit/runit.conf.spkgnew
drwxr-xr-x root/root etc/runit/runsvdir/
lrwxrwxrwx root/root etc/runit/runsvdir/current -> default
drwxr-xr-x root/root etc/runit/runsvdir/default/
lrwxrwxrwx root/root etc/runit/runsvdir/default/getty-tty1 -> /etc/sv/getty-tty1
lrwxrwxrwx root/root etc/runit/runsvdir/default/getty-tty2 -> /etc/sv/getty-tty2
lrwxrwxrwx root/root etc/runit/runsvdir/default/getty-tty3 -> /etc/sv/getty-tty3
lrwxrwxrwx root/root etc/runit/runsvdir/default/getty-tty4 -> /etc/sv/getty-tty4
lrwxrwxrwx root/root etc/runit/runsvdir/default/getty-tty5 -> /etc/sv/getty-tty5
lrwxrwxrwx root/root etc/runit/runsvdir/default/getty-tty6 -> /etc/sv/getty-tty6
drwxr-xr-x root/root etc/runit/runsvdir/single/
lrwxrwxrwx root/root etc/runit/runsvdir/single/sulogin -> /etc/sv/sulogin
---------- root/root etc/runit/stopit
drwxr-xr-x root/root etc/sv/
drwxr-xr-x root/root etc/sv/getty-tty1/
-rwxr-xr-x root/root etc/sv/getty-tty1/finish
-rwxr-xr-x root/root etc/sv/getty-tty1/run
lrwxrwxrwx root/root etc/sv/getty-tty1/supervise -> /run/runit/supervise.getty-tty1
drwxr-xr-x root/root etc/sv/getty-tty2/
-rwxr-xr-x root/root etc/sv/getty-tty2/finish
-rwxr-xr-x root/root etc/sv/getty-tty2/run
lrwxrwxrwx root/root etc/sv/getty-tty2/supervise -> /run/runit/supervise.getty-tty2
drwxr-xr-x root/root etc/sv/getty-tty3/
-rwxr-xr-x root/root etc/sv/getty-tty3/finish
-rwxr-xr-x root/root etc/sv/getty-tty3/run
lrwxrwxrwx root/root etc/sv/getty-tty3/supervise -> /run/runit/supervise.getty-tty3
drwxr-xr-x root/root etc/sv/getty-tty4/
-rwxr-xr-x root/root etc/sv/getty-tty4/finish
-rwxr-xr-x root/root etc/sv/getty-tty4/run
lrwxrwxrwx root/root etc/sv/getty-tty4/supervise -> /run/runit/supervise.getty-tty4
drwxr-xr-x root/root etc/sv/getty-tty5/
-rwxr-xr-x root/root etc/sv/getty-tty5/finish
-rwxr-xr-x root/root etc/sv/getty-tty5/run
lrwxrwxrwx root/root etc/sv/getty-tty5/supervise -> /run/runit/supervise.getty-tty5
drwxr-xr-x root/root etc/sv/getty-tty6/
-rwxr-xr-x root/root etc/sv/getty-tty6/finish
-rwxr-xr-x root/root etc/sv/getty-tty6/run
lrwxrwxrwx root/root etc/sv/getty-tty6/supervise -> /run/runit/supervise.getty-tty6
drwxr-xr-x root/root etc/sv/sulogin/
-rwxr-xr-x root/root etc/sv/sulogin/run
lrwxrwxrwx root/root etc/sv/sulogin/supervise -> /run/runit/supervise.sulogin
drwxr-xr-x root/root sbin/
-rwxr-xr-x root/root sbin/halt
lrwxrwxrwx root/root sbin/init -> runit-init
-rwxr-xr-x root/root sbin/modules-load
-rwxr-xr-x root/root sbin/pause
lrwxrwxrwx root/root sbin/poweroff -> halt
lrwxrwxrwx root/root sbin/reboot -> halt
-rwxr-xr-x root/root sbin/shutdown
drwxr-xr-x root/root usr/
drwxr-xr-x root/root usr/share/
drwxr-xr-x root/root usr/share/man/
drwxr-xr-x root/root usr/share/man/man1/
-rw-r--r-- root/root usr/share/man/man1/pause.1.gz
drwxr-xr-x root/root usr/share/man/man8/
-rw-r--r-- root/root usr/share/man/man8/shutdown.8.gz
drwxr-xr-x root/root var/
lrwxrwxrwx root/root var/service -> /etc/runit/runsvdir/current

View File

@@ -1,54 +0,0 @@
ETCDIR = /etc
BINDIR = /sbin
SVDIR = /etc/sv
MANDIR = /usr/share/man
VARDIR = /var
IETCDIR = $(DESTDIR)$(ETCDIR)
IBINDIR = $(DESTDIR)$(BINDIR)
ISVDIR = $(DESTDIR)$(SVDIR)
IMANDIR = $(DESTDIR)$(MANDIR)
IVARDIR = $(DESTDIR)$(VARDIR)
CC = gcc
SCRIPTS = 1 2 3 ctrlaltdel rc.startup.local rc.shutdown.local rc.startup rc.shutdown
BINARY = halt pause shutdown modules-load
CONF = runit.conf
MAN1 = pause.1
MAN8 = shutdown.8
all:
$(CC) $(CFLAGS) pause.c -o pause
create-dir:
install -d $(IETCDIR)/runit/runsvdir/default
install -d $(IETCDIR)/runit/runsvdir/single
install -d $(ISVDIR)
install -d $(IBINDIR)
install -d $(IMANDIR)/man1
install -d $(IMANDIR)/man8
install -d $(IVARDIR)
install: create-dir
install -m755 $(BINARY) $(IBINDIR)
ln -sf halt $(IBINDIR)/reboot
ln -sf halt $(IBINDIR)/poweroff
install -m755 $(SCRIPTS) $(IETCDIR)/runit
install -m644 $(CONF) $(IETCDIR)/runit
install -m644 $(MAN1) $(IMANDIR)/man1/$(MAN1)
install -m644 $(MAN8) $(IMANDIR)/man8/$(MAN8)
cp -r services/* $(ISVDIR)
chmod 755 $(ISVDIR)/*/run
chmod 755 $(ISVDIR)/*/finish
[ -L $(IETCDIR)/runit/runsvdir/current ] || ln -s default $(IETCDIR)/runit/runsvdir/current
[ -L $(IVARDIR)/service ] || ln -s /etc/runit/runsvdir/current $(IVARDIR)/service
touch $(IETCDIR)/runit/reboot
touch $(IETCDIR)/runit/stopit
chmod 0 $(IETCDIR)/runit/reboot
chmod 0 $(IETCDIR)/runit/stopit
ln -sf /etc/sv/getty-tty1 $(IETCDIR)/runit/runsvdir/default
ln -sf /etc/sv/sulogin $(IETCDIR)/runit/runsvdir/single
clean:
rm -f pause
.PHONY: all install clean create-dir

View File

@@ -1,26 +0,0 @@
# description : Runit scripts for Venom Linux
# depends : runit
name=runit-rc
version=20200403
release=2
backup="etc/runit/rc.startup.local
etc/runit/rc.shutdown.local
etc/runit/runit.conf"
source="https://github.com/venomlinux/runit-rc/archive/$version/$name-$version.tar.gz
https://github.com/venomlinux/runit-rc/commit/40b4b3892256a2e466686e1514253d70cc8f75d5.patch
Makefile"
build() {
cd $name-$version
patch -Np1 -i ../40b4b3892256a2e466686e1514253d70cc8f75d5.patch
cp ../Makefile .
make CC=${CC:-gcc}
make CC=${CC:-gcc} DESTDIR=$PKG install
ln -s runit-init $PKG/sbin/init
for i in $(seq 6); do
ln -sf /etc/sv/getty-tty$i $PKG/etc/runit/runsvdir/default
ln -s /run/runit/supervise.getty-tty$i $PKG/etc/sv/getty-tty$i/supervise
done
ln -s /run/runit/supervise.sulogin $PKG/etc/sv/sulogin/supervise
}

View File

@@ -1 +0,0 @@
6c985fbfe3a34608eb3c53dc719172c4 runit-2.1.2.tar.gz

View File

@@ -1,24 +0,0 @@
runit-2.1.2-2
drwxr-xr-x root/root sbin/
-rwxr-xr-x root/root sbin/chpst
-rwxr-xr-x root/root sbin/runit
-rwxr-xr-x root/root sbin/runit-init
-rwxr-xr-x root/root sbin/runsv
-rwxr-xr-x root/root sbin/runsvchdir
-rwxr-xr-x root/root sbin/runsvdir
-rwxr-xr-x root/root sbin/sv
-rwxr-xr-x root/root sbin/svlogd
-rwxr-xr-x root/root sbin/utmpset
drwxr-xr-x root/root usr/
drwxr-xr-x root/root usr/share/
drwxr-xr-x root/root usr/share/man/
drwxr-xr-x root/root usr/share/man/man8/
-rw-r--r-- root/root usr/share/man/man8/chpst.8.gz
-rw-r--r-- root/root usr/share/man/man8/runit-init.8.gz
-rw-r--r-- root/root usr/share/man/man8/runit.8.gz
-rw-r--r-- root/root usr/share/man/man8/runsv.8.gz
-rw-r--r-- root/root usr/share/man/man8/runsvchdir.8.gz
-rw-r--r-- root/root usr/share/man/man8/runsvdir.8.gz
-rw-r--r-- root/root usr/share/man/man8/sv.8.gz
-rw-r--r-- root/root usr/share/man/man8/svlogd.8.gz
-rw-r--r-- root/root usr/share/man/man8/utmpset.8.gz

View File

@@ -1,22 +0,0 @@
# description : A UNIX init scheme with service supervision
name=runit
version=2.1.2
release=2
source="http://smarden.org/runit/$name-$version.tar.gz"
build() {
cd admin/$name-$version
# set default service path to /var/service
sed -i -e 's:^char \*varservice ="/service/";$:char \*varservice ="/var/service/";:' src/sv.c
./package/compile
./package/check
install -d $PKG/sbin
install -m 755 command/* $PKG/sbin
install -d $PKG/usr/share/man/man8
install -m 644 man/* $PKG/usr/share/man/man8
}

View File

@@ -1 +0,0 @@
url=http://smarden.org/runit/install.html

View File

@@ -1,3 +1,4 @@
e82f3d1e8ba6a00fe0eb459659a17c9e rc.slim
5c5e03f31a2ce06f7d431fbfa17ea316 run
d40d256394f9ef34cef34d2aa9cb52e6 slim-1.3.6.tar.gz
76ed237c811ad99b3667a46ec70346ea slim.pam

View File

@@ -1,10 +1,13 @@
slim-1.3.6-4
slim-1.3.6-5
drwxr-xr-x root/root etc/
drwxr-xr-x root/root etc/pam.d/
-rw-r--r-- root/root etc/pam.d/slim
drwxr-xr-x root/root etc/rc.d/
-rwxr-xr-x root/root etc/rc.d/slim
-rw-r--r-- root/root etc/slim.conf.spkgnew
drwxr-xr-x root/root etc/sv/
drwxr-xr-x root/root etc/sv/slim/
-rwxr-xr-x root/root etc/sv/slim/run
drwxr-xr-x root/root usr/
drwxr-xr-x root/root usr/bin/
-rwxr-xr-x root/root usr/bin/slim

2
main/slim/run Executable file
View File

@@ -0,0 +1,2 @@
#!/bin/sh
exec slim -nodaemon

View File

@@ -3,11 +3,12 @@
name=slim
version=1.3.6
release=4
release=5
backup="etc/slim.conf"
source="https://sourceforge.net/projects/${name}.berlios/files/$name-$version.tar.gz
rc.slim
$name.pam"
$name.pam
run"
build() {
cd $name-$version
@@ -32,4 +33,7 @@ build() {
# rc service
install -Dm755 $SRC/rc.$name $PKG/etc/rc.d/$name
# runit service
install -Dm755 $SRC/run $PKG/etc/sv/$name/run
}