[calm - Cygwin server-side packaging maintenance script] branch master, updated. 20200401-19-gb11ef2f

Jon TURNEY via Cygwin-apps-cvs <[email protected]>
Newsgroups gmane.os.cygwin.cvs.apps
Message-ID <[email protected]>


https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/calm.git;h=b11ef2ffff507e3e132891b29bfc83fc737d6981

commit b11ef2ffff507e3e132891b29bfc83fc737d6981
Author: Jon Turney <[email protected]>
Date:   Tue May 19 13:47:31 2020 +0100

    Adjust gitolite configuration
    
    Allow everyone to create, push, rewind and delete a branch called
    'playground'.
    
    Turn on allowReachableSHA1InWant, so git fetches of arbitrary reachable
    non-branch tip commits are allowed.

https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/calm.git;h=bb467a0980d1afe753b513851d244748a923d00c

commit bb467a0980d1afe753b513851d244748a923d00c
Author: Jon Turney <[email protected]>
Date:   Mon May 18 18:36:43 2020 +0100

    Disallow more hints which don't make sense for source package
    
    Future work:
    
    requires: and obsoletes: should also be disallowed, but existing hints
    need cleaning first
    
    skip: should only be allowed (and mandatory) for source package, and
    then a whole lot of logic related to it can be cleaned up

https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/calm.git;h=210821dffa16b1b7042bff1a50d6003619469cfc

commit 210821dffa16b1b7042bff1a50d6003619469cfc
Author: Jon Turney <[email protected]>
Date:   Mon May 18 17:56:34 2020 +0100

    Use build-depends: hint from source package in setup.ini

https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/calm.git;h=848b5b6b430417d80d9b3b5c48de73bce3a66eb6

commit 848b5b6b430417d80d9b3b5c48de73bce3a66eb6
Author: Jon Turney <[email protected]>
Date:   Mon May 18 18:21:25 2020 +0100

    Disallow build-depends: in install package hints
    
    This means we can drop the less restrictive check that an install
    package with a build-depends: hint has a sibling source.

https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/calm.git;h=7bee1947e21d774a88ad7c9849b26d868d7daf72

commit 7bee1947e21d774a88ad7c9849b26d868d7daf72
Author: Jon Turney <[email protected]>
Date:   Mon May 18 16:43:00 2020 +0100

    Store build-depends: comma separated
    
    Store build-depends: in a comma separated form, so package linkification
    on that header works correctly.


Diff:
---
 calm/hint.py                                       | 22 +++++++++++++---------
 calm/mkgitoliteconf.py                             |  5 ++++-
 calm/package.py                                    | 17 +++++------------
 test/test_calm.py                                  |  3 +++
 .../release/test-c/test-c-1.0-1-src.expected       |  5 +----
 .../noarch/release/test-e/test-e-1.0-1.expected    |  2 +-
 .../release/cygwin/cygwin-2.3.0-0.3-src.expected   |  2 --
 .../mDNSResponder-379.32.1-1-src.expected          |  6 +-----
 .../noarch/release/test-c/test-c-1.0-1-src.hint    |  1 -
 .../noarch/release/test-e/test-e-1.0-1.hint        |  1 -
 .../x86/release/cygwin/cygwin-2.3.0-0.3-src.hint   |  2 --
 .../mDNSResponder-379.32.1-1-src.hint              |  5 -----
 12 files changed, 28 insertions(+), 43 deletions(-)

diff --git a/calm/hint.py b/calm/hint.py
index 6e709f0..7ba0a51 100755
--- a/calm/hint.py
+++ b/calm/hint.py
@@ -41,28 +41,32 @@ pvr, override, spvr = range(3)
 
 hintkeys = {}
 
