Compare commits
22 Commits
Author | SHA1 | Date | |
---|---|---|---|
96ae6855ac | |||
22014421b1 | |||
ccebe7ecf3 | |||
7557a84a7d | |||
712774d585 | |||
ef98a333ca | |||
![]() |
7727ce662e | ||
![]() |
b841184cb2 | ||
![]() |
528b3091c6 | ||
![]() |
ffb4f4ba98 | ||
![]() |
64fe174eba | ||
![]() |
dc955770b3 | ||
![]() |
004760e16a | ||
bb1f0fbdc0 | |||
![]() |
f879bf8965 | ||
![]() |
7e93c77b9a | ||
8832d21deb | |||
189ceeb7e7 | |||
9c6b20fea3 | |||
9a514cc3ca | |||
![]() |
4f3899f6c6 | ||
![]() |
0efd3bdfa9 |
103
Makefile
103
Makefile
@@ -1,7 +1,23 @@
|
||||
Version=0.1
|
||||
VERSION = 0.5
|
||||
|
||||
PKG = live-services
|
||||
TOOLS = artools
|
||||
|
||||
PREFIX = /usr/local
|
||||
SYSCONFDIR = /etc
|
||||
ifdef PREFIX
|
||||
PREFIX = /usr/local
|
||||
endif
|
||||
BINDIR = $(PREFIX)/bin
|
||||
LIBDIR = $(PREFIX)/lib
|
||||
DATADIR = $(PREFIX)/share
|
||||
|
||||
FMODE = -m0644
|
||||
DMODE = -dm0755
|
||||
BMODE = -m0755
|
||||
RM = rm -f
|
||||
M4 = m4 -P
|
||||
CHAW = chmod a-w
|
||||
CHX = chmod +x
|
||||
|
||||
BIN = \
|
||||
bin/artix-live
|
||||
@@ -17,67 +33,76 @@ RC = \
|
||||
data/rc/pacman-init \
|
||||
data/rc/artix-live
|
||||
|
||||
RUNIT_SVD = \
|
||||
data/runit/live
|
||||
|
||||
RUNIT_SV = \
|
||||
data/runit/pacman-init.run
|
||||
|
||||
GRUB_DEFAULT = \
|
||||
data/grub2-portable-efi
|
||||
|
||||
GRUB_D = \
|
||||
data/99_zzz-portable-efi
|
||||
|
||||
all: $(BIN) $(RC) $(XBIN) ${GRUB_D}
|
||||
XDG = $(wildcard data/*.desktop)
|
||||
|
||||
edit = sed -e "s|@datadir[@]|$(DESTDIR)$(PREFIX)/share/artools|g" \
|
||||
-e "s|@sysconfdir[@]|$(DESTDIR)$(SYSCONFDIR)/artools|g" \
|
||||
-e "s|@libdir[@]|$(DESTDIR)$(PREFIX)/lib/artools|g"
|
||||
XBIN = bin/desktop-items
|
||||
|
||||
all: $(BIN) $(RC) $(RUNIT_SV) $(XBIN) $(GRUB_D)
|
||||
|
||||
EDIT = sed -e "s|@datadir[@]|$(DATADIR)/$(TOOLS)|g" \
|
||||
-e "s|@sysconfdir[@]|$(SYSCONFDIR)/$(TOOLS)|g" \
|
||||
-e "s|@libdir[@]|$(LIBDIR)/$(TOOLS)|g"
|
||||
|
||||
%: %.in Makefile
|
||||
@echo "GEN $@"
|
||||
@$(RM) "$@"
|
||||
@m4 -P $@.in | $(edit) >$@
|
||||
@chmod a-w "$@"
|
||||
@chmod +x "$@"
|
||||
@$(M4) $@.in | $(EDIT) >$@
|
||||
@$(CHAW) "$@"
|
||||
@$(CHX) "$@"
|
||||
|
||||
clean:
|
||||
rm -f $(BIN) $(RC) ${GRUB_D}
|
||||
$(RM) $(BIN) $(RC) $(GRUB_D)
|
||||
|
||||
install_base:
|
||||
install -dm0755 $(DESTDIR)$(PREFIX)/bin
|
||||
install -m0755 ${BIN} $(DESTDIR)$(PREFIX)/bin
|
||||
install $(DMODE) $(DESTDIR)$(BINDIR)
|
||||
install $(BMODE) $(BIN) $(DESTDIR)$(BINDIR)
|
||||
|
||||
install -dm0755 $(DESTDIR)$(PREFIX)/lib/artools
|
||||
install -m0644 ${LIBS} $(DESTDIR)$(PREFIX)/lib/artools
|
||||
install $(DMODE) $(DESTDIR)$(LIBDIR)/$(TOOLS)
|
||||
install $(FMODE) $(LIBS) $(DESTDIR)$(LIBDIR)/$(TOOLS)
|
||||
|
||||
install -dm0755 $(DESTDIR)$(PREFIX)/share/artools
|
||||
install -m0644 ${SHARED} $(DESTDIR)$(PREFIX)/share/artools
|
||||
install $(DMODE) $(DESTDIR)$(DATADIR)/$(TOOLS)
|
||||
install $(FMODE) $(SHARED) $(DESTDIR)$(DATADIR)/$(TOOLS)
|
||||
|
||||
install_rc:
|
||||
install -dm0755 $(DESTDIR)$(SYSCONFDIR)/init.d
|
||||
install -m0755 ${RC} $(DESTDIR)$(SYSCONFDIR)/init.d
|
||||
install $(DMODE) $(DESTDIR)$(SYSCONFDIR)/init.d
|
||||
install $(BMODE) $(RC) $(DESTDIR)$(SYSCONFDIR)/init.d
|
||||
|
||||
install_runit:
|
||||
install $(DMODE) $(DESTDIR)$(SYSCONFDIR)/rc/sysinit
|
||||
install $(DMODE) $(DESTDIR)$(LIBDIR)/rc/sv.d
|
||||
|
||||
install $(DMODE) $(DESTDIR)$(SYSCONFDIR)/runit/sv/pacman-init
|
||||
install $(BMODE) $(RUNIT_SVD) $(DESTDIR)$(LIBDIR)/rc/sv.d
|
||||
ln -sf $(LIBDIR)/rc/sv.d/live $(DESTDIR)$(SYSCONFDIR)/rc/sysinit/98-live
|
||||
|
||||
install $(BMODE) $(RUNIT_SV) $(DESTDIR)$(SYSCONFDIR)/runit/sv/pacman-init/run
|
||||
|
||||
install_portable_efi:
|
||||
install -dm0755 $(DESTDIR)$(SYSCONFDIR)/default
|
||||
install -m0755 $(GRUB_DEFAULT) $(DESTDIR)$(SYSCONFDIR)/default
|
||||
install $(DMODE) $(DESTDIR)$(SYSCONFDIR)/default
|
||||
install $(BMODE) $(GRUB_DEFAULT) $(DESTDIR)$(SYSCONFDIR)/default
|
||||
|
||||
install -dm0755 $(DESTDIR)$(SYSCONFDIR)/grub.d
|
||||
install -m0755 $(GRUB_D) $(DESTDIR)$(SYSCONFDIR)/grub.d
|
||||
install $(DMODE) $(DESTDIR)$(SYSCONFDIR)/grub.d
|
||||
install $(BMODE) $(GRUB_D) $(DESTDIR)$(SYSCONFDIR)/grub.d
|
||||
|
||||
uninstall_base:
|
||||
for f in ${BIN}; do rm -f $(DESTDIR)$(PREFIX)/bin/$$f; done
|
||||
for f in ${SHARED}; do rm -f $(DESTDIR)$(PREFIX)/share/artools/$$f; done
|
||||
for f in ${LIBS}; do rm -f $(DESTDIR)$(PREFIX)/lib/artools/$$f; done
|
||||
install_xdg:
|
||||
install -dm0755 $(DESTDIR)$(PREFIX)/bin
|
||||
install -m0755 ${XBIN} $(DESTDIR)$(PREFIX)/bin
|
||||
|
||||
uninstall_portable_efi:
|
||||
for f in ${GRUB_DEFAULT}; do rm -f $(DESTDIR)$(SYSCONFDIR)/default/$$f; done
|
||||
for f in ${GRUB_D}; do rm -f $(DESTDIR)$(SYSCONFDIR)/grub.d/$$f; done
|
||||
install -dm0755 $(DESTDIR)$(SYSCONFDIR)/skel/.config/autostart
|
||||
install -m0755 ${XDG} $(DESTDIR)$(SYSCONFDIR)/skel/.config/autostart
|
||||
|
||||
uninstall_rc:
|
||||
for f in ${RC}; do rm -f $(DESTDIR)$(SYSCONFDIR)/init.d/$$f; done
|
||||
|
||||
install: install_base install_rc install_portable_efi
|
||||
|
||||
uninstall: uninstall_base uninstall_rc uninstall_portable_efi
|
||||
|
||||
dist:
|
||||
git archive --format=tar --prefix=live-services-$(Version)/ $(Version) | gzip -9 > live-services-$(Version).tar.gz
|
||||
gpg --detach-sign --use-agent live-services-$(Version).tar.gz
|
||||
install: install_base install_rc install_portable_efi install_xdg
|
||||
|
||||
.PHONY: all clean install uninstall dist
|
||||
|
@@ -37,14 +37,6 @@ livetimer=$(get_timer_ms)
|
||||
configure_user
|
||||
echo "Created user ${username} with password ${password}: $(elapsed_time_ms ${livetimer})ms" >> "${LOGFILE}"
|
||||
|
||||
livetimer=$(get_timer_ms)
|
||||
configure_sudoers_d
|
||||
echo "Configured sudoers: $(elapsed_time_ms ${livetimer})ms" >> "${LOGFILE}"
|
||||
|
||||
# livetimer=$(get_timer_ms)
|
||||
# configure_machine_id
|
||||
# echo "Configured machine-id: $(elapsed_time_ms ${livetimer})ms" >> "${LOGFILE}"
|
||||
|
||||
livetimer=$(get_timer_ms)
|
||||
configure_accountsservice "${username}"
|
||||
echo "Configured accountsservice: $(elapsed_time_ms ${livetimer})ms" >> "${LOGFILE}"
|
||||
@@ -53,10 +45,6 @@ livetimer=$(get_timer_ms)
|
||||
configure_displaymanager
|
||||
echo "Configured displaymanager: $(elapsed_time_ms ${livetimer})ms" >> "${LOGFILE}"
|
||||
|
||||
livetimer=$(get_timer_ms)
|
||||
configure_calamares
|
||||
echo "Configured calamares unpack ${unpack} $(elapsed_time_ms ${livetimer})ms" >> "${LOGFILE}"
|
||||
|
||||
livetimer=$(get_timer_ms)
|
||||
configure_user_root /
|
||||
echo "Configured root user: $(elapsed_time_ms ${livetimer})ms" >> "${LOGFILE}"
|
||||
|
26
bin/desktop-items.in
Normal file
26
bin/desktop-items.in
Normal file
@@ -0,0 +1,26 @@
|
||||
#!/bin/sh
|
||||
|
||||
xdg=$(xdg-user-dir DESKTOP)
|
||||
src=/usr/share/applications
|
||||
|
||||
if [[ -f $src/org.kde.konversation.desktop ]]; then
|
||||
install -Dm755 $src/org.kde.konversation.desktop \
|
||||
$xdg/konversation-artix-help.desktop
|
||||
fi
|
||||
|
||||
if [[ -f /usr/bin/calamares ]]; then
|
||||
install -Dm755 $src/calamares.desktop \
|
||||
$xdg/calamares.desktop
|
||||
fi
|
||||
|
||||
docs=/usr/share/doc/artix
|
||||
|
||||
for f in {Configuration,Installation,Migration,Troubleshooting}.pdf;do
|
||||
ln -s $docs/$f $xdg/$f
|
||||
done
|
||||
|
||||
if [[ -d /run/openrc ]];then
|
||||
ln -s $docs/OpenRC.pdf $xdg/OpenRC.pdf
|
||||
else
|
||||
ln -s $docs/Runit.pdf $xdg/Runit.pdf
|
||||
fi
|
15
data/runit/live
Normal file
15
data/runit/live
Normal file
@@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
|
||||
. /usr/lib/rc/functions
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
stat_busy "Initializing artix live system"
|
||||
artix-live #|| stat_die
|
||||
add_daemon live
|
||||
stat_done
|
||||
;;
|
||||
*)
|
||||
echo "usage: $0 {start}"
|
||||
;;
|
||||
esac
|
5
data/runit/pacman-init.run
Normal file
5
data/runit/pacman-init.run
Normal file
@@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
mount -t tmpfs -o size=10M,mode=0755 tmpfs /etc/pacman.d/gnupg
|
||||
pacman-key --init 1>&2
|
||||
pacman-key --populate archlinux artix 1>&2
|
||||
exec chpst -b pacman-init pause
|
@@ -34,7 +34,7 @@ get_tz(){
|
||||
}
|
||||
|
||||
get_cal_mode(){
|
||||
echo $(kernel_cmdline unpack)
|
||||
echo $(kernel_cmdline netinstall)
|
||||
}
|
||||
|
||||
get_timer_ms(){
|
||||
@@ -79,7 +79,7 @@ is_valid_de(){
|
||||
load_desktop_map(){
|
||||
local _space="s| ||g" _clean=':a;N;$!ba;s/\n/ /g' _com_rm="s|#.*||g" \
|
||||
file=${DATADIR}/desktop.map
|
||||
local desktop_map=$(sed "$_com_rm" "$file" | sed "$_space" sed "$_clean")
|
||||
local desktop_map=$(sed "$_com_rm" "$file" | sed "$_space" | sed "$_clean")
|
||||
echo ${desktop_map}
|
||||
}
|
||||
|
||||
@@ -267,37 +267,6 @@ configure_language(){
|
||||
echo "Configured timezone: ${timezone}" >> "${LOGFILE}"
|
||||
}
|
||||
|
||||
write_unpack_conf(){
|
||||
local conf="/etc/calamares/modules/unpackfs.conf"
|
||||
echo "---" > "$conf"
|
||||
echo "unpack:" >> "$conf"
|
||||
echo " - source: \"/run/artix/bootmnt/artix/$(uname -m)/rootfs.sfs\"" >> "$conf"
|
||||
echo " sourcefs: \"squashfs\"" >> "$conf"
|
||||
echo " destination: \"\"" >> "$conf"
|
||||
echo " - source: \"/run/artix/bootmnt/artix/$(uname -m)/desktopfs.sfs\"" >> "$conf"
|
||||
echo " sourcefs: \"squashfs\"" >> "$conf"
|
||||
echo " destination: \"\"" >> "$conf"
|
||||
}
|
||||
|
||||
configure_calamares(){
|
||||
if [[ -f /usr/bin/calamares ]];then
|
||||
unpack=$(get_cal_mode)
|
||||
if [[ "${unpack}" == 'yes' ]];then
|
||||
sed -e "/- netinstall/d" \
|
||||
-e "s|- chrootcfg|- unpackfs|" -i /etc/calamares/settings.conf
|
||||
|
||||
sed -e '$ d' -i /etc/calamares/modules/welcome.conf
|
||||
|
||||
write_unpack_conf
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
configure_sudoers_d(){
|
||||
echo "%wheel ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/g_wheel
|
||||
echo "root ALL=(ALL) ALL" > /etc/sudoers.d/u_root
|
||||
}
|
||||
|
||||
configure_swap(){
|
||||
local swapdev="$(fdisk -l 2>/dev/null | grep swap | cut -d' ' -f1)"
|
||||
if [ -e "${swapdev}" ]; then
|
||||
|
Reference in New Issue
Block a user