public inbox for cygwin-apps-cvs@sourceware.org
help / color / mirror / Atom feed
* [calm - Cygwin server-side packaging maintenance script] branch master, updated. 20200611-23-g6f8f0d8
@ 2021-01-04 14:43 Jon TURNEY
  0 siblings, 0 replies; only message in thread
From: Jon TURNEY @ 2021-01-04 14:43 UTC (permalink / raw)
  To: cygwin-apps-cvs




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

commit 6f8f0d86e4a66e6b43c2f9676619f3d89fae6acb
Author: Jon Turney <jon.turney@dronecode.org.uk>
Date:   Thu Dec 31 17:03:29 2020 +0000

    Add zstd to permitted archive compressions
    
    Use the xtarfile module to handle zstd compressed archive.
    
    Note this isn't quite as straightforward as 'import xtarfile as
    tarfile', because it isn't precisely a drop-in replacement for tarfile,
    because:
    
    (i) the 'mode' argument to xtarfile.open() is mandatory, and
    (ii) it doesn't re-export tarfile exception classes such as tarfile.ReadError

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

commit b146f244ce0f015948cff181188b2696c6c996eb
Author: Jon Turney <jon.turney@dronecode.org.uk>
Date:   Sat Jan 2 13:54:20 2021 +0000

    Add github action to lint and run tests

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

commit 172ddcf6685678444229d390e323f227ae7d1ca5
Author: Jon Turney <jon.turney@dronecode.org.uk>
Date:   Thu Dec 31 16:37:09 2020 +0000

    Stop permitting upload of 0-byte compressed files
    
    Stop permitting the upload of a 0-byte compressed file in the place of
    an empty compressed archive. (Such files existing in the release are are
    still accepted for historical compatibility).
    
    Cygport stopped generating these historical anomalies a few years ago.

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

commit 0d523fc086748e112dd81aacf76c37fef602040b
Author: Jon Turney <jon.turney@dronecode.org.uk>
Date:   Thu Dec 31 16:30:33 2020 +0000

    Update TODO

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

commit 2a428feb38573f239c06767278cfae505051a41e
Author: Jon Turney <jon.turney@dronecode.org.uk>
Date:   Thu Dec 31 16:19:38 2020 +0000

    Factor out regex for various compression file suffixes
    
    Factor out the regex for various compression file suffixes into
    common_constants.  This is still not ideal as it leaves various
    not-quite identical regexs for matching filenames.

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

commit 46bebfc1d8355dd14c1d46e79e55cfc45d5c1472
Author: Jon Turney <jon.turney@dronecode.org.uk>
Date:   Thu Dec 31 16:31:15 2020 +0000

    Remove source package validator queue experiment


Diff:
---
 .github/workflows/calm.yaml                        |  28 +++++++++
 TODO                                               |   1 +
 calm/calm.py                                       |   6 --
 calm/common_constants.py                           |  10 +--
 calm/dedupsrc.py                                   |   3 +-
 calm/find-duplicates.py                            |   5 +-
 calm/fix-missing-src-hint-info.py                  |   2 +-
 calm/fix-missing-src-hint.py                       |   2 +-
 calm/fixes.py                                      |   3 +-
 calm/hint-migrate.py                               |   2 +-
 calm/package.py                                    |   8 +--
 calm/pkg2html.py                                   |   4 +-
 calm/queue.py                                      |  70 ---------------------
 calm/uploads.py                                    |  35 ++++-------
 requirements.txt                                   |   2 +-
 setup.py                                           |   3 +
 test/test_calm.py                                  |   3 +-
 .../testpackage-zstd-1.0-1-src.hint                |   6 ++
 .../testpackage-zstd-1.0-1-src.tar.zst             | Bin 0 -> 313 bytes
 .../testpackage-zstd/testpackage-zstd-1.0-1.hint   |   5 ++
 .../testpackage-zstd-1.0-1.tar.zst                 | Bin 0 -> 98 bytes
 .../testpackage2-subpackage-1.0-1.tar.bz2          | Bin 14 -> 46 bytes
 test/testdata/process_arch/homedir.expected        |   4 ++
 test/testdata/uploads/move.expected                |   4 ++
 test/testdata/uploads/pkglist.expected             |  12 +++-
 25 files changed, 97 insertions(+), 121 deletions(-)

diff --git a/.github/workflows/calm.yaml b/.github/workflows/calm.yaml
new file mode 100644
index 0000000..bae70d4
--- /dev/null
+++ b/.github/workflows/calm.yaml
@@ -0,0 +1,28 @@
+name: calm
+on: [push, pull_request]
+
+jobs:
+  test:
+
+    runs-on: ubuntu-latest
+    strategy:
+      fail-fast: false
+      matrix:
+        python-version: [3.4, 3.5, 3.6, 3.7, 3.8]
+
+    steps:
+      - uses: actions/checkout@v2
+      - name: Set up Python ${{ matrix.python-version }}
+        uses: actions/setup-python@v2
+        with:
+          python-version: ${{ matrix.python-version }}
+      - name: Install dependencies
+        run: |
+          python -m pip install --upgrade pip
+          pip install -r requirements.txt
+      - name: flake8
+        run: |
+          flake8 --count --show-source
+      - name: Test
+        run: |
+          python -m unittest discover
diff --git a/TODO b/TODO
index c7c6f26..534080c 100644
--- a/TODO
+++ b/TODO
@@ -11,3 +11,4 @@
 * report changes in override.hint like we used to for setup.hint
 * maintainers.py should only re-read cygwin-pkg-maint if it's changed
 * empty install packages should only come in two variants: no dependencies and in _obsolete category, or with dependencies and in 'meta' category
+* expire test versions superseded by a non-test version (unless keep-superseded-test: in override.hint?)
diff --git a/calm/calm.py b/calm/calm.py
index 889204b..b43f65d 100755
--- a/calm/calm.py
+++ b/calm/calm.py
@@ -71,7 +71,6 @@ from . import irk
 from . import maintainers
 from . import package
 from . import pkg2html
-from . import queue
 from . import setup_exe
 from . import uploads
 from . import utils
@@ -161,9 +160,6 @@ def process_uploads(args, state):
                     skip_maintainer = True
                     continue
 
-                # queue for source package validator
-                queue.add(args, scan_result[arch].to_relarea, os.path.join(m.homedir()))
-
             # if there are no added or removed files for this maintainer, we
             # don't have anything to do
             if not any([scan_result[a].to_relarea or scan_result[a].to_vault for a in scan_result]):
@@ -664,7 +660,6 @@ def main():
     setupdir_default = common_constants.HTDOCS
     vault_default = common_constants.VAULT
     logdir_default = '/sourceware/cygwin-staging/logs'
-    queuedir_default = '/sourceware/cygwin-staging/queue'
 
     parser = argparse.ArgumentParser(description='Upset replacement')
     parser.add_argument('-d', '--daemon', action='store', nargs='?', const=pidfile_default, help="daemonize (PIDFILE defaults to " + pidfile_default + ")", metavar='PIDFILE')
@@ -676,7 +671,6 @@ def main():
     parser.add_argument('--logdir', action='store', metavar='DIR', help="log directory (default: '" + logdir_default + "')", default=logdir_default)
     parser.add_argument('--orphanmaint', action='store', metavar='NAMES', help="orphan package maintainers (default: '" + orphanmaint_default + "')", default=orphanmaint_default)
     parser.add_argument('--pkglist', action='store', metavar='FILE', help="package maintainer list (default: " + pkglist_default + ")", default=pkglist_default)
-    parser.add_argument('--queuedir', action='store', nargs='?', metavar='DIR', help="queue directory (default: '" + queuedir_default + "')", const=queuedir_default)
     parser.add_argument('--release', action='store', help='value for setup-release key (default: cygwin)', default='cygwin')
     parser.add_argument('--releasearea', action='store', metavar='DIR', help="release directory (default: " + relarea_default + ")", default=relarea_default, dest='rel_area')
     parser.add_argument('--setupdir', action='store', metavar='DIR', help="setup executable directory (default: " + setupdir_default + ")", default=setupdir_default)
diff --git a/calm/common_constants.py b/calm/common_constants.py
index fe3fcfa..05473f5 100644
--- a/calm/common_constants.py
+++ b/calm/common_constants.py
@@ -82,10 +82,6 @@ if os.uname()[1] == 'tambora':
     ALWAYS_BCC = ''
     MAILHOST = 'allegra'
 
-# size of a 0-byte file compressed
-COMPRESSION_MINSIZE = {
-    'bz2': 14,
-    'gz': 24,
-    'lzma': 23,
-    'xz': 32,
-}
+# package compressions
+PACKAGE_COMPRESSIONS = ['bz2', 'gz', 'lzma', 'xz', 'zst']
+PACKAGE_COMPRESSIONS_RE = r'\.(' + '|'.join(PACKAGE_COMPRESSIONS) + r')'
diff --git a/calm/dedupsrc.py b/calm/dedupsrc.py
index 5f84aea..2c71d52 100644
--- a/calm/dedupsrc.py
+++ b/calm/dedupsrc.py
@@ -91,7 +91,8 @@ def dedup(archive, relarea):
     (path, filename) = os.path.split(archive)
 
     # parse tarfile name
-    match = re.match(r'^(.+?)-(\d.*)-src\.tar\.(bz2|gz|lzma|xz)$', filename)
+    match = re.match(r'^(.+?)-(\d.*)-src\.tar' +
+                     common_constants.PACKAGE_COMPRESSIONS_RE + r'$', filename)
 
     if not match:
         print('tarfile name %s does not meet expectations' % (filename))
diff --git a/calm/find-duplicates.py b/calm/find-duplicates.py
index 7e49219..9e1aabb 100644
--- a/calm/find-duplicates.py
+++ b/calm/find-duplicates.py
@@ -27,6 +27,7 @@ import re
 import os
 import sys
 import tarfile
+import xtarfile
 
 from . import common_constants
 
@@ -65,7 +66,7 @@ def read_tar(f):
     result = {}
 
     try:
-        with tarfile.open(f) as t:
+        with xtarfile.open(f, mode='r') as t:
             for m in t:
                 if m.isfile():
                     f = t.extractfile(m)
@@ -137,7 +138,7 @@ def find_duplicates(args):
 
         for f in files:
             # not an archive
-            if not re.match(r'^.*\.tar\.(bz2|gz|lzma|xz)$', f):
+            if not re.match(r'^.*\.tar' + common_constants.PACKAGE_COMPRESSIONS_RE + r'$', f):
                 continue
 
             f1 = os.path.join(dirpath, f)
diff --git a/calm/fix-missing-src-hint-info.py b/calm/fix-missing-src-hint-info.py
index cb461b0..c1c9d28 100644
--- a/calm/fix-missing-src-hint-info.py
+++ b/calm/fix-missing-src-hint-info.py
@@ -43,7 +43,7 @@ def fix_hints(relarea, packages):
                 continue
 
         for f in files:
-            match = re.match(r'^(.*)-src\.tar\.(bz2|gz|lzma|xz)$', f)
+            match = re.match(r'^(.*)-src\.tar' + common_constants.PACKAGE_COMPRESSIONS_RE + r'$', f)
             if match:
                 hf = match.group(1) + '-src.hint'
                 if hf not in files:
diff --git a/calm/fix-missing-src-hint.py b/calm/fix-missing-src-hint.py
index ba6f0d7..d0bb662 100644
--- a/calm/fix-missing-src-hint.py
+++ b/calm/fix-missing-src-hint.py
@@ -38,7 +38,7 @@ from . import common_constants
 def fix_hints(relarea):
     for (dirpath, _subdirs, files) in os.walk(relarea):
         for f in files:
