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




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

commit 66ccbbe56e49d4c92fafd28ba1ef42e4beea8712
Author: Jon Turney <jon.turney@dronecode.org.uk>
Date:   Fri Jul 6 15:53:26 2018 +0100

    Prevent very old setup versions from being used
    
    When a setup version is specified, also use a lexer defect to prevent
    very old (>3 years) setup versions from being used.


Diff:
---
 calm/package.py                               | 11 ++++++-----
 test/testdata/inifile/setup.ini.expected      |  3 ++-
 test/testdata/process_arch/setup.ini.expected |  3 ++-
 3 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/calm/package.py b/calm/package.py
index 8628b28..ff30122 100755
--- a/calm/package.py
+++ b/calm/package.py
@@ -967,12 +967,13 @@ def write_setup_ini(args, packages, arch):
         print("setup-timestamp: %d" % tz, file=f)
 
         if args.setup_version:
+            # this token exists in the lexer, but not in the grammar up until
+            # 2.878 (when it was removed), so will cause a parse error with
+            # versions prior to that.
+            print("include-setup: setup <2.878 not supported", file=f)
+
             # not implemented until 2.890, ignored by earlier versions
-            #
-            # (versions prior to 2.844 only supported x86 installs, since x86_64
-            # wasn't available yet, and setup.ini was located at a different URL
-            # path)
-            print("setup-minimum-version: 2.844", file=f)
+            print("setup-minimum-version: 2.878", file=f)
 
             # for setup to check if a setup upgrade is possible
             print("setup-version: %s" % args.setup_version, file=f)
diff --git a/test/testdata/inifile/setup.ini.expected b/test/testdata/inifile/setup.ini.expected
index b4b34b5..f5b6501 100644
--- a/test/testdata/inifile/setup.ini.expected
+++ b/test/testdata/inifile/setup.ini.expected
@@ -8,7 +8,8 @@
  'release: testing\n'
  'arch: x86\n'
  'setup-timestamp: 1458221800\n'
- 'setup-minimum-version: 2.844\n'
+ 'include-setup: setup <2.878 not supported\n'
+ 'setup-minimum-version: 2.878\n'
  'setup-version: 4.321\n'
  '\n'
  '@ arc\n'
diff --git a/test/testdata/process_arch/setup.ini.expected b/test/testdata/process_arch/setup.ini.expected
index e150e61..ea487ef 100644
--- a/test/testdata/process_arch/setup.ini.expected
+++ b/test/testdata/process_arch/setup.ini.expected
@@ -8,7 +8,8 @@
  'release: trial\n'
  'arch: x86\n'
  'setup-timestamp: 1473797080\n'
- 'setup-minimum-version: 2.844\n'
+ 'include-setup: setup <2.878 not supported\n'
+ 'setup-minimum-version: 2.878\n'
  'setup-version: 3.1415\n'
  '\n'
  '@ arc\n'



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-04-14 13:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-14 13:16 [calm - Cygwin server-side packaging maintenance script] branch master, updated. 20200401-10-g66ccbbe 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).