summaryrefslogtreecommitdiff
path: root/nonsystemd/libretools
diff options
context:
space:
mode:
Diffstat (limited to 'nonsystemd/libretools')
-rw-r--r--nonsystemd/libretools/PKGBUILD13
-rw-r--r--nonsystemd/libretools/Remove-systemd-support.patch107
2 files changed, 114 insertions, 6 deletions
diff --git a/nonsystemd/libretools/PKGBUILD b/nonsystemd/libretools/PKGBUILD
index e1b0e953b..ed1290eb1 100644
--- a/nonsystemd/libretools/PKGBUILD
+++ b/nonsystemd/libretools/PKGBUILD
@@ -9,13 +9,15 @@ url="https://git.parabola.nu/packages/libretools.git/"
license=('GPL3' 'GPL2')
pkgver=20180428
-source=(https://repo.parabola.nu/other/$pkgname/$pkgname-$pkgver.tar.gz{,.sig})
+source=(https://repo.parabola.nu/other/$pkgname/$pkgname-$pkgver.tar.gz{,.sig}
+ Remove-systemd-support.patch)
sha256sums=('db1ec0ad1f8229ee3f8c51fe3c8cdafb5edc3550dbc1dc21bb907d4a07973224'
- 'SKIP')
+ 'SKIP'
+ '6042a1f468b5a9969f74069b19e643746bbec739cd28d066c3c3b7d96260e43e')
validpgpkeys=('99195DD3BB6FE10A2F36ED8445698744D4FFBFC9') # Luke Shumaker
pkgrel=1
-pkgrel+=.nonsystemd1
+pkgrel+=.nonsystemd2
arch=('any')
makedepends=(ruby-ronn)
checkdepends=(sh-roundup git expac tokyocabinet)
@@ -24,8 +26,7 @@ build() {
cd "$srcdir/$pkgbase-$pkgver"
# Use chroot-nspawn instead of systemd-nspawn
- sed -e 's/systemd-nspawn/chroot-nspawn/g' \
- -i src/chroot-tools/arch-nspawn.in
+ patch -p1 -i ../Remove-systemd-support.patch
make
}
@@ -54,7 +55,7 @@ package_libretools() {
make # `librefetch`
openssh # `librerelease`
rsync # `librerelease` and `makechrootpkg.sh`
- chroot-nspawn # systemd-nspawn
+ chroot-nspawn # chroot-nspawn
tokyocabinet # `toru`
#namcap # Namcap is currently dissabled in libremakepkg :-(
#subversion # `diff-unfree` # ignore because of xbs
diff --git a/nonsystemd/libretools/Remove-systemd-support.patch b/nonsystemd/libretools/Remove-systemd-support.patch
new file mode 100644
index 000000000..0e1eb0311
--- /dev/null
+++ b/nonsystemd/libretools/Remove-systemd-support.patch
@@ -0,0 +1,107 @@
+From 16e877ff4f66de4a24b614ea74adb9f35142f06f Mon Sep 17 00:00:00 2001
+From: David P <megver83@parabola.nu>
+Date: Sat, 12 May 2018 13:53:09 -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 | 18 +++++++++---------
+ src/chroot-tools/mkarchroot.in | 2 --
+ 4 files changed, 13 insertions(+), 15 deletions(-)
+
+diff --git a/INSTALL b/INSTALL
+index e91f1ea..b8516ec 100644
+--- a/INSTALL
++++ b/INSTALL
+@@ -76,7 +76,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 c448056..a90b90a 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'
+@@ -115,7 +115,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 868741f..f81fbca 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
+
+@@ -405,14 +405,14 @@ main() {
+ umask 0022
+
+ # XXX: SYSTEMD-STDIN HACK
+- if ! [[ -t 0 ]]; then
+- error "Input is not a TTY"
+- plain "https://labs.parabola.nu/issues/431"
+- plain "https://bugs.freedesktop.org/show_bug.cgi?id=70290"
+- prose "Due to a bug in systemd-nspawn, redirecting stdin is not
+- supported." >&2
+- return $EXIT_FAILURE
+- fi
++# if ! [[ -t 0 ]]; then
++# error "Input is not a TTY"
++# plain "https://labs.parabola.nu/issues/431"
++# plain "https://bugs.freedesktop.org/show_bug.cgi?id=70290"
++# prose "Due to a bug in systemd-nspawn, redirecting stdin is not
++# supported." >&2
++# return $EXIT_FAILURE
++# fi
+
+ # Keep this lock for as long as we are running
+ # Note that '9' is the same FD number as in mkarchroot et al.
+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.17.0
+