[Pkg-libvirt-commits] [libvirt-sandbox] 37/42: Drop all patches
Guido Guenther
agx at moszumanska.debian.org
Sat May 27 16:27:10 UTC 2017
This is an automated email from the git hooks/post-receive script.
agx pushed a commit to branch debian/experimental
in repository libvirt-sandbox.
commit 633cbba15308a7c253422ba849f1e3d52a3f508e
Author: Guido Günther <agx at sigxcpu.org>
Date: Sat May 27 12:27:18 2017 +0200
Drop all patches
applied upstream
---
.../Allow-to-switch-to-a-specific-user-id.patch | 86 ----------------------
debian/patches/Silence-PyGIWarnings.patch | 29 --------
...Always-stop-in-case-of-failure-to-list-di.patch | 80 --------------------
debian/patches/series | 5 --
.../tests-add-file-extension-for-host-mounts.patch | 24 ------
...ocument-how-to-pass-arguments-to-commands.patch | 25 -------
6 files changed, 249 deletions(-)
diff --git a/debian/patches/Allow-to-switch-to-a-specific-user-id.patch b/debian/patches/Allow-to-switch-to-a-specific-user-id.patch
deleted file mode 100644
index a6d79db..0000000
--- a/debian/patches/Allow-to-switch-to-a-specific-user-id.patch
+++ /dev/null
@@ -1,86 +0,0 @@
-From: =?utf-8?q?Guido_G=C3=BCnther?= <agx at sigxcpu.org>
-Date: Tue, 22 Mar 2016 19:44:57 +0100
-Subject: Allow to switch to a specific user id
-
-Useful if you want to run programs as the same user than outside the
-sandbox.
----
- bin/virt-sandbox.c | 26 ++++++++++++++++++++++++++
- 1 file changed, 26 insertions(+)
-
-diff --git a/bin/virt-sandbox.c b/bin/virt-sandbox.c
-index 4c400d5..9495e85 100644
---- a/bin/virt-sandbox.c
-+++ b/bin/virt-sandbox.c
-@@ -24,6 +24,8 @@
-
- #include <libvirt-sandbox/libvirt-sandbox.h>
- #include <glib/gi18n.h>
-+#include <sys/types.h>
-+#include <pwd.h>
-
- static gboolean do_close(GVirSandboxConsole *con G_GNUC_UNUSED,
- gboolean error G_GNUC_UNUSED,
-@@ -92,6 +94,7 @@ int main(int argc, char **argv) {
- gchar *kernver = NULL;
- gchar *kernpath = NULL;
- gchar *kmodpath = NULL;
-+ gchar *switchto = NULL;
- gboolean verbose = FALSE;
- gboolean debug = FALSE;
- gboolean shell = FALSE;
-@@ -126,6 +129,8 @@ int main(int argc, char **argv) {
- N_("security properties"), "PATH", },
- { "privileged", 'p', 0, G_OPTION_ARG_NONE, &privileged,
- N_("run the command privileged"), NULL },
-+ { "switchto", 'S', 0, G_OPTION_ARG_STRING, &switchto,
-+ N_("swith to the given user"), "USER" },
- { "shell", 'l', 0, G_OPTION_ARG_NONE, &shell,
- N_("start a shell"), NULL, },
- { "kernver", 0, 0, G_OPTION_ARG_STRING, &kernver,
-@@ -139,6 +144,7 @@ int main(int argc, char **argv) {
- { NULL, 0, 0, G_OPTION_ARG_NONE, NULL, NULL, NULL }
- };
- const char *help_msg = N_("Run 'virt-sandbox --help' to see a full list of available command line options");
-+ struct passwd *pw;
-
- setlocale(LC_ALL, "");
- bindtextdomain(PACKAGE, LOCALEDIR);
-@@ -198,10 +204,25 @@ int main(int argc, char **argv) {
- if (kmodpath)
- gvir_sandbox_config_set_kmodpath(cfg, kmodpath);
-
-+ if (privileged && switchto) {
-+ g_printerr(_("'switchto' and 'privileged' are incompatible options\n"));
-+ goto cleanup;
-+ }
-+
- if (privileged) {
- gvir_sandbox_config_set_userid(cfg, 0);
- gvir_sandbox_config_set_groupid(cfg, 0);
- gvir_sandbox_config_set_username(cfg, "root");
-+ } else if (switchto) {
-+ pw = getpwnam(switchto);
-+ if (!pw) {
-+ g_printerr(_("Failed to resolve user %s\n"), switchto);
-+ goto cleanup;
-+ }
-+ gvir_sandbox_config_set_userid(cfg, pw->pw_uid);
-+ gvir_sandbox_config_set_groupid(cfg, pw->pw_gid);
-+ gvir_sandbox_config_set_username(cfg, pw->pw_name);
-+ gvir_sandbox_config_set_homedir(cfg, pw->pw_dir);
- }
-
- if (envs &&
-@@ -541,6 +562,11 @@ to this path to locate the modules.
- Retain root privileges inside the sandbox, rather than dropping privileges
- to match the current user identity.
-
-+=item B<-S USER>, B<--switchto=USER>
-+
-+Swith to the given user inside the sandbox and setup $HOME
-+accordingly.
-+
- =item B<-l>, B<--shell>
-
- Launch an interactive shell on a secondary console device
diff --git a/debian/patches/Silence-PyGIWarnings.patch b/debian/patches/Silence-PyGIWarnings.patch
deleted file mode 100644
index ca63815..0000000
--- a/debian/patches/Silence-PyGIWarnings.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From: =?utf-8?q?Guido_G=C3=BCnther?= <agx at sigxcpu.org>
-Date: Fri, 18 Mar 2016 18:10:42 +0100
-Subject: Silence PyGIWarnings
-
-This fixes
-
-/usr/bin/virt-sandbox-service:22: PyGIWarning: LibvirtGObject was imported without specifying a version first. Use gi.require_version('LibvirtGObject', '1.0') before import to ensure that the right version gets loaded.
- from gi.repository import LibvirtGObject
-/usr/bin/virt-sandbox-service:23: PyGIWarning: LibvirtSandbox was imported without specifying a version first. Use gi.require_version('LibvirtSandbox', '1.0') before import to ensure that the right version gets loaded.
- from gi.repository import LibvirtSandbox
----
- bin/virt-sandbox-service | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/bin/virt-sandbox-service b/bin/virt-sandbox-service
-index a4a2154..45f4517 100755
---- a/bin/virt-sandbox-service
-+++ b/bin/virt-sandbox-service
-@@ -19,7 +19,10 @@
- # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- #
-
-+import gi
-+gi.require_version('LibvirtGObject', '1.0')
- from gi.repository import LibvirtGObject
-+gi.require_version('LibvirtSandbox', '1.0')
- from gi.repository import LibvirtSandbox
- from gi.repository import GLib
- import gi
diff --git a/debian/patches/sandbox-builder-Always-stop-in-case-of-failure-to-list-di.patch b/debian/patches/sandbox-builder-Always-stop-in-case-of-failure-to-list-di.patch
deleted file mode 100644
index 6b82fed..0000000
--- a/debian/patches/sandbox-builder-Always-stop-in-case-of-failure-to-list-di.patch
+++ /dev/null
@@ -1,80 +0,0 @@
-From: =?utf-8?q?Guido_G=C3=BCnther?= <agx at sigxcpu.org>
-Date: Fri, 18 Mar 2016 18:57:22 +0100
-Subject: sandbox-builder: Always stop in case of failure to list directory
-
-Passing the NULL enumerator to g_file_enumerator_next_file makes
-us overwrite error information otherwise:
-
- $ sudo bin/virt-sandbox-service create --unitfile foo.service foo
- (process:18529): GLib-GIO-CRITICAL **: g_file_enumerator_next_file: assertion 'G_IS_FILE_ENUMERATOR (enumerator)' failed
-
- (process:18529): GLib-GIO-CRITICAL **: g_file_enumerator_close: assertion 'G_IS_FILE_ENUMERATOR (enumerator)' failed
- bin/virt-sandbox-service:318: Warning: GError set over the top of a previous GError or uninitialized memory.
- This indicates a bug in someone's code. You must ensure an error is NULL before it's set.
- The overwriting error message was: Error removing file: No such file or directory context.undefine()
- bin/virt-sandbox-service:318: Warning: g_object_unref: assertion 'G_IS_OBJECT (object)' failed context.undefine()
- Cleanup failed: g-io-error-quark: No such file or directory (1)
- bin/virt-sandbox-service: g-io-error-quark: No such file or directory (1)
-
-also make sure we don't unref NULL in this case.
----
- libvirt-sandbox/libvirt-sandbox-builder.c | 37 +++++++++++++++++--------------
- 1 file changed, 20 insertions(+), 17 deletions(-)
-
-diff --git a/libvirt-sandbox/libvirt-sandbox-builder.c b/libvirt-sandbox/libvirt-sandbox-builder.c
-index 1745c88..0c43b62 100644
---- a/libvirt-sandbox/libvirt-sandbox-builder.c
-+++ b/libvirt-sandbox/libvirt-sandbox-builder.c
-@@ -727,32 +727,35 @@ gboolean gvir_sandbox_builder_clean_post_stop(GVirSandboxBuilder *builder,
- errno != ENOENT)
- ret = FALSE;
-
-- if (!(enumerator = g_file_enumerate_children(libsFile, "*", G_FILE_QUERY_INFO_NONE,
-- NULL, error)) &&
-- (*error)->code != G_IO_ERROR_NOT_FOUND) {
-- ret = FALSE;
-- goto cleanup;
-- }
-+ if ((enumerator = g_file_enumerate_children(libsFile, "*", G_FILE_QUERY_INFO_NONE,
-+ NULL, error))) {
-+ while ((info = g_file_enumerator_next_file(enumerator, NULL, error))) {
-+ child = g_file_enumerator_get_child(enumerator, info);
-+ if (!g_file_delete(child, NULL, error))
-+ ret = FALSE;
-+ g_object_unref(child);
-+ child = NULL;
-+ g_object_unref(info);
-+ info = NULL;
-+ }
-
-- while ((info = g_file_enumerator_next_file(enumerator, NULL, error))) {
-- child = g_file_enumerator_get_child(enumerator, info);
-- if (!g_file_delete(child, NULL, error))
-+ if (!g_file_enumerator_close(enumerator, NULL, error))
-+ ret = FALSE;
-+ } else {
-+ if ((*error)->code != G_IO_ERROR_NOT_FOUND) {
- ret = FALSE;
-- g_object_unref(child);
-- child = NULL;
-- g_object_unref(info);
-- info = NULL;
-+ goto cleanup;
-+ }
-+ g_clear_error(error);
- }
-
-- if (!g_file_enumerator_close(enumerator, NULL, error))
-- ret = FALSE;
--
- if (!g_file_delete(libsFile, NULL, error) &&
- (*error)->code != G_IO_ERROR_NOT_FOUND)
- ret = FALSE;
-
- cleanup:
-- g_object_unref(enumerator);
-+ if (enumerator)
-+ g_object_unref(enumerator);
- g_object_unref(libsFile);
- g_free(libsdir);
- g_free(dskfile);
diff --git a/debian/patches/series b/debian/patches/series
deleted file mode 100644
index df54a4a..0000000
--- a/debian/patches/series
+++ /dev/null
@@ -1,5 +0,0 @@
-Silence-PyGIWarnings.patch
-tests-add-file-extension-for-host-mounts.patch
-sandbox-builder-Always-stop-in-case-of-failure-to-list-di.patch
-Allow-to-switch-to-a-specific-user-id.patch
-virt-sandbox-document-how-to-pass-arguments-to-commands.patch
diff --git a/debian/patches/tests-add-file-extension-for-host-mounts.patch b/debian/patches/tests-add-file-extension-for-host-mounts.patch
deleted file mode 100644
index 1070bdd..0000000
--- a/debian/patches/tests-add-file-extension-for-host-mounts.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-From: =?utf-8?q?Guido_G=C3=BCnther?= <agx at sigxcpu.org>
-Date: Sat, 19 Mar 2016 11:18:22 +0100
-Subject: tests: add file extension for host mounts
-
-otherwise we fail in gvir_sandbox_util_guess_image_format with
-
- "Cannot identify file extension in '/tmp/home'
----
- libvirt-sandbox/tests/test-config.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/libvirt-sandbox/tests/test-config.c b/libvirt-sandbox/tests/test-config.c
-index ac10bab..71a65c8 100644
---- a/libvirt-sandbox/tests/test-config.c
-+++ b/libvirt-sandbox/tests/test-config.c
-@@ -53,7 +53,7 @@ int main(int argc, char **argv)
- int ret = EXIT_FAILURE;
- const gchar *mounts[] = {
- "host-bind:/var/run/hell=/tmp/home",
-- "host-image:/etc=/tmp/home",
-+ "host-image:/etc=/tmp/home/img.qcow2",
- "host-image:/etc=/tmp/home,format=qcow2",
- "host-bind:/tmp=",
- NULL
diff --git a/debian/patches/virt-sandbox-document-how-to-pass-arguments-to-commands.patch b/debian/patches/virt-sandbox-document-how-to-pass-arguments-to-commands.patch
deleted file mode 100644
index ba49cd2..0000000
--- a/debian/patches/virt-sandbox-document-how-to-pass-arguments-to-commands.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From: =?utf-8?q?Guido_G=C3=BCnther?= <agx at sigxcpu.org>
-Date: Fri, 15 Apr 2016 10:44:11 +0200
-Subject: virt-sandbox: document how to pass arguments to commands
-
-The example was already correct but the synopsis didn't mention '--' is
-required.
----
- bin/virt-sandbox.c | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/bin/virt-sandbox.c b/bin/virt-sandbox.c
-index 9495e85..d6a441c 100644
---- a/bin/virt-sandbox.c
-+++ b/bin/virt-sandbox.c
-@@ -345,7 +345,9 @@ virt-sandbox - Run cmd under a virtual machine sandbox
-
- =head1 SYNOPSIS
-
--virt-sandbox [OPTIONS...] COMMAND [CMDARG1 [CMDARG2 [...]]]
-+virt-sandbox [OPTIONS...] COMMAND
-+
-+virt-sandbox [OPTIONS...] -- COMMAND [CMDARG1 [CMDARG2 [...]]]
-
- =head1 DESCRIPTION
-
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libvirt-sandbox.git
More information about the Pkg-libvirt-commits
mailing list