-hintkeys[pvr] = {
+commonkeys = {
     'ldesc': 'multilineval',
-    'message': 'multilineval',
     'category': 'val',
-    'external-source': 'val',
     'sdesc': 'val',
     'skip': 'noval',
     'requires': 'optval',
-    'depends': 'optval',
-    'build-depends': 'optval',
     'obsoletes': 'optval',
     'test': 'noval',   # mark the package as a test version
     'version': 'val',  # version override
     'disable-check': 'val',
-    'provides': 'val',
-    'conflicts': 'val',
     'notes': 'val',    # tool notes; not significant to calm itself
 }
 
-hintkeys[spvr] = hintkeys[pvr].copy()
+hintkeys[pvr] = commonkeys.copy()
+hintkeys[pvr].update({
+    'message': 'multilineval',
+    'external-source': 'val',
+    'depends': 'optval',
+    'provides': 'val',
+    'conflicts': 'val',
+})
+
+hintkeys[spvr] = commonkeys.copy()
 hintkeys[spvr].update({
     'homepage': 'val',
+    'build-depends': 'optval',
 })
 
 hintkeys[override] = {
@@ -306,7 +310,7 @@ def hint_file_parse(fn, kind):
                 hints['requires'] = split_trim_sort_join(hints['requires'], None, ' ')
 
             if 'build-depends' in hints:
-                hints['build-depends'] = split_trim_sort_join(hints['build-depends'], None, ' ')
+                hints['build-depends'] = split_trim_sort_join(hints['build-depends'], None, ', ')
 
             if 'depends' in hints:
                 hints['depends'] = split_trim_sort_join(hints['depends'], ',')
diff --git a/calm/mkgitoliteconf.py b/calm/mkgitoliteconf.py
index 55ff3ce..39c185c 100755
--- a/calm/mkgitoliteconf.py
+++ b/calm/mkgitoliteconf.py
@@ -75,10 +75,13 @@ def do_main(args):
     print('repo @all')
     print('    C  = @leads')
     print('    RW = @leads')
+    print('    RW+ playground$ = @all')
+    print('# anyone can create, push, rewind or delete the \'playground\' branch')
     print('    R  = @all')
     print('    R  = gitweb daemon')
     print('    config core.sharedrepository = all')
-    print('- VREF/MAX_NEWBIN_SIZE/1024 = @all')
+    print('    config uploadpack.allowReachableSHA1InWant = true')
+    print('    - VREF/MAX_NEWBIN_SIZE/1024 = @all')
     print('# this rejects binary files over the size limit, text files of any size are still permiited')
     print('')
 
diff --git a/calm/package.py b/calm/package.py
index fc6d6b7..2790206 100755
--- a/calm/package.py
+++ b/calm/package.py
@@ -784,15 +784,6 @@ def validate_packages(args, packages):
                                         lvl = logging.WARNING
                                 logging.log(lvl, "package '%s' version '%s' has empty install tar file, but it's not in the _obsolete category" % (p, vr))
 
-        # the presence of build-depends only makes sense if this is a source
-        # package, or it has a sibling source package, with which is shares hints
-        if packages[p].kind != Kind.source:
-            for vr in packages[p].version_hints:
-                if 'build-depends' in packages[p].version_hints[vr]:
-                    if 'external-source' in packages[p].version_hints[vr]:
-                        logging.error("package '%s' version '%s' has build-depends but isn't a source package" % (p, vr))
-                        error = True
-
     # make another pass to verify a source tarfile exists for every install
     # tarfile version
     for p in sorted(packages.keys()):
@@ -1119,14 +1110,16 @@ def write_setup_ini(args, packages, arch):
                 if hints.get('obsoletes', ''):
                     print("obsoletes: %s" % hints['obsoletes'], file=f)
 
-                if hints.get('build-depends', ''):
-                    bd = hints['build-depends']
+                if s:
+                    src_hints = packages[s].version_hints.get(version, {})
+                    bd = src_hints.get('build-depends', '')
 
                     # Ideally, we'd transform dependency atoms which aren't
                     # cygwin package names into package names. For the moment,
                     # we don't have the information to do that, so filter them
                     # all out.
-                    bd = [atom for atom in bd.split() if '(' not in atom]
+                    if bd:
+                        bd = [atom for atom in bd.split(', ') if '(' not in atom]
 
                     if bd:
                         print("build-depends: %s" % ', '.join(bd), file=f)
diff --git a/test/test_calm.py b/test/test_calm.py
index f4853cb..712c7bc 100755
--- a/test/test_calm.py
+++ b/test/test_calm.py
@@ -139,6 +139,9 @@ class CalmTest(unittest.TestCase):
                     if f == 'override.hint':
                         kind = hint.override
                         name = 'override'
+                    elif f.endswith('-src.hint'):
+                        kind = hint.spvr
+                        name = f[:-5]
                     else:
                         kind = hint.pvr
                         name = f[:-5]
diff --git a/test/testdata/hints/noarch/release/test-c/test-c-1.0-1-src.expected b/test/testdata/hints/noarch/release/test-c/test-c-1.0-1-src.expected
index c8024d7..0a76a74 100644
--- a/test/testdata/hints/noarch/release/test-c/test-c-1.0-1-src.expected
+++ b/test/testdata/hints/noarch/release/test-c/test-c-1.0-1-src.expected
@@ -1,4 +1 @@
-{'category': 'Devel',
- 'sdesc': '"test package C"',
- 'obsoletes': 'obs-a, obs-b',
- 'depends': 'test-d (>= 1.0), test-e'}
+OrderedDict([('category', 'Devel'), ('sdesc', '"test package C"'), ('obsoletes', 'obs-a, obs-b')])
diff --git a/test/testdata/hints/noarch/release/test-e/test-e-1.0-1.expected b/test/testdata/hints/noarch/release/test-e/test-e-1.0-1.expected
index e7414e7..f842f13 100644
--- a/test/testdata/hints/noarch/release/test-e/test-e-1.0-1.expected
+++ b/test/testdata/hints/noarch/release/test-e/test-e-1.0-1.expected
@@ -1 +1 @@
-OrderedDict([('category', 'Devel'), ('sdesc', '"test package E"'), ('build-depends', 'libtextcat-devel')])
+OrderedDict([('category', 'Devel'), ('sdesc', '"test package E"')])
diff --git a/test/testdata/hints/x86/release/cygwin/cygwin-2.3.0-0.3-src.expected b/test/testdata/hints/x86/release/cygwin/cygwin-2.3.0-0.3-src.expected
index 4c2d9d7..a508218 100644
--- a/test/testdata/hints/x86/release/cygwin/cygwin-2.3.0-0.3-src.expected
+++ b/test/testdata/hints/x86/release/cygwin/cygwin-2.3.0-0.3-src.expected
@@ -2,6 +2,4 @@
  'ldesc': '"The UNIX emulation engine"',
  'category': 'Base',
  'requires': 'base-cygwin',
- 'provides': 'cygwin-api0_291',
- 'conflicts': 'fruit-juice',
  'test': ''}
diff --git a/test/testdata/hints/x86/release/mDNSResponder/mDNSResponder-379.32.1-1-src.expected b/test/testdata/hints/x86/release/mDNSResponder/mDNSResponder-379.32.1-1-src.expected
index f02a324..c7832e5 100644
--- a/test/testdata/hints/x86/release/mDNSResponder/mDNSResponder-379.32.1-1-src.expected
+++ b/test/testdata/hints/x86/release/mDNSResponder/mDNSResponder-379.32.1-1-src.expected
@@ -3,8 +3,4 @@
  'sdesc': '"Bonjour Zeroconf implementation"',
  'ldesc': '"Bonjour, also known as zero-configuration networking, enables\n'
           'automatic discovery of computers, devices, and services on IP networks using\n'
-          'industry standard IP protocols."',
- 'message': 'mDNSResponder "The Cygwin mDNSResponder package contains only clients.\n'
-            "If you do not already have the 'Bonjour Service' installed (it comes with\n"
-            'a number of popular Windows programs), then you can download it at\n'
-            'http://support.apple.com/kb/DL999"'}
+          'industry standard IP protocols."'}
diff --git a/test/testdata/relarea/noarch/release/test-c/test-c-1.0-1-src.hint b/test/testdata/relarea/noarch/release/test-c/test-c-1.0-1-src.hint
index 4610d7a..bedf581 100755
--- a/test/testdata/relarea/noarch/release/test-c/test-c-1.0-1-src.hint
+++ b/test/testdata/relarea/noarch/release/test-c/test-c-1.0-1-src.hint
@@ -1,4 +1,3 @@
 category: Devel
 sdesc: "test package C"
 obsoletes: obs-a obs-b
-depends: test-d (>= 1.0), test-e
diff --git a/test/testdata/relarea/noarch/release/test-e/test-e-1.0-1.hint b/test/testdata/relarea/noarch/release/test-e/test-e-1.0-1.hint
index d151b15..e14c850 100755
--- a/test/testdata/relarea/noarch/release/test-e/test-e-1.0-1.hint
+++ b/test/testdata/relarea/noarch/release/test-e/test-e-1.0-1.hint
@@ -1,3 +1,2 @@
 category: Devel
 sdesc: "test package E"
-build-depends: libtextcat-devel
diff --git a/test/testdata/relarea/x86/release/cygwin/cygwin-2.3.0-0.3-src.hint b/test/testdata/relarea/x86/release/cygwin/cygwin-2.3.0-0.3-src.hint
index 9e3e36e..dd0ba4b 100644
--- a/test/testdata/relarea/x86/release/cygwin/cygwin-2.3.0-0.3-src.hint
+++ b/test/testdata/relarea/x86/release/cygwin/cygwin-2.3.0-0.3-src.hint
@@ -2,6 +2,4 @@ sdesc: "The UNIX emulation engine"
 ldesc: "The UNIX emulation engine"
 category: Base
 requires: base-cygwin
-provides: cygwin-api0_291
-conflicts: fruit-juice
 test:
diff --git a/test/testdata/relarea/x86/release/mDNSResponder/mDNSResponder-379.32.1-1-src.hint b/test/testdata/relarea/x86/release/mDNSResponder/mDNSResponder-379.32.1-1-src.hint
index e50938b..7cc145b 100644
--- a/test/testdata/relarea/x86/release/mDNSResponder/mDNSResponder-379.32.1-1-src.hint
+++ b/test/testdata/relarea/x86/release/mDNSResponder/mDNSResponder-379.32.1-1-src.hint
@@ -4,8 +4,3 @@ sdesc: "Bonjour Zeroconf implementation"
 ldesc: "Bonjour, also known as zero-configuration networking, enables
 automatic discovery of computers, devices, and services on IP networks using
 industry standard IP protocols."
-
-message: mDNSResponder "The Cygwin mDNSResponder package contains only clients.
-If you do not already have the 'Bonjour Service' installed (it comes with
-a number of popular Windows programs), then you can download it at
-http://support.apple.com/kb/DL999"
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.