git-remote-qubes: remove systemd dependency #268
3 changed files with 86 additions and 2 deletions
|
|
@ -1,11 +1,15 @@
|
|||
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
pkgname=git-remote-qubes
|
||||
pkgver=0.1.1
|
||||
pkgrel=0
|
||||
pkgrel=1
|
||||
pkgdesc="Inter-VM Git for Qubes OS"
|
||||
url="https://github.com/Rudd-O/git-remote-qubes"
|
||||
license="GPL-3.0-only"
|
||||
source="$pkgname-$pkgver.tar.gz::https://github.com/Rudd-O/git-remote-qubes/archive/refs/tags/v$pkgver.tar.gz"
|
||||
source="
|
||||
$pkgname-$pkgver.tar.gz::https://github.com/Rudd-O/git-remote-qubes/archive/refs/tags/v$pkgver.tar.gz
|
||||
do-not-use-systemd.patch
|
||||
qubes-rpc-ruddo-use-sh.patch
|
||||
"
|
||||
arch="noarch"
|
||||
makedepends="python3"
|
||||
|
||||
|
|
@ -20,4 +24,6 @@ package() {
|
|||
}
|
||||
sha512sums="
|
||||
69aeead4eaa3202964af9845c00115680277cbf12dbba8bd4b9669418aa17c6220708a5372db7ef76c3d7682f6a0b03b4b8a79dd438ee984db78c024fb9003ac git-remote-qubes-0.1.1.tar.gz
|
||||
64475923bc4030ce96f6029732d3907a3164ac9baa0854b24ad8d206afd77120e63fa0d0bf9f7c07b07c7dea002bf3914a24cced39ed0f46893f15b891334f56 do-not-use-systemd.patch
|
||||
7cbb9391aa8da81564c321b20db512968bd6a080fd90f0814fa684d85f3bdadd03236f7d88b2569f345623a1e4abd1f163fb571b63179e7633a8b28aac95b592 qubes-rpc-ruddo-use-sh.patch
|
||||
"
|
||||
|
|
|
|||
71
git-remote-qubes/do-not-use-systemd.patch
Normal file
71
git-remote-qubes/do-not-use-systemd.patch
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
diff --git a/git-remote-qubes.spec.orig b/git-remote-qubes.spec
|
||||
index ec745d0..80fddfb 100644
|
||||
--- a/git-remote-qubes.spec.orig
|
||||
+++ b/git-remote-qubes.spec
|
||||
@@ -21,14 +21,12 @@ BuildRequires: git
|
||||
|
||||
Requires: python3
|
||||
Requires: git-core
|
||||
-# systemd is required because of systemd-escape.
|
||||
-Requires: systemd
|
||||
|
||||
%package dom0
|
||||
Summary: Policy package for Qubes OS dom0s that arbitrates %{name}
|
||||
Requires: qubes-core-dom0 >= 4.1
|
||||
|
||||
-Requires: systemd qubes-core-dom0-linux
|
||||
+Requires: qubes-core-dom0-linux
|
||||
|
||||
%description
|
||||
This package lets you setup Git servers on your Qubes OS VMs.
|
||||
diff --git a/src/gitremotequbes/server.py.orig b/src/gitremotequbes/server.py
|
||||
index ca6e9c7..c7d06d5 100644
|
||||
--- a/src/gitremotequbes/server.py.orig
|
||||
+++ b/src/gitremotequbes/server.py
|
||||
@@ -2,7 +2,6 @@ import logging
|
||||
import os
|
||||
import shlex
|
||||
import signal
|
||||
-import subprocess
|
||||
import sys
|
||||
|
||||
import gitremotequbes.copier
|
||||
@@ -35,15 +34,6 @@ def main():
|
||||
logging.basicConfig(format="remote:" + logging.BASIC_FORMAT, level=level)
|
||||
l = logging.getLogger()
|
||||
|
||||
- trustedarg = os.getenv("QREXEC_SERVICE_ARGUMENT")
|
||||
- if trustedarg:
|
||||
- # Qubes OS subsystem has sent us an argument, and that argument
|
||||
- # is trusted, so trust that over whatever the remote process said.
|
||||
- l.debug("trustworthy argument %r sent by Qubes OS", trustedarg)
|
||||
- git_dir = subprocess.check_output([
|
||||
- "systemd-escape", "--unescape", "--", trustedarg
|
||||
- ], universal_newlines=True)[:-1]
|
||||
-
|
||||
sys.stdout.write("confirmed\n")
|
||||
|
||||
while True:
|
||||
diff --git a/src/gitremotequbes/client.py.orig b/src/gitremotequbes/client.py
|
||||
index 1adf379..826c17c 100644
|
||||
--- a/src/gitremotequbes/client.py.orig
|
||||
+++ b/src/gitremotequbes/client.py
|
||||
@@ -29,17 +29,10 @@ def main():
|
||||
|
||||
l = logging.getLogger()
|
||||
|
||||
- rpcarg = subprocess.check_output([
|
||||
- "systemd-escape", "--", url.path
|
||||
- ], universal_newlines=True)[:-1]
|
||||
- if len(rpcarg) > 64 or "\\" in rpcarg:
|
||||
- # Path is too long! We must do without rpcarg.
|
||||
- rpcarg = None
|
||||
-
|
||||
vm = subprocess.Popen(
|
||||
["/usr/lib/qubes/qrexec-client-vm",
|
||||
url.netloc,
|
||||
- "ruddo.Git" + ("+%s" % rpcarg if rpcarg else "")],
|
||||
+ "ruddo.Git"],
|
||||
stdin=subprocess.PIPE,
|
||||
stdout=subprocess.PIPE,
|
||||
bufsize=0,
|
||||
7
git-remote-qubes/qubes-rpc-ruddo-use-sh.patch
Normal file
7
git-remote-qubes/qubes-rpc-ruddo-use-sh.patch
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
diff --git a/etc/qubes-rpc/ruddo.Git.in.orig b/etc/qubes-rpc/ruddo.Git.in
|
||||
index cb19123..62af422 100755
|
||||
--- a/etc/qubes-rpc/ruddo.Git.in.orig
|
||||
+++ b/etc/qubes-rpc/ruddo.Git.in
|
||||
@@ -1 +1,2 @@
|
||||
+#!/bin/sh
|
||||
@LIBEXECDIR@/git-local-qubes
|
||||
Loading…
Add table
Add a link
Reference in a new issue