Compare commits
35 Commits
Author | SHA1 | Date | |
---|---|---|---|
6659fb93a6 | |||
2043194c7c | |||
a2884c4f7e | |||
049e0594e6 | |||
6d378e3d23 | |||
960470dcb8 | |||
17b8a4212b | |||
e8cb811768 | |||
a213f0d936 | |||
cbe5781ae2 | |||
bd445b4c1e | |||
ffe119f159 | |||
dafd6ab93c | |||
e29057d1f8 | |||
b0f5c7b937 | |||
72bda65869 | |||
e597c25936 | |||
10507f41b4 | |||
b0a4a9ff88 | |||
a37e93855a | |||
a764b9692b | |||
97c94cfb33 | |||
1eee05d86f | |||
c9dc6eb57e | |||
10a3c36b2f | |||
a7cbbfebd1 | |||
d3d3e0463e | |||
783caefae2 | |||
d38062f905 | |||
b3577634a2 | |||
335060af49 | |||
7295830437 | |||
a4c443b658 | |||
a1c122c058 | |||
bea63084ab |
54
Makefile
54
Makefile
@@ -1,4 +1,4 @@
|
||||
VERSION = 0.11.2
|
||||
VERSION = 0.13.8
|
||||
|
||||
PKG = live-services
|
||||
TOOLS = artools
|
||||
@@ -11,10 +11,17 @@ DATADIR = $(PREFIX)/share
|
||||
SYSUSERSDIR = $(PREFIX)/lib/sysusers.d
|
||||
LIVEUSER ?= artix
|
||||
|
||||
HOOKSDIR = $(DATADIR)/libalpm/hooks
|
||||
SCRIPTSDIR = $(DATADIR)/libalpm/scripts
|
||||
|
||||
FMODE = -m0644
|
||||
DMODE = -dm0755
|
||||
BMODE = -m0755
|
||||
|
||||
|
||||
ALPMSCRIPTS = $(wildcard libalpm/scripts/*)
|
||||
ALPMHOOKS = $(wildcard libalpm/hooks/*)
|
||||
|
||||
BIN = \
|
||||
bin/artix-live
|
||||
|
||||
@@ -33,6 +40,10 @@ RUNIT_SVD = \
|
||||
RUNIT_SV = \
|
||||
data/runit/pacman-init.run
|
||||
|
||||
S6_DEFAULT = \
|
||||
data/s6/default/contents.d/artix-live \
|
||||
data/s6/default/contents.d/pacman-init
|
||||
|
||||
S6_LIVE = \
|
||||
data/s6/artix-live/up \
|
||||
data/s6/artix-live/type
|
||||
@@ -42,16 +53,21 @@ S6_PI = \
|
||||
data/s6/pacman-init/up \
|
||||
data/s6/pacman-init/down
|
||||
|
||||
S6_BUNDLE = \
|
||||
data/s6/live/type \
|
||||
data/s6/live/contents
|
||||
|
||||
66_LIVE = \
|
||||
data/66/artix-live
|
||||
|
||||
66_PI = \
|
||||
data/66/pacman-init
|
||||
|
||||
DINIT_LIVE = \
|
||||
data/dinit/artix-live
|
||||
|
||||
DINIT_PI = \
|
||||
data/dinit/pacman-init
|
||||
|
||||
DINIT_PI_SCRIPT = \
|
||||
data/dinit/pacman-init.script
|
||||
|
||||
XDG = $(wildcard data/*.desktop)
|
||||
|
||||
XBIN = bin/desktop-items
|
||||
@@ -93,6 +109,12 @@ install_base:
|
||||
install $(DMODE) $(DESTDIR)$(DATADIR)/$(TOOLS)
|
||||
install $(FMODE) $(SHARED) $(DESTDIR)$(DATADIR)/$(TOOLS)
|
||||
|
||||
install_alpm:
|
||||
install $(DMODE) $(DESTDIR)$(SCRIPTSDIR)
|
||||
install $(DMODE) $(DESTDIR)$(HOOKSDIR)
|
||||
install $(BMODE) $(ALPMSCRIPTS) $(DESTDIR)$(SCRIPTSDIR)
|
||||
install $(FMODE) $(ALPMHOOKS) $(DESTDIR)$(HOOKSDIR)
|
||||
|
||||
install_rc:
|
||||
install $(DMODE) $(DESTDIR)$(SYSCONFDIR)/init.d
|
||||
install $(BMODE) $(RC) $(DESTDIR)$(SYSCONFDIR)/init.d
|
||||
@@ -109,22 +131,32 @@ install_runit:
|
||||
|
||||
install_s6:
|
||||
install $(DMODE) $(DESTDIR)$(SYSCONFDIR)/s6/sv
|
||||
install $(DMODE) $(DESTDIR)$(SYSCONFDIR)/s6/adminsv
|
||||
|
||||
install $(DMODE) $(DESTDIR)$(SYSCONFDIR)/s6/adminsv/default/contents.d
|
||||
install $(FMODE) $(S6_DEFAULT) $(DESTDIR)$(SYSCONFDIR)/s6/adminsv/default/contents.d/
|
||||
|
||||
install $(DMODE) $(DESTDIR)$(SYSCONFDIR)/s6/sv/pacman-init
|
||||
install $(BMODE) $(S6_PI) $(DESTDIR)$(SYSCONFDIR)/s6/sv/pacman-init/
|
||||
install $(FMODE) $(S6_PI) $(DESTDIR)$(SYSCONFDIR)/s6/sv/pacman-init/
|
||||
|
||||
install $(DMODE) $(DESTDIR)$(SYSCONFDIR)/s6/sv/artix-live
|
||||
install $(BMODE) $(S6_LIVE) $(DESTDIR)$(SYSCONFDIR)/s6/sv/artix-live/
|
||||
install $(FMODE) $(S6_LIVE) $(DESTDIR)$(SYSCONFDIR)/s6/sv/artix-live/
|
||||
|
||||
install $(DMODE) $(DESTDIR)$(SYSCONFDIR)/s6/sv/live
|
||||
install $(BMODE) $(S6_BUNDLE) $(DESTDIR)$(SYSCONFDIR)/s6/sv/live/
|
||||
|
||||
install_66:
|
||||
install_66: install_alpm
|
||||
install $(DMODE) $(DESTDIR)$(SYSCONFDIR)/66/service
|
||||
|
||||
install $(FMODE) $(66_LIVE) $(DESTDIR)$(SYSCONFDIR)/66/service/artix-live
|
||||
install $(FMODE) $(66_PI) $(DESTDIR)$(SYSCONFDIR)/66/service/pacman-init
|
||||
|
||||
install_dinit:
|
||||
install $(DMODE) $(DESTDIR)$(SYSCONFDIR)/dinit.d/scripts
|
||||
install $(DMODE) $(DESTDIR)$(SYSCONFDIR)/dinit.d/live.d
|
||||
install $(FMODE) $(DINIT_LIVE) $(DESTDIR)$(SYSCONFDIR)/dinit.d/artix-live
|
||||
install $(FMODE) $(DINIT_PI) $(DESTDIR)$(SYSCONFDIR)/dinit.d/pacman-init
|
||||
install $(BMODE) $(DINIT_PI_SCRIPT) $(DESTDIR)$(LIBDIR)/dinit/pacman-init
|
||||
ln -s ../artix-live $(DESTDIR)$(SYSCONFDIR)/dinit.d/live.d
|
||||
ln -s ../pacman-init $(DESTDIR)$(SYSCONFDIR)/dinit.d/live.d
|
||||
|
||||
install_xdg:
|
||||
install -dm0755 $(DESTDIR)$(PREFIX)/bin
|
||||
install -m0755 ${XBIN} $(DESTDIR)$(PREFIX)/bin
|
||||
|
@@ -1 +1,3 @@
|
||||
# live-services
|
||||
# live-services
|
||||
|
||||
Live ISO setup, branding, installer for DE ISOs etc.
|
||||
|
@@ -7,15 +7,17 @@ xdg-user-dirs-update --force
|
||||
xdg=$(xdg-user-dir DESKTOP)
|
||||
src=@datadir@/applications
|
||||
|
||||
# if [[ -f $src/org.kde.konversation.desktop ]]; then
|
||||
# if [ -f $src/org.kde.konversation.desktop ]; then
|
||||
# install -m644 $src/org.kde.konversation.desktop \
|
||||
# $xdg/org.kde.konversation.desktop
|
||||
# fi
|
||||
|
||||
if [[ -f @bindir@/calamares ]]; then
|
||||
cp -f $src/calamares.desktop "$xdg/"
|
||||
sed -i s/Icon.*=calamares/Icon=artixlinux-logo/g "$xdg"/calamares.desktop
|
||||
chmod +x "$xdg/calamares.desktop"
|
||||
if [ -f @bindir@/calamares ]; then
|
||||
installer='calamares.desktop'
|
||||
cp -f $src/$installer "$xdg/"
|
||||
sed -i s/Icon.*=calamares/Icon=artixlinux-logo/g "$xdg"/$installer
|
||||
sed -r -i "s|XAUTHCOOKIE|$XAUTHORITY|" "$xdg"/$installer
|
||||
chmod +x "$xdg/$installer"
|
||||
fi
|
||||
|
||||
docs=@datadir@/doc/artix
|
||||
@@ -24,12 +26,14 @@ for f in {Configuration,Troubleshooting}.pdf; do
|
||||
ln -s $docs/$f "$xdg"/$f
|
||||
done
|
||||
|
||||
if [[ -d /run/openrc ]]; then
|
||||
if [ -d /run/openrc ]; then
|
||||
ln -s $docs/OpenRC.pdf "$xdg"/OpenRC.pdf
|
||||
elif [[ -d /run/runit ]]; then
|
||||
elif [ -d /run/runit ]; then
|
||||
ln -s $docs/Runit.pdf "$xdg"/Runit.pdf
|
||||
elif [[ -d /run/66 ]]; then
|
||||
elif [ -d /run/66 ]; then
|
||||
ln -s $docs/Suite66.pdf "$xdg"/Suite66.pdf
|
||||
elif [ -d /run/dinit ]; then
|
||||
ln -s $docs/Dinit.pdf "$xdg"/Dinit.pdf
|
||||
else
|
||||
ln -s $docs/S6.pdf "$xdg"/S6.pdf
|
||||
fi
|
||||
|
@@ -9,6 +9,5 @@
|
||||
@execute = (
|
||||
foreground { mkdir -p /etc/pacman.d/gnupg }
|
||||
foreground { mount -t tmpfs -o size=10M,mode=0755 tmpfs /etc/pacman.d/gnupg }
|
||||
fdmove -c 2 1
|
||||
foreground { pacman-key --init }
|
||||
foreground { pacman-key --populate artix } )
|
||||
|
4
data/dinit/artix-live
Normal file
4
data/dinit/artix-live
Normal file
@@ -0,0 +1,4 @@
|
||||
type = scripted
|
||||
command = /usr/bin/artix-live
|
||||
restart = false
|
||||
after = setup
|
5
data/dinit/pacman-init
Normal file
5
data/dinit/pacman-init
Normal file
@@ -0,0 +1,5 @@
|
||||
type = scripted
|
||||
command = /usr/lib/dinit/pacman-init
|
||||
stop-command = /usr/bin/umount -l /etc/pacman.d/gnupg
|
||||
restart = false
|
||||
after = setup
|
4
data/dinit/pacman-init.script
Normal file
4
data/dinit/pacman-init.script
Normal file
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
/usr/bin/mount -t tmpfs -o size=10M,mode=0755 tmpfs /etc/pacman.d/gnupg
|
||||
/usr/bin/pacman-key --init
|
||||
/usr/bin/pacman-key --populate artix
|
@@ -1,15 +1,17 @@
|
||||
#!/usr/bin/openrc-run
|
||||
# Copyright 2014 Aaditya Bagga (aaditya_gnulinux@zoho.com)
|
||||
# Copyright 2017-2021 The Artix Linux developers
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
description="LiveMedia Config Script"
|
||||
|
||||
depend() {
|
||||
need localmount
|
||||
before display-manager ly
|
||||
}
|
||||
|
||||
start() {
|
||||
ebegin "Starting artix live script"
|
||||
/usr/bin/artix-live
|
||||
eend $?
|
||||
ebegin "Starting artix live script"
|
||||
/usr/bin/artix-live
|
||||
eend $?
|
||||
}
|
||||
|
0
data/s6/default/contents.d/artix-live
Normal file
0
data/s6/default/contents.d/artix-live
Normal file
0
data/s6/default/contents.d/pacman-init
Normal file
0
data/s6/default/contents.d/pacman-init
Normal file
@@ -1,2 +0,0 @@
|
||||
artix-live
|
||||
pacman-init
|
@@ -1 +0,0 @@
|
||||
bundle
|
@@ -1,6 +1,5 @@
|
||||
#!@bindir@/execlineb -P
|
||||
foreground { mkdir -p /etc/pacman.d/gnupg }
|
||||
foreground { mount -t tmpfs -o size=10M,mode=0755 tmpfs /etc/pacman.d/gnupg }
|
||||
fdmove -c 2 1
|
||||
foreground { pacman-key --init }
|
||||
foreground { pacman-key --populate artix }
|
||||
|
12
libalpm/hooks/60-enable-liveservices.hook
Normal file
12
libalpm/hooks/60-enable-liveservices.hook
Normal file
@@ -0,0 +1,12 @@
|
||||
[Trigger]
|
||||
Operation = Install
|
||||
Operation = Upgrade
|
||||
Type = Package
|
||||
Target = artix-live-s6
|
||||
Target = artix-live-suite66
|
||||
|
||||
[Action]
|
||||
Description = Enabling live services ...
|
||||
When = PostTransaction
|
||||
Exec = /usr/share/libalpm/scripts/liveservices-hook enable
|
||||
NeedsTargets
|
11
libalpm/hooks/65-disable-liveservices.hook
Normal file
11
libalpm/hooks/65-disable-liveservices.hook
Normal file
@@ -0,0 +1,11 @@
|
||||
[Trigger]
|
||||
Operation = Remove
|
||||
Type = Package
|
||||
Target = artix-live-s6
|
||||
Target = artix-live-suite66
|
||||
|
||||
[Action]
|
||||
Description = Disabling live services ...
|
||||
When = PreTransaction
|
||||
Exec = /usr/share/libalpm/scripts/liveservices-hook disable
|
||||
NeedsTargets
|
88
libalpm/scripts/liveservices-hook
Normal file
88
libalpm/scripts/liveservices-hook
Normal file
@@ -0,0 +1,88 @@
|
||||
#!/bin/sh -e
|
||||
# Only needed for s6 and suite66.
|
||||
|
||||
s6_enable_live_services(){
|
||||
if [ -d /etc/s6/sv/gdm/dependencies.d ]; then
|
||||
touch /etc/s6/sv/gdm/dependencies.d/artix-live
|
||||
fi
|
||||
if [ -d /etc/s6/sv/lightdm-srv/dependencies.d ]; then
|
||||
touch /etc/s6/sv/lightdm-srv/dependencies.d/artix-live
|
||||
fi
|
||||
if [ -d /etc/s6/sv/sddm/dependencies.d ]; then
|
||||
touch /etc/s6/sv/sddm/dependencies.d/artix-live
|
||||
fi
|
||||
}
|
||||
|
||||
s6_disable_live_services(){
|
||||
rm -f /etc/s6/sv/gdm/dependencies.d/artix-live
|
||||
rm -f /etc/s6/sv/lightdm-srv/dependencies.d/artix-live
|
||||
rm -f /etc/s6/sv/sddm/dependencies.d/artix-live
|
||||
}
|
||||
|
||||
suite66_enable_live_services(){
|
||||
[ -d /var/lib/66/system/boot ] || 66-tree -n boot
|
||||
[ -d /var/lib/66/system/default ] || 66-tree -ncE default
|
||||
66-enable -t default artix-live pacman-init
|
||||
|
||||
if [ -f /usr/bin/gdm ]; then
|
||||
66-disable -t default logind gdm
|
||||
sed -i -E 's#@depends\s*=\s*\(\s*([^)]+)\s*\)#@depends = ( \1artix-live pacman-init )#' /etc/66/service/gdm
|
||||
66-enable -t default logind gdm
|
||||
elif [ -f /usr/bin/lightdm ]; then
|
||||
66-disable -t default logind lightdm
|
||||
sed -i -E 's#@depends\s*=\s*\(\s*([^)]+)\s*\)#@depends = ( \1artix-live pacman-init )#' /etc/66/service/lightdm
|
||||
66-enable -t default logind lightdm
|
||||
elif [ -f /usr/bin/sddm ]; then
|
||||
66-disable -t default logind sddm
|
||||
sed -i -E 's#@depends\s*=\s*\(\s*([^)]+)\s*\)#@depends = ( \1artix-live pacman-init )#' /etc/66/service/sddm
|
||||
66-enable -t default logind sddm
|
||||
fi
|
||||
|
||||
66-enable -t boot -F boot@system
|
||||
}
|
||||
|
||||
suite66_disable_live_services(){
|
||||
66-disable -t default artix-live pacman-init
|
||||
|
||||
if [ -f /usr/bin/gdm ]; then
|
||||
66-disable -t default logind gdm
|
||||
sed -i -E 's# artix-live pacman-init##' /etc/66/service/gdm
|
||||
66-enable -t default logind gdm
|
||||
elif [ -f /usr/bin/lightdm ]; then
|
||||
66-disable -t default logind lightdm
|
||||
sed -i -E 's# artix-live pacman-init##' /etc/66/service/lightdm
|
||||
66-enable -t default logind lightdm
|
||||
elif [ -f /usr/bin/sddm ]; then
|
||||
66-disable -t default logind sddm
|
||||
sed -i -E 's# artix-live pacman-init##' /etc/66/service/sddm
|
||||
66-enable -t default logind sddm
|
||||
fi
|
||||
|
||||
66-enable -t boot -F boot@system
|
||||
}
|
||||
|
||||
enable_live_services() {
|
||||
if [ -f /usr/bin/s6-init ]; then
|
||||
s6_enable_live_services
|
||||
fi
|
||||
|
||||
if [ -f /usr/bin/suite66-init ]; then
|
||||
suite66_enable_live_services
|
||||
fi
|
||||
}
|
||||
|
||||
disable_live_services() {
|
||||
if [ -f /usr/bin/s6-init ]; then
|
||||
s6_disable_live_services
|
||||
fi
|
||||
|
||||
if [ -f /usr/bin/suite66-init ]; then
|
||||
suite66_disable_live_services
|
||||
fi
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
enable) enable_live_services ;;
|
||||
disable) disable_live_services ;;
|
||||
*) echo >&2 " Invalid operation '$1'"; exit 1 ;;
|
||||
esac
|
Reference in New Issue
Block a user