Merge branch 'ticket4' of git://qubes-os.org/rafal/core
This commit is contained in:
commit
71baae50cb
14
common/qubes_fix_nm_conf.sh
Executable file
14
common/qubes_fix_nm_conf.sh
Executable file
@ -0,0 +1,14 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
FILE=/etc/NetworkManager/NetworkManager.conf
|
||||||
|
VIFMAC=mac:fe:ff:ff:ff:ff:ff
|
||||||
|
if ! grep -q ^plugins.*keyfile $FILE ; then
|
||||||
|
sed -i 's/^plugins.*$/&,keyfile/' $FILE
|
||||||
|
echo '[keyfile]' >> $FILE
|
||||||
|
fi
|
||||||
|
if ! grep -q ^unmanaged-devices $FILE ; then
|
||||||
|
sed -i 's/^\[keyfile\]$/\[keyfile\]\x0aunmanaged-devices='$VIFMAC/ $FILE
|
||||||
|
fi
|
||||||
|
if ! grep -q ^unmanaged-devices.*$VIFMAC $FILE ; then
|
||||||
|
sed -i 's/^unmanaged-devices.*$/&,'$VIFMAC/ $FILE
|
||||||
|
fi
|
||||||
|
exit 0
|
@ -37,7 +37,7 @@ Vendor: Invisible Things Lab
|
|||||||
License: GPL
|
License: GPL
|
||||||
URL: http://www.qubes-os.org
|
URL: http://www.qubes-os.org
|
||||||
Requires: python, xen-runtime, pciutils, python-inotify, python-daemon, kernel-qubes-dom0
|
Requires: python, xen-runtime, pciutils, python-inotify, python-daemon, kernel-qubes-dom0
|
||||||
|
Requires: NetworkManager >= 0.8.1-1
|
||||||
%define _builddir %(pwd)/dom0
|
%define _builddir %(pwd)/dom0
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -103,6 +103,7 @@ cp ../dom0/qubes.repo $RPM_BUILD_ROOT/etc/yum.repos.d
|
|||||||
|
|
||||||
mkdir -p $RPM_BUILD_ROOT/usr/bin
|
mkdir -p $RPM_BUILD_ROOT/usr/bin
|
||||||
cp ../common/qubes_setup_dnat_to_ns $RPM_BUILD_ROOT/usr/lib/qubes
|
cp ../common/qubes_setup_dnat_to_ns $RPM_BUILD_ROOT/usr/lib/qubes
|
||||||
|
cp ../common/qubes_fix_nm_conf.sh $RPM_BUILD_ROOT/usr/lib/qubes
|
||||||
mkdir -p $RPM_BUILD_ROOT/etc/dhclient.d
|
mkdir -p $RPM_BUILD_ROOT/etc/dhclient.d
|
||||||
ln -s /usr/lib/qubes/qubes_setup_dnat_to_ns $RPM_BUILD_ROOT/etc/dhclient.d/qubes_setup_dnat_to_ns.sh
|
ln -s /usr/lib/qubes/qubes_setup_dnat_to_ns $RPM_BUILD_ROOT/etc/dhclient.d/qubes_setup_dnat_to_ns.sh
|
||||||
mkdir -p $RPM_BUILD_ROOT/etc/NetworkManager/dispatcher.d/
|
mkdir -p $RPM_BUILD_ROOT/etc/NetworkManager/dispatcher.d/
|
||||||
@ -119,9 +120,8 @@ sed -i 's/\/block /\/block.qubes /' /etc/udev/rules.d/xen-backend.rules
|
|||||||
|
|
||||||
%post
|
%post
|
||||||
|
|
||||||
if ! grep -q ^no-auto-default.*=.*FE:FF:FF:FF:FF:FF /etc/NetworkManager/nm-system-settings.conf ; then
|
/usr/lib/qubes/qubes_fix_nm_conf.sh
|
||||||
echo no-auto-default=FE:FF:FF:FF:FF:FF >> /etc/NetworkManager/nm-system-settings.conf
|
|
||||||
fi
|
|
||||||
if [ -e /etc/yum.repos.d/qubes-r1-dom0.repo ]; then
|
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-code-dom0 packages instead
|
||||||
rm -f /etc/yum.repos.d/qubes-r1-dom0.repo
|
rm -f /etc/yum.repos.d/qubes-r1-dom0.repo
|
||||||
@ -223,6 +223,7 @@ fi
|
|||||||
%dir /usr/share/qubes/icons/*.png
|
%dir /usr/share/qubes/icons/*.png
|
||||||
/etc/yum.repos.d/qubes.repo
|
/etc/yum.repos.d/qubes.repo
|
||||||
/usr/lib/qubes/qubes_setup_dnat_to_ns
|
/usr/lib/qubes/qubes_setup_dnat_to_ns
|
||||||
|
/usr/lib/qubes/qubes_fix_nm_conf.sh
|
||||||
/etc/dhclient.d/qubes_setup_dnat_to_ns.sh
|
/etc/dhclient.d/qubes_setup_dnat_to_ns.sh
|
||||||
/etc/NetworkManager/dispatcher.d/qubes_nmhook
|
/etc/NetworkManager/dispatcher.d/qubes_nmhook
|
||||||
/etc/sysconfig/iptables
|
/etc/sysconfig/iptables
|
||||||
|
@ -33,6 +33,7 @@ License: GPL
|
|||||||
URL: http://www.qubes-os.org
|
URL: http://www.qubes-os.org
|
||||||
Requires: /usr/bin/xenstore-read
|
Requires: /usr/bin/xenstore-read
|
||||||
Requires: fedora-release = 13
|
Requires: fedora-release = 13
|
||||||
|
Requires: NetworkManager >= 0.8.1-1
|
||||||
Provides: qubes-core-vm
|
Provides: qubes-core-vm
|
||||||
|
|
||||||
%define _builddir %(pwd)/netvm
|
%define _builddir %(pwd)/netvm
|
||||||
@ -61,6 +62,7 @@ cp qubes_core $RPM_BUILD_ROOT/etc/init.d/
|
|||||||
mkdir -p $RPM_BUILD_ROOT/var/lib/qubes
|
mkdir -p $RPM_BUILD_ROOT/var/lib/qubes
|
||||||
mkdir -p $RPM_BUILD_ROOT/usr/lib/qubes
|
mkdir -p $RPM_BUILD_ROOT/usr/lib/qubes
|
||||||
cp ../common/qubes_setup_dnat_to_ns $RPM_BUILD_ROOT/usr/lib/qubes
|
cp ../common/qubes_setup_dnat_to_ns $RPM_BUILD_ROOT/usr/lib/qubes
|
||||||
|
cp ../common/qubes_fix_nm_conf.sh $RPM_BUILD_ROOT/usr/lib/qubes
|
||||||
mkdir -p $RPM_BUILD_ROOT/etc/dhclient.d
|
mkdir -p $RPM_BUILD_ROOT/etc/dhclient.d
|
||||||
ln -s /usr/lib/qubes/qubes_setup_dnat_to_ns $RPM_BUILD_ROOT/etc/dhclient.d/qubes_setup_dnat_to_ns.sh
|
ln -s /usr/lib/qubes/qubes_setup_dnat_to_ns $RPM_BUILD_ROOT/etc/dhclient.d/qubes_setup_dnat_to_ns.sh
|
||||||
mkdir -p $RPM_BUILD_ROOT/etc/NetworkManager/dispatcher.d/
|
mkdir -p $RPM_BUILD_ROOT/etc/NetworkManager/dispatcher.d/
|
||||||
@ -80,9 +82,7 @@ cp /var/lib/qubes/serial.conf /etc/init/serial.conf
|
|||||||
|
|
||||||
%post
|
%post
|
||||||
|
|
||||||
if ! grep -q ^no-auto-default.*=.*FE:FF:FF:FF:FF:FF /etc/NetworkManager/nm-system-settings.conf ; then
|
/usr/lib/qubes/qubes_fix_nm_conf.sh
|
||||||
echo no-auto-default=FE:FF:FF:FF:FF:FF >> /etc/NetworkManager/nm-system-settings.conf
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$1" != 1 ] ; then
|
if [ "$1" != 1 ] ; then
|
||||||
# do this whole %post thing only when updating for the first time...
|
# do this whole %post thing only when updating for the first time...
|
||||||
@ -176,6 +176,7 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
/etc/init.d/qubes_core
|
/etc/init.d/qubes_core
|
||||||
/var/lib/qubes
|
/var/lib/qubes
|
||||||
/usr/lib/qubes/qubes_setup_dnat_to_ns
|
/usr/lib/qubes/qubes_setup_dnat_to_ns
|
||||||
|
/usr/lib/qubes/qubes_fix_nm_conf.sh
|
||||||
/etc/dhclient.d/qubes_setup_dnat_to_ns.sh
|
/etc/dhclient.d/qubes_setup_dnat_to_ns.sh
|
||||||
/etc/NetworkManager/dispatcher.d/qubes_nmhook
|
/etc/NetworkManager/dispatcher.d/qubes_nmhook
|
||||||
/etc/yum.repos.d/qubes.repo
|
/etc/yum.repos.d/qubes.repo
|
||||||
|
Loading…
Reference in New Issue
Block a user