From 677171f23cca0a22d95ebf5fda0ab69d4fca868e Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Fri, 28 Oct 2011 19:02:10 +0000 Subject: [PATCH] debian/bin/gencontrol.py, debian/templates, debian/rules.real: Make ABINAME always include the complete version. svn path=/dists/trunk/linux-2.6/; revision=18192 --- debian/bin/gencontrol.py | 9 ++++++--- debian/rules.real | 20 +++++++++---------- debian/templates/control.headers.arch.in | 6 +++--- .../templates/control.headers.featureset.in | 8 ++++---- debian/templates/control.headers.in | 12 +++++------ debian/templates/control.image-dbg.in | 6 +++--- .../control.image.type-modulesextra.in | 6 +++--- debian/templates/control.image.type-plain.in | 4 ++-- .../control.image.type-standalone.in | 2 +- debian/templates/control.main.in | 4 ++-- debian/templates/control.xen-linux-system.in | 4 ++-- debian/templates/image.xen.postinst.in | 4 ++-- debian/templates/image.xen.prerm.in | 2 +- debian/templates/patch.apply.in | 2 +- 14 files changed, 46 insertions(+), 43 deletions(-) diff --git a/debian/bin/gencontrol.py b/debian/bin/gencontrol.py index c3a8c36c6..4c39f05b7 100755 --- a/debian/bin/gencontrol.py +++ b/debian/bin/gencontrol.py @@ -25,6 +25,7 @@ class Gencontrol(Base): 'VERSION': self.version.linux_version, 'UPSTREAMVERSION': self.version.linux_upstream, 'ABINAME': self.abiname, + 'ABINAME_PART': self.abiname_part, 'SOURCEVERSION': self.version.complete, }) @@ -76,7 +77,7 @@ class Gencontrol(Base): kw_env['KW_CONFIG_DIR'] = installer_dir kw_proc = subprocess.Popen( ['kernel-wedge', 'gen-control', - self.version.linux_upstream + vars['abiname']], + self.abiname], stdout=subprocess.PIPE, env=kw_env) udeb_packages = read_control(kw_proc.stdout) @@ -343,9 +344,11 @@ class Gencontrol(Base): self.versions = versions version = self.version = self.changelog[0].version if self.version.linux_modifier is not None: - self.abiname = '' + self.abiname = self.version.linux_upstream + self.abiname_part = '' else: - self.abiname = '-%s' % self.config['abi',]['abiname'] + self.abiname_part = '-%s' % self.config['abi',]['abiname'] + self.abiname = self.version.linux_upstream + self.abiname_part self.vars = { 'upstreamversion': self.version.linux_upstream, 'version': self.version.linux_version, diff --git a/debian/rules.real b/debian/rules.real index e0b69e981..d64cd2903 100644 --- a/debian/rules.real +++ b/debian/rules.real @@ -32,7 +32,7 @@ ifdef DEBIAN_KERNEL_JOBS JOBS_ARG = -j$(DEBIAN_KERNEL_JOBS) endif -setup_env := env -u ABINAME -u ARCH -u FEATURESET -u FLAVOUR -u VERSION -u LOCALVERSION +setup_env := env -u ABINAME -u ABINAME_PART -u ARCH -u FEATURESET -u FLAVOUR -u VERSION -u LOCALVERSION setup_env += DISTRIBUTION_OFFICIAL_BUILD=1 DISTRIBUTION_UPLOADER=$(UPLOADER) DISTRIBUTION_VERSION="$(SOURCEVERSION)" MAKE_CLEAN = $(setup_env) $(MAKE) @@ -112,7 +112,7 @@ $(STAMPS_DIR)/setup_$(ARCH)_$(FEATURESET)_$(FLAVOUR): $(STAMPS_DIR)/source_$(ARC rm -rf '$(DIR)' mkdir '$(DIR)' cp '$(CONFIG)' '$(DIR)/.config' - echo '$(ABINAME)$(LOCALVERSION_IMAGE)' > '$(DIR)/localversion' + echo '$(ABINAME_PART)$(LOCALVERSION_IMAGE)' > '$(DIR)/localversion' echo 'override ARCH = $(KERNEL_ARCH)' >> '$(DIR)/.kernelvariables' echo 'CCACHE = ccache' >> '$(DIR)/.kernelvariables' echo 'CC = $$(if $$(DEBIAN_KERNEL_USE_CCACHE),$$(CCACHE)) $$(CROSS_COMPILE)$(COMPILER)' >> '$(DIR)/.kernelvariables' @@ -207,14 +207,14 @@ install-manual: $(STAMPS_DIR)/build-doc find $(DIR)/Documentation/DocBook/man/ -name '*.9' | xargs dh_installman +$(MAKE_SELF) install-base -install-headers_$(ARCH): PACKAGE_NAMES = linux-headers-$(UPSTREAMVERSION)$(ABINAME)-all linux-headers-$(UPSTREAMVERSION)$(ABINAME)-all-$(ARCH) +install-headers_$(ARCH): PACKAGE_NAMES = linux-headers-$(ABINAME)-all linux-headers-$(ABINAME)-all-$(ARCH) install-headers_$(ARCH): DH_OPTIONS = $(foreach p, $(PACKAGE_NAMES), -p$(p)) install-headers_$(ARCH): dh_testdir dh_testroot +$(MAKE_SELF) install-base GENCONTROL_ARGS='-Vkernel:Arch=$(ARCH)' -install-headers_$(ARCH)_$(FEATURESET): PACKAGE_NAME = linux-headers-$(UPSTREAMVERSION)$(ABINAME)-common$(LOCALVERSION_HEADERS) +install-headers_$(ARCH)_$(FEATURESET): PACKAGE_NAME = linux-headers-$(ABINAME)-common$(LOCALVERSION_HEADERS) install-headers_$(ARCH)_$(FEATURESET): PACKAGE_NAME_KBUILD = linux-kbuild-$(VERSION) install-headers_$(ARCH)_$(FEATURESET): DH_OPTIONS = -p$(PACKAGE_NAME) install-headers_$(ARCH)_$(FEATURESET): BASE_DIR = /usr/src/$(PACKAGE_NAME) @@ -243,9 +243,9 @@ install-headers_$(ARCH)_$(FEATURESET): $(STAMPS_DIR)/source_$(ARCH)_$(FEATURESET +$(MAKE_SELF) install-base -install-headers_$(ARCH)_$(FEATURESET)_$(FLAVOUR): REAL_VERSION = $(UPSTREAMVERSION)$(ABINAME)$(LOCALVERSION) +install-headers_$(ARCH)_$(FEATURESET)_$(FLAVOUR): REAL_VERSION = $(ABINAME)$(LOCALVERSION) install-headers_$(ARCH)_$(FEATURESET)_$(FLAVOUR): PACKAGE_NAME = linux-headers-$(REAL_VERSION) -install-headers_$(ARCH)_$(FEATURESET)_$(FLAVOUR): PACKAGE_NAME_COMMON = linux-headers-$(UPSTREAMVERSION)$(ABINAME)-common$(LOCALVERSION_HEADERS) +install-headers_$(ARCH)_$(FEATURESET)_$(FLAVOUR): PACKAGE_NAME_COMMON = linux-headers-$(ABINAME)-common$(LOCALVERSION_HEADERS) install-headers_$(ARCH)_$(FEATURESET)_$(FLAVOUR): PACKAGE_NAME_KBUILD = linux-kbuild-$(VERSION) install-headers_$(ARCH)_$(FEATURESET)_$(FLAVOUR): DH_OPTIONS = -p$(PACKAGE_NAME) install-headers_$(ARCH)_$(FEATURESET)_$(FLAVOUR): BASE_DIR = /usr/src/$(PACKAGE_NAME) @@ -321,7 +321,7 @@ install-libc-dev_$(ARCH): +$(MAKE_SELF) install-base -install-support: PACKAGE_NAME = linux-support-$(UPSTREAMVERSION)$(ABINAME) +install-support: PACKAGE_NAME = linux-support-$(ABINAME) install-support: DH_OPTIONS = -p$(PACKAGE_NAME) install-support: PACKAGE_DIR = debian/$(PACKAGE_NAME) install-support: PACKAGE_ROOT = /usr/share/$(PACKAGE_NAME) @@ -338,7 +338,7 @@ install-support: dh_link $(PACKAGE_ROOT) /usr/src/$(PACKAGE_NAME) +$(MAKE_SELF) install-base -install-image_$(ARCH)_$(FEATURESET)_$(FLAVOUR)_$(TYPE): REAL_VERSION = $(UPSTREAMVERSION)$(ABINAME)$(LOCALVERSION) +install-image_$(ARCH)_$(FEATURESET)_$(FLAVOUR)_$(TYPE): REAL_VERSION = $(ABINAME)$(LOCALVERSION) install-image_$(ARCH)_$(FEATURESET)_$(FLAVOUR)_$(TYPE): PACKAGE_NAME = linux-image-$(REAL_VERSION) install-image_$(ARCH)_$(FEATURESET)_$(FLAVOUR)_$(TYPE): PACKAGE_DIR = debian/$(PACKAGE_NAME) install-image_$(ARCH)_$(FEATURESET)_$(FLAVOUR)_$(TYPE): INSTALL_DIR = $(PACKAGE_DIR)/boot @@ -477,7 +477,7 @@ install-image_$(ARCH)_$(FEATURESET)_$(FLAVOUR)_plain-xen: echo /var/lib/$(PACKAGE_NAME)/xen-versions >> $(PACKAGE_DIR)/DEBIAN/conffiles +$(MAKE_SELF) install-base DH_OPTIONS='-p$(PACKAGE_NAME) -p$(MODULES_PACKAGE_NAME)' -install-image-dbg_$(ARCH)_$(FEATURESET)_$(FLAVOUR): REAL_VERSION = $(UPSTREAMVERSION)$(ABINAME)$(LOCALVERSION) +install-image-dbg_$(ARCH)_$(FEATURESET)_$(FLAVOUR): REAL_VERSION = $(ABINAME)$(LOCALVERSION) install-image-dbg_$(ARCH)_$(FEATURESET)_$(FLAVOUR): PACKAGE_NAME = linux-image-$(REAL_VERSION)-dbg install-image-dbg_$(ARCH)_$(FEATURESET)_$(FLAVOUR): PACKAGE_DIR = debian/$(PACKAGE_NAME) install-image-dbg_$(ARCH)_$(FEATURESET)_$(FLAVOUR): DEBUG_DIR = $(PACKAGE_DIR)/usr/lib/debug @@ -504,7 +504,7 @@ install-udeb_$(ARCH): DH_OPTIONS=$(PACKAGE_NAMES:%=-p%) install-udeb_$(ARCH): dh_testdir dh_prep - kernel-wedge install-files $(UPSTREAMVERSION)$(ABINAME) + kernel-wedge install-files $(ABINAME) kernel-wedge check $(PACKAGE_NAMES) dh_fixperms dh_gencontrol diff --git a/debian/templates/control.headers.arch.in b/debian/templates/control.headers.arch.in index 129021923..d209d9611 100644 --- a/debian/templates/control.headers.arch.in +++ b/debian/templates/control.headers.arch.in @@ -1,11 +1,11 @@ -Package: linux-headers-@upstreamversion@@abiname@-all -Depends: linux-headers-@upstreamversion@@abiname@-all-${kernel:Arch} (= ${binary:Version}), ${misc:Depends} +Package: linux-headers-@abiname@-all +Depends: linux-headers-@abiname@-all-${kernel:Arch} (= ${binary:Version}), ${misc:Depends} Description: All header files for Linux @version@ (meta-package) This package depends against all architecture-specific kernel header files for Linux kernel version @upstreamversion@, generally used for building out-of-tree kernel modules. -Package: linux-headers-@upstreamversion@@abiname@-all-@arch@ +Package: linux-headers-@abiname@-all-@arch@ Depends: ${misc:Depends} Description: All header files for Linux @version@ (meta-package) This package depends against all architecture-specific kernel header files diff --git a/debian/templates/control.headers.featureset.in b/debian/templates/control.headers.featureset.in index 0722c3b37..d3f9dfd63 100644 --- a/debian/templates/control.headers.featureset.in +++ b/debian/templates/control.headers.featureset.in @@ -1,8 +1,8 @@ -Package: linux-headers-@upstreamversion@@abiname@-common@localversion_headers@ +Package: linux-headers-@abiname@-common@localversion_headers@ Depends: ${misc:Depends} -Description: Common header files for Linux @upstreamversion@@abiname@@localversion_headers@ +Description: Common header files for Linux @abiname@@localversion_headers@ This package provides the architecture-specific common kernel header files - for Linux kernel version @upstreamversion@@abiname@@localversion_headers@, generally used for building out-of-tree + for Linux kernel version @abiname@@localversion_headers@, generally used for building out-of-tree kernel modules. To obtain a complete set of headers you also need to install - the linux-headers-@upstreamversion@@abiname@-(flavour) package, matching the + the linux-headers-@abiname@-(flavour) package, matching the flavour of the kernel you intend the build for. diff --git a/debian/templates/control.headers.in b/debian/templates/control.headers.in index cec8fe089..1062709a7 100644 --- a/debian/templates/control.headers.in +++ b/debian/templates/control.headers.in @@ -1,10 +1,10 @@ -Package: linux-headers-@upstreamversion@@abiname@@localversion@ -Depends: linux-headers-@upstreamversion@@abiname@-common@localversion_headers@ (= ${binary:Version}), linux-kbuild-@version@, ${misc:Depends} +Package: linux-headers-@abiname@@localversion@ +Depends: linux-headers-@abiname@-common@localversion_headers@ (= ${binary:Version}), linux-kbuild-@version@, ${misc:Depends} Provides: linux-headers -Description: Header files for Linux @upstreamversion@@abiname@@localversion@ +Description: Header files for Linux @abiname@@localversion@ This package provides the architecture-specific kernel header files - for Linux kernel @upstreamversion@@abiname@@localversion@, generally + for Linux kernel @abiname@@localversion@, generally used for building out-of-tree kernel modules. These files are going to be - installed into /usr/src/linux-headers-@upstreamversion@@abiname@@localversion@, and can + installed into /usr/src/linux-headers-@abiname@@localversion@, and can be used for building modules that load into the kernel provided by the - linux-image-@upstreamversion@@abiname@@localversion@ package. + linux-image-@abiname@@localversion@ package. diff --git a/debian/templates/control.image-dbg.in b/debian/templates/control.image-dbg.in index 158f14ec0..932721096 100644 --- a/debian/templates/control.image-dbg.in +++ b/debian/templates/control.image-dbg.in @@ -1,7 +1,7 @@ -Package: linux-image-@upstreamversion@@abiname@@localversion@-dbg -Depends: linux-image-@upstreamversion@@abiname@@localversion@, ${misc:Depends} +Package: linux-image-@abiname@@localversion@-dbg +Depends: linux-image-@abiname@@localversion@, ${misc:Depends} Section: debug Priority: extra -Description: Debugging infos for Linux @upstreamversion@@abiname@@localversion@ +Description: Debugging infos for Linux @abiname@@localversion@ This package provides the binary debug image and pre-built debug loadable modules for Linux kernel @upstreamversion@ on @longclass@ machines. diff --git a/debian/templates/control.image.type-modulesextra.in b/debian/templates/control.image.type-modulesextra.in index 99b395692..59707d3c1 100644 --- a/debian/templates/control.image.type-modulesextra.in +++ b/debian/templates/control.image.type-modulesextra.in @@ -1,11 +1,11 @@ -Package: linux-image-@upstreamversion@@abiname@@localversion@ +Package: linux-image-@abiname@@localversion@ Provides: linux-image -Depends: linux-modules-@upstreamversion@@abiname@@localversion@ (= ${binary:Version}), ${misc:Depends} +Depends: linux-modules-@abiname@@localversion@ (= ${binary:Version}), ${misc:Depends} Suggests: linux-doc-@version@ Description: Linux @upstreamversion@ for @class@ The Linux kernel @upstreamversion@ for use on @longclass@. -Package: linux-modules-@upstreamversion@@abiname@@localversion@ +Package: linux-modules-@abiname@@localversion@ Depends: module-init-tools, ${misc:Depends} Description: Linux @upstreamversion@ modules for @class@ Modules for Linux kernel @upstreamversion@ for use on @longclass@. diff --git a/debian/templates/control.image.type-plain.in b/debian/templates/control.image.type-plain.in index 7e8a95371..7db2ceffb 100644 --- a/debian/templates/control.image.type-plain.in +++ b/debian/templates/control.image.type-plain.in @@ -1,5 +1,5 @@ -Package: linux-image-@upstreamversion@@abiname@@localversion@ -Provides: linux-image, linux-modules-@upstreamversion@@abiname@@localversion@ +Package: linux-image-@abiname@@localversion@ +Provides: linux-image, linux-modules-@abiname@@localversion@ Pre-Depends: debconf | debconf-2.0 Depends: module-init-tools, linux-base (>= 3~), ${shlibs:Depends}, ${misc:Depends} Recommends: firmware-linux-free (>= 3~) diff --git a/debian/templates/control.image.type-standalone.in b/debian/templates/control.image.type-standalone.in index 38bd31c78..4e3a6e844 100644 --- a/debian/templates/control.image.type-standalone.in +++ b/debian/templates/control.image.type-standalone.in @@ -1,4 +1,4 @@ -Package: linux-image-@upstreamversion@@abiname@@localversion@ +Package: linux-image-@abiname@@localversion@ Provides: linux-image Suggests: linux-doc-@version@ Depends: ${shlibs:Depends}, ${misc:Depends} diff --git a/debian/templates/control.main.in b/debian/templates/control.main.in index b082defdc..63dfe8b81 100644 --- a/debian/templates/control.main.in +++ b/debian/templates/control.main.in @@ -55,7 +55,7 @@ Description: Linux kernel API manual pages for version @version@ Package: linux-patch-debian-@version@ Architecture: all -Depends: bzip2, linux-support-@upstreamversion@@abiname@, python, ${misc:Depends} +Depends: bzip2, linux-support-@abiname@, python, ${misc:Depends} Suggests: linux-source-@version@ Description: Debian patches to version @version@ of the Linux kernel This package includes the patches used to produce the prepackaged @@ -66,7 +66,7 @@ Description: Debian patches to version @version@ of the Linux kernel Linux @version@ kernel but only against the kernel tarball @source_package@_@source_upstream@.orig.tar.gz from the Debian archive. -Package: linux-support-@upstreamversion@@abiname@ +Package: linux-support-@abiname@ Architecture: all Section: devel Depends: ${python:Depends}, ${misc:Depends} diff --git a/debian/templates/control.xen-linux-system.in b/debian/templates/control.xen-linux-system.in index b3712f053..8b5ffb561 100644 --- a/debian/templates/control.xen-linux-system.in +++ b/debian/templates/control.xen-linux-system.in @@ -1,5 +1,5 @@ -Package: xen-linux-system-@upstreamversion@@abiname@@localversion@ -Depends: linux-image-@upstreamversion@@abiname@@localversion@ (= ${binary:Version}), ${misc:Depends} +Package: xen-linux-system-@abiname@@localversion@ +Depends: linux-image-@abiname@@localversion@ (= ${binary:Version}), ${misc:Depends} Description: Xen system with Linux @upstreamversion@ on @class@ (meta-package) This package depends on the binary Linux image and hypervisors. diff --git a/debian/templates/image.xen.postinst.in b/debian/templates/image.xen.postinst.in index 5b6e8b1ed..7f7337b72 100644 --- a/debian/templates/image.xen.postinst.in +++ b/debian/templates/image.xen.postinst.in @@ -5,9 +5,9 @@ set -e case "$1" in configure) if [ "$2" ]; then - update-initramfs -u -k @upstreamversion@@abiname@@localversion@ + update-initramfs -u -k @abiname@@localversion@ else - update-initramfs -c -t -k @upstreamversion@@abiname@@localversion@ + update-initramfs -c -t -k @abiname@@localversion@ command -v update-grub > /dev/null && update-grub fi ;; diff --git a/debian/templates/image.xen.prerm.in b/debian/templates/image.xen.prerm.in index afeecaa7e..da10dcedb 100644 --- a/debian/templates/image.xen.prerm.in +++ b/debian/templates/image.xen.prerm.in @@ -4,7 +4,7 @@ set -e case "$1" in remove) - update-initramfs -d -k @upstreamversion@@abiname@@localversion@ || true + update-initramfs -d -k @abiname@@localversion@ || true ;; upgrade|deconfigure|failed-upgrade) diff --git a/debian/templates/patch.apply.in b/debian/templates/patch.apply.in index 19ded00cc..10e0b78a8 100644 --- a/debian/templates/patch.apply.in +++ b/debian/templates/patch.apply.in @@ -3,7 +3,7 @@ import os, os.path, re, sys from warnings import warn -sys.path.append("/usr/share/linux-support-@linux_upstream@@abiname@/lib/python") +sys.path.append("/usr/share/linux-support-@abiname@/lib/python") from debian_linux.patches import PatchSeries, PatchSeriesList