X-Git-Url: http://git.alex.org.uk diff --git a/debian/rules.d/2-binary-arch.mk b/debian/rules.d/2-binary-arch.mk index 1d26496..876a980 100644 --- a/debian/rules.d/2-binary-arch.mk +++ b/debian/rules.d/2-binary-arch.mk @@ -54,24 +54,25 @@ install-%: $(stampdir)/stamp-build-% checks-% # compress_file logic required because not all architectures # generate a zImage automatically out of the box ifeq ($(compress_file),) - install -m644 -D $(builddir)/build-$*/$(kernel_file) \ + install -m600 -D $(builddir)/build-$*/$(kernel_file) \ $(pkgdir)/boot/$(install_file)-$(abi_release)-$* else install -d $(pkgdir)/boot gzip -c9v $(builddir)/build-$*/$(kernel_file) > \ $(pkgdir)/boot/$(install_file)-$(abi_release)-$* - chmod 644 $(pkgdir)/boot/$(install_file)-$(abi_release)-$* + chmod 600 $(pkgdir)/boot/$(install_file)-$(abi_release)-$* endif install -m644 $(builddir)/build-$*/.config \ $(pkgdir)/boot/config-$(abi_release)-$* install -m644 $(abidir)/$* \ $(pkgdir)/boot/abi-$(abi_release)-$* - install -m644 $(builddir)/build-$*/System.map \ + install -m600 $(builddir)/build-$*/System.map \ $(pkgdir)/boot/System.map-$(abi_release)-$* ifeq ($(no_dumpfile),) makedumpfile -g $(pkgdir)/boot/vmcoreinfo-$(abi_release)-$* \ -x $(builddir)/build-$*/vmlinux + chmod 0600 $(pkgdir)/boot/vmcoreinfo-$(abi_release)-$* endif $(build_cd) $(kmake) $(build_O) modules_install \ @@ -92,6 +93,7 @@ endif ifeq ($(no_dumpfile),) makedumpfile -g $(pkgdir)/boot/vmcoreinfo-$(abi_release)-$* \ -x $(builddir)/build-$*/vmlinux + chmod 0600 $(pkgdir)/boot/vmcoreinfo-$(abi_release)-$* endif rm -f $(pkgdir)/lib/modules/$(abi_release)-$*/build rm -f $(pkgdir)/lib/modules/$(abi_release)-$*/source @@ -243,6 +245,8 @@ install-arch-headers: find . -name '.' -o -name '.*' -prune -o -print | \ cpio -pvd --preserve-modification-time \ $(headers_dir)/usr/include/ ) + mkdir $(headers_dir)/usr/include/$(DEB_HOST_MULTIARCH) + mv $(headers_dir)/usr/include/asm $(headers_dir)/usr/include/$(DEB_HOST_MULTIARCH)/ rm -rf $(headers_tmp) @@ -267,6 +271,7 @@ endif binary-%: pkgimg = $(bin_pkg_name)-$* binary-%: pkghdr = $(hdrs_pkg_name)-$* binary-%: dbgpkg = $(bin_pkg_name)-$*-dbgsym +binary-%: dbgpkgdir = $(CURDIR)/debian/$(bin_pkg_name)-$*-dbgsym binary-%: install-% dh_testdir dh_testroot @@ -274,7 +279,7 @@ binary-%: install-% dh_installchangelogs -p$(pkgimg) dh_installdocs -p$(pkgimg) dh_compress -p$(pkgimg) - dh_fixperms -p$(pkgimg) + dh_fixperms -p$(pkgimg) -X/boot/ dh_installdeb -p$(pkgimg) dh_shlibdeps -p$(pkgimg) dh_gencontrol -p$(pkgimg) @@ -297,7 +302,7 @@ ifneq ($(skipsub),true) dh_installchangelogs -p$$pkg; \ dh_installdocs -p$$pkg; \ dh_compress -p$$pkg; \ - dh_fixperms -p$$pkg; \ + dh_fixperms -p$$pkg -X/boot/; \ dh_shlibdeps -p$$pkg; \ dh_installdeb -p$$pkg; \ dh_gencontrol -p$$pkg; \ @@ -334,6 +339,12 @@ ifneq ($(skipdbg),true) # Now, the package wont get into the archive, but it will get put # into the debug system. endif +ifneq ($(full_build),false) + # Clean out this flavours build directory. + rm -rf $(builddir)/build-$* + # Clean out the debugging package source directory. + rm -rf $(dbgpkgdir) +endif $(stampdir)/stamp-flavours: @echo $(flavours) > $@ @@ -344,6 +355,7 @@ $(stampdir)/stamp-flavours: $(stampdir)/stamp-prepare-perarch: @echo "Preparing perarch ..." ifeq ($(do_tools),true) + rm -rf $(builddir)/tools-$* install -d $(builddir)/tools-$* for i in *; do ln -s $(CURDIR)/$$i $(builddir)/tools-$*/; done rm $(builddir)/tools-$*/tools @@ -353,7 +365,8 @@ endif $(stampdir)/stamp-build-perarch: prepare-perarch ifeq ($(do_tools),true) - cd $(builddir)/tools-$*/tools/perf && make + cd $(builddir)/tools-$*/tools/perf && \ + make HAVE_CPLUS_DEMANGLE=1 $(CROSS_COMPILE) endif @touch $@