linux-source: Install kernel config files for linux-image packages

The kernel config files used to be uploaded to
http://kernel.alioth.debian.org/config/ or elsewhere, and people
occasionally request them, but we have no infrastructure to
automatically do that and I rarely remember to do it.  These are
presumably wanted as a starting point by people building custom
packages who don't want to download the linux-image package, so
add them to the linux-source-$UPSTREAMVERSION package.

We can already generate all the config files without any
cross-toolchain using the 'setup' target in rules.gen, except that the
'make prepare' command in rules.real will fail.  This command is
unnecessary as 'prepare' is a dependency of any build target we use
in our 'build-arch' rule, so remove it.

svn path=/dists/sid/linux/; revision=20400
This commit is contained in:
Ben Hutchings 2013-07-22 00:02:50 +00:00
parent f64aa6874e
commit 6c6ec64859
3 changed files with 20 additions and 2 deletions

View File

@ -73,10 +73,22 @@ class Gencontrol(Base):
['source_%s_real' % featureset])
makefile.add('source', ['source_%s' % featureset])
triplet_enabled = []
for arch in iter(self.config['base', ]['arches']):
for featureset in self.config['base', arch].get('featuresets', ()):
if self.config.merge('base', None, featureset).get('enabled', True):
for flavour in self.config['base', arch, featureset]['flavours']:
triplet_enabled.append('%s_%s_%s' %
(arch, featureset, flavour))
makeflags = makeflags.copy()
makeflags['ALL_FEATURESETS'] = ' '.join(fs_enabled)
makeflags['ALL_TRIPLETS'] = ' '.join(triplet_enabled)
super(Gencontrol, self).do_main_makefile(makefile, makeflags, extra)
# linux-source-$UPSTREAMVERSION will contain all kconfig files
makefile.add('binary-indep', deps=['setup'])
def do_main_packages(self, packages, vars, makeflags, extra):
packages.extend(self.process_packages(self.templates["control.main"], self.vars))

2
debian/changelog vendored
View File

@ -13,6 +13,8 @@ linux (3.10.1-2) UNRELEASED; urgency=low
* [armhf/armmp] Enable NET_CALXEDA_XGMAC as module (Closes: #717269)
* linux-source: Switch compression of tarball and patch to xz. Disable
compression of package (but use gzip, to keep old tools happy).
* linux-source: Install kernel config files for linux-image packages in
/usr/src/linux-config-$UPSTREAMVERSION directory
-- Arnaud Patard <arnaud.patard@rtp-net.org> Tue, 16 Jul 2013 08:19:29 +0200

8
debian/rules.real vendored
View File

@ -145,7 +145,6 @@ ifdef CFLAGS_KERNEL
endif
+$(MAKE_CLEAN) -C '$(SOURCE_DIR)' O='$(CURDIR)/$(DIR)' V=1 listnewconfig
+yes "" | $(MAKE_CLEAN) -C '$(SOURCE_DIR)' O='$(CURDIR)/$(DIR)' oldconfig >/dev/null
+$(MAKE_CLEAN) -C '$(SOURCE_DIR)' O='$(CURDIR)/$(DIR)' prepare
@$(stamp)
$(STAMPS_DIR)/build_$(ARCH)_$(FEATURESET)_$(FLAVOUR)_$(TYPE): DIR=$(BUILD_DIR)/build_$(ARCH)_$(FEATURESET)_$(FLAVOUR)
@ -495,11 +494,16 @@ install-udeb_$(ARCH):
dh_gencontrol
dh_builddeb
install-source: DH_OPTIONS = -plinux-source-$(VERSION)
install-source: PACKAGE_NAME = linux-source-$(VERSION)
install-source: DH_OPTIONS = -p$(PACKAGE_NAME)
install-source: $(BUILD_DIR)/linux-source-$(UPSTREAMVERSION).tar.xz $(foreach FEATURESET,$(filter-out none,$(ALL_FEATURESETS)),$(BUILD_DIR)/linux-patch-$(UPSTREAMVERSION)-$(FEATURESET).patch.xz)
dh_testdir
dh_testroot
dh_installdirs /usr/src/linux-config-$(UPSTREAMVERSION)
dh_install '$^' /usr/src
for triplet in $(ALL_TRIPLETS); do \
xz -c $(BUILD_DIR)/build_$$triplet/.config >debian/$(PACKAGE_NAME)/usr/src/linux-config-$(UPSTREAMVERSION)/config.$$triplet.xz; \
done
# We don't want to recompress, but -Znone is not compatible with older
# tools and is currently rejected by dak. -Zgzip -z0 has almost the
# same effect.