From patchwork Thu Jul 18 20:03:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 169215 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp2838721ilk; Thu, 18 Jul 2019 13:04:08 -0700 (PDT) X-Google-Smtp-Source: APXvYqz7/Z8UE4mDnhhqZWXKYXhTQAvTSo0uDF4eWoa5dfWrSqssROVk5tlXAZmzAufnMdwAXNOC X-Received: by 2002:a63:c013:: with SMTP id h19mr19101341pgg.108.1563480247953; Thu, 18 Jul 2019 13:04:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563480247; cv=none; d=google.com; s=arc-20160816; b=K88tOy82CrL8IPA+O1bOZRsQl3gHQmLkTkudDAXlXRfFhHC3/6XNB5VsOi08rR/ZYh eBve6hbJqGpLW6d5/zhgXjjavQPgxt1qSlc4nRzTk/MWq4yx9LFlhEWfHIgku7A2LeNX c4ajBlyQc6FRf6W9j3Igdp0YxTMjd92fkS+jKteiIAh2SyvfdtHUWJoOozkhOioAkUlz vJ2fP01Kku6yT31K+hmu91EcoyTj9alFP0haj1TOaW/MxdgQz6XsZzriTl0dAmi/VcWN 3QRjElXYuKDgtTXvt5tuZCeOi3piLQNBffNl5kvC6VAiXZWxWTx3CkUbTGTPRkCVPLLn X4nw== 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=AU6ZPLwFFdlYMNJl9Op0Gqs7yz4uRQr3hmA5xv2ai+4=; b=oSUdVAvklVKHJKr5pbWgyaXC3lEMAi8CtVy6Ag8BMuibGlqgGFmojUYlCxuwXvmTuR lmL4ZLc7GMW60HWej9tOr70nCdXbaS+alcV36YfnbzAqjQV/G7kO8s/R+xugbormVG/v 3mBVGXUmK38QgsiBYjaE6RTKb0ANKFdHfq3TWFsotNNR/gDQHEiqIxYi/vhf7rlK+sNj Au4ae3Bn4X/6ZS0HxePKMyMDpe5/B8MjVxWrqRGf64xZ4xPCpp7zztnXzjmIp4gW2s3q 8IvB45ItPR1Y6fMyGreIKRNSR6k53P5CfqFDMv9q9iICSj7r1sFmCMMQghxX3ZDfFQ/Z +5VA== 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="lwsl9/7j"; 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 q12si1647494pgt.447.2019.07.18.13.04.07; Thu, 18 Jul 2019 13:04:07 -0700 (PDT) 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="lwsl9/7j"; 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 620BF7F036; Thu, 18 Jul 2019 20:04:04 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) by mail.openembedded.org (Postfix) with ESMTP id 395157EED0 for ; Thu, 18 Jul 2019 20:04:03 +0000 (UTC) Received: by mail-wm1-f52.google.com with SMTP id v15so26762494wml.0 for ; Thu, 18 Jul 2019 13:04:04 -0700 (PDT) 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=MRY8twQbB4kLOeIAk60Sx+YuDxGOWCMZT8O+ttNJhus=; b=lwsl9/7jVpVq8ICiAqN+BigheBOiPYes9YVepv6Ac7eJgqUxAZuX2GBhN8gIXcau9k 8DvdJA+T3MGmWMA7mnliBKlnnCR6LY0QzgHDHXr7gQu2+3ZoU8cc5yC8jQYpdlr2aaMU q6O9Ll/sbpbrGr5YDGz1wgv9qDJXuzK+RI6H3JGt2r/252CNM0ybhu8CVfGBD8Z8r++t akqrY3zL/ZSQKG4HfaT3fbhcbwZ25V5dJbi3dccDbexvQhvNqPXAEWtUwPThGgeE/Rno e1HwpD/QNboPkpAduwwKUd63lWJZs0ng0EaiWISG3j5rKxWQr66zmbp8KeUSI0MLGcub 1KFQ== 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=MRY8twQbB4kLOeIAk60Sx+YuDxGOWCMZT8O+ttNJhus=; b=HKY5qyBNZWl1XkDZLuqTe3TRFYrza39e8WVTApMVs6Und8mob+EBimXgCnbIxrZFyP mRJP9Ug36knXLD0arpcN6btLenKR4UAO79Ody+RXkwbHGZbGBqhfUpRwMZkrmSvisqWJ e/2CldlFfnvHjkpl9W0TjjWz/3LTFMBuHsH6ygKY8z3APZ8tS1KAeqc7QtsURQVEApC5 8H7ZEFYvOe4DdkAnagl8R9aqx9jekLmReF36rVD61RRTsepkapeMJA4kK6ECKfRHh6BT WNGD3QRFk5XSd9+QiMuKhtjuVnDVOZeyzsXRpaW7KKFaSa8BnFccIM6PYHT2jSTcbxmj q41Q== X-Gm-Message-State: APjAAAUSCgnR60Y1D35/khb027AIIW2yh7KIEsBNkE9Nofh2sMGILS2l BDki+gQT4kwWY1G+HzjklJw8RAGdCO4= X-Received: by 2002:a1c:f409:: with SMTP id z9mr36638356wma.176.1563480243625; Thu, 18 Jul 2019 13:04:03 -0700 (PDT) Received: from flashheart.burtonini.com (35.106.2.81.in-addr.arpa. [81.2.106.35]) by smtp.gmail.com with ESMTPSA id r12sm35331858wrt.95.2019.07.18.13.04.02 for (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 18 Jul 2019 13:04:02 -0700 (PDT) From: Ross Burton To: openembedded-core@lists.openembedded.org Date: Thu, 18 Jul 2019 21:03:58 +0100 Message-Id: <20190718200400.19750-1-ross.burton@intel.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Subject: [OE-core] [PATCH 1/3] cve-update-db-native: use os.path.join instead of + 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 Signed-off-by: Ross Burton --- meta/recipes-core/meta/cve-update-db-native.bb | 8 ++++---- 1 file changed, 4 insertions(+), 4 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 3519beae5fb..9047513dbdf 100644 --- a/meta/recipes-core/meta/cve-update-db-native.bb +++ b/meta/recipes-core/meta/cve-update-db-native.bb @@ -29,11 +29,11 @@ python do_populate_cve_db() { BASE_URL = "https://nvd.nist.gov/feeds/json/cve/1.0/nvdcve-1.0-" YEAR_START = 2002 - db_dir = d.getVar("DL_DIR") + '/CVE_CHECK' - db_file = db_dir + '/nvdcve_1.0.db' - json_tmpfile = db_dir + '/nvd.json.gz' + db_dir = os.path.join(d.getVar("DL_DIR"), 'CVE_CHECK') + db_file = os.path.join(db_dir, 'nvdcve_1.0.db') + json_tmpfile = os.path.join(db_dir, 'nvd.json.gz') proxy = d.getVar("https_proxy") - cve_f = open(d.getVar("TMPDIR") + '/cve_check', 'a') + cve_f = open(os.path.join(d.getVar("TMPDIR"), 'cve_check'), 'a') if not os.path.isdir(db_dir): os.mkdir(db_dir) From patchwork Thu Jul 18 20:03:59 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 169216 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp2839068ilk; Thu, 18 Jul 2019 13:04:25 -0700 (PDT) X-Google-Smtp-Source: APXvYqwHMF/6zvUyBXYZFyTG93YPLdK8Q+c+t1Z8rP0MqozEDgQOhh49Sul+Hej2hUCRvHIdTeGw X-Received: by 2002:a17:902:c509:: with SMTP id o9mr52892831plx.222.1563480265101; Thu, 18 Jul 2019 13:04:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563480265; cv=none; d=google.com; s=arc-20160816; b=E2Uoo3O90FcVGr4yvz9SjXfFOHWhQbpbWn+Hb5MoAJCsCRtvxEOXv2jrDWmhZfBxqF g/H9uOSy9xRvDaEFD9BFwp348ogT235aBUcxZdZySuQQkxcMBxrfLzZsiQi3Pc8eYukr F+F8YRSlYa7CMHzPbghP4MLzYcTadoEqAVvmq1GH0X+AyW01rhx/9PZ3KKqGRuEagbPj FuDodqwdZL/dWOo2nJqDz4CfrdlkU0HqL0yufyg492IVmHhrjYaJNosnOF1tNudwhsft D/6T0DgqeePgo1GZbhNpQNnk5gZPk82EDYUmO2lvi0v8d5mAZm2vJfbJG//W7TOotYqF piRA== 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:references:in-reply-to:message-id:date:to:from :dkim-signature:delivered-to; bh=EtiD5jcrvfo0V+O1IMvaExvHexuFf0F081daGIP05RE=; b=roVD9mXSjoLBGfPlK9yTzSEUzWBCwtYS/QoG3XUO4JtxU+RvJb4jSNumxHeA2lCnuM YW51JeTsZ/FdWX77HpPH4lKhfxpamejaXr1WLjj1p2EIg0q80YOXUE6nA4eagWFgrdQx i868yzOTRBvJ8ekT0fo2anX6P9AKfShg7eTen8nhemfppxrvyLJRBtFRGDOe6xecJSBA TsLj1EAR8e7pfmfuiC3MV2sHHKGMOtHTr4LZMQ2UhxFFe9EJEVE9Hx+do/PH9KXLJUlA Adl4IPw6vtVmAOW8228v3Kpy18xDiVIqudPeyttIEtA92H++hJ/qZc89BOhhDjMgAVKJ lyaw== 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="s5/CMRVz"; 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 h65si2721464pfb.18.2019.07.18.13.04.24; Thu, 18 Jul 2019 13:04:25 -0700 (PDT) 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="s5/CMRVz"; 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 0B36C7F02F; Thu, 18 Jul 2019 20:04:23 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-wm1-f65.google.com (mail-wm1-f65.google.com [209.85.128.65]) by mail.openembedded.org (Postfix) with ESMTP id 1F30E7EED0 for ; Thu, 18 Jul 2019 20:04:03 +0000 (UTC) Received: by mail-wm1-f65.google.com with SMTP id g67so22759646wme.1 for ; Thu, 18 Jul 2019 13:04:05 -0700 (PDT) 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:in-reply-to:references:mime-version :content-transfer-encoding; bh=EpcFY+nWMv9R2Q8oZaFjWtRsV6TVZsvuJUHZu2VcCAQ=; b=s5/CMRVzyH7OmbTVrOPy3g9Jq4zlMJOg532vwA6jWPUSzJO06VwU/n0YHKLrTY6BK/ BS538+++8MzIe492ugFLGfrcte5/uT0HLht03ted2ekhTWZSgFLyRY/NpGQViRoTbnDz BdZoRV/dlBRNRhQUTNgfuh9foVLXQRUzB0qYZrsPKGqu7ve96O8PvYqxtsNyvWiaCeFR 8cpoU4VZ8VkmsvpHbjHuc2wXHIMgFU4/FXrrKjTDjW2HdU6ka5SgyT63zBaxJEu+0fPk VGXAC12XnDoO5jcUKyP/dh9D7KR2AhXW4YzHhgvyT7U+mnDOimIW26gEiZuwFC4te+RU Z7fA== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=EpcFY+nWMv9R2Q8oZaFjWtRsV6TVZsvuJUHZu2VcCAQ=; b=i51bfUVpk8QfHm1V4YlUZlIMUwV/4fq1LU6dEj/vSiuwlW1qPT1tNwmOXHgeOGtEVO 3/7ZiT5GZ5yiPzORjEHDXs2mgcCVF/XvGqzZpeqEsIYNKSG5uDm8zxhZODJpj8EkGXMK nJgaAGRkrmYfHJgIyUf9iX9VZempm/HmK/d7+5QFXzo44hMt4FClM+hd15bbs4V5Hq9k mUhjeRTDxRguJrMP4AAXU/TxlTBqYgPmFzDixzNkPSAq4cctXdO4aL+RNuq6vC2EGvpI iHzcgWcQo4sK9zojSgVFMokhdtR2O9IcxddbNhKQzHiLLlYfJ8iRC/EtnEnReKn314wN dA+A== X-Gm-Message-State: APjAAAWP+ZYimY0XjyfYS5e8iUnL26XQJ6QFzHo5vD6ih1gfaLt20xu9 NsKvjMwM8GQ4kpfEmXhyugmA8YCfFos= X-Received: by 2002:a1c:96c7:: with SMTP id y190mr40414010wmd.87.1563480244475; Thu, 18 Jul 2019 13:04:04 -0700 (PDT) Received: from flashheart.burtonini.com (35.106.2.81.in-addr.arpa. [81.2.106.35]) by smtp.gmail.com with ESMTPSA id r12sm35331858wrt.95.2019.07.18.13.04.03 for (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 18 Jul 2019 13:04:03 -0700 (PDT) From: Ross Burton To: openembedded-core@lists.openembedded.org Date: Thu, 18 Jul 2019 21:03:59 +0100 Message-Id: <20190718200400.19750-2-ross.burton@intel.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190718200400.19750-1-ross.burton@intel.com> References: <20190718200400.19750-1-ross.burton@intel.com> MIME-Version: 1.0 Subject: [OE-core] [PATCH 2/3] cve-update-db: actually inherit native 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 The recipe was called -native but didn't inherit native. Signed-off-by: Ross Burton --- meta/recipes-core/meta/cve-update-db-native.bb | 3 +-- 1 file changed, 1 insertion(+), 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 9047513dbdf..cabbde5066c 100644 --- a/meta/recipes-core/meta/cve-update-db-native.bb +++ b/meta/recipes-core/meta/cve-update-db-native.bb @@ -2,9 +2,8 @@ SUMMARY = "Updates the NVD CVE database" LICENSE = "MIT" INHIBIT_DEFAULT_DEPS = "1" -PACKAGES = "" -inherit nopackages +inherit native deltask do_unpack deltask do_patch From patchwork Thu Jul 18 20:04:00 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 169217 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp2839158ilk; Thu, 18 Jul 2019 13:04:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqyPJzFhpApEsp4RfsI2mevg1zfmUh1HR1d4eK+4aXMG7ykKo5/sUZEjqdIXSC//apR/r7Y8 X-Received: by 2002:a17:90a:1a45:: with SMTP id 5mr54088327pjl.43.1563480270384; Thu, 18 Jul 2019 13:04:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563480270; cv=none; d=google.com; s=arc-20160816; b=HYjsT1gbXeRhu9ZEmrjXkVkX8PsjNfW0yXhQR50xMmuQrQgr59ZjQACcrUsoxfQI75 51CYs17mGjC9hwixFGQXmV//yiSmS4YyANP4/VXnLGus8iXJ0Li8eT9y411qIAW56R5Z p6c/PhvEIITgB9s05HPUyeLg1+IZipXNOcNk/C+8otHnwVZcauCvTyuk7e3lgBLS6ej4 YgISmcsFL92CHBWC+dXLG7hpF2yWdBmDnHFisuiRvtvRf667mIPcErJGZmUsZej64bnx 2wRP1/kgyuR/+tdEN9oO3m0qgF55FRFVM/BsglRThNu2M1sF2sVAeLmdCNKP87AyAXib VcHw== 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:references:in-reply-to:message-id:date:to:from :dkim-signature:delivered-to; bh=WPlPYgbHty0QkVBaijhWgCE+uCHe5HobssU0pRsBoeM=; b=sZJ5MIzqSHgJ+Saev979rsYqHN07dQX7B4FoSRQeBeFuNbUPSq4udj6vvotBUqA2gB DzRvmLgQRdP7Ab8URqeT1NYi1iijusMqDkHvMIvPq2ubED3m1eqaXGjHyapz9G2gYKQF ZlijRtLyjybII5mnDE6AmPY6mNWXZ4OWQoOnL4GplSuPWZtvarsYbkAcDg0hPZgDWN2u 3YtFgjkTFYCZKhroSUV4FRKdgPI8U+jzEZDygsyyvbFfXJFyL1sIMKP5OF+YZjfVQDG+ w7FSHZaYJStvsVKZNf0UsJFCa0exZ9WXqr4vOIsQ/Q2GES7Xy++p8Yt/9qnVzC5otLRn ZPvA== 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=uFteZaBo; 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 c1si67717pgp.105.2019.07.18.13.04.29; Thu, 18 Jul 2019 13:04:30 -0700 (PDT) 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=uFteZaBo; 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 5FCA67F081; Thu, 18 Jul 2019 20:04:24 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49]) by mail.openembedded.org (Postfix) with ESMTP id 03AFE7F048 for ; Thu, 18 Jul 2019 20:04:04 +0000 (UTC) Received: by mail-wm1-f49.google.com with SMTP id x15so26742010wmj.3 for ; Thu, 18 Jul 2019 13:04:06 -0700 (PDT) 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:in-reply-to:references:mime-version :content-transfer-encoding; bh=BcPcGSJZjembycdGvjortxGHcKvVMam91E2fyF024d0=; b=uFteZaBo7YH/s4oOSK2zkwsrLH3Ypm0FFeyXSfPx169/TIvDEDYgwUu/f6n4cOI3zY DOGCDy6IFjDnpH+CXEAyBS2DhIGJ63NKLPibOz/W6qGYhksQqDawwphjyzCe+TqV5/qa 04y6OAuoyzCp3SfSo4mT60JP2aiOqYga4uGNruEwG4tuUtekEX5Fvfz1AULhgtq7lPlI P5zcTqy40k0aGwk3/TeV61Q0eTxhECTxwlA1eMkxuxlsIQM8VlM439doo5csrnpm4gQ1 Cmy4yCkR3T30ZGRl1Qi6rsXHxlVES/jilwi5tZ2x9pF+X3pIF2Tm18Ia1gLmRL9rhOay 6kMQ== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=BcPcGSJZjembycdGvjortxGHcKvVMam91E2fyF024d0=; b=DNdRcqGp0Y2yRZ8UZJ8V9lyVlgugfCARGukFks1Zf8mZ1M47SsyR0VtQnmsvENfUVb Fmn83+AGMeVkGHG6Ez22ccZqaMhUFmDUKjVcxcHNpq3/rCzaeJot49bG2+15/fxRV/Gt mAROd3smwQxMqn1bo/7APNmbb9/K5xGQTSuhsedRB0BinSKj+r7eAuuvLqvi7Hdn3WnJ uRIzcdRMDpZINwqekEQlelFw8zLLQXjbcEjsE9KyiANxp0yqNutCj2mbdPWHZ37WjLXr Q1a1O7TuUUtuuyMuHpUfGh4+S0qe3OmARysMsTaYCjCHMqF1JWe7wLq6oVISDN6WNqLN XpnA== X-Gm-Message-State: APjAAAUvHITWXJP0DEjRQYXO8Q63/Ii+z3Rkq9EsZHDsJABl/9MNT4ET xV5ctlhb9rEsKS/7vtZ1cl8We7x6iGA= X-Received: by 2002:a05:600c:23cd:: with SMTP id p13mr40391215wmb.86.1563480245512; Thu, 18 Jul 2019 13:04:05 -0700 (PDT) Received: from flashheart.burtonini.com (35.106.2.81.in-addr.arpa. [81.2.106.35]) by smtp.gmail.com with ESMTPSA id r12sm35331858wrt.95.2019.07.18.13.04.04 for (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 18 Jul 2019 13:04:04 -0700 (PDT) From: Ross Burton To: openembedded-core@lists.openembedded.org Date: Thu, 18 Jul 2019 21:04:00 +0100 Message-Id: <20190718200400.19750-3-ross.burton@intel.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190718200400.19750-1-ross.burton@intel.com> References: <20190718200400.19750-1-ross.burton@intel.com> MIME-Version: 1.0 Subject: [OE-core] [PATCH 3/3] cve-update-db: refresh once every 24 hours 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 Check the mtime of the database before updating, and if it's less than 24 hours ago don't refresh. This saves the HTTP fetches to determine if the data has been updated. Signed-off-by: Ross Burton --- meta/recipes-core/meta/cve-update-db-native.bb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) -- 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 cabbde5066c..2afca94fc6b 100644 --- a/meta/recipes-core/meta/cve-update-db-native.bb +++ b/meta/recipes-core/meta/cve-update-db-native.bb @@ -22,7 +22,7 @@ python do_populate_cve_db() { Update NVD database with json data feed """ - import sqlite3, urllib, shutil, gzip, re + import sqlite3, urllib, shutil, gzip, re, time from datetime import date BASE_URL = "https://nvd.nist.gov/feeds/json/cve/1.0/nvdcve-1.0-" @@ -37,6 +37,11 @@ python do_populate_cve_db() { if not os.path.isdir(db_dir): os.mkdir(db_dir) + expiry = time.time() - (60*60*24) # This time yesterday + if os.path.exists(db_file) and expiry < os.path.getmtime(db_file): + bb.note("CVE data updated less than 24 hours ago, not refreshing. Delete %s to force update." % db_file) + return + # Connect to database conn = sqlite3.connect(db_file) c = conn.cursor()