From patchwork Tue May 17 17:36:14 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arun Sharma X-Patchwork-Id: 792002 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p4HHboCg004031 for ; Tue, 17 May 2011 17:37:50 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755998Ab1EQRht (ORCPT ); Tue, 17 May 2011 13:37:49 -0400 Received: from outmail009.snc4.facebook.com ([66.220.144.141]:40924 "EHLO mx-out.facebook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755409Ab1EQRhs (ORCPT ); Tue, 17 May 2011 13:37:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; d=fb.com; s=s1024-2011-q2; c=relaxed/simple; q=dns/txt; i=@fb.com; t=1305653868; h=From:Subject:Date:To; bh=52EU0d7xwysz+chZfQW+lnnKkh5exbF/aZ+P2OGBuRg=; b=xb19Y3+Llk11iUFHuQoRc0WkmFF+2OsXaIN+ImfqB0oj6DzUPMq8yCVjLdF3eRQW rhYcU/pG+0FaanN0sK73MKMxl1Nv/a/Tap/xLjGpqiejRIWDdUj32YEUSD/F3w5c qV89+egGsBpAwe9WIWICM5LtyEk/Ie4WsK8P9TAGFDY=; Received: from [10.34.2.198] ([10.34.2.198:45397] helo=mx-out.facebook.com) by 10.30.170.37 (envelope-from ) (ecelerity 2.2.2.45 r(34222M)) with ESMTP id CF/64-13249-C62B2DD4; Tue, 17 May 2011 10:37:48 -0700 Received: from [10.47.65.39] ([10.47.65.39:43102] helo=facebook.com) by mta038.snc4.facebook.com (envelope-from ) (ecelerity 2.2.2.45 r(34222M)) with ESMTP id F9/BE-09928-C62B2DD4; Tue, 17 May 2011 10:37:48 -0700 Received: from dev1756.snc6.facebook.com (localhost.localdomain [127.0.0.1]) by dev1756.snc6.facebook.com (Postfix) with ESMTP id EEDCB9183CF; Tue, 17 May 2011 10:37:47 -0700 (PDT) Received: (from asharma@localhost) by dev1756.snc6.facebook.com (8.13.8/8.13.8/Submit) id p4HHbloE003962; Tue, 17 May 2011 10:37:47 -0700 X-Authentication-Warning: dev1756.snc6.facebook.com: asharma set sender to asharma@fb.com using -f From: Arun Sharma To: Michal Marek , linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Arun Sharma Subject: [PATCH 1/6] kbuild: Integrate with new-kernel-pkg Date: Tue, 17 May 2011 10:36:14 -0700 Message-Id: <1305653779-3445-1-git-send-email-asharma@fb.com> X-Mailer: git-send-email 1.7.4 Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Tue, 17 May 2011 17:37:50 +0000 (UTC) Handles mkinitrd, updating the bootloader among other things. Signed-off-by: Arun Sharma --- scripts/package/mkspec | 13 +++++++++++++ 1 files changed, 13 insertions(+), 0 deletions(-) diff --git a/scripts/package/mkspec b/scripts/package/mkspec index ed8b6a8..b820677 100755 --- a/scripts/package/mkspec +++ b/scripts/package/mkspec @@ -94,6 +94,19 @@ echo 'mv vmlinux.bz2 $RPM_BUILD_ROOT'"/boot/vmlinux-$KERNELRELEASE.bz2" echo 'mv vmlinux.orig vmlinux' echo "%endif" +echo 'rm -rf $RPM_BUILD_ROOT'"/lib/modules/$KERNELRELEASE/{build,source}" +echo "mkdir -p "'$RPM_BUILD_ROOT'"/usr/src/kernels/$KERNELRELEASE" +echo "rsync -avz --exclude '.git/' --exclude '*vmlinux*' --exclude '.*' --exclude '*.o' --exclude '*.so' --exclude '*.ko' . "'$RPM_BUILD_ROOT'"/usr/src/kernels/$KERNELRELEASE/" +echo 'pushd $RPM_BUILD_ROOT'"/lib/modules/$KERNELRELEASE"' && ln -s build source && ln -s '"/usr/src/kernels/$KERNELRELEASE"' build && popd' + +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'