Skip to content

Commit

Permalink
Added dummy qvm-move/qvm-copy do dom0
Browse files Browse the repository at this point in the history
While qvm-move and qvm-copy cannot work in dom0, their
absence is confusing. Thus, stub tools that output message
informing the user that these tools are unavailable and
qvm-move-to-vm/qvm-copy-to-vm should be used instead.

fixes QubesOS/qubes-issues#4021
  • Loading branch information
marmarta committed Jul 16, 2018
1 parent 6d08882 commit 9a039f0
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
26 changes: 26 additions & 0 deletions file-copy-vm/qvm-copy
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/bash
set -e -o pipefail
#
# The Qubes OS Project, http://www.qubes-os.org
#
# Copyright (C) 2015 Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
#

echo "${0##*/} is not supported in dom0; use ${0##*/}-to-vm instead."

exit 1
4 changes: 4 additions & 0 deletions rpm_spec/core-dom0-linux.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,9 @@ touch $RPM_BUILD_ROOT/var/lib/qubes/.qubes-exclude-block-devices
# file copy to VM
install -m 755 file-copy-vm/qfile-dom0-agent $RPM_BUILD_ROOT/usr/lib/qubes/
install -m 755 file-copy-vm/qvm-copy-to-vm $RPM_BUILD_ROOT/usr/bin/
install -m 755 file-copy-vm/qvm-copy $RPM_BUILD_ROOT/usr/bin/
ln -s qvm-copy-to-vm $RPM_BUILD_ROOT/usr/bin/qvm-move-to-vm
ln -s qvm-copy $RPM_BUILD_ROOT/usr/bin/qvm-move

### Documentation
(cd doc; make DESTDIR=$RPM_BUILD_ROOT install)
Expand Down Expand Up @@ -207,6 +209,8 @@ chmod -x /etc/grub.d/10_linux
# file copy
/usr/bin/qvm-copy-to-vm
/usr/bin/qvm-move-to-vm
/usr/bin/qvm-copy
/usr/bin/qvm-move
/usr/lib/qubes/qfile-dom0-agent
# pm-utils
/usr/lib64/pm-utils/sleep.d/52qubes-pause-vms
Expand Down

0 comments on commit 9a039f0

Please sign in to comment.