From 250ca3b6304110183779a1d3b7bd275c706f195f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Pierret=20=28fepitre=29?= Date: Mon, 26 Apr 2021 23:10:43 +0200 Subject: [PATCH] Add support for openSUSE Related QubesOS/qubes-issues#6567 --- agent/Makefile | 2 ++ agent/qrexec.pam.opensuse | 7 +++++++ rpm_spec/qubes-qrexec-vm.spec.in | 4 ++++ rpm_spec/qubes-qrexec.spec.in | 24 +++++++++++++++++++----- 4 files changed, 32 insertions(+), 5 deletions(-) create mode 100644 agent/qrexec.pam.opensuse diff --git a/agent/Makefile b/agent/Makefile index de703355..848a4140 100644 --- a/agent/Makefile +++ b/agent/Makefile @@ -47,6 +47,8 @@ else ifeq ($(os), Ubuntu) install -D -m 0644 qrexec.pam.debian $(DESTDIR)/etc/pam.d/qrexec else ifeq ($(os), Arch) install -D -m 0644 qrexec.pam.archlinux $(DESTDIR)/etc/pam.d/qrexec +else ifeq ($(os), openSUSE) + install -D -m 0644 qrexec.pam.opensuse $(DESTDIR)/etc/pam.d/qrexec else install -D -m 0644 qrexec.pam $(DESTDIR)/etc/pam.d/qrexec endif diff --git a/agent/qrexec.pam.opensuse b/agent/qrexec.pam.opensuse new file mode 100644 index 00000000..ed71b943 --- /dev/null +++ b/agent/qrexec.pam.opensuse @@ -0,0 +1,7 @@ +#%PAM-1.0 +auth sufficient pam_rootok.so +auth substack common-auth +account sufficient pam_succeed_if.so uid = 0 use_uid quiet +account include common-auth +password include common-auth +session include common-auth diff --git a/rpm_spec/qubes-qrexec-vm.spec.in b/rpm_spec/qubes-qrexec-vm.spec.in index aa2f87af..2791aecb 100644 --- a/rpm_spec/qubes-qrexec-vm.spec.in +++ b/rpm_spec/qubes-qrexec-vm.spec.in @@ -40,7 +40,11 @@ BuildRequires: qubes-core-qrexec-devel BuildRequires: lsb-core-noarch BuildRequires: systemd-devel +%if 0%{?suse_version} > 0 +Requires: %{python3_default} +%else Requires: python%{python3_pkgversion} +%endif Requires: qubes-core-qrexec = %{version}-%{release} Provides: qubes-core-agent-qrexec = 4.1.0-1 diff --git a/rpm_spec/qubes-qrexec.spec.in b/rpm_spec/qubes-qrexec.spec.in index 8deb1960..d0f83b35 100644 --- a/rpm_spec/qubes-qrexec.spec.in +++ b/rpm_spec/qubes-qrexec.spec.in @@ -33,16 +33,30 @@ License: GPL URL: http://www.qubes-os.org BuildRequires: gcc +BuildRequires: qubes-libvchan-devel + +%if 0%{?suse_version} > 0 +BuildRequires: sphinx +BuildRequires: python3 +BuildRequires: %{python3_default}-pydbus +# for building documentation +BuildRequires: %{python3_default}-Sphinx +BuildRequires: %{python3_default}-recommonmark + +Requires: %{python3_default} +Requires: %{python3_default}-gbulb +%else BuildRequires: python%{python3_pkgversion}-devel BuildRequires: python%{python3_pkgversion}-dbus # for building documentation BuildRequires: python%{python3_pkgversion}-sphinx BuildRequires: python%{python3_pkgversion}-recommonmark -BuildRequires: qubes-libvchan-devel BuildRequires: python%{python3_pkgversion}-rpm-macros -Requires: python%{python3_pkgversion} -Requires: python%{python3_pkgversion}-gbulb +Requires: python%{python3_pkgversion} +Requires: python%{python3_pkgversion}-gbulb +%endif + Conflicts: qubes-utils-libs < 4.1.0 Conflicts: qubes-core-agent-qrexec < 4.1.0 Conflicts: qubes-core-dom0 < 4.1.10 @@ -79,7 +93,7 @@ Development header and files for qubes-qrexec %build %{?set_build_flags} make all-base PYTHON=%{__python3} -make -C doc PYTHON=python3 SPHINXBUILD=sphinx-build-3 man +make -C doc PYTHON=python3 SPHINXBUILD=sphinx-build-%{python3_version} man %install make install-base \ @@ -93,7 +107,7 @@ make install-base \ make -C doc \ DESTDIR=$RPM_BUILD_ROOT \ - SPHINXBUILD=sphinx-build-3 \ + SPHINXBUILD=sphinx-build-%{python3_version} \ install %clean