Ian Campbell
2013-Aug-16 13:56 UTC
[Pkg-xen-devel] Bug#706233: move core dumps to /var/lib/xen/dump
tags 706233 +patch
thanks
This is somewhat more FHS compliant IMHO.
commit 7d171826bc97bf5f3f2019fc32c1ca85b49de7c9
Author: Ian Campbell <ijc at hellion.org.uk>
Date: Fri Aug 16 14:54:42 2013 +0100
* debian/patches/tools-core-dump-dir.patch: Switch tools to dumping to
/var/log/xen/dump by default.
* debian/xen-utils-common.dirs: Ensure /var/lib/xen/dump is created
* debian/changelog: Update
* debian/patches/series: Add new patch
diff --git a/xen/debian/changelog b/xen/debian/changelog
index 6100e75..ace8ad4 100644
--- a/xen/debian/changelog
+++ b/xen/debian/changelog
@@ -1,5 +1,6 @@
xen (4.3.0-1) UNRELEASED; urgency=low
+ [ Bastian Blank ]
* New upstream release.
* Call configure with proper arguments.
* Remove now empty xen-docs package.
@@ -16,6 +17,9 @@ xen (4.3.0-1) UNRELEASED; urgency=low
- Fix fallout from harderning flags.
* Update Standards-Version to 3.9.4. No changes.
+ [ Ian Campbell ]
+ * Put core dumps in /var/lib/xen/dump and ensure it exists (Closes: #444000)
+
-- Bastian Blank <waldi at debian.org> Tue, 23 Jul 2013 12:45:27 +0200
xen (4.2.2-1) unstable; urgency=low
diff --git a/xen/debian/patches/series b/xen/debian/patches/series
index 6af353f..858315b 100644
--- a/xen/debian/patches/series
+++ b/xen/debian/patches/series
@@ -54,3 +54,4 @@ tools-python-shebang.diff
tools-ocaml-fix-build.diff
tools-xenstore-compatibility.diff
+tools-core-dump-dir.patch
diff --git a/xen/debian/patches/tools-core-dump-dir.patch
b/xen/debian/patches/tools-core-dump-dir.patch
new file mode 100644
index 0000000..4cd0ea2
--- /dev/null
+++ b/xen/debian/patches/tools-core-dump-dir.patch
@@ -0,0 +1,67 @@
+Index: xen/docs/man/xl.cfg.pod.5
+==================================================================+---
xen.orig/docs/man/xl.cfg.pod.5 2013-07-09 11:46:56.000000000 +0100
++++ xen/docs/man/xl.cfg.pod.5 2013-08-16 14:47:07.896315178 +0100
+@@ -242,12 +242,12 @@
+
+ =item B<coredump-destroy>
+
+-write a "coredump" of the domain to F</var/xen/dump/NAME> and
then
++write a "coredump" of the domain to F</var/lib/xen/dump/NAME>
and then
+ destroy the domain.
+
+ =item B<coredump-restart>
+
+-write a "coredump" of the domain to F</var/xen/dump/NAME> and
then
++write a "coredump" of the domain to F</var/lib/xen/dump/NAME>
and then
+ restart the domain.
+
+ =back
+Index: xen/tools/Makefile
+==================================================================+---
xen.orig/tools/Makefile 2013-08-16 14:45:07.841109329 +0100
++++ xen/tools/Makefile 2013-08-16 14:47:42.360087203 +0100
+@@ -58,7 +58,7 @@
+
+ .PHONY: install
+ install: subdirs-install
+- $(INSTALL_DIR) $(DESTDIR)/var/xen/dump
++ $(INSTALL_DIR) $(DESTDIR)/var/lib/xen/dump/
+ $(INSTALL_DIR) $(DESTDIR)/var/log/xen
+ $(INSTALL_DIR) $(DESTDIR)/var/lib/xen
+ $(INSTALL_DIR) $(DESTDIR)/var/lock/subsys
+Index: xen/tools/libxl/xl_cmdimpl.c
+==================================================================+---
xen.orig/tools/libxl/xl_cmdimpl.c 2013-07-09 11:46:56.000000000 +0100
++++ xen/tools/libxl/xl_cmdimpl.c 2013-08-16 14:47:31.040162084 +0100
+@@ -1591,7 +1591,7 @@
+ char *corefile;
+ int rc;
+
+- if (asprintf(&corefile, "/var/xen/dump/%s",
d_config->c_info.name) < 0) {
++ if (asprintf(&corefile, "/var/lib/xen/dump/%s",
d_config->c_info.name) < 0) {
+ LOG("failed to construct core dump path");
+ } else {
+ LOG("dumping core to %s", corefile);
+Index: xen/tools/python/xen/xend/XendDomainInfo.py
+==================================================================+---
xen.orig/tools/python/xen/xend/XendDomainInfo.py 2013-08-16 14:45:07.725110096
+0100
++++ xen/tools/python/xen/xend/XendDomainInfo.py 2013-08-16 14:48:11.119896959
+0100
+@@ -2283,7 +2283,7 @@
+ # To prohibit directory traversal
+ based_name = os.path.basename(self.info['name_label'])
+
+- coredir = "/var/xen/dump/%s" % (based_name)
++ coredir = "/var/lib/xen/dump/%s" % (based_name)
+ if not os.path.exists(coredir):
+ try:
+ mkdir.parents(coredir, stat.S_IRWXU)
+@@ -2292,7 +2292,7 @@
+
+ if not os.path.isdir(coredir):
+ # Use former directory to dump core
+- coredir = '/var/xen/dump'
++ coredir = '/var/lib/xen/dump/'
+
+ this_time = time.strftime("%Y-%m%d-%H%M.%S",
time.localtime())
+ corefile = "%s/%s-%s.%s.core" % (coredir, this_time,
diff --git a/xen/debian/xen-utils-common.dirs b/xen/debian/xen-utils-common.dirs
index c745c08..a598c47 100644
--- a/xen/debian/xen-utils-common.dirs
+++ b/xen/debian/xen-utils-common.dirs
@@ -1 +1,2 @@
var/lib/xen
+var/lib/xen/dump
Debian Bug Tracking System
2013-Aug-16 13:57 UTC
[Pkg-xen-devel] Processed: move core dumps to /var/lib/xen/dump
Processing commands for control at bugs.debian.org:> tags 706233 +patchBug #706233 [xen-utils-common] Incorrect information about xm dump-core and pausing or not pausing in xm man page Added tag(s) patch.> thanksStopping processing here. Please contact me if you need assistance. -- 706233: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=706233 Debian Bug Tracking System Contact owner at bugs.debian.org with problems
Ian Campbell
2014-Aug-31 00:31 UTC
[Pkg-xen-devel] Bug#706233: move core dumps to /var/lib/xen/dump
Control: tag -1 -patch On Fri, 16 Aug 2013 14:56:49 +0100 Ian Campbell <ijc at hellion.org.uk> wrote:> tags 706233 +patch > thanks > > This is somewhat more FHS compliant IMHO.I sent this to entirely the wrong bug report, should have been to #444000! Oops. Ian.
Seemingly Similar Threads
- Bug#444000: [ijc@hellion.org.uk: move core dumps to /var/lib/xen/dump]
- [PATCH, v2]: xl: move domain struct init functions to libxl
- [PATCH V2] libxl/xl: implement support for guest iooprt and irq permissions
- virsh dominfo does not show correct cpuTime
- Re: virsh dominfo does not show correct cpuTime