forked from pool/libvirt
- Fix generation of dnsmasq's --dhcp-hostsfile option
a43c7338-dnsmasq-hostfile-fix.patch - Disable yajl support as the library does not yet exist in SuSE distros. OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=86
This commit is contained in:
parent
f130666494
commit
c2191ca9d3
48
a43c7338-dnsmasq-hostfile-fix.patch
Normal file
48
a43c7338-dnsmasq-hostfile-fix.patch
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
commit a43c7338d8772aa3a5bc0ec5914d3c28c20447c3
|
||||||
|
Author: Kay Schubert <kayegypt@web.de>
|
||||||
|
Date: Thu Jan 6 09:14:58 2011 +0100
|
||||||
|
|
||||||
|
bridge: Fix generation of dnsmasq's --dhcp-hostsfile option
|
||||||
|
|
||||||
|
I added a host definition to a network definition:
|
||||||
|
|
||||||
|
<network>
|
||||||
|
<name>Lokal</name>
|
||||||
|
<uuid>2074f379-b82c-423f-9ada-305d8088daaa</uuid>
|
||||||
|
<bridge name='virbr1' stp='on' delay='0' />
|
||||||
|
<ip address='192.168.180.1' netmask='255.255.255.0'>
|
||||||
|
<dhcp>
|
||||||
|
<range start='192.168.180.128' end='192.168.180.254' />
|
||||||
|
<host mac='23:74:00:03:42:02' name='somevm' ip='192.168.180.10' />
|
||||||
|
</dhcp>
|
||||||
|
</ip>
|
||||||
|
</network>
|
||||||
|
|
||||||
|
But due to the wrong if-statement the argument --dhcp-hostsfile doesn't get
|
||||||
|
added to the dnsmasq command. The patch below fixes it for me.
|
||||||
|
|
||||||
|
diff --git a/AUTHORS b/AUTHORS
|
||||||
|
index b204bd6..721b8f8 100644
|
||||||
|
--- a/AUTHORS
|
||||||
|
+++ b/AUTHORS
|
||||||
|
@@ -142,6 +142,7 @@ Patches have also been contributed by:
|
||||||
|
Josh Durgin <joshd@hq.newdream.net>
|
||||||
|
Roopa Prabhu <roprabhu@cisco.com>
|
||||||
|
Paweł Krześniak <pawel.krzesniak@gmail.com>
|
||||||
|
+ Kay Schubert <kayegypt@web.de>
|
||||||
|
|
||||||
|
[....send patches to get your name here....]
|
||||||
|
|
||||||
|
diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c
|
||||||
|
index 7d43ef5..4c64a74 100644
|
||||||
|
--- a/src/network/bridge_driver.c
|
||||||
|
+++ b/src/network/bridge_driver.c
|
||||||
|
@@ -524,7 +524,7 @@ networkBuildDnsmasqArgv(virNetworkObjPtr network,
|
||||||
|
goto cleanup;
|
||||||
|
}
|
||||||
|
|
||||||
|
- if (networkSaveDnsmasqHostsfile(ipdef, dctx, false) < 0) {
|
||||||
|
+ if (networkSaveDnsmasqHostsfile(ipdef, dctx, false) == 0) {
|
||||||
|
virCommandAddArgPair(cmd, "--dhcp-hostsfile",
|
||||||
|
dctx->hostsfile->path);
|
||||||
|
}
|
@ -1,3 +1,11 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Jan 14 15:39:16 MST 2011 - jfehlig@novell.com
|
||||||
|
|
||||||
|
- Fix generation of dnsmasq's --dhcp-hostsfile option
|
||||||
|
a43c7338-dnsmasq-hostfile-fix.patch
|
||||||
|
- Disable yajl support as the library does not yet exist in
|
||||||
|
SuSE distros.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Jan 11 16:40:27 MST 2011 - jfehlig@novell.com
|
Tue Jan 11 16:40:27 MST 2011 - jfehlig@novell.com
|
||||||
|
|
||||||
|
@ -39,6 +39,8 @@
|
|||||||
%define with_selinux 1
|
%define with_selinux 1
|
||||||
%define with_apparmor 0
|
%define with_apparmor 0
|
||||||
# options
|
# options
|
||||||
|
# still no yajl json library
|
||||||
|
%define with_yajl 0
|
||||||
%if 0%{?suse_version} >= 1130
|
%if 0%{?suse_version} >= 1130
|
||||||
%define with_capng 1
|
%define with_capng 1
|
||||||
%else
|
%else
|
||||||
@ -46,12 +48,10 @@
|
|||||||
%endif
|
%endif
|
||||||
%if 0%{?suse_version} >= 1140
|
%if 0%{?suse_version} >= 1140
|
||||||
%define with_netcf 1
|
%define with_netcf 1
|
||||||
%define with_yajl 1
|
|
||||||
%define with_macvtap 1
|
%define with_macvtap 1
|
||||||
%define with_virtualport 1
|
%define with_virtualport 1
|
||||||
%else
|
%else
|
||||||
%define with_netcf 0
|
%define with_netcf 0
|
||||||
%define with_yajl 0
|
|
||||||
%define with_macvtap 0
|
%define with_macvtap 0
|
||||||
%define with_virtualport 0
|
%define with_virtualport 0
|
||||||
%endif
|
%endif
|
||||||
@ -169,6 +169,7 @@ Recommends: PolicyKit >= 0.6
|
|||||||
Source0: %{name}-%{version}.tar.bz2
|
Source0: %{name}-%{version}.tar.bz2
|
||||||
Source1: libvirtd.init
|
Source1: libvirtd.init
|
||||||
# Upstream patches
|
# Upstream patches
|
||||||
|
Patch0: a43c7338-dnsmasq-hostfile-fix.patch
|
||||||
# Need to go upstream
|
# Need to go upstream
|
||||||
Patch100: xen-name-for-devid.patch
|
Patch100: xen-name-for-devid.patch
|
||||||
Patch102: clone.patch
|
Patch102: clone.patch
|
||||||
@ -281,6 +282,7 @@ Authors:
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
|
%patch0 -p1
|
||||||
%patch100 -p1
|
%patch100 -p1
|
||||||
%patch102
|
%patch102
|
||||||
%patch103 -p1
|
%patch103 -p1
|
||||||
|
Loading…
Reference in New Issue
Block a user