[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#401385: libgnat-4.1: libgnat needs a shared debugging version, to be placed in /usr/lib/debug



Ludovic Brenta wrote:
Kevin Brown writes:
That may be true, but developers aren't the only ones who might make
use of these files.  Anyone who gets a crash in an Ada application
could get a much better traceback (for filing a bug report) with
these files in place than without.

Independent of the potential issues described below, we should give
some serious thought to including the debugging files with the runtime
package.

It does bloat the package a bit, though.

The overriding reason is multilib.  We will make a separate -dbg
package, and we will probably even move the static library to another
package, too.  Better do it right the first time.

OK, I've finished working on this and the end result appears to work properly. It creates -dbg packages for libgnat, libgnatprj, and libgnatvsn. See the attached patch.

By the way, my initial attempt at this didn't work because it turns out that we're using debhelper compatibility level 4, which changes the semantics of the --dbg-package option rather significantly. So if we move to compatibility level 5 or greater, we'll need to slightly modify the --dbg-package argument to each dh_strip command that makes use of it.


Is there anything else I need to do for this bug?



--
Kevin Brown					      kevin@sysexperts.com
*** -	Sun Dec 24 21:41:40 2006
--- debian/rules.d/binary-ada.mk	Sat Dec 23 13:20:29 2006
***************
*** 9,17 ****
--- 9,21 ----
  
  p_gbase	= gnat-$(GNAT_VERSION)-base
  p_gnat	= gnat-$(GNAT_VERSION)
+ p_gnat_dbg = $(p_gnat)-dbg
  p_lgnat	= libgnat-$(GNAT_VERSION)
+ p_lgnat_dbg = $(p_lgnat)-dbg
  p_lgnatvsn = libgnatvsn$(GNAT_VERSION)
+ p_lgnatvsn_dbg = $(p_lgnatvsn)-dbg
  p_lgnatprj = libgnatprj$(GNAT_VERSION)
+ p_lgnatprj_dbg = $(p_lgnatprj)-dbg
  p_gnatd	= $(p_gnat)-doc
  
  d_gbase	= debian/$(p_gbase)
***************
*** 79,85 ****
  
  	debian/dh_rmemptydirs -p$(p_lgnat)
  
! 	dh_strip -p$(p_lgnat)
  	dh_compress -p$(p_lgnat)
  	dh_fixperms -p$(p_lgnat)
  	b=libgnat; \
--- 83,89 ----
  
  	debian/dh_rmemptydirs -p$(p_lgnat)
  
! 	dh_strip -p$(p_lgnat) --dbg-package=$(p_lgnat)
  	dh_compress -p$(p_lgnat)
  	dh_fixperms -p$(p_lgnat)
  	b=libgnat; \
***************
*** 108,113 ****
--- 112,125 ----
  	trap '' 1 2 3 15; touch $@; mv $(install_stamp)-tmp $(install_stamp)
  
  
+ $(binary_stamp)-libgnatdbg: $(binary_stamp)-libgnat
+ 	dh_compress -p$(p_lgnat_dbg)
+ 	dh_fixperms -p$(p_lgnat_dbg)
+ 	dh_gencontrol -p$(p_lgnat_dbg) -- -v$(DEB_VERSION) $(common_substvars)
+ 	dh_installdeb -p$(p_lgnat_dbg)
+ 	dh_md5sums -p$(p_lgnat_dbg)
+ 	dh_builddeb -p$(p_lgnat_dbg)
+ 	touch $@
  
  $(binary_stamp)-libgnatvsn:
  	: # libgnatvsn-dev
***************
*** 119,125 ****
  	dh_link -plibgnatvsn-dev \
  	   usr/lib/libgnatvsn.so.$(GNAT_VERSION) \
  	   usr/lib/libgnatvsn.so
! 	dh_strip -plibgnatvsn-dev -X.a
  	dh_fixperms -plibgnatvsn-dev
  	debian/dh_doclink -plibgnatvsn-dev $(p_gbase)
  	dh_gencontrol -plibgnatvsn-dev -- -v$(DEB_VERSION) $(common_substvars)
--- 131,137 ----
  	dh_link -plibgnatvsn-dev \
  	   usr/lib/libgnatvsn.so.$(GNAT_VERSION) \
  	   usr/lib/libgnatvsn.so
! 	dh_strip -plibgnatvsn-dev -X.a --keep-debug
  	dh_fixperms -plibgnatvsn-dev
  	debian/dh_doclink -plibgnatvsn-dev $(p_gbase)
  	dh_gencontrol -plibgnatvsn-dev -- -v$(DEB_VERSION) $(common_substvars)
***************
*** 129,135 ****
  	: # libgnatvsn
  	dh_movefiles -p$(p_lgnatvsn) usr/lib/libgnatvsn.so.$(GNAT_VERSION)
  	debian/dh_doclink -p$(p_lgnatvsn) $(p_gbase)
! 	dh_strip -p$(p_lgnatvsn)
  	dh_makeshlibs -p$(p_lgnatvsn) -V '$(p_lgnatvsn) (>= $(DEB_VERSION))'
  	cat debian/$(p_lgnatvsn)/DEBIAN/shlibs >> debian/shlibs.local
  	dh_shlibdeps -p$(p_lgnatvsn)
--- 141,147 ----
  	: # libgnatvsn
  	dh_movefiles -p$(p_lgnatvsn) usr/lib/libgnatvsn.so.$(GNAT_VERSION)
  	debian/dh_doclink -p$(p_lgnatvsn) $(p_gbase)
! 	dh_strip -p$(p_lgnatvsn) --dbg-package=$(p_lgnatvsn)
  	dh_makeshlibs -p$(p_lgnatvsn) -V '$(p_lgnatvsn) (>= $(DEB_VERSION))'
  	cat debian/$(p_lgnatvsn)/DEBIAN/shlibs >> debian/shlibs.local
  	dh_shlibdeps -p$(p_lgnatvsn)
***************
*** 140,145 ****
--- 152,166 ----
  
  	touch $@
  
+ $(binary_stamp)-libgnatvsndbg: $(binary_stamp)-libgnatvsn
+ 	dh_compress -p$(p_lgnatvsn_dbg)
+ 	dh_fixperms -p$(p_lgnatvsn_dbg)
+ 	dh_gencontrol -p$(p_lgnatvsn_dbg) -- -v$(DEB_VERSION) $(common_substvars)
+ 	dh_installdeb -p$(p_lgnatvsn_dbg)
+ 	dh_md5sums -p$(p_lgnatvsn_dbg)
+ 	dh_builddeb -p$(p_lgnatvsn_dbg)
+ 	touch $@
+ 
  $(binary_stamp)-libgnatprj:
  	: # libgnatprj-dev
  	dh_movefiles -plibgnatprj-dev usr/lib/ada/adalib/gnatprj
***************
*** 150,156 ****
  	dh_link -plibgnatprj-dev \
  	   usr/lib/libgnatprj.so.$(GNAT_VERSION) \
  	   usr/lib/libgnatprj.so
! 	dh_strip -plibgnatprj-dev -X.a
  	dh_fixperms -plibgnatprj-dev
  	debian/dh_doclink -plibgnatprj-dev $(p_gbase)
  	dh_gencontrol -plibgnatprj-dev -- -v$(DEB_VERSION) $(common_substvars)
--- 171,177 ----
  	dh_link -plibgnatprj-dev \
  	   usr/lib/libgnatprj.so.$(GNAT_VERSION) \
  	   usr/lib/libgnatprj.so
! 	dh_strip -plibgnatprj-dev -X.a --keep-debug
  	dh_fixperms -plibgnatprj-dev
  	debian/dh_doclink -plibgnatprj-dev $(p_gbase)
  	dh_gencontrol -plibgnatprj-dev -- -v$(DEB_VERSION) $(common_substvars)
***************
*** 160,166 ****
  	: # libgnatprj
  	dh_movefiles -p$(p_lgnatprj) usr/lib/libgnatprj.so.$(GNAT_VERSION)
  	debian/dh_doclink -p$(p_lgnatprj) $(p_gbase)
! 	dh_strip -p$(p_lgnatprj)
  	dh_makeshlibs -p$(p_lgnatprj) -V '$(p_lgnatprj) (>= $(DEB_VERSION))'
  	cat debian/$(p_lgnatprj)/DEBIAN/shlibs >> debian/shlibs.local
  	dh_shlibdeps -p$(p_lgnatprj)
--- 181,187 ----
  	: # libgnatprj
  	dh_movefiles -p$(p_lgnatprj) usr/lib/libgnatprj.so.$(GNAT_VERSION)
  	debian/dh_doclink -p$(p_lgnatprj) $(p_gbase)
! 	dh_strip -p$(p_lgnatprj) --dbg-package=$(p_lgnatprj)
  	dh_makeshlibs -p$(p_lgnatprj) -V '$(p_lgnatprj) (>= $(DEB_VERSION))'
  	cat debian/$(p_lgnatprj)/DEBIAN/shlibs >> debian/shlibs.local
  	dh_shlibdeps -p$(p_lgnatprj)
***************
*** 171,180 ****
  
  	touch $@
  
  ifeq ($(with_libgnat),yes)
! $(binary_stamp)-ada: $(install_stamp) $(binary_stamp)-libgnat
! $(binary_stamp)-ada: $(binary_stamp)-libgnatvsn
! $(binary_stamp)-ada: $(binary_stamp)-libgnatprj
  else
  $(binary_stamp)-ada: $(install_stamp)
  endif
--- 192,210 ----
  
  	touch $@
  
+ $(binary_stamp)-libgnatprjdbg: $(binary_stamp)-libgnatprj
+ 	dh_compress -p$(p_lgnatprj_dbg)
+ 	dh_fixperms -p$(p_lgnatprj_dbg)
+ 	dh_gencontrol -p$(p_lgnatprj_dbg) -- -v$(DEB_VERSION) $(common_substvars)
+ 	dh_installdeb -p$(p_lgnatprj_dbg)
+ 	dh_md5sums -p$(p_lgnatprj_dbg)
+ 	dh_builddeb -p$(p_lgnatprj_dbg)
+ 	touch $@
+ 
  ifeq ($(with_libgnat),yes)
! $(binary_stamp)-ada: $(install_stamp) $(binary_stamp)-libgnat $(binary_stamp)-libgnatdbg
! $(binary_stamp)-ada: $(binary_stamp)-libgnatvsn $(binary_stamp)-libgnatvsndbg
! $(binary_stamp)-ada: $(binary_stamp)-libgnatprj $(binary_stamp)-libgnatprjdbg
  else
  $(binary_stamp)-ada: $(install_stamp)
  endif
***************
*** 219,225 ****
  
  	debian/dh_rmemptydirs -p$(p_gnat)
  
! 	dh_strip -p$(p_gnat)
  	dh_compress -p$(p_gnat)
  	dh_fixperms -p$(p_gnat)
  	find $(d_gnat) -name '*.ali' | xargs chmod 444
--- 249,255 ----
  
  	debian/dh_rmemptydirs -p$(p_gnat)
  
! 	dh_strip -p$(p_gnat) --dbg-package=$(p_gnat)
  	dh_compress -p$(p_gnat)
  	dh_fixperms -p$(p_gnat)
  	find $(d_gnat) -name '*.ali' | xargs chmod 444
*** -	Sun Dec 24 21:41:40 2006
--- debian/control.m4	Fri Dec 22 19:14:13 2006
***************
*** 983,988 ****
--- 983,998 ----
  Description: Runtime library for GNU Ada applications
   Library needed for GNU Ada applications linked against the shared library.
  
+ Package: libgnat`'-GNAT_V-dbg
+ Section: libs
+ Architecture: any
+ Priority: PRI(optional)
+ Depends: libgnat`'-GNAT_V
+ Recommends: gnat-gdb (>= 6.4)
+ Description: Runtime library for GNU Ada applications
+  Debugging symbols for the library needed for GNU Ada applications linked
+  against the shared library.
+ 
  Package: libgnatvsn-dev
  Section: libdevel
  Architecture: any
***************
*** 1007,1012 ****
--- 1017,1035 ----
   .
   This package contains the run-time shared library.
  
+ Package: libgnatvsn`'GNAT_V-dbg
+ Architecture: any
+ Priority: PRI(optional)
+ Section: libs
+ Depends: libgnatvsn`'GNAT_V
+ Recommends: gnat-gdb (>= 6.4)
+ Description: GNU Ada compiler version library
+  This library exports selected components of GNAT, the GNU Ada compiler, for use
+  in other packages, most notably ASIS and ASIS-based packages.  It is licensed
+  under the GNAT-Modified GPL, allowing to link proprietary programs with it.
+  .
+  This package contains the debugging symbols for the run-time shared library.
+ 
  Package: libgnatprj-dev
  Section: libdevel
  Architecture: any
***************
*** 1039,1044 ****
--- 1062,1084 ----
   distributed at all.
   .
   This package contains the run-time shared library.
+ 
+ Package: libgnatprj`'GNAT_V-dbg
+ Architecture: any
+ Priority: PRI(optional)
+ Section: libs
+ Depends: libgnatprj`'GNAT_V
+ Recommends: gnat-gdb (>= 6.4)
+ Description: GNU Ada Project Manager
+  GNAT, the GNU Ada compiler, uses project files to organise source and object
+  files in large-scale development efforts.  Several other tools, such as
+  ASIS tools (package asis-programs) and GNAT Programming Studio (package
+  gnat-gps) also use project files.  This library contains the necessary
+  support; it was built from GNAT itself.  It is licensed under the pure GPL;
+  all programs that use it must also be distributed under the GPL, or not
+  distributed at all.
+  .
+  This package contains the debugging symbols for the run-time shared library.
  ')`'dnl libgnat
  
  ifenabled(`lib64gnat',`

Reply to: