diff --git a/rpm_spec/core-dom0.spec b/rpm_spec/core-dom0.spec index 9256125b..cfe9ea75 100644 --- a/rpm_spec/core-dom0.spec +++ b/rpm_spec/core-dom0.spec @@ -29,15 +29,16 @@ Name: qubes-core-dom0 Version: %{version} -Release: 1 +Release: 2 Summary: The Qubes core files (Dom0-side) Group: Qubes Vendor: Invisible Things Lab License: GPL URL: http://www.qubes-os.org +BuildRequires: xen-devel Requires: python, xen-runtime, pciutils, python-inotify, python-daemon, kernel-qubes-dom0 -Conflicts: qubes-gui-dom0 < 1.1.13 +Conflicts: qubes-gui-dom0 < 1.1.13 Requires: NetworkManager >= 0.8.1-1 %define _builddir %(pwd)/dom0 @@ -124,10 +125,16 @@ mkdir -p $RPM_BUILD_ROOT/var/run/qubes %post +# 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 /usr/lib/qubes/qubes_fix_nm_conf.sh if [ -e /etc/yum.repos.d/qubes-r1-dom0.repo ]; then -# we want the user to use the repo that comes with qubes-code-dom0 packages instead +# we want the user to use the repo that comes with qubes-core-dom0 packages instead rm -f /etc/yum.repos.d/qubes-r1-dom0.repo fi @@ -136,15 +143,16 @@ fi #exit 0 #fi -# TODO: This is only temporary, until we will have our own installer -for f in /etc/init.d/* -do - srv=`basename $f` - [ $srv = 'functions' ] && continue - [ $srv = 'killall' ] && continue - [ $srv = 'halt' ] && continue - chkconfig $srv off -done +## TODO: This is only temporary, until we will have our own installer +#for f in /etc/init.d/* +#do +# srv=`basename $f` +# [ $srv = 'functions' ] && continue +# [ $srv = 'killall' ] && continue +# [ $srv = 'halt' ] && continue +# [ $srv = 'single' ] && continue +# chkconfig $srv off +#done chkconfig iptables on chkconfig NetworkManager on @@ -165,6 +173,20 @@ chkconfig qubes_core on || echo "WARNING: Cannot enable service qubes_core!" chkconfig qubes_netvm on || echo "WARNING: Cannot enable service qubes_netvm!" chkconfig qubes_setupdvm on || echo "WARNING: Cannot enable service qubes_setupdvm!" +HAD_SYSCONFIG_NETWORK=yes +if ! [ -e /etc/sysconfig/network ]; then + HAD_SYSCONFIG_NETWORK=no + # supplant empty one so NetworkManager init script does not complain + touch /etc/sysconfig/network +fi + +# Load evtchn module - xenstored needs it +modprobe evtchn + +# Now launch xend - we will need it for subsequent steps +service xenstored start +service xend start + if ! [ -e /var/lib/qubes/qubes.xml ]; then # echo "Initializing Qubes DB..." umask 007; sg qubes -c qvm-init-storage @@ -173,13 +195,16 @@ for i in /usr/share/qubes/icons/*.png ; do xdg-icon-resource install --novendor --size 48 $i done -/etc/init.d/qubes_core start +service qubes_core start NETVM=$(qvm-get-default-netvm) if [ "X"$NETVM = "X""dom0" ] ; then - /etc/init.d/qubes_netvm start + service qubes_netvm start fi +if [ "x"$HAD_SYSCONFIG_NETWORK = "xno" ]; then + rm -f /etc/sysconfig/network +fi %clean rm -rf $RPM_BUILD_ROOT