-            match = re.match(r'^(.*)-src\.tar\.(bz2|gz|lzma|xz)$', f)
+            match = re.match(r'^(.*)-src\.tar' + common_constants.PACKAGE_COMPRESSIONS_RE + r'$', f)
             if match:
                 pvr = match.group(1)
                 old = pvr + '.hint'
diff --git a/calm/fixes.py b/calm/fixes.py
index 063ebcd..e7a9839 100644
--- a/calm/fixes.py
+++ b/calm/fixes.py
@@ -30,13 +30,14 @@ import socket
 import tarfile
 import urllib.request
 import urllib.error
+import xtarfile
 
 from . import hint
 
 
 def read_cygport(dirpath, tf):
     try:
-        with tarfile.open(os.path.join(dirpath, tf)) as a:
+        with xtarfile.open(os.path.join(dirpath, tf), mode='r') as a:
             cygports = [m for m in a.getmembers() if m.name.endswith('.cygport')]
 
             if len(cygports) != 1:
diff --git a/calm/hint-migrate.py b/calm/hint-migrate.py
index d7c6f41..e06edc6 100644
--- a/calm/hint-migrate.py
+++ b/calm/hint-migrate.py
@@ -51,7 +51,7 @@ def hint_migrate(args):
             migrate = set()
             vr = set()
             for f in files:
-                match = re.match(r'^(.*?)(-src|)\.tar\.(bz2|gz|lzma|xz)$', f)
+                match = re.match(r'^(.*?)(-src|)\.tar' + common_constants.PACKAGE_COMPRESSIONS_RE + r'$', f)
 
                 # not an archive?
                 if not match:
diff --git a/calm/package.py b/calm/package.py
index d59586a..b28907a 100755
--- a/calm/package.py
+++ b/calm/package.py
@@ -35,9 +35,9 @@ import logging
 import os
 import pprint
 import re
-import tarfile
 import textwrap
 import time
+import xtarfile
 
 from .version import SetupVersion
 from .movelist import MoveList
@@ -233,7 +233,7 @@ def read_package_dir(packages, basedir, dirpath, files, remove=None, upload=Fals
             else:
                 fl[Kind.binary].append(f)
             files.remove(f)
-        elif re.match(r'^' + re.escape(p) + r'.*\.tar\.(bz2|gz|lzma|xz)$', f):
+        elif re.match(r'^' + re.escape(p) + r'.*\.tar' + common_constants.PACKAGE_COMPRESSIONS_RE + r'$', f):
             if '-src.tar' in f:
                 fl[Kind.source].append(f)
             else:
@@ -329,7 +329,7 @@ def read_one_package(packages, p, relpath, dirpath, files, remove, kind):
         #
         # P must match the package name, V can contain anything, R must
         # start with a number
-        match = re.match(r'^' + re.escape(p) + r'-(.+)-(\d[0-9a-zA-Z.]*)(-src|)\.(tar\.(bz2|gz|lzma|xz)|hint)$', f)
+        match = re.match(r'^' + re.escape(p) + r'-(.+)-(\d[0-9a-zA-Z.]*)(-src|)\.(tar' + common_constants.PACKAGE_COMPRESSIONS_RE + r'|hint)$', f)
         if not match:
             logging.error("file '%s' in package '%s' doesn't follow naming convention" % (f, p))
             return True
@@ -455,7 +455,7 @@ def tarfile_is_empty(tf):
 
     # if it's really a tar file, does it contain zero files?
     try:
-        with tarfile.open(tf) as a:
+        with xtarfile.open(tf, mode='r') as a:
             if any(a) == 0:
                 return True
     except Exception as e:
diff --git a/calm/pkg2html.py b/calm/pkg2html.py
index 32709bb..ffd16b0 100755
--- a/calm/pkg2html.py
+++ b/calm/pkg2html.py
@@ -49,9 +49,9 @@ import os
 import re
 import string
 import sys
-import tarfile
 import textwrap
 import time
+import xtarfile
 
 from .version import SetupVersion
 from . import common_constants
@@ -482,7 +482,7 @@ def write_arch_listing(args, packages, arch):
                             pass
                         else:
                             try:
-                                with tarfile.open(tf) as a:
+                                with xtarfile.open(tf, mode='r') as a:
                                     for i in a:
                                         print('    %-16s%12d %s' % (time.strftime('%Y-%m-%d %H:%M', time.gmtime(i.mtime)), i.size, i.name), file=f, end='')
                                         if i.isdir():
diff --git a/calm/queue.py b/calm/queue.py
deleted file mode 100644
index 94ad04c..0000000
--- a/calm/queue.py
+++ /dev/null
@@ -1,70 +0,0 @@
-#!/usr/bin/env python3
-#
-# Copyright (c) 2016 Jon Turney
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-#
-
-import logging
-import os
-import re
-
-from . import uploads
-
-QUEUE = 'package_queue'
-
-
-#
-#
-#
-
-def add(args, movelist, fromdir):
-    if not getattr(args, 'queuedir', None):
-        return
-
-    queue_root = os.path.join(args.queuedir, 'dirq')
-    upload_root = os.path.join(args.queuedir, 'uploads')
-
-    from dirq.QueueSimple import QueueSimple
-    dirq = QueueSimple(os.path.join(queue_root, QUEUE))
-
-    # clean up empty directories
-    dirq.purge()
-    os.system('find %s -depth -mindepth 1 -type d -empty -delete' % upload_root)
-
-    # are there any source packages in the filelist?
-    srcpkgs = []
-    for p in movelist:
-        for f in movelist[p]:
-            if re.search(r'-src.tar.(bz2|gz|lzma|xz)$', f):
-                srcpkgs.append(os.path.join(p, f))
-
-    # if so...
-    #
-    # XXX: really this should break things up into the set of files for each
-    # source file
-    if len(srcpkgs) >= 1:
-        # keep all the files for comparison
-        uploads.copy(args, movelist, fromdir, upload_root)
-
-        # queue any srcpkgs
-        for p in srcpkgs:
-            if not args.dryrun:
-                logging.debug("queuing source package %s for validation" % (p))
-                dirq.add(p)
diff --git a/calm/uploads.py b/calm/uploads.py
index 6d20d58..9998e46 100644
--- a/calm/uploads.py
+++ b/calm/uploads.py
@@ -31,8 +31,8 @@ import os
 import logging
 import re
 import shutil
-import tarfile
 import time
+import xtarfile
 
 from .movelist import MoveList
 from . import common_constants
@@ -157,7 +157,7 @@ def scan(m, all_packages, arch, args):
                 logging.warning("'%s' seen, please update to cygport >= 0.23.0" % f)
                 seen = True
 
-            match = re.match(r'^([^-].*?)(-src|)\.tar\.(bz2|gz|lzma|xz)$', f)
+            match = re.match(r'^([^-].*?)(-src|)\.tar' + common_constants.PACKAGE_COMPRESSIONS_RE + r'$', f)
             if match:
                 if (pvr is not None) and (pvr != match.group(1)):
                     ambiguous = True
@@ -177,7 +177,7 @@ def scan(m, all_packages, arch, args):
                 files.append(new)
 
         for f in sorted(files):
-            match = re.match(r'^([^-].*)-src\.tar\.(bz2|gz|lzma|xz)$', f)
+            match = re.match(r'^([^-].*)-src\.tar' + common_constants.PACKAGE_COMPRESSIONS_RE + r'$', f)
             if match:
                 pvr = match.group(1)
                 old = pvr + '.hint'
@@ -231,29 +231,20 @@ def scan(m, all_packages, arch, args):
                 continue
 
             # verify compressed archive files are valid
-            match = re.search(r'\.tar\.(bz2|gz|lzma|xz)$', f)
+            match = re.search(r'\.tar' + common_constants.PACKAGE_COMPRESSIONS_RE + r'$', f)
             if match:
                 valid = True
 
-                size = os.path.getsize(fn)
-                minsize = common_constants.COMPRESSION_MINSIZE[match.group(1)]
-                if size > minsize:
-                    try:
-                        # we need to extract all of an archive contents to validate
-                        # it
-                        with tarfile.open(fn) as a:
-                            a.getmembers()
-                    except Exception as e:
-                        valid = False
-                        logging.error("exception %s while reading %s" % (type(e).__name__, fn))
-                        logging.debug('', exc_info=True)
-                elif size == minsize:
-                    # accept a compressed empty file, even though it isn't a
-                    # valid compressed archive
-                    logging.warning("%s is a compressed empty file, not a compressed archive, please update to cygport >= 0.23.1" % f)
-                else:
-                    logging.error("compressed archive %s is too small to be valid (%d bytes)" % (f, size))
+                try:
+                    # we need to extract all of an archive contents to validate
+                    # it
+                    with xtarfile.open(fn, mode='r') as a:
+                        a.getmembers()
+
+                except Exception as e:
                     valid = False
+                    logging.error("exception %s while reading %s" % (type(e).__name__, fn))
+                    logging.debug('', exc_info=True)
 
                 if not valid:
                     files.remove(f)
diff --git a/requirements.txt b/requirements.txt
index 2363fcf..bc5496c 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,4 +1,3 @@
-dirq
 flake8
 flake8-blind-except
 flake8-bugbear ; python_version >= "3.5"
@@ -7,3 +6,4 @@ flake8-import-order == 0.14.1
 lockfile
 pycodestyle
 python-daemon
+xtarfile[zstd]
diff --git a/setup.py b/setup.py
index 31f5eff..291be8b 100644
--- a/setup.py
+++ b/setup.py
@@ -19,4 +19,7 @@ setup(
     },
     url='https://cygwin.com/git/?p=cygwin-apps/calm.git',
     test_suite='tests',
+    install_requires=[
+        'xtarfile[zstd]',
+    ],
 )
diff --git a/test/test_calm.py b/test/test_calm.py
index fa48097..4c24313 100755
--- a/test/test_calm.py
+++ b/test/test_calm.py
@@ -326,7 +326,7 @@ class CalmTest(unittest.TestCase):
         oldcwd = os.getcwd()
         os.chdir(test_root)
 
-        pkglist = ['after-ready', 'not-ready', 'testpackage', 'testpackage2']
+        pkglist = ['after-ready', 'not-ready', 'testpackage', 'testpackage2', 'testpackage-zstd']
 
         mlist = {}
         mlist = maintainers.add_directories(mlist, 'testdata/homes')
@@ -335,6 +335,7 @@ class CalmTest(unittest.TestCase):
 
         ready_fns = [(os.path.join(m.homedir(), 'x86', 'release', 'testpackage', '!ready'), ''),
                      (os.path.join(m.homedir(), 'x86', 'release', 'testpackage2', 'testpackage2-subpackage', '!ready'), ''),
+                     (os.path.join(m.homedir(), 'x86', 'release', 'testpackage-zstd', '!ready'), ''),
                      (os.path.join(m.homedir(), 'x86', 'release', 'after-ready', '!ready'), '-t 198709011700'),
                      (os.path.join(m.homedir(), 'x86', 'release', 'corrupt', '!ready'), '')]
         for (f, t) in ready_fns:
diff --git a/test/testdata/homes/Blooey McFooey/x86/release/testpackage-zstd/testpackage-zstd-1.0-1-src.hint b/test/testdata/homes/Blooey McFooey/x86/release/testpackage-zstd/testpackage-zstd-1.0-1-src.hint
new file mode 100644
index 0000000..386cdb9
--- /dev/null
+++ b/test/testdata/homes/Blooey McFooey/x86/release/testpackage-zstd/testpackage-zstd-1.0-1-src.hint	
@@ -0,0 +1,6 @@
+category: Base
+build-depends: cygport 
+sdesc: "test package (zstd compressed)"
+ldesc: "test package (zstd compressed)"
+skip:
+
diff --git a/test/testdata/homes/Blooey McFooey/x86/release/testpackage-zstd/testpackage-zstd-1.0-1-src.tar.zst b/test/testdata/homes/Blooey McFooey/x86/release/testpackage-zstd/testpackage-zstd-1.0-1-src.tar.zst
new file mode 100644
index 0000000..61c3fe0
Binary files /dev/null and b/test/testdata/homes/Blooey McFooey/x86/release/testpackage-zstd/testpackage-zstd-1.0-1-src.tar.zst differ
diff --git a/test/testdata/homes/Blooey McFooey/x86/release/testpackage-zstd/testpackage-zstd-1.0-1.hint b/test/testdata/homes/Blooey McFooey/x86/release/testpackage-zstd/testpackage-zstd-1.0-1.hint
new file mode 100644
index 0000000..e5d07d2
--- /dev/null
+++ b/test/testdata/homes/Blooey McFooey/x86/release/testpackage-zstd/testpackage-zstd-1.0-1.hint	
@@ -0,0 +1,5 @@
+category: Base
+requires:   
+sdesc: "test package (zstd compressed)"
+ldesc: "test package (zstd compressed)"
+
diff --git a/test/testdata/homes/Blooey McFooey/x86/release/testpackage-zstd/testpackage-zstd-1.0-1.tar.zst b/test/testdata/homes/Blooey McFooey/x86/release/testpackage-zstd/testpackage-zstd-1.0-1.tar.zst
new file mode 100644
index 0000000..e21ce6d
Binary files /dev/null and b/test/testdata/homes/Blooey McFooey/x86/release/testpackage-zstd/testpackage-zstd-1.0-1.tar.zst differ
diff --git a/test/testdata/homes/Blooey McFooey/x86/release/testpackage2/testpackage2-subpackage/testpackage2-subpackage-1.0-1.tar.bz2 b/test/testdata/homes/Blooey McFooey/x86/release/testpackage2/testpackage2-subpackage/testpackage2-subpackage-1.0-1.tar.bz2
index b56f3b9..a704637 100644
Binary files a/test/testdata/homes/Blooey McFooey/x86/release/testpackage2/testpackage2-subpackage/testpackage2-subpackage-1.0-1.tar.bz2 and b/test/testdata/homes/Blooey McFooey/x86/release/testpackage2/testpackage2-subpackage/testpackage2-subpackage-1.0-1.tar.bz2 differ
diff --git a/test/testdata/process_arch/homedir.expected b/test/testdata/process_arch/homedir.expected
index 42e9902..7c07d4f 100644
--- a/test/testdata/process_arch/homedir.expected
+++ b/test/testdata/process_arch/homedir.expected
@@ -13,6 +13,10 @@
  'Blooey McFooey/x86/release/per-version': [],
  'Blooey McFooey/x86/release/per-version-replacement-hint-only': [],
  'Blooey McFooey/x86/release/testpackage': ['testpackage-1.0-1-src.hint.bak'],
+ 'Blooey McFooey/x86/release/testpackage-zstd': ['testpackage-zstd-1.0-1-src.hint',
+                                                 'testpackage-zstd-1.0-1-src.tar.zst',
+                                                 'testpackage-zstd-1.0-1.hint',
+                                                 'testpackage-zstd-1.0-1.tar.zst'],
  'Blooey McFooey/x86/release/testpackage/testpackage-subpackage': [],
  'Blooey McFooey/x86/release/testpackage2': ['setup.hint', 'testpackage2-1.0-1.tar.bz2'],
  'Blooey McFooey/x86/release/testpackage2/testpackage2-subpackage': ['inprogress.SftpXFR.1234',
diff --git a/test/testdata/uploads/move.expected b/test/testdata/uploads/move.expected
index bfb7728..c0112d2 100644
--- a/test/testdata/uploads/move.expected
+++ b/test/testdata/uploads/move.expected
@@ -2,6 +2,10 @@
                              'testpackage-1.0-1-src.tar.bz2',
                              'testpackage-1.0-1.hint',
                              'testpackage-1.0-1.tar.bz2'],
