From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2201) id 13BC13858C35; Sat, 9 Mar 2024 16:46:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 13BC13858C35 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1710002812; bh=Nlcptch4QGuJueYMtPGZM0m4DCerhjFAH4tBMXmfDqk=; h=To:Subject:Date:From:From; b=Xo2n27kny81U3A7pSR5bRCUh24dItqrzd144aqFACg6FCRWPmymsGdPw7txwGUKii +IcqU+vskKBrQGeOgUZlrx4HsqoFI6T1p2cGwYn6CowlCYNDwl92/rwunbxUUXM4t9 g8G5vaLkbqlVtecrIA2uHp2WWu7ykg2s3lsf05PA= To: cygwin-apps-cvs@sourceware.org Subject: [calm - Cygwin server-side packaging maintenance script] branch master, updated. 20230209-67-g8b01a6e X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: 0522456965ab0b50942d09c7c3bac21012cc6c44 X-Git-Newrev: 8b01a6e8f2576bb31afe030551a29664e176afe9 Message-Id: <20240309164652.13BC13858C35@sourceware.org> Date: Sat, 9 Mar 2024 16:46:51 +0000 (GMT) From: Jon Turney List-Id: https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/calm.git;h=8b01a6e8f2576bb31afe030551a29664e176afe9 commit 8b01a6e8f2576bb31afe030551a29664e176afe9 Author: Jon Turney Date: Sat Mar 9 12:27:25 2024 +0000 Tolerate package html directories being owned by someone else As a consequence of the cygwin-admin/cygwin split, we might not own an existing package listing/summary HTML directory. Ignore any error trying to set permissions in that case. https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/calm.git;h=7090c60ca45c4ced5bf0aaf3ad05875b2048ff37 commit 7090c60ca45c4ced5bf0aaf3ad05875b2048ff37 Author: Jon Turney Date: Sat Feb 17 19:24:45 2024 +0000 Don't warn if license expression canonicalization just changes case Also: consistently indicate if a problem warned about in hints is fixed https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/calm.git;h=e91e31ef0dfaf67ad4b85832ff8ab770890b5ef7 commit e91e31ef0dfaf67ad4b85832ff8ab770890b5ef7 Author: Jon Turney Date: Sat Jan 20 16:45:02 2024 +0000 Add a report of package lingering in test/unstable status Diff: --- calm/hint.py | 6 +-- calm/pkg2html.py | 5 ++- calm/reports.py | 44 ++++++++++++++++++++++ .../release/base-cygwin/base-cygwin-3.6-1.expected | 2 +- .../release/base-cygwin/base-cygwin-3.8-1.expected | 2 +- ...ingw64-i686-binutils-2.29.1.787c9873-1.expected | 2 +- ...6-binutils-debuginfo-2.29.1.787c9873-1.expected | 2 +- .../x86_64/release/splint/splint-3.1.2-1.expected | 2 +- test/testdata/process_arch/htdocs.expected | 2 +- 9 files changed, 57 insertions(+), 10 deletions(-) diff --git a/calm/hint.py b/calm/hint.py index 1cbfb33..41f55f8 100755 --- a/calm/hint.py +++ b/calm/hint.py @@ -282,13 +282,13 @@ def hint_file_parse(fn, kind, strict=False): # if sdesc ends with a '.', warn and fix it if key == 'sdesc': if re.search(r'\."$', value): - warnings.append("sdesc ends with '.'") + warnings.append("sdesc ends with '.', fixing") value = re.sub(r'\."$', '"', value) # if sdesc contains ' ', warn and fix it if key == 'sdesc': if ' ' in value: - warnings.append("sdesc contains ' '") + warnings.append("sdesc contains ' ', fixing") value = value.replace(' ', ' ') # message must have an id and some text @@ -312,7 +312,7 @@ def hint_file_parse(fn, kind, strict=False): else: if not le.normalized_expression: warnings.append('errors in license expression: %s' % (le.errors)) - elif le.original_expression != le.normalized_expression: + elif le.original_expression.lower() != le.normalized_expression.lower(): warnings.append("license expression: '%s' normalizes to '%s'" % (value, le.normalized_expression)) # warn if value starts with a quote followed by whitespace diff --git a/calm/pkg2html.py b/calm/pkg2html.py index ea4cb8f..70b0aeb 100755 --- a/calm/pkg2html.py +++ b/calm/pkg2html.py @@ -125,7 +125,10 @@ def arch_packages(packages, p): def ensure_dir_exists(args, path): if not args.dryrun: utils.makedirs(path) - os.chmod(path, 0o755) + try: + os.chmod(path, 0o755) + except PermissionError: + pass # diff --git a/calm/reports.py b/calm/reports.py index a043cc4..d204032 100644 --- a/calm/reports.py +++ b/calm/reports.py @@ -196,6 +196,49 @@ def deprecated(args, packages, reportlist): write_report(args, 'Deprecated shared library packages', body, 'deprecated_so.html', reportlist) +# +# produce a report of packages where the latest version is marked test: and has +# possibly been forgotten about +# +def unstable(args, packages, reportlist): + unstable_list = [] + + arch = 'x86_64' + # XXX: look into how we can make this 'src', after x86 is dropped + for p in packages[arch]: + po = packages[arch][p] + + if po.kind != package.Kind.source: + continue + + latest_v = sorted(po.versions(), key=lambda v: SetupVersion(v), reverse=True)[0] + if 'test' not in po.version_hints[latest_v]: + continue + + unstablep = types.SimpleNamespace() + unstablep.pn = p + unstablep.po = po + unstablep.v = latest_v + unstablep.ts = po.tar(latest_v).mtime + + unstable_list.append(unstablep) + + body = io.StringIO() + print(textwrap.dedent('''\ +

