From patchwork Mon Nov 11 22:13:34 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 179155 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp7263210ilf; Mon, 11 Nov 2019 14:13:54 -0800 (PST) X-Google-Smtp-Source: APXvYqynVGzh5XCvVEAYh8/rasTf2TCDF0QleTltEh+yawvipIDc6mqB5gKtcBoBL+5VanF+XLUu X-Received: by 2002:a62:8490:: with SMTP id k138mr22881738pfd.186.1573510434317; Mon, 11 Nov 2019 14:13:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573510434; cv=none; d=google.com; s=arc-20160816; b=MlnA9Jiy4RefhYtX6yzuGzu89MZUR2fWoi6xGSfvL8hkBEhYkBCiIMn+pGhoEttDKT GsfHh7q7fq634Itq9noMrbLcabyi9/gCAIS7JW+VRuQ5pe4Ve45mW1I4YcanvC5EY91s N7eKY1u50OMvdnT1kWrxdUUpEgIMaXhJ1IQQu/2+m6ZP2bPGroxA+vofH1rZFP8v+R4R sZZhuosGR4K2QDpwTS0Ojz/xK6n0mjSo0dSNjnzQbfeZGFhb30lPNlhQAwFY/3uIRXat pkVonHa5YNXnmwKFn3sOPxk6Y3tvjYwg37KqCITXm6vbr2VrNhXOFpNfzB5UJv2OYwCh n2wQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:message-id:date:to:from:dkim-signature:delivered-to; bh=z2wTL46904tAm0Pqx1kKNWZdaS8FvssyWyrwpM2LYZA=; b=dTIH8qOa34GF1/+qAwIoiR9i0sMSc9qI8xb8D+OTgRMhq6HIhmdkQSo6QYUH88touY wWcOvnfy35/tCg2UeTSQNv3Yo7LIpnNDU0LtFhBgCsrp/tm80hIyuOG6VEz+PHY1j0Ih Rd9pPLUC20qmC4VxSI6LorZX53l20i9BCYF6zX88t3IBb0Os0OLh0a+Q0U1j77hbllkH eOD12nIm6rEP2X4BruBaUI1umTRwuYvfO+NPvvlAkDZTPJK3Q6XzOb3YfXspCGhYIpZS u0YmIDV05LE0CF/nlvas6ZPiz9uK1khxBdLPNB2r9vRkpSYMsHhXihgrHOnPVGsyjbqO pICg== 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=YMTFPrut; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id g23si19373854pgm.405.2019.11.11.14.13.53; Mon, 11 Nov 2019 14:13:54 -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=YMTFPrut; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from ec2-34-214-78-129.us-west-2.compute.amazonaws.com (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id 403387FA88; Mon, 11 Nov 2019 22:13:45 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-wm1-f66.google.com (mail-wm1-f66.google.com [209.85.128.66]) by mail.openembedded.org (Postfix) with ESMTP id A78ED7FA88 for ; Mon, 11 Nov 2019 22:13:40 +0000 (UTC) Received: by mail-wm1-f66.google.com with SMTP id b11so951849wmb.5 for ; Mon, 11 Nov 2019 14:13:41 -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:mime-version :content-transfer-encoding; bh=rWeYatW3qrAK2McH4FAaYl6YFFDJukQ8lNRElosSY2s=; b=YMTFPrutYrRq7OGhmP4i6iuA8hXSVtPaVMhjQLshi9MlHf+tSjOx6nIrjRcfG6oV+Z JYwo3FkqzcF2Bea6fLg/ME3HHDBExICg2xS/qFN1uyZbKrgxldjzrNsgvB/xVqOK4r9+ 9wqbC0dr4Z0hfWplaUXjoSQxaDZQa8ORPxi8dwY+6GT70xnJH1QCXlTof/MILwkCF7cn 995CSltR1xKkqr5MJ/XhDEs6J+QoIKmqqONAYxrCqAx/tGzRjM4nSUlVBBSipIXB4buh xvRnkvylrb5M8I6tsdEL+diQ/e7o69aNezhSO4skQTqENxmzKyO+aPlPQV7cw2YrCatl ehMg== 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:mime-version :content-transfer-encoding; bh=rWeYatW3qrAK2McH4FAaYl6YFFDJukQ8lNRElosSY2s=; b=nkxHd6oFjSroPsWx7EOJRhsXK7/uqNUUzR3v7Z5YbsgjsA6iqV6mjDVviLZAUMfa/u +UfHHNWBHxfcNjE6yq/Hk9wFRXjAwB7a6VNO4eBydSYBIsJd1lRtxJs4DNlNk7Fclfir wAZDlUQmzBqwmkrezX6aFkaU5iSqFjpFJ+T68IBTxF3npdBvargErmoO+0SPnZ18BotX GptaM1WMAEQrpJyqGjgEznl2+e9kikh2/b8xdS22Q+YniZlr9SGvYciaIN574PonGcrS NLJjA3AJKsdCKABwOGiTgsNRKmBNzNcw61bVCCPAOdPBfDKrtJl26IMvylvgDgN647bj tCig== X-Gm-Message-State: APjAAAVWkUOLBGzxJN6bQwBjFe654pUdkI9lc9Da2mEZpLNxCT2m/fD3 5jtzSPBHoUL/uqN2vRV2ErDMJB6Snio= X-Received: by 2002:a1c:152:: with SMTP id 79mr988658wmb.70.1573510421037; Mon, 11 Nov 2019 14:13:41 -0800 (PST) Received: from flashheart.burtonini.com (35.106.2.81.in-addr.arpa. [81.2.106.35]) by smtp.gmail.com with ESMTPSA id d11sm24900083wrf.80.2019.11.11.14.13.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Nov 2019 14:13:39 -0800 (PST) From: Ross Burton To: openembedded-core@lists.openembedded.org Date: Mon, 11 Nov 2019 22:13:34 +0000 Message-Id: <20191111221337.20332-1-ross.burton@intel.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Subject: [OE-core] [PATCH 1/4] cve-update-db-native: don't hardcode the database name 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: , Sender: openembedded-core-bounces@lists.openembedded.org Errors-To: openembedded-core-bounces@lists.openembedded.org Don't hardcode the database filename, there's a variable for this in cve-check.bbclass. Signed-off-by: Ross Burton --- meta/recipes-core/meta/cve-update-db-native.bb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.20.1 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core diff --git a/meta/recipes-core/meta/cve-update-db-native.bb b/meta/recipes-core/meta/cve-update-db-native.bb index 19875a49b1c..c15534de08b 100644 --- a/meta/recipes-core/meta/cve-update-db-native.bb +++ b/meta/recipes-core/meta/cve-update-db-native.bb @@ -28,8 +28,8 @@ python do_populate_cve_db() { BASE_URL = "https://nvd.nist.gov/feeds/json/cve/1.0/nvdcve-1.0-" YEAR_START = 2002 - db_dir = os.path.join(d.getVar("DL_DIR"), 'CVE_CHECK') - db_file = os.path.join(db_dir, 'nvdcve_1.0.db') + db_file = d.getVar("CVE_CHECK_DB_FILE") + db_dir = os.path.dirname(db_file) json_tmpfile = os.path.join(db_dir, 'nvd.json.gz') # Don't refresh the database more than once an hour