From nobody Sat Mar 02 08:24:54 2024 X-Original-To: freebsd-ports@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Tmygf1Py3z5CJW9 for ; Sat, 2 Mar 2024 08:25:02 +0000 (UTC) (envelope-from hubert.tournier@gmail.com) Received: from mail-wm1-x335.google.com (mail-wm1-x335.google.com [IPv6:2a00:1450:4864:20::335]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Tmygd1CV4z4FD1 for ; Sat, 2 Mar 2024 08:25:01 +0000 (UTC) (envelope-from hubert.tournier@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20230601 header.b=Ok2QiowM; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of hubert.tournier@gmail.com designates 2a00:1450:4864:20::335 as permitted sender) smtp.mailfrom=hubert.tournier@gmail.com Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-412d67e4ec1so1239535e9.1 for ; Sat, 02 Mar 2024 00:25:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709367897; x=1709972697; darn=freebsd.org; h=in-reply-to:from:content-language:references:cc:to:subject :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to; bh=pLOqL9PycTLl6T+cUjLcY+UHEnckbx67xCtVIFoQE6o=; b=Ok2QiowMBNbD+G9DsvGKerGE0q+cSE5I58VKxUlZP8IWzabt62hbCH5GEWsncG/Wjo A9xbhfDnv6ejhcJxJA7sLiQ84DsgNDRWU91YYJSqoSCud70CfUtn6M/3OqJX5ND+t1gb XlK0fIjp9Um78S6jBGZsGavvxSGhjMZ7fA1MY780w7zwD4tdzSxVWqQ8eq13bZbNnH// NuKM2vAHbt7apmsTs5hpWrkZlGLNi1wwhCLMWs5E123gAMTAjmspxiBM+asxJGdwkTMZ +BK7TYReFdoHFTaIgkKdOeQTTd5KlnMixWEgLpo2TAcQ60FRadlHZG2gaUoRVgs4A4oM RsHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709367897; x=1709972697; h=in-reply-to:from:content-language:references:cc:to:subject :user-agent:mime-version:date:message-id:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=pLOqL9PycTLl6T+cUjLcY+UHEnckbx67xCtVIFoQE6o=; b=Pt2wTmdMp1b/l23oAaEohiqVA0zwKBy0N7HKlx6nRWnp8BogPXvoGs73WmY5TOG/9h h/qlDHmUNHcNWGuFtZ8QjkodpePSD90P3b55HCmumf1kkmHCUoTYJ0GjBIsySCD3n/Zb 8PwMGIFGVnEO7UCRRDTz4hPlTYbrUF+OSiAuhozRqJEskS01ceuRZ8aL4weercOtshTC vyywbmxrSp8UdTRq+BSLc9Elo7fSixmeqn5lIxzfFAnyHPPET4Wo87BpXq9wakPUB6ON D7vAG8L1cS0rlOD7ihU9drIhwnUSYHaYp8p2+aIBCbmjFq7V6Y/KI6PPaLPR0+fXNmFf rdjg== X-Gm-Message-State: AOJu0YzluSdaokV4EuXq49vkeQZmSeoLtVRMVI0c9OB9cw362Uq/g/6W A0gmLDz3L05yJ15rfAQA/GotkdH4ZXIi9ZqyFNpFopIy8+NoaP1q X-Google-Smtp-Source: AGHT+IGpwKGSncMWT+mxigzW31g3gISdBx2rYhOWLHzkxkh9Y5HPCGTyCLI9+7KZOCGy5Z9rj1/6Kw== X-Received: by 2002:a05:600c:a384:b0:412:ae57:379 with SMTP id hn4-20020a05600ca38400b00412ae570379mr2641734wmb.17.1709367896812; Sat, 02 Mar 2024 00:24:56 -0800 (PST) Received: from ?IPV6:2a01:e0a:80d:9d80:f1cb:8029:e27a:b01e? ([2a01:e0a:80d:9d80:f1cb:8029:e27a:b01e]) by smtp.gmail.com with ESMTPSA id c21-20020a05600c0a5500b00412cb0961fasm3140537wmq.6.2024.03.02.00.24.56 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 02 Mar 2024 00:24:56 -0800 (PST) Content-Type: multipart/alternative; boundary="------------xuZYr2Zd9wO5YWRG0E7622oH" Message-ID: Date: Sat, 2 Mar 2024 09:24:54 +0100 List-Id: Porting software to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-ports List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-ports@freebsd.org X-BeenThere: freebsd-ports@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Port tree linter To: Alexander Leidinger Cc: freebsd-ports@freebsd.org References: <1d9568c9-b2b6-468e-8bc5-509d9aa4ed99@gmail.com> <46af7b220502ded8fb3848f279546da3@Leidinger.net> Content-Language: fr From: Hubert Tournier In-Reply-To: <46af7b220502ded8fb3848f279546da3@Leidinger.net> X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.98 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.99)[-0.988]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36:c]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20230601]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; XM_UA_NO_VERSION(0.01)[]; RCVD_TLS_LAST(0.00)[]; TO_DN_SOME(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; RCPT_COUNT_TWO(0.00)[2]; FREEMAIL_FROM(0.00)[gmail.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; TAGGED_FROM(0.00)[]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; PREVIOUSLY_DELIVERED(0.00)[freebsd-ports@freebsd.org]; MID_RHS_MATCH_FROM(0.00)[]; MLMMJ_DEST(0.00)[freebsd-ports@freebsd.org]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::335:from] X-Rspamd-Queue-Id: 4Tmygd1CV4z4FD1 This is a multi-part message in MIME format. --------------xuZYr2Zd9wO5YWRG0E7622oH Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Le 28/02/2024 à 08:32, Alexander Leidinger a écrit : > Am 2024-02-28 00:52, schrieb Hubert Tournier: >>> Shouldn't this make it to ports-mgmt/ as portlinter? >> >> If it's deemed useful, I could make the port next week-end. > > If you do that, I suggest to use a name which makes it clear that it > is not a replacement for portlint (which operates on 1 port), and that > makes it clear that it operates on the whole tree. Maybe > portstreelint, or portstreecheck, or ptlint, or ptcheck, or whatever, > but not "portlint*". Hello, You're right. I was lacking inspiration the day I named this :-) I made a new version named portstreelint (with aliases ptlint and ptl), which is now a Python package rather than a standalone script. It supersedes the previous one and is located at: https://github.com/HubTou/portstreelint With Python's pip it can be installed with: pip install pnu-portstreelint I also added many new checks, some inspired by the neighboring "Proposed ports deprecation and removal policy" discussion thread. On a freshly updated ports tree and index, it reports the following findings: Selected 34408 ports out of 34408 in the FreeBSD port tree, and found:   5 ports with unusual installation-prefix (warning)   338 ports with a comment string exceeding 70 characters (warning)   286 ports with an uncapitalized comment   11 ports comment ending with a dot   109 ports with a comment different between the Index and Makefile   2 ports with non existent description-file   198 ports with URL ending description-file   613 ports with description-file identical to comment   483 ports with description-file no longer than comment   10427 ports without pkg-plist/PLIST_FILES/PLIST/PLIST_SUB (info)   170 ports abusing PLIST_FILES with more than 6 entries (warning)   5 ports with a maintainer different between the Index and Makefile   34 ports referring to unofficial categories (warning)   262 ports with categories different between the Index and Makefile   1246 ports with no www-site   304 ports with an unresolvable www-site hostname   659 ports with an unaccessible www-site   2 ports with a www-site different betwwen the Index and makefile   121 ports with a BROKEN mark   39 ports with a BROKEN mark older than 180 days   232 ports with a IGNORE mark in some cases (info)   1 port with a FORBIDDEN mark   2 ports with a FORBIDDEN mark older than 90 days   114 ports with a DEPRECATED mark   13 ports with a DEPRECATED mark older than 180 days Full refreshed reports are available at the following addresses for those who are curious but don't want to install the tool: https://www.frbsd.org/xch/stdout.txt https://www.frbsd.org/xch/stderr.txt Note that packing list check is not that much interesting as one third of the ports tree is not using any of the ways documented in the Porter's Handbook to list its files. I could use some help here to make it better. Now that this tool is a Python package, it's easier to use other Python libraries. I already created a dependency on my vuxml library (https://github.com/HubTou/vuxml), which I will shortly use to add vulnerable ports reporting. I'll then study how to check unavailable distfiles (building their name in all the ports cases being the hardest part). Best regards, Hubert --------------xuZYr2Zd9wO5YWRG0E7622oH Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit Le 28/02/2024 à 08:32, Alexander Leidinger a écrit :
Am 2024-02-28 00:52, schrieb Hubert Tournier:
Shouldn't this make it to ports-mgmt/ as portlinter?

If it's deemed useful, I could make the port next week-end.

If you do that, I suggest to use a name which makes it clear that it is not a replacement for portlint (which operates on 1 port), and that makes it clear that it operates on the whole tree. Maybe portstreelint, or portstreecheck, or ptlint, or ptcheck, or whatever, but not "portlint*".

Hello,

You're right. I was lacking inspiration the day I named this :-)

I made a new version named portstreelint (with aliases ptlint and ptl), which is now a Python package rather than a standalone script.

It supersedes the previous one and is located at: https://github.com/HubTou/portstreelint

With Python's pip it can be installed with: pip install pnu-portstreelint

I also added many new checks, some inspired by the neighboring "Proposed ports deprecation and removal policy" discussion thread.

On a freshly updated ports tree and index, it reports the following findings:

Selected 34408 ports out of 34408 in the FreeBSD port tree, and found:
  5 ports with unusual installation-prefix (warning)
  338 ports with a comment string exceeding 70 characters (warning)
  286 ports with an uncapitalized comment
  11 ports comment ending with a dot
  109 ports with a comment different between the Index and Makefile
  2 ports with non existent description-file
  198 ports with URL ending description-file
  613 ports with description-file identical to comment
  483 ports with description-file no longer than comment
  10427 ports without pkg-plist/PLIST_FILES/PLIST/PLIST_SUB (info)
  170 ports abusing PLIST_FILES with more than 6 entries (warning)
  5 ports with a maintainer different between the Index and Makefile
  34 ports referring to unofficial categories (warning)
  262 ports with categories different between the Index and Makefile
  1246 ports with no www-site
  304 ports with an unresolvable www-site hostname
  659 ports with an unaccessible www-site
  2 ports with a www-site different betwwen the Index and makefile
  121 ports with a BROKEN mark
  39 ports with a BROKEN mark older than 180 days
  232 ports with a IGNORE mark in some cases (info)
  1 port with a FORBIDDEN mark
  2 ports with a FORBIDDEN mark older than 90 days
  114 ports with a DEPRECATED mark
  13 ports with a DEPRECATED mark older than 180 days

Full refreshed reports are available at the following addresses for those who are curious but don't want to install the tool:

     https://www.frbsd.org/xch/stdout.txt

     https://www.frbsd.org/xch/stderr.txt

Note that packing list check is not that much interesting as one third of the ports tree is not using any of the ways documented in the Porter's Handbook to list its files.

I could use some help here to make it better.

Now that this tool is a Python package, it's easier to use other Python libraries.

I already created a dependency on my vuxml library (https://github.com/HubTou/vuxml), which I will shortly use to add vulnerable ports reporting.

I'll then study how to check unavailable distfiles (building their name in all the ports cases being the hardest part).

Best regards,

Hubert

--------------xuZYr2Zd9wO5YWRG0E7622oH--