2010-04-05 20:58:57 +02:00
|
|
|
#
|
|
|
|
# This is the SPEC file for creating binary RPMs for the Dom0.
|
|
|
|
#
|
|
|
|
#
|
|
|
|
# The Qubes OS Project, http://www.qubes-os.org
|
|
|
|
#
|
|
|
|
# Copyright (C) 2010 Joanna Rutkowska <joanna@invisiblethingslab.com>
|
|
|
|
# Copyright (C) 2010 Rafal Wojtczuk <rafal@invisiblethingslab.com>
|
|
|
|
#
|
2017-10-12 00:11:50 +02:00
|
|
|
# This library is free software; you can redistribute it and/or
|
|
|
|
# modify it under the terms of the GNU Lesser General Public
|
|
|
|
# License as published by the Free Software Foundation; either
|
|
|
|
# version 2.1 of the License, or (at your option) any later version.
|
2010-04-05 20:58:57 +02:00
|
|
|
#
|
2017-10-12 00:11:50 +02:00
|
|
|
# This library is distributed in the hope that it will be useful,
|
2010-04-05 20:58:57 +02:00
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
2017-10-12 00:11:50 +02:00
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
# Lesser General Public License for more details.
|
2010-04-05 20:58:57 +02:00
|
|
|
#
|
2017-10-12 00:11:50 +02:00
|
|
|
# You should have received a copy of the GNU Lesser General Public
|
|
|
|
# License along with this library; if not, see <https://www.gnu.org/licenses/>.
|
2010-04-05 20:58:57 +02:00
|
|
|
#
|
|
|
|
#
|
|
|
|
|
2013-01-25 03:09:18 +01:00
|
|
|
%define _dracutmoddir /usr/lib/dracut/modules.d
|
2018-04-02 20:06:53 +02:00
|
|
|
%define backend_vmm @BACKEND_VMM@
|
|
|
|
|
2010-04-05 20:58:57 +02:00
|
|
|
Name: qubes-core-dom0
|
2018-01-25 11:55:39 +01:00
|
|
|
Version: @VERSION@
|
2014-04-15 04:09:13 +02:00
|
|
|
Release: 1%{dist}
|
2010-04-05 20:58:57 +02:00
|
|
|
Summary: The Qubes core files (Dom0-side)
|
|
|
|
|
|
|
|
Group: Qubes
|
|
|
|
Vendor: Invisible Things Lab
|
|
|
|
License: GPL
|
|
|
|
URL: http://www.qubes-os.org
|
2015-01-13 18:23:04 +01:00
|
|
|
|
2015-12-22 14:21:28 +01:00
|
|
|
# because we have "#!/usr/bin/env python" shebangs, RPM puts
|
|
|
|
# "Requires: $(which # python)" dependency, which, depending on $PATH order,
|
|
|
|
# may point to /usr/bin/python or /bin/python (because Fedora has this stupid
|
|
|
|
# /bin -> usr/bin symlink). python*.rpm provides only /usr/bin/python.
|
|
|
|
AutoReq: no
|
|
|
|
|
2020-04-20 03:45:37 +02:00
|
|
|
BuildArch: noarch
|
2016-04-11 13:03:12 +02:00
|
|
|
|
2013-02-19 01:05:22 +01:00
|
|
|
BuildRequires: ImageMagick
|
2013-01-27 00:04:40 +01:00
|
|
|
BuildRequires: systemd-units
|
2017-05-17 03:05:34 +02:00
|
|
|
BuildRequires: systemd
|
2015-01-13 18:23:04 +01:00
|
|
|
|
2017-01-20 12:40:00 +01:00
|
|
|
BuildRequires: python3-devel
|
|
|
|
|
2015-01-13 18:23:04 +01:00
|
|
|
# for building documentation
|
2017-01-20 12:40:00 +01:00
|
|
|
BuildRequires: python3-sphinx
|
2017-05-11 22:09:59 +02:00
|
|
|
BuildRequires: python3-lxml
|
2017-01-20 12:40:00 +01:00
|
|
|
BuildRequires: libvirt-python3
|
|
|
|
BuildRequires: python3-dbus
|
2017-07-20 03:07:46 +02:00
|
|
|
BuildRequires: python3-PyYAML
|
2019-11-22 14:47:23 +01:00
|
|
|
BuildRequires: python3-xen
|
2015-01-13 18:23:04 +01:00
|
|
|
|
2013-01-27 00:04:40 +01:00
|
|
|
Requires(post): systemd-units
|
|
|
|
Requires(preun): systemd-units
|
|
|
|
Requires(postun): systemd-units
|
2017-03-30 23:23:30 +02:00
|
|
|
|
|
|
|
Requires: python3
|
|
|
|
#Requires: python3-aiofiles
|
|
|
|
Requires: python3-docutils
|
|
|
|
Requires: python3-jinja2
|
|
|
|
Requires: python3-lxml
|
|
|
|
Requires: python3-qubesdb
|
|
|
|
Requires: python3-setuptools
|
2017-07-20 03:07:46 +02:00
|
|
|
Requires: python3-PyYAML
|
2017-03-30 23:23:30 +02:00
|
|
|
Requires: python3-xen
|
|
|
|
Requires: libvirt-python3
|
|
|
|
|
|
|
|
Requires: pciutils
|
2018-02-20 01:18:15 +01:00
|
|
|
Requires: qubes-core-dom0-linux >= 4.0.11
|
2020-05-24 02:07:23 +02:00
|
|
|
# policy (daemon) using changed qubesd socket protocol
|
|
|
|
Requires: qubes-core-qrexec-dom0 >= 4.1.8
|
2013-06-07 05:16:15 +02:00
|
|
|
Requires: qubes-db-dom0
|
2013-03-16 02:39:30 +01:00
|
|
|
# TODO: R: qubes-gui-dom0 >= 2.1.11
|
2011-02-09 22:15:00 +01:00
|
|
|
Conflicts: qubes-gui-dom0 < 1.1.13
|
2013-05-16 02:01:52 +02:00
|
|
|
%if x%{?backend_vmm} == xxen
|
2013-06-07 05:07:40 +02:00
|
|
|
Requires: xen-runtime
|
2012-03-01 10:57:34 +01:00
|
|
|
Requires: xen-hvm
|
2020-02-17 03:59:11 +01:00
|
|
|
Requires: xen-hvm-stubdom-linux >= 1.0.13
|
2018-01-27 01:21:05 +01:00
|
|
|
Requires: libvirt-daemon-xen >= 3.3.0-7
|
2013-05-16 02:01:52 +02:00
|
|
|
%endif
|
2012-01-30 16:27:12 +01:00
|
|
|
Requires: cronie
|
2017-02-23 00:45:58 +01:00
|
|
|
Requires: scrypt
|
2013-03-09 22:20:47 +01:00
|
|
|
# for qubes-hcl-report
|
|
|
|
Requires: dmidecode
|
2013-03-01 01:36:05 +01:00
|
|
|
|
2020-05-26 02:30:24 +02:00
|
|
|
# qubesd socket protocol
|
|
|
|
Conflicts: python3-qubesadmin < 4.1.6
|
|
|
|
|
2019-07-11 09:39:32 +02:00
|
|
|
# Required for qvm-console* tools
|
|
|
|
Requires: socat
|
|
|
|
|
2017-05-17 03:05:34 +02:00
|
|
|
%{?systemd_requires}
|
|
|
|
|
2017-05-11 22:09:59 +02:00
|
|
|
Obsoletes: qubes-core-dom0-doc <= 4.0
|
|
|
|
Provides: qubes-core-dom0-doc
|
|
|
|
|
2013-03-01 01:36:05 +01:00
|
|
|
# Prevent preupgrade from installation (it pretend to provide distribution upgrade)
|
|
|
|
Obsoletes: preupgrade < 2.0
|
|
|
|
Provides: preupgrade = 2.0
|
2018-01-25 11:55:39 +01:00
|
|
|
|
|
|
|
Source0: %{name}-%{version}.tar.gz
|
|
|
|
|
2010-04-05 20:58:57 +02:00
|
|
|
%description
|
|
|
|
The Qubes core files for installation on Dom0.
|
|
|
|
|
2012-12-12 04:12:59 +01:00
|
|
|
%prep
|
2018-01-25 11:55:39 +01:00
|
|
|
%setup -q
|
2012-12-12 04:12:59 +01:00
|
|
|
|
2010-04-10 13:52:19 +02:00
|
|
|
%build
|
|
|
|
|
2013-06-15 23:14:54 +02:00
|
|
|
make all
|
2017-05-11 22:09:59 +02:00
|
|
|
make -C doc PYTHON=%{__python3} SPHINXBUILD=sphinx-build-%{python3_version} man
|
2010-04-05 20:58:57 +02:00
|
|
|
|
2013-06-15 23:14:54 +02:00
|
|
|
%install
|
2010-10-06 11:00:52 +02:00
|
|
|
|
2013-06-15 23:14:54 +02:00
|
|
|
make install \
|
|
|
|
DESTDIR=$RPM_BUILD_ROOT \
|
2018-09-29 02:40:28 +02:00
|
|
|
BACKEND_VMM=%{backend_vmm} \
|
2013-06-15 23:14:54 +02:00
|
|
|
UNITDIR=%{_unitdir} \
|
2017-01-20 12:40:00 +01:00
|
|
|
PYTHON_SITEPATH=%{python3_sitelib} \
|
2013-06-15 23:14:54 +02:00
|
|
|
SYSCONFDIR=%{_sysconfdir}
|
2011-09-02 16:55:39 +02:00
|
|
|
|
2017-05-11 22:09:59 +02:00
|
|
|
make -C doc DESTDIR=$RPM_BUILD_ROOT \
|
|
|
|
PYTHON=%{__python3} SPHINXBUILD=sphinx-build-%{python3_version} \
|
|
|
|
install
|
|
|
|
|
2017-07-21 03:16:57 +02:00
|
|
|
mkdir -p $RPM_BUILD_ROOT/etc/qubes/backup
|
|
|
|
|
2017-05-11 22:09:59 +02:00
|
|
|
|
2010-04-05 20:58:57 +02:00
|
|
|
%post
|
2017-05-17 03:05:34 +02:00
|
|
|
%systemd_post qubes-core.service
|
|
|
|
%systemd_post qubes-qmemman.service
|
|
|
|
%systemd_post qubesd.service
|
2010-06-14 23:52:21 +02:00
|
|
|
|
2011-06-23 14:39:17 +02:00
|
|
|
sed '/^autoballoon=/d;/^lockfile=/d' -i /etc/xen/xl.conf
|
|
|
|
echo 'autoballoon=0' >> /etc/xen/xl.conf
|
|
|
|
echo 'lockfile="/var/run/qubes/xl-lock"' >> /etc/xen/xl.conf
|
|
|
|
|
2016-11-03 22:18:09 +01:00
|
|
|
if [ -e /etc/sysconfig/prelink ]; then
|
2011-10-07 21:28:26 +02:00
|
|
|
sed 's/^PRELINKING\s*=.*/PRELINKING=no/' -i /etc/sysconfig/prelink
|
2016-11-03 22:18:09 +01:00
|
|
|
fi
|
2011-10-07 21:28:26 +02:00
|
|
|
|
2013-01-27 00:04:40 +01:00
|
|
|
# Conflicts with libxl stack, so disable it
|
|
|
|
systemctl --no-reload disable xend.service >/dev/null 2>&1
|
2013-02-13 16:54:29 +01:00
|
|
|
systemctl --no-reload disable xendomains.service >/dev/null 2>&1
|
2013-05-04 04:33:07 +02:00
|
|
|
systemctl daemon-reload >/dev/null 2>&1 || :
|
2013-01-27 00:04:40 +01:00
|
|
|
|
2010-04-05 20:58:57 +02:00
|
|
|
if ! [ -e /var/lib/qubes/qubes.xml ]; then
|
|
|
|
# echo "Initializing Qubes DB..."
|
2016-11-02 06:27:15 +01:00
|
|
|
umask 007; sg qubes -c 'qubes-create --offline-mode'
|
2010-04-05 20:58:57 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
%clean
|
|
|
|
rm -rf $RPM_BUILD_ROOT
|
2012-12-12 04:12:59 +01:00
|
|
|
rm -f %{name}-%{version}
|
2010-04-05 20:58:57 +02:00
|
|
|
|
|
|
|
%pre
|
|
|
|
if ! grep -q ^qubes: /etc/group ; then
|
|
|
|
groupadd qubes
|
|
|
|
fi
|
|
|
|
|
2010-10-04 15:25:58 +02:00
|
|
|
%triggerin -- xen-runtime
|
2013-03-14 15:06:19 +01:00
|
|
|
/usr/lib/qubes/fix-dir-perms.sh
|
2010-10-04 15:25:58 +02:00
|
|
|
|
2010-04-05 20:58:57 +02:00
|
|
|
%preun
|
2017-05-17 03:05:34 +02:00
|
|
|
%systemd_preun qubes-core.service
|
|
|
|
%systemd_preun qubes-qmemman.service
|
|
|
|
%systemd_preun qubesd.service
|
|
|
|
|
2010-04-05 20:58:57 +02:00
|
|
|
if [ "$1" = 0 ] ; then
|
2010-10-04 14:21:14 +02:00
|
|
|
# no more packages left
|
2013-01-27 00:04:40 +01:00
|
|
|
service qubes_netvm stop
|
|
|
|
service qubes_core stop
|
2010-04-05 20:58:57 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
%postun
|
2017-05-17 03:05:34 +02:00
|
|
|
%systemd_postun qubes-core.service
|
|
|
|
%systemd_postun_with_restart qubes-qmemman.service
|
|
|
|
%systemd_postun_with_restart qubesd.service
|
|
|
|
|
2010-04-05 20:58:57 +02:00
|
|
|
if [ "$1" = 0 ] ; then
|
|
|
|
# no more packages left
|
|
|
|
chgrp root /etc/xen
|
|
|
|
chmod 700 /etc/xen
|
|
|
|
groupdel qubes
|
|
|
|
fi
|
|
|
|
|
2020-05-15 03:00:28 +02:00
|
|
|
%posttrans
|
|
|
|
|
|
|
|
# Preserve user-modified legacy policy at original location, revert rpm adding
|
|
|
|
# .rpmsave suffix. This needs to be done in %%posttrans, to be run after
|
|
|
|
# uninstalling the old package.
|
|
|
|
|
|
|
|
# List policy files explicitly, to not touch files from other packages.
|
|
|
|
SERVICES="
|
|
|
|
admin.Events
|
|
|
|
admin.backup.Cancel
|
|
|
|
admin.backup.Execute
|
|
|
|
admin.backup.Info
|
|
|
|
admin.deviceclass.List
|
|
|
|
admin.label.Create
|
|
|
|
admin.label.Get
|
|
|
|
admin.label.Index
|
|
|
|
admin.label.List
|
|
|
|
admin.label.Remove
|
|
|
|
admin.pool.Add
|
|
|
|
admin.pool.Info
|
|
|
|
admin.pool.List
|
|
|
|
admin.pool.ListDrivers
|
|
|
|
admin.pool.Remove
|
|
|
|
admin.pool.Set.revisions_to_keep
|
|
|
|
admin.pool.UsageDetails
|
|
|
|
admin.pool.volume.List
|
|
|
|
admin.property.Get
|
|
|
|
admin.property.GetAll
|
|
|
|
admin.property.GetDefault
|
|
|
|
admin.property.Help
|
|
|
|
admin.property.List
|
|
|
|
admin.property.Reset
|
|
|
|
admin.property.Set
|
|
|
|
admin.vm.Console
|
|
|
|
admin.vm.Create.AppVM
|
|
|
|
admin.vm.Create.DispVM
|
|
|
|
admin.vm.Create.StandaloneVM
|
|
|
|
admin.vm.Create.TemplateVM
|
|
|
|
admin.vm.CreateDisposable
|
|
|
|
admin.vm.CreateInPool.AppVM
|
|
|
|
admin.vm.CreateInPool.DispVM
|
|
|
|
admin.vm.CreateInPool.StandaloneVM
|
|
|
|
admin.vm.CreateInPool.TemplateVM
|
|
|
|
admin.vm.CurrentState
|
|
|
|
admin.vm.Kill
|
|
|
|
admin.vm.List
|
|
|
|
admin.vm.Pause
|
|
|
|
admin.vm.Remove
|
|
|
|
admin.vm.Shutdown
|
|
|
|
admin.vm.Start
|
|
|
|
admin.vm.Stats
|
|
|
|
admin.vm.Unpause
|
|
|
|
admin.vm.device.block.Attach
|
|
|
|
admin.vm.device.block.Available
|
|
|
|
admin.vm.device.block.Detach
|
|
|
|
admin.vm.device.block.List
|
|
|
|
admin.vm.device.block.Set.persistent
|
|
|
|
admin.vm.device.pci.Attach
|
|
|
|
admin.vm.device.pci.Available
|
|
|
|
admin.vm.device.pci.Detach
|
|
|
|
admin.vm.device.pci.List
|
|
|
|
admin.vm.device.pci.Set.persistent
|
|
|
|
admin.vm.feature.CheckWithAdminVM
|
|
|
|
admin.vm.feature.CheckWithNetvm
|
|
|
|
admin.vm.feature.CheckWithTemplate
|
|
|
|
admin.vm.feature.CheckWithTemplateAndAdminVM
|
|
|
|
admin.vm.feature.Get
|
|
|
|
admin.vm.feature.List
|
|
|
|
admin.vm.feature.Remove
|
|
|
|
admin.vm.feature.Set
|
|
|
|
admin.vm.firewall.Get
|
|
|
|
admin.vm.firewall.Reload
|
|
|
|
admin.vm.firewall.Set
|
|
|
|
admin.vm.property.Get
|
|
|
|
admin.vm.property.GetAll
|
|
|
|
admin.vm.property.GetDefault
|
|
|
|
admin.vm.property.Help
|
|
|
|
admin.vm.property.List
|
|
|
|
admin.vm.property.Reset
|
|
|
|
admin.vm.property.Set
|
|
|
|
admin.vm.tag.Get
|
|
|
|
admin.vm.tag.List
|
|
|
|
admin.vm.tag.Remove
|
|
|
|
admin.vm.tag.Set
|
|
|
|
admin.vm.volume.CloneFrom
|
|
|
|
admin.vm.volume.CloneTo
|
|
|
|
admin.vm.volume.Import
|
|
|
|
admin.vm.volume.ImportWithSize
|
|
|
|
admin.vm.volume.Info
|
|
|
|
admin.vm.volume.List
|
|
|
|
admin.vm.volume.ListSnapshots
|
|
|
|
admin.vm.volume.Resize
|
|
|
|
admin.vm.volume.Revert
|
|
|
|
admin.vm.volume.Set.revisions_to_keep
|
|
|
|
admin.vm.volume.Set.rw
|
|
|
|
admin.vmclass.List
|
|
|
|
include/admin-global-ro
|
|
|
|
include/admin-global-rwx
|
|
|
|
include/admin-local-ro
|
|
|
|
include/admin-local-rwx
|
|
|
|
policy.RegisterArgument
|
|
|
|
qubes.ConnectTCP
|
|
|
|
qubes.FeaturesRequest
|
|
|
|
qubes.Filecopy
|
|
|
|
qubes.GetDate
|
|
|
|
qubes.GetImageRGBA
|
|
|
|
qubes.GetRandomizedTime
|
|
|
|
qubes.NotifyTools
|
|
|
|
qubes.NotifyUpdates
|
|
|
|
qubes.OpenInVM
|
|
|
|
qubes.OpenURL
|
|
|
|
qubes.StartApp
|
|
|
|
qubes.UpdatesProxy
|
|
|
|
qubes.VMExec
|
|
|
|
qubes.VMExecGUI
|
|
|
|
qubes.VMRootShell
|
|
|
|
qubes.VMShell
|
|
|
|
"
|
|
|
|
|
|
|
|
for service in $SERVICES; do
|
|
|
|
if [ -f "/etc/qubes-rpc/policy/$service.rpmsave" ] && \
|
|
|
|
! [ -e "/etc/qubes-rpc/policy/$service" ]; then
|
|
|
|
mv -n "/etc/qubes-rpc/policy/$service.rpmsave" \
|
|
|
|
"/etc/qubes-rpc/policy/$service"
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
# Take extra care about policy files in include/ - if any of them is gone
|
|
|
|
# (because unmodified) but user still reference them anywhere, the policy
|
|
|
|
# loading will be broken. Check for this case, and avoid the issue by creating
|
|
|
|
# a symlink to the new policy.
|
|
|
|
|
|
|
|
INCLUDES="admin-global-ro admin-global-rwx admin-local-ro admin-local-rwx"
|
|
|
|
|
|
|
|
for include in $INCLUDES; do
|
|
|
|
if grep -qr "include/$include" /etc/qubes-rpc && \
|
|
|
|
! [ -e "/etc/qubes-rpc/policy/include/$include" ]; then
|
|
|
|
ln -s "../../../qubes/policy.d/include/$include" \
|
|
|
|
"/etc/qubes-rpc/policy/include/$include"
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
2010-04-05 20:58:57 +02:00
|
|
|
%files
|
|
|
|
%defattr(-,root,root,-)
|
2012-03-29 16:17:10 +02:00
|
|
|
%config(noreplace) %attr(0664,root,qubes) %{_sysconfdir}/qubes/qmemman.conf
|
2019-01-06 04:32:32 +01:00
|
|
|
%config(noreplace) /etc/logrotate.d/qubes
|
2017-07-21 03:16:57 +02:00
|
|
|
%attr(770,root,qubes) %dir /etc/qubes/backup
|
2010-04-05 20:58:57 +02:00
|
|
|
/usr/bin/qvm-*
|
2012-02-07 03:24:52 +01:00
|
|
|
/usr/bin/qubes-*
|
2015-10-01 22:14:35 +02:00
|
|
|
/usr/bin/qmemmand
|
2017-02-09 21:11:41 +01:00
|
|
|
/usr/bin/qubesd*
|
2015-01-13 18:23:04 +01:00
|
|
|
|
2017-05-11 22:09:59 +02:00
|
|
|
%{_mandir}/man1/qubes*.1*
|
2018-01-11 03:44:53 +01:00
|
|
|
%{_mandir}/man1/qvm-*.1*
|
2017-05-11 22:09:59 +02:00
|
|
|
|
2017-01-20 12:40:00 +01:00
|
|
|
%dir %{python3_sitelib}/qubes-*.egg-info
|
|
|
|
%{python3_sitelib}/qubes-*.egg-info/*
|
|
|
|
|
|
|
|
%dir %{python3_sitelib}/qubes
|
|
|
|
%dir %{python3_sitelib}/qubes/__pycache__
|
|
|
|
%{python3_sitelib}/qubes/__pycache__/*
|
|
|
|
%{python3_sitelib}/qubes/__init__.py
|
|
|
|
%{python3_sitelib}/qubes/app.py
|
|
|
|
%{python3_sitelib}/qubes/backup.py
|
|
|
|
%{python3_sitelib}/qubes/config.py
|
|
|
|
%{python3_sitelib}/qubes/devices.py
|
|
|
|
%{python3_sitelib}/qubes/dochelpers.py
|
|
|
|
%{python3_sitelib}/qubes/events.py
|
|
|
|
%{python3_sitelib}/qubes/exc.py
|
2018-11-15 16:59:00 +01:00
|
|
|
%{python3_sitelib}/qubes/features.py
|
2017-02-02 13:03:08 +01:00
|
|
|
%{python3_sitelib}/qubes/firewall.py
|
2017-01-20 12:40:00 +01:00
|
|
|
%{python3_sitelib}/qubes/log.py
|
|
|
|
%{python3_sitelib}/qubes/rngdoc.py
|
|
|
|
%{python3_sitelib}/qubes/tarwriter.py
|
|
|
|
%{python3_sitelib}/qubes/utils.py
|
|
|
|
|
2017-05-12 19:07:41 +02:00
|
|
|
%dir %{python3_sitelib}/qubes/api
|
|
|
|
%dir %{python3_sitelib}/qubes/api/__pycache__
|
|
|
|
%{python3_sitelib}/qubes/api/__pycache__/*
|
|
|
|
%{python3_sitelib}/qubes/api/__init__.py
|
|
|
|
%{python3_sitelib}/qubes/api/admin.py
|
2017-06-03 04:52:30 +02:00
|
|
|
%{python3_sitelib}/qubes/api/internal.py
|
|
|
|
%{python3_sitelib}/qubes/api/misc.py
|
2017-05-12 19:07:41 +02:00
|
|
|
|
2017-01-20 12:40:00 +01:00
|
|
|
%dir %{python3_sitelib}/qubes/vm
|
|
|
|
%dir %{python3_sitelib}/qubes/vm/__pycache__
|
|
|
|
%{python3_sitelib}/qubes/vm/__pycache__/*
|
|
|
|
%{python3_sitelib}/qubes/vm/__init__.py
|
|
|
|
%{python3_sitelib}/qubes/vm/adminvm.py
|
|
|
|
%{python3_sitelib}/qubes/vm/appvm.py
|
|
|
|
%{python3_sitelib}/qubes/vm/dispvm.py
|
|
|
|
%{python3_sitelib}/qubes/vm/qubesvm.py
|
|
|
|
%{python3_sitelib}/qubes/vm/standalonevm.py
|
|
|
|
%{python3_sitelib}/qubes/vm/templatevm.py
|
|
|
|
|
|
|
|
%dir %{python3_sitelib}/qubes/vm/mix
|
|
|
|
%dir %{python3_sitelib}/qubes/vm/mix/__pycache__
|
|
|
|
%{python3_sitelib}/qubes/vm/mix/__pycache__/*
|
|
|
|
%{python3_sitelib}/qubes/vm/mix/__init__.py
|
2019-02-27 05:50:26 +01:00
|
|
|
%{python3_sitelib}/qubes/vm/mix/dvmtemplate.py
|
2017-01-20 12:40:00 +01:00
|
|
|
%{python3_sitelib}/qubes/vm/mix/net.py
|
|
|
|
|
|
|
|
%dir %{python3_sitelib}/qubes/storage
|
|
|
|
%dir %{python3_sitelib}/qubes/storage/__pycache__
|
|
|
|
%{python3_sitelib}/qubes/storage/__pycache__/*
|
|
|
|
%{python3_sitelib}/qubes/storage/__init__.py
|
|
|
|
%{python3_sitelib}/qubes/storage/file.py
|
file-reflink, a storage driver optimized for CoW filesystems
This adds the file-reflink storage driver. It is never selected
automatically for pool creation, especially not the creation of
'varlibqubes' (though it can be used if set up manually).
The code is quite small:
reflink.py lvm.py file.py + block-snapshot
sloccount 334 lines 447 (134%) 570 (171%)
Background: btrfs and XFS (but not yet ZFS) support instant copies of
individual files through the 'FICLONE' ioctl behind 'cp --reflink'.
Which file-reflink uses to snapshot VM image files without an extra
device-mapper layer. All the snapshots are essentially freestanding;
there's no functional origin vs. snapshot distinction.
In contrast to 'file'-on-btrfs, file-reflink inherently avoids
CoW-on-CoW. Which is a bigger issue now on R4.0, where even AppVMs'
private volumes are CoW. (And turning off the lower, filesystem-level
CoW for 'file'-on-btrfs images would turn off data checksums too, i.e.
protection against bit rot.)
Also in contrast to 'file', all storage features are supported,
including
- any number of revisions_to_keep
- volume.revert()
- volume.is_outdated
- online fstrim/discard
Example tree of a file-reflink pool - *-dirty.img are connected to Xen:
- /var/lib/testpool/appvms/foo/volatile-dirty.img
- /var/lib/testpool/appvms/foo/root-dirty.img
- /var/lib/testpool/appvms/foo/root.img
- /var/lib/testpool/appvms/foo/private-dirty.img
- /var/lib/testpool/appvms/foo/private.img
- /var/lib/testpool/appvms/foo/private.img@2018-01-02T03:04:05Z
- /var/lib/testpool/appvms/foo/private.img@2018-01-02T04:05:06Z
- /var/lib/testpool/appvms/foo/private.img@2018-01-02T05:06:07Z
- /var/lib/testpool/appvms/bar/...
- /var/lib/testpool/appvms/...
- /var/lib/testpool/template-vms/fedora-26/...
- /var/lib/testpool/template-vms/...
It looks similar to a 'file' pool tree, and in fact file-reflink is
drop-in compatible:
$ qvm-shutdown --all --wait
$ systemctl stop qubesd
$ sed 's/ driver="file"/ driver="file-reflink"/g' -i.bak /var/lib/qubes/qubes.xml
$ systemctl start qubesd
$ sudo rm -f /path/to/pool/*/*/*-cow.img*
If the user tries to create a fresh file-reflink pool on a filesystem
that doesn't support reflinks, qvm-pool will abort and mention the
'setup_check=no' option. Which can be passed to force a fallback on
regular sparse copies, with of course lots of time/space overhead. The
same fallback code is also used when initially cloning a VM from a
foreign pool, or from another file-reflink pool on a different
mountpoint.
'journalctl -fu qubesd' will show all file-reflink copy/rename/remove
operations on VM creation/startup/shutdown/etc.
2018-02-12 22:20:05 +01:00
|
|
|
%{python3_sitelib}/qubes/storage/reflink.py
|
2017-01-20 12:40:00 +01:00
|
|
|
%{python3_sitelib}/qubes/storage/kernels.py
|
|
|
|
%{python3_sitelib}/qubes/storage/lvm.py
|
|
|
|
|
|
|
|
%dir %{python3_sitelib}/qubes/tools
|
|
|
|
%dir %{python3_sitelib}/qubes/tools/__pycache__
|
|
|
|
%{python3_sitelib}/qubes/tools/__pycache__/*
|
|
|
|
%{python3_sitelib}/qubes/tools/__init__.py
|
|
|
|
%{python3_sitelib}/qubes/tools/qmemmand.py
|
|
|
|
%{python3_sitelib}/qubes/tools/qubes_create.py
|
2017-02-02 13:03:08 +01:00
|
|
|
%{python3_sitelib}/qubes/tools/qubesd.py
|
2017-02-09 21:11:41 +01:00
|
|
|
%{python3_sitelib}/qubes/tools/qubesd_query.py
|
2017-01-20 12:40:00 +01:00
|
|
|
|
|
|
|
%dir %{python3_sitelib}/qubes/ext
|
|
|
|
%dir %{python3_sitelib}/qubes/ext/__pycache__
|
|
|
|
%{python3_sitelib}/qubes/ext/__pycache__/*
|
|
|
|
%{python3_sitelib}/qubes/ext/__init__.py
|
2017-06-23 10:26:04 +02:00
|
|
|
%{python3_sitelib}/qubes/ext/admin.py
|
2019-09-15 03:41:33 +02:00
|
|
|
%{python3_sitelib}/qubes/ext/backup_restore.py
|
2017-05-29 21:20:06 +02:00
|
|
|
%{python3_sitelib}/qubes/ext/block.py
|
2017-06-12 12:22:39 +02:00
|
|
|
%{python3_sitelib}/qubes/ext/core_features.py
|
2017-01-20 12:40:00 +01:00
|
|
|
%{python3_sitelib}/qubes/ext/gui.py
|
2020-02-27 10:31:27 +01:00
|
|
|
%{python3_sitelib}/qubes/ext/audio.py
|
2017-01-20 12:40:00 +01:00
|
|
|
%{python3_sitelib}/qubes/ext/pci.py
|
|
|
|
%{python3_sitelib}/qubes/ext/r3compatibility.py
|
2017-07-28 15:08:33 +02:00
|
|
|
%{python3_sitelib}/qubes/ext/services.py
|
2020-09-23 00:57:30 +02:00
|
|
|
%{python3_sitelib}/qubes/ext/supported_features.py
|
2018-07-09 19:42:18 +02:00
|
|
|
%{python3_sitelib}/qubes/ext/windows.py
|
2017-01-20 12:40:00 +01:00
|
|
|
|
|
|
|
%dir %{python3_sitelib}/qubes/tests
|
|
|
|
%dir %{python3_sitelib}/qubes/tests/__pycache__
|
|
|
|
%{python3_sitelib}/qubes/tests/__pycache__/*
|
|
|
|
%{python3_sitelib}/qubes/tests/__init__.py
|
|
|
|
%{python3_sitelib}/qubes/tests/run.py
|
|
|
|
%{python3_sitelib}/qubes/tests/extra.py
|
|
|
|
|
2017-06-21 06:25:59 +02:00
|
|
|
%{python3_sitelib}/qubes/tests/api.py
|
2017-05-12 19:07:41 +02:00
|
|
|
%{python3_sitelib}/qubes/tests/api_admin.py
|
2019-02-28 00:32:44 +01:00
|
|
|
%{python3_sitelib}/qubes/tests/api_internal.py
|
2017-06-03 04:52:30 +02:00
|
|
|
%{python3_sitelib}/qubes/tests/api_misc.py
|
2017-01-20 12:40:00 +01:00
|
|
|
%{python3_sitelib}/qubes/tests/app.py
|
|
|
|
%{python3_sitelib}/qubes/tests/devices.py
|
2017-05-29 21:20:06 +02:00
|
|
|
%{python3_sitelib}/qubes/tests/devices_block.py
|
2017-01-20 12:40:00 +01:00
|
|
|
%{python3_sitelib}/qubes/tests/events.py
|
2017-06-12 12:22:39 +02:00
|
|
|
%{python3_sitelib}/qubes/tests/ext.py
|
2017-01-20 12:40:00 +01:00
|
|
|
%{python3_sitelib}/qubes/tests/firewall.py
|
|
|
|
%{python3_sitelib}/qubes/tests/init.py
|
2020-01-20 18:14:05 +01:00
|
|
|
%{python3_sitelib}/qubes/tests/rpc_import.py
|
2017-01-20 12:40:00 +01:00
|
|
|
%{python3_sitelib}/qubes/tests/storage.py
|
|
|
|
%{python3_sitelib}/qubes/tests/storage_file.py
|
2018-09-12 01:50:32 +02:00
|
|
|
%{python3_sitelib}/qubes/tests/storage_reflink.py
|
2017-05-17 01:40:10 +02:00
|
|
|
%{python3_sitelib}/qubes/tests/storage_kernels.py
|
2017-01-20 12:40:00 +01:00
|
|
|
%{python3_sitelib}/qubes/tests/storage_lvm.py
|
|
|
|
%{python3_sitelib}/qubes/tests/tarwriter.py
|
|
|
|
|
|
|
|
%dir %{python3_sitelib}/qubes/tests/vm
|
|
|
|
%dir %{python3_sitelib}/qubes/tests/vm/__pycache__
|
|
|
|
%{python3_sitelib}/qubes/tests/vm/__pycache__/*
|
|
|
|
%{python3_sitelib}/qubes/tests/vm/__init__.py
|
|
|
|
%{python3_sitelib}/qubes/tests/vm/init.py
|
|
|
|
%{python3_sitelib}/qubes/tests/vm/adminvm.py
|
2017-06-04 01:13:57 +02:00
|
|
|
%{python3_sitelib}/qubes/tests/vm/appvm.py
|
2017-08-06 12:27:35 +02:00
|
|
|
%{python3_sitelib}/qubes/tests/vm/dispvm.py
|
2017-01-20 12:40:00 +01:00
|
|
|
%{python3_sitelib}/qubes/tests/vm/qubesvm.py
|
|
|
|
|
|
|
|
%dir %{python3_sitelib}/qubes/tests/vm/mix
|
|
|
|
%dir %{python3_sitelib}/qubes/tests/vm/mix/__pycache__
|
|
|
|
%{python3_sitelib}/qubes/tests/vm/mix/__pycache__/*
|
|
|
|
%{python3_sitelib}/qubes/tests/vm/mix/__init__.py
|
|
|
|
%{python3_sitelib}/qubes/tests/vm/mix/net.py
|
|
|
|
|
|
|
|
%dir %{python3_sitelib}/qubes/tests/tools
|
|
|
|
%dir %{python3_sitelib}/qubes/tests/tools/__pycache__
|
|
|
|
%{python3_sitelib}/qubes/tests/tools/__pycache__/*
|
|
|
|
%{python3_sitelib}/qubes/tests/tools/__init__.py
|
|
|
|
|
|
|
|
%dir %{python3_sitelib}/qubes/tests/integ
|
|
|
|
%dir %{python3_sitelib}/qubes/tests/integ/__pycache__
|
|
|
|
%{python3_sitelib}/qubes/tests/integ/__pycache__/*
|
|
|
|
%{python3_sitelib}/qubes/tests/integ/__init__.py
|
|
|
|
%{python3_sitelib}/qubes/tests/integ/backup.py
|
|
|
|
%{python3_sitelib}/qubes/tests/integ/backupcompatibility.py
|
2019-10-18 06:10:30 +02:00
|
|
|
%{python3_sitelib}/qubes/tests/integ/backupdispvm.py
|
2017-01-20 12:40:00 +01:00
|
|
|
%{python3_sitelib}/qubes/tests/integ/basic.py
|
2018-10-07 22:37:02 +02:00
|
|
|
%{python3_sitelib}/qubes/tests/integ/devices_block.py
|
2017-01-20 12:40:00 +01:00
|
|
|
%{python3_sitelib}/qubes/tests/integ/devices_pci.py
|
|
|
|
%{python3_sitelib}/qubes/tests/integ/dispvm.py
|
|
|
|
%{python3_sitelib}/qubes/tests/integ/dom0_update.py
|
2020-06-05 17:02:05 +02:00
|
|
|
%{python3_sitelib}/qubes/tests/integ/vm_update.py
|
2018-10-01 06:02:22 +02:00
|
|
|
%{python3_sitelib}/qubes/tests/integ/mime.py
|
2017-01-20 12:40:00 +01:00
|
|
|
%{python3_sitelib}/qubes/tests/integ/network.py
|
2020-06-06 03:40:10 +02:00
|
|
|
%{python3_sitelib}/qubes/tests/integ/network_ipv6.py
|
2019-01-05 17:09:10 +01:00
|
|
|
%{python3_sitelib}/qubes/tests/integ/grub.py
|
2017-12-21 18:14:39 +01:00
|
|
|
%{python3_sitelib}/qubes/tests/integ/salt.py
|
2020-06-06 03:45:24 +02:00
|
|
|
%{python3_sitelib}/qubes/tests/integ/qrexec.py
|
2017-01-20 12:40:00 +01:00
|
|
|
%{python3_sitelib}/qubes/tests/integ/storage.py
|
|
|
|
%{python3_sitelib}/qubes/tests/integ/vm_qrexec_gui.py
|
|
|
|
|
|
|
|
%dir %{python3_sitelib}/qubes/tests/integ/tools
|
|
|
|
%dir %{python3_sitelib}/qubes/tests/integ/tools/__pycache__
|
|
|
|
%{python3_sitelib}/qubes/tests/integ/tools/__pycache__/*
|
|
|
|
%{python3_sitelib}/qubes/tests/integ/tools/__init__.py
|
|
|
|
%{python3_sitelib}/qubes/tests/integ/tools/qubes_create.py
|
|
|
|
|
|
|
|
%dir %{python3_sitelib}/qubes/qmemman
|
|
|
|
%dir %{python3_sitelib}/qubes/qmemman/__pycache__
|
|
|
|
%{python3_sitelib}/qubes/qmemman/__pycache__/*
|
|
|
|
%{python3_sitelib}/qubes/qmemman/__init__.py
|
|
|
|
%{python3_sitelib}/qubes/qmemman/algo.py
|
|
|
|
%{python3_sitelib}/qubes/qmemman/client.py
|
2015-01-13 18:23:04 +01:00
|
|
|
|
2013-03-14 15:06:19 +01:00
|
|
|
/usr/lib/qubes/cleanup-dispvms
|
|
|
|
/usr/lib/qubes/fix-dir-perms.sh
|
2013-01-27 00:04:40 +01:00
|
|
|
/usr/lib/qubes/startup-misc.sh
|
2017-08-12 19:50:50 +02:00
|
|
|
%{_unitdir}/lvm2-pvscan@.service.d/30_qubes.conf
|
2013-01-27 00:04:40 +01:00
|
|
|
%{_unitdir}/qubes-core.service
|
|
|
|
%{_unitdir}/qubes-qmemman.service
|
2013-11-20 02:57:17 +01:00
|
|
|
%{_unitdir}/qubes-vm@.service
|
2017-02-02 13:03:08 +01:00
|
|
|
%{_unitdir}/qubesd.service
|
2013-05-20 01:34:32 +02:00
|
|
|
%attr(2770,root,qubes) %dir /var/lib/qubes
|
|
|
|
%attr(2770,root,qubes) %dir /var/lib/qubes/vm-templates
|
|
|
|
%attr(2770,root,qubes) %dir /var/lib/qubes/appvms
|
|
|
|
%attr(2770,root,qubes) %dir /var/lib/qubes/servicevms
|
|
|
|
%attr(2770,root,qubes) %dir /var/lib/qubes/backup
|
|
|
|
%attr(2770,root,qubes) %dir /var/lib/qubes/dvmdata
|
|
|
|
%attr(2770,root,qubes) %dir /var/lib/qubes/vm-kernels
|
2016-03-02 12:17:29 +01:00
|
|
|
/usr/share/qubes/templates/libvirt/xen.xml
|
2017-05-29 21:20:06 +02:00
|
|
|
/usr/share/qubes/templates/libvirt/devices/block.xml
|
2016-06-15 19:08:00 +02:00
|
|
|
/usr/share/qubes/templates/libvirt/devices/pci.xml
|
2016-06-15 19:41:11 +02:00
|
|
|
/usr/share/qubes/templates/libvirt/devices/net.xml
|
2015-02-02 04:48:42 +01:00
|
|
|
/usr/lib/tmpfiles.d/qubes.conf
|
2011-02-26 03:42:55 +01:00
|
|
|
/etc/xen/scripts/block-snapshot
|
|
|
|
/etc/xen/scripts/block-origin
|
2010-09-06 17:07:42 +02:00
|
|
|
/etc/xen/scripts/vif-route-qubes
|
2019-09-15 03:32:53 +02:00
|
|
|
%attr(0664,root,qubes) %config(noreplace) /etc/qubes/policy.d/85-admin-backup-restore.policy
|
2020-05-12 05:01:36 +02:00
|
|
|
%attr(0664,root,qubes) %config(noreplace) /etc/qubes/policy.d/90-admin-default.policy
|
|
|
|
%attr(0664,root,qubes) %config(noreplace) /etc/qubes/policy.d/90-default.policy
|
|
|
|
%attr(0664,root,qubes) %config(noreplace) /etc/qubes/policy.d/include/admin-global-ro
|
|
|
|
%attr(0664,root,qubes) %config(noreplace) /etc/qubes/policy.d/include/admin-global-rwx
|
|
|
|
%attr(0664,root,qubes) %config(noreplace) /etc/qubes/policy.d/include/admin-local-ro
|
|
|
|
%attr(0664,root,qubes) %config(noreplace) /etc/qubes/policy.d/include/admin-local-rwx
|
2017-05-23 03:24:15 +02:00
|
|
|
/etc/qubes-rpc/admin.*
|
2016-05-17 18:12:24 +02:00
|
|
|
/etc/qubes-rpc/qubes.FeaturesRequest
|
2018-03-02 20:39:28 +01:00
|
|
|
/etc/qubes-rpc/qubes.GetDate
|
2016-05-17 18:12:24 +02:00
|
|
|
/etc/qubes-rpc/qubes.GetRandomizedTime
|
2013-10-28 05:09:54 +01:00
|
|
|
/etc/qubes-rpc/qubes.NotifyTools
|
2013-03-14 01:22:43 +01:00
|
|
|
/etc/qubes-rpc/qubes.NotifyUpdates
|
2019-08-29 11:40:06 +02:00
|
|
|
/etc/qubes-rpc/qubes.ConnectTCP
|
2010-10-06 11:00:52 +02:00
|
|
|
%attr(2770,root,qubes) %dir /var/log/qubes
|
2012-10-23 05:46:25 +02:00
|
|
|
%attr(0770,root,qubes) %dir /var/run/qubes
|
2015-01-13 23:52:19 +01:00
|
|
|
|
|
|
|
/usr/share/doc/qubes/relaxng/*.rng
|
2018-04-03 21:30:15 +02:00
|
|
|
|
|
|
|
%changelog
|
|
|
|
@CHANGELOG@
|