Compare commits
1 commit
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4d408d0e84 |
9 changed files with 484 additions and 134 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -3,3 +3,4 @@ x86_64/
|
|||
*.src.rpm
|
||||
.build*.log
|
||||
*~
|
||||
|
||||
|
|
|
|||
32
0001-Always-set-earlyprintk-kernel-arg.patch
Normal file
32
0001-Always-set-earlyprintk-kernel-arg.patch
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
From 2babb5499c41054e0c9e5f8712f57a2cc716cfb2 Mon Sep 17 00:00:00 2001
|
||||
From: "Daniel P. Berrange" <berrange@redhat.com>
|
||||
Date: Mon, 30 Sep 2013 15:13:06 +0100
|
||||
Subject: [PATCH] Always set earlyprintk kernel arg
|
||||
|
||||
If the initrd fails and prints to stderr, this goes to /dev/null
|
||||
unless earlyprintk is enabled. We always want to see initrd
|
||||
errors, so we should always have earlyprintk set.
|
||||
|
||||
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
|
||||
(cherry picked from commit b14ce17bb357d5b7f99562c91dafb521f6985b40)
|
||||
---
|
||||
libvirt-sandbox/libvirt-sandbox-builder-machine.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/libvirt-sandbox/libvirt-sandbox-builder-machine.c b/libvirt-sandbox/libvirt-sandbox-builder-machine.c
|
||||
index c94a641..18ebcea 100644
|
||||
--- a/libvirt-sandbox/libvirt-sandbox-builder-machine.c
|
||||
+++ b/libvirt-sandbox/libvirt-sandbox-builder-machine.c
|
||||
@@ -207,10 +207,10 @@ static gchar *gvir_sandbox_builder_machine_cmdline(GVirSandboxConfig *config G_G
|
||||
gchar *tmp;
|
||||
|
||||
/* Now kernel args */
|
||||
- g_string_append(str, " console=ttyS0");
|
||||
+ g_string_append(str, " console=ttyS0 earlyprintk=ttyS0");
|
||||
if (getenv("LIBVIRT_SANDBOX_DEBUG") &&
|
||||
g_str_equal(getenv("LIBVIRT_SANDBOX_DEBUG"), "2"))
|
||||
- g_string_append(str, " debug loglevel=10 earlyprintk=ttyS0");
|
||||
+ g_string_append(str, " debug loglevel=10");
|
||||
else
|
||||
g_string_append(str, " quiet loglevel=0");
|
||||
|
||||
27
0002-Don-t-overmount-root-in-QEMU-sandboxes.patch
Normal file
27
0002-Don-t-overmount-root-in-QEMU-sandboxes.patch
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
From e593f55e0634b95e045fdff7ab2ddbbf6ce84b41 Mon Sep 17 00:00:00 2001
|
||||
From: "Daniel P. Berrange" <berrange@redhat.com>
|
||||
Date: Tue, 1 Oct 2013 13:51:34 +0100
|
||||
Subject: [PATCH] Don't overmount '/root' in QEMU sandboxes
|
||||
|
||||
If the user wants to replace '/root' they can do that
|
||||
explicitly. Don't overmount it ourselves. This fixes
|
||||
an inconsistency between LXC & QEMU setups.
|
||||
|
||||
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
|
||||
(cherry picked from commit 6ae67143e69f435b564164bfa67a174be7bc9702)
|
||||
---
|
||||
libvirt-sandbox/libvirt-sandbox-init-qemu.c | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
diff --git a/libvirt-sandbox/libvirt-sandbox-init-qemu.c b/libvirt-sandbox/libvirt-sandbox-init-qemu.c
|
||||
index f09c6d9..079f83f 100644
|
||||
--- a/libvirt-sandbox/libvirt-sandbox-init-qemu.c
|
||||
+++ b/libvirt-sandbox/libvirt-sandbox-init-qemu.c
|
||||
@@ -284,7 +284,6 @@ main(int argc ATTR_UNUSED, char **argv ATTR_UNUSED)
|
||||
/* Main special filesystems */
|
||||
mount_other("/dev", "tmpfs", 0755);
|
||||
mount_other_opts("/dev/pts", "devpts", "gid=5,mode=620,ptmxmode=000", 0755);
|
||||
- mount_other("/root", "tmpfs", 0755);
|
||||
mount_other("/sys", "sysfs", 0755);
|
||||
mount_other("/proc", "proc", 0755);
|
||||
//mount_other("/selinux", "selinuxfs", 0755);
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
From 2a742067eac4db8b2c33809bbb9a9423123f971a Mon Sep 17 00:00:00 2001
|
||||
From: "Daniel P. Berrange" <berrange@redhat.com>
|
||||
Date: Tue, 1 Oct 2013 13:52:36 +0100
|
||||
Subject: [PATCH] Fix inverted strcmp test in mount options for QEMU
|
||||
|
||||
The QEMU init binary intended to set nosuid & nodev on any
|
||||
tmpfs filesystem. Due to a backwards strcmp test, it set
|
||||
those flaws on everything except tmpfs.
|
||||
|
||||
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
|
||||
(cherry picked from commit 8234b949106190f7df4c5b500c1520611eb8a603)
|
||||
---
|
||||
libvirt-sandbox/libvirt-sandbox-init-qemu.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/libvirt-sandbox/libvirt-sandbox-init-qemu.c b/libvirt-sandbox/libvirt-sandbox-init-qemu.c
|
||||
index 079f83f..b7e4c6f 100644
|
||||
--- a/libvirt-sandbox/libvirt-sandbox-init-qemu.c
|
||||
+++ b/libvirt-sandbox/libvirt-sandbox-init-qemu.c
|
||||
@@ -382,7 +382,7 @@ main(int argc ATTR_UNUSED, char **argv ATTR_UNUSED)
|
||||
else
|
||||
mount_mkfile(target, 644);
|
||||
} else {
|
||||
- if (strcmp(type, "tmpfs"))
|
||||
+ if (strcmp(type, "tmpfs") == 0)
|
||||
flags |= MS_NOSUID | MS_NODEV;
|
||||
|
||||
mount_mkdir(target, 0755);
|
||||
48
0004-Force-9p-version-to-version-9p2000.u.patch
Normal file
48
0004-Force-9p-version-to-version-9p2000.u.patch
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
From 9df128272ac576bf9194ae4374c0e678884e76bf Mon Sep 17 00:00:00 2001
|
||||
From: "Daniel P. Berrange" <berrange@redhat.com>
|
||||
Date: Tue, 1 Oct 2013 13:54:10 +0100
|
||||
Subject: [PATCH] Force 9p version to version=9p2000.u
|
||||
|
||||
With 9p version=9p2000.L, we tickle two bugs in QEMU's code.
|
||||
|
||||
One breaks most calls with ENODEV on FS_IOC_GETVERSION ioctls.
|
||||
|
||||
The other breaks xattr checks due to inverted errno.
|
||||
|
||||
In addition with 9p2000.L we see extra permission checks
|
||||
on dirs, which prevents the guest from over-mounting dirs
|
||||
like /root that are restricted on the user running QEMU.
|
||||
|
||||
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
|
||||
(cherry picked from commit f4087aa0e993f59772d3bda53038888af7f43b5e)
|
||||
---
|
||||
libvirt-sandbox/libvirt-sandbox-builder-machine.c | 2 +-
|
||||
libvirt-sandbox/libvirt-sandbox-init-qemu.c | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/libvirt-sandbox/libvirt-sandbox-builder-machine.c b/libvirt-sandbox/libvirt-sandbox-builder-machine.c
|
||||
index 18ebcea..d78d755 100644
|
||||
--- a/libvirt-sandbox/libvirt-sandbox-builder-machine.c
|
||||
+++ b/libvirt-sandbox/libvirt-sandbox-builder-machine.c
|
||||
@@ -278,7 +278,7 @@ static gboolean gvir_sandbox_builder_machine_write_mount_cfg(GVirSandboxConfig *
|
||||
if (GVIR_SANDBOX_IS_CONFIG_MOUNT_HOST_BIND(mconfig)) {
|
||||
source = g_strdup_printf("sandbox:mount%zu", nHostBind++);
|
||||
fstype = "9p";
|
||||
- options = g_strdup("trans=virtio");
|
||||
+ options = g_strdup("trans=virtio,version=9p2000.u");
|
||||
} else if (GVIR_SANDBOX_IS_CONFIG_MOUNT_HOST_IMAGE(mconfig)) {
|
||||
source = g_strdup_printf("vd%c", (char)('a' + nHostImage++));
|
||||
fstype = "ext3";
|
||||
diff --git a/libvirt-sandbox/libvirt-sandbox-init-qemu.c b/libvirt-sandbox/libvirt-sandbox-init-qemu.c
|
||||
index b7e4c6f..f72148a 100644
|
||||
--- a/libvirt-sandbox/libvirt-sandbox-init-qemu.c
|
||||
+++ b/libvirt-sandbox/libvirt-sandbox-init-qemu.c
|
||||
@@ -165,7 +165,7 @@ mount_9pfs(const char *src, const char *dst, int mode, int readonly)
|
||||
if (readonly)
|
||||
flags |= MS_RDONLY;
|
||||
|
||||
- if (mount(src, dst, "9p", flags, "trans=virtio") < 0) {
|
||||
+ if (mount(src, dst, "9p", flags, "trans=virtio,version=9p2000.u") < 0) {
|
||||
fprintf(stderr, "libvirt-sandbox-init-qemu: %s: cannot mount %s on %s (9p): %s\n",
|
||||
__func__, src, dst, strerror(errno));
|
||||
exit_poweroff();
|
||||
267
0005-Add-support-for-configuring-NIC-mac-addresses.patch
Normal file
267
0005-Add-support-for-configuring-NIC-mac-addresses.patch
Normal file
|
|
@ -0,0 +1,267 @@
|
|||
From 1120aff4808a433bfee38ddc8e5068f899ef2b12 Mon Sep 17 00:00:00 2001
|
||||
From: "Daniel P. Berrange" <berrange@redhat.com>
|
||||
Date: Tue, 9 Jul 2013 12:19:05 +0100
|
||||
Subject: [PATCH] Add support for configuring NIC mac addresses
|
||||
|
||||
Allow config of NIC mac addresses via a 'mac' parameter on
|
||||
the command line eg
|
||||
|
||||
virt-sandbox -c qemu:///session -N mac=02:04:05:05:05:06 /bin/sh
|
||||
|
||||
(and also for virt-sandbox-service)
|
||||
|
||||
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
|
||||
(cherry picked from commit e799f01b5ddb2c5182f6f2a668638292d1bbcbb8)
|
||||
---
|
||||
bin/virt-sandbox-service-create.pod | 5 +++
|
||||
bin/virt-sandbox.c | 5 +++
|
||||
.../libvirt-sandbox-builder-container.c | 7 +++-
|
||||
libvirt-sandbox/libvirt-sandbox-builder-machine.c | 6 +++-
|
||||
libvirt-sandbox/libvirt-sandbox-config-network.c | 40 ++++++++++++++++++++++
|
||||
libvirt-sandbox/libvirt-sandbox-config-network.h | 4 +++
|
||||
libvirt-sandbox/libvirt-sandbox-config.c | 10 ++++++
|
||||
libvirt-sandbox/libvirt-sandbox.sym | 2 ++
|
||||
8 files changed, 77 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/bin/virt-sandbox-service-create.pod b/bin/virt-sandbox-service-create.pod
|
||||
index 942c919..8e3b114 100644
|
||||
--- a/bin/virt-sandbox-service-create.pod
|
||||
+++ b/bin/virt-sandbox-service-create.pod
|
||||
@@ -91,6 +91,11 @@ where 'source' is the name of any libvirt virtual network.
|
||||
Set the name of the network to connect the interface to. C<NETWORK>
|
||||
is the name of any libvirt virtual network. See also B<virsh net-list>
|
||||
|
||||
+=item mac=NN:NN:NN:NN:NN:NN
|
||||
+
|
||||
+Set the MAC address of the network interface, where each NN is a pair
|
||||
+of hex digits.
|
||||
+
|
||||
=item address=IP-ADDRESS/PREFIX%BROADCAST
|
||||
|
||||
Configure the network interface with the static IPv4 or IPv6 address
|
||||
diff --git a/bin/virt-sandbox.c b/bin/virt-sandbox.c
|
||||
index f1db8c1..883e6c0 100644
|
||||
--- a/bin/virt-sandbox.c
|
||||
+++ b/bin/virt-sandbox.c
|
||||
@@ -352,6 +352,11 @@ where 'source' is the name of any libvirt virtual network.
|
||||
Set the name of the network to connect the interface to. C<NETWORK>
|
||||
is the name of any libvirt virtual network. See also B<virsh net-list>
|
||||
|
||||
+=item mac=NN:NN:NN:NN:NN:NN
|
||||
+
|
||||
+Set the MAC address of the network interface, where each NN is a pair
|
||||
+of hex digits.
|
||||
+
|
||||
=item address=IP-ADDRESS/PREFIX%BROADCAST
|
||||
|
||||
Configure the network interface with the static IPv4 or IPv6 address
|
||||
diff --git a/libvirt-sandbox/libvirt-sandbox-builder-container.c b/libvirt-sandbox/libvirt-sandbox-builder-container.c
|
||||
index d4e9bda..9fa870d 100644
|
||||
--- a/libvirt-sandbox/libvirt-sandbox-builder-container.c
|
||||
+++ b/libvirt-sandbox/libvirt-sandbox-builder-container.c
|
||||
@@ -323,7 +323,7 @@ static gboolean gvir_sandbox_builder_container_construct_devices(GVirSandboxBuil
|
||||
|
||||
tmp = networks = gvir_sandbox_config_get_networks(config);
|
||||
while (tmp) {
|
||||
- const gchar *source;
|
||||
+ const gchar *source, *mac;
|
||||
GVirSandboxConfigNetwork *network = GVIR_SANDBOX_CONFIG_NETWORK(tmp->data);
|
||||
|
||||
iface = gvir_config_domain_interface_network_new();
|
||||
@@ -333,6 +333,11 @@ static gboolean gvir_sandbox_builder_container_construct_devices(GVirSandboxBuil
|
||||
else
|
||||
gvir_config_domain_interface_network_set_source(iface, "default");
|
||||
|
||||
+ mac = gvir_sandbox_config_network_get_mac(network);
|
||||
+ if (mac)
|
||||
+ gvir_config_domain_interface_set_mac(GVIR_CONFIG_DOMAIN_INTERFACE(iface),
|
||||
+ mac);
|
||||
+
|
||||
gvir_config_domain_add_device(domain,
|
||||
GVIR_CONFIG_DOMAIN_DEVICE(iface));
|
||||
g_object_unref(iface);
|
||||
diff --git a/libvirt-sandbox/libvirt-sandbox-builder-machine.c b/libvirt-sandbox/libvirt-sandbox-builder-machine.c
|
||||
index d78d755..2ad30ab 100644
|
||||
--- a/libvirt-sandbox/libvirt-sandbox-builder-machine.c
|
||||
+++ b/libvirt-sandbox/libvirt-sandbox-builder-machine.c
|
||||
@@ -542,7 +542,7 @@ static gboolean gvir_sandbox_builder_machine_construct_devices(GVirSandboxBuilde
|
||||
|
||||
tmp = networks = gvir_sandbox_config_get_networks(config);
|
||||
while (tmp) {
|
||||
- const gchar *source;
|
||||
+ const gchar *source, *mac;
|
||||
GVirSandboxConfigNetwork *network = GVIR_SANDBOX_CONFIG_NETWORK(tmp->data);
|
||||
|
||||
source = gvir_sandbox_config_network_get_source(network);
|
||||
@@ -554,6 +554,10 @@ static gboolean gvir_sandbox_builder_machine_construct_devices(GVirSandboxBuilde
|
||||
iface = GVIR_CONFIG_DOMAIN_INTERFACE(gvir_config_domain_interface_user_new());
|
||||
}
|
||||
|
||||
+ mac = gvir_sandbox_config_network_get_mac(network);
|
||||
+ if (mac)
|
||||
+ gvir_config_domain_interface_set_mac(iface, mac);
|
||||
+
|
||||
gvir_config_domain_interface_set_model(iface,
|
||||
"virtio");
|
||||
|
||||
diff --git a/libvirt-sandbox/libvirt-sandbox-config-network.c b/libvirt-sandbox/libvirt-sandbox-config-network.c
|
||||
index 173ac36..0283f8a 100644
|
||||
--- a/libvirt-sandbox/libvirt-sandbox-config-network.c
|
||||
+++ b/libvirt-sandbox/libvirt-sandbox-config-network.c
|
||||
@@ -44,6 +44,7 @@ struct _GVirSandboxConfigNetworkPrivate
|
||||
{
|
||||
gboolean dhcp;
|
||||
gchar *source;
|
||||
+ gchar *mac;
|
||||
GList *routes;
|
||||
GList *addrs;
|
||||
};
|
||||
@@ -55,6 +56,7 @@ enum {
|
||||
PROP_0,
|
||||
PROP_DHCP,
|
||||
PROP_SOURCE,
|
||||
+ PROP_MAC,
|
||||
};
|
||||
|
||||
enum {
|
||||
@@ -81,6 +83,10 @@ static void gvir_sandbox_config_network_get_property(GObject *object,
|
||||
g_value_set_string(value, priv->source);
|
||||
break;
|
||||
|
||||
+ case PROP_MAC:
|
||||
+ g_value_set_string(value, priv->mac);
|
||||
+ break;
|
||||
+
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
|
||||
}
|
||||
@@ -105,6 +111,11 @@ static void gvir_sandbox_config_network_set_property(GObject *object,
|
||||
priv->source = g_value_dup_string(value);
|
||||
break;
|
||||
|
||||
+ case PROP_MAC:
|
||||
+ g_free(priv->mac);
|
||||
+ priv->mac = g_value_dup_string(value);
|
||||
+ break;
|
||||
+
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
|
||||
}
|
||||
@@ -117,6 +128,7 @@ static void gvir_sandbox_config_network_finalize(GObject *object)
|
||||
GVirSandboxConfigNetworkPrivate *priv = config->priv;
|
||||
|
||||
g_free(priv->source);
|
||||
+ g_free(priv->mac);
|
||||
g_list_foreach(priv->addrs, (GFunc)g_object_unref, NULL);
|
||||
g_list_foreach(priv->routes, (GFunc)g_object_unref, NULL);
|
||||
|
||||
@@ -155,6 +167,18 @@ static void gvir_sandbox_config_network_class_init(GVirSandboxConfigNetworkClass
|
||||
G_PARAM_STATIC_NICK |
|
||||
G_PARAM_STATIC_BLURB));
|
||||
|
||||
+ g_object_class_install_property(object_class,
|
||||
+ PROP_MAC,
|
||||
+ g_param_spec_string("mac",
|
||||
+ "MAC",
|
||||
+ "MAC address",
|
||||
+ NULL,
|
||||
+ G_PARAM_READABLE |
|
||||
+ G_PARAM_WRITABLE |
|
||||
+ G_PARAM_STATIC_NAME |
|
||||
+ G_PARAM_STATIC_NICK |
|
||||
+ G_PARAM_STATIC_BLURB));
|
||||
+
|
||||
g_type_class_add_private(klass, sizeof(GVirSandboxConfigNetworkPrivate));
|
||||
}
|
||||
|
||||
@@ -198,6 +222,22 @@ const gchar *gvir_sandbox_config_network_get_source(GVirSandboxConfigNetwork *co
|
||||
}
|
||||
|
||||
|
||||
+void gvir_sandbox_config_network_set_mac(GVirSandboxConfigNetwork *config,
|
||||
+ const gchar *mac)
|
||||
+{
|
||||
+ GVirSandboxConfigNetworkPrivate *priv = config->priv;
|
||||
+ g_free(priv->mac);
|
||||
+ priv->mac = g_strdup(mac);
|
||||
+}
|
||||
+
|
||||
+
|
||||
+const gchar *gvir_sandbox_config_network_get_mac(GVirSandboxConfigNetwork *config)
|
||||
+{
|
||||
+ GVirSandboxConfigNetworkPrivate *priv = config->priv;
|
||||
+ return priv->mac;
|
||||
+}
|
||||
+
|
||||
+
|
||||
void gvir_sandbox_config_network_set_dhcp(GVirSandboxConfigNetwork *config,
|
||||
gboolean dhcp)
|
||||
{
|
||||
diff --git a/libvirt-sandbox/libvirt-sandbox-config-network.h b/libvirt-sandbox/libvirt-sandbox-config-network.h
|
||||
index 1c588ef..9ad8577 100644
|
||||
--- a/libvirt-sandbox/libvirt-sandbox-config-network.h
|
||||
+++ b/libvirt-sandbox/libvirt-sandbox-config-network.h
|
||||
@@ -65,6 +65,10 @@ void gvir_sandbox_config_network_set_source(GVirSandboxConfigNetwork *config,
|
||||
const gchar *network);
|
||||
const gchar *gvir_sandbox_config_network_get_source(GVirSandboxConfigNetwork *config);
|
||||
|
||||
+void gvir_sandbox_config_network_set_mac(GVirSandboxConfigNetwork *config,
|
||||
+ const gchar *mac);
|
||||
+const gchar *gvir_sandbox_config_network_get_mac(GVirSandboxConfigNetwork *config);
|
||||
+
|
||||
void gvir_sandbox_config_network_set_dhcp(GVirSandboxConfigNetwork *config,
|
||||
gboolean dhcp);
|
||||
gboolean gvir_sandbox_config_network_get_dhcp(GVirSandboxConfigNetwork *config);
|
||||
diff --git a/libvirt-sandbox/libvirt-sandbox-config.c b/libvirt-sandbox/libvirt-sandbox-config.c
|
||||
index 10082bb..6f7c6ff 100644
|
||||
--- a/libvirt-sandbox/libvirt-sandbox-config.c
|
||||
+++ b/libvirt-sandbox/libvirt-sandbox-config.c
|
||||
@@ -888,6 +888,9 @@ gboolean gvir_sandbox_config_add_network_opts(GVirSandboxConfig *config,
|
||||
} else if (g_str_has_prefix(param, "source=")) {
|
||||
gvir_sandbox_config_network_set_source(net,
|
||||
param + strlen("source="));
|
||||
+ } else if (g_str_has_prefix(param, "mac=")) {
|
||||
+ gvir_sandbox_config_network_set_mac(net,
|
||||
+ param + strlen("mac="));
|
||||
} else if (g_str_has_prefix(param, "address=")) {
|
||||
GVirSandboxConfigNetworkAddress *addr;
|
||||
GInetAddress *primaryaddr;
|
||||
@@ -1618,6 +1621,11 @@ static GVirSandboxConfigNetwork *gvir_sandbox_config_load_config_network(GKeyFil
|
||||
gvir_sandbox_config_network_set_source(config, str1);
|
||||
g_free(str1);
|
||||
|
||||
+ str1 = g_key_file_get_string(file, key, "mac", NULL);
|
||||
+ if (str1)
|
||||
+ gvir_sandbox_config_network_set_mac(config, str1);
|
||||
+ g_free(str1);
|
||||
+
|
||||
g_free(key);
|
||||
key = NULL;
|
||||
|
||||
@@ -1941,6 +1949,8 @@ static void gvir_sandbox_config_save_config_network(GVirSandboxConfigNetwork *co
|
||||
g_key_file_set_boolean(file, key, "dhcp", gvir_sandbox_config_network_get_dhcp(config));
|
||||
if (gvir_sandbox_config_network_get_source(config))
|
||||
g_key_file_set_string(file, key, "source", gvir_sandbox_config_network_get_source(config));
|
||||
+ if (gvir_sandbox_config_network_get_mac(config))
|
||||
+ g_key_file_set_string(file, key, "mac", gvir_sandbox_config_network_get_mac(config));
|
||||
g_key_file_set_uint64(file, key, "addresses", j);
|
||||
g_key_file_set_uint64(file, key, "routes", k);
|
||||
g_free(key);
|
||||
diff --git a/libvirt-sandbox/libvirt-sandbox.sym b/libvirt-sandbox/libvirt-sandbox.sym
|
||||
index 716de66..09f863d 100644
|
||||
--- a/libvirt-sandbox/libvirt-sandbox.sym
|
||||
+++ b/libvirt-sandbox/libvirt-sandbox.sym
|
||||
@@ -55,11 +55,13 @@ LIBVIRT_SANDBOX_0.2.0 {
|
||||
gvir_sandbox_config_network_add_route;
|
||||
gvir_sandbox_config_network_get_type;
|
||||
gvir_sandbox_config_network_get_dhcp;
|
||||
+ gvir_sandbox_config_network_get_mac;
|
||||
gvir_sandbox_config_network_get_source;
|
||||
gvir_sandbox_config_network_get_routes;
|
||||
gvir_sandbox_config_network_get_addresses;
|
||||
gvir_sandbox_config_network_new;
|
||||
gvir_sandbox_config_network_set_dhcp;
|
||||
+ gvir_sandbox_config_network_set_mac;
|
||||
gvir_sandbox_config_network_set_source;
|
||||
|
||||
gvir_sandbox_config_network_address_get_type;
|
||||
25
0006-S-is-not-supported-by-virt-sandbox.patch
Normal file
25
0006-S-is-not-supported-by-virt-sandbox.patch
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
From 4d073041f96975fc8acfb459958844339da57ea7 Mon Sep 17 00:00:00 2001
|
||||
From: Dan Walsh <dwalsh@redhat.com>
|
||||
Date: Thu, 15 Aug 2013 07:56:46 -0400
|
||||
Subject: [PATCH] -S is not supported by virt-sandbox
|
||||
|
||||
-S option has been removed from virt-sandbox, should be removed from man page.
|
||||
|
||||
(cherry picked from commit 43f348a9a8d96dfa145a7883bed9fc6b1deca683)
|
||||
---
|
||||
bin/virt-sandbox.c | 2 --
|
||||
1 file changed, 2 deletions(-)
|
||||
|
||||
diff --git a/bin/virt-sandbox.c b/bin/virt-sandbox.c
|
||||
index 883e6c0..7e299ef 100644
|
||||
--- a/bin/virt-sandbox.c
|
||||
+++ b/bin/virt-sandbox.c
|
||||
@@ -263,8 +263,6 @@ virt-sandbox - Run cmd under a virtual machine sandbox
|
||||
|
||||
virt-sandbox [OPTIONS...] COMMAND [CMDARG1 [CMDARG2 [...]]]
|
||||
|
||||
-virt-sandbox [OPTIONS...] -S
|
||||
-
|
||||
=head1 DESCRIPTION
|
||||
|
||||
Run the C<cmd> application within a tightly confined virtual machine. The
|
||||
|
|
@ -1,52 +1,61 @@
|
|||
# -*- rpm-spec -*-
|
||||
|
||||
%define with_qemu 1
|
||||
%define with_tcg 1
|
||||
%define with_kvm 1
|
||||
|
||||
# RHEL does not provide the 9p.ko kernel module
|
||||
# nor the virtio-9p KVM backend driver.
|
||||
%if 0%{?rhel}
|
||||
%define with_qemu 0
|
||||
%define with_tcg 0
|
||||
%define with_kvm 0
|
||||
%endif
|
||||
|
||||
%define libvirt_version 1.0.2
|
||||
|
||||
|
||||
Name: libvirt-sandbox
|
||||
Version: 0.8.0
|
||||
Release: 21%{?dist}
|
||||
Version: 0.2.0
|
||||
Release: 2%{?dist}%{?extra_release}
|
||||
Summary: libvirt application sandbox framework
|
||||
# Automatically converted from old format: LGPLv2+ - review is highly recommended.
|
||||
License: LicenseRef-Callaway-LGPLv2+
|
||||
Group: Development/Tools
|
||||
License: LGPLv2+
|
||||
URL: http://libvirt.org/
|
||||
Source0: ftp://libvirt.org/libvirt/sandbox/%{name}-%{version}.tar.gz
|
||||
BuildRequires: make
|
||||
BuildRequires: libvirt-gobject-devel >= 0.2.1
|
||||
Patch1: 0001-Always-set-earlyprintk-kernel-arg.patch
|
||||
Patch2: 0002-Don-t-overmount-root-in-QEMU-sandboxes.patch
|
||||
Patch3: 0003-Fix-inverted-strcmp-test-in-mount-options-for-QEMU.patch
|
||||
Patch4: 0004-Force-9p-version-to-version-9p2000.u.patch
|
||||
Patch5: 0005-Add-support-for-configuring-NIC-mac-addresses.patch
|
||||
Patch6: 0006-S-is-not-supported-by-virt-sandbox.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
BuildRequires: libvirt-gobject-devel >= 0.0.9
|
||||
BuildRequires: gobject-introspection-devel
|
||||
BuildRequires: libselinux-devel
|
||||
BuildRequires: glibc-static
|
||||
BuildRequires: /usr/bin/pod2man
|
||||
BuildRequires: intltool
|
||||
BuildRequires: libselinux-devel
|
||||
BuildRequires: glib2-devel >= 2.32.0
|
||||
BuildRequires: xz-devel >= 5.0.0, xz-static
|
||||
BuildRequires: zlib-devel >= 1.2.0, zlib-static
|
||||
%if 0%{fedora} > 27
|
||||
BuildRequires: libtirpc-devel
|
||||
BuildRequires: rpcgen
|
||||
%endif
|
||||
Requires: %{name}-libs = %{version}-%{release}
|
||||
Requires: rpm-python
|
||||
Requires: glib2-devel >= 2.32.0
|
||||
# For virsh lxc-enter-namespace command
|
||||
Requires: libvirt-client >= %{libvirt_version}
|
||||
Requires: systemd >= 198
|
||||
|
||||
%package libs
|
||||
Group: Development/Libraries
|
||||
Summary: libvirt application sandbox framework libraries
|
||||
# So we get the full libvirtd daemon, not just client libs
|
||||
%if %{with_qemu}
|
||||
%ifarch %{ix86} x86_64
|
||||
%ifarch %{ix86} x86_64
|
||||
%if %{with_kvm}
|
||||
Requires: libvirt-daemon-kvm >= %{libvirt_version}
|
||||
%else
|
||||
%endif
|
||||
%endif
|
||||
%if %{with_tcg}
|
||||
Requires: libvirt-daemon-qemu >= %{libvirt_version}
|
||||
%endif
|
||||
%endif
|
||||
Requires: libvirt-daemon-lxc >= %{libvirt_version}
|
||||
|
||||
%package devel
|
||||
Group: Development/Libraries
|
||||
Summary: libvirt application sandbox framework development files
|
||||
Requires: %{name}-libs = %{version}-%{release}
|
||||
|
||||
|
|
@ -64,6 +73,12 @@ the libvirt sandbox
|
|||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
%patch4 -p1
|
||||
%patch5 -p1
|
||||
%patch6 -p1
|
||||
|
||||
%build
|
||||
|
||||
|
|
@ -80,13 +95,26 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libvirt-sandbox-1.0.la
|
|||
|
||||
%find_lang %{name}
|
||||
|
||||
%ldconfig_scriptlets libs
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%post libs -p /sbin/ldconfig
|
||||
%postun libs -p /sbin/ldconfig
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
%{_datadir}/bash-completion/completions/virt-sandbox-service
|
||||
%config(noreplace) %{_sysconfdir}/cron.daily/virt-sandbox-service.logrotate
|
||||
%dir %{_sysconfdir}/libvirt-sandbox/services
|
||||
%{_bindir}/virt-sandbox
|
||||
%{_bindir}/virt-sandbox-service
|
||||
%{_libexecdir}/virt-sandbox-service-util
|
||||
%{_mandir}/man1/virt-sandbox.1*
|
||||
%{_mandir}/man1/virt-sandbox-service.1*
|
||||
%{_mandir}/man1/virt-sandbox-service-*.1*
|
||||
|
||||
%files libs -f %{name}.lang
|
||||
%defattr(-,root,root,-)
|
||||
%doc README COPYING AUTHORS ChangeLog NEWS
|
||||
%dir %{_sysconfdir}/libvirt-sandbox
|
||||
%dir %{_sysconfdir}/libvirt-sandbox/scratch
|
||||
|
|
@ -98,6 +126,7 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libvirt-sandbox-1.0.la
|
|||
%{_libdir}/girepository-1.0/LibvirtSandbox-1.0.typelib
|
||||
|
||||
%files devel
|
||||
%defattr(-,root,root,-)
|
||||
%doc examples/virt-sandbox.pl
|
||||
%doc examples/virt-sandbox.py
|
||||
%doc examples/virt-sandbox.js
|
||||
|
|
@ -112,117 +141,10 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libvirt-sandbox-1.0.la
|
|||
%{_datadir}/gtk-doc/html/Libvirt-sandbox
|
||||
|
||||
%changelog
|
||||
* Thu Jul 16 2026 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.0-21
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild
|
||||
|
||||
* Fri Jan 16 2026 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.0-20
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild
|
||||
|
||||
* Thu Jul 24 2025 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.0-19
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
|
||||
|
||||
* Fri Jan 17 2025 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.0-18
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
|
||||
|
||||
* Mon Sep 02 2024 Miroslav Suchý <msuchy@redhat.com> - 0.8.0-17
|
||||
- convert license to SPDX
|
||||
|
||||
* Thu Jul 18 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.0-16
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
|
||||
|
||||
* Sat Mar 30 2024 Jonathan Wright <jonathan@almalinux.org> - 0.8.0-15
|
||||
- Rebuild to ensure backdoored XZ libs arn't present
|
||||
|
||||
* Thu Jan 25 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.0-14
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||
|
||||
* Sun Jan 21 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.0-13
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||
|
||||
* Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.0-12
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
||||
|
||||
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.0-11
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
||||
|
||||
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.0-10
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
||||
|
||||
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.0-9
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
||||
|
||||
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.0-8
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
||||
|
||||
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.0-7
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||
|
||||
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.0-6
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||
|
||||
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.0-5
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||
|
||||
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.0-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||
|
||||
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.0-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||
|
||||
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.0-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
||||
|
||||
* Fri Jun 8 2018 Daniel P. Berrangé <berrange@redhat.com> - 0.8.0-1
|
||||
- Update to 0.8.0 release
|
||||
|
||||
* Mon Mar 26 2018 Iryna Shcherbina <ishcherb@redhat.com> - 0.6.0-7
|
||||
- Update Python 2 dependency declarations to new packaging standards
|
||||
(See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
|
||||
|
||||
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.0-6
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
||||
|
||||
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.0-5
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
|
||||
|
||||
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.0-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
||||
|
||||
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.0-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
||||
|
||||
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.0-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
||||
|
||||
* Wed Jul 1 2015 Daniel P. Berrange <berrange@redhat.com> - 0.6.0-1
|
||||
- Update to 0.6.0 release
|
||||
|
||||
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.1-5
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
|
||||
|
||||
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.1-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
|
||||
|
||||
* Tue Jul 22 2014 Kalev Lember <kalevlember@gmail.com> - 0.5.1-3
|
||||
- Rebuilt for gobject-introspection 1.41.4
|
||||
|
||||
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.1-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
|
||||
|
||||
* Mon Nov 18 2013 Daniel P. Berrange <berrange@redhat.com> - 0.5.1-1
|
||||
- Update to 0.5.1 release
|
||||
|
||||
* Thu Oct 3 2013 Daniel P. Berrange <berrange@redhat.com> - 0.5.0-3
|
||||
- Add fully versioned dep between libvirt-sandbox & libvirt-sandbox-libs
|
||||
|
||||
* Tue Oct 1 2013 Daniel P. Berrange <berrange@redhat.com> - 0.5.0-2
|
||||
- Fix boot with Linux 3.11 kernel
|
||||
|
||||
* Thu Aug 1 2013 Daniel P. Berrange <berrange@redhat.com> - 0.5.0-1
|
||||
- Update to 0.5.0 release
|
||||
|
||||
* Tue Jul 9 2013 Daniel P. Berrange <berrange@redhat.com> - 0.2.1-1
|
||||
- Update to 0.2.1 release
|
||||
* Tue May 7 2013 Daniel P. Berrange <berrange@redhat.com> - 0.2.0-2
|
||||
- Fix booting QEMU sandboxes with Linux 3.11 kernel
|
||||
- Remove bogus -S arg from man page (rhbz #997024)
|
||||
- Allow mac addr to be specified (rhbz #977537)
|
||||
|
||||
* Tue May 7 2013 Daniel P. Berrange <berrange@redhat.com> - 0.2.0-1
|
||||
- Update to 0.2.0 release
|
||||
|
|
|
|||
2
sources
2
sources
|
|
@ -1 +1 @@
|
|||
SHA512 (libvirt-sandbox-0.8.0.tar.gz) = 633368b6b41c520ae678b850e4c6c96cc3220adcfda9a9a36ad67d50f10b1d18e40a2d92e76a8d99a63e7e24a1f9cf3153eca0acf4745bd48c381289974476d2
|
||||
538b3eb2bef4f82eecd8a42a0581ea6c libvirt-sandbox-0.2.0.tar.gz
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue