2012-01-06 21:31:12 +01:00
|
|
|
#
|
|
|
|
# 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>
|
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
#
|
|
|
|
#
|
|
|
|
|
2017-05-29 11:56:42 +02:00
|
|
|
%define qubes_services qubes-core qubes-core-netvm qubes-core-early qubes-firewall qubes-iptables qubes-updates-proxy qubes-qrexec-agent qubes-updates-proxy-forwarder
|
2016-10-28 07:47:59 +02:00
|
|
|
%define qubes_preset_file 75-qubes-vm.preset
|
2016-10-22 17:43:16 +02:00
|
|
|
|
2016-10-28 07:47:59 +02:00
|
|
|
%define scriptletfuns is_static() { \
|
|
|
|
[ -f "%{_unitdir}/$1" ] && ! grep -q '^[[].nstall]' "%{_unitdir}/$1" \
|
|
|
|
} \
|
|
|
|
\
|
|
|
|
is_masked() { \
|
|
|
|
if [ ! -L %{_sysconfdir}/systemd/system/"$1" ] \
|
|
|
|
then \
|
|
|
|
return 1 \
|
|
|
|
fi \
|
|
|
|
target=`readlink %{_sysconfdir}/systemd/system/"$1" 2>/dev/null` || : \
|
|
|
|
if [ "$target" = "/dev/null" ] \
|
|
|
|
then \
|
|
|
|
return 0 \
|
|
|
|
fi \
|
|
|
|
return 1 \
|
|
|
|
} \
|
|
|
|
\
|
|
|
|
mask() { \
|
|
|
|
ln -sf /dev/null %{_sysconfdir}/systemd/system/"$1" \
|
|
|
|
} \
|
|
|
|
\
|
|
|
|
unmask() { \
|
|
|
|
if ! is_masked "$1" \
|
|
|
|
then \
|
|
|
|
return 0 \
|
|
|
|
fi \
|
|
|
|
rm -f %{_sysconfdir}/systemd/system/"$1" \
|
|
|
|
} \
|
|
|
|
\
|
|
|
|
preset_units() { \
|
|
|
|
local represet= \
|
|
|
|
cat "$1" | while read action unit_name \
|
|
|
|
do \
|
|
|
|
if [ "$action" = "#" -a "$unit_name" = "Units below this line will be re-preset on package upgrade" ] \
|
|
|
|
then \
|
|
|
|
represet=1 \
|
|
|
|
continue \
|
|
|
|
fi \
|
|
|
|
echo "$action $unit_name" | grep -q '^[[:space:]]*[^#;]' || continue \
|
|
|
|
[ -n "$action" -a -n "$unit_name" ] || continue \
|
|
|
|
if [ "$2" = "initial" -o "$represet" = "1" ] \
|
|
|
|
then \
|
|
|
|
if [ "$action" = "disable" ] && is_static "$unit_name" \
|
|
|
|
then \
|
|
|
|
if ! is_masked "$unit_name" \
|
|
|
|
then \
|
|
|
|
# We must effectively mask these units, even if they are static. \
|
|
|
|
mask "$unit_name" \
|
|
|
|
fi \
|
|
|
|
elif [ "$action" = "enable" ] && is_static "$unit_name" \
|
|
|
|
then \
|
|
|
|
if is_masked "$unit_name" \
|
|
|
|
then \
|
|
|
|
# We masked this static unit before, now we unmask it. \
|
|
|
|
unmask "$unit_name" \
|
|
|
|
fi \
|
|
|
|
systemctl --no-reload preset "$unit_name" >/dev/null 2>&1 || : \
|
|
|
|
else \
|
|
|
|
systemctl --no-reload preset "$unit_name" >/dev/null 2>&1 || : \
|
|
|
|
fi \
|
|
|
|
fi \
|
|
|
|
done \
|
|
|
|
} \
|
|
|
|
\
|
|
|
|
restore_units() { \
|
|
|
|
grep '^[[:space:]]*[^#;]' "$1" | while read action unit_name \
|
|
|
|
do \
|
|
|
|
if is_static "$unit_name" && is_masked "$unit_name" \
|
|
|
|
then \
|
|
|
|
# If the unit had been masked by us, we must unmask it here. \
|
|
|
|
# Otherwise systemctl preset will fail badly. \
|
|
|
|
unmask "$unit_name" \
|
|
|
|
fi \
|
|
|
|
systemctl --no-reload preset "$unit_name" >/dev/null 2>&1 || : \
|
|
|
|
done \
|
|
|
|
} \
|
|
|
|
|
2017-05-29 03:24:07 +02:00
|
|
|
Name: qubes-core-agent
|
2018-01-25 12:20:40 +01:00
|
|
|
Version: @VERSION@
|
2014-01-22 15:17:32 +01:00
|
|
|
Release: 1%{dist}
|
2012-01-06 21:31:12 +01:00
|
|
|
Summary: The Qubes core files for VM
|
|
|
|
|
|
|
|
Group: Qubes
|
|
|
|
Vendor: Invisible Things Lab
|
|
|
|
License: GPL
|
|
|
|
URL: http://www.qubes-os.org
|
2018-04-04 22:33:40 +02:00
|
|
|
|
2013-02-08 18:54:00 +01:00
|
|
|
Conflicts: firewalld
|
2018-04-04 22:33:40 +02:00
|
|
|
Requires: xdg-utils
|
2015-11-11 05:25:17 +01:00
|
|
|
Requires: qubes-utils >= 3.1.3
|
2018-02-20 00:27:33 +01:00
|
|
|
Requires: qubes-utils-libs >= 4.0.16
|
2014-05-21 20:21:15 +02:00
|
|
|
Requires: initscripts
|
2016-10-22 17:43:16 +02:00
|
|
|
Requires: gawk
|
2016-11-13 22:20:46 +01:00
|
|
|
Requires: sed
|
2016-10-22 17:43:16 +02:00
|
|
|
Requires: util-linux
|
2015-02-02 06:10:45 +01:00
|
|
|
# for qubes-desktop-run
|
|
|
|
Requires: pygobject3-base
|
2015-09-28 12:22:19 +02:00
|
|
|
Requires: dbus-python
|
2015-09-06 21:05:01 +02:00
|
|
|
# for qubes-session-autostart, xdg-icon
|
2015-08-02 23:30:26 +02:00
|
|
|
Requires: pyxdg
|
2017-05-21 01:55:46 +02:00
|
|
|
Requires: python-daemon
|
2017-05-26 05:19:21 +02:00
|
|
|
# for qvm-feature-request
|
|
|
|
Requires: python2-qubesdb
|
2014-01-30 16:30:17 +01:00
|
|
|
Requires: ImageMagick
|
2015-09-06 21:05:01 +02:00
|
|
|
Requires: librsvg2-tools
|
2015-05-27 22:34:43 +02:00
|
|
|
Requires: zenity
|
2018-05-02 03:02:07 +02:00
|
|
|
Requires: dconf
|
2017-06-08 15:33:26 +02:00
|
|
|
Requires: qubes-core-agent-qrexec
|
2013-04-22 05:22:04 +02:00
|
|
|
Requires: qubes-libvchan
|
2013-06-07 05:20:55 +02:00
|
|
|
Requires: qubes-db-vm
|
2018-04-04 22:33:40 +02:00
|
|
|
%if 0%{?fedora} >= 23
|
2015-12-23 02:04:26 +01:00
|
|
|
Requires: python3-dnf-plugins-qubes-hooks
|
|
|
|
%else
|
|
|
|
Requires: python2-dnf-plugins-qubes-hooks
|
|
|
|
%endif
|
2017-09-07 16:38:13 +02:00
|
|
|
%if 0%{?rhel} >= 7
|
|
|
|
Requires: python34-dnf-plugins-qubes-hooks
|
|
|
|
%endif
|
2015-11-10 16:58:03 +01:00
|
|
|
Obsoletes: qubes-core-vm-kernel-placeholder <= 1.0
|
2016-05-18 23:42:17 +02:00
|
|
|
Obsoletes: qubes-upgrade-vm < 3.2
|
2017-05-29 03:24:07 +02:00
|
|
|
Provides: qubes-core-vm = %{version}-%{release}
|
|
|
|
Obsoletes: qubes-core-vm < 4.0.0
|
2017-05-30 11:01:52 +02:00
|
|
|
Provides: qubes-core-vm-doc = %{version}-%{release}
|
|
|
|
Obsoletes: qubes-core-vm-doc < 4.0.0
|
2018-10-09 06:15:48 +02:00
|
|
|
BuildRequires: gcc
|
2017-05-30 11:01:52 +02:00
|
|
|
BuildRequires: pandoc
|
2012-01-06 21:31:12 +01:00
|
|
|
BuildRequires: xen-devel
|
2015-03-30 21:43:16 +02:00
|
|
|
BuildRequires: libX11-devel
|
2015-11-11 05:25:17 +01:00
|
|
|
BuildRequires: qubes-utils-devel >= 3.1.3
|
2018-01-25 12:20:40 +01:00
|
|
|
BuildRequires: qubes-libvchan-@BACKEND_VMM@-devel
|
2014-10-31 01:07:49 +01:00
|
|
|
BuildRequires: pam-devel
|
2018-04-21 11:45:43 +02:00
|
|
|
%if 0%{?rhel} >= 7
|
|
|
|
BuildRequires: python-setuptools
|
|
|
|
%endif
|
2018-05-25 22:54:20 +02:00
|
|
|
BuildRequires: systemd
|
2018-01-25 12:20:40 +01:00
|
|
|
Source0: %{name}-%{version}.tar.gz
|
2012-01-06 21:31:12 +01:00
|
|
|
|
2017-05-29 03:40:33 +02:00
|
|
|
%description
|
|
|
|
The Qubes core files for installation inside a Qubes VM.
|
|
|
|
|
2015-12-23 02:04:26 +01:00
|
|
|
%package -n python2-dnf-plugins-qubes-hooks
|
|
|
|
Summary: DNF plugin for Qubes specific post-installation actions
|
|
|
|
BuildRequires: python2-devel
|
|
|
|
%{?python_provide:%python_provide python2-dnf-plugins-qubes-hooks}
|
|
|
|
|
|
|
|
%description -n python2-dnf-plugins-qubes-hooks
|
|
|
|
DNF plugin for Qubes specific post-installation actions:
|
|
|
|
* notify dom0 that updates were installed
|
|
|
|
* refresh applications shortcut list
|
|
|
|
|
2018-04-21 12:00:34 +02:00
|
|
|
%package -n python%{python3_pkgversion}-dnf-plugins-qubes-hooks
|
2017-09-07 16:38:13 +02:00
|
|
|
Summary: DNF plugin for Qubes specific post-installation actions
|
2018-04-21 12:00:34 +02:00
|
|
|
BuildRequires: python%{python3_pkgversion}-devel
|
|
|
|
%{?python_provide:%python_provide python%{python3_pkgversion}-dnf-plugins-qubes-hooks}
|
2017-09-07 16:38:13 +02:00
|
|
|
|
2018-04-21 12:00:34 +02:00
|
|
|
%description -n python%{python3_pkgversion}-dnf-plugins-qubes-hooks
|
2017-09-07 16:38:13 +02:00
|
|
|
DNF plugin for Qubes specific post-installation actions:
|
|
|
|
* notify dom0 that updates were installed
|
|
|
|
* refresh applications shortcut list
|
2015-12-23 02:04:26 +01:00
|
|
|
|
2017-06-08 15:33:26 +02:00
|
|
|
%package qrexec
|
|
|
|
Summary: Qubes qrexec agent
|
|
|
|
Requires: qubes-core-agent
|
|
|
|
Requires: nautilus-python
|
|
|
|
Conflicts: qubes-core-vm < 4.0.0
|
|
|
|
|
|
|
|
%description qrexec
|
|
|
|
Agent part of Qubes RPC system. A daemon responsible for starting processes as
|
|
|
|
requested by dom0 or other VMs, according to dom0-enforced policy.
|
|
|
|
|
2017-05-29 03:33:11 +02:00
|
|
|
%package nautilus
|
2017-05-21 01:52:23 +02:00
|
|
|
Summary: Qubes integration for Nautilus
|
2017-05-29 03:24:07 +02:00
|
|
|
Requires: qubes-core-agent
|
2017-05-21 01:52:23 +02:00
|
|
|
Requires: nautilus-python
|
2017-05-30 12:22:09 +02:00
|
|
|
Conflicts: qubes-core-vm < 4.0.0
|
2017-05-21 01:52:23 +02:00
|
|
|
|
2017-05-29 03:33:11 +02:00
|
|
|
%description nautilus
|
2017-05-21 01:52:23 +02:00
|
|
|
Nautilus addons for inter-VM file copy/move/open.
|
|
|
|
|
2017-05-29 03:40:33 +02:00
|
|
|
%package dom0-updates
|
|
|
|
Summary: Scripts required to handle dom0 updates
|
|
|
|
Requires: qubes-core-agent
|
|
|
|
Requires: fakeroot
|
2017-05-30 12:22:09 +02:00
|
|
|
Conflicts: qubes-core-vm < 4.0.0
|
2018-07-02 22:25:45 +02:00
|
|
|
Requires: tar
|
2017-05-29 03:40:33 +02:00
|
|
|
|
|
|
|
%description dom0-updates
|
|
|
|
Scripts required to handle dom0 updates.
|
|
|
|
|
2017-05-29 06:28:37 +02:00
|
|
|
%package networking
|
|
|
|
Summary: Networking support for Qubes VM
|
|
|
|
Requires: ethtool
|
2017-11-19 16:48:32 +01:00
|
|
|
Requires: iptables
|
2017-05-29 06:28:37 +02:00
|
|
|
Requires: net-tools
|
|
|
|
Requires: nftables
|
2017-06-10 23:11:01 +02:00
|
|
|
Requires: socat
|
2017-05-29 06:28:37 +02:00
|
|
|
Requires: qubes-core-agent
|
|
|
|
Requires: tinyproxy
|
2017-05-30 12:22:09 +02:00
|
|
|
Conflicts: qubes-core-vm < 4.0.0
|
2017-05-29 06:28:37 +02:00
|
|
|
|
|
|
|
%description networking
|
|
|
|
This package provides:
|
|
|
|
* basic network functionality (setting IP address, DNS, default gateway)
|
|
|
|
* proxy service used by TemplateVMs to download updates
|
|
|
|
* qubes-firewall service (FirewallVM)
|
|
|
|
|
|
|
|
Note: if you want to use NetworkManager (you do want it in NetVM), install also
|
|
|
|
qubes-core-agent-network-manager.
|
|
|
|
|
|
|
|
%package network-manager
|
|
|
|
Summary: NetworkManager integration for Qubes VM
|
|
|
|
# to show/hide nm-applet
|
|
|
|
Requires: NetworkManager >= 0.8.1-1
|
2017-06-10 23:15:22 +02:00
|
|
|
Requires: glib2
|
2017-05-29 06:28:37 +02:00
|
|
|
Requires: qubes-core-agent-networking
|
2017-05-30 12:22:09 +02:00
|
|
|
Conflicts: qubes-core-vm < 4.0.0
|
2017-05-29 06:28:37 +02:00
|
|
|
|
|
|
|
%description network-manager
|
|
|
|
Integration of NetworkManager for Qubes VM:
|
|
|
|
* make connections config persistent
|
|
|
|
* adjust DNS redirections when needed
|
|
|
|
* show/hide NetworkManager applet icon
|
|
|
|
|
2017-05-31 21:18:34 +02:00
|
|
|
%package passwordless-root
|
|
|
|
Summary: Passwordless root access from normal user
|
|
|
|
Conflicts: qubes-core-vm < 4.0.0
|
|
|
|
|
|
|
|
%description passwordless-root
|
|
|
|
Configure sudo, PolicyKit and similar tool to not ask for any password when
|
|
|
|
switching from user to root. Since all the user data in a VM is accessible
|
|
|
|
already from normal user account, there is not much more to guard there. Qubes
|
|
|
|
VM is a single user system.
|
|
|
|
|
2017-11-17 13:37:37 +01:00
|
|
|
%package thunar
|
|
|
|
Summary: Thunar support for Qubes VM tools
|
|
|
|
Requires: Thunar
|
|
|
|
|
|
|
|
%description thunar
|
|
|
|
Thunar support for Qubes VM tools
|
|
|
|
|
2013-04-17 01:44:57 +02:00
|
|
|
%define kde_service_dir /usr/share/kde4/services
|
2018-01-09 17:42:21 +01:00
|
|
|
%define kde5_service_dir /usr/share/kservices5/ServiceMenus
|
2012-01-06 21:31:12 +01:00
|
|
|
|
2012-12-12 04:12:59 +01:00
|
|
|
%prep
|
2018-01-25 12:20:40 +01:00
|
|
|
%setup -q
|
2012-12-12 04:12:59 +01:00
|
|
|
|
2012-01-06 21:31:12 +01:00
|
|
|
%build
|
2018-08-01 02:20:57 +02:00
|
|
|
%{?set_build_flags}
|
2013-03-20 06:21:16 +01:00
|
|
|
for dir in qubes-rpc qrexec misc; do
|
2018-05-01 17:34:52 +02:00
|
|
|
make -C $dir BACKEND_VMM=@BACKEND_VMM@
|
2012-12-12 04:12:59 +01:00
|
|
|
done
|
2017-05-30 11:01:52 +02:00
|
|
|
make -C doc manpages
|
2012-01-06 21:31:12 +01:00
|
|
|
|
|
|
|
%pre
|
2015-02-07 12:07:35 +01:00
|
|
|
# Make sure there is a qubes group
|
|
|
|
groupadd --force --system --gid 98 qubes
|
|
|
|
id -u 'user' >/dev/null 2>&1 || {
|
|
|
|
useradd --user-group --create-home --shell /bin/bash user
|
|
|
|
}
|
2015-02-13 21:00:54 +01:00
|
|
|
usermod -a --groups qubes user
|
2012-01-06 21:31:12 +01:00
|
|
|
|
|
|
|
if [ "$1" != 1 ] ; then
|
2015-11-11 15:18:51 +01:00
|
|
|
# do this whole %%pre thing only when updating for the first time...
|
2012-01-06 21:31:12 +01:00
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
|
|
|
mkdir -p /var/lib/qubes
|
2015-10-15 04:34:55 +02:00
|
|
|
if [ -e /etc/fstab ] ; then
|
2012-01-06 21:31:12 +01:00
|
|
|
mv /etc/fstab /var/lib/qubes/fstab.orig
|
|
|
|
fi
|
|
|
|
|
2014-07-23 04:45:11 +02:00
|
|
|
usermod -L user
|
2012-01-06 21:31:12 +01:00
|
|
|
|
2017-05-31 21:18:34 +02:00
|
|
|
%pre passwordless-root
|
|
|
|
|
|
|
|
usermod -p '' root
|
|
|
|
|
2012-01-06 21:31:12 +01:00
|
|
|
%install
|
|
|
|
|
2013-03-20 06:21:16 +01:00
|
|
|
(cd qrexec; make install DESTDIR=$RPM_BUILD_ROOT)
|
2013-04-17 01:44:57 +02:00
|
|
|
make install-vm DESTDIR=$RPM_BUILD_ROOT
|
2012-01-06 21:31:12 +01:00
|
|
|
|
2017-09-30 02:06:53 +02:00
|
|
|
%if 0%{?rhel} >= 7
|
|
|
|
sed -i \
|
|
|
|
-e 's:-primary:-centos:' \
|
|
|
|
-e 's:/fc:/centos:' \
|
|
|
|
$RPM_BUILD_ROOT/etc/yum.repos.d/qubes-*.repo
|
|
|
|
%endif
|
|
|
|
|
2012-01-06 21:31:12 +01:00
|
|
|
%triggerin -- initscripts
|
2014-02-02 13:30:43 +01:00
|
|
|
if [ -e /etc/init/serial.conf ]; then
|
2014-02-06 23:56:18 +01:00
|
|
|
cp /usr/share/qubes/serial.conf /etc/init/serial.conf
|
2014-02-02 13:30:43 +01:00
|
|
|
fi
|
2012-01-06 21:31:12 +01:00
|
|
|
|
2017-06-13 01:36:12 +02:00
|
|
|
%triggerin -- grub2-tools
|
|
|
|
|
|
|
|
if ! grep -q /etc/default/grub.qubes /etc/default/grub 2>/dev/null; then
|
|
|
|
# do not keep Qubes-related settings directly in user-controlled config,
|
|
|
|
# include another file
|
|
|
|
echo '. /etc/default/grub.qubes' >> /etc/default/grub
|
|
|
|
fi
|
|
|
|
|
2012-01-06 21:31:12 +01:00
|
|
|
%post
|
|
|
|
|
|
|
|
# disable some Upstart services
|
|
|
|
for F in plymouth-shutdown prefdm splash-manager start-ttys tty ; do
|
|
|
|
if [ -e /etc/init/$F.conf ]; then
|
|
|
|
mv -f /etc/init/$F.conf /etc/init/$F.conf.disabled
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
2018-05-01 17:34:52 +02:00
|
|
|
chgrp user /var/lib/qubes/dom0-updates
|
2012-01-06 21:31:12 +01:00
|
|
|
|
2014-05-12 00:37:22 +02:00
|
|
|
# Remove old firmware updates link
|
|
|
|
if [ -L /lib/firmware/updates ]; then
|
|
|
|
rm -f /lib/firmware/updates
|
2012-06-06 03:00:05 +02:00
|
|
|
fi
|
|
|
|
|
2018-07-11 14:24:17 +02:00
|
|
|
# convert /usr/local symlink to a mount point
|
|
|
|
if [ -L /usr/local ]; then
|
|
|
|
rm -f /usr/local
|
|
|
|
mkdir /usr/local
|
|
|
|
mount /usr/local || :
|
|
|
|
fi
|
|
|
|
|
2018-09-13 03:34:19 +02:00
|
|
|
# workaround for Fedora's systemd package bug
|
|
|
|
# https://bugzilla.redhat.com/1559286
|
|
|
|
if [ -d /var/lib/private ]; then
|
|
|
|
chmod 700 /var/lib/private
|
|
|
|
fi
|
|
|
|
|
2017-05-15 03:09:45 +02:00
|
|
|
if test -f /etc/yum.conf && ! grep -q '/etc/yum\.conf\.d/qubes-proxy\.conf' /etc/yum.conf; then
|
2012-05-31 02:37:53 +02:00
|
|
|
echo >> /etc/yum.conf
|
|
|
|
echo '# Yum does not support inclusion of config dir...' >> /etc/yum.conf
|
|
|
|
echo 'include=file:///etc/yum.conf.d/qubes-proxy.conf' >> /etc/yum.conf
|
|
|
|
fi
|
|
|
|
|
2018-05-02 02:57:37 +02:00
|
|
|
if ! [ -r /etc/dconf/profile/user ]; then
|
|
|
|
mkdir -p /etc/dconf/profile
|
|
|
|
echo "user-db:user" >> /etc/dconf/profile/user
|
|
|
|
echo "system-db:local" >> /etc/dconf/profile/user
|
|
|
|
fi
|
|
|
|
|
2018-01-12 05:52:52 +01:00
|
|
|
dconf update &> /dev/null || :
|
|
|
|
|
2015-10-30 15:13:56 +01:00
|
|
|
# And actually setup the proxy usage in package managers
|
|
|
|
/usr/lib/qubes/update-proxy-configs
|
|
|
|
|
2015-04-22 08:04:10 +02:00
|
|
|
# Location of files which contains list of protected files
|
2015-04-25 01:16:54 +02:00
|
|
|
mkdir -p /etc/qubes/protected-files.d
|
2016-10-22 17:43:16 +02:00
|
|
|
. /usr/lib/qubes/init/functions
|
2015-04-22 08:04:10 +02:00
|
|
|
|
2012-05-08 23:41:53 +02:00
|
|
|
# qubes-core-vm has been broken for some time - it overrides /etc/hosts; restore original content
|
2016-10-22 17:43:16 +02:00
|
|
|
if ! is_protected_file /etc/hosts ; then
|
2015-04-22 08:04:10 +02:00
|
|
|
if ! grep -q localhost /etc/hosts; then
|
|
|
|
cat <<EOF > /etc/hosts
|
2012-05-08 23:41:53 +02:00
|
|
|
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 `hostname`
|
|
|
|
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
|
|
|
|
EOF
|
2015-04-22 08:04:10 +02:00
|
|
|
fi
|
2012-05-08 23:41:53 +02:00
|
|
|
fi
|
|
|
|
|
2014-09-29 05:03:25 +02:00
|
|
|
# ensure that hostname resolves to 127.0.0.1 resp. ::1 and that /etc/hosts is
|
|
|
|
# in the form expected by qubes-sysinit.sh
|
2016-10-22 17:43:16 +02:00
|
|
|
if ! is_protected_file /etc/hostname ; then
|
2015-04-22 08:04:10 +02:00
|
|
|
for ip in '127\.0\.0\.1' '::1'; do
|
|
|
|
if grep -q "^${ip}\(\s\|$\)" /etc/hosts; then
|
|
|
|
sed -i "/^${ip}\s/,+0s/\(\s`hostname`\)\+\(\s\|$\)/\2/g" /etc/hosts
|
|
|
|
sed -i "s/^${ip}\(\s\|$\).*$/\0 `hostname`/" /etc/hosts
|
|
|
|
else
|
|
|
|
echo "${ip} `hostname`" >> /etc/hosts
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
fi
|
2014-09-29 05:03:25 +02:00
|
|
|
|
2012-01-06 21:31:12 +01:00
|
|
|
if [ "$1" != 1 ] ; then
|
2015-11-11 15:18:51 +01:00
|
|
|
# do the rest of %%post thing only when updating for the first time...
|
2012-01-06 21:31:12 +01:00
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
2012-01-30 14:22:35 +01:00
|
|
|
if [ -e /etc/init/serial.conf ] && ! [ -f /var/lib/qubes/serial.orig ] ; then
|
2012-01-06 21:31:12 +01:00
|
|
|
cp /etc/init/serial.conf /var/lib/qubes/serial.orig
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Remove most of the udev scripts to speed up the VM boot time
|
|
|
|
# Just leave the xen* scripts, that are needed if this VM was
|
|
|
|
# ever used as a net backend (e.g. as a VPN domain in the future)
|
|
|
|
#echo "--> Removing unnecessary udev scripts..."
|
|
|
|
mkdir -p /var/lib/qubes/removed-udev-scripts
|
|
|
|
for f in /etc/udev/rules.d/*
|
|
|
|
do
|
|
|
|
if [ $(basename $f) == "xen-backend.rules" ] ; then
|
|
|
|
continue
|
|
|
|
fi
|
|
|
|
|
2013-03-13 02:26:40 +01:00
|
|
|
if [ $(basename $f) == "50-qubes-misc.rules" ] ; then
|
2012-01-06 21:31:12 +01:00
|
|
|
continue
|
|
|
|
fi
|
|
|
|
|
2013-03-26 02:41:18 +01:00
|
|
|
if echo $f | grep -q qubes; then
|
2012-01-06 21:31:12 +01:00
|
|
|
continue
|
|
|
|
fi
|
|
|
|
|
|
|
|
mv $f /var/lib/qubes/removed-udev-scripts/
|
|
|
|
done
|
|
|
|
mkdir -p /rw
|
2015-06-10 23:01:33 +02:00
|
|
|
|
2012-01-06 21:31:12 +01:00
|
|
|
#rm -f /etc/mtab
|
|
|
|
#echo "--> Removing HWADDR setting from /etc/sysconfig/network-scripts/ifcfg-eth0"
|
|
|
|
#mv /etc/sysconfig/network-scripts/ifcfg-eth0 /etc/sysconfig/network-scripts/ifcfg-eth0.orig
|
|
|
|
#grep -v HWADDR /etc/sysconfig/network-scripts/ifcfg-eth0.orig > /etc/sysconfig/network-scripts/ifcfg-eth0
|
|
|
|
|
2014-05-21 20:21:15 +02:00
|
|
|
%triggerin -- notification-daemon
|
|
|
|
# Enable autostart of notification-daemon when installed
|
|
|
|
if [ ! -e /etc/xdg/autostart/notification-daemon.desktop ]; then
|
|
|
|
ln -s /usr/share/applications/notification-daemon.desktop /etc/xdg/autostart/
|
|
|
|
fi
|
|
|
|
exit 0
|
|
|
|
|
|
|
|
%triggerin -- selinux-policy
|
|
|
|
#echo "--> Disabling SELinux..."
|
|
|
|
sed -e s/^SELINUX=.*$/SELINUX=disabled/ </etc/selinux/config >/etc/selinux/config.processed
|
|
|
|
mv /etc/selinux/config.processed /etc/selinux/config
|
|
|
|
setenforce 0 2>/dev/null
|
|
|
|
exit 0
|
|
|
|
|
2017-05-29 06:28:37 +02:00
|
|
|
%post network-manager
|
|
|
|
|
|
|
|
# Create NetworkManager configuration if we do not have it
|
|
|
|
if ! [ -e /etc/NetworkManager/NetworkManager.conf ]; then
|
|
|
|
echo '[main]' > /etc/NetworkManager/NetworkManager.conf
|
|
|
|
echo 'plugins = keyfile' >> /etc/NetworkManager/NetworkManager.conf
|
|
|
|
echo '[keyfile]' >> /etc/NetworkManager/NetworkManager.conf
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Remove ip_forward setting from sysctl, so NM will not reset it
|
|
|
|
sed 's/^net.ipv4.ip_forward.*/#\0/' -i /etc/sysctl.conf
|
|
|
|
|
|
|
|
/usr/lib/qubes/qubes-fix-nm-conf.sh
|
|
|
|
|
2017-07-11 16:06:10 +02:00
|
|
|
%post networking
|
|
|
|
%systemd_post qubes-firewall.service
|
|
|
|
%systemd_post qubes-iptables.service
|
|
|
|
%systemd_post qubes-network.service
|
|
|
|
%systemd_post qubes-updates-proxy.service
|
|
|
|
|
|
|
|
%post qrexec
|
|
|
|
%systemd_post qubes-qrexec-agent.service
|
|
|
|
|
2018-01-28 11:26:44 +01:00
|
|
|
%post thunar
|
2017-11-17 13:37:37 +01:00
|
|
|
if [ "$1" = 1 ]; then
|
2017-11-17 18:47:39 +01:00
|
|
|
# There is no system-wide Thunar custom actions. There is only a default
|
|
|
|
# file and a user file created from the default one. Qubes actions need
|
|
|
|
# to be placed after all already defined actions and before </actions>
|
|
|
|
# the end of file.
|
2017-11-17 13:37:37 +01:00
|
|
|
if [ -f /etc/xdg/Thunar/uca.xml ] ; then
|
|
|
|
cp -p /etc/xdg/Thunar/uca.xml{,.bak}
|
|
|
|
sed -i '$e cat /usr/lib/qubes/uca_qubes.xml' /etc/xdg/Thunar/uca.xml
|
|
|
|
fi
|
|
|
|
if [ -f /home/user/.config/Thunar/uca.xml ] ; then
|
|
|
|
cp -p /home/user/.config/Thunar/uca.xml{,.bak}
|
|
|
|
sed -i '$e cat /usr/lib/qubes/uca_qubes.xml' /home/user/.config/Thunar/uca.xml
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2012-01-06 21:31:12 +01:00
|
|
|
%preun
|
|
|
|
if [ "$1" = 0 ] ; then
|
|
|
|
# no more packages left
|
2012-09-27 18:25:18 +02:00
|
|
|
if [ -e /var/lib/qubes/fstab.orig ] ; then
|
2012-01-06 21:31:12 +01:00
|
|
|
mv /var/lib/qubes/fstab.orig /etc/fstab
|
2012-09-27 18:25:18 +02:00
|
|
|
fi
|
2012-01-06 21:31:12 +01:00
|
|
|
mv /var/lib/qubes/removed-udev-scripts/* /etc/udev/rules.d/
|
2012-09-27 18:25:18 +02:00
|
|
|
if [ -e /var/lib/qubes/serial.orig ] ; then
|
2012-01-06 21:31:12 +01:00
|
|
|
mv /var/lib/qubes/serial.orig /etc/init/serial.conf
|
2012-09-27 18:25:18 +02:00
|
|
|
fi
|
2012-01-06 21:31:12 +01:00
|
|
|
fi
|
|
|
|
|
2017-07-11 16:06:10 +02:00
|
|
|
%preun networking
|
|
|
|
%systemd_preun qubes-firewall.service
|
|
|
|
%systemd_preun qubes-iptables.service
|
|
|
|
%systemd_preun qubes-network.service
|
|
|
|
%systemd_preun qubes-updates-proxy.service
|
|
|
|
|
|
|
|
%preun qrexec
|
|
|
|
%systemd_preun qubes-qrexec-agent.service
|
|
|
|
|
2018-01-28 11:26:44 +01:00
|
|
|
%postun thunar
|
2017-11-17 13:37:37 +01:00
|
|
|
if [ "$1" = 0 ]; then
|
|
|
|
if [ -f /etc/xdg/Thunar/uca.xml ] ; then
|
|
|
|
mv /etc/xdg/Thunar/uca.xml{,.uninstall}
|
|
|
|
mv /etc/xdg/Thunar/uca.xml{.bak,}
|
|
|
|
fi
|
|
|
|
if [ -f /home/user/.config/Thunar/uca.xml ] ; then
|
|
|
|
mv /home/user/.config/Thunar/uca.xml{,.uninstall}
|
|
|
|
mv /home/user/.config/Thunar/uca.xml{.bak,}
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2012-01-14 01:37:22 +01:00
|
|
|
%postun
|
|
|
|
if [ $1 -eq 0 ] ; then
|
|
|
|
/usr/bin/glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :
|
2012-06-06 03:00:05 +02:00
|
|
|
|
2014-10-31 06:56:19 +01:00
|
|
|
if [ -L /lib/firmware/updates ]; then
|
2012-06-06 03:00:05 +02:00
|
|
|
rm /lib/firmware/updates
|
|
|
|
fi
|
2015-08-02 23:30:26 +02:00
|
|
|
|
2015-08-08 02:01:15 +02:00
|
|
|
rm -rf /var/lib/qubes/xdg
|
2012-01-14 01:37:22 +01:00
|
|
|
fi
|
|
|
|
|
2017-05-31 21:18:34 +02:00
|
|
|
%postun passwordless-root
|
|
|
|
if [ $1 -eq 0 ]; then
|
|
|
|
usermod -p '*' root
|
|
|
|
fi
|
|
|
|
|
2012-01-14 01:37:22 +01:00
|
|
|
%posttrans
|
|
|
|
/usr/bin/glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :
|
|
|
|
|
2012-01-06 21:31:12 +01:00
|
|
|
%clean
|
|
|
|
rm -rf $RPM_BUILD_ROOT
|
2012-12-12 04:12:59 +01:00
|
|
|
rm -f %{name}-%{version}
|
2012-01-06 21:31:12 +01:00
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
%dir /var/lib/qubes
|
|
|
|
%dir /var/run/qubes
|
|
|
|
%{kde_service_dir}/qvm-copy.desktop
|
2014-03-24 05:19:16 +01:00
|
|
|
%{kde_service_dir}/qvm-move.desktop
|
2012-01-06 21:31:12 +01:00
|
|
|
%{kde_service_dir}/qvm-dvm.desktop
|
2018-01-09 17:42:21 +01:00
|
|
|
%{kde5_service_dir}/qvm-copy.desktop
|
|
|
|
%{kde5_service_dir}/qvm-move.desktop
|
|
|
|
%{kde5_service_dir}/qvm-dvm.desktop
|
2014-07-23 04:45:11 +02:00
|
|
|
%config(noreplace) /etc/X11/xorg-preload-apps.conf
|
2012-01-06 21:31:12 +01:00
|
|
|
/etc/fstab
|
|
|
|
/etc/pki/rpm-gpg/RPM-GPG-KEY-qubes*
|
2013-03-20 06:21:16 +01:00
|
|
|
%dir /etc/qubes-rpc
|
2015-05-13 23:23:07 +02:00
|
|
|
%config(noreplace) /etc/qubes-rpc/qubes.Filecopy
|
|
|
|
%config(noreplace) /etc/qubes-rpc/qubes.OpenInVM
|
2016-05-17 21:50:20 +02:00
|
|
|
%config(noreplace) /etc/qubes-rpc/qubes.OpenURL
|
2015-05-13 23:23:07 +02:00
|
|
|
%config(noreplace) /etc/qubes-rpc/qubes.GetAppmenus
|
|
|
|
%config(noreplace) /etc/qubes-rpc/qubes.VMShell
|
2017-06-09 23:01:46 +02:00
|
|
|
%config(noreplace) /etc/qubes-rpc/qubes.VMRootShell
|
2015-05-13 23:23:07 +02:00
|
|
|
%config(noreplace) /etc/qubes-rpc/qubes.SuspendPre
|
2016-03-15 23:33:11 +01:00
|
|
|
%config(noreplace) /etc/qubes-rpc/qubes.SuspendPreAll
|
2015-05-13 23:23:07 +02:00
|
|
|
%config(noreplace) /etc/qubes-rpc/qubes.SuspendPost
|
2016-03-15 23:33:11 +01:00
|
|
|
%config(noreplace) /etc/qubes-rpc/qubes.SuspendPostAll
|
2015-05-13 23:23:07 +02:00
|
|
|
%config(noreplace) /etc/qubes-rpc/qubes.WaitForSession
|
|
|
|
%config(noreplace) /etc/qubes-rpc/qubes.DetachPciDevice
|
|
|
|
%config(noreplace) /etc/qubes-rpc/qubes.Backup
|
|
|
|
%config(noreplace) /etc/qubes-rpc/qubes.Restore
|
|
|
|
%config(noreplace) /etc/qubes-rpc/qubes.SelectFile
|
|
|
|
%config(noreplace) /etc/qubes-rpc/qubes.SelectDirectory
|
|
|
|
%config(noreplace) /etc/qubes-rpc/qubes.GetImageRGBA
|
|
|
|
%config(noreplace) /etc/qubes-rpc/qubes.SetDateTime
|
2015-11-17 09:46:16 +01:00
|
|
|
%config(noreplace) /etc/qubes-rpc/qubes.InstallUpdatesGUI
|
2016-08-17 21:47:22 +02:00
|
|
|
%config(noreplace) /etc/qubes-rpc/qubes.ResizeDisk
|
2017-05-20 03:48:02 +02:00
|
|
|
%config(noreplace) /etc/qubes-rpc/qubes.StartApp
|
2017-05-26 05:19:21 +02:00
|
|
|
%config(noreplace) /etc/qubes-rpc/qubes.PostInstall
|
2017-07-06 23:37:26 +02:00
|
|
|
%config(noreplace) /etc/qubes-rpc/qubes.GetDate
|
2017-08-05 21:28:19 +02:00
|
|
|
%dir /etc/qubes/rpc-config
|
|
|
|
/etc/qubes/rpc-config/README
|
2017-08-05 21:39:42 +02:00
|
|
|
%config(noreplace) /etc/qubes/rpc-config/qubes.OpenInVM
|
|
|
|
%config(noreplace) /etc/qubes/rpc-config/qubes.OpenURL
|
|
|
|
%config(noreplace) /etc/qubes/rpc-config/qubes.SelectFile
|
|
|
|
%config(noreplace) /etc/qubes/rpc-config/qubes.SelectDirectory
|
|
|
|
%config(noreplace) /etc/qubes/rpc-config/qubes.StartApp
|
|
|
|
%config(noreplace) /etc/qubes/rpc-config/qubes.InstallUpdatesGUI
|
2018-01-14 20:20:58 +01:00
|
|
|
%config(noreplace) /etc/qubes/rpc-config/qubes.VMShell+WaitForSession
|
2015-08-27 21:29:32 +02:00
|
|
|
%dir /etc/qubes/autostart
|
2017-06-13 01:36:12 +02:00
|
|
|
%config(noreplace) /etc/default/grub.qubes
|
2015-08-27 21:29:32 +02:00
|
|
|
/etc/qubes/autostart/README.txt
|
|
|
|
%config /etc/qubes/autostart/*.desktop.d/30_qubes.conf
|
2016-03-15 23:33:11 +01:00
|
|
|
%dir /etc/qubes/suspend-pre.d
|
|
|
|
/etc/qubes/suspend-pre.d/README
|
|
|
|
%dir /etc/qubes/suspend-post.d
|
|
|
|
/etc/qubes/suspend-post.d/README
|
2017-07-06 23:37:26 +02:00
|
|
|
/etc/qubes/suspend-post.d/qvm-sync-clock.sh
|
2017-05-26 05:19:21 +02:00
|
|
|
%dir /etc/qubes/post-install.d
|
|
|
|
/etc/qubes/post-install.d/README
|
|
|
|
/etc/qubes/post-install.d/*.sh
|
2015-08-16 02:54:21 +02:00
|
|
|
%config(noreplace) /etc/sudoers.d/qt_x11_no_mitshm
|
2015-10-24 20:50:34 +02:00
|
|
|
%config(noreplace) /etc/sysctl.d/20_tcp_timestamps.conf
|
2014-07-23 04:45:11 +02:00
|
|
|
%config(noreplace) /etc/udev/rules.d/50-qubes-misc.rules
|
2016-01-11 19:34:10 +01:00
|
|
|
%config(noreplace) /etc/qubes-suspend-module-blacklist
|
2013-02-21 07:25:03 +01:00
|
|
|
%config(noreplace) /etc/yum.conf.d/qubes-proxy.conf
|
2017-06-13 11:38:49 +02:00
|
|
|
%config(noreplace) /etc/yum.repos.d/qubes-r4.repo
|
2012-06-08 00:34:11 +02:00
|
|
|
/etc/yum/pluginconf.d/yum-qubes-hooks.conf
|
2015-11-10 16:49:29 +01:00
|
|
|
%config(noreplace) /etc/dnf/plugins/qubes-hooks.conf
|
2018-05-01 15:17:39 +02:00
|
|
|
%config(noreplace) /etc/dconf/db/local.d/dpi
|
2014-09-23 05:44:09 +02:00
|
|
|
/usr/lib/systemd/system/user@.service.d/90-session-stop-timeout.conf
|
2013-08-14 03:51:41 +02:00
|
|
|
/usr/sbin/qubes-serial-login
|
2012-01-06 21:31:12 +01:00
|
|
|
/usr/bin/qvm-copy-to-vm
|
2014-03-24 05:19:16 +01:00
|
|
|
/usr/bin/qvm-move-to-vm
|
2017-10-02 03:19:30 +02:00
|
|
|
/usr/bin/qvm-copy
|
|
|
|
/usr/bin/qvm-move
|
2012-01-06 21:31:12 +01:00
|
|
|
/usr/bin/qvm-open-in-dvm
|
|
|
|
/usr/bin/qvm-open-in-vm
|
2017-05-23 02:55:31 +02:00
|
|
|
/usr/bin/qvm-run-vm
|
2016-05-19 01:36:31 +02:00
|
|
|
/usr/bin/qvm-features-request
|
2017-07-06 23:37:26 +02:00
|
|
|
/usr/bin/qvm-sync-clock
|
2012-01-06 21:31:12 +01:00
|
|
|
/usr/bin/xenstore-watch-qubes
|
2014-10-27 12:25:45 +01:00
|
|
|
/usr/bin/qubes-desktop-run
|
2018-03-27 22:19:00 +02:00
|
|
|
/usr/bin/qubes-run-terminal
|
2016-02-01 12:15:09 +01:00
|
|
|
/usr/bin/qubes-open
|
2015-08-27 21:29:32 +02:00
|
|
|
/usr/bin/qubes-session-autostart
|
2012-01-06 21:31:12 +01:00
|
|
|
%dir /usr/lib/qubes
|
2012-07-13 14:40:52 +02:00
|
|
|
/usr/lib/qubes/prepare-suspend
|
2012-01-06 21:31:12 +01:00
|
|
|
/usr/lib/qubes/qfile-agent
|
2012-08-18 21:17:07 +02:00
|
|
|
%attr(4755,root,root) /usr/lib/qubes/qfile-unpacker
|
2012-01-06 21:31:12 +01:00
|
|
|
/usr/lib/qubes/qopen-in-vm
|
|
|
|
/usr/lib/qubes/qrun-in-vm
|
2013-03-13 02:26:40 +01:00
|
|
|
/usr/lib/qubes/qubes-trigger-sync-appmenus.sh
|
2012-01-06 21:31:12 +01:00
|
|
|
/usr/lib/qubes/qvm-copy-to-vm.kde
|
2014-03-24 05:19:16 +01:00
|
|
|
/usr/lib/qubes/qvm-move-to-vm.kde
|
2013-11-09 19:01:57 +01:00
|
|
|
/usr/lib/qubes/tar2qfile
|
2012-01-06 21:31:12 +01:00
|
|
|
/usr/lib/qubes/vm-file-editor
|
2014-07-04 18:49:49 +02:00
|
|
|
/usr/lib/qubes/close-window
|
2015-09-06 21:05:01 +02:00
|
|
|
/usr/lib/qubes/xdg-icon
|
2015-10-30 15:13:56 +01:00
|
|
|
/usr/lib/qubes/update-proxy-configs
|
2015-11-13 05:28:47 +01:00
|
|
|
/usr/lib/qubes/upgrades-installed-check
|
|
|
|
/usr/lib/qubes/upgrades-status-notify
|
2017-07-06 23:37:26 +02:00
|
|
|
/usr/lib/qubes/qubes-sync-clock
|
2017-10-17 20:51:12 +02:00
|
|
|
/usr/lib/qubes/resize-rootfs
|
2012-06-05 19:28:59 +02:00
|
|
|
/usr/lib/yum-plugins/yum-qubes-hooks.py*
|
2015-11-10 16:35:29 +01:00
|
|
|
/usr/lib/dracut/dracut.conf.d/30-qubes.conf
|
2016-10-22 17:43:16 +02:00
|
|
|
%dir /usr/lib/qubes/init
|
2017-05-29 04:44:11 +02:00
|
|
|
/usr/lib/qubes/init/bind-dirs.sh
|
|
|
|
/usr/lib/qubes/init/control-printer-icon.sh
|
|
|
|
/usr/lib/qubes/init/functions
|
|
|
|
/usr/lib/qubes/init/misc-post-stop.sh
|
|
|
|
/usr/lib/qubes/init/misc-post.sh
|
|
|
|
/usr/lib/qubes/init/mount-dirs.sh
|
|
|
|
/usr/lib/qubes/init/qubes-early-vm-config.sh
|
|
|
|
/usr/lib/qubes/init/qubes-random-seed.sh
|
|
|
|
/usr/lib/qubes/init/qubes-sysinit.sh
|
2017-10-18 16:57:39 +02:00
|
|
|
/usr/lib/qubes/init/resize-rootfs-if-needed.sh
|
2017-05-29 04:44:11 +02:00
|
|
|
/usr/lib/qubes/init/setup-rw.sh
|
|
|
|
/usr/lib/qubes/init/setup-rwdev.sh
|
2016-10-22 17:43:16 +02:00
|
|
|
/usr/lib/qubes/init/functions
|
2016-10-16 02:14:02 +02:00
|
|
|
%dir /usr/lib/qubes-bind-dirs.d
|
|
|
|
/usr/lib/qubes-bind-dirs.d/30_cron.conf
|
2018-03-27 22:19:00 +02:00
|
|
|
/usr/share/applications/qubes-run-terminal.desktop
|
2014-02-06 23:56:18 +01:00
|
|
|
/usr/share/qubes/serial.conf
|
2017-05-20 13:38:58 +02:00
|
|
|
/usr/share/glib-2.0/schemas/20_org.gnome.settings-daemon.plugins.updates.qubes.gschema.override
|
|
|
|
/usr/share/glib-2.0/schemas/20_org.gnome.nautilus.qubes.gschema.override
|
|
|
|
/usr/share/glib-2.0/schemas/20_org.mate.NotificationDaemon.qubes.gschema.override
|
2017-05-20 14:36:48 +02:00
|
|
|
/usr/share/glib-2.0/schemas/20_org.gnome.desktop.wm.preferences.qubes.gschema.override
|
2017-05-30 11:01:52 +02:00
|
|
|
%{_mandir}/man1/qvm-*.1*
|
2015-02-27 06:52:17 +01:00
|
|
|
|
2018-10-09 06:15:48 +02:00
|
|
|
%dir %{python2_sitelib}/qubesagent-*-py2.7.egg-info
|
|
|
|
%{python2_sitelib}/qubesagent-*-py2.7.egg-info/*
|
|
|
|
%dir %{python2_sitelib}/qubesagent
|
|
|
|
%{python2_sitelib}/qubesagent/__init__.py*
|
|
|
|
%{python2_sitelib}/qubesagent/firewall.py*
|
|
|
|
%{python2_sitelib}/qubesagent/test_firewall.py*
|
|
|
|
%{python2_sitelib}/qubesagent/xdg.py*
|
2016-09-12 05:22:53 +02:00
|
|
|
|
2013-11-14 21:38:27 +01:00
|
|
|
/usr/share/qubes/mime-override/globs
|
2016-07-16 23:51:28 +02:00
|
|
|
/usr/share/qubes/qubes-master-key.asc
|
2012-01-06 21:31:12 +01:00
|
|
|
%dir /mnt/removable
|
2014-10-19 04:32:57 +02:00
|
|
|
%dir /rw
|
2012-01-06 21:31:12 +01:00
|
|
|
|
2015-12-23 02:04:26 +01:00
|
|
|
%files -n python2-dnf-plugins-qubes-hooks
|
|
|
|
%{python2_sitelib}/dnf-plugins/*
|
|
|
|
|
2018-04-04 22:33:40 +02:00
|
|
|
%if 0%{?fedora} >= 23
|
2015-12-23 02:04:26 +01:00
|
|
|
%files -n python3-dnf-plugins-qubes-hooks
|
|
|
|
%{python3_sitelib}/dnf-plugins/*
|
2017-09-07 16:38:13 +02:00
|
|
|
%endif
|
|
|
|
|
|
|
|
%if 0%{?rhel} >= 7
|
|
|
|
%files -n python34-dnf-plugins-qubes-hooks
|
|
|
|
%{python3_sitelib}/dnf-plugins/*
|
|
|
|
%endif
|
2015-12-23 02:04:26 +01:00
|
|
|
|
2017-06-08 15:33:26 +02:00
|
|
|
%files qrexec
|
2014-10-31 01:07:49 +01:00
|
|
|
%config(noreplace) /etc/pam.d/qrexec
|
2017-06-08 15:33:26 +02:00
|
|
|
/usr/bin/qrexec-fork-server
|
|
|
|
/usr/bin/qrexec-client-vm
|
|
|
|
/usr/lib/qubes/qrexec-agent
|
|
|
|
/usr/lib/qubes/qrexec-client-vm
|
|
|
|
/usr/lib/qubes/qrexec_client_vm
|
|
|
|
/usr/lib/qubes/qubes-rpc-multiplexer
|
|
|
|
/lib/systemd/system/qubes-qrexec-agent.service
|
2017-06-20 23:34:43 +02:00
|
|
|
%{_mandir}/man1/qrexec-client-vm.1*
|
2017-06-08 15:33:26 +02:00
|
|
|
|
2017-05-29 03:33:11 +02:00
|
|
|
%files nautilus
|
2017-05-21 01:52:23 +02:00
|
|
|
/usr/lib/qubes/qvm-copy-to-vm.gnome
|
|
|
|
/usr/lib/qubes/qvm-move-to-vm.gnome
|
|
|
|
/usr/share/nautilus-python/extensions/qvm_copy_nautilus.py*
|
|
|
|
/usr/share/nautilus-python/extensions/qvm_move_nautilus.py*
|
|
|
|
/usr/share/nautilus-python/extensions/qvm_dvm_nautilus.py*
|
|
|
|
|
2017-11-17 13:37:37 +01:00
|
|
|
%files thunar
|
|
|
|
/usr/lib/qubes/qvm-actions.sh
|
|
|
|
/usr/lib/qubes/uca_qubes.xml
|
2017-11-17 18:47:39 +01:00
|
|
|
/etc/xdg/xfce4/xfconf/xfce-perchannel-xml/thunar.xml
|
2017-11-17 13:37:37 +01:00
|
|
|
|
2017-05-29 03:40:33 +02:00
|
|
|
%files dom0-updates
|
|
|
|
%dir %attr(0775,user,user) /var/lib/qubes/dom0-updates
|
|
|
|
/usr/lib/qubes/qubes-download-dom0-updates.sh
|
|
|
|
|
2017-05-29 06:28:37 +02:00
|
|
|
%files networking
|
|
|
|
%config(noreplace) /etc/qubes-rpc/qubes.UpdatesProxy
|
|
|
|
%config(noreplace) /etc/qubes/ip6tables.rules
|
2017-12-03 03:30:53 +01:00
|
|
|
%config(noreplace) /etc/qubes/ip6tables-enabled.rules
|
2017-05-29 06:28:37 +02:00
|
|
|
%config(noreplace) /etc/qubes/iptables.rules
|
|
|
|
%config(noreplace) /etc/tinyproxy/tinyproxy-updates.conf
|
|
|
|
%config(noreplace) /etc/tinyproxy/updates-blacklist
|
|
|
|
%config(noreplace) /etc/udev/rules.d/99-qubes-network.rules
|
|
|
|
/etc/dhclient.d/qubes-setup-dnat-to-ns.sh
|
|
|
|
/etc/xen/scripts/vif-qubes-nat.sh
|
|
|
|
/etc/xen/scripts/vif-route-qubes
|
|
|
|
/lib/systemd/system/qubes-firewall.service
|
|
|
|
/lib/systemd/system/qubes-iptables.service
|
|
|
|
/lib/systemd/system/qubes-network.service
|
|
|
|
/lib/systemd/system/qubes-updates-proxy.service
|
|
|
|
/usr/lib/qubes/init/network-proxy-setup.sh
|
|
|
|
/usr/lib/qubes/init/qubes-iptables
|
|
|
|
/usr/lib/qubes/iptables-updates-proxy
|
|
|
|
/usr/lib/qubes/qubes-setup-dnat-to-ns
|
|
|
|
/usr/lib/qubes/setup-ip
|
|
|
|
/usr/lib/tmpfiles.d/qubes-core-agent-linux.conf
|
|
|
|
/usr/sbin/qubes-firewall
|
|
|
|
|
|
|
|
%files network-manager
|
|
|
|
/etc/NetworkManager/dispatcher.d/30-qubes-external-ip
|
|
|
|
/etc/NetworkManager/dispatcher.d/qubes-nmhook
|
|
|
|
/etc/xdg/autostart/00-qubes-show-hide-nm-applet.desktop
|
|
|
|
/usr/lib/NetworkManager/conf.d/30-qubes.conf
|
|
|
|
/usr/lib/qubes/network-manager-prepare-conf-dir
|
|
|
|
/usr/lib/qubes/qubes-fix-nm-conf.sh
|
|
|
|
/usr/lib/qubes/show-hide-nm-applet.sh
|
|
|
|
|
2017-05-31 21:18:34 +02:00
|
|
|
%files passwordless-root
|
|
|
|
%config(noreplace) /etc/polkit-1/localauthority/50-local.d/qubes-allow-all.pkla
|
|
|
|
%config(noreplace) /etc/polkit-1/rules.d/00-qubes-allow-all.rules
|
|
|
|
%config(noreplace) /etc/sudoers.d/qubes
|
|
|
|
|
2012-01-10 12:09:09 +01:00
|
|
|
%package sysvinit
|
|
|
|
Summary: Qubes unit files for SysV init style or upstart
|
|
|
|
License: GPL v2 only
|
|
|
|
Group: Qubes
|
|
|
|
Requires: upstart
|
2017-05-29 03:24:07 +02:00
|
|
|
Requires: qubes-core-agent
|
2017-06-08 15:33:26 +02:00
|
|
|
Requires: qubes-core-agent-qrexec
|
2017-05-29 06:28:37 +02:00
|
|
|
Requires: qubes-core-agent-networking
|
2017-05-29 03:24:07 +02:00
|
|
|
Provides: qubes-core-agent-init-scripts
|
|
|
|
Conflicts: qubes-core-agent-systemd
|
|
|
|
Provides: qubes-core-vm-sysvinit = %{version}-%{release}
|
|
|
|
Obsoletes: qubes-core-vm-sysvinit < 4.0.0
|
2012-01-10 12:09:09 +01:00
|
|
|
|
|
|
|
%description sysvinit
|
|
|
|
The Qubes core startup configuration for SysV init (or upstart).
|
|
|
|
|
|
|
|
%files sysvinit
|
2016-10-22 17:43:16 +02:00
|
|
|
/etc/init.d/qubes-sysinit
|
|
|
|
/etc/init.d/qubes-core-early
|
2013-03-13 02:26:40 +01:00
|
|
|
/etc/init.d/qubes-core
|
|
|
|
/etc/init.d/qubes-core-netvm
|
2012-03-09 01:03:59 +01:00
|
|
|
/etc/init.d/qubes-firewall
|
2015-08-04 17:15:01 +02:00
|
|
|
/etc/init.d/qubes-iptables
|
2014-09-27 00:11:10 +02:00
|
|
|
/etc/init.d/qubes-updates-proxy
|
2013-03-20 06:21:16 +01:00
|
|
|
/etc/init.d/qubes-qrexec-agent
|
2017-05-26 03:07:47 +02:00
|
|
|
/etc/init.d/qubes-updates-proxy-forwarder
|
2014-09-29 21:31:10 +02:00
|
|
|
/etc/sysconfig/modules/qubes-core.modules
|
2012-01-10 12:09:09 +01:00
|
|
|
|
|
|
|
%post sysvinit
|
|
|
|
|
|
|
|
#echo "--> Turning off unnecessary services..."
|
|
|
|
# FIXME: perhaps there is more elegant way to do this?
|
|
|
|
for f in /etc/init.d/*
|
|
|
|
do
|
|
|
|
srv=`basename $f`
|
|
|
|
[ $srv = 'functions' ] && continue
|
|
|
|
[ $srv = 'killall' ] && continue
|
|
|
|
[ $srv = 'halt' ] && continue
|
|
|
|
[ $srv = 'single' ] && continue
|
|
|
|
[ $srv = 'reboot' ] && continue
|
2013-03-13 02:26:40 +01:00
|
|
|
[ $srv = 'qubes-gui' ] && continue
|
2012-01-10 12:09:09 +01:00
|
|
|
chkconfig $srv off
|
|
|
|
done
|
|
|
|
|
|
|
|
#echo "--> Enabling essential services..."
|
|
|
|
chkconfig rsyslog on
|
|
|
|
chkconfig haldaemon on
|
|
|
|
chkconfig messagebus on
|
2016-10-22 17:43:16 +02:00
|
|
|
for svc in %qubes_services ; do
|
|
|
|
if [ "$1" = 1 ] ; then
|
|
|
|
chkconfig --add $svc || echo "WARNING: Cannot add service $svc!"
|
|
|
|
else
|
|
|
|
chkconfig $svc resetpriorities || echo "WARNING: Cannot reset priorities of service $svc!"
|
|
|
|
fi
|
|
|
|
done
|
2012-01-10 12:09:09 +01:00
|
|
|
|
|
|
|
# TODO: make this not display the silly message about security context...
|
|
|
|
sed -i s/^id:.:initdefault:/id:3:initdefault:/ /etc/inittab
|
|
|
|
|
|
|
|
%preun sysvinit
|
|
|
|
if [ "$1" = 0 ] ; then
|
|
|
|
# no more packages left
|
2016-10-22 17:43:16 +02:00
|
|
|
for svc in %qubes_services ; do
|
|
|
|
chkconfig --del $svc
|
|
|
|
done
|
2012-01-10 12:09:09 +01:00
|
|
|
fi
|
2012-01-10 12:10:16 +01:00
|
|
|
|
|
|
|
%package systemd
|
|
|
|
Summary: Qubes unit files for SystemD init style
|
|
|
|
License: GPL v2 only
|
|
|
|
Group: Qubes
|
|
|
|
Requires: systemd
|
2012-01-14 01:40:10 +01:00
|
|
|
Requires(post): systemd-units
|
|
|
|
Requires(preun): systemd-units
|
|
|
|
Requires(postun): systemd-units
|
2017-05-29 03:24:07 +02:00
|
|
|
Requires: qubes-core-agent
|
|
|
|
Provides: qubes-core-agent-init-scripts
|
|
|
|
Conflicts: qubes-core-agent-sysvinit
|
|
|
|
Provides: qubes-core-vm-systemd = %{version}-%{release}
|
|
|
|
Obsoletes: qubes-core-vm-systemd < 4.0.0
|
2012-01-10 12:10:16 +01:00
|
|
|
|
|
|
|
%description systemd
|
|
|
|
The Qubes core startup configuration for SystemD init.
|
|
|
|
|
|
|
|
%files systemd
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
/lib/systemd/system/qubes-misc-post.service
|
2015-10-14 21:09:49 +02:00
|
|
|
/lib/systemd/system/qubes-mount-dirs.service
|
2017-10-18 16:57:39 +02:00
|
|
|
/lib/systemd/system/qubes-rootfs-resize.service
|
2012-01-10 12:10:16 +01:00
|
|
|
/lib/systemd/system/qubes-sysinit.service
|
2016-10-28 07:21:33 +02:00
|
|
|
/lib/systemd/system/qubes-early-vm-config.service
|
2012-05-01 01:14:04 +02:00
|
|
|
/lib/systemd/system/qubes-update-check.service
|
|
|
|
/lib/systemd/system/qubes-update-check.timer
|
2017-07-06 23:37:26 +02:00
|
|
|
/lib/systemd/system/qubes-sync-time.service
|
|
|
|
/lib/systemd/system/qubes-sync-time.timer
|
2017-05-26 03:07:47 +02:00
|
|
|
/lib/systemd/system/qubes-updates-proxy-forwarder@.service
|
|
|
|
/lib/systemd/system/qubes-updates-proxy-forwarder.socket
|
2016-10-28 07:47:59 +02:00
|
|
|
/lib/systemd/system-preset/%qubes_preset_file
|
2014-09-29 21:31:10 +02:00
|
|
|
/lib/modules-load.d/qubes-core.conf
|
2015-07-24 11:01:00 +02:00
|
|
|
/lib/systemd/system/chronyd.service.d/30_qubes.conf
|
|
|
|
/lib/systemd/system/crond.service.d/30_qubes.conf
|
|
|
|
/lib/systemd/system/cups.service.d/30_qubes.conf
|
|
|
|
/lib/systemd/system/cups.socket.d/30_qubes.conf
|
|
|
|
/lib/systemd/system/cups.path.d/30_qubes.conf
|
2017-12-05 17:53:44 +01:00
|
|
|
/lib/systemd/system/cups-browsed.service.d/30_qubes.conf
|
2015-11-06 19:36:52 +01:00
|
|
|
/lib/systemd/system/org.cups.cupsd.service.d/30_qubes.conf
|
|
|
|
/lib/systemd/system/org.cups.cupsd.socket.d/30_qubes.conf
|
|
|
|
/lib/systemd/system/org.cups.cupsd.path.d/30_qubes.conf
|
2015-07-24 11:01:00 +02:00
|
|
|
/lib/systemd/system/getty@tty.service.d/30_qubes.conf
|
|
|
|
/lib/systemd/system/ModemManager.service.d/30_qubes.conf
|
|
|
|
/lib/systemd/system/NetworkManager.service.d/30_qubes.conf
|
|
|
|
/lib/systemd/system/NetworkManager-wait-online.service.d/30_qubes.conf
|
2016-07-16 23:44:57 +02:00
|
|
|
/lib/systemd/system/systemd-random-seed.service.d/30_qubes.conf
|
2017-07-06 23:37:26 +02:00
|
|
|
/lib/systemd/system/systemd-timesyncd.service.d/30_qubes.conf
|
2015-11-11 15:57:25 +01:00
|
|
|
/lib/systemd/system/tinyproxy.service.d/30_not_needed_in_qubes_by_default.conf
|
2016-07-27 04:13:35 +02:00
|
|
|
/lib/systemd/system/tor.service.d/30_qubes.conf
|
|
|
|
/lib/systemd/system/tor@default.service.d/30_qubes.conf
|
2015-10-04 23:07:10 +02:00
|
|
|
/lib/systemd/system/tmp.mount.d/30_qubes.conf
|
2017-02-21 01:29:04 +01:00
|
|
|
/usr/lib/systemd/user/pulseaudio.service.d/30_qubes.conf
|
|
|
|
/usr/lib/systemd/user/pulseaudio.socket.d/30_qubes.conf
|
2012-01-10 12:10:16 +01:00
|
|
|
|
|
|
|
%post systemd
|
|
|
|
|
2016-10-28 07:47:59 +02:00
|
|
|
changed=
|
|
|
|
|
|
|
|
%scriptletfuns
|
|
|
|
|
|
|
|
if [ $1 -eq 1 ]
|
|
|
|
then
|
|
|
|
preset_units %{_presetdir}/%qubes_preset_file initial
|
|
|
|
changed=true
|
2015-04-10 18:08:28 +02:00
|
|
|
else
|
2016-10-28 07:47:59 +02:00
|
|
|
preset_units %{_presetdir}/%qubes_preset_file upgrade
|
|
|
|
changed=true
|
2015-08-04 17:15:01 +02:00
|
|
|
# Upgrade path - now qubes-iptables is used instead
|
2016-10-28 07:47:59 +02:00
|
|
|
for svc in iptables ip6tables
|
|
|
|
do
|
|
|
|
if [ -f "$svc".service ]
|
|
|
|
then
|
|
|
|
systemctl --no-reload preset "$svc".service
|
|
|
|
changed=true
|
|
|
|
fi
|
|
|
|
done
|
2015-04-10 18:08:28 +02:00
|
|
|
fi
|
2012-05-01 01:14:04 +02:00
|
|
|
|
2016-10-28 07:47:59 +02:00
|
|
|
if [ $1 -eq 1 ]
|
|
|
|
then
|
|
|
|
# First install.
|
|
|
|
# Set default "runlevel".
|
|
|
|
# FIXME: this ought to be done via kernel command line.
|
|
|
|
# The fewer deviations of the template from the seed
|
|
|
|
# image, the better.
|
|
|
|
rm -f %{_sysconfdir}/systemd/system/default.target
|
|
|
|
ln -s %{_unitdir}/multi-user.target %{_sysconfdir}/systemd/system/default.target
|
|
|
|
changed=true
|
|
|
|
fi
|
2012-01-10 12:10:16 +01:00
|
|
|
|
2016-07-25 13:51:20 +02:00
|
|
|
# remove old symlinks
|
2016-10-28 07:47:59 +02:00
|
|
|
if [ -L %{_sysconfdir}/systemd/system/sysinit.target.wants/qubes-random-seed.service ]
|
|
|
|
then
|
|
|
|
rm -f %{_sysconfdir}/systemd/system/sysinit.target.wants/qubes-random-seed.service
|
|
|
|
changed=true
|
2016-07-25 13:51:20 +02:00
|
|
|
fi
|
2016-10-28 07:47:59 +02:00
|
|
|
if [ -L %{_sysconfdir}/systemd/system/multi-user.target.wants/qubes-mount-home.service ]
|
|
|
|
then
|
|
|
|
rm -f %{_sysconfdir}/systemd/system/multi-user.target.wants/qubes-mount-home.service
|
|
|
|
changed=true
|
2016-07-25 13:51:20 +02:00
|
|
|
fi
|
|
|
|
|
2016-10-28 07:47:59 +02:00
|
|
|
if [ "x$changed" != "x" ]
|
|
|
|
then
|
|
|
|
systemctl daemon-reload
|
|
|
|
fi
|
2014-07-04 18:48:35 +02:00
|
|
|
|
2016-10-28 07:47:59 +02:00
|
|
|
%preun systemd
|
|
|
|
|
|
|
|
if [ $1 -eq 0 ] ; then
|
|
|
|
# Run this only during uninstall.
|
|
|
|
# Save the preset file to later use it to re-preset services there
|
|
|
|
# once the Qubes OS preset file is removed.
|
|
|
|
mkdir -p %{_rundir}/qubes-uninstall
|
|
|
|
cp -f %{_presetdir}/%qubes_preset_file %{_rundir}/qubes-uninstall/
|
|
|
|
fi
|
2014-07-04 18:48:35 +02:00
|
|
|
|
2012-01-10 12:10:16 +01:00
|
|
|
%postun systemd
|
|
|
|
|
2016-10-28 07:47:59 +02:00
|
|
|
changed=
|
|
|
|
|
|
|
|
%scriptletfuns
|
|
|
|
|
|
|
|
if [ -d %{_rundir}/qubes-uninstall ]
|
|
|
|
then
|
|
|
|
# We have a saved preset file (or more).
|
|
|
|
# Re-preset the units mentioned there.
|
|
|
|
restore_units %{_rundir}/qubes-uninstall/%qubes_preset_file
|
|
|
|
rm -rf %{_rundir}/qubes-uninstall
|
|
|
|
changed=true
|
2012-01-10 12:10:16 +01:00
|
|
|
fi
|
|
|
|
|
2016-10-28 07:47:59 +02:00
|
|
|
if [ "x$changed" != "x" ]
|
|
|
|
then
|
|
|
|
systemctl daemon-reload
|
|
|
|
fi
|
2018-04-03 21:38:13 +02:00
|
|
|
|
|
|
|
%changelog
|
|
|
|
@CHANGELOG@
|