2011-03-11 01:42:42 +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.
|
|
|
|
#
|
|
|
|
#
|
|
|
|
|
|
|
|
%{!?version: %define version %(cat version_vm)}
|
|
|
|
|
|
|
|
Name: qubes-core-proxyvm
|
|
|
|
Version: %{version}
|
|
|
|
Release: 1
|
|
|
|
Summary: The Qubes core files for NetVM
|
|
|
|
|
|
|
|
Group: Qubes
|
|
|
|
Vendor: Invisible Things Lab
|
|
|
|
License: GPL
|
|
|
|
URL: http://www.qubes-os.org
|
|
|
|
Requires: /usr/bin/xenstore-read
|
|
|
|
Requires: /sbin/ethtool
|
|
|
|
Requires: fedora-release = 13
|
|
|
|
Requires: qubes-core-netvm
|
|
|
|
|
|
|
|
%define _builddir %(pwd)/proxyvm
|
|
|
|
|
|
|
|
%description
|
|
|
|
The Qubes core files for installation inside a Qubes ProxyVM in addition to NetVM scripts.
|
|
|
|
|
|
|
|
%pre
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
|
|
|
mkdir -p $RPM_BUILD_ROOT/etc/init.d
|
|
|
|
cp init.d/qubes_firewall $RPM_BUILD_ROOT/etc/init.d/
|
2011-03-11 23:33:15 +01:00
|
|
|
cp init.d/qubes_netwatcher $RPM_BUILD_ROOT/etc/init.d/
|
2011-03-11 01:42:42 +01:00
|
|
|
mkdir -p $RPM_BUILD_ROOT/usr/sbin
|
|
|
|
cp bin/qubes_firewall $RPM_BUILD_ROOT/usr/sbin/
|
2011-03-11 23:33:15 +01:00
|
|
|
cp bin/qubes_netwatcher $RPM_BUILD_ROOT/usr/sbin/
|
2011-03-11 01:42:42 +01:00
|
|
|
|
|
|
|
%post
|
|
|
|
|
|
|
|
if [ "$1" != 1 ] ; then
|
|
|
|
# do this whole %post thing only when updating for the first time...
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
|
|
|
chkconfig --add qubes_firewall || echo "WARNING: Cannot add service qubes_core!"
|
|
|
|
chkconfig qubes_firewall on || echo "WARNING: Cannot enable service qubes_core!"
|
|
|
|
|
2011-03-11 23:33:15 +01:00
|
|
|
chkconfig --add qubes_netwatcher || echo "WARNING: Cannot add service qubes_core!"
|
|
|
|
chkconfig qubes_netwatcher on || echo "WARNING: Cannot enable service qubes_core!"
|
|
|
|
|
2011-03-11 01:42:42 +01:00
|
|
|
%preun
|
|
|
|
if [ "$1" = 0 ] ; then
|
|
|
|
# no more packages left
|
|
|
|
chkconfig qubes_firewall off
|
2011-03-11 23:33:15 +01:00
|
|
|
chkconfig qubes_netwatcher off
|
2011-03-11 01:42:42 +01:00
|
|
|
fi
|
|
|
|
|
|
|
|
%clean
|
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
/etc/init.d/qubes_firewall
|
2011-03-11 23:33:15 +01:00
|
|
|
/etc/init.d/qubes_netwatcher
|
2011-03-11 01:42:42 +01:00
|
|
|
/usr/sbin/qubes_firewall
|
2011-03-11 23:33:15 +01:00
|
|
|
/usr/sbin/qubes_netwatcher
|