public inbox for cygwin-apps-cvs@sourceware.org
help / color / mirror / Atom feed
* [cygport - the Cygwin packaging tool] branch master, updated. 0.36.6-7-g28f62f33
@ 2023-08-07 16:52 Jon Turney
0 siblings, 0 replies; only message in thread
From: Jon Turney @ 2023-08-07 16:52 UTC (permalink / raw)
To: cygwin-apps-cvs
https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/cygport.git;h=28f62f335d886f7bc20ae3dd7eaf42cc0f8970f3
commit 28f62f335d886f7bc20ae3dd7eaf42cc0f8970f3
Author: Jon Turney <jon.turney@dronecode.org.uk>
Date: Sun Aug 6 14:10:07 2023 +0100
testsuite: Add a trivial test of various patch compressions
https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/cygport.git;h=cc4f6ed5332a13a7d4a05fbc25b9e8d23dbcc77f
commit cc4f6ed5332a13a7d4a05fbc25b9e8d23dbcc77f
Author: Yasutaka ATARASHI <yak1ex@gmail.com>
Date: Sun Aug 6 13:59:58 2023 +0100
lib/src_prep.cygpart: Fix incorrect options passed to unzstd in unpack()
Fix incorrect options passed to unzstd in unpack() in lib/src_prep.cygpart.
`unpack()` invokes `unzstd` for a *.zst file as `unzstd -qo file.zst`.
Then, an error occurs as 'stdin is a console, aborting', because the
`-o` option is to specify an output file name, which is missing.
Also handle the case of .xz compressed files.
Diff:
---
lib/src_prep.cygpart | 9 +++++--
testsuite/compressions/meson.build | 1 +
.../patch-compressions/01-test.patch.bz2 | Bin 0 -> 149 bytes
.../patch-compressions/02-test.patch.gz | Bin 0 -> 139 bytes
.../patch-compressions/03-test.patch.xz | Bin 0 -> 172 bytes
.../patch-compressions/04-test.patch.zst | Bin 0 -> 123 bytes
.../patch-compressions-3.8-2-src.hint | 8 ++++++
.../patch-compressions-3.8-2.hint | 5 ++++
.../patch-compressions/patch-compressions.cygport | 28 +++++++++++++++++++++
.../patch-compressions/patch-compressions.list | 0
testsuite/compressions/patch-compressions/vars | 3 +++
testsuite/meson.build | 1 +
12 files changed, 53 insertions(+), 2 deletions(-)
diff --git a/lib/src_prep.cygpart b/lib/src_prep.cygpart
index 4f54f4ee..ea91508d 100644
--- a/lib/src_prep.cygpart
+++ b/lib/src_prep.cygpart
@@ -136,9 +136,14 @@ unpack() {
check_prog_req unzip;
unpack_cmd="unzip -oq";
;;
+ *.xz)
+ check_prog_req unxz xz;
+ unpack_cmd="unxz -c";
+ unpack_out="${unpack_file_name%.xz}";
+ ;;
*.zst)
- check_prog_req zstd;
- unpack_cmd="unzstd -qo";
+ check_prog_req unzstd zstd;
+ unpack_cmd="unzstd -qfo ${unpack_file_name%.zst}";
;;
*.7z)
if check_prog 7zr
diff --git a/testsuite/compressions/meson.build b/testsuite/compressions/meson.build
new file mode 100644
index 00000000..5c45b2aa
--- /dev/null
+++ b/testsuite/compressions/meson.build
@@ -0,0 +1 @@
+tests += [['compressions/patch-compressions', 720]]
diff --git a/testsuite/compressions/patch-compressions/01-test.patch.bz2 b/testsuite/compressions/patch-compressions/01-test.patch.bz2
new file mode 100644
index 00000000..d563c17d
Binary files /dev/null and b/testsuite/compressions/patch-compressions/01-test.patch.bz2 differ
diff --git a/testsuite/compressions/patch-compressions/02-test.patch.gz b/testsuite/compressions/patch-compressions/02-test.patch.gz
new file mode 100644
index 00000000..377a68ae
Binary files /dev/null and b/testsuite/compressions/patch-compressions/02-test.patch.gz differ
diff --git a/testsuite/compressions/patch-compressions/03-test.patch.xz b/testsuite/compressions/patch-compressions/03-test.patch.xz
new file mode 100644
index 00000000..2b175fc0
Binary files /dev/null and b/testsuite/compressions/patch-compressions/03-test.patch.xz differ
diff --git a/testsuite/compressions/patch-compressions/04-test.patch.zst b/testsuite/compressions/patch-compressions/04-test.patch.zst
new file mode 100644
index 00000000..bf00bb8f
Binary files /dev/null and b/testsuite/compressions/patch-compressions/04-test.patch.zst differ
diff --git a/testsuite/compressions/patch-compressions/hints/patch-compressions-3.8-2.noarch/dist/patch-compressions/patch-compressions-3.8-2-src.hint b/testsuite/compressions/patch-compressions/hints/patch-compressions-3.8-2.noarch/dist/patch-compressions/patch-compressions-3.8-2-src.hint
new file mode 100644
index 00000000..d8e5e339
--- /dev/null
+++ b/testsuite/compressions/patch-compressions/hints/patch-compressions-3.8-2.noarch/dist/patch-compressions/patch-compressions-3.8-2-src.hint
@@ -0,0 +1,8 @@
+category: Base
+build-depends: cygport
+sdesc: "Exercise applying patch files with various compressions"
+ldesc: "Exercise applying patch files with various compressions"
+skip:
+
+homepage: https://cygwin.com/
+license: GPL-3.0-or-later
diff --git a/testsuite/compressions/patch-compressions/hints/patch-compressions-3.8-2.noarch/dist/patch-compressions/patch-compressions-3.8-2.hint b/testsuite/compressions/patch-compressions/hints/patch-compressions-3.8-2.noarch/dist/patch-compressions/patch-compressions-3.8-2.hint
new file mode 100644
index 00000000..25501d87
--- /dev/null
+++ b/testsuite/compressions/patch-compressions/hints/patch-compressions-3.8-2.noarch/dist/patch-compressions/patch-compressions-3.8-2.hint
@@ -0,0 +1,5 @@
+category: Base
+requires:
+sdesc: "Exercise applying patch files with various compressions"
+ldesc: "Exercise applying patch files with various compressions"
+
diff --git a/testsuite/compressions/patch-compressions/patch-compressions.cygport b/testsuite/compressions/patch-compressions/patch-compressions.cygport
new file mode 100644
index 00000000..61a16613
--- /dev/null
+++ b/testsuite/compressions/patch-compressions/patch-compressions.cygport
@@ -0,0 +1,28 @@
+NAME="patch-compressions"
+LICENSE="GPL-3.0-or-later"
+VERSION="3.8"
+RELEASE="2"
+ARCH=noarch
+CATEGORY="Base"
+HOMEPAGE="https://cygwin.com/"
+SUMMARY="Exercise applying patch files with various compressions"
+
+patch_compressions_CONTENTS=""
+
+SRC_URI=""
+PATCH_URI="\
+ 01-test.patch.bz2\
+ 02-test.patch.gz\
+ 03-test.patch.xz\
+ 04-test.patch.zst\
+"
+
+src_compile()
+{
+ :
+}
+
+src_install()
+{
+ :
+}
diff --git a/testsuite/compressions/patch-compressions/patch-compressions.list b/testsuite/compressions/patch-compressions/patch-compressions.list
new file mode 100644
index 00000000..e69de29b
diff --git a/testsuite/compressions/patch-compressions/vars b/testsuite/compressions/patch-compressions/vars
new file mode 100644
index 00000000..9499c91b
--- /dev/null
+++ b/testsuite/compressions/patch-compressions/vars
@@ -0,0 +1,3 @@
+declare -r ARCHES="noarch"
+declare -- CROSS_HOST=""
+declare -- INHERITED="autotools "
diff --git a/testsuite/meson.build b/testsuite/meson.build
index 2b77594b..600a846d 100644
--- a/testsuite/meson.build
+++ b/testsuite/meson.build
@@ -19,6 +19,7 @@ subdir('hints')
subdir('aspell')
subdir('autotools')
+subdir('compressions')
subdir('cmake')
subdir('cross')
subdir('docbook')
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-08-07 16:52 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-07 16:52 [cygport - the Cygwin packaging tool] branch master, updated. 0.36.6-7-g28f62f33 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).