update general-packaging patch for latest kernel v5.10 changes

This commit is contained in:
5kft 2020-11-30 07:59:23 -08:00
parent 1dd5c1d1d6
commit 301467b172

View File

@ -15,7 +15,7 @@ diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index 1b11f8993..c21d931ea 100755
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -26,29 +26,61 @@ if_enabled_echo() {
@@ -26,31 +26,61 @@
create_package() {
local pname="$1" pdir="$2"
@ -40,7 +40,9 @@ index 1b11f8993..c21d931ea 100755
chmod -R go-w "$pdir"
# in case we are in a restrictive umask environment like 0077
chmod -R a+rX "$pdir"
- # in case we build in a setuid/setgid directory
- chmod -R ug-s "$pdir"
+
+ # Create preinstall and post install script to remove dtb
+ if [ "$3" = "dtb" ]; then
+
@ -77,7 +79,7 @@ index 1b11f8993..c21d931ea 100755
+
+ chmod 775 $pdir/DEBIAN/postinst ; chmod 775 $pdir/DEBIAN/prerm
+ fi
+
# Create the package
dpkg-gencontrol -p$pname -P"$pdir"
- dpkg-deb $dpkg_deb_opts ${KDEB_COMPRESS:+-Z$KDEB_COMPRESS} --build "$pdir" ..
@ -85,7 +87,7 @@ index 1b11f8993..c21d931ea 100755
}
deploy_kernel_headers () {
@@ -60,7 +92,7 @@ deploy_kernel_headers () {
@@ -62,7 +92,7 @@
cd $srctree
find . arch/$SRCARCH -maxdepth 1 -name Makefile\*
find include scripts -type f -o -type l
@ -94,7 +96,7 @@ index 1b11f8993..c21d931ea 100755
find $(find arch/$SRCARCH -name include -o -name scripts -type d) -type f
) > debian/hdrsrcfiles
@@ -105,9 +137,15 @@ deploy_libc_headers () {
@@ -107,9 +137,15 @@
}
version=$KERNELRELEASE
@ -113,7 +115,7 @@ index 1b11f8993..c21d931ea 100755
dbg_packagename=$packagename-dbg
if [ "$ARCH" = "um" ] ; then
@@ -118,6 +156,15 @@ fi
@@ -120,6 +156,15 @@
# XXX: have each arch Makefile export a variable of the canonical image install
# path instead
case $ARCH in
@ -129,7 +131,7 @@ index 1b11f8993..c21d931ea 100755
um)
installed_image_path="usr/bin/linux-$version"
;;
@@ -131,13 +178,17 @@ esac
@@ -133,13 +178,17 @@
BUILD_DEBUG=$(if_enabled_echo CONFIG_DEBUG_INFO Yes)
# Setup the directory structure
@ -149,7 +151,7 @@ index 1b11f8993..c21d931ea 100755
cp System.map "$tmpdir/usr/lib/uml/modules/$version/System.map"
cp $KCONFIG_CONFIG "$tmpdir/usr/share/doc/$packagename/config"
gzip "$tmpdir/usr/share/doc/$packagename/config"
@@ -181,6 +232,21 @@ if is_enabled CONFIG_MODULES; then
@@ -183,6 +232,21 @@
fi
fi
@ -171,7 +173,7 @@ index 1b11f8993..c21d931ea 100755
# Install the maintainer scripts
# Note: hook scripts under /etc/kernel are also executed by official Debian
# kernel packages, as well as kernel packages built using make-kpkg.
@@ -190,7 +256,7 @@ debhookdir=${KDEB_HOOKDIR:-/etc/kernel}
@@ -192,7 +256,7 @@
for script in postinst postrm preinst prerm ; do
mkdir -p "$tmpdir$debhookdir/$script.d"
cat <<EOF > "$tmpdir/DEBIAN/$script"
@ -180,7 +182,7 @@ index 1b11f8993..c21d931ea 100755
set -e
@@ -206,14 +272,72 @@ EOF
@@ -208,14 +272,72 @@
chmod 755 "$tmpdir/DEBIAN/$script"
done