r4609 - in dists/trunk/linux-2.6/debian: . bin templates
Bastian Blank
waldi at costa.debian.org
Sun Oct 23 12:06:49 UTC 2005
Author: waldi
Date: 2005-10-23 12:06:48 +0000 (Sun, 23 Oct 2005)
New Revision: 4609
Added:
dists/trunk/linux-2.6/debian/bin/install-image
Removed:
dists/trunk/linux-2.6/debian/templates/post-install.in
Modified:
dists/trunk/linux-2.6/debian/bin/gencontrol.py
dists/trunk/linux-2.6/debian/bin/install-header
dists/trunk/linux-2.6/debian/rules.real
Log:
* debian/bin/gencontrol.pya: Export kernel-header-dirs as KERNEL_HEADER_DIRS for subarch.
* debian/bin/install-image
- Move from debian/templates/post-install.in.
- Use KERNEL_HEADER_DIRS for asm-directory selection.
* debian/bin/install-header: Remove svn:executable property.
* debian/rules.real: Use debian/bin/install-image.
Modified: dists/trunk/linux-2.6/debian/bin/gencontrol.py
===================================================================
--- dists/trunk/linux-2.6/debian/bin/gencontrol.py 2005-10-23 11:32:53 UTC (rev 4608)
+++ dists/trunk/linux-2.6/debian/bin/gencontrol.py 2005-10-23 12:06:48 UTC (rev 4609)
@@ -426,6 +426,9 @@
makefile.append(("%s-%s-%s:: %s-%s-%s-real" % (i, arch, subarch, i, arch, subarch), None))
makeflags['SUBARCH'] = subarch
+ for i in ('kernel-header-dirs', 'KERNEL_HEADER_DIRS'),:
+ if config_entry.has_key(i[0]):
+ makeflags[i[1]] = config_entry[i[0]]
makeflags_string = ' '.join(["%s='%s'" % i for i in makeflags.iteritems()])
cmds_binary_arch = []
Property changes on: dists/trunk/linux-2.6/debian/bin/install-header
___________________________________________________________________
Name: svn:executable
- *
Copied: dists/trunk/linux-2.6/debian/bin/install-image (from rev 4606, dists/trunk/linux-2.6/debian/templates/post-install.in)
===================================================================
--- dists/trunk/linux-2.6/debian/templates/post-install.in 2005-10-23 11:09:00 UTC (rev 4606)
+++ dists/trunk/linux-2.6/debian/bin/install-image 2005-10-23 12:06:48 UTC (rev 4609)
@@ -0,0 +1,139 @@
+#!/bin/bash
+#
+# This is the hook file executed by make-kpkg in the end of creation
+# of the linux-image for a particular flavour. The major task it performs
+# is the creation of the flavour-specific linux-headers package.
+#
+set -e
+
+debhelper_pre() {
+ dh_clean -k --package="$1"
+ dh_installdirs --package="$1"
+}
+
+debhelper_post() {
+ dh_installdocs --package="$1"
+ dh_installchangelogs --package="$1"
+ dh_compress --package="$1"
+ dh_fixperms --package="$1"
+ dh_strip --package="$1"
+ dh_installdeb --package="$1"
+ dh_gencontrol --package="$1"
+ dh_md5sums --package="$1"
+ dh_builddeb --package="$1"
+}
+# The version which ends up here is something like
+# $(version)-$(abiname)-$(flavour) and debnum is just
+# -$(abiname), so that the variables get the values:
+# suffix=$(flavour)
+# prefix=$(version)-$(abiname)
+# prefix is then used to form a destination directory
+# to link to. For cases with subarch we need to link
+# to linux-headers-$(subarch)-$(version)-$(abiname),
+# not just linux-headers-$(version)-$(abiname).
+#
+prefix="$DEBIAN_VERSION-$DEBIAN_ABINAME"
+pkg="linux-headers-$prefix-$DEBIAN_FLAVOUR"
+top="$PWD/debian/$pkg"
+dir="$top/usr/src/$pkg"
+#
+# Here we need to find the kernel architecture which
+# is appropriate for the current flavour. It is available
+# in kernel-package as KERNEL_ARCH. Cleanest way is to get
+# make-kpkg export it to this script.
+#
+# Currently we just use the fact that in the build directory
+# the symlink include/asm must point to include/asm-${arch}
+#
+arch="$(readlink include/asm)"
+arch="$(basename "${arch}")"
+arch="${arch#asm-}"
+
+debhelper_pre "$pkg"
+
+#
+# Stuff below is ugly as hell, but does the trick so I'm not
+# touching it until we can invent something better.
+#
+mkdir -p "$dir/arch/$arch/kernel"
+mkdir -p "$dir/include/linux"
+cp -a .config "$dir"
+echo "$DEBIAN_VERSION-$DEBIAN_ABINAME-$DEBIAN_FLAVOUR" > "$dir/.extraversion"
+
+cp -a Module.symvers "$dir"
+
+find . -mindepth 1 -maxdepth 1 \
+ ! -name debian -a ! -name Documentation -a ! -name include -a \
+ ! -name DEBIAN -a ! -name scripts -a ! -name arch -a ! -name '.*' -a \( \
+ -name Makefile -o -type d \) \
+ -printf "../linux-headers-$prefix/%f\n" |
+ xargs ln -s --target-directory="$dir"
+
+find "arch/$arch" -mindepth 1 -maxdepth 1 \( \
+ -type d -a ! -name kernel -o \
+ -type f -a \( -name 'Makefile*' -o -name 'Kconfig*' \) \) \
+ -printf "../../../linux-headers-$prefix/%p\n" |
+ xargs ln -s --target-directory="$dir/arch/$arch"
+[ -f "arch/$arch/kernel/asm-offsets.s" ] && ln -f "arch/$arch/kernel/asm-offsets.s" "$dir/arch/$arch/kernel"
+ln -s "../../../../linux-headers-$prefix/arch/$arch/kernel/Makefile" "$dir/arch/$arch/kernel"
+find include -mindepth 1 -maxdepth 1 \
+ ! -name config -a ! -name linux -a ! -name 'asm-*' \
+ -printf "../../linux-headers-$prefix/%p\n" |
+ xargs ln -s --target-directory="$dir/include"
+cp -a include/config "$dir/include"
+
+ln -sf "asm-${arch}" "$dir/include/asm"
+for i in generic $KERNEL_HEADER_DIRS; do
+ mkdir "$dir/include/asm-$i"
+ find "include/asm-$i" -mindepth 1 -maxdepth 1 \
+ \( -type f -a ! -links 2 -o ! -type f \) \
+ -printf "../../../linux-headers-$prefix/%p\n" |
+ xargs --no-run-if-empty ln -s --target-directory="$dir/include/asm-$i"
+ find "include/asm-$i" -mindepth 1 -maxdepth 1 \
+ -type f -links 2 |
+ xargs --no-run-if-empty ln -f --target-directory="$dir/include/asm-$i"
+done
+
+find include/linux -mindepth 1 -maxdepth 1 \
+ ! -name autoconf.h -a ! -name compile.h -a ! -name version.h \
+ -printf "../../../linux-headers-$prefix/%p\n" |
+ xargs ln -s --target-directory="$dir/include/linux"
+cp -a include/linux/autoconf.h include/linux/compile.h \
+ include/linux/version.h "$dir/include/linux"
+
+mkdir -p "$top/lib/modules/$version"
+ln -s "/usr/src/linux-headers-$version" "$top/lib/modules/$version/build"
+
+mkdir -p "$dir/scripts"
+cp scripts/Makefile* "$dir/scripts"
+for i in $(find scripts -type f -perm +111 -o -name "*.sh" -o -name "*.pl"); do
+ mkdir -p "$dir/$(dirname $i)"
+ cp "$i" "$dir/$i"
+done
+
+debhelper_post "$pkg"
+
+#
+# Check whether we should force any modules to be available
+# on the initrd.
+#
+cd "${IMAGE_TOP}/lib/modules/${version}"
+modules='@initrd_modules@'
+if [ -n "${modules}" ]; then
+ mkdir initrd
+ for i in ${modules}; do
+ if [ -f "${i}" ]; then
+ ln "${i}" initrd
+ fi
+ done
+fi
+
+#
+# Clean up the build and source symlinks
+#
+if [ -L build ]; then
+ rm -f build
+fi
+if [ -L source ]; then
+ rm -f source
+fi
Modified: dists/trunk/linux-2.6/debian/rules.real
===================================================================
--- dists/trunk/linux-2.6/debian/rules.real 2005-10-23 11:32:53 UTC (rev 4608)
+++ dists/trunk/linux-2.6/debian/rules.real 2005-10-23 12:06:48 UTC (rev 4609)
@@ -37,7 +37,6 @@
# in Makefile.inc. @flavour@ in the expressions is going to be
# replaced by the flavour for which the command is run.
#
-kpkg_header := HEADER_CLEAN_HOOK='$(CURDIR)/debian/bin/install-header'
kpkg_header += make-kpkg --append-to-version '$(KPKG_ABINAME)'
kpkg_header += --arch '$(ARCH)'
kpkg_header += --stem linux
@@ -80,20 +79,6 @@
setup-flavour: $(STAMPS_DIR)/setup-$(ARCH)-$(SUBARCH)-$(FLAVOUR)
#
-# The way to make the correct package names is to make a
-# subarch-specific post-install script...
-#
-ifdef extra_postinstall_command
- extra_command := $(extra_postinstall_command)
-else
- extra_command := true
-endif
-$(BUILD_DIR)/post-install-$(ARCH)-$(SUBARCH): $(TEMPLATES_DIR)/post-install.in
- sed -e 's, at initrd_modules@,$(initrd_modules),' \
- -e 's, at extra_postinstall_command@,$(extra_command),' \
- -e 's, at headers_dirs@,$(headers_dirs),g' \
- '$<' > '$@'
-#
# Generates the kernel config file for a subarch by merging
# the arch-independent config file (arch/config),
# arch-specific config file (arch/$(karch)/config),
@@ -147,7 +132,7 @@
patches := $(strip $(patches))
$(STAMPS_DIR)/source-$(ARCH)-$(SUBARCH): SOURCE_DIR=$(BUILD_DIR)/source
$(STAMPS_DIR)/source-$(ARCH)-$(SUBARCH): DIR=$(BUILD_DIR)/source-$(ARCH)-$(SUBARCH)
-$(STAMPS_DIR)/source-$(ARCH)-$(SUBARCH): $(BUILD_DIR)/post-install-$(ARCH)-$(SUBARCH) $(STAMPS_DIR)/source
+$(STAMPS_DIR)/source-$(ARCH)-$(SUBARCH): $(STAMPS_DIR)/source
rm -rf '$(DIR)'
cp -al '$(SOURCE_DIR)' '$(DIR)'
mkdir -p '$(DIR)/debian'
@@ -161,7 +146,6 @@
cat "$(CURDIR)/$$patch" | patch -p1; \
done; \
fi
- install '$<' '$(DIR)/debian/post-install'
touch '$@'
#
# This target performs a build for a particular flavour. Note
@@ -232,9 +216,10 @@
install-image-$(ARCH)-$(SUBARCH)-$(FLAVOUR): SOURCE_DIR=$(BUILD_DIR)/build-$(ARCH)-$(SUBARCH)-$(FLAVOUR)
install-image-$(ARCH)-$(SUBARCH)-$(FLAVOUR): DIR=$(BUILD_DIR)/$@
-install-image-$(ARCH)-$(SUBARCH)-$(FLAVOUR): $(STAMPS_DIR)/build-$(ARCH)-$(SUBARCH)-$(FLAVOUR)
+install-image-$(ARCH)-$(SUBARCH)-$(FLAVOUR): $(STAMPS_DIR)/build-$(ARCH)-$(SUBARCH)-$(FLAVOUR) debian/bin/install-image
rm -rf '$(DIR)'
cp -al '$(SOURCE_DIR)' '$(DIR)'
+ install debian/bin/install-image '$(DIR)/debian/post-install'
cd '$(DIR)'; $(setup_env) $(kpkg_image) kernel-image
cat '$(DIR)/debian/files' >> debian/files
@for i in $$(awk '{ print $$1; }' '$(DIR)/debian/files'); do \
@@ -248,7 +233,8 @@
install-header-$(ARCH)-$(SUBARCH): $(STAMPS_DIR)/setup-$(ARCH)-$(SUBARCH)
rm -rf '$(DIR)'
cp -al '$(SOURCE_DIR)' '$(DIR)'
- cd '$(DIR)'; $(setup_env) $(kpkg_header) kernel-headers
+ install debian/bin/install-header '$(DIR)/install-header'
+ cd '$(DIR)'; $(setup_env) HEADER_CLEAN_HOOK='$(CURDIR)/$(DIR)/install-header' $(kpkg_header) kernel-headers
cat '$(DIR)/debian/files' >> debian/files
@for i in $$(awk '{ print $$1; }' '$(DIR)/debian/files'); do \
echo "mv \"$(BUILD_DIR)/$$i\" .."; \
Deleted: dists/trunk/linux-2.6/debian/templates/post-install.in
===================================================================
--- dists/trunk/linux-2.6/debian/templates/post-install.in 2005-10-23 11:32:53 UTC (rev 4608)
+++ dists/trunk/linux-2.6/debian/templates/post-install.in 2005-10-23 12:06:48 UTC (rev 4609)
@@ -1,152 +0,0 @@
-#!/bin/sh
-#
-# This is the hook file executed by make-kpkg in the end of creation
-# of the linux-image for a particular flavour. The major task it performs
-# is the creation of the flavour-specific linux-headers package.
-#
-set -e
-
-debhelper_pre() {
- dh_clean -k --package="$1"
- dh_installdirs --package="$1"
-}
-
-debhelper_post() {
- dh_installdocs --package="$1"
- dh_installchangelogs --package="$1"
- dh_compress --package="$1"
- dh_fixperms --package="$1"
- dh_strip --package="$1"
- dh_installdeb --package="$1"
- dh_gencontrol --package="$1"
- dh_md5sums --package="$1"
- dh_builddeb --package="$1"
-}
-# The version which ends up here is something like
-# $(version)-$(abiname)-$(flavour) and debnum is just
-# -$(abiname), so that the variables get the values:
-# suffix=$(flavour)
-# prefix=$(version)-$(abiname)
-# prefix is then used to form a destination directory
-# to link to. For cases with subarch we need to link
-# to linux-headers-$(subarch)-$(version)-$(abiname),
-# not just linux-headers-$(version)-$(abiname).
-#
-prefix="$DEBIAN_VERSION-$DEBIAN_ABINAME"
-pkg="linux-headers-$prefix-$DEBIAN_FLAVOUR"
-top="$PWD/debian/$pkg"
-dir="$top/usr/src/$pkg"
-#
-# Here we need to find the kernel architecture which
-# is appropriate for the current flavour. It is available
-# in kernel-package as KERNEL_ARCH. Cleanest way is to get
-# make-kpkg export it to this script.
-#
-# Currently we just use the fact that in the build directory
-# the symlink include/asm must point to include/asm-${arch}
-#
-arch="$(readlink include/asm)"
-arch="$(basename "${arch}")"
-arch="${arch#asm-}"
-
-debhelper_pre "$pkg"
-
-#
-# Stuff below is ugly as hell, but does the trick so I'm not
-# touching it until we can invent something better.
-#
-mkdir -p "$dir/arch/$arch/kernel"
-mkdir -p "$dir/include/asm-$arch"
-mkdir -p "$dir/include/linux"
-cp -a .config "$dir"
-echo "$DEBIAN_VERSION-$DEBIAN_ABINAME-$DEBIAN_FLAVOUR" > "$dir/.extraversion"
-
-cp -a Module.symvers "$dir"
-
-find . -mindepth 1 -maxdepth 1 \
- ! -name debian -a ! -name Documentation -a ! -name include -a \
- ! -name DEBIAN -a ! -name scripts -a ! -name arch -a ! -name '.*' -a \( \
- -name Makefile -o -type d \) \
- -printf "../linux-headers-$prefix/%f\n" |
- xargs ln -s --target-directory="$dir"
-
-find "arch/$arch" -mindepth 1 -maxdepth 1 \( \
- -type d -a ! -name kernel -o \
- -type f -a \( -name 'Makefile*' -o -name 'Kconfig*' \) \) \
- -printf "../../../linux-headers-$prefix/%p\n" |
- xargs ln -s --target-directory="$dir/arch/$arch"
-[ -f "arch/$arch/kernel/asm-offsets.s" ] && ln -f "arch/$arch/kernel/asm-offsets.s" "$dir/arch/$arch/kernel"
-ln -s "../../../../linux-headers-$prefix/arch/$arch/kernel/Makefile" "$dir/arch/$arch/kernel"
-find include -mindepth 1 -maxdepth 1 \
- ! -name config -a ! -name linux -a ! -name 'asm-*' \
- -printf "../../linux-headers-$prefix/%p\n" |
- xargs ln -s --target-directory="$dir/include"
-cp -a include/config "$dir/include"
-ln -sf "asm-${arch}" "$dir/include/asm"
-find "include/asm-$arch" -mindepth 1 -maxdepth 1 \
- \( -type f -a ! -links 2 -o ! -type f \) \
- -printf "../../../linux-headers-$prefix/%p\n" |
- xargs --no-run-if-empty ln -s --target-directory="$dir/include/asm-$arch"
-find "include/asm-$arch" -mindepth 1 -maxdepth 1 \
- -type f -links 2 |
- xargs --no-run-if-empty ln -f --target-directory="$dir/include/asm-$arch"
-for i in include/asm-*
-do
- case ${i#include/asm-} in
- $arch)
- ;;
- generic | @headers_dirs@)
- ln -s "../../linux-headers-$prefix/$i" "$dir/$i"
- ;;
- *)
- ;;
- esac
-done
-find include/linux -mindepth 1 -maxdepth 1 \
- ! -name autoconf.h -a ! -name compile.h -a ! -name version.h \
- -printf "../../../linux-headers-$prefix/%p\n" |
- xargs ln -s --target-directory="$dir/include/linux"
-cp -a include/linux/autoconf.h include/linux/compile.h \
- include/linux/version.h "$dir/include/linux"
-
-mkdir -p "$top/lib/modules/$version"
-ln -s "/usr/src/linux-headers-$version" "$top/lib/modules/$version/build"
-
-mkdir -p "$dir/scripts"
-cp scripts/Makefile* "$dir/scripts"
-for i in $(find scripts -type f -perm +111 -o -name "*.sh" -o -name "*.pl"); do
- mkdir -p "$dir/$(dirname $i)"
- cp "$i" "$dir/$i"
-done
-
-debhelper_post "$pkg"
-
-#
-# Check whether we should force any modules to be available
-# on the initrd.
-#
-cd "${IMAGE_TOP}/lib/modules/${version}"
-modules='@initrd_modules@'
-if [ -n "${modules}" ]; then
- mkdir initrd
- for i in ${modules}; do
- if [ -f "${i}" ]; then
- ln "${i}" initrd
- fi
- done
-fi
-
-# Execute any extra post-install command provided by the arch/subarch/flavour
-if [ '@extra_postinstall_command@' ]; then
- @extra_postinstall_command@
-fi
-
-#
-# Clean up the build and source symlinks
-#
-if [ -L build ]; then
- rm -f build
-fi
-if [ -L source ]; then
- rm -f source
-fi
More information about the Kernel-svn-changes
mailing list