summaryrefslogtreecommitdiff
path: root/nonsystemd/libretools/Remove-systemd-support.patch
blob: 89090b1719fceb5e5375cb19b6dbfd4ef9083641 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
From bd3b3ab9bf12ad1293cd2d5eaaa44c40545bfdc5 Mon Sep 17 00:00:00 2001
From: David P <megver83@parabola.nu>
Date: Mon, 20 Aug 2018 23:17:48 -0300
Subject: [PATCH] Remove systemd support

Libretools uses systemd-nspawn and systemd-id-machine-setup

This patch removes support for them and replaces systemd-nspawn
with chroot-nspawn

Signed-off-by: David P <megver83@parabola.nu>
---
 INSTALL                         | 2 +-
 src/chroot-tools/arch-nspawn.in | 6 +++---
 src/chroot-tools/librechroot    | 2 +-
 src/chroot-tools/mkarchroot.in  | 2 --
 4 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/INSTALL b/INSTALL
index a74a376..3623f07 100644
--- a/INSTALL
+++ b/INSTALL
@@ -71,7 +71,7 @@ main libretools subpackage:
  - GNU Make (only needed for `librefetch`)
  - ssh client (OpenSSH, only needed for `librerelease`)
  - rsync
- - systemd-nspawn (for the chroot tools)
+ - chroot-nspawn (for the chroot tools)
  - tokyocabinet
 
 Configuration
diff --git a/src/chroot-tools/arch-nspawn.in b/src/chroot-tools/arch-nspawn.in
index 96b3e38..a7d7386 100644
--- a/src/chroot-tools/arch-nspawn.in
+++ b/src/chroot-tools/arch-nspawn.in
@@ -18,8 +18,8 @@ working_dir=''
 files=()
 
 usage() {
-	echo "Usage: ${0##*/} [options] working-dir [systemd-nspawn arguments]"
-	echo "A wrapper around systemd-nspawn.  Provides support for pacman."
+	echo "Usage: ${0##*/} [options] working-dir [chroot-nspawn arguments]"
+	echo "A wrapper around chroot-nspawn.  Provides support for pacman."
 	echo
 	echo ' options:'
 	echo '    -C <file>     Location of a pacman config file'
@@ -116,7 +116,7 @@ esac
 
 [[ -z $nosetarch ]] || unset CARCH
 
-exec ${CARCH:+setarch "$CARCH"} systemd-nspawn -q \
+exec ${CARCH:+setarch "$CARCH"} chroot-nspawn -q \
 	-D "$working_dir" \
 	-E "PATH=/usr/local/sbin:/usr/local/bin:/usr/bin" \
 	--register=no --keep-unit --as-pid2 \
diff --git a/src/chroot-tools/librechroot b/src/chroot-tools/librechroot
index 5d1db21..39dfc08 100755
--- a/src/chroot-tools/librechroot
+++ b/src/chroot-tools/librechroot
@@ -89,7 +89,7 @@ hack_arch_nspawn_flags() {
 			prose 'Such a binfmt_misc entry is provided by the %s
 			       package.  If you have it installed, but still see
 			       this message, you may need to restart %s.' \
-				qemu-user-static-binfmt systemd-binfmt.service
+				qemu-user-static-binfmt binfmt
 			return $EXIT_NOTINSTALLED
 		fi
 
diff --git a/src/chroot-tools/mkarchroot.in b/src/chroot-tools/mkarchroot.in
index 5165960..7ac9d1c 100644
--- a/src/chroot-tools/mkarchroot.in
+++ b/src/chroot-tools/mkarchroot.in
@@ -90,8 +90,6 @@ printf '%s.UTF-8 UTF-8\n' en_US de_DE > "$working_dir/etc/locale.gen"
 echo 'LANG=en_US.UTF-8' > "$working_dir/etc/locale.conf"
 echo "$CHROOT_VERSION" > "$working_dir/.arch-chroot"
 
-systemd-machine-id-setup --root="$working_dir"
-
 exec "$(librelib chroot/arch-nspawn)" \
 	${nosetarch:+-s} \
 	${pac_conf:+-C "$pac_conf"} \
-- 
2.18.0