From patchwork Mon Jan 22 15:44:42 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 125439 Delivered-To: patch@linaro.org Received: by 10.46.66.141 with SMTP id h13csp1222498ljf; Mon, 22 Jan 2018 07:44:52 -0800 (PST) X-Google-Smtp-Source: AH8x224/l8a7p3tACsfU5xwCxMorpJlDt4cowKit/IqUn0enAkTpiXShE7sXR4Fg2kZkvr5fH/R9 X-Received: by 10.36.48.198 with SMTP id q189mr8386963itq.83.1516635892644; Mon, 22 Jan 2018 07:44:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516635892; cv=none; d=google.com; s=arc-20160816; b=LdzM18qk8S4MfvDfgY3OEacFITQnz1n7ey3yTVIeMjKz1MG20/NjYtyYtxYJjB/RNN SpLGwPjiDqz2/JiGyqLa5xfttqLd4saZ8qlQDqBT734sBATnVwyxaf4bWST9jn6XMm0n nCOzRDa/KTuUAFSBQn/wxTzaM983tYaCdZXa/3ma8AHaUVPOy7QtF0pznvuZ2q8r6HvL fqOHT4Ac9PVycvAw3kGZ8339zeGHmSoiGkJ8deaTlCY5GuKSuRf+Lr8XBrtK/xKOHaJj nyjFCw031TuiHa/6+V50h/MW9Icy/91dyMjWD6UsqZ9s/BwbV/DtPJM3FEKK5iaf0yJz HqTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:message-id:date:to:from:dkim-signature :delivered-to:arc-authentication-results; bh=PaT2SEgs/VZPDIN/rUJXk2qa8RZlwnEzMJtKp4csLRI=; b=OKyyrzdZ0AtdE5er05UgPT6YrU9ZzP1Z3lSZSW1FA+NDyPeXd/G6nJa6M9P7KUZQFU DvXQR1esyuDIgDnhd3xXmS3zjgUg4Hgj8R6zR/A3Yg7tcqTIWNEuHoVA8j0xMWnf2H5i i3lF0NHGOdxIx4bk2qL+tgFpe+5QayG4Ic6JHczTIC3K0NWwncj1ZGmpNYzl2sr+0Q+J KPn4da2nY79HNAh2w8xPT52h558wjpgnq+vMmofNLsOV3arvJakecskCgagxJ0y10hLj tqXKRcNotY2fCI3V6rOKDs9dh7B4eL1esz9JKc5RYyeo/0iMiIeWbUjhtE343KwTZACk 36aw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=j1IV6Lxx; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id h8si6246335ita.37.2018.01.22.07.44.50; Mon, 22 Jan 2018 07:44:52 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=j1IV6Lxx; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org Received: from layers.openembedded.org (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id 9C0C87863A; Mon, 22 Jan 2018 15:44:45 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-wr0-f196.google.com (mail-wr0-f196.google.com [209.85.128.196]) by mail.openembedded.org (Postfix) with ESMTP id 556E87863A for ; Mon, 22 Jan 2018 15:44:44 +0000 (UTC) Received: by mail-wr0-f196.google.com with SMTP id z48so9169719wrz.6 for ; Mon, 22 Jan 2018 07:44:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id; bh=rVON5cfaAFEnhwXvx1DI/9yukm72dhvsSiHNNIcwuSY=; b=j1IV6Lxxf/38eDgryBJP+AJYkNGWjL5cZCsHkmKGszUyYaTCxwtkwAe9e0xRj4y9mP etZRb3XDQkP/hfyBepLuU1xDh+wSGUeBDQ4aOL4RKN8w24OSKAMKCWfIuBT+4pgYm0W0 Aq8o9wCw5vse568iH67rkPZzcF0xpES2NBcjuapr2cyRpon7/ltpT6rAOWPjY8acP3hg cLRY2KlSo3wWuhrBMxlDTqzeunlu+Fd3viQpVJ57vDlRnVFlL5v04F8IrI4WGJY02hkz dYatE9uZRmJGt3tozrwEAWNkHX5EgFPrWLa3Ed1kW9wEaeGjXmLD3t4+/IT381BHShB0 Rg0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id; bh=rVON5cfaAFEnhwXvx1DI/9yukm72dhvsSiHNNIcwuSY=; b=iSk1UkLGdVMF7S0WVvKER1CfZ8RoG6tF8bR5+d75TlEfThHTytsPJDKDWi5a6/n0JR 9CUgB5bih+txAO/zmS1nsU/Kc8t6oIAo2E6cBjIROw77wTfrAEpoYBFQ+6O5KGly0uta asYpyEYT1kpHIN7LGKhRCUMdaP/2rn96q1ojSbqnMGaVQXqSRHOJxKwkH73+pQTJ2kVd RUO93xLhhbgbez/UKROXX4Ab9itBRJKLauFv4HTKowqiFWfVYGHWS6YB+jgq6ix4Duex H9yKVKuN7WuNkB4OOWjz8X/wuHsruLZPPIdzQHk/HNTelHDubtUQOvJYTR1tYa2mWJfk Vxmg== X-Gm-Message-State: AKwxytcXq2v3n/w3kcuTv6bsztwfXUkNgAn/mi73tXekU7Cd8TOeaFwm GUuk/e+mG48l3lCVMGg8GhqKl+Tw X-Received: by 10.223.167.14 with SMTP id c14mr5323984wrd.123.1516635885001; Mon, 22 Jan 2018 07:44:45 -0800 (PST) Received: from flashheart.burtonini.com (home.burtonini.com. [81.2.106.35]) by smtp.gmail.com with ESMTPSA id r75sm8843172wmf.25.2018.01.22.07.44.43 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 22 Jan 2018 07:44:44 -0800 (PST) From: Ross Burton To: openembedded-core@lists.openembedded.org Date: Mon, 22 Jan 2018 15:44:42 +0000 Message-Id: <20180122154442.23769-1-ross.burton@intel.com> X-Mailer: git-send-email 2.11.0 Subject: [OE-core] [PATCH] package_rpm: correctly handle LICENSE_${PN} X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: openembedded-core-bounces@lists.openembedded.org Errors-To: openembedded-core-bounces@lists.openembedded.org RPM spec files don't distinguish between spec-level license and the primary package license, so always output the License for every package (defaulting to the recipe-wide license) and use LICENSE_${PN} if set for the primary package. As the primary use of package_rpm is to generate built packages, this fixes the license fields in the generated packages. [ YOCTO #12057 ] Signed-off-by: Ross Burton --- meta/classes/package_rpm.bbclass | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.11.0 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass index b08608c8466..3cbbd1eb537 100644 --- a/meta/classes/package_rpm.bbclass +++ b/meta/classes/package_rpm.bbclass @@ -382,6 +382,7 @@ python write_specfile () { # Gather special src/first package data if srcname == splitname: + srclicense = splitlicense srcrdepends = splitrdepends srcrrecommends = splitrrecommends srcrsuggests = splitrsuggests @@ -421,8 +422,7 @@ python write_specfile () { spec_preamble_bottom.append('Release: %s' % splitrelease) if srcepoch != splitepoch: spec_preamble_bottom.append('Epoch: %s' % splitepoch) - if srclicense != splitlicense: - spec_preamble_bottom.append('License: %s' % splitlicense) + spec_preamble_bottom.append('License: %s' % splitlicense) spec_preamble_bottom.append('Group: %s' % splitsection) if srccustomtagschunk != splitcustomtagschunk: