public inbox for cygwin-apps-cvs@sourceware.org
help / color / mirror / Atom feed
* [calm - Cygwin server-side packaging maintenance script] branch master, updated. 20220704-16-g51a73ca
@ 2022-09-26 13:20 Jon TURNEY
0 siblings, 0 replies; only message in thread
From: Jon TURNEY @ 2022-09-26 13:20 UTC (permalink / raw)
To: cygwin-apps-cvs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 8239 bytes --]
https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/calm.git;h=51a73cae10bcc79c24dc8f00dcafaa69f3897c51
commit 51a73cae10bcc79c24dc8f00dcafaa69f3897c51
Author: Jon Turney <jon.turney@dronecode.org.uk>
Date: Mon Sep 26 13:02:37 2022 +0100
Send emails with 'Reply-To' cygwin-apps
Switch email From: back to cygwin-no-reply. Using the cygwin-apps list
email doesn't work well, as the list filters out bounces which appear to
come from itself.
Set Reply-To: instead, so replies go there.
This reverts commit d047fed3d38af7a0307f46d74b0bf7e78eaaeda6 ("Change From: address to cygwin-apps")
https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/calm.git;h=132284ee7350e59c0f3e9204637cdb933b9b7ebe
commit 132284ee7350e59c0f3e9204637cdb933b9b7ebe
Author: Jon Turney <jon.turney@dronecode.org.uk>
Date: Fri Sep 16 16:01:37 2022 +0100
Drop unused remove arg to read_one_package
Unused since d8869d2e removed the need to notice when override.hint was
being removed.
https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/calm.git;h=ca35f6a964ae535084a42dfdf085c35e4f4a7c36
commit ca35f6a964ae535084a42dfdf085c35e4f4a7c36
Author: Jon Turney <jon.turney@dronecode.org.uk>
Date: Wed Sep 14 17:58:39 2022 +0100
Drop special treatment for !packages in upload area
We stopped generating these files a while ago.
https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/calm.git;h=a01c7c3edc8f13a1c8e13238912381cec50c752d
commit a01c7c3edc8f13a1c8e13238912381cec50c752d
Author: Jon Turney <jon.turney@dronecode.org.uk>
Date: Wed Sep 14 13:21:58 2022 +0100
Warn if license: is missing in uploads
Diff:
---
calm/buffering_smtp_handler.py | 5 ++++-
calm/hint.py | 8 ++++++++
calm/package.py | 9 +++------
calm/uploads.py | 5 ++---
test/testdata/uploads/pkglist.expected | 6 ++++--
5 files changed, 21 insertions(+), 12 deletions(-)
diff --git a/calm/buffering_smtp_handler.py b/calm/buffering_smtp_handler.py
index 2cd1b63..161438f 100644
--- a/calm/buffering_smtp_handler.py
+++ b/calm/buffering_smtp_handler.py
@@ -34,11 +34,13 @@ class BufferingSMTPHandler(logging.handlers.BufferingHandler):
def __init__(self,
toaddrs,
subject,
- fromaddr='cygwin-apps@cygwin.com',
+ fromaddr='cygwin-no-reply@cygwin.com',
+ replytoaddr='cygwin-apps@cygwin.com',
logging_format='%(levelname)s: %(message)s'):
logging.handlers.BufferingHandler.__init__(self, capacity=0)
self.fromaddr = fromaddr
self.toaddrs = toaddrs
+ self.replyto = replytoaddr
self.subject = subject
self.formatter = logging_format
self.setFormatter(logging.Formatter(logging_format))
@@ -62,6 +64,7 @@ class BufferingSMTPHandler(logging.handlers.BufferingHandler):
m = email.message.Message()
m['From'] = self.fromaddr
m['To'] = ','.join(self.toaddrs)
+ m['Reply-To'] = self.replytoaddr
m['Bcc'] = common_constants.ALWAYS_BCC
m['Subject'] = self.subject
m['Message-Id'] = email.utils.make_msgid()
diff --git a/calm/hint.py b/calm/hint.py
index ace6ecd..8990a25 100755
--- a/calm/hint.py
+++ b/calm/hint.py
@@ -333,6 +333,14 @@ def hint_file_parse(fn, kind, strict=False):
if k not in hints:
errors.append("required key '%s' missing" % (k))
+ suggested = []
+ if (kind == spvr) and strict:
+ suggested.append('license')
+
+ for k in suggested:
+ if k not in hints:
+ warnings.append("key '%s' missing" % (k))
+
# warn if ldesc and sdesc seem transposed
#
# (Unfortunately we can't be totally strict about this, as some
diff --git a/calm/package.py b/calm/package.py
index 1c658e1..dd137fb 100755
--- a/calm/package.py
+++ b/calm/package.py
@@ -206,10 +206,7 @@ def clean_hints(p, hints, warnings):
# (return True if problems, False otherwise)
#
-def read_package_dir(packages, basedir, dirpath, files, remove=None, upload=False):
- if remove is None:
- remove = []
-
+def read_package_dir(packages, basedir, dirpath, files, upload=False):
relpath = os.path.relpath(dirpath, basedir)
# the package name is always the directory name
@@ -260,7 +257,7 @@ def read_package_dir(packages, basedir, dirpath, files, remove=None, upload=Fals
for kind in Kind:
# only create a package if there's archives for it to contain
if fl[kind]:
- result = read_one_package(packages, p, relpath, dirpath, fl[kind] + fl['all'], remove, kind, upload) or result
+ result = read_one_package(packages, p, relpath, dirpath, fl[kind] + fl['all'], kind, upload) or result
# warn about unexpected files, including tarfiles which don't match the
# package name
@@ -274,7 +271,7 @@ def read_package_dir(packages, basedir, dirpath, files, remove=None, upload=Fals
#
# read a single package
#
-def read_one_package(packages, p, relpath, dirpath, files, remove, kind, strict):
+def read_one_package(packages, p, relpath, dirpath, files, kind, strict):
warnings = False
if not re.match(r'^[\w\-._+]*$', p):
diff --git a/calm/uploads.py b/calm/uploads.py
index db26f80..2f98fe5 100644
--- a/calm/uploads.py
+++ b/calm/uploads.py
@@ -206,9 +206,8 @@ def scan(scandir, m, all_packages, arch, args):
rel_fn = os.path.join(relpath, f)
logging.debug("processing %s" % rel_fn)
- # ignore !packages (which we no longer use)
# ignore !mail and !email (which we have already read)
- if f in ['!packages', '!mail', '!email']:
+ if f in ['!mail', '!email']:
files.remove(f)
continue
@@ -279,7 +278,7 @@ def scan(scandir, m, all_packages, arch, args):
# read and validate package
if files:
- if package.read_package_dir(packages, homedir, dirpath, files, remove=removed_files, upload=True):
+ if package.read_package_dir(packages, homedir, dirpath, files, upload=True):
error = True
# always consider timestamp as checked during a dry-run, so it is never
diff --git a/test/testdata/uploads/pkglist.expected b/test/testdata/uploads/pkglist.expected
index 837e898..ae70bb4 100644
--- a/test/testdata/uploads/pkglist.expected
+++ b/test/testdata/uploads/pkglist.expected
@@ -12,7 +12,8 @@
'Like it’s you’re Markup Language™ Nokogiri’s tool―that '
'Bézier."',
'category': 'Devel',
- 'homepage': 'http://homepage.url'}}, {}, False),
+ 'homepage': 'http://homepage.url',
+ 'parse-warnings': ["key 'license' missing"]}}, {}, False),
'testpackage-subpackage': Package('testpackage/testpackage-subpackage', {'1.0-1': Tar('testpackage-subpackage-1.0-1.tar.bz2', 'x86/release/testpackage/testpackage-subpackage', 'aff488008bee3486e25b539fe6ccd1397bd3c5c0ba2ee2cf34af279554baa195af7493ee51d6f8510735c9a2ea54436d776a71e768165716762aec286abbbf83', 195, False)}, {'1.0-1': {'sdesc': '"A test subpackage"',
'ldesc': '"A test subpackage"',
'category': 'Devel',
@@ -27,7 +28,8 @@
'sdesc': '"test package (zstd compressed)"',
'ldesc': '"test package (zstd compressed)"',
'homepage': 'http://zstd.testpkg.invalid',
- 'skip': ''}}, {}, False),
+ 'skip': '',
+ 'parse-warnings': ["key 'license' missing"]}}, {}, False),
'testpackage2-subpackage': Package('testpackage2/testpackage2-subpackage', {'1.0-1': Tar('testpackage2-subpackage-1.0-1.tar.bz2', 'x86/release/testpackage2/testpackage2-subpackage', 'c4bf8e28d71b532e2b741e2931906dec0f0a70d4d051c0503476f864a5228f43765ae3342aafcebfd5a1738073537726b2bfbbd89c6da939a5f46d95aca3feaf', 46, True)}, {'1.0-1': {'sdesc': '"A test subpackage 2"',
'ldesc': '"A test subpackage 2"',
'category': 'Devel'}}, {}, False)}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-09-26 13:20 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-26 13:20 [calm - Cygwin server-side packaging maintenance script] branch master, updated. 20220704-16-g51a73ca Jon TURNEY
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).