xen: Install unstripped version -syms version into /usr/lib/debug
PATCH 1/1 xen: Install unstripped version -syms version into /usr/lib/debug
xen-*-syms cannot actually be booted, so putting it in /boot is a bit misleading. It also happens to cause a warning from update-grub (so at least it doesn't end up in grub.cfg)
/usr/lib/debug seems to be a pretty common path for installing such debug info.
--- INSTALL | 4 +++- config/StdGNU.mk | 1 + config/SunOS.mk | 1 + xen/Makefile | 5 +++-- 4 files changed, 8 insertions(+), 3 deletions(-)
INSTALL +3 -1
@@ -196,8 +196,10 @@ OCAMLFIND_DESTDIR= and OCAMLFIND_METADIR= will have the same effect. OCAMLDESTDIR= The xen subsystem will install the hypervisor into fixed locations. -BOOT_DIR defaults to /boot, EFI_DIR to /usr/lib64/efi. +BOOT_DIR defaults to /boot, DERBUG_DIR defaults to /usr/lib/debugt and +EFI_DIR to /usr/lib64/efi. BOOT_DIR= +DEBUG_DIR= EFI_DIR= The make target 'rpmball' will build a xen.rpm. This variable can be
config/StdGNU.mk +1 -0
@@ -27,6 +27,7 @@ INSTALL_DATA = $(INSTALL) -m0644 -p INSTALL_PROG = $(INSTALL) -m0755 -p BOOT_DIR ?= /boot +DEBUG_DIR ?= /usr/lib/debug SOCKET_LIBS = UTIL_LIBS = -lutil
config/SunOS.mk +1 -0
@@ -19,6 +19,7 @@ INSTALL_DATA = $(INSTALL) -m0644 -p INSTALL_PROG = $(INSTALL) -m0755 -p BOOT_DIR ?= /boot +DEBUG_DIR ?= /usr/lib/debug SunOS_LIBDIR = /usr/sfw/lib SunOS_LIBDIR_x86_64 = /usr/sfw/lib/amd64
xen/Makefile +3 -2
@@ -44,7 +44,8 @@ _install: $(TARGET)$(CONFIG_XEN_INSTALL_SUFFIX) ln -f -s $(T)-$(XEN_FULLVERSION)$(Z) $(D)$(BOOT_DIR)/$(T)-$(XEN_VERSION).$(XEN_SUBVERSION)$(Z) ln -f -s $(T)-$(XEN_FULLVERSION)$(Z) $(D)$(BOOT_DIR)/$(T)-$(XEN_VERSION)$(Z) ln -f -s $(T)-$(XEN_FULLVERSION)$(Z) $(D)$(BOOT_DIR)/$(T)$(Z) - $(INSTALL_DATA) $(TARGET)-syms $(D)$(BOOT_DIR)/$(T)-syms-$(XEN_FULLVERSION) + [ -d "$(D)$(DEBUG_DIR)" ] || $(INSTALL_DIR) $(D)$(DEBUG_DIR) + $(INSTALL_DATA) $(TARGET)-syms $(D)$(DEBUG_DIR)/$(T)-syms-$(XEN_FULLVERSION) if [ -r $(TARGET).efi -a -n '$(EFI_DIR)' ]; then \ [ -d $(D)$(EFI_DIR) ] || $(INSTALL_DIR) $(D)$(EFI_DIR); \ $(INSTALL_DATA) $(TARGET).efi $(D)$(EFI_DIR)/$(T)-$(XEN_FULLVERSION).efi; \
@@ -67,7 +68,7 @@ _uninstall: rm -f $(D)$(BOOT_DIR)/$(T)-$(XEN_VERSION).$(XEN_SUBVERSION)$(Z) rm -f $(D)$(BOOT_DIR)/$(T)-$(XEN_VERSION)$(Z) rm -f $(D)$(BOOT_DIR)/$(T)$(Z) - rm -f $(D)$(BOOT_DIR)/$(T)-syms-$(XEN_FULLVERSION) + rm -f $(D)$(DEBUG_DIR)/$(T)-syms-$(XEN_FULLVERSION) rm -f $(D)$(EFI_DIR)/$(T)-$(XEN_FULLVERSION).efi rm -f $(D)$(EFI_DIR)/$(T)-$(XEN_VERSION).$(XEN_SUBVERSION).efi rm -f $(D)$(EFI_DIR)/$(T)-$(XEN_VERSION).efi
Signature · 1 line
1.7.10.4
Quoted 20 lines · Ian Campbell
xen-*-syms cannot actually be booted, so putting it in /boot is a bit misleading. It also happens to cause a warning from update-grub (so at least it doesn't end up in grub.cfg)
/usr/lib/debugseems to be a pretty common path for installing such debug info.Signed-off-by Ian Campbell <[email protected]>--- INSTALL | 4 +++- config/StdGNU.mk | 1 + config/SunOS.mk | 1 + xen/Makefile | 5 +++-- 4 files changed, 8 insertions(+), 3 deletions(-)INSTALL +0
-0
INSTALL OCAMLFIND_DESTDIR= and OCAMLFIND_METADIR= will have the same effect. · line 199
Quoted 5 lines
INSTALL +1
-1@@ -196,8 +196,10 @@ OCAMLFIND_DESTDIR= and OCAMLFIND_METADIR= will have the same effect. OCAMLDESTDIR= The xen subsystem will install the hypervisor into fixed locations. -BOOT_DIR defaults to /boot, EFI_DIR to /usr/lib64/efi. +BOOT_DIR defaults to /boot, DERBUG_DIR defaults to /usr/lib/debugt and
DERBUG and /debugt
Quoted 11 lines
INSTALL +2
-0+EFI_DIR to /usr/lib64/efi. BOOT_DIR= +DEBUG_DIR= EFI_DIR= The make target 'rpmball' will build a xen.rpm. This variable can beconfig/StdGNU.mk +0
-0
config/StdGNU.mk INSTALL_DATA = $(INSTALL) -m0644 -p · line 30
Quoted 4 lines
config/StdGNU.mk +1
-0@@ -27,6 +27,7 @@ INSTALL_DATA = $(INSTALL) -m0644 -p INSTALL_PROG = $(INSTALL) -m0755 -p BOOT_DIR ?= /boot +DEBUG_DIR ?= /usr/lib/debug
While I hate to day it, this probably needs /local/ handling for non-system builds, and this sounds autoconf'y. How stable is the path across different systems?
~Andrew
Quoted 38 lines
config/StdGNU.mk +0
-0SOCKET_LIBS = UTIL_LIBS = -lutilconfig/SunOS.mk +1
-0@@ -19,6 +19,7 @@ INSTALL_DATA = $(INSTALL) -m0644 -p INSTALL_PROG = $(INSTALL) -m0755 -p BOOT_DIR ?= /boot +DEBUG_DIR ?= /usr/lib/debug SunOS_LIBDIR = /usr/sfw/lib SunOS_LIBDIR_x86_64 = /usr/sfw/lib/amd64xen/Makefile +3
-2@@ -44,7 +44,8 @@ _install: $(TARGET)$(CONFIG_XEN_INSTALL_SUFFIX) ln -f -s $(T)-$(XEN_FULLVERSION)$(Z) $(D)$(BOOT_DIR)/$(T)-$(XEN_VERSION).$(XEN_SUBVERSION)$(Z) ln -f -s $(T)-$(XEN_FULLVERSION)$(Z) $(D)$(BOOT_DIR)/$(T)-$(XEN_VERSION)$(Z) ln -f -s $(T)-$(XEN_FULLVERSION)$(Z) $(D)$(BOOT_DIR)/$(T)$(Z) - $(INSTALL_DATA) $(TARGET)-syms $(D)$(BOOT_DIR)/$(T)-syms-$(XEN_FULLVERSION) + [ -d "$(D)$(DEBUG_DIR)" ] || $(INSTALL_DIR) $(D)$(DEBUG_DIR) + $(INSTALL_DATA) $(TARGET)-syms $(D)$(DEBUG_DIR)/$(T)-syms-$(XEN_FULLVERSION) if [ -r $(TARGET).efi -a -n '$(EFI_DIR)' ]; then \ [ -d $(D)$(EFI_DIR) ] || $(INSTALL_DIR) $(D)$(EFI_DIR); \ $(INSTALL_DATA) $(TARGET).efi $(D)$(EFI_DIR)/$(T)-$(XEN_FULLVERSION).efi; \@@ -67,7 +68,7 @@ _uninstall: rm -f $(D)$(BOOT_DIR)/$(T)-$(XEN_VERSION).$(XEN_SUBVERSION)$(Z) rm -f $(D)$(BOOT_DIR)/$(T)-$(XEN_VERSION)$(Z) rm -f $(D)$(BOOT_DIR)/$(T)$(Z) - rm -f $(D)$(BOOT_DIR)/$(T)-syms-$(XEN_FULLVERSION) + rm -f $(D)$(DEBUG_DIR)/$(T)-syms-$(XEN_FULLVERSION) rm -f $(D)$(EFI_DIR)/$(T)-$(XEN_FULLVERSION).efi rm -f $(D)$(EFI_DIR)/$(T)-$(XEN_VERSION).$(XEN_SUBVERSION).efi rm -f $(D)$(EFI_DIR)/$(T)-$(XEN_VERSION).efi
Quoted 3 lines · Andrew Cooper
Quoted 1 line
+BOOT_DIR defaults to /boot,
DERBUG_DIRdefaults to/usr/lib/debugtandDERBUG and /debugt
Gah!
Quoted 13 lines
Quoted 13 lines
INSTALL +2
-0+EFI_DIR to /usr/lib64/efi. BOOT_DIR= +DEBUG_DIR= EFI_DIR= The make target 'rpmball' will build a xen.rpm. This variable can beconfig/StdGNU.mk +0
-0@@ -27,6 +27,7 @@ INSTALL_DATA = $(INSTALL) -m0644 -p INSTALL_PROG = $(INSTALL) -m0755 -p
Quoted 6 lines
config/StdGNU.mk INSTALL_DATA = $(INSTALL) -m0644 -p · line 30
Quoted 2 lines
config/StdGNU.mk +1
-0BOOT_DIR ?= /boot +DEBUG_DIR ?= /usr/lib/debugWhile I hate to day it, this probably needs /local/ handling for non-system builds, and this sounds autoconf'y. How stable is the path across different systems?
This is used in xen/Makefile so autoconf is off the cards. So far we already have BOOT_DIR and EFI_DIR which are special in this way. IMHO adding DEBUG_DIR is fine. I don't think we will need this for tools/* since what should happen there is we install the unstripped things (if asked to do so) as usual and then the rpm/deb packaging tools will take care of creating the detached debug info if they care. Normal users will just get the stripped or unstripped versions install depending on what they asked for.
I looked on Debian and at some Fedora wiki page and they both appear to use /usr/lib/debug.
Ian.
Quoted 42 lines
~Andrew
Quoted 38 lines
config/StdGNU.mk +0
-0SOCKET_LIBS = UTIL_LIBS = -lutilconfig/SunOS.mk +1
-0@@ -19,6 +19,7 @@ INSTALL_DATA = $(INSTALL) -m0644 -p INSTALL_PROG = $(INSTALL) -m0755 -p BOOT_DIR ?= /boot +DEBUG_DIR ?= /usr/lib/debug SunOS_LIBDIR = /usr/sfw/lib SunOS_LIBDIR_x86_64 = /usr/sfw/lib/amd64xen/Makefile +3
-2@@ -44,7 +44,8 @@ _install: $(TARGET)$(CONFIG_XEN_INSTALL_SUFFIX) ln -f -s $(T)-$(XEN_FULLVERSION)$(Z) $(D)$(BOOT_DIR)/$(T)-$(XEN_VERSION).$(XEN_SUBVERSION)$(Z) ln -f -s $(T)-$(XEN_FULLVERSION)$(Z) $(D)$(BOOT_DIR)/$(T)-$(XEN_VERSION)$(Z) ln -f -s $(T)-$(XEN_FULLVERSION)$(Z) $(D)$(BOOT_DIR)/$(T)$(Z) - $(INSTALL_DATA) $(TARGET)-syms $(D)$(BOOT_DIR)/$(T)-syms-$(XEN_FULLVERSION) + [ -d "$(D)$(DEBUG_DIR)" ] || $(INSTALL_DIR) $(D)$(DEBUG_DIR) + $(INSTALL_DATA) $(TARGET)-syms $(D)$(DEBUG_DIR)/$(T)-syms-$(XEN_FULLVERSION) if [ -r $(TARGET).efi -a -n '$(EFI_DIR)' ]; then \ [ -d $(D)$(EFI_DIR) ] || $(INSTALL_DIR) $(D)$(EFI_DIR); \ $(INSTALL_DATA) $(TARGET).efi $(D)$(EFI_DIR)/$(T)-$(XEN_FULLVERSION).efi; \@@ -67,7 +68,7 @@ _uninstall: rm -f $(D)$(BOOT_DIR)/$(T)-$(XEN_VERSION).$(XEN_SUBVERSION)$(Z) rm -f $(D)$(BOOT_DIR)/$(T)-$(XEN_VERSION)$(Z) rm -f $(D)$(BOOT_DIR)/$(T)$(Z) - rm -f $(D)$(BOOT_DIR)/$(T)-syms-$(XEN_FULLVERSION) + rm -f $(D)$(DEBUG_DIR)/$(T)-syms-$(XEN_FULLVERSION) rm -f $(D)$(EFI_DIR)/$(T)-$(XEN_FULLVERSION).efi rm -f $(D)$(EFI_DIR)/$(T)-$(XEN_VERSION).$(XEN_SUBVERSION).efi rm -f $(D)$(EFI_DIR)/$(T)-$(XEN_VERSION).efi
Jan Beulich
Acked-byQuoted 28 lines
Quoted 1 line
Quoted 1 line · On 26.06.15 at 11:55, <[email protected]> wrote:
Quoted 3 lines · Andrew Cooper
Quoted 1 line
+BOOT_DIR defaults to /boot,
DERBUG_DIRdefaults to/usr/lib/debugtandDERBUG and /debugt
Gah!
Quoted 13 lines
Quoted 13 lines
INSTALL +2
-0+EFI_DIR to /usr/lib64/efi. BOOT_DIR= +DEBUG_DIR= EFI_DIR= The make target 'rpmball' will build a xen.rpm. This variable can beconfig/StdGNU.mk +0
-0@@ -27,6 +27,7 @@ INSTALL_DATA = $(INSTALL) -m0644 -p INSTALL_PROG = $(INSTALL) -m0755 -pQuoted 6 lines
config/StdGNU.mk INSTALL_DATA = $(INSTALL) -m0644 -p · line 30
Quoted 2 lines
config/StdGNU.mk +1
-0BOOT_DIR ?= /boot +DEBUG_DIR ?= /usr/lib/debugWhile I hate to day it, this probably needs /local/ handling for non-system builds, and this sounds autoconf'y. How stable is the path across different systems?
Quoted 8 lines
This is used in xen/Makefile so autoconf is off the cards. So far we already have
BOOT_DIRandEFI_DIRwhich are special in this way. IMHO addingDEBUG_DIRis fine. I don't think we will need this fortools/*since what should happen there is we install the unstripped things (if asked to do so) as usual and then the rpm/deb packaging tools will take care of creating the detached debug info if they care. Normal users will just get the stripped or unstripped versions install depending on what they asked for.
+1
With the typos fixed
Jan
On Fri, 2015-06-26 at 11:05 +0100, Jan Beulich wrote:
[...]
Quoted 2 lines
With the typos fixed
Acked-by Jan Beulich <[email protected]>
Thanks.
Ian, would we want to update osstest's ts-xen-build:divide() before this? I don't think it's strictly needed since syms can be dug out of dist.tar.gz just as easily as xendist.tar.gz.
Ian.
Ian Campbell writes ("Re: [Xen-devel] [PATCH] xen: Install unstripped version -syms version into /usr/lib/debug"):
Quoted 10 lines · Jan Beulich
[...]
Quoted 2 lines
With the typos fixed
Acked-by Jan Beulich <[email protected]>Thanks.
Ian, would we want to update osstest's ts-xen-build:divide() before this? I don't think it's strictly needed since syms can be dug out of dist.tar.gz just as easily as xendist.tar.gz.
Are there any tools which automatically use the syms file, on the dom0 itself, for diagnosis of problems ?
I think not - or at least that no such things are active in osstest's dom0's - in which case this patch can go into xen.git now and we can fix divide() later.
Ian.
Quoted 6 lines · Ian Jackson
Ian Campbell writes ("Re: [Xen-devel] [PATCH] xen: Install unstripped version -syms version into
/usr/lib/debug"):Quoted 5 lines · Jan Beulich
[...]
Quoted 2 lines
With the typos fixed
Acked-by Jan Beulich <[email protected]>
Quoted 8 lines
Quoted 5 lines
Thanks.
Ian, would we want to update osstest's ts-xen-build:divide() before this? I don't think it's strictly needed since syms can be dug out of dist.tar.gz just as easily as xendist.tar.gz.
Are there any tools which automatically use the syms file, on the dom0 itself, for diagnosis of problems ?
I don't know of any, but I'm not sure that I would know even if there were.
Quoted 3 lines
I think not - or at least that no such things are active in osstest's dom0's
That (not in osstest) I certainly agree with.
Quoted 2 lines
- in which case this patch can go into xen.git now and we can
fixdivide()later.
OK, I'll push next time I'm doing such things, thanks.
Ian.
Quoted 9 lines · Jan Beulich
Quoted 8 lines
This is used in xen/Makefile so autoconf is off the cards. So far we already have
BOOT_DIRandEFI_DIRwhich are special in this way. IMHO addingDEBUG_DIRis fine. I don't think we will need this fortools/*since what should happen there is we install the unstripped things (if asked to do so) as usual and then the rpm/deb packaging tools will take care of creating the detached debug info if they care. Normal users will just get the stripped or unstripped versions install depending on what they asked for.
Quoted 3 lines
+1
With the typos fixed
Done.
Quoted 1 line
Acked-by Jan Beulich <[email protected]>
And applied having discussed the impact on osstest with Ian in the rest of the thread.
Thanks,
Ian.