diff --git a/Makefile b/Makefile index 0dff16f..fed55b0 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ VERSION = $(file vchan = libvchan_server_init(d->remote_domid, QUBESDB_VCHAN_PORT, 4096, 4096); #else + usleep(5 * 1000 * 1000); // Hack: give libkvmchan some time to acknowledge the new domain // We give a 5 minute timeout here because xeniface can take some time // to load the first time after reboot after pvdrivers installation. - d->vchan = VchanInitServer(d->remote_domid, QUBESDB_VCHAN_PORT, 4096, 5 * 60 * 1000); + ////d->vchan = VchanInitServer(d->remote_domid, QUBESDB_VCHAN_PORT, 4096, 5 * 60 * 1000); + d->vchan = libvchan_server_init(d->remote_domid, QUBESDB_VCHAN_PORT, 4096, 4096); #endif if (!d->vchan) return 0; @@ -571,7 +573,8 @@ int init_vchan(struct db_daemon_data *d) { #else // We give a 5 minute timeout here because xeniface can take some time // to load the first time after reboot after pvdrivers installation. - d->vchan = VchanInitClient(d->remote_domid, QUBESDB_VCHAN_PORT, 5 * 60 * 1000); + ////d->vchan = VchanInitClient(d->remote_domid, QUBESDB_VCHAN_PORT, 5 * 60 * 1000); + d->vchan = libvchan_client_init(d->remote_domid, QUBESDB_VCHAN_PORT); #endif if (!d->vchan) return 0; diff --git a/daemon/qubes-db.service.d/30_qubes-kvm.conf b/daemon/qubes-db.service.d/30_qubes-kvm.conf new file mode 100644 index 0000000..53097e6 --- /dev/null +++ b/daemon/qubes-db.service.d/30_qubes-kvm.conf @@ -0,0 +1,4 @@ +[Unit] +ConditionPathExists=/var/run/qubes-service/hypervisor-kvm +After=kvmchand.service +Requires=kvmchand.service diff --git a/debian/control b/debian/control index 98b8b24..c53b502 100644 --- a/debian/control +++ b/debian/control @@ -10,7 +10,7 @@ Build-Depends: python3-all-dev, python-setuptools, quilt, - libvchan-xen-dev, + libvchan-xen-dev|libvchan-kvm-dev, pkg-config Standards-Version: 4.4.0.1 Homepage: http://www.qubes-os.org @@ -18,7 +18,7 @@ Homepage: http://www.qubes-os.org Package: qubesdb Section: admin Architecture: amd64 -Depends: libqubesdb, libvchan-xen, ${shlibs:Depends}, ${misc:Depends} +Depends: libqubesdb, libvchan-xen|libvchan-kvm, ${shlibs:Depends}, ${misc:Depends} Description: QubesDB management tools and daemon. Package: qubesdb-vm diff --git a/rpm_spec/qubes-db-vm.spec.in b/rpm_spec/qubes-db-vm.spec.in index a68278b..0c65712 100644 --- a/rpm_spec/qubes-db-vm.spec.in +++ b/rpm_spec/qubes-db-vm.spec.in @@ -52,6 +52,8 @@ QubesDB daemon service. %install install -d %{buildroot}%{_unitdir} install -p -m 644 daemon/qubes-db.service %{buildroot}%{_unitdir}/ +install -d %{buildroot}%{_unitdir}/qubes-db.service.d/ +install -p -m 644 daemon/qubes-db.service.d/*.conf %{buildroot}%{_unitdir}/qubes-db.service.d/ %post %systemd_post qubes-db.service @@ -66,5 +68,8 @@ install -p -m 644 daemon/qubes-db.service %{buildroot}%{_unitdir}/ %doc %{_unitdir}/qubes-db.service +%dir %{_unitdir}/qubes-db.service.d +%{_unitdir}/qubes-db.service.d/30_qubes-kvm.conf + %changelog @CHANGELOG@ diff --git a/rpm_spec/qubes-db.spec.in b/rpm_spec/qubes-db.spec.in index d7411ac..aefc992 100644 --- a/rpm_spec/qubes-db.spec.in +++ b/rpm_spec/qubes-db.spec.in @@ -34,7 +34,8 @@ License: GPL URL: http://www.qubes-os.org/ BuildRequires: gcc -BuildRequires: qubes-libvchan-devel +#BuildRequires: qubes-libvchan-devel +BuildRequires: qubes-libvchan-kvm-devel BuildRequires: systemd-devel BuildRequires: python%{python3_pkgversion}-devel Requires: qubes-libvchan