From mboxrd@z Thu Jan 1 00:00:00 1970
Return-Path:
Received: by sourceware.org (Postfix, from userid 2201)
id 7474B3858C53; Sat, 4 May 2024 15:34:51 +0000 (GMT)
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7474B3858C53
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org;
s=default; t=1714836891;
bh=4lfNu5WZ4NV9VwjhjfEnzgaxVVUS2ytEs5MLRNpflPQ=;
h=To:Subject:Date:From:From;
b=DKgFhYskGohc2l7LAH2UH6yJ3R7Wyi1qkbuXKpiNRU6mkREcd3tGcQwejWq9IjEp0
jsfoPje/C/XtUMKtAdW1hzMMAYHZQ89wtkEWpLQ/euA8voYUPqu+5pbmU53oR4o8Xs
ZXHiCuksorDWWjJkb2ip1JujPeq1C0kFk7+g6IR8=
To: cygwin-apps-cvs@sourceware.org
Subject: [calm - Cygwin server-side packaging maintenance script] branch master, updated. 20230209-109-g21a8e6b
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 1374472295d04be7b10bdc692db0f0d69b833447
X-Git-Newrev: 21a8e6b6e8ae03f326c5832f13e00f63c48d4147
Message-Id: <20240504153451.7474B3858C53@sourceware.org>
Date: Sat, 4 May 2024 15:34:51 +0000 (GMT)
From: Jon Turney
List-Id:
https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/calm.git;h=21a8e6b6e8ae03f326c5832f13e00f63c48d4147
commit 21a8e6b6e8ae03f326c5832f13e00f63c48d4147
Author: Jon Turney
Date: Sat May 4 16:28:17 2024 +0100
Wind the obsolete package exipry threshold age forward
https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/calm.git;h=8729295b9b205c2db2a6bb0981f2d50f504a3462
commit 8729295b9b205c2db2a6bb0981f2d50f504a3462
Author: Jon Turney
Date: Thu May 2 18:41:53 2024 +0100
Include arch into package summary versions table
https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/calm.git;h=ded3a9940351cb51f84d76e544308f0e38debdcc
commit ded3a9940351cb51f84d76e544308f0e38debdcc
Author: Jon Turney
Date: Thu May 2 13:38:56 2024 +0100
Simplify the way arch_re is made
(There's actually a thinko in the previous implementation, as it doesn't
add the '-' in the right place if the ARCHES list has more than one
element.)
https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/calm.git;h=10400e31a8eae916b65edaecfac3b32b26aeede2
commit 10400e31a8eae916b65edaecfac3b32b26aeede2
Author: Jon Turney
Date: Wed May 1 19:23:56 2024 +0100
Improve fix-requires-by-linkage tool
* allow to only consider packages which already have some dependency
* also consider loadable modules built with .so extension
https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/calm.git;h=eb276adc82952e8509a489f6b893166e4dc87ac8
commit eb276adc82952e8509a489f6b893166e4dc87ac8
Author: Jon Turney
Date: Sun Apr 28 21:20:52 2024 +0100
Include obsoletes: in the set of valid things to depends: on
It's OK to depends: on something which only exists as an obsoletes: on
some package, after the original package providing it has been removed.
Diff:
---
calm/fix-requires-by-linkage.py | 6 ++-
calm/package.py | 19 ++++++----
calm/past_mistakes.py | 4 +-
calm/pkg2html.py | 43 +++++++++++-----------
test/testdata/htdocs.expected/summary/arc-src.html | 9 ++---
test/testdata/htdocs.expected/summary/arc.html | 9 ++---
.../htdocs.expected/summary/base-cygwin.html | 11 ++----
.../htdocs.expected/summary/corrupt-src.html | 9 ++---
test/testdata/htdocs.expected/summary/corrupt.html | 9 ++---
.../htdocs.expected/summary/cygwin-debuginfo.html | 13 +++----
.../htdocs.expected/summary/cygwin-devel.html | 13 +++----
.../htdocs.expected/summary/cygwin-src.html | 13 +++----
test/testdata/htdocs.expected/summary/cygwin.html | 13 +++----
.../htdocs.expected/summary/keychain-src.html | 11 ++----
.../testdata/htdocs.expected/summary/keychain.html | 11 ++----
.../htdocs.expected/summary/libdns_sd-devel.html | 9 ++---
.../htdocs.expected/summary/libdns_sd1.html | 9 ++---
.../htdocs.expected/summary/mDNSResponder-src.html | 9 ++---
.../htdocs.expected/summary/mDNSResponder.html | 9 ++---
.../htdocs.expected/summary/obs-a-src.html | 9 ++---
test/testdata/htdocs.expected/summary/obs-a.html | 9 ++---
.../htdocs.expected/summary/obs-b-src.html | 9 ++---
test/testdata/htdocs.expected/summary/obs-b.html | 9 ++---
.../htdocs.expected/summary/openssh-src.html | 9 ++---
test/testdata/htdocs.expected/summary/openssh.html | 9 ++---
.../per-version-replacement-hint-only-src.html | 9 ++---
.../summary/per-version-replacement-hint-only.html | 9 ++---
.../htdocs.expected/summary/per-version-src.html | 11 ++----
.../htdocs.expected/summary/per-version.html | 11 ++----
.../summary/perl-Net-SMTP-SSL-src.html | 13 +++----
.../htdocs.expected/summary/perl-Net-SMTP-SSL.html | 13 +++----
.../htdocs.expected/summary/rpm-doc-src.html | 9 ++---
test/testdata/htdocs.expected/summary/rpm-doc.html | 11 ++----
.../htdocs.expected/summary/staleversion-src.html | 19 ++++------
.../htdocs.expected/summary/staleversion.html | 19 ++++------
.../htdocs.expected/summary/test-c-src.html | 9 ++---
test/testdata/htdocs.expected/summary/test-c.html | 9 ++---
.../htdocs.expected/summary/test-d-src.html | 9 ++---
test/testdata/htdocs.expected/summary/test-d.html | 9 ++---
.../htdocs.expected/summary/test-e-src.html | 9 ++---
test/testdata/htdocs.expected/summary/test-e.html | 9 ++---
.../htdocs.expected/summary/testpackage-src.html | 9 ++---
.../htdocs.expected/summary/testpackage.html | 9 ++---
43 files changed, 185 insertions(+), 294 deletions(-)
diff --git a/calm/fix-requires-by-linkage.py b/calm/fix-requires-by-linkage.py
index 0f1136f..62a2c33 100644
--- a/calm/fix-requires-by-linkage.py
+++ b/calm/fix-requires-by-linkage.py
@@ -59,6 +59,9 @@ def fix_one_hint(args, dirpath, hintfile, tf):
if args.requires in requires:
return
+ if args.only and args.only not in requires:
+ return
+
# check if this package installs executables linked to the specified DLL,
# and if so, add to the requires, if not already present
exe = False
@@ -69,7 +72,7 @@ def fix_one_hint(args, dirpath, hintfile, tf):
if not m.isfile():
continue
- if re.search(r'\.(exe|dll)$', m.name):
+ if re.search(r'\.(exe|dll|so)$', m.name):
logging.info('Found executable %s' % m.name)
a.extract(m)
@@ -141,6 +144,7 @@ if __name__ == "__main__":
parser.add_argument('-v', '--verbose', action='count', dest='verbose', help='verbose output', default=0)
parser.add_argument('--releasearea', action='store', metavar='DIR', help="release directory (default: " + relarea_default + ")", default=relarea_default, dest='relarea')
parser.add_argument('--replace', action='store', metavar='DEPATOM', help="replace existing DEPATOM if present")
+ parser.add_argument('--only', action='store', metavar='DEPATOM', help="only operate on packages with existing DEPATOM")
(args) = parser.parse_args()
if args.verbose:
diff --git a/calm/package.py b/calm/package.py
index 712f9b5..98fdd34 100755
--- a/calm/package.py
+++ b/calm/package.py
@@ -469,11 +469,8 @@ def read_one_package(packages, p, basedir, files, kind, strict):
if kind == Kind.source:
arch_re = r'(-src)'
else:
- # XXX: we might also need to handle ARCHIVED_ARCHES, so this works
- # for mksetupini invoked on an x86 repo with new packages made by
- # future versions of cygport which generate arch-tagged packages (it
- # might be better if we had an idea what the valid arches are here)
- arch_re = r'(-' + '|'.join(common_constants.ARCHES) + r'|)'
+ # archtag is either missing, or the appropriate one for the path
+ arch_re = r'(-' + rp.arch + r'|)'
# warn if filename doesn't follow P-V-R naming convention
#
@@ -486,7 +483,6 @@ def read_one_package(packages, p, basedir, files, kind, strict):
else:
v = match.group(1)
r = match.group(2)
- arch_tag = match.group(3)
# historically, V can contain a '-' (since we can use the fact
# we already know P to split unambiguously), but this is a bad
@@ -541,10 +537,16 @@ def read_one_package(packages, p, basedir, files, kind, strict):
t.mtime = os.path.getmtime(rp.abspath(basedir))
t.sha512 = sha512_file(rp.abspath(basedir))
+ # record the arch_tag (or what it would have been, if not omitted)
+ if kind == Kind.source:
+ t.arch = 'src'
+ else:
+ t.arch = rp.arch
+
tars[vr] = t
# it's an error to not have a corresponding pvr.hint in the same directory
- hint_fn = '%s-%s%s.hint' % (p, vr, arch_tag)
+ hint_fn = '%s-%s%s.hint' % (p, vr, match.group(3))
hrp = RepoPath(rp.arch, rp.path, hint_fn)
if hrp not in files:
logging.error("package %s has packages for version %s, but no %s" % (p, vr, hint_fn))
@@ -759,6 +761,7 @@ def validate_packages(args, packages, valid_provides_extra=None, missing_obsolet
for p in packages:
valid_requires.add(p)
for hints in packages[p].version_hints.values():
+ valid_requires.update(hints.get('obsoletes', []))
valid_requires.update(hints.get('provides', []))
# reset computed package state
@@ -1712,7 +1715,7 @@ def mark_fn(packages, po, v, certain_age, obs_threshold, vault_requests):
#
SO_AGE_THRESHOLD_YEARS = 5
-OBSOLETE_AGE_THRESHOLD_YEARS = 10
+OBSOLETE_AGE_THRESHOLD_YEARS = 8
def stale_packages(packages, vault_requests):
diff --git a/calm/past_mistakes.py b/calm/past_mistakes.py
index b9ffec9..338095f 100644
--- a/calm/past_mistakes.py
+++ b/calm/past_mistakes.py
@@ -277,6 +277,7 @@ old_style_obsolete_by = {
'at-spi2-atk': 'libatk-bridge2.0_0',
'idle3': 'idle39',
'lighttpd-mod_trigger_b4_dl': 'lighttpd',
+ 'octave-octcdf': 'octave-netcdf',
'python-gi-common': 'python3-gi',
'python-pyatspi-common': 'python3-pyatspi',
'qt-gstreamer': 'libQtGStreamer1_0_0',
@@ -293,11 +294,10 @@ old_style_obsolete_by = {
'python3-.*': '',
# these packages probably should be marked as self-destruct?
'mate-utils': '',
- 'octave-octcdf': '',
'python-twisted-debuginfo': '',
'texlive-collection-htmlxml': '',
'vte2.91': '',
- 'w32api': '',
# self-destruct, or need to start to exist
'cron-debuginfo': '',
+ 'w32api': '',
}
diff --git a/calm/pkg2html.py b/calm/pkg2html.py
index 86a41df..979914b 100755
--- a/calm/pkg2html.py
+++ b/calm/pkg2html.py
@@ -50,6 +50,7 @@ import string
import sys
import textwrap
import time
+import types
from typing import NamedTuple
import markdown
@@ -322,35 +323,35 @@ def update_package_listings(args, packages):
if not v.startswith(''):
v = '
' + v + '
'
print('%s: | %s |
' % (d, v), file=f)
- print('', file=f)
+ print('
', file=f)
- # output per-arch package versions table
- print('', file=f)
+ # output package versions table
+ versions_table = []
for arch in sorted(packages):
if p in packages[arch]:
- print('- %s
' % arch, file=f)
-
- print('', file=f)
- print('Version | Package Size | Date | Files | Status |
', file=f)
-
- def tar_line(pn, p, v, arch, f):
- size = int(math.ceil(p.tar(v).size / 1024))
+ def tar_line(pn, p, v, arch):
+ item = types.SimpleNamespace()
+ item.version = v
+ item.size = int(math.ceil(p.tar(v).size / 1024))
if p.kind == package.Kind.binary:
- name = v
target = "%s-%s" % (p.orig_name, v)
else:
- name = v + ' (source)'
target = "%s-%s-src" % (p.orig_name, v)
- test = 'test' if 'test' in p.version_hints[v] else 'stable'
- ts = tsformat(p.tar(v).mtime)
- print('%s | %d KiB | %s | [list of files] | %s |
' % (name, size, ts, arch, pn, target, test), file=f)
-
- for version in sorted(packages[arch][p].versions(), key=lambda v: SetupVersion(v)):
- tar_line(p, packages[arch][p], version, arch, f)
-
- print('
', file=f)
- print('
', file=f)
+ item.link = "../%s/%s/%s" % (arch, pn, target)
+ item.status = 'test' if 'test' in p.version_hints[v] else 'stable'
+ item.ts = tsformat(p.tar(v).mtime)
+ item.arch = p.tar(v).arch
+ return item
+
+ for version in packages[arch][p].versions():
+ versions_table.append(tar_line(p, packages[arch][p], version, arch))
+
+ print('', file=f)
+ print('Version | Arch | Package Size | Date | Files | Status |
', file=f)
+ for i in sorted(versions_table, key=lambda i: (SetupVersion(i.version), i.arch)):
+ print('%s | %s | %d KiB | %s | [list of files] | %s |
' % (i.version, i.arch, i.size, i.ts, i.link, i.status), file=f)
+ print('
', file=f)
print(textwrap.dedent('''\
diff --git a/test/testdata/htdocs.expected/summary/arc-src.html b/test/testdata/htdocs.expected/summary/arc-src.html
index 439b271..9e95ab4 100755
--- a/test/testdata/htdocs.expected/summary/arc-src.html
+++ b/test/testdata/htdocs.expected/summary/arc-src.html
@@ -23,14 +23,11 @@ the best of packing, squeezing, or crunching is used.
maintainer(s): | Jari Aalto
(Use the mailing list to report bugs or ask questions.
Do not contact the maintainer(s) directly.) |
-
-
-- x86_64
+
-Version | Package Size | Date | Files | Status |
-4.32.7-10 (source) | 1 KiB | 2018-03-02 00:00 | [list of files] | stable |
+Version | Arch | Package Size | Date | Files | Status |
+4.32.7-10 | src | 1 KiB | 2018-03-02 00:00 | [list of files] | stable |
-