+ 'x86/release/testpackage-zstd': ['testpackage-zstd-1.0-1-src.hint',
+                                  'testpackage-zstd-1.0-1-src.tar.zst',
+                                  'testpackage-zstd-1.0-1.hint',
+                                  'testpackage-zstd-1.0-1.tar.zst'],
  'x86/release/testpackage/testpackage-subpackage': ['testpackage-subpackage-1.0-1.hint',
                                                     'testpackage-subpackage-1.0-1.tar.bz2'],
  'x86/release/testpackage2/testpackage2-subpackage': ['testpackage2-subpackage-1.0-1.hint',
diff --git a/test/testdata/uploads/pkglist.expected b/test/testdata/uploads/pkglist.expected
index 99cdd09..e5cbbbf 100644
--- a/test/testdata/uploads/pkglist.expected
+++ b/test/testdata/uploads/pkglist.expected
@@ -19,6 +19,16 @@
            'ldesc': '"A test subpackage"',
            'category': 'Devel',
            'external-source': 'testpackage-src'}}, {}, False),
- 'testpackage2-subpackage': Package('testpackage2/testpackage2-subpackage', {'1.0-1': {'testpackage2-subpackage-1.0-1.tar.bz2': Tar('testpackage2-subpackage-1.0-1.tar.bz2', 'x86/release/testpackage2/testpackage2-subpackage', '6de201dfed1d45412509c65deb34690dc2d09c6aafccfe491fd2f440f92842b9c755b61dc7bcdd4cc0c9f18cf46c2b3a1241e99c4c2a33fff5555e7b2f0b6348', 14, True)}}, {'1.0-1': {'sdesc': '"A test subpackage 2"',
+ 'testpackage-zstd': Package('testpackage-zstd', {'1.0-1': {'testpackage-zstd-1.0-1.tar.zst': Tar('testpackage-zstd-1.0-1.tar.zst', 'x86/release/testpackage-zstd', '044066c54c036190f9b0496ccf31f74748d209cce961352e19631876d5abd79ef6d2b34edfb955b8d1a7a781294ee0636bb1305afe410b34562367a2cb77988d', 98, False)}}, {'1.0-1': {'category': 'Base',
+           'requires': '',
+           'sdesc': '"test package (zstd compressed)"',
+           'ldesc': '"test package (zstd compressed)"',
+           'depends': ''}}, {}, False),
+ 'testpackage-zstd-src': Package('testpackage-zstd', {'1.0-1': {'testpackage-zstd-1.0-1-src.tar.zst': Tar('testpackage-zstd-1.0-1-src.tar.zst', 'x86/release/testpackage-zstd', '90561ec4dad76268773856cbdda891b0e7b53f26492777f1ff76757844cb47124396feb76f1e30bc1baa680f1d788de21d89e612faeb30b5039b210ca9186434', 313, False)}}, {'1.0-1': {'category': 'Base',
+           'build-depends': 'cygport',
+           'sdesc': '"test package (zstd compressed)"',
+           'ldesc': '"test package (zstd compressed)"',
+           'skip': ''}}, {}, True),
+ 'testpackage2-subpackage': Package('testpackage2/testpackage2-subpackage', {'1.0-1': {'testpackage2-subpackage-1.0-1.tar.bz2': 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:[~2021-01-04 14:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-04 14:43 [calm - Cygwin server-side packaging maintenance script] branch master, updated. 20200611-23-g6f8f0d8 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).