From patchwork Sat Sep 30 01:10:03 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 114526 Delivered-To: patch@linaro.org Received: by 10.140.104.133 with SMTP id a5csp1414815qgf; Fri, 29 Sep 2017 18:11:15 -0700 (PDT) X-Google-Smtp-Source: AOwi7QBOAKOOF4dZItzAxgkKOihk9MnBU9MZsSdefBritgG4v52WozMi9w+VOQlen9FOPETsCvr6 X-Received: by 10.98.31.80 with SMTP id f77mr840199pff.7.1506733875859; Fri, 29 Sep 2017 18:11:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1506733875; cv=none; d=google.com; s=arc-20160816; b=lRjSp6FQmMi4/uzz741QhtPAUWeZw5jcjqGjUcfhpXKOIc4ZxNJTJNUyRMFyyeG8p0 Z/FzUTVtWP4usa0gevc1r0Z38Z7BJO+tv2tDLmZCMHigDxkRiljSUWqwr4PN0z6i97OD Wxadt+LtLEH+Y/iGpGHAk6Ab0EVGQ5zsyA9ctHM71AjNwvXckd3BLpNKw1pMzQEeROyJ Muer7RiPNtgQlyDLwh5AqhUcSdX7xwDFONa4ftbI89WVkMbObYWoJXgug4FRSJ3JHTf/ aiHMxuIn6y5U+LL+2yBYVBuMmx6qV3xtp17cNIi0FS1uNHtHAePO93x7F9F8TKX0qWOp pUjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:dkim-filter:arc-authentication-results; bh=yUREH0llxdcMYM3WOKGZEadE9mMFawhrMvVI5I41wFY=; b=P75G7Ol0RilUDk5XmmmtfrtbgR+6Ehc02k49emFN+8Ip2c4saBknwE+2t+YiVlYk/Q pUSBF5w77QaSyPP9oLpc9HDjI7gXVmB2sPmXS9weZkF619WFNur3CeUhH5w0FrIbD8nI zPxbM7ftYJL6OPzQVe1AMVNwUT5LF8M74la3Kp9JiJ36Qcu6kAbmsG+PANdKDGzmWC1q FW93WRiqWJjMrijL9cIj1sAuW9Txj5wuOHMLzLVsW9XzKyr38yoeo/y/Kzzb6OQ5/igb oW+88Til1x31hbkj14xt+yPzimjxoRCjLpQ2tsxonXIVmVxTDaP8hOL6J751Aw3UOjHS Ms5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=zBNijJ9u; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e22si4020075pgn.561.2017.09.29.18.11.15; Fri, 29 Sep 2017 18:11:15 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=zBNijJ9u; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752686AbdI3BLN (ORCPT + 26 others); Fri, 29 Sep 2017 21:11:13 -0400 Received: from conuserg-07.nifty.com ([210.131.2.74]:25324 "EHLO conuserg-07.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752732AbdI3BKf (ORCPT ); Fri, 29 Sep 2017 21:10:35 -0400 Received: from grover.sesame (FL1-122-131-185-176.osk.mesh.ad.jp [122.131.185.176]) (authenticated) by conuserg-07.nifty.com with ESMTP id v8U1AOK5030198; Sat, 30 Sep 2017 10:10:24 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-07.nifty.com v8U1AOK5030198 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1506733824; bh=yUREH0llxdcMYM3WOKGZEadE9mMFawhrMvVI5I41wFY=; h=From:To:Cc:Subject:Date:From; b=zBNijJ9uZ10k3YP/TCMXI/qUHXAMlwyrC4zh/sy2Nk1HxtnchV3caLzbuoNpITiC3 pJguAtDGJCEihPA7qOTgIaVr/vx272fzxl6m2+TJ20YCbv+Shwww8bLhn0HaBHQoKr qWOSrWiAMyhT1zwjSwsHuFJ/l/5epYdvj/QCD0dLJH3F2PhY/KvSnlpnq+LA7C8xt/ K8eXNjaaB3/tTpYq4oO82jRKg+kyFwWwZoVHOIWMh6+6uMZpz8XtuR3WWZiVlYpR8B oNKRZZDSSPq3PXGLSJghHMOTm7WnDv7A7icGgJvSD4EAhfp8TSHLcFb8DxO8hITsmu qwfNhsWQJjgSQ== X-Nifty-SrcIP: [122.131.185.176] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Masahiro Yamada , Michal Marek , linux-kernel@vger.kernel.org Subject: [PATCH 1/9] kbuild: rpm-pkg: remove ppc64 specific image handling Date: Sat, 30 Sep 2017 10:10:03 +0900 Message-Id: <1506733811-24636-1-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This conditional was added by commit 1a0f3d422bb9 ("kbuild: fix make rpm for powerpc"). Its git-log explains the default kernel image is zImage, but obviously the current arch/powerpc/Makefile does not set KBUILD_IMAGE, so the image file is actually vmlinux. Moreover, since commit 09549aa1baa9 ("deb-pkg: Remove the KBUILD_IMAGE workaround"), all architectures are supposed to set the full path to the image in KBUILD_IMAGE. I see no good reason to differentiate ppc64 from others. Rip off the conditional. Signed-off-by: Masahiro Yamada --- scripts/package/mkspec | 5 ----- 1 file changed, 5 deletions(-) -- 2.7.4 diff --git a/scripts/package/mkspec b/scripts/package/mkspec index f47f17a..ef00750 100755 --- a/scripts/package/mkspec +++ b/scripts/package/mkspec @@ -92,13 +92,8 @@ echo "%ifarch ia64" echo 'cp $KBUILD_IMAGE $RPM_BUILD_ROOT'"/boot/efi/vmlinuz-$KERNELRELEASE" echo 'ln -s '"efi/vmlinuz-$KERNELRELEASE" '$RPM_BUILD_ROOT'"/boot/" echo "%else" -echo "%ifarch ppc64" -echo "cp vmlinux arch/powerpc/boot" -echo "cp arch/powerpc/boot/"'$KBUILD_IMAGE $RPM_BUILD_ROOT'"/boot/vmlinuz-$KERNELRELEASE" -echo "%else" echo 'cp $KBUILD_IMAGE $RPM_BUILD_ROOT'"/boot/vmlinuz-$KERNELRELEASE" echo "%endif" -echo "%endif" echo 'make %{?_smp_mflags} INSTALL_HDR_PATH=$RPM_BUILD_ROOT/usr KBUILD_SRC= headers_install' echo 'cp System.map $RPM_BUILD_ROOT'"/boot/System.map-$KERNELRELEASE" From patchwork Sat Sep 30 01:10:04 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 114531 Delivered-To: patch@linaro.org Received: by 10.140.104.133 with SMTP id a5csp1415421qgf; Fri, 29 Sep 2017 18:12:15 -0700 (PDT) X-Google-Smtp-Source: AOwi7QCVhV0lwKfzAwuYk0DL/CGZUk1Rp+RdkFMbVetP+a+fMPBGjex9rQjS5sL6ideBlDPML+UM X-Received: by 10.101.87.202 with SMTP id q10mr2276174pgr.141.1506733935737; Fri, 29 Sep 2017 18:12:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1506733935; cv=none; d=google.com; s=arc-20160816; b=urRxRorn4//SUPz1nDeDDlVl4qcAcO//qHegc7iWdZaOqysH8IEOQSZNe/lsvTJJL6 uWA6bzpi/4NbgU8Ge6Ah8HIe7EnFQx2/elfLq7CZTRl4R9rQuoRh1LPP4AyQ+K9Y9LLV UHF7J9sj3Txu79KQJrprsFS1A9r+d6ZvpHKGX1CCOx91d/WK1pQrfweFN/hgV4ItMNz2 k858eBe0MrmoNwEctJxrcOxLhFctsuQegtzb5+ykQfePuvLUCFE1vCeNS058p2BMdzpU HOnOcvgldR31+ExzZqJeB4R5m20+26+VS+LZVH9hCc1DXA3DTwb3oreAKb5ppFEOVye8 4wdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter :arc-authentication-results; bh=s7LUqxWmyygwa4Y8ouLLrECjCCPpaLPpPnIGKbVGGBs=; b=qz+hIriML7qUXTvNQCY3XEswwqjtrWzGj8NpVfCGrLgcN4wbM3qpXnWhck6b4TXc0o xNKnIwp4nRMjOOqhWVd3eNPjUhny18LTgIIbh+0KlkEzyew4+0sYDjhcQo1Kmsec/mTX mGbvJUWrJCA6KbQaZG+rn9kACjSJUr6va+3mgosCJj/hFnugavDM3B5k3DcLt+OB0NAC D/6bcZn2PbxU+wmw39z9XDjwyHbiBG2NPFzcPbsCRztZ0v3UZZAfRx2qV9Z68r4rpx1y /+Vk+oui+RoDTr+uzmEWZJk9Cv0Edi1CgjMJ6dYgdw/rTpkBGlIkqk5gOSftxSEFkLnI MCHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=xRUMrN9h; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 68si4124683pla.106.2017.09.29.18.12.15; Fri, 29 Sep 2017 18:12:15 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=xRUMrN9h; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752687AbdI3BMB (ORCPT + 26 others); Fri, 29 Sep 2017 21:12:01 -0400 Received: from conuserg-07.nifty.com ([210.131.2.74]:25315 "EHLO conuserg-07.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752727AbdI3BKf (ORCPT ); Fri, 29 Sep 2017 21:10:35 -0400 Received: from grover.sesame (FL1-122-131-185-176.osk.mesh.ad.jp [122.131.185.176]) (authenticated) by conuserg-07.nifty.com with ESMTP id v8U1AOK6030198; Sat, 30 Sep 2017 10:10:25 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-07.nifty.com v8U1AOK6030198 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1506733825; bh=s7LUqxWmyygwa4Y8ouLLrECjCCPpaLPpPnIGKbVGGBs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=xRUMrN9hwn2X3u6/iRxstLvI0sH4rh8aEXryLz7l9wtpJWmVNNx/z+CRHmQOL4F6I XFfQAj/DxCTIICnHhM6KKybBYekOxCqeA2cwPhdk7/VjUv/0fO5x+jIGGbzueZE8UF 6kjPtDH55huaioq162H4tuDRmpm/wmhTaszGO+F3cBmlJAJYQr4WlH195QLETTfx/D 9aFgBfAF0WUn77AvGQmDJk8sR75t5o7/8kttQ2wJ3T2p+/HSs0nTZXxF+Godae94FB 8+NBuffBV/XhVCwdJjfRuaQPkEN0rfN9nY0TJ8MTntmSlrfBE2COmKdYBrThQHU2fn C1QxzsuM4O+dw== X-Nifty-SrcIP: [122.131.185.176] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Masahiro Yamada , Michal Marek , linux-kernel@vger.kernel.org Subject: [PATCH 2/9] kbuild: rpm-pkg: install vmlinux.bz2 unconditionally Date: Sat, 30 Sep 2017 10:10:04 +0900 Message-Id: <1506733811-24636-2-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1506733811-24636-1-git-send-email-yamada.masahiro@socionext.com> References: <1506733811-24636-1-git-send-email-yamada.masahiro@socionext.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This conditional was added by commit fc370ecfdb37 ("kbuild: add vmlinux to kernel rpm"). Its git-log mentioned vmlinux.bz2 was necessary for debugging, but did not explain why ppc64 was an exception. I see no problem to copy vmlinux.bz2 all the time. Signed-off-by: Masahiro Yamada --- scripts/package/mkspec | 3 --- 1 file changed, 3 deletions(-) -- 2.7.4 diff --git a/scripts/package/mkspec b/scripts/package/mkspec index ef00750..a026c08 100755 --- a/scripts/package/mkspec +++ b/scripts/package/mkspec @@ -99,11 +99,8 @@ echo 'make %{?_smp_mflags} INSTALL_HDR_PATH=$RPM_BUILD_ROOT/usr KBUILD_SRC= head echo 'cp System.map $RPM_BUILD_ROOT'"/boot/System.map-$KERNELRELEASE" echo 'cp .config $RPM_BUILD_ROOT'"/boot/config-$KERNELRELEASE" - -echo "%ifnarch ppc64" echo 'bzip2 -9 --keep vmlinux' echo 'mv vmlinux.bz2 $RPM_BUILD_ROOT'"/boot/vmlinux-$KERNELRELEASE.bz2" -echo "%endif" if ! $PREBUILT; then echo 'rm -f $RPM_BUILD_ROOT'"/lib/modules/$KERNELRELEASE/build" From patchwork Sat Sep 30 01:10:05 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 114530 Delivered-To: patch@linaro.org Received: by 10.140.104.133 with SMTP id a5csp1415302qgf; Fri, 29 Sep 2017 18:12:04 -0700 (PDT) X-Google-Smtp-Source: AOwi7QC856VSRMS2GWxKHNVQ5+ithmPycSfOtxImEaW1OnQu7/5N0y3cd5rhghk7mdc66NG7/szL X-Received: by 10.98.204.157 with SMTP id j29mr9437627pfk.100.1506733924484; Fri, 29 Sep 2017 18:12:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1506733924; cv=none; d=google.com; s=arc-20160816; b=byk5tgAMdxogzlwiNiW7aa+rg6TDK8asrMAs86DcOVTFnaS2PFV9Xal+oN21zn+ABu KbvM3jcBLmIq0T+UnTTrJwK2fZApxso88Fc0jft/BitrDqOYpNid798Glxw9VJ7g01mg 3pqpEd+IGA8Rs69b9d6wH7rwB4iLcn/31wXq9OSIt6D7RStXGCYNX05rsmTOVcxH/Xov 2d7IiPDQbB19UWPVgAceGnkn4NzdBPcXEPUwAh/LHKk2FAvvHNRqOD7zFFWZjDKnHd1O fVv0qk9M8/Vj54vCaRFKy22AMyDXBoBaNFB9mwHBIOQprDyYUIKuycp9BlAF3SGGbFBe O+Yw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter :arc-authentication-results; bh=7y6SYGQyVyohvLkfWG7dhfkBMn/pCsMWpkE07ip23VM=; b=lSda3oQjiJJ0djV7+trAuGnBETnFhVfyLmCGGL7FNRxbETc7l3P8o60M7WDrigeODe m5Fnd3P6kr/eXac8c3+1PU8kygt1llRxD5zNwdnFodFcNK+btPIjqW1mBEGhzGdM0wlB bir7V+cM7pT+P8DAzL1q9pUSY/8epqqGjIOqQGkAzRuSe2fjm87W8ib2qYVdG59VTBcy qCNZOGPd6Hrr1v8HYuHG4NBeXiZPG54whI1I+MxtmfbRTBBR3BUXSskp/rRurHAXNqbC WCztLoOTIbXcstpb1bkzrKKkUs5sbMVQwkDr2T+pY8J/sscrZKEOwic3nv+5MrQw/qbq Oqyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=JW46DLIt; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b11si4208362pls.503.2017.09.29.18.12.04; Fri, 29 Sep 2017 18:12:04 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=JW46DLIt; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752866AbdI3BMC (ORCPT + 26 others); Fri, 29 Sep 2017 21:12:02 -0400 Received: from conuserg-07.nifty.com ([210.131.2.74]:25305 "EHLO conuserg-07.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752627AbdI3BKf (ORCPT ); Fri, 29 Sep 2017 21:10:35 -0400 Received: from grover.sesame (FL1-122-131-185-176.osk.mesh.ad.jp [122.131.185.176]) (authenticated) by conuserg-07.nifty.com with ESMTP id v8U1AOK7030198; Sat, 30 Sep 2017 10:10:25 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-07.nifty.com v8U1AOK7030198 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1506733825; bh=7y6SYGQyVyohvLkfWG7dhfkBMn/pCsMWpkE07ip23VM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JW46DLIthJusLyVczVMWS4wpzJ+Tv8sipvAiPHOw0QOzWODcYckB01eREgUtnFU7r Uk9hYEKFXOR3EA/+YVQwiq8HrycuuSSf4+7yK4QJxLT26RLcwzQK3Hu0eFRSxPsPd5 HT7C06tzWtUuROZfFVY6Jsly4XwMqG1a/YEK2ZVonSUCDzmlF5TYPp9c19309XS1FM Y4/YI1lPPAR2WVk28Wd3cU1Xc/fmm2posjclE+aEMk9OkOZYFLFtne2G7+ZVVuSPXf MgphhGhU/3+U5V5kXB3B/4U8o3fzuF5d97PnTb/lKvtLEuZhaULHyPdWqq+3X2LcOL CapD2ooJte8bw== X-Nifty-SrcIP: [122.131.185.176] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Masahiro Yamada , Michal Marek , linux-kernel@vger.kernel.org Subject: [PATCH 3/9] kbuild: rpm-pkg: clean up mkspec Date: Sat, 30 Sep 2017 10:10:05 +0900 Message-Id: <1506733811-24636-3-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1506733811-24636-1-git-send-email-yamada.masahiro@socionext.com> References: <1506733811-24636-1-git-send-email-yamada.masahiro@socionext.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Clean up the mkspec without changing the behavior. - grep CONFIG_DRM=y more simply - move "EXCLUDE" out of the "%install" section because it can be computed when the spec file is generated - remove "BuildRoot:" field, which is now redundant - do not mkdir $RPM_BUILD_ROOT/lib/modules explicitly because it is automatically created by "make modules_install" - exclude "%package devel" from source package spec file because it does not make sense where "%files devel" is already excluded - exclude "%build" from source package spec file - remove unneeded "make clean" because we had already cleaned before making tar file - merge two %ifarch ia64 conditionals - replace KBUILD_IMAGE with direct use of $(make image_name) - remove trailing empty line from the spec file Signed-off-by: Masahiro Yamada --- scripts/package/mkspec | 44 ++++++++++++++++---------------------------- 1 file changed, 16 insertions(+), 28 deletions(-) -- 2.7.4 diff --git a/scripts/package/mkspec b/scripts/package/mkspec index a026c08..97feb60 100755 --- a/scripts/package/mkspec +++ b/scripts/package/mkspec @@ -10,19 +10,21 @@ # # how we were called determines which rpms we build and how we build them -if [ "$1" = "prebuilt" ]; then +if [ "$1" = prebuilt ]; then PREBUILT=true else PREBUILT=false fi -# starting to output the spec -if [ "`grep CONFIG_DRM=y .config | cut -f2 -d\=`" = "y" ]; then +if grep -q CONFIG_DRM=y .config; then PROVIDES=kernel-drm fi PROVIDES="$PROVIDES kernel-$KERNELRELEASE" -__KERNELRELEASE=`echo $KERNELRELEASE | sed -e "s/-/_/g"` +__KERNELRELEASE=$(echo $KERNELRELEASE | sed -e "s/-/_/g") +EXCLUDES="$RCS_TAR_IGNORE --exclude=.tmp_versions --exclude=*vmlinux* \ +--exclude=*.o --exclude=*.ko --exclude=*.cmd --exclude=Documentation \ +--exclude=.config.old --exclude=.missing-syscalls.d" echo "Name: kernel" echo "Summary: The Linux Kernel" @@ -37,7 +39,6 @@ if ! $PREBUILT; then echo "Source: kernel-$__KERNELRELEASE.tar.gz" fi -echo "BuildRoot: %{_tmppath}/%{name}-%{PACKAGE_VERSION}-root" echo "Provides: $PROVIDES" echo "%define __spec_install_post /usr/lib/rpm/brp-compress || :" echo "%define debug_package %{nil}" @@ -57,6 +58,8 @@ echo "header files define structures and constants that are needed for" echo "building most standard programs and are also needed for rebuilding the" echo "glibc package." echo "" + +if ! $PREBUILT; then echo "%package devel" echo "Summary: Development package for building kernel modules to match the $__KERNELRELEASE kernel" echo "Group: System Environment/Kernel" @@ -65,39 +68,26 @@ echo "%description -n kernel-devel" echo "This package provides kernel headers and makefiles sufficient to build modules" echo "against the $__KERNELRELEASE kernel package." echo "" - -if ! $PREBUILT; then echo "%prep" echo "%setup -q" echo "" -fi - echo "%build" - -if ! $PREBUILT; then -echo "make clean && make %{?_smp_mflags} KBUILD_BUILD_VERSION=%{release}" +echo "make %{?_smp_mflags} KBUILD_BUILD_VERSION=%{release}" echo "" fi echo "%install" -echo 'KBUILD_IMAGE=$(make image_name)' +echo 'mkdir -p $RPM_BUILD_ROOT/boot' echo "%ifarch ia64" -echo 'mkdir -p $RPM_BUILD_ROOT/boot/efi $RPM_BUILD_ROOT/lib/modules' -echo "%else" -echo 'mkdir -p $RPM_BUILD_ROOT/boot $RPM_BUILD_ROOT/lib/modules' -echo "%endif" - -echo 'INSTALL_MOD_PATH=$RPM_BUILD_ROOT make %{?_smp_mflags} KBUILD_SRC= modules_install' -echo "%ifarch ia64" -echo 'cp $KBUILD_IMAGE $RPM_BUILD_ROOT'"/boot/efi/vmlinuz-$KERNELRELEASE" +echo 'mkdir -p $RPM_BUILD_ROOT/boot/efi' +echo 'cp $(make image_name) $RPM_BUILD_ROOT'"/boot/efi/vmlinuz-$KERNELRELEASE" echo 'ln -s '"efi/vmlinuz-$KERNELRELEASE" '$RPM_BUILD_ROOT'"/boot/" echo "%else" -echo 'cp $KBUILD_IMAGE $RPM_BUILD_ROOT'"/boot/vmlinuz-$KERNELRELEASE" +echo 'cp $(make image_name) $RPM_BUILD_ROOT'"/boot/vmlinuz-$KERNELRELEASE" echo "%endif" - +echo 'make %{?_smp_mflags} INSTALL_MOD_PATH=$RPM_BUILD_ROOT KBUILD_SRC= modules_install' echo 'make %{?_smp_mflags} INSTALL_HDR_PATH=$RPM_BUILD_ROOT/usr KBUILD_SRC= headers_install' echo 'cp System.map $RPM_BUILD_ROOT'"/boot/System.map-$KERNELRELEASE" - echo 'cp .config $RPM_BUILD_ROOT'"/boot/config-$KERNELRELEASE" echo 'bzip2 -9 --keep vmlinux' echo 'mv vmlinux.bz2 $RPM_BUILD_ROOT'"/boot/vmlinux-$KERNELRELEASE.bz2" @@ -106,8 +96,7 @@ if ! $PREBUILT; then echo 'rm -f $RPM_BUILD_ROOT'"/lib/modules/$KERNELRELEASE/build" echo 'rm -f $RPM_BUILD_ROOT'"/lib/modules/$KERNELRELEASE/source" echo "mkdir -p "'$RPM_BUILD_ROOT'"/usr/src/kernels/$KERNELRELEASE" -echo "EXCLUDES=\"$RCS_TAR_IGNORE --exclude .tmp_versions --exclude=*vmlinux* --exclude=*.o --exclude=*.ko --exclude=*.cmd --exclude=Documentation --exclude .config.old --exclude .missing-syscalls.d\"" -echo "tar "'$EXCLUDES'" -cf- . | (cd "'$RPM_BUILD_ROOT'"/usr/src/kernels/$KERNELRELEASE;tar xvf -)" +echo "tar cf - . $EXCLUDES | tar xf - -C "'$RPM_BUILD_ROOT'"/usr/src/kernels/$KERNELRELEASE" echo 'cd $RPM_BUILD_ROOT'"/lib/modules/$KERNELRELEASE" echo "ln -sf /usr/src/kernels/$KERNELRELEASE build" echo "ln -sf /usr/src/kernels/$KERNELRELEASE source" @@ -146,12 +135,11 @@ echo "" echo "%files headers" echo '%defattr (-, root, root)' echo "/usr/include" -echo "" if ! $PREBUILT; then +echo "" echo "%files devel" echo '%defattr (-, root, root)' echo "/usr/src/kernels/$KERNELRELEASE" echo "/lib/modules/$KERNELRELEASE/build" echo "/lib/modules/$KERNELRELEASE/source" -echo "" fi From patchwork Sat Sep 30 01:10:06 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 114527 Delivered-To: patch@linaro.org Received: by 10.140.104.133 with SMTP id a5csp1414859qgf; Fri, 29 Sep 2017 18:11:20 -0700 (PDT) X-Google-Smtp-Source: AOwi7QDpnA3BgZsBb8r7ddOR0ve8AoD5rtOVWhABg2v71/oz2/cvPepM7VLYFnwX/xjqozR45xMV X-Received: by 10.98.163.153 with SMTP id q25mr9225263pfl.183.1506733880451; Fri, 29 Sep 2017 18:11:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1506733880; cv=none; d=google.com; s=arc-20160816; b=wKP9dzSQJ1jrYPhL/RkHvvPTIYICtAvDzmBlHTMrbhf3BfS5Gst5ZAAxNjDWUOhLtj PwHsePeWLZCrkhPS2bOx7aFxsq/CujQOhY5gEHeI9/Ur0XZsy54jPHVAfCu/TNSf7aDs SKeeelOvFBmhKbX35Lu4hd1UZlqGM2NpZz9pUpAfvImqRbq/mQ/xHMAMDAaVb2Yt55Rw XVzcfX5Bxs+tHWiKyskt5W6uSoZniy07FTiHTFzE9wGqETuOgWfGfhpUfubQH1G4j+20 ph+dFhXTbWTG06BDX6H+V+aCDKwgMtffEF3+ZzArxB7oM2MaZhlBO3nsJ/13ghP82mgv MHbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter :arc-authentication-results; bh=GYBBYdTghLjG/kB4kNKuO4VYuFcGO2pTgQDPWhaeyTc=; b=Bw5Rb/dTb5E5tIxhl+JnKG4qsHKlcTlghjaihtPJc1KWofLccQL/3/2XLTnT55QjIm rYRmRd681XftVRgtmNCLF5vn1zy9trL6nL1U7Csg6iNid2OzCDHE0RkGqS2MVyM0he+z Yr2jQyOhYV/d6UE1kRLGaSx9u7zmW/9RbYPdxSdV0BgeuGNwPPxHm7PYGyn2OlmEFjRP YjnlYCQE0K5Dwb7LagXUKpHURXSY9W91/jO4KpKNvCDJDomR47CkGC+WZ07+nPM4egPp JQZ+/U94VxPCLNeE8Xm1BbJlOTDCgBCHnjUPUOhQOLXgKomT/igar/zXZvj5XnMN+A1i BgEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=DOenzW++; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e22si4020075pgn.561.2017.09.29.18.11.20; Fri, 29 Sep 2017 18:11:20 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=DOenzW++; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752855AbdI3BLR (ORCPT + 26 others); Fri, 29 Sep 2017 21:11:17 -0400 Received: from conuserg-07.nifty.com ([210.131.2.74]:25322 "EHLO conuserg-07.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752731AbdI3BKf (ORCPT ); Fri, 29 Sep 2017 21:10:35 -0400 Received: from grover.sesame (FL1-122-131-185-176.osk.mesh.ad.jp [122.131.185.176]) (authenticated) by conuserg-07.nifty.com with ESMTP id v8U1AOK8030198; Sat, 30 Sep 2017 10:10:26 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-07.nifty.com v8U1AOK8030198 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1506733826; bh=GYBBYdTghLjG/kB4kNKuO4VYuFcGO2pTgQDPWhaeyTc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DOenzW++PRemsLW4x3k9FjWgKRdo7xr7ZZFO725I+vGG2MhUb4r6dwqKhTQtDB0Yp xGryClELkALpD+OQoww8tC7Tq23ng3Lgq8mHI0ksKR28VwUfBcVluzMYaC6L9ZpSuF +XzO2odUnqTGleOOcg5iPe2/0wlBxpWeq5ATF7BFZLlmzuVq4oWxiddlzWEnIf9yxM taI66UaLKAbxC0Yi9NPdWKSdllxEQvPv2gTTGuW/CjMoVXx1IUDrqAwfUFcWFGE9KY h7AYianv7RTsVSrgeR115FK3ko9hkV+Yb06GfBwBUXis94dye5QKe1qiQRiAgR6Fab TNCoT7oeMcnUA== X-Nifty-SrcIP: [122.131.185.176] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Masahiro Yamada , Michal Marek , linux-kernel@vger.kernel.org Subject: [PATCH 4/9] kbuild: rpm-pkg: refactor mkspec with here doc Date: Sat, 30 Sep 2017 10:10:06 +0900 Message-Id: <1506733811-24636-4-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1506733811-24636-1-git-send-email-yamada.masahiro@socionext.com> References: <1506733811-24636-1-git-send-email-yamada.masahiro@socionext.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The repeat of echo is unreadable. The here-document is a well-known device for such scripts. One difficulty is we have a bunch of PREBUILT conditionals that would split the here-document. My idea is to add "$S" annotatation to lines only for the source package spec file, then post-process it by sed. I hope it will make our life easier than repeat of "cat < --- scripts/package/mkspec | 218 ++++++++++++++++++++++++------------------------- 1 file changed, 105 insertions(+), 113 deletions(-) -- 2.7.4 diff --git a/scripts/package/mkspec b/scripts/package/mkspec index 97feb60..f34e3bf 100755 --- a/scripts/package/mkspec +++ b/scripts/package/mkspec @@ -11,9 +11,9 @@ # how we were called determines which rpms we build and how we build them if [ "$1" = prebuilt ]; then - PREBUILT=true + S=DEL else - PREBUILT=false + S= fi if grep -q CONFIG_DRM=y .config; then @@ -26,120 +26,112 @@ EXCLUDES="$RCS_TAR_IGNORE --exclude=.tmp_versions --exclude=*vmlinux* \ --exclude=*.o --exclude=*.ko --exclude=*.cmd --exclude=Documentation \ --exclude=.config.old --exclude=.missing-syscalls.d" -echo "Name: kernel" -echo "Summary: The Linux Kernel" -echo "Version: $__KERNELRELEASE" -echo "Release: $(cat .version 2>/dev/null || echo 1)" -echo "License: GPL" -echo "Group: System Environment/Kernel" -echo "Vendor: The Linux Community" -echo "URL: http://www.kernel.org" +# We can label the here-doc lines for conditional output to the spec file +# +# Labels: +# $S: this line is enabled only when building source package +sed -e '/^DEL/d' -e's/^\t*//' </dev/null || 1) + License: GPL + Group: System Environment/Kernel + Vendor: The Linux Community + URL: http://www.kernel.org +$S Source: kernel-$__KERNELRELEASE.tar.gz + Provides: $PROVIDES + %define __spec_install_post /usr/lib/rpm/brp-compress || : + %define debug_package %{nil} -if ! $PREBUILT; then -echo "Source: kernel-$__KERNELRELEASE.tar.gz" -fi + %description + The Linux Kernel, the operating system core itself -echo "Provides: $PROVIDES" -echo "%define __spec_install_post /usr/lib/rpm/brp-compress || :" -echo "%define debug_package %{nil}" -echo "" -echo "%description" -echo "The Linux Kernel, the operating system core itself" -echo "" -echo "%package headers" -echo "Summary: Header files for the Linux kernel for use by glibc" -echo "Group: Development/System" -echo "Obsoletes: kernel-headers" -echo "Provides: kernel-headers = %{version}" -echo "%description headers" -echo "Kernel-headers includes the C header files that specify the interface" -echo "between the Linux kernel and userspace libraries and programs. The" -echo "header files define structures and constants that are needed for" -echo "building most standard programs and are also needed for rebuilding the" -echo "glibc package." -echo "" + %package headers + Summary: Header files for the Linux kernel for use by glibc + Group: Development/System + Obsoletes: kernel-headers + Provides: kernel-headers = %{version} + %description headers + Kernel-headers includes the C header files that specify the interface + between the Linux kernel and userspace libraries and programs. The + header files define structures and constants that are needed for + building most standard programs and are also needed for rebuilding the + glibc package. -if ! $PREBUILT; then -echo "%package devel" -echo "Summary: Development package for building kernel modules to match the $__KERNELRELEASE kernel" -echo "Group: System Environment/Kernel" -echo "AutoReqProv: no" -echo "%description -n kernel-devel" -echo "This package provides kernel headers and makefiles sufficient to build modules" -echo "against the $__KERNELRELEASE kernel package." -echo "" -echo "%prep" -echo "%setup -q" -echo "" -echo "%build" -echo "make %{?_smp_mflags} KBUILD_BUILD_VERSION=%{release}" -echo "" -fi +$S %package devel +$S Summary: Development package for building kernel modules to match the $__KERNELRELEASE kernel +$S Group: System Environment/Kernel +$S AutoReqProv: no +$S %description -n kernel-devel +$S This package provides kernel headers and makefiles sufficient to build modules +$S against the $__KERNELRELEASE kernel package. +$S +$S %prep +$S %setup -q +$S +$S %build +$S make %{?_smp_mflags} KBUILD_BUILD_VERSION=%{release} +$S + %install + mkdir -p \$RPM_BUILD_ROOT/boot + %ifarch ia64 + mkdir -p \$RPM_BUILD_ROOT/boot/efi + cp \$(make image_name) \$RPM_BUILD_ROOT/boot/efi/vmlinuz-$KERNELRELEASE + ln -s efi/vmlinuz-$KERNELRELEASE \$RPM_BUILD_ROOT/boot/ + %else + cp \$(make image_name) \$RPM_BUILD_ROOT/boot/vmlinuz-$KERNELRELEASE + %endif + make %{?_smp_mflags} INSTALL_MOD_PATH=\$RPM_BUILD_ROOT KBUILD_SRC= modules_install + make %{?_smp_mflags} INSTALL_HDR_PATH=\$RPM_BUILD_ROOT/usr KBUILD_SRC= headers_install + cp System.map \$RPM_BUILD_ROOT/boot/System.map-$KERNELRELEASE + cp .config \$RPM_BUILD_ROOT/boot/config-$KERNELRELEASE + bzip2 -9 --keep vmlinux + mv vmlinux.bz2 \$RPM_BUILD_ROOT/boot/vmlinux-$KERNELRELEASE.bz2 +$S rm -f \$RPM_BUILD_ROOT/lib/modules/$KERNELRELEASE/build +$S rm -f \$RPM_BUILD_ROOT/lib/modules/$KERNELRELEASE/source +$S mkdir -p \$RPM_BUILD_ROOT/usr/src/kernels/$KERNELRELEASE +$S tar cf - . $EXCLUDES | tar xf - -C \$RPM_BUILD_ROOT/usr/src/kernels/$KERNELRELEASE +$S cd \$RPM_BUILD_ROOT/lib/modules/$KERNELRELEASE +$S ln -sf /usr/src/kernels/$KERNELRELEASE build +$S ln -sf /usr/src/kernels/$KERNELRELEASE source -echo "%install" -echo 'mkdir -p $RPM_BUILD_ROOT/boot' -echo "%ifarch ia64" -echo 'mkdir -p $RPM_BUILD_ROOT/boot/efi' -echo 'cp $(make image_name) $RPM_BUILD_ROOT'"/boot/efi/vmlinuz-$KERNELRELEASE" -echo 'ln -s '"efi/vmlinuz-$KERNELRELEASE" '$RPM_BUILD_ROOT'"/boot/" -echo "%else" -echo 'cp $(make image_name) $RPM_BUILD_ROOT'"/boot/vmlinuz-$KERNELRELEASE" -echo "%endif" -echo 'make %{?_smp_mflags} INSTALL_MOD_PATH=$RPM_BUILD_ROOT KBUILD_SRC= modules_install' -echo 'make %{?_smp_mflags} INSTALL_HDR_PATH=$RPM_BUILD_ROOT/usr KBUILD_SRC= headers_install' -echo 'cp System.map $RPM_BUILD_ROOT'"/boot/System.map-$KERNELRELEASE" -echo 'cp .config $RPM_BUILD_ROOT'"/boot/config-$KERNELRELEASE" -echo 'bzip2 -9 --keep vmlinux' -echo 'mv vmlinux.bz2 $RPM_BUILD_ROOT'"/boot/vmlinux-$KERNELRELEASE.bz2" + %clean + rm -rf \$RPM_BUILD_ROOT -if ! $PREBUILT; then -echo 'rm -f $RPM_BUILD_ROOT'"/lib/modules/$KERNELRELEASE/build" -echo 'rm -f $RPM_BUILD_ROOT'"/lib/modules/$KERNELRELEASE/source" -echo "mkdir -p "'$RPM_BUILD_ROOT'"/usr/src/kernels/$KERNELRELEASE" -echo "tar cf - . $EXCLUDES | tar xf - -C "'$RPM_BUILD_ROOT'"/usr/src/kernels/$KERNELRELEASE" -echo 'cd $RPM_BUILD_ROOT'"/lib/modules/$KERNELRELEASE" -echo "ln -sf /usr/src/kernels/$KERNELRELEASE build" -echo "ln -sf /usr/src/kernels/$KERNELRELEASE source" -fi + %post + if [ -x /sbin/installkernel -a -r /boot/vmlinuz-$KERNELRELEASE -a -r /boot/System.map-$KERNELRELEASE ]; then + cp /boot/vmlinuz-$KERNELRELEASE /boot/.vmlinuz-$KERNELRELEASE-rpm + cp /boot/System.map-$KERNELRELEASE /boot/.System.map-$KERNELRELEASE-rpm + rm -f /boot/vmlinuz-$KERNELRELEASE /boot/System.map-$KERNELRELEASE + /sbin/installkernel $KERNELRELEASE /boot/.vmlinuz-$KERNELRELEASE-rpm /boot/.System.map-$KERNELRELEASE-rpm + rm -f /boot/.vmlinuz-$KERNELRELEASE-rpm /boot/.System.map-$KERNELRELEASE-rpm + fi -echo "" -echo "%clean" -echo 'rm -rf $RPM_BUILD_ROOT' -echo "" -echo "%post" -echo "if [ -x /sbin/installkernel -a -r /boot/vmlinuz-$KERNELRELEASE -a -r /boot/System.map-$KERNELRELEASE ]; then" -echo "cp /boot/vmlinuz-$KERNELRELEASE /boot/.vmlinuz-$KERNELRELEASE-rpm" -echo "cp /boot/System.map-$KERNELRELEASE /boot/.System.map-$KERNELRELEASE-rpm" -echo "rm -f /boot/vmlinuz-$KERNELRELEASE /boot/System.map-$KERNELRELEASE" -echo "/sbin/installkernel $KERNELRELEASE /boot/.vmlinuz-$KERNELRELEASE-rpm /boot/.System.map-$KERNELRELEASE-rpm" -echo "rm -f /boot/.vmlinuz-$KERNELRELEASE-rpm /boot/.System.map-$KERNELRELEASE-rpm" -echo "fi" -echo "" -echo "%preun" -echo "if [ -x /sbin/new-kernel-pkg ]; then" -echo "new-kernel-pkg --remove $KERNELRELEASE --rminitrd --initrdfile=/boot/initramfs-$KERNELRELEASE.img" -echo "fi" -echo "" -echo "%postun" -echo "if [ -x /sbin/update-bootloader ]; then" -echo "/sbin/update-bootloader --remove $KERNELRELEASE" -echo "fi" -echo "" -echo "%files" -echo '%defattr (-, root, root)' -echo "/lib/modules/$KERNELRELEASE" -echo "%exclude /lib/modules/$KERNELRELEASE/build" -echo "%exclude /lib/modules/$KERNELRELEASE/source" -echo "/boot/*" -echo "" -echo "%files headers" -echo '%defattr (-, root, root)' -echo "/usr/include" -if ! $PREBUILT; then -echo "" -echo "%files devel" -echo '%defattr (-, root, root)' -echo "/usr/src/kernels/$KERNELRELEASE" -echo "/lib/modules/$KERNELRELEASE/build" -echo "/lib/modules/$KERNELRELEASE/source" -fi + %preun + if [ -x /sbin/new-kernel-pkg ]; then + new-kernel-pkg --remove $KERNELRELEASE --rminitrd --initrdfile=/boot/initramfs-$KERNELRELEASE.img + fi + + %postun + if [ -x /sbin/update-bootloader ]; then + /sbin/update-bootloader --remove $KERNELRELEASE + fi + + %files + %defattr (-, root, root) + /lib/modules/$KERNELRELEASE + %exclude /lib/modules/$KERNELRELEASE/build + %exclude /lib/modules/$KERNELRELEASE/source + /boot/* + + %files headers + %defattr (-, root, root) + /usr/include +$S +$S %files devel +$S %defattr (-, root, root) +$S /usr/src/kernels/$KERNELRELEASE +$S /lib/modules/$KERNELRELEASE/build +$S /lib/modules/$KERNELRELEASE/source +EOF From patchwork Sat Sep 30 01:10:07 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 114524 Delivered-To: patch@linaro.org Received: by 10.140.104.133 with SMTP id a5csp1414525qgf; Fri, 29 Sep 2017 18:10:51 -0700 (PDT) X-Google-Smtp-Source: AOwi7QBy3xSbFvrgH/tz6NZ4tBpAcC4FRf3DCq8KUzDIJBdjPzlZXmVEzWwig/Z57IRYF38eNU7s X-Received: by 10.159.234.3 with SMTP id be3mr8752058plb.5.1506733851093; Fri, 29 Sep 2017 18:10:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1506733851; cv=none; d=google.com; s=arc-20160816; b=BGS1anqqohwLBUttbZrRlOYk2Jk7ZH7IWj09AL0iilfzjHJQPZ4uTi3g2tyaz4EeVz BdVfDW9qJGp3qcN/n6T2w0bKncZSdmkjQ65RLJCGlBW0HcCqVBUWLbFLGvkoVGt1lc+s nXkSiOTdW5q6KrBcEeCAvnw9mWky/FrqPWHWaCcgX5RyZkrKqrnq+WMHC9UhVt+OG+3W Y85osiSHmEnJ2yqGAphSavhP1R37QxnAFkKyKVO88p/EG/iDRTPogQC/5qeQ/YbnozzA e6aEPyJAxJ3wdLQRIYDvhx6dwesXRg1C/I9WiLKwcU6AYUA4kRRlVuJbKg8brrFMWpEB js9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter :arc-authentication-results; bh=p9+E4NafwWoucFJYGV2+by6aY0ug1Uey4Dhqyr/Jask=; b=heTVrwTRRpxXx9mzwQPmlk7BA0AKfnAeJpKL5YuZ594XoMULXP+/NKC6WyMvRSFwZp BfouqswtwgRQLz7+NN04gLzv3Bv6QEDpW4hHndKe/0k1gCmhFMTpQrG5fksMWlUkHf4y YjYNonpnT0tUrgcVuEt+P+dvQ676Mn105VgyVtio0JYjCFFtSU0G4/ALIm6YiWSR9Dtz zhLC3eANsReFB/zsoMy5lFoHbk6y2iWX3vRPW0oxlVmJQmF0uVe/pOPODqgL56NYy9zM bNmFXvIiVEAW4H1KCrvTS9dUAMKC01qoCVncjdMxpD4XB3LyBSGcGIWRQvmbVyf2l3rE 6f/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=rTSzao5S; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j1si4096601pgn.726.2017.09.29.18.10.50; Fri, 29 Sep 2017 18:10:51 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=rTSzao5S; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752777AbdI3BKi (ORCPT + 26 others); Fri, 29 Sep 2017 21:10:38 -0400 Received: from conuserg-07.nifty.com ([210.131.2.74]:25300 "EHLO conuserg-07.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752621AbdI3BKf (ORCPT ); Fri, 29 Sep 2017 21:10:35 -0400 Received: from grover.sesame (FL1-122-131-185-176.osk.mesh.ad.jp [122.131.185.176]) (authenticated) by conuserg-07.nifty.com with ESMTP id v8U1AOK9030198; Sat, 30 Sep 2017 10:10:26 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-07.nifty.com v8U1AOK9030198 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1506733826; bh=p9+E4NafwWoucFJYGV2+by6aY0ug1Uey4Dhqyr/Jask=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rTSzao5SxLgZxkBnvLpwK2Heg9pwahqewRQHv107OtGSVnLiYXRnUnKQAqrGZ7QhY dafQ9OAuMIKs0ghPh/w7dwxgHgkkwhu60sOhKFezHNkTQJdUkfVOE1TQUOXOztJB6l 1y41HnasQ1+Dmm3aORcOWXUXWT9750gAXVZUcH9ERXIfUq3Dy8a0dv44P7KX2nW5m4 VQYlpMIpbet+GE1VrOfa5CjUXkP+s2e/Z29Wtpvbvo3Zc99BwRZ/XH6/tvShj3OEs/ J6KzK3qAdHOAfBsoFY5p0xuS2lcuABupD/qA/BRFW+liL5g/TNqj95HgmX1lQcdnRn 4SrIIpV9LkIGg== X-Nifty-SrcIP: [122.131.185.176] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Masahiro Yamada , Michal Marek , linux-kernel@vger.kernel.org Subject: [PATCH 5/9] kbuild: rpm-pkg: fix build error when CONFIG_MODULES is disabled Date: Sat, 30 Sep 2017 10:10:07 +0900 Message-Id: <1506733811-24636-5-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1506733811-24636-1-git-send-email-yamada.masahiro@socionext.com> References: <1506733811-24636-1-git-send-email-yamada.masahiro@socionext.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When CONFIG_MODULES is disabled, make rpm-pkg / binrpm-pkg fails with the following message: The present kernel configuration has modules disabled. Type 'make config' and enable loadable module support. Then build a kernel with module support enabled. Do not install modules in the case. Also, omit the devel package. Signed-off-by: Masahiro Yamada --- scripts/package/mkspec | 57 ++++++++++++++++++++++++++++---------------------- 1 file changed, 32 insertions(+), 25 deletions(-) -- 2.7.4 diff --git a/scripts/package/mkspec b/scripts/package/mkspec index f34e3bf..8a9ab85 100755 --- a/scripts/package/mkspec +++ b/scripts/package/mkspec @@ -16,6 +16,12 @@ else S= fi +if grep -q CONFIG_MODULES=y .config; then + M= +else + M=DEL +fi + if grep -q CONFIG_DRM=y .config; then PROVIDES=kernel-drm fi @@ -30,6 +36,7 @@ EXCLUDES="$RCS_TAR_IGNORE --exclude=.tmp_versions --exclude=*vmlinux* \ # # Labels: # $S: this line is enabled only when building source package +# $M: this line is enabled only when CONFIG_MODULES is enabled sed -e '/^DEL/d' -e's/^\t*//' < X-Patchwork-Id: 114523 Delivered-To: patch@linaro.org Received: by 10.140.104.133 with SMTP id a5csp1414444qgf; Fri, 29 Sep 2017 18:10:42 -0700 (PDT) X-Google-Smtp-Source: AOwi7QDvr0lMfLtpqS5PNuZ/khcisLeupzSB0L9wbh3Css5bYyTvQb1WZX+X/I6DED9AIbUyoEI1 X-Received: by 10.84.131.69 with SMTP id 63mr8890171pld.364.1506733842455; Fri, 29 Sep 2017 18:10:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1506733842; cv=none; d=google.com; s=arc-20160816; b=hbj5FMboqbf+q++pez9Xn4FRvQkf53/3JggDMm1uzDTkTj1fUKDT9zKItFzawUqIqe TpHWTRJ35UIF3LQVHs2uFg/WGTCEvUCQ9YeSKo4nhRYXhwjD+EUhNJxKQBOxkg2GcWCR c076oPXr+gWCTw9QRr/UkRNTmxFOsXbV7ghA7+F93Al3CelGm64Tpzk8v0Rt6kMUw3l4 OICNxwA8FRNDwtmueSAk3aQHa0arcgxwBJeH9Gdbsb3YP/OsAjq5Hd7z93Rz226euh4z Te3/gEuBMUlJZwB2TR1rqQ4GSscGmjeJWJ/BbgNrWkEdjqYmNFMrDahAKRwUVgcv9Nsr yV4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter :arc-authentication-results; bh=i2wQS+g12a/T7NVHhGPfvOTrGJ7qr6tT2ife5JUIK2s=; b=D/rcQLPjmpzPk/3wwm6gvXsZZteB1cUaBXiOr+XGWw8z+le8ut4E0VI4A1KwJVKsVT 6HCDG/C+Beq3YKwQcV1xyhbAVw4BmrdoOFRSO2PrW/TS6G9Dahu3g24KjjBaVUeMnCbV gcmiHbeThlAMI8qGndJj/3ScktsA8+26SYFZSHRFVkPaXPiip115B4KjQRvfiGE3Cou0 oi5L5CTAzsZUTIrRgSmKpAY8U4wn5cqq2qj7pzoZ2X0I/IU/CpiB2Tuyt9stJ6eGZ6bz rnxFEnJ2qzTbLKqg+uV7oHpBcgAqIPxWgtBMGhc1c4swDUXs6gKFThjJ6mrkpxrVaXGR EFcA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=MK3Av2CH; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j1si4096601pgn.726.2017.09.29.18.10.42; Fri, 29 Sep 2017 18:10:42 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=MK3Av2CH; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752792AbdI3BKj (ORCPT + 26 others); Fri, 29 Sep 2017 21:10:39 -0400 Received: from conuserg-07.nifty.com ([210.131.2.74]:25310 "EHLO conuserg-07.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752622AbdI3BKf (ORCPT ); Fri, 29 Sep 2017 21:10:35 -0400 Received: from grover.sesame (FL1-122-131-185-176.osk.mesh.ad.jp [122.131.185.176]) (authenticated) by conuserg-07.nifty.com with ESMTP id v8U1AOKA030198; Sat, 30 Sep 2017 10:10:27 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-07.nifty.com v8U1AOKA030198 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1506733827; bh=i2wQS+g12a/T7NVHhGPfvOTrGJ7qr6tT2ife5JUIK2s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MK3Av2CHCfzt/OhEnUaf7A5PgtTIOsz4cr2j8kYrIHZO3WS5ffVtgXxC9jMwk/bkJ Yz6vviDnk12FWmXTz0C7KI2K7hbJt10TUHT6fE815LJKrUxCf644WofbfTbVCCVc6a WQUVBjDGPUnBEbkbXSl9QzrHEvhET06ypd/Jf5Boex4fPyJji8YnLzEk4lMwFdZkMB tu2CdmTfL7Yh3MQzRcw5Vq623GGFUeRY4AjRTfIr+RM7UJxx0MWBS1t7o93f6lM9Z7 aElVx0ohWGeuVqG571rPcgIZTSj/dHOF82CgS7tHIx3J6ZOqkTegFdVBQdS57zLmqL bpw1qLfWXSQiw== X-Nifty-SrcIP: [122.131.185.176] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Masahiro Yamada , Michal Marek , linux-kernel@vger.kernel.org Subject: [PATCH 6/9] kbuild: rpm-pkg: replace $RPM_BUILD_ROOT with %{buildroot} Date: Sat, 30 Sep 2017 10:10:08 +0900 Message-Id: <1506733811-24636-6-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1506733811-24636-1-git-send-email-yamada.masahiro@socionext.com> References: <1506733811-24636-1-git-send-email-yamada.masahiro@socionext.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org $RPM_BUILD_ROOT must be escaped to prevent shell from expanding it when generating the spec file. %{build_root} is more readable than \$RPM_BUILD_ROOT. Signed-off-by: Masahiro Yamada --- scripts/package/mkspec | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) -- 2.7.4 diff --git a/scripts/package/mkspec b/scripts/package/mkspec index 8a9ab85..11e07b5 100755 --- a/scripts/package/mkspec +++ b/scripts/package/mkspec @@ -81,30 +81,30 @@ $S %build $S make %{?_smp_mflags} KBUILD_BUILD_VERSION=%{release} $S %install - mkdir -p \$RPM_BUILD_ROOT/boot + mkdir -p %{buildroot}/boot %ifarch ia64 - mkdir -p \$RPM_BUILD_ROOT/boot/efi - cp \$(make image_name) \$RPM_BUILD_ROOT/boot/efi/vmlinuz-$KERNELRELEASE - ln -s efi/vmlinuz-$KERNELRELEASE \$RPM_BUILD_ROOT/boot/ + mkdir -p %{buildroot}/boot/efi + cp \$(make image_name) %{buildroot}/boot/efi/vmlinuz-$KERNELRELEASE + ln -s efi/vmlinuz-$KERNELRELEASE %{buildroot}/boot/ %else - cp \$(make image_name) \$RPM_BUILD_ROOT/boot/vmlinuz-$KERNELRELEASE + cp \$(make image_name) %{buildroot}/boot/vmlinuz-$KERNELRELEASE %endif -$M make %{?_smp_mflags} INSTALL_MOD_PATH=\$RPM_BUILD_ROOT KBUILD_SRC= modules_install - make %{?_smp_mflags} INSTALL_HDR_PATH=\$RPM_BUILD_ROOT/usr KBUILD_SRC= headers_install - cp System.map \$RPM_BUILD_ROOT/boot/System.map-$KERNELRELEASE - cp .config \$RPM_BUILD_ROOT/boot/config-$KERNELRELEASE +$M make %{?_smp_mflags} INSTALL_MOD_PATH=%{buildroot} KBUILD_SRC= modules_install + make %{?_smp_mflags} INSTALL_HDR_PATH=%{buildroot}/usr KBUILD_SRC= headers_install + cp System.map %{buildroot}/boot/System.map-$KERNELRELEASE + cp .config %{buildroot}/boot/config-$KERNELRELEASE bzip2 -9 --keep vmlinux - mv vmlinux.bz2 \$RPM_BUILD_ROOT/boot/vmlinux-$KERNELRELEASE.bz2 -$S$M rm -f \$RPM_BUILD_ROOT/lib/modules/$KERNELRELEASE/build -$S$M rm -f \$RPM_BUILD_ROOT/lib/modules/$KERNELRELEASE/source -$S$M mkdir -p \$RPM_BUILD_ROOT/usr/src/kernels/$KERNELRELEASE -$S$M tar cf - . $EXCLUDES | tar xf - -C \$RPM_BUILD_ROOT/usr/src/kernels/$KERNELRELEASE -$S$M cd \$RPM_BUILD_ROOT/lib/modules/$KERNELRELEASE + mv vmlinux.bz2 %{buildroot}/boot/vmlinux-$KERNELRELEASE.bz2 +$S$M rm -f %{buildroot}/lib/modules/$KERNELRELEASE/build +$S$M rm -f %{buildroot}/lib/modules/$KERNELRELEASE/source +$S$M mkdir -p %{buildroot}/usr/src/kernels/$KERNELRELEASE +$S$M tar cf - . $EXCLUDES | tar xf - -C %{buildroot}/usr/src/kernels/$KERNELRELEASE +$S$M cd %{buildroot}/lib/modules/$KERNELRELEASE $S$M ln -sf /usr/src/kernels/$KERNELRELEASE build $S$M ln -sf /usr/src/kernels/$KERNELRELEASE source %clean - rm -rf \$RPM_BUILD_ROOT + rm -rf %{buildroot} %post if [ -x /sbin/installkernel -a -r /boot/vmlinuz-$KERNELRELEASE -a -r /boot/System.map-$KERNELRELEASE ]; then From patchwork Sat Sep 30 01:10:09 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 114525 Delivered-To: patch@linaro.org Received: by 10.140.104.133 with SMTP id a5csp1414645qgf; Fri, 29 Sep 2017 18:11:01 -0700 (PDT) X-Google-Smtp-Source: AOwi7QCo9hFOY4ZtrKvLzGMD7DouevTHHhoOVm2T9QCIrL6HdkJUJe0ITPm54qn3doiHmZj64AIy X-Received: by 10.84.131.69 with SMTP id 63mr8890720pld.364.1506733861672; Fri, 29 Sep 2017 18:11:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1506733861; cv=none; d=google.com; s=arc-20160816; b=mHFhijBg4qTqT2E+5SyOiWkaMwtpRIJKlYcbox8M9GG5UPbuVftUi6S7Q6C7kveb4C a2GQB+/vMs+BoVrmLmdqF1nXkLPCl5D5a67CqIS/xf/W33oDVaAKRGmqwOrK25ije56i r5DHT7xgPll4wBV1vsKGLa4DVVwCPCo59G2FxokYhTNiJ1kCHDO1F/K74mi6g9/tdfn3 hbCD1tPAXmMnNHIvVpV02TretbuW5nA3+EZHOgR46Qrzbp2y005kj2baVFvM2YeGCaiY O4VCgMVYtBuRpZJBnUEdDrpTOUHJYbI/ZF4UWvZycVYmzDl/FwQSLg7/dMFhkIVUsE5X JamA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter :arc-authentication-results; bh=1g+tyuxXszz9Pv63gIrZaMI8TAnuykid1hX70dj5JHQ=; b=F9OQ3HBJcOWVCX7/LmCpgb3JSPrQx8u2uHilUVL/ZT9mf2/Tg69wOmClLVjKDAWekf c4nxO7nihTB62eCXOAoSIO2lw+d2Wz/AKZNRH8kEPYXwrCqHDPx9L09Z1ukufaMwGX3H MtFxLnnd1erqUK13EWElARGAw0XctJ8UGgmSis546RaNIb5Gfg/pGw78I4SBw9k7T1uQ 40l90lqZdJKy3dyBEjachy1Hc2fqojzkKwSGco6+EYEuA6kW2OCJWR2G0anMYeeKYt40 CV2UoBaL/j8zUhfPwa0TgLJuGinF8DWrEgGGAF0uqP6RSK+bJQG26jUd9O3+BAlJNaA5 Ghaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=KfrIeiWz; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j1si4096601pgn.726.2017.09.29.18.11.01; Fri, 29 Sep 2017 18:11:01 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=KfrIeiWz; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752759AbdI3BKh (ORCPT + 26 others); Fri, 29 Sep 2017 21:10:37 -0400 Received: from conuserg-07.nifty.com ([210.131.2.74]:25301 "EHLO conuserg-07.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752595AbdI3BKf (ORCPT ); Fri, 29 Sep 2017 21:10:35 -0400 Received: from grover.sesame (FL1-122-131-185-176.osk.mesh.ad.jp [122.131.185.176]) (authenticated) by conuserg-07.nifty.com with ESMTP id v8U1AOKB030198; Sat, 30 Sep 2017 10:10:27 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-07.nifty.com v8U1AOKB030198 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1506733827; bh=1g+tyuxXszz9Pv63gIrZaMI8TAnuykid1hX70dj5JHQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KfrIeiWzbiAE8EQmxiARJgPB7bebdBwjv5AWcEG7z80n8ww+S4O1YsF6Mg4sNMF7e NEmoT6ilXnY83sp7dEYQ8XSdHMFoF4EMBwJJi1FHx0L16uVnDN8js2kNuJ67tb1/HF dx0RKrUclPVStAHw61xYdcPHtyttMW8Aq0q9X/n8ArRRs23qk/rm9etN+uUelr/nTs 2kHhsekGdIEBzqbrbfGSHV06KC8n9BEgjebMwdnJZOEJXP1lWmxvAD9oSY28EH2LUF b7j6N7Oft4Dem/MCh7lSBbzUJ5RhyvosPg7+xW2u9En5l0NdKW+JRjqwO3NrS7VAae vXzcihB7POKHQ== X-Nifty-SrcIP: [122.131.185.176] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Masahiro Yamada , Michal Marek , linux-kernel@vger.kernel.org Subject: [PATCH 7/9] kbuild: rpm-pkg: fix jobserver unavailable warning Date: Sat, 30 Sep 2017 10:10:09 +0900 Message-Id: <1506733811-24636-7-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1506733811-24636-1-git-send-email-yamada.masahiro@socionext.com> References: <1506733811-24636-1-git-send-email-yamada.masahiro@socionext.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org If "make rpm-pkg" or "make binrpm-pkg" is run with -j[jobs] option, the following warning message is displayed. warning: jobserver unavailable: using -j1. Add '+' to parent make rule. Follow the suggestion. Signed-off-by: Masahiro Yamada --- scripts/package/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.7.4 diff --git a/scripts/package/Makefile b/scripts/package/Makefile index 73f9f31..b559671 100644 --- a/scripts/package/Makefile +++ b/scripts/package/Makefile @@ -50,7 +50,7 @@ rpm-pkg rpm: FORCE $(MAKE) clean $(CONFIG_SHELL) $(MKSPEC) >$(objtree)/kernel.spec $(call cmd,src_tar,$(KERNELPATH),kernel.spec) - rpmbuild $(RPMOPTS) --target $(UTS_MACHINE) -ta $(KERNELPATH).tar.gz + +rpmbuild $(RPMOPTS) --target $(UTS_MACHINE) -ta $(KERNELPATH).tar.gz rm $(KERNELPATH).tar.gz kernel.spec # binrpm-pkg @@ -58,7 +58,7 @@ rpm-pkg rpm: FORCE binrpm-pkg: FORCE $(MAKE) KBUILD_SRC= $(CONFIG_SHELL) $(MKSPEC) prebuilt > $(objtree)/binkernel.spec - rpmbuild $(RPMOPTS) --define "_builddir $(objtree)" --target \ + +rpmbuild $(RPMOPTS) --define "_builddir $(objtree)" --target \ $(UTS_MACHINE) -bb $(objtree)/binkernel.spec rm binkernel.spec From patchwork Sat Sep 30 01:10:10 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 114529 Delivered-To: patch@linaro.org Received: by 10.140.104.133 with SMTP id a5csp1415177qgf; Fri, 29 Sep 2017 18:11:51 -0700 (PDT) X-Google-Smtp-Source: AOwi7QA7fbKxT3SVZo0seEOFRaU52nEK3kdZlX8B5BIksppeHtedHxoYK/GIZ1DWXWve0+2IZHiA X-Received: by 10.98.10.24 with SMTP id s24mr9395776pfi.155.1506733910945; Fri, 29 Sep 2017 18:11:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1506733910; cv=none; d=google.com; s=arc-20160816; b=H6D2RjYuiBqK/7RGg7P0HhvAHjQJeeogqtqme7syuLJ3VnmYZocj28ZsVxPqnewn44 zHcqihNcOun/XILMrZPjfbbDqei/LPkM3nn0qWob2J8AciemGVG1J0y0nlu/aEawa8Bc EFErRt8v9rv/6H7Iiz8fMkJ8BLGfBizRlGtTZU57OLmu2x96UpzkRhGrCmxsBV3rCNIi lvuWzb7En3oH6nydOqJMLZJiMBODbAzfcqXGsWurZSAHIxLkJ6EZEp7HunpebIv6ySeb Tw+CT3iMsDUsPFqfT0UQ3mtaYLbvMa3cvTB74mqLtye86RHfN6hHruXO5uUdMcTIJEE/ 4Lng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter :arc-authentication-results; bh=AFgqY+BuwxhB1VlXJQHa8qE8bGUvjeGTSSLSJUc7m+Q=; b=AEMjj4EAqm7VW2lesBNrTGQ4BtvZX0SnKat3VQroDmxBy3yIIaTOtL+TjHmv+5TZpp UhmkyEE/rLS27jlkN1KHwn+rkJZnyT4rRfmYAtDnomQRQGpdkQBmjOF8uAz6dXYtrkyc e5NjgzAhvHZw+YXlXkdzWkHxnZLerbj5XXxXVN4TFa4NYHJhNp/PSXTM44zX52y8qtQE UP9WV7aQmXaVghbIEO51rlgBiNQbc2hgjHcIfI/c5sqhl7ur9xlVXcRvjD4VpWDgX8qX MCo6oK69EwcPuwEw/ZIKjOGYhax1vRSRynZq6Tu14dnNy28eZWfFnekHXtHjqcRkg5Ld fkSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=LYy9ok41; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b11si4208362pls.503.2017.09.29.18.11.50; Fri, 29 Sep 2017 18:11:50 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=LYy9ok41; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752804AbdI3BLL (ORCPT + 26 others); Fri, 29 Sep 2017 21:11:11 -0400 Received: from conuserg-07.nifty.com ([210.131.2.74]:26266 "EHLO conuserg-07.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752622AbdI3BLJ (ORCPT ); Fri, 29 Sep 2017 21:11:09 -0400 Received: from grover.sesame (FL1-122-131-185-176.osk.mesh.ad.jp [122.131.185.176]) (authenticated) by conuserg-07.nifty.com with ESMTP id v8U1AOKC030198; Sat, 30 Sep 2017 10:10:28 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-07.nifty.com v8U1AOKC030198 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1506733828; bh=AFgqY+BuwxhB1VlXJQHa8qE8bGUvjeGTSSLSJUc7m+Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LYy9ok41HjHWNEkF7vMQRK5l5rbk5HsJptbokSfYnjkqpPjSX7SgYxZ4B7z0N0c07 GCy2DrMVBAyxhhiJuE+FQdU4QWpTXJo137OfDK+n6dvPiP8ORbGDB102AGzMhqnDyV ubaFF4sMI1up4CQ735o5WHYlUWA/uyymj1S0TUWegXm8SZiZyM7QTJY2w3QpeVkNec q/HeS9c34ChQL8JxZ64TbIfwaMheJUvp+jvD4ACHWIakqUlkZRmJaA0ng5azQcjnNW Vfe4RkXIuCbdsqXw78gbpQl0yBGYLoZ29q0/jWH5m2/y923ZG74Jf0htlMavD4vdtQ ObDG5m0re/wlA== X-Nifty-SrcIP: [122.131.185.176] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Masahiro Yamada , Matthias Kaehlcke , Behan Webster , Michal Marek , =?utf-8?q?Vin=C3=ADcius_Tinti?= , linux-kernel@vger.kernel.org Subject: [PATCH 8/9] kbuild: rpm-pkg: keep spec file until make mrproper Date: Sat, 30 Sep 2017 10:10:10 +0900 Message-Id: <1506733811-24636-8-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1506733811-24636-1-git-send-email-yamada.masahiro@socionext.com> References: <1506733811-24636-1-git-send-email-yamada.masahiro@socionext.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org If build fails during (bin)rpm-pkg, the spec file is not cleaned by anyone until the next successful build of the package. We do not have to immediately delete the spec file in case somebody may want to take a look at it. Instead, make them ignored by git, and cleaned up by make mrproper. Signed-off-by: Masahiro Yamada --- .gitignore | 5 +++++ scripts/package/Makefile | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) -- 2.7.4 diff --git a/.gitignore b/.gitignore index 0c39aa2..4f034b8 100644 --- a/.gitignore +++ b/.gitignore @@ -54,6 +54,11 @@ Module.symvers /Module.markers # +# RPM spec file (make rpm-pkg) +# +/*.spec + +# # Debian directory (make deb-pkg) # /debian/ diff --git a/scripts/package/Makefile b/scripts/package/Makefile index b559671..70eea1e 100644 --- a/scripts/package/Makefile +++ b/scripts/package/Makefile @@ -51,7 +51,6 @@ rpm-pkg rpm: FORCE $(CONFIG_SHELL) $(MKSPEC) >$(objtree)/kernel.spec $(call cmd,src_tar,$(KERNELPATH),kernel.spec) +rpmbuild $(RPMOPTS) --target $(UTS_MACHINE) -ta $(KERNELPATH).tar.gz - rm $(KERNELPATH).tar.gz kernel.spec # binrpm-pkg # --------------------------------------------------------------------------- @@ -60,7 +59,8 @@ binrpm-pkg: FORCE $(CONFIG_SHELL) $(MKSPEC) prebuilt > $(objtree)/binkernel.spec +rpmbuild $(RPMOPTS) --define "_builddir $(objtree)" --target \ $(UTS_MACHINE) -bb $(objtree)/binkernel.spec - rm binkernel.spec + +clean-files += $(objtree)/*.spec # Deb target # --------------------------------------------------------------------------- From patchwork Sat Sep 30 01:10:11 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 114528 Delivered-To: patch@linaro.org Received: by 10.140.104.133 with SMTP id a5csp1414966qgf; Fri, 29 Sep 2017 18:11:30 -0700 (PDT) X-Google-Smtp-Source: AOwi7QA56HXLN+Tiu3QzvqwNlYxjccx2NmZlPEHe7Js5yOGl437eUed91xz8egwACd6yMV7lCacS X-Received: by 10.98.65.27 with SMTP id o27mr9401298pfa.205.1506733890252; Fri, 29 Sep 2017 18:11:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1506733890; cv=none; d=google.com; s=arc-20160816; b=RWhVsOPW9gX0felZtxfyiPLAuLh4iivEPb/qxodiFpXNYYBdVTW2OUiCwBZ1hpkb1C pBaCFNyE2Ae5H7kR6Kq2KeupNv5GgS/K5reTJEfO0xo5vCG3rjeOOY1dfZuW+/ka4ZAK KSV33uLiJzbhQfTPK0o1hhS53STVjh9skXbAaBk+RXH+o3hShRGvdGb31QtJEI3kOWAG /pQdBLRDCVj/w9VGKlPszMQo4/sZZj8eaS4dvNFc2rXAMiO4//HtjmKGauyrY6fMUElW UdoEf5sPpA9rP9uDIno301Be8E0YK3Wz4Pz60KpohFFkMUsXiqUzmJ4mJTg+zoXLkN38 ClTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter :arc-authentication-results; bh=yeqfK9atw9ppP3MCck1LaG1V9BfMdKw5A6KonPSwlIs=; b=SbY/n1dq9PRDxW6vUWrjGqOWRRg6Mbq7G5DE01wsbPNfIJwHKxhgN2nAc98sCEdva0 ejrUtQwSsV6OqCCbrI3fXb13dPqzCRbjRoeZhuD/opIggf5r4mnC4EnmB7p6KFA6j2qc GzV/UfmJql7I3TAktMpmo5iNEI5P2/yeHWuejgjforjVOqdwIyn8HaCQ0JFpckOlQSsv dXdDISKZdJ5bMS5CbQMLCNcj28P2neBETjBZWF1out8pYmVTvcrH1zoKAMipaMPn1umT byj/EBdVrZJpmqE5sPcKpA+Y2lkbt6HWraZGHAjpix2W+qimw6aNlK92VkmeUmd7pZPH F58w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=iYcq5Gmg; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x5si4179076plv.552.2017.09.29.18.11.30; Fri, 29 Sep 2017 18:11:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=iYcq5Gmg; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752837AbdI3BLQ (ORCPT + 26 others); Fri, 29 Sep 2017 21:11:16 -0400 Received: from conuserg-07.nifty.com ([210.131.2.74]:25317 "EHLO conuserg-07.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752728AbdI3BKf (ORCPT ); Fri, 29 Sep 2017 21:10:35 -0400 Received: from grover.sesame (FL1-122-131-185-176.osk.mesh.ad.jp [122.131.185.176]) (authenticated) by conuserg-07.nifty.com with ESMTP id v8U1AOKD030198; Sat, 30 Sep 2017 10:10:28 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-07.nifty.com v8U1AOKD030198 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1506733829; bh=yeqfK9atw9ppP3MCck1LaG1V9BfMdKw5A6KonPSwlIs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iYcq5GmgUmvh8WWU3ac3n6Cj2udUFaVDWrbxlxn+yXwZ+LhUZKZWIHhjegFd67ARF IA9ZbJG1uv+LWbVOKWcyLMIHm7J2jIj6ZWErM6bPcOGFfjc49clOKOLnickGk+itYw 2LR6IP2Nl7AF2tmUCUVy9tQuUHq66gbKN/K6XIHqqoTVDGAbEaG2t9cC126J7yOKRm zEaUukGjeK8hSThmJbg/cqrbiATi++Q/dzW1TZY8MRL0jl8nu5eJxFNu9pNIJLgWtg tc/AZgGFZGY/Rhn/Lkjue23augDQhId4JFkiEfXlNPd0wMXpTRz6qfVwI2RXLssS1r SpuGczxco0tAw== X-Nifty-SrcIP: [122.131.185.176] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Masahiro Yamada , Michal Marek , linux-kernel@vger.kernel.org Subject: [PATCH 9/9] kbuild: rpm-pkg: do not force -jN in submake Date: Sat, 30 Sep 2017 10:10:11 +0900 Message-Id: <1506733811-24636-9-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1506733811-24636-1-git-send-email-yamada.masahiro@socionext.com> References: <1506733811-24636-1-git-send-email-yamada.masahiro@socionext.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The spec file always passes %{?_smp_mflags}, but we have two problems here. [1] "make -jN rpm-pkg" emits the following warning message: make[2]: warning: -jN forced in submake: disabling jobserver mode. [2] We can not specify the number of jobs that run in parallel. Whether we give -jN or not from the top Makefile, the spec file always passes ${?_smp_mflags} to the build commands. ${?_smp_mflags} will be useful when we run rpmbuild by hand. When we invoke it from Makefile, -jN is propagated down to submake; it should not be overridden because we want to respect the number of jobs given by the user. Set _smp_mflags to empty string in this case. Signed-off-by: Masahiro Yamada --- scripts/package/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.7.4 diff --git a/scripts/package/Makefile b/scripts/package/Makefile index 70eea1e..9ed96aef 100644 --- a/scripts/package/Makefile +++ b/scripts/package/Makefile @@ -50,7 +50,8 @@ rpm-pkg rpm: FORCE $(MAKE) clean $(CONFIG_SHELL) $(MKSPEC) >$(objtree)/kernel.spec $(call cmd,src_tar,$(KERNELPATH),kernel.spec) - +rpmbuild $(RPMOPTS) --target $(UTS_MACHINE) -ta $(KERNELPATH).tar.gz + +rpmbuild $(RPMOPTS) --target $(UTS_MACHINE) -ta $(KERNELPATH).tar.gz \ + --define='_smp_mflags %{nil}' # binrpm-pkg # ---------------------------------------------------------------------------