Add per-platform *-dbg packages containing files needed to use GRUB's

GDB stub.  These are relatively large and thus worth splitting out.
This commit is contained in:
Colin Watson 2012-09-05 15:09:14 +01:00
parent fc385df434
commit 00b51c62fa
12 changed files with 127 additions and 3 deletions

2
debian/changelog vendored
View File

@ -31,6 +31,8 @@ grub2 (2.00-1) UNRELEASED; urgency=low
* Build-depend on gcc-4.6-multilib on kfreebsd-i386 and hurd-i386 as well * Build-depend on gcc-4.6-multilib on kfreebsd-i386 and hurd-i386 as well
as the other i386 architectures, since we need it to build efiemu32.o as the other i386 architectures, since we need it to build efiemu32.o
and efiemu64.o. and efiemu64.o.
* Add per-platform *-dbg packages containing files needed to use GRUB's
GDB stub. These are relatively large and thus worth splitting out.
-- Christian Perrier <bubulle@debian.org> Sat, 02 Jun 2012 19:51:35 +0200 -- Christian Perrier <bubulle@debian.org> Sat, 02 Jun 2012 19:51:35 +0200

72
debian/control vendored
View File

@ -97,6 +97,15 @@ Description: GRand Unified Bootloader, version 2 (emulated version)
This package contains grub-emu, an emulated version of GRUB. It is only This package contains grub-emu, an emulated version of GRUB. It is only
provided for debugging purposes. provided for debugging purposes.
Package: grub-emu-dbg
Section: debug
Architecture: any-i386 any-amd64 any-powerpc
Depends: grub-emu (= ${binary:Version}), grub-common (= ${binary:Version})
Multi-Arch: foreign
Description: GRand Unified Bootloader, version 2 (emulated debug files)
This package contains debugging files for grub-emu. You only need these if
you are trying to debug GRUB using its GDB stub.
Package: grub-pc-bin Package: grub-pc-bin
Priority: optional Priority: optional
Architecture: any-i386 any-amd64 Architecture: any-i386 any-amd64
@ -123,6 +132,15 @@ Description: GRand Unified Bootloader, version 2 (PC/BIOS binaries)
as the active boot loader, nor will it automatically update grub.cfg on as the active boot loader, nor will it automatically update grub.cfg on
upgrade, so most people should install grub-pc instead. upgrade, so most people should install grub-pc instead.
Package: grub-pc-dbg
Section: debug
Architecture: any-i386 any-amd64
Depends: grub-pc-bin (= ${binary:Version}), grub-common (= ${binary:Version})
Multi-Arch: foreign
Description: GRand Unified Bootloader, version 2 (PC/BIOS debug files)
This package contains debugging files for grub-pc-bin. You only need these
if you are trying to debug GRUB using its GDB stub.
Package: grub-pc Package: grub-pc
Priority: optional Priority: optional
Architecture: any-i386 any-amd64 Architecture: any-i386 any-amd64
@ -180,6 +198,15 @@ Description: GRand Unified Bootloader, version 2 (Coreboot binaries)
GRUB as the active boot loader, nor will it automatically update grub.cfg GRUB as the active boot loader, nor will it automatically update grub.cfg
on upgrade, so most people should install grub-coreboot instead. on upgrade, so most people should install grub-coreboot instead.
Package: grub-coreboot-dbg
Section: debug
Architecture: any-i386 any-amd64
Depends: grub-coreboot-bin (= ${binary:Version}), grub-common (= ${binary:Version})
Multi-Arch: foreign
Description: GRand Unified Bootloader, version 2 (Coreboot debug files)
This package contains debugging files for grub-coreboot-bin. You only need
these if you are trying to debug GRUB using its GDB stub.
Package: grub-coreboot Package: grub-coreboot
Architecture: any-i386 any-amd64 Architecture: any-i386 any-amd64
Depends: ${shlibs:Depends}, ${misc:Depends}, grub2-common (= ${binary:Version}), grub-coreboot-bin (= ${binary:Version}), ucf Depends: ${shlibs:Depends}, ${misc:Depends}, grub2-common (= ${binary:Version}), grub-coreboot-bin (= ${binary:Version}), ucf
@ -220,6 +247,15 @@ Description: GRand Unified Bootloader, version 2 (EFI-IA32 binaries)
GRUB as the active boot loader, nor will it automatically update grub.cfg GRUB as the active boot loader, nor will it automatically update grub.cfg
on upgrade, so most people should install grub-efi-ia32 instead. on upgrade, so most people should install grub-efi-ia32 instead.
Package: grub-efi-ia32-dbg
Section: debug
Architecture: any-i386 any-amd64
Depends: grub-efi-ia32-bin (= ${binary:Version}), grub-common (= ${binary:Version})
Multi-Arch: foreign
Description: GRand Unified Bootloader, version 2 (EFI-IA32 debug files)
This package contains debugging files for grub-efi-ia32-bin. You only need
these if you are trying to debug GRUB using its GDB stub.
Package: grub-efi-ia32 Package: grub-efi-ia32
Architecture: any-i386 any-amd64 Architecture: any-i386 any-amd64
Depends: ${shlibs:Depends}, ${misc:Depends}, grub2-common (= ${binary:Version}), grub-efi-ia32-bin (= ${binary:Version}), ucf Depends: ${shlibs:Depends}, ${misc:Depends}, grub2-common (= ${binary:Version}), grub-efi-ia32-bin (= ${binary:Version}), ucf
@ -261,6 +297,15 @@ Description: GRand Unified Bootloader, version 2 (EFI-AMD64 binaries)
GRUB as the active boot loader, nor will it automatically update grub.cfg GRUB as the active boot loader, nor will it automatically update grub.cfg
on upgrade, so most people should install grub-efi-amd64 instead. on upgrade, so most people should install grub-efi-amd64 instead.
Package: grub-efi-amd64-dbg
Section: debug
Architecture: i386 kopensolaris-i386 any-amd64
Depends: grub-efi-amd64-bin (= ${binary:Version}), grub-common (= ${binary:Version})
Multi-Arch: foreign
Description: GRand Unified Bootloader, version 2 (EFI-AMD64 debug files)
This package contains debugging files for grub-efi-amd64-bin. You only
need these if you are trying to debug GRUB using its GDB stub.
Package: grub-efi-amd64 Package: grub-efi-amd64
Architecture: i386 kopensolaris-i386 any-amd64 Architecture: i386 kopensolaris-i386 any-amd64
Depends: ${shlibs:Depends}, ${misc:Depends}, grub2-common (= ${binary:Version}), grub-efi-amd64-bin (= ${binary:Version}), ucf Depends: ${shlibs:Depends}, ${misc:Depends}, grub2-common (= ${binary:Version}), grub-efi-amd64-bin (= ${binary:Version}), ucf
@ -300,6 +345,15 @@ Description: GRand Unified Bootloader, version 2 (IA64 binaries)
nor will it automatically update grub.cfg on upgrade, so most people should nor will it automatically update grub.cfg on upgrade, so most people should
install grub-efi-ia64 instead. install grub-efi-ia64 instead.
Package: grub-efi-ia64-dbg
Section: debug
Architecture: any-ia64
Depends: grub-efi-ia64-bin (= ${binary:Version}), grub-common (= ${binary:Version})
Multi-Arch: foreign
Description: GRand Unified Bootloader, version 2 (IA64 debug files)
This package contains debugging files for grub-efi-ia64-bin. You only need
these if you are trying to debug GRUB using its GDB stub.
Package: grub-efi-ia64 Package: grub-efi-ia64
Architecture: any-ia64 Architecture: any-ia64
Depends: ${shlibs:Depends}, ${misc:Depends}, grub2-common (= ${binary:Version}), grub-efi-ia64-bin (= ${binary:Version}), ucf Depends: ${shlibs:Depends}, ${misc:Depends}, grub2-common (= ${binary:Version}), grub-efi-ia64-bin (= ${binary:Version}), ucf
@ -339,6 +393,15 @@ Description: GRand Unified Bootloader, version 2 (Open Firmware binaries)
the active boot loader, nor will it automatically update grub.cfg on the active boot loader, nor will it automatically update grub.cfg on
upgrade, so most people should install grub-ieee1275 instead. upgrade, so most people should install grub-ieee1275 instead.
Package: grub-ieee1275-dbg
Section: debug
Architecture: any-i386 any-amd64 any-powerpc any-ppc64 any-sparc
Depends: grub-ieee1275-bin (= ${binary:Version}), grub-common (= ${binary:Version})
Multi-Arch: foreign
Description: GRand Unified Bootloader, version 2 (Open Firmware debug files)
This package contains debugging files for grub-ieee1275-bin. You only
need these if you are trying to debug GRUB using its GDB stub.
Package: grub-ieee1275 Package: grub-ieee1275
Architecture: any-i386 any-amd64 any-powerpc any-ppc64 any-sparc Architecture: any-i386 any-amd64 any-powerpc any-ppc64 any-sparc
Depends: ${shlibs:Depends}, ${misc:Depends}, grub2-common (= ${binary:Version}), grub-ieee1275-bin (= ${binary:Version}), ucf Depends: ${shlibs:Depends}, ${misc:Depends}, grub2-common (= ${binary:Version}), grub-ieee1275-bin (= ${binary:Version}), ucf
@ -397,6 +460,15 @@ Description: GRand Unified Bootloader, version 2 (Yeeloong binaries)
active boot loader, nor will it automatically update grub.cfg on upgrade, active boot loader, nor will it automatically update grub.cfg on upgrade,
so most people should install grub-yeeloong instead. so most people should install grub-yeeloong instead.
Package: grub-yeeloong-dbg
Section: debug
Architecture: any-mipsel
Depends: grub-yeeloong-bin (= ${binary:Version}), grub-common (= ${binary:Version})
Multi-Arch: foreign
Description: GRand Unified Bootloader, version 2 (Yeeloong debug files)
This package contains debugging files for grub-yeeloong-bin. You only
need these if you are trying to debug GRUB using its GDB stub.
Package: grub-yeeloong Package: grub-yeeloong
Architecture: any-mipsel Architecture: any-mipsel
Depends: ${shlibs:Depends}, ${misc:Depends}, grub2-common (= ${binary:Version}), grub-yeeloong-bin (= ${binary:Version}), ucf Depends: ${shlibs:Depends}, ${misc:Depends}, grub2-common (= ${binary:Version}), grub-yeeloong-bin (= ${binary:Version}), ucf

1
debian/grub-coreboot-bin.install.in vendored Normal file
View File

@ -0,0 +1 @@
usr/lib/grub/@CPU_PLATFORM@/efiemu*.o

4
debian/grub-emu-dbg.install vendored Normal file
View File

@ -0,0 +1,4 @@
usr/lib/grub/*-*/*.exec
usr/lib/grub/*-*/*.module
usr/lib/grub/*-*/gdb_grub
usr/lib/grub/*-*/gmodule.pl

View File

@ -1,4 +1,9 @@
usr/bin/grub-emu usr/bin/grub-emu
usr/bin/grub-emu-lite usr/bin/grub-emu-lite
usr/lib/grub/*-*/ usr/lib/grub/*-*/*.img
usr/lib/grub/*-*/*.lst
usr/lib/grub/*-*/*.mod
usr/lib/grub/*-*/*.o
usr/lib/grub/*-*/config.h
usr/lib/grub/*-*/modinfo.sh
usr/share/man/man1/grub-emu.1 usr/share/man/man1/grub-emu.1

View File

@ -0,0 +1 @@
usr/lib/grub/@CPU_PLATFORM@/efiemu*.o

View File

@ -0,0 +1 @@
usr/lib/grub/@CPU_PLATFORM@/efiemu*.o

View File

@ -1,2 +1,5 @@
usr/bin/grub-ntldr-img usr/lib/grub/@CPU_PLATFORM@ usr/bin/grub-ntldr-img usr/lib/grub/@CPU_PLATFORM@
usr/lib/grub/@CPU_PLATFORM@/efiemu*.o
usr/lib/grub/@CPU_PLATFORM@/g2hdr.bin
usr/lib/grub/@CPU_PLATFORM@/g2ldr.mbr
usr/sbin/grub-bios-setup usr/lib/grub/@CPU_PLATFORM@ usr/sbin/grub-bios-setup usr/lib/grub/@CPU_PLATFORM@

1
debian/grub-pc-dbg.install.in vendored Normal file
View File

@ -0,0 +1 @@
usr/lib/grub/@CPU_PLATFORM@/*.image

View File

@ -1,6 +1,10 @@
../../debian/presubj usr/share/bug/@PACKAGE@ ../../debian/presubj usr/share/bug/@PACKAGE@
../../debian/script usr/share/bug/@PACKAGE@ ../../debian/script usr/share/bug/@PACKAGE@
usr/lib/grub/@CPU_PLATFORM@/ usr/lib/grub/@CPU_PLATFORM@/*.img
usr/lib/grub/@CPU_PLATFORM@/*.lst
usr/lib/grub/@CPU_PLATFORM@/*.mod
usr/lib/grub/@CPU_PLATFORM@/config.h
usr/lib/grub/@CPU_PLATFORM@/modinfo.sh
usr/sbin/grub-install usr/lib/grub/@CPU_PLATFORM@ usr/sbin/grub-install usr/lib/grub/@CPU_PLATFORM@
usr/sbin/grub-mknetdir usr/lib/grub/@CPU_PLATFORM@ usr/sbin/grub-mknetdir usr/lib/grub/@CPU_PLATFORM@

4
debian/install-dbg.in vendored Normal file
View File

@ -0,0 +1,4 @@
usr/lib/grub/@CPU_PLATFORM@/*.exec
usr/lib/grub/@CPU_PLATFORM@/*.module
usr/lib/grub/@CPU_PLATFORM@/gdb_grub
usr/lib/grub/@CPU_PLATFORM@/gmodule.pl

28
debian/rules vendored
View File

@ -72,7 +72,9 @@ build/stamps/build-%: export DH_OPTIONS = -p$(package) -Bbuild/$(package)
install/%: package = $(subst install/,,$@) install/%: package = $(subst install/,,$@)
install/%: package_bin = $(package)-bin install/%: package_bin = $(package)-bin
install/%: package_dbg = $(package)-dbg
install/grub-emu: package_bin = grub-emu install/grub-emu: package_bin = grub-emu
install/grub-emu: package_dbg = grub-emu-dbg
install/%: export DH_OPTIONS = -p$(package) -Bbuild/$(patsubst grub-common,grub-$(COMMON_PLATFORM),$(package)) install/%: export DH_OPTIONS = -p$(package) -Bbuild/$(patsubst grub-common,grub-$(COMMON_PLATFORM),$(package))
build/stamps/autogen: autogen.sh configure.ac Makefile.util.def grub-core/Makefile.core.def build/stamps/autogen: autogen.sh configure.ac Makefile.util.def grub-core/Makefile.core.def
@ -189,6 +191,12 @@ install/grub-pc install/grub-efi-ia32 install/grub-efi-amd64 install/grub-efi-ia
$(call platform_subst,$(package_bin).$$i.$(DEB_HOST_ARCH_CPU).in,$(package_bin),$$i); \ $(call platform_subst,$(package_bin).$$i.$(DEB_HOST_ARCH_CPU).in,$(package_bin),$$i); \
$(call platform_subst,$(package_bin).$$i.$(DEB_HOST_ARCH_OS).in,$(package_bin),$$i); \ $(call platform_subst,$(package_bin).$$i.$(DEB_HOST_ARCH_OS).in,$(package_bin),$$i); \
[ -s debian/$(package_bin).$$i ] || rm -f debian/$(package_bin).$$i; \ [ -s debian/$(package_bin).$$i ] || rm -f debian/$(package_bin).$$i; \
> debian/$(package_dbg).$$i; \
$(call platform_subst,$$i-dbg.in,$(package_dbg),$$i); \
$(call platform_subst,$(package_dbg).$$i.in,$(package_dbg),$$i); \
$(call platform_subst,$(package_dbg).$$i.$(DEB_HOST_ARCH_CPU).in,$(package_dbg),$$i); \
$(call platform_subst,$(package_dbg).$$i.$(DEB_HOST_ARCH_OS).in,$(package_dbg),$$i); \
[ -s debian/$(package_dbg).$$i ] || rm -f debian/$(package_dbg).$$i; \
done ; \ done ; \
fi fi
@ -220,6 +228,22 @@ install/grub-pc install/grub-efi-ia32 install/grub-efi-amd64 install/grub-efi-ia
>> $(CURDIR)/debian/$(package_bin)/usr/share/lintian/overrides/$(package_bin) ; \ >> $(CURDIR)/debian/$(package_bin)/usr/share/lintian/overrides/$(package_bin) ; \
fi fi
mkdir -p $(CURDIR)/debian/$(package_dbg)/usr/share/lintian/overrides
echo "$(package_dbg): unstripped-binary-or-object *.module" \
>> $(CURDIR)/debian/$(package_dbg)/usr/share/lintian/overrides/$(package_dbg)
echo "$(package_dbg): statically-linked-binary *.image" \
>> $(CURDIR)/debian/$(package_dbg)/usr/share/lintian/overrides/$(package_dbg)
cd debian/tmp-$(package) && find usr/lib/grub -name kernel.exec \
| sed -e "s%.*%$(package_dbg): statically-linked-binary &%g" \
>> $(CURDIR)/debian/$(package_dbg)/usr/share/lintian/overrides/$(package_dbg)
if [ "$@" = "install/grub-efi-amd64" ] && [ "$(DEB_HOST_ARCH_CPU)" = "i386" ] ; then \
echo "$(package_dbg): binary-from-other-architecture *.module" \
>> $(CURDIR)/debian/$(package_dbg)/usr/share/lintian/overrides/$(package_dbg) ; \
cd debian/tmp-$(package) && find usr/lib/grub -name kernel.exec \
| sed -e "s%.*%$(package_dbg): binary-from-other-architecture &%g" \
>> $(CURDIR)/debian/$(package_dbg)/usr/share/lintian/overrides/$(package_dbg) ; \
fi
install/grub-common: install/grub-common:
set -e ; for i in $(AUTOGEN_DEB_FILES) ; do \ set -e ; for i in $(AUTOGEN_DEB_FILES) ; do \
if [ -e debian/grub-common.$$i.in ] ; then \ if [ -e debian/grub-common.$$i.in ] ; then \
@ -245,8 +269,10 @@ override_dh_install:
set -e; for package in grub-pc grub-efi-ia32 grub-efi-amd64 grub-efi-ia64 grub-ieee1275 grub-coreboot grub-yeeloong; do \ set -e; for package in grub-pc grub-efi-ia32 grub-efi-amd64 grub-efi-ia64 grub-ieee1275 grub-coreboot grub-yeeloong; do \
dh_install -p$$package --sourcedir=debian/tmp-$$package; \ dh_install -p$$package --sourcedir=debian/tmp-$$package; \
dh_install -p$$package-bin --sourcedir=debian/tmp-$$package; \ dh_install -p$$package-bin --sourcedir=debian/tmp-$$package; \
dh_install -p$$package-dbg --sourcedir=debian/tmp-$$package; \
done done
dh_install -pgrub-emu --sourcedir=debian/tmp-grub-emu dh_install -pgrub-emu --sourcedir=debian/tmp-grub-emu
dh_install -pgrub-emu-dbg --sourcedir=debian/tmp-grub-emu
override_dh_installdocs: override_dh_installdocs:
dh_installdocs -pgrub-common -pgrub-rescue-pc -pgrub-firmware-qemu -A AUTHORS NEWS README THANKS TODO dh_installdocs -pgrub-common -pgrub-rescue-pc -pgrub-firmware-qemu -A AUTHORS NEWS README THANKS TODO
@ -265,7 +291,7 @@ override_dh_clean: debian/legacy/update-grub debian/grub-extras
chmod +x debian/{script,grub.d/*,legacy/*,kernel/*} chmod +x debian/{script,grub.d/*,legacy/*,kernel/*}
for i in $(AUTOGEN_DEB_FILES) ; do \ for i in $(AUTOGEN_DEB_FILES) ; do \
rm -f debian/grub-{pc,efi-*,ieee1275,coreboot,yeeloong}{,-bin}.$$i ; \ rm -f debian/grub-{pc,efi-*,ieee1275,coreboot,yeeloong}{,-bin,-dbg}.$$i ; \
done done
rm -rf debian/tmp-*/ rm -rf debian/tmp-*/