From patchwork Sat Feb 22 08:57:07 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiko Thiery X-Patchwork-Id: 1242460 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.136; helo=silver.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=EunBcfFj; dkim-atps=neutral Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48PjGv5rxtz9sRJ for ; Sat, 22 Feb 2020 20:10:47 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id DF68520119; Sat, 22 Feb 2020 09:10:41 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 3eqUyaN-ntmF; Sat, 22 Feb 2020 09:10:40 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 97CBB203E8; Sat, 22 Feb 2020 09:10:40 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 838E51BF5D7 for ; Sat, 22 Feb 2020 09:10:36 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 80A0D86DD6 for ; Sat, 22 Feb 2020 09:10:36 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id IpZTqnJgyoYP for ; Sat, 22 Feb 2020 09:10:35 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wr1-f49.google.com (mail-wr1-f49.google.com [209.85.221.49]) by whitealder.osuosl.org (Postfix) with ESMTPS id 1C42886DBD for ; Sat, 22 Feb 2020 09:10:35 +0000 (UTC) Received: by mail-wr1-f49.google.com with SMTP id p18so1030987wre.9 for ; Sat, 22 Feb 2020 01:10:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=5CWy/2+eZGrf+MnvjqsAJRhE0UdAlHsqr+CsWA+9ACY=; b=EunBcfFjiKbX3NYrfNMxIACJXZTQFth48sDkFjOnA5ahrsMimA6DlxnU453yPz0vyL A6KtckE5BaacBs6yEwViBLIf1myUIvcx5hEm7gVxmIDgby35il5desU36k+wALqYQQeQ O9QM4tUq2Z8NMsjMYGFUxIttj8YFE2lCUGnOQxS5YMZ7PYkP94WmP3IqbgGBlMOcXzBB Zfxr1j+CDOcZ7274ck56aMO3NwIbBSJwLPrONyn6fvqwR8Cv9cBTzp4Z9yAiEY61r5MC vlAAzrtZq6H4294S3hR1HRAlMvzEf4MbFX+8cPG0UYRfvc6yej9v8jxy4n22chcMAcHg v6Nw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=5CWy/2+eZGrf+MnvjqsAJRhE0UdAlHsqr+CsWA+9ACY=; b=MF+2Ahm1FWWXbSA2gLB/PRmnQm1X+hYUVr2UCIlOEqClayftrR4TG3jL654Lo/ZZRQ 0YLivnFG/7iAdwrmPF/4mvi0vjGRGiV4/hksRTapAI8FTAoh2ZhF0ZjWCHWtzm/hP0bt PUKln+BLrqCNGYZMxSFKly0AxtKmdw/B/iUYJH3ZxPZi5X9F6H4LovRomN30JeUBWlSQ 1Q9Q2Oc7QviT9yikGZR4c/k2dwp1xR/r/u0N8NaGV2R1Q8ukS4y1u3RlVbaASsbyuTPh pp/CbhuybIUM9QmNL95AgYrLTByrduUkKmrKWbWP+12tZyBJlkDwNLPfF4Ajvc/8YrKt xejA== X-Gm-Message-State: APjAAAVgje1VD2uAeIWt1yF0GI/IME7mW+tJooZI2HdteQRcTM+9JQjJ ADAf1ngvHLhhAn9Wn/CbKPy16sGh X-Google-Smtp-Source: APXvYqz6ugmSUuI9InU8hsLpJeu/Fn5hLWIr8NX23Q1Z4Rz6RV621KRT2ytCekVV10GPEAyU9cf53A== X-Received: by 2002:adf:b351:: with SMTP id k17mr53224903wrd.199.1582362633017; Sat, 22 Feb 2020 01:10:33 -0800 (PST) Received: from t450s.fritz.box (ip5f589959.dynamic.kabel-deutschland.de. [95.88.153.89]) by smtp.gmail.com with ESMTPSA id l6sm603970wrb.75.2020.02.22.01.10.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 22 Feb 2020 01:10:32 -0800 (PST) From: Heiko Thiery To: buildroot@buildroot.org Date: Sat, 22 Feb 2020 09:57:07 +0100 Message-Id: <20200222085715.23769-4-heiko.thiery@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200222085715.23769-1-heiko.thiery@gmail.com> References: <20200222085715.23769-1-heiko.thiery@gmail.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCH v3 03/12] support/scripts/pkg-stats: set developers info X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Heiko Thiery , Thomas Petazzoni , Titouan Christophe Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Use the function 'parse_developers' function from getdeveloperlib that collect the information about the developers and the files they maintain. Then set the maintainer(s) to each package. Signed-off-by: Heiko Thiery --- support/scripts/pkg-stats | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/support/scripts/pkg-stats b/support/scripts/pkg-stats index 4c963cef0f..643272e9d2 100755 --- a/support/scripts/pkg-stats +++ b/support/scripts/pkg-stats @@ -30,10 +30,14 @@ import certifi import distutils.version import time import gzip +import sys from urllib3 import HTTPSConnectionPool from urllib3.exceptions import HTTPError from multiprocessing import Pool +sys.path.append('utils/') +from getdeveloperlib import parse_developers + NVD_START_YEAR = 2002 NVD_JSON_VERSION = "1.0" NVD_BASE_URL = "https://nvd.nist.gov/feeds/json/cve/" + NVD_JSON_VERSION @@ -169,6 +173,15 @@ class Package: """ return cve in self.all_ignored_cves.get(self.pkgvar(), []) + def set_developers(self, developers): + """ + Fills in the .developers field + """ + self.developers = list() + for dev in developers: + if dev.hasfile(self.path): + self.developers.append((dev.name)) + def __eq__(self, other): return self.path == other.path @@ -891,6 +904,8 @@ def __main__(): 'HEAD']).splitlines()[0] print("Build package list ...") packages = get_pkglist(args.npackages, package_list) + print("Getting developers ...") + developers = parse_developers() print("Getting package make info ...") package_init_make_info() print("Getting package details ...") @@ -902,6 +917,7 @@ def __main__(): pkg.set_check_package_warnings() pkg.set_current_version() pkg.set_url() + pkg.set_developers(developers) print("Checking URL status") check_package_urls(packages) print("Getting latest versions ...")