From patchwork Mon Sep 3 10:01:55 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 145767 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp2296187ljw; Mon, 3 Sep 2018 03:03:31 -0700 (PDT) X-Google-Smtp-Source: ANB0Vda6YP/dSjyu9OwFTTvg5hpwIjGS2N5hi5A7FwQ+n7oQXOHdFpHo2SsxWkbfocqUCsavmGNX X-Received: by 2002:a17:902:ba86:: with SMTP id k6-v6mr27485872pls.84.1535969011799; Mon, 03 Sep 2018 03:03:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535969011; cv=none; d=google.com; s=arc-20160816; b=JXsvMPnZRI0gEMUIiHgwpIi//ourTh8+rsu9htnL8kDeWv7Sh15NHJYT7ofHESqvyg a6TvgC9yCYyQZRtpMBUy22pxyhWAVC+Z0793w8pakNdHeiQ5jzMApuTISLLB6AAPiaPX Uk3WizcSil8msiHqSWPn3TfhtjuXqjCMfwlK1/NykqjhwNWPTROp6h5XRBNotxbPngi0 tD8QUtDIl/8YUIp9heNeMJT9YW5KLuqOwqdm1zI7ltVtFQT6hKlcR2qwiIQEmYLp7cnI n1BGdKMlF2UKbmLXALKjBvISOr/fefh+FK8RnW/cqw/CrOw35ICzlwBiJF6tezLuGmCG sF+A== 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=5DEAVLYNT2UxIc616OOqQRoQO73TpNyg7DB67C2ydDo=; b=X+2YvPUGNuYAzjExGPpwv/2O216eHM9qtDhkW+3RZXLFUY5YWDJG1xGVmt5lPshLjO iuagoc4XoPwD3tpPg7/wQXOgrAoU5yaBGw94OSX3iQk50WqH9TaTQLs7KxCcelndbOcx U/1yRq/i8tFBNb+zLs0M519EbNJ6mG0qla1cUsJ1QsY9RV9CSt0kq200DSmcf46LIxJk yYAdaH6CRXbKpO7XeBMFYgRgHnQX6XeE0m86l0fSoaW+vzr6tO5hIwNpgwApqlOQJDqC 1orhE71witOOgKziJhrfcOoF+tc4L0DICuKnNBCa5RlU4xjXD+YxAgaph7Q9x0wxyZNR L5Mg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=ZIEAe1b5; 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 v127-v6si17142645pgv.89.2018.09.03.03.03.31; Mon, 03 Sep 2018 03:03:31 -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=ZIEAe1b5; 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 S1727963AbeICOWy (ORCPT + 32 others); Mon, 3 Sep 2018 10:22:54 -0400 Received: from conuserg-08.nifty.com ([210.131.2.75]:36731 "EHLO conuserg-08.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727480AbeICOWx (ORCPT ); Mon, 3 Sep 2018 10:22:53 -0400 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-08.nifty.com with ESMTP id w83A2AsZ026175; Mon, 3 Sep 2018 19:02:13 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-08.nifty.com w83A2AsZ026175 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1535968933; bh=5DEAVLYNT2UxIc616OOqQRoQO73TpNyg7DB67C2ydDo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZIEAe1b5hVqzmTTdqTk65ggCp/B91lTLI3PlR2aJpElNlFIwFVjhtSO1N/ALniKyW jlX32qyPjiR01h5/6PEKd62ptEh5l7One5QyuU4HIukZZyC9a98trw7r7j3nYQx50h bWfnyy71L8YJED3tEjnkkJ8DlsKBIZ49pSJSso+oi23++Va/7TjpJGhku6dONzC7MO vd4vRc8wnwpJUR6wWdr51GOhguuRyTxjmZE5yh2ITznAvaWvPz79Z8XvUmIqDDP3Xi c7CMO25i9kfBXJuAnmokTZokzG9YG6pfe4dadXu98By3Tfq3YNAQFLnSeKkxaVPL7z luWiR1boZZdeQ== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Sam Ravnborg , Javier Martinez Canillas , Laura Abbott , Jiri Kosina , Ben Hutchings , Michal Such???nek , Takashi Iwai , Masahiro Yamada , Michal Marek , linux-kernel@vger.kernel.org Subject: [RFC PATCH 2/3] kbuild: rpm-pkg: hard-code ARCH in RPM SPEC file Date: Mon, 3 Sep 2018 19:01:55 +0900 Message-Id: <1535968916-9159-3-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1535968916-9159-1-git-send-email-yamada.masahiro@socionext.com> References: <1535968916-9159-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 kernel source package contains the .config, which is ARCH-specific. Obviously, the target architecture is specified when you create a source package, instead of build-time. Record ARCH= in the spec file in order to avoid uncertainty about what ARCH should be given for building. Add 'ExclusiveArch' tag to stop building immediately in case a user tries to build it for an unintended architecture. Signed-off-by: Masahiro Yamada --- scripts/package/mkspec | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) -- 2.7.4 diff --git a/scripts/package/mkspec b/scripts/package/mkspec index e05646d..f72c46a 100755 --- a/scripts/package/mkspec +++ b/scripts/package/mkspec @@ -26,6 +26,14 @@ if grep -q CONFIG_DRM=y .config; then PROVIDES=kernel-drm fi +if [ "$ARCH" = ia64 ]; then + INSTALL_IMAGE="mkdir -p %{buildroot}/boot/efi + cp $KBUILD_IMAGE %{buildroot}/boot/efi/vmlinuz-$KERNELRELEASE + ln -s efi/vmlinuz-$KERNELRELEASE %{buildroot}/boot/" +else + INSTALL_IMAGE="cp $KBUILD_IMAGE %{buildroot}/boot/vmlinuz-$KERNELRELEASE" +fi + PROVIDES="$PROVIDES kernel-$KERNELRELEASE" __KERNELRELEASE=$(echo $KERNELRELEASE | sed -e "s/-/_/g") EXCLUDES="$RCS_TAR_IGNORE --exclude=.tmp_versions --exclude=*vmlinux* \ @@ -47,6 +55,7 @@ sed -e '/^DEL/d' -e 's/^\t*//' <