diff mbox

[1/6] kbuild: Integrate with new-kernel-pkg

Message ID 20110525203130.GA29304@dev1756.snc6.facebook.com (mailing list archive)
State New, archived
Headers show

Commit Message

Arun Sharma May 25, 2011, 8:31 p.m. UTC
On Tue, May 17, 2011 at 11:34:17PM +0200, Michal Marek wrote:
> 
> Or use /sbin/installkernel and let distros handle it.

Updated distro specific patch (not expecting you to apply it).
The earlier version was mixed up with kernel-devel patch.

 -Arun

commit cb73fb35a588922344763c075b2fce159df41fc7
Author: Arun Sharma <asharma@fb.com>
Date:   Sun Mar 6 08:08:53 2011 -0800

    kbuild: Integrate with new-kernel-pkg
    
    Handles mkinitrd, updating the bootloader among other things.
    
    Signed-off-by: Arun Sharma <asharma@fb.com>

--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/scripts/package/mkspec b/scripts/package/mkspec
index ed8b6a8..f5f0cb5 100755
--- a/scripts/package/mkspec
+++ b/scripts/package/mkspec
@@ -40,6 +40,8 @@  echo "Source: kernel-$__KERNELRELEASE.tar.gz"
 fi
 
 echo "BuildRoot: %{_tmppath}/%{name}-%{PACKAGE_VERSION}-root"
+echo "Requires(post): /sbin/new-kernel-pkg"
+echo "Requires(preun): /sbin/new-kernel-pkg"
 echo "Provides: $PROVIDES"
 echo "%define __spec_install_post /usr/lib/rpm/brp-compress || :"
 echo "%define debug_package %{nil}"
@@ -95,6 +97,14 @@  echo 'mv vmlinux.orig vmlinux'
 echo "%endif"
 
 echo ""
+echo "%preun"
+echo '/sbin/new-kernel-pkg --rminitrd --rmmoddep --remove '"$KERNELRELEASE"' || exit $?'
+
+echo ""
+echo "%post"
+echo '/sbin/new-kernel-pkg --mkinitrd --depmod --install --make-default '"$KERNELRELEASE"' || exit $?'
+
+echo ""
 echo "%clean"
 echo 'rm -rf $RPM_BUILD_ROOT'
 echo ""