Packages where latest version is marked as unstable (testing).

'''), file=body) + + print('', file=body) + print('', file=body) + + for unstablep in sorted(unstable_list, key=lambda i: i.ts): + print('' % + (linkify(unstablep.pn, unstablep.po), unstablep.v, pkg2html.tsformat(unstablep.ts)), file=body) + + print('
packageversiontimestamp
%s%s%s
', file=body) + + write_report(args, 'Packages marked as unstable', body, 'unstable.html', reportlist) + + # produce a report of packages which need rebuilding for the latest major # version version provides # @@ -268,6 +311,7 @@ def do_reports(args, packages): unmaintained(args, packages, reportlist) deprecated(args, packages, reportlist) + unstable(args, packages, reportlist) provides_rebuild(args, packages, 'perl_rebuilds.html', 'perl_base', reportlist) provides_rebuild(args, packages, 'ruby_rebuilds.html', 'ruby', reportlist) diff --git a/test/testdata/hints/x86_64/release/base-cygwin/base-cygwin-3.6-1.expected b/test/testdata/hints/x86_64/release/base-cygwin/base-cygwin-3.6-1.expected index 7505632..cf2dc9b 100644 --- a/test/testdata/hints/x86_64/release/base-cygwin/base-cygwin-3.6-1.expected +++ b/test/testdata/hints/x86_64/release/base-cygwin/base-cygwin-3.6-1.expected @@ -2,4 +2,4 @@ 'ldesc': '"Initial base installation helper script."', 'category': 'Base', 'requires': '', - 'parse-warnings': ["sdesc ends with '.'"]} + 'parse-warnings': ["sdesc ends with '.', fixing"]} diff --git a/test/testdata/hints/x86_64/release/base-cygwin/base-cygwin-3.8-1.expected b/test/testdata/hints/x86_64/release/base-cygwin/base-cygwin-3.8-1.expected index cac431d..68ae615 100644 --- a/test/testdata/hints/x86_64/release/base-cygwin/base-cygwin-3.8-1.expected +++ b/test/testdata/hints/x86_64/release/base-cygwin/base-cygwin-3.8-1.expected @@ -2,4 +2,4 @@ 'ldesc': '"Initial base installation helper script."', 'category': 'Base', 'requires': 'cygwin-api0_291', - 'parse-warnings': ["sdesc ends with '.'"]} + 'parse-warnings': ["sdesc ends with '.', fixing"]} diff --git a/test/testdata/hints/x86_64/release/mingw64-i686-binutils/mingw64-i686-binutils-2.29.1.787c9873-1.expected b/test/testdata/hints/x86_64/release/mingw64-i686-binutils/mingw64-i686-binutils-2.29.1.787c9873-1.expected index 114e53c..d76051c 100644 --- a/test/testdata/hints/x86_64/release/mingw64-i686-binutils/mingw64-i686-binutils-2.29.1.787c9873-1.expected +++ b/test/testdata/hints/x86_64/release/mingw64-i686-binutils/mingw64-i686-binutils-2.29.1.787c9873-1.expected @@ -3,4 +3,4 @@ 'sdesc': '"The GNU Binutils are a collection of binary tools. This package\n is capable of targeting win32"', 'ldesc': '"Binutils for MinGW-w64 Win32 toolchain"', 'parse-errors': ['key sdesc has multi-line value'], - 'parse-warnings': ["sdesc ends with '.'", 'sdesc is much longer than ldesc']} + 'parse-warnings': ["sdesc ends with '.', fixing", 'sdesc is much longer than ldesc']} diff --git a/test/testdata/hints/x86_64/release/mingw64-i686-binutils/mingw64-i686-binutils-debuginfo/mingw64-i686-binutils-debuginfo-2.29.1.787c9873-1.expected b/test/testdata/hints/x86_64/release/mingw64-i686-binutils/mingw64-i686-binutils-debuginfo/mingw64-i686-binutils-debuginfo-2.29.1.787c9873-1.expected index c936ff6..007397d 100644 --- a/test/testdata/hints/x86_64/release/mingw64-i686-binutils/mingw64-i686-binutils-debuginfo/mingw64-i686-binutils-debuginfo-2.29.1.787c9873-1.expected +++ b/test/testdata/hints/x86_64/release/mingw64-i686-binutils/mingw64-i686-binutils-debuginfo/mingw64-i686-binutils-debuginfo-2.29.1.787c9873-1.expected @@ -4,4 +4,4 @@ 'ldesc': '"Debug info for mingw64-i686-binutils"', 'sdesc': '"This package contains files necessary for debugging the\nmingw64-i686-binutils package with gdb"', 'parse-errors': ['key sdesc has multi-line value'], - 'parse-warnings': ["sdesc ends with '.'", 'sdesc is much longer than ldesc']} + 'parse-warnings': ["sdesc ends with '.', fixing", 'sdesc is much longer than ldesc']} diff --git a/test/testdata/hints/x86_64/release/splint/splint-3.1.2-1.expected b/test/testdata/hints/x86_64/release/splint/splint-3.1.2-1.expected index 5667e4b..3549cfb 100644 --- a/test/testdata/hints/x86_64/release/splint/splint-3.1.2-1.expected +++ b/test/testdata/hints/x86_64/release/splint/splint-3.1.2-1.expected @@ -12,4 +12,4 @@ 'category': 'Devel', 'requires': 'cygwin', 'parse-errors': ['key sdesc has multi-line value'], - 'parse-warnings': ["sdesc ends with '.'"]} + 'parse-warnings': ["sdesc ends with '.', fixing"]} diff --git a/test/testdata/process_arch/htdocs.expected b/test/testdata/process_arch/htdocs.expected index d9afd07..f63f346 100644 --- a/test/testdata/process_arch/htdocs.expected +++ b/test/testdata/process_arch/htdocs.expected @@ -1,5 +1,5 @@ {'.': ['calm.db', 'packages.inc', 'reports_list.inc', 'src_packages.inc'], - 'reports': ['deprecated_so.html', 'perl_rebuilds.html', 'ruby_rebuilds.html', 'unmaintained.html'], + 'reports': ['deprecated_so.html', 'perl_rebuilds.html', 'ruby_rebuilds.html', 'unmaintained.html', 'unstable.html'], 'summary': ['arc-src.html', 'arc.html', 'base-cygwin.html',