diff options
author | Andy Whitcroft <apw@canonical.com> | 2010-06-17 16:15:06 +0100 |
---|---|---|
committer | Leann Ogasawara <leann.ogasawara@canonical.com> | 2010-08-20 16:00:18 -0700 |
commit | 2a103ed54a11a77ca48817d6e08be6f027417ea8 (patch) | |
tree | 6e5a2aaf23e780c9b5946083ee3e936aa5896e37 /debian | |
parent | c4f05f683724884aedf2654cd678676456f7d1ea (diff) |
UBUNTU: update to ubuntu-debian:508b7aa34b578c0d1e51bfb571f2bfb824dc65ac
[ Andy Whitcroft ]
* initial import of the debian machinery from Maverick
* enforcer -- move configuration series specific
* abi-check -- be more forgiving of the ABI element type
- LP: #576274
* debian -- fix modules.builtin naming after cleanup
* debian -- fix distclean to be branch specific
* pass LOCALVERSION= to kernel builds to suppress version suffix
* debian -- add a full_build override
* debian -- ensure the version number is clean
[ Lee Jones ]
* Enable perf to be more helpful when perf_<version> does not exist.
- LP: #570500
* 'fdr editconfig' modification. Easily skip over unwanted menuconfigs.
[ Tim Gardner ]
* [Config] Added module inclusion support
BugLink: http://bugs.launchpad.net/bugs/576274
BugLink: http://bugs.launchpad.net/bugs/570500
Signed-off-by: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
Diffstat (limited to 'debian')
-rw-r--r-- | debian/config/enforce | 47 | ||||
-rwxr-xr-x | debian/rules | 4 | ||||
-rw-r--r-- | debian/rules.d/0-common-vars.mk | 22 | ||||
-rw-r--r-- | debian/rules.d/2-binary-arch.mk | 37 | ||||
-rwxr-xr-x | debian/scripts/abi-check | 4 | ||||
-rwxr-xr-x | debian/scripts/misc/kernelconfig | 2 | ||||
-rw-r--r-- | debian/scripts/sub-flavour | 67 |
7 files changed, 124 insertions, 59 deletions
diff --git a/debian/config/enforce b/debian/config/enforce deleted file mode 100644 index 64cae67ef0c6..000000000000 --- a/debian/config/enforce +++ /dev/null @@ -1,47 +0,0 @@ -# -# SECURITY items -# -# Ensure this option is enabled. -value CONFIG_COMPAT_BRK n -value CONFIG_DEVKMEM n -value CONFIG_LSM_MMAP_MIN_ADDR 0 -value CONFIG_SECURITY y -!exists CONFIG_SECURITY_FILE_CAPABILITIES | value CONFIG_SECURITY_FILE_CAPABILITIES y -value CONFIG_SECURITY_SELINUX y -value CONFIG_SECURITY_SMACK y -value CONFIG_SYN_COOKIES y -value CONFIG_DEFAULT_SECURITY_APPARMOR y -# For architectures which support this option ensure it is enabled. -!exists CONFIG_SECCOMP | value CONFIG_SECCOMP y -!exists CONFIG_CC_STACKPROTECTOR | value CONFIG_CC_STACKPROTECTOR y -!exists CONFIG_DEBUG_RODATA | value CONFIG_DEBUG_RODATA y -!exists CONFIG_STRICT_DEVMEM | value CONFIG_STRICT_DEVMEM y -# For architectures which support this option ensure it is disabled. -!exists CONFIG_COMPAT_VDSO | value CONFIG_COMPAT_VDSO n -# Default to 32768 for armel, 65536 for everything else. -(( arch armel | arch sparc ) & value CONFIG_DEFAULT_MMAP_MIN_ADDR 32768 ) | \ - ( value CONFIG_DEFAULT_MMAP_MIN_ADDR 65536) - -# CONFIG_USB_DEVICE_FS breaks udev USB firmware loading and is deprecated -# ensure it is disabled. -value CONFIG_USB_DEVICEFS n - -# upstart requires DEVTMPFS be enabled and mounted by default. -value CONFIG_DEVTMPFS y -value CONFIG_DEVTMPFS_MOUNT y - -# some /dev nodes require POSIX ACLs, like /dev/dsp -value CONFIG_TMPFS_POSIX_ACL y - -# Ramdisk size should be a minimum of 64M -value CONFIG_BLK_DEV_RAM_SIZE 65536 - -# LVM requires dm_mod built in to activate correctly (LP: #560717) -value CONFIG_BLK_DEV_DM y - -# sysfs: ensure all DEPRECATED items are off -value CONFIG_SYSFS_DEPRECATED_V2 n -!exists CONFIG_SYSFS_DEPRECATED | value CONFIG_SYSFS_DEPRECATED n - -# automatically add local version will cause packaging failure -value CONFIG_LOCALVERSION_AUTO n diff --git a/debian/rules b/debian/rules index 999bc1df0314..b167196328d8 100755 --- a/debian/rules +++ b/debian/rules @@ -56,8 +56,8 @@ clean: debian/control cp $(DEBIAN)/copyright debian/copyright distclean: clean - rm -rf debian.master/control debian.master/control.stub \ - debian.master/d-i/kernel-versions debian/changelog \ + rm -rf $(DEBIAN)/control $(DEBIAN)/control.stub \ + $(DEBIAN)/d-i/kernel-versions debian/changelog \ debian/control debian/control.stub debian/copyright # Builds the image, arch headers and debug packages diff --git a/debian/rules.d/0-common-vars.mk b/debian/rules.d/0-common-vars.mk index eec7ada96b21..b59656ca5718 100644 --- a/debian/rules.d/0-common-vars.mk +++ b/debian/rules.d/0-common-vars.mk @@ -4,6 +4,7 @@ src_pkg_name=$(shell sed -n '1s/^\(.*\) (.*).*$$/\1/p' $(DEBIAN)/changelog) # Get some version info +series := maverick release := $(shell sed -n '1s/^$(src_pkg_name).*(\(.*\)-.*).*$$/\1/p' $(DEBIAN)/changelog) revisions := $(shell sed -n 's/^$(src_pkg_name)\ .*($(release)-\(.*\)).*$$/\1/p' $(DEBIAN)/changelog | tac) revision ?= $(word $(words $(revisions)),$(revisions)) @@ -30,7 +31,7 @@ AUTOBUILD= # LOCAL_ENV_CC="ccache distcc" # LOCAL_ENV_DISTCC_HOSTS="localhost 10.0.2.5 10.0.2.221" # --include $(CURDIR)/../.lucid-env +-include $(CURDIR)/../.$(series)-env ifneq ($(AUTOBUILD),) skipabi = true @@ -53,10 +54,19 @@ endif extraversion=$(shell awk '/EXTRAVERSION =/ { print $$3 }' <Makefile) # +# full_build -- are we doing a full buildd style build +# +ifeq ($(wildcard /CurrentlyBuilding),) +full_build?=false +else +full_build?=true +endif + +# # The debug packages are ginormous, so you probably want to skip # building them (as a developer). # -ifeq ($(wildcard /CurrentlyBuilding),) +ifeq ($(full_build),false) skipdbg=true endif @@ -65,7 +75,7 @@ prev_abinum := $(shell echo $(prev_revision) | sed -e 's/\..*//')$(abi_suffix) abi_release := $(release)-$(abinum) uploadnum := $(shell echo $(revision) | sed -e 's/.*\.//') -ifneq ($(wildcard /CurrentlyBuilding),) +ifneq ($(full_build),false) uploadnum := $(uploadnum)-Ubuntu endif @@ -79,7 +89,7 @@ abidir := $(CURDIR)/$(DEBIAN)/abi/$(release)-$(revision)/$(arch) prev_abidir := $(CURDIR)/$(DEBIAN)/abi/$(release)-$(prev_revision)/$(arch) commonconfdir := $(CURDIR)/$(DEBIAN)/config archconfdir := $(CURDIR)/$(DEBIAN)/config/$(arch) -sharedconfdir := $(CURDIR)/debian/config +sharedconfdir := $(CURDIR)/debian.master/config builddir := $(CURDIR)/debian/build stampdir := $(CURDIR)/debian/stamps @@ -98,7 +108,7 @@ hdrs_pkg_name=linux-headers-$(abi_release) # for developer testing (its kind of slow), so only do it if on a buildd. do_doc_package=true do_doc_package_content=true -ifeq ($(wildcard /CurrentlyBuilding),) +ifeq ($(full_build),false) do_doc_package_content=false endif doc_pkg_name=$(src_pkg_name)-doc @@ -109,7 +119,7 @@ doc_pkg_name=$(src_pkg_name)-doc # do_source_package=true do_source_package_content=true -ifeq ($(wildcard /CurrentlyBuilding),) +ifeq ($(full_build),false) do_source_package_content=false endif diff --git a/debian/rules.d/2-binary-arch.mk b/debian/rules.d/2-binary-arch.mk index 0b2e03d9b9d2..ace4d85eb8a4 100644 --- a/debian/rules.d/2-binary-arch.mk +++ b/debian/rules.d/2-binary-arch.mk @@ -120,6 +120,26 @@ ifeq ($(do_doc_package),true) chmod 644 $(bindoc)/changelog.Debian.old.gz endif +ifneq ($(skipsub),true) + for sub in $($(*)_sub); do \ + if ! (TO=$$sub FROM=$* ABI_RELEASE=$(abi_release) $(SHELL) \ + $(DROOT)/scripts/sub-flavour); then exit 1; fi; \ + /sbin/depmod -b debian/$(bin_pkg_name)-$$sub \ + -ea -F debian/$(bin_pkg_name)-$$sub/boot/System.map-$(abi_release)-$* \ + $(abi_release)-$*; \ + install -d debian/$(bin_pkg_name)-$$sub/DEBIAN; \ + for script in postinst postrm preinst prerm; do \ + sed -e 's/=V/$(abi_release)-$*/g' \ + -e 's/=K/$(install_file)/g' \ + -e 's/=L/$(loader)/g' \ + -e 's@=B@$(build_arch)@g' \ + $(DROOT)/control-scripts/$$script > \ + debian/$(bin_pkg_name)-$$sub/DEBIAN/$$script;\ + chmod 755 debian/$(bin_pkg_name)-$$sub/DEBIAN/$$script;\ + done; \ + done +endif + ifneq ($(skipdbg),true) # Debug image is simple install -m644 -D $(builddir)/build-$*/vmlinux \ @@ -187,7 +207,7 @@ endif $(pkgdir)/lib/modules/$(abi_release)-$*/_ if [ -f $(pkgdir)/lib/modules/$(abi_release)-$*/modules.builtin ] ; then \ mv $(pkgdir)/lib/modules/$(abi_release)-$*/modules.builtin \ - $(pkgdir)/lib/modules/$(abi_release)-$*/_modules.builtin; \ + $(pkgdir)/lib/modules/$(abi_release)-$*/_; \ fi rm -f $(pkgdir)/lib/modules/$(abi_release)-$*/modules.* mv $(pkgdir)/lib/modules/$(abi_release)-$*/_/* \ @@ -265,6 +285,21 @@ binary-%: install-% dh_md5sums -p$(pkghdr) dh_builddeb -p$(pkghdr) +ifneq ($(skipsub),true) + @set -e; for sub in $($(*)_sub); do \ + pkg=$(bin_pkg_name)-$$sub; \ + dh_installchangelogs -p$$pkg; \ + dh_installdocs -p$$pkg; \ + dh_compress -p$$pkg; \ + dh_fixperms -p$$pkg; \ + dh_shlibdeps -p$$pkg; \ + dh_installdeb -p$$pkg; \ + dh_gencontrol -p$$pkg; \ + dh_md5sums -p$$pkg; \ + dh_builddeb -p$$pkg; \ + done +endif + ifneq ($(skipdbg),true) dh_installchangelogs -p$(dbgpkg) dh_installdocs -p$(dbgpkg) diff --git a/debian/scripts/abi-check b/debian/scripts/abi-check index b7df0d89b73a..c7a02c5589af 100755 --- a/debian/scripts/abi-check +++ b/debian/scripts/abi-check @@ -90,7 +90,7 @@ open(NEW, "< $abidir/$flavour") or die "Could not open $abidir/$flavour"; while (<NEW>) { chomp; - m/^(EXPORT_.+)\s(.+)\s(0x[0-9a-f]+)\s(.+)$/; + m/^(\S+)\s(.+)\s(0x[0-9a-f]+)\s(.+)$/; $symbols{$4}{'type'} = $1; $symbols{$4}{'loc'} = $2; $symbols{$4}{'hash'} = $3; @@ -107,7 +107,7 @@ open(OLD, "< $prev_abidir/$flavour") or die "Could not open $prev_abidir/$flavour"; while (<OLD>) { chomp; - m/^(EXPORT_.+)\s(.+)\s(0x[0-9a-f]+)\s(.+)$/; + m/^(\S+)\s(.+)\s(0x[0-9a-f]+)\s(.+)$/; $symbols{$4}{'old_type'} = $1; $symbols{$4}{'old_loc'} = $2; $symbols{$4}{'old_hash'} = $3; diff --git a/debian/scripts/misc/kernelconfig b/debian/scripts/misc/kernelconfig index 3181978b7065..c0bc4847e49b 100755 --- a/debian/scripts/misc/kernelconfig +++ b/debian/scripts/misc/kernelconfig @@ -22,7 +22,7 @@ case "$mode" in esac kerneldir="`pwd`" confdir="$kerneldir/${DEBIAN}/config" -sharedconfdir="$kerneldir/debian/config" +sharedconfdir="$kerneldir/debian.master/config" variant="$2" . $DEBIAN/etc/kernelconfig diff --git a/debian/scripts/sub-flavour b/debian/scripts/sub-flavour new file mode 100644 index 000000000000..c0093a6809e8 --- /dev/null +++ b/debian/scripts/sub-flavour @@ -0,0 +1,67 @@ +#!/bin/bash + +. debian/debian.env + +echo "SUB_PROCESS $FROM => $TO" + +export from_pkg="linux-image-$ABI_RELEASE-$FROM" +export to_pkg="linux-image-$ABI_RELEASE-$TO" + +from_moddir="debian/$from_pkg/lib/modules/$ABI_RELEASE-$FROM" +to_moddir="debian/$to_pkg/lib/modules/$ABI_RELEASE-$FROM" + +install -d "debian/$to_pkg/boot" +install -m644 debian/$from_pkg/boot/{vmlinuz,System.map,config}-$ABI_RELEASE-$FROM \ + debian/$to_pkg/boot/ + +# +# Print some warnings if there are files in the sub-flavours list +# that do not actually exist. +# +cat ${DEBIAN}/sub-flavours/$TO.list | while read line +do +( + cd debian/$from_pkg/lib/modules/$ABI_RELEASE-$FROM/kernel; + # + # If its a wildcard, then check that there are files that match. + # + if echo "$line" | grep '\*' > /dev/null + then + if [ `eval find "$line" -name '*.ko' 2>/dev/null|wc -l` -lt 1 ] + then + echo SUB_INST Warning - No files in $line + fi + # + # Else it should be a single file reference. + # + elif [ ! -f "$line" ] + then + echo SUB_INST Warning - could not find "$line" + fi +) +done + +cat ${DEBIAN}/sub-flavours/$TO.list | while read line; do + ( + cd debian/$from_pkg/lib/modules/$ABI_RELEASE-$FROM/kernel; + if echo "$line" | grep '\*' > /dev/null + then + eval find "$line" -name '*.ko' 2>/dev/null || true + elif [ -f "$line" ] + then + echo "$line" + fi + ); +done | while read mod; do + echo "SUB_INST checking: $mod" + fromdir="/lib/modules/$ABI_RELEASE-$FROM/" + egrep "^($fromdir)?kernel/$mod:" \ + $from_moddir/modules.dep | sed -e "s|^$fromdir||" -e 's/://' -e 's/ /\n/g' | \ + while read m; do + m="${fromdir}$m" + test -f debian/$to_pkg/$m && continue + echo "SUB_INST installing: $m" + install -D -m644 debian/$from_pkg/$m \ + debian/$to_pkg/$m + done +done |