Skip to contentSkip to conversation

xen: Install unstripped version -syms version into /usr/lib/debug

PATCH In review Ian Campbell 4 participants 8 messages Jun 26, 2015 – Jun 30, 2015

lore
Share & tools
lore
#0 lore raw

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
index 10cf879..680dcb2 100644
@@ -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
index f47c238..39d36b2 100644
@@ -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
index 21ea0c2..86a384d 100644
@@ -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
index b51dd36..6305880 100644
@@ -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
#1 lore raw
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/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 +0 -0
index 10cf879..680dcb2 100644

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 be
config/StdGNU.mk +0 -0
index f47c238..39d36b2 100644

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 -0
 SOCKET_LIBS =
 UTIL_LIBS = -lutil
config/SunOS.mk +1 -0
index 21ea0c2..86a384d 100644
@@ -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
index b51dd36..6305880 100644
@@ -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
#2 lore raw
Quoted 3 lines · Andrew Cooper
Quoted 1 line

+BOOT_DIR defaults to /boot, DERBUG_DIR defaults to /usr/lib/debugt and

DERBUG 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 be
config/StdGNU.mk +0 -0
index f47c238..39d36b2 100644
@@ -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 -0
 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?

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 -0
 SOCKET_LIBS =
 UTIL_LIBS = -lutil
config/SunOS.mk +1 -0
index 21ea0c2..86a384d 100644
@@ -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
index b51dd36..6305880 100644
@@ -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
Acked-by
#3 lore raw
Quoted 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_DIR defaults to /usr/lib/debugt and

DERBUG 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 be
config/StdGNU.mk +0 -0
index f47c238..39d36b2 100644
@@ -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 -0
 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?

Quoted 8 lines

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.

+1

With the typos fixed

Jan

#4 lore raw

On Fri, 2015-06-26 at 11:05 +0100, Jan Beulich wrote:
[...]

Quoted 2 lines

With the typos fixed

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.

#5 lore raw

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

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.

#6 lore raw
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

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
fix divide() later.

OK, I'll push next time I'm doing such things, thanks.

Ian.

#7 lore raw
In reply to Jan Beulich
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_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.

Quoted 3 lines

+1

With the typos fixed

Done.

Quoted 1 line

And applied having discussed the impact on osstest with Ian in the rest of the thread.

Thanks,
Ian.