Commit ee81b786 authored by maximilian attems's avatar maximilian attems Committed by Michal Marek

deb-pkg: s/hdr/kernel_headers_/ && s/header/libc_headers_/

hdrpackage and headerpackage are not intuitive names,
use proposed alternatives by Michel Marek.

While touching them move the mkdir of the kernel_headers dir up
and fix it for paranoid umask.

CC: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: default avatarmaximilian attems <max@stro.at>
Signed-off-by: default avatarMichal Marek <mmarek@suse.cz>
parent e6807785
...@@ -76,25 +76,27 @@ else ...@@ -76,25 +76,27 @@ else
fi fi
tmpdir="$objtree/debian/tmp" tmpdir="$objtree/debian/tmp"
fwdir="$objtree/debian/fwtmp" fwdir="$objtree/debian/fwtmp"
hdrdir="$objtree/debian/hdrtmp" kernel_headers_dir="$objtree/debian/hdrtmp"
headerdir="$objtree/debian/headertmp" libc_headers_dir="$objtree/debian/headertmp"
packagename=linux-image-$version packagename=linux-image-$version
fwpackagename=linux-firmware-image fwpackagename=linux-firmware-image
hdrpackagename=linux-headers-$version kernel_headers_packagename=linux-headers-$version
headerpackagename=linux-libc-dev libc_headers_packagename=linux-libc-dev
if [ "$ARCH" = "um" ] ; then if [ "$ARCH" = "um" ] ; then
packagename=user-mode-linux-$version packagename=user-mode-linux-$version
fi fi
# Setup the directory structure # Setup the directory structure
rm -rf "$tmpdir" "$fwdir" "$hdrdir" "$headerdir" rm -rf "$tmpdir" "$fwdir" "$kernel_headers_dir" "$libc_headers_dir"
mkdir -m 755 -p "$tmpdir/DEBIAN" mkdir -m 755 -p "$tmpdir/DEBIAN"
mkdir -p "$tmpdir/lib" "$tmpdir/boot" "$tmpdir/usr/share/doc/$packagename" mkdir -p "$tmpdir/lib" "$tmpdir/boot" "$tmpdir/usr/share/doc/$packagename"
mkdir -m 755 -p "$fwdir/DEBIAN" mkdir -m 755 -p "$fwdir/DEBIAN"
mkdir -p "$fwdir/lib" "$fwdir/usr/share/doc/$fwpackagename" mkdir -p "$fwdir/lib" "$fwdir/usr/share/doc/$fwpackagename"
mkdir -m 755 -p "$headerdir/DEBIAN" mkdir -m 755 -p "$libc_headers_dir/DEBIAN"
mkdir -p "$headerdir/usr/share/doc/$headerpackagename" mkdir -p "$libc_headers_dir/usr/share/doc/$libc_headers_packagename"
mkdir -m 755 -p "$kernel_headers_dir/DEBIAN"
mkdir -p "$kernel_headers_dir/usr/share/doc/$kernel_headers_packagename"
if [ "$ARCH" = "um" ] ; then if [ "$ARCH" = "um" ] ; then
mkdir -p "$tmpdir/usr/lib/uml/modules/$version" "$tmpdir/usr/bin" mkdir -p "$tmpdir/usr/lib/uml/modules/$version" "$tmpdir/usr/bin"
fi fi
...@@ -126,7 +128,7 @@ if grep -q '^CONFIG_MODULES=y' .config ; then ...@@ -126,7 +128,7 @@ if grep -q '^CONFIG_MODULES=y' .config ; then
fi fi
make headers_check make headers_check
make headers_install INSTALL_HDR_PATH="$headerdir/usr" make headers_install INSTALL_HDR_PATH="$libc_headers_dir/usr"
# Install the maintainer scripts # Install the maintainer scripts
# Note: hook scripts under /etc/kernel are also executed by official Debian # Note: hook scripts under /etc/kernel are also executed by official Debian
...@@ -239,8 +241,8 @@ fi ...@@ -239,8 +241,8 @@ fi
find . -name Makefile -o -name Kconfig\* -o -name \*.pl > /tmp/files$$ find . -name Makefile -o -name Kconfig\* -o -name \*.pl > /tmp/files$$
find arch/x86/include include scripts -type f >> /tmp/files$$ find arch/x86/include include scripts -type f >> /tmp/files$$
(cd $objtree; find .config Module.symvers include scripts -type f >> /tmp/objfiles$$) (cd $objtree; find .config Module.symvers include scripts -type f >> /tmp/objfiles$$)
destdir=$hdrdir/usr/src/linux-headers-$version destdir=$kernel_headers_dir/usr/src/linux-headers-$version
mkdir -p "$destdir" "$hdrdir/DEBIAN" "$hdrdir/usr/share/doc/$hdrpackagename" mkdir -p "$destdir"
tar -c -f - -T /tmp/files$$ | (cd $destdir; tar -xf -) tar -c -f - -T /tmp/files$$ | (cd $destdir; tar -xf -)
(cd $objtree; tar -c -f - -T /tmp/objfiles$$) | (cd $destdir; tar -xf -) (cd $objtree; tar -c -f - -T /tmp/objfiles$$) | (cd $destdir; tar -xf -)
rm -f /tmp/files$$ /tmp/objfiles$$ rm -f /tmp/files$$ /tmp/objfiles$$
...@@ -248,7 +250,7 @@ arch=$(dpkg --print-architecture) ...@@ -248,7 +250,7 @@ arch=$(dpkg --print-architecture)
cat <<EOF >> debian/control cat <<EOF >> debian/control
Package: $hdrpackagename Package: $kernel_headers_packagename
Provides: linux-headers, linux-headers-2.6 Provides: linux-headers, linux-headers-2.6
Architecture: $arch Architecture: $arch
Description: Linux kernel headers for $KERNELRELEASE on $arch Description: Linux kernel headers for $KERNELRELEASE on $arch
...@@ -257,7 +259,7 @@ Description: Linux kernel headers for $KERNELRELEASE on $arch ...@@ -257,7 +259,7 @@ Description: Linux kernel headers for $KERNELRELEASE on $arch
This is useful for people who need to build external modules This is useful for people who need to build external modules
EOF EOF
create_package "$hdrpackagename" "$hdrdir" create_package "$kernel_headers_packagename" "$kernel_headers_dir"
# Do we have firmware? Move it out of the way and build it into a package. # Do we have firmware? Move it out of the way and build it into a package.
if [ -e "$tmpdir/lib/firmware" ]; then if [ -e "$tmpdir/lib/firmware" ]; then
...@@ -276,7 +278,7 @@ fi ...@@ -276,7 +278,7 @@ fi
cat <<EOF >> debian/control cat <<EOF >> debian/control
Package: $headerpackagename Package: $libc_headers_packagename
Section: devel Section: devel
Provides: linux-kernel-headers Provides: linux-kernel-headers
Architecture: any Architecture: any
...@@ -285,7 +287,7 @@ Description: Linux support headers for userspace development ...@@ -285,7 +287,7 @@ Description: Linux support headers for userspace development
are used by the installed headers for GNU glibc and other system libraries. are used by the installed headers for GNU glibc and other system libraries.
EOF EOF
create_package "$headerpackagename" "$headerdir" create_package "$libc_headers_packagename" "$libc_headers_dir"
create_package "$packagename" "$tmpdir" create_package "$packagename" "$tmpdir"
exit 0 exit 0
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment