* [PATCH 0/7] cygcheck-dep updates
@ 2023-10-27 19:45 Brian Inglis
2023-10-30 21:34 ` Mikhail Usenko
0 siblings, 1 reply; 2+ messages in thread
From: Brian Inglis @ 2023-10-27 19:45 UTC (permalink / raw)
To: Cygwin Apps
[-- Attachment #1: Type: text/plain, Size: 718 bytes --]
Brian Inglis (7):
support better compressed setup.xz instead of bz2
fix no version for -C if only test release available
make cygcheck-dep executable
add /etc/{postinstall,preremove}/cygcheck-dep.sh
rename cygcheck-dep.sh to etc-preremove-cygcheck-dep.sh
add postinstall script to create cache dir
minimize cache dir preremove script
cygcheck-dep | 27 +++++++++++++++------------
etc-postinstall-cygcheck-dep.sh | 1 +
etc-preremove-cygcheck-dep.sh | 1 +
3 files changed, 17 insertions(+), 12 deletions(-)
mode change 100644 => 100755 cygcheck-dep
create mode 100755 etc-postinstall-cygcheck-dep.sh
create mode 100755 etc-preremove-cygcheck-dep.sh
--
2.39.0
[-- Attachment #2: 0001-support-better-compressed-setup.xz-instead-of-bz2.patch --]
[-- Type: text/plain, Size: 2257 bytes --]
From e59d6fb3b4008536ee57865d64372a42a9c93277 Mon Sep 17 00:00:00 2001
Message-Id: <e59d6fb3b4008536ee57865d64372a42a9c93277.1698435544.git.Brian.Inglis@Shaw.ca>
In-Reply-To: <cover.1698435544.git.Brian.Inglis@Shaw.ca>
References: <cover.1698435544.git.Brian.Inglis@Shaw.ca>
From: Brian Inglis <Brian.Inglis@Shaw.ca>
Date: Fri, 27 Oct 2023 13:25:20 -0600
Subject: [PATCH 1/7] support better compressed setup.xz instead of bz2
Signed-off-by: Brian Inglis <Brian.Inglis@Shaw.ca>
---
cygcheck-dep | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/cygcheck-dep b/cygcheck-dep
index 15c6be5a7193..72e345f80987 100644
--- a/cygcheck-dep
+++ b/cygcheck-dep
@@ -610,24 +610,24 @@ mach="${MACHTYPE%%-*}"
## download <setup.ini> file /*
cw_setup_ini="$cache_dir/cygwin/$mach/setup.ini"
if ! [ "$opt_use_cached_setup_ini" ] || [ "$cmd_show_updates" ]; then
- cw_setup_bz2_url="ftp://sourceware.org/pub/cygwin/$mach/setup.bz2"
+ cw_setup_url="https://cygwin.com/pub/cygwin/$mach/setup.xz"
[ "$opt_be_more_verbose" ] && opt_wget_verbosity="-nv" || opt_wget_verbosity="-q"
- if ! wget >&2 "$opt_wget_verbosity" -r -nH --cut-dirs 1 -P "$cache_dir" "$cw_setup_bz2_url"; then
+ if ! wget >&2 "$opt_wget_verbosity" -r -nH --cut-dirs 1 -P "$cache_dir" "$cw_setup_url"; then
echo >&2 "$0: failed to download <setup.ini> file:"
- echo >&2 "$0: $cw_setup_bz2_url"
+ echo >&2 "$0: $cw_setup_url"
echo >&2 "$0: you may try to run with -c option to use cached file from previous download"
exit 4
fi
- cw_setup_bz2="$cache_dir/cygwin/$mach/setup.bz2"
- if ! bzip2 -t "$cw_setup_bz2"; then
+ cw_setup="$cache_dir/cygwin/$mach/setup.xz"
+ if ! unxz -t "$cw_setup"; then
echo >&2 "$0: failed to check integrity of downloaded <setup.ini> file:"
- echo >&2 "$0: $cw_setup_bz2"
+ echo >&2 "$0: $cw_setup"
echo >&2 "$0: you may try to run with -c option to use cached file from previous download"
exit 5
fi
- if ! bzcat "$cw_setup_bz2" > "$cw_setup_ini"; then
+ if ! xzcat "$cw_setup" > "$cw_setup_ini"; then
echo >&2 "$0: failed to decompress downloaded <setup.ini> file:"
- echo >&2 "$0: $cw_setup_bz2"
+ echo >&2 "$0: $cw_setup"
exit 6
fi
fi
--
2.39.0
[-- Attachment #3: 0002-fix-no-version-for-C-if-only-test-release-available.patch --]
[-- Type: text/plain, Size: 2357 bytes --]
From a349a1ddfc1c199bad04e59d7eb6c7fe7d4d2ff2 Mon Sep 17 00:00:00 2001
Message-Id: <a349a1ddfc1c199bad04e59d7eb6c7fe7d4d2ff2.1698435544.git.Brian.Inglis@Shaw.ca>
In-Reply-To: <cover.1698435544.git.Brian.Inglis@Shaw.ca>
References: <cover.1698435544.git.Brian.Inglis@Shaw.ca>
From: Brian Inglis <Brian.Inglis@Shaw.ca>
Date: Fri, 27 Oct 2023 13:26:50 -0600
Subject: [PATCH 2/7] fix no version for -C if only test release available
Signed-off-by: Brian Inglis <Brian.Inglis@Shaw.ca>
---
cygcheck-dep | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/cygcheck-dep b/cygcheck-dep
index 72e345f80987..5b7fa4cda9d9 100644
--- a/cygcheck-dep
+++ b/cygcheck-dep
@@ -11,7 +11,7 @@
### DECLARATIONS
name="cygcheck-dep"
-version="3.0"
+version="3.0-4"
## version(), help() /*
@@ -645,17 +645,20 @@ fi
L=''; P=''; C=''; R=''; V=''; O=''; D=''; T=''
## read and parse <setup.ini> file; populate ${PkgID[]}, ${PkgName[]}, et al. /*
+# fix no version for -C if only test release available:
+# hold buffer => version seen: new package clears; version sets;
+# test label checks and cycles if no version, otherwise skips rest of package
L="$(sed -n '
:begin
- /^@\s\+\(\S\+\)\s*$/{s//add_new_package_to_catalogue "\1"/p; b}
+ /^@\s\+\(\S\+\)\s*$/{s//add_new_package_to_catalogue "\1"/p; s/.*//; h; b}
/^category:\s\+\(_obsolete\)\s*$/{s//PkgCategories[$MaxPkgID]="\1"; T="obsolete package"/p; b}
/^category:\s\+\(\S\+\(\s\+\S\+\)*\)\s*$/{s//__make_list C "\1"; PkgCategories[$MaxPkgID]="$C"; T=''/p; b}
- /^version:\s\+\(\S\+\)\s*$/{s//PkgVersionAvailable[$MaxPkgID]="\1"/p; b}
+ /^version:\s\+\(\S\+\)\s*$/{s//PkgVersionAvailable[$MaxPkgID]="\1"/p; h; b}
/^obsoletes:\s\+\(\S\+\(\s\+\S\+\)*\)\s*$/{s//__make_list O "\1" ","; PkgObsoletedPkgs[$MaxPkgID]="$O"/p; b}
/^requires:\s\+\(\S\+\(\s\+\S\+\)*\)\s*$/{s//[ "$T" ] \&\& { __make_list R "\1"; PkgRequisitesDeclared[$MaxPkgID]="$R"; }/p; b}
/^depends2:\s\+\(\S\+\(\s\+\S\+\)*\)\s*$/{s//__make_list R "\1" ","; [ "$T" ] \&\& ObsoletePkgs[$MaxPkgID]="$R" || PkgRequisitesDeclared[$MaxPkgID]="$R"/p; b}
/^\[prev\]/{:skip-prev n; /^@/b begin; b skip-prev}
- /^\[test\]/{:skip-test n; /^@/b begin; b skip-test}
+ /^\[test\]/{:skip-test g; /^.\+$/!b; n; /^@/b begin; b skip-test}
' "$cw_setup_ini")"
eval "$L"
L=''
--
2.39.0
[-- Attachment #4: 0003-make-cygcheck-dep-executable.patch --]
[-- Type: text/plain, Size: 657 bytes --]
From adf3ca292284f1daf735baf2eb1c7fc8108ef2cc Mon Sep 17 00:00:00 2001
Message-Id: <adf3ca292284f1daf735baf2eb1c7fc8108ef2cc.1698435544.git.Brian.Inglis@Shaw.ca>
In-Reply-To: <cover.1698435544.git.Brian.Inglis@Shaw.ca>
References: <cover.1698435544.git.Brian.Inglis@Shaw.ca>
From: Brian Inglis <Brian.Inglis@Shaw.ca>
Date: Fri, 27 Oct 2023 13:30:25 -0600
Subject: [PATCH 3/7] make cygcheck-dep executable
Signed-off-by: Brian Inglis <Brian.Inglis@Shaw.ca>
---
cygcheck-dep | 0
1 file changed, 0 insertions(+), 0 deletions(-)
mode change 100644 => 100755 cygcheck-dep
diff --git a/cygcheck-dep b/cygcheck-dep
old mode 100644
new mode 100755
--
2.39.0
[-- Attachment #5: 0004-add-etc-postinstall-preremove-cygcheck-dep.sh.patch --]
[-- Type: text/plain, Size: 869 bytes --]
From ed324019f3dda09bce03da2d1e8338a47773788f Mon Sep 17 00:00:00 2001
Message-Id: <ed324019f3dda09bce03da2d1e8338a47773788f.1698435544.git.Brian.Inglis@Shaw.ca>
In-Reply-To: <cover.1698435544.git.Brian.Inglis@Shaw.ca>
References: <cover.1698435544.git.Brian.Inglis@Shaw.ca>
From: Brian Inglis <Brian.Inglis@Shaw.ca>
Date: Fri, 27 Oct 2023 13:31:18 -0600
Subject: [PATCH 4/7] add /etc/{postinstall,preremove}/cygcheck-dep.sh
Signed-off-by: Brian Inglis <Brian.Inglis@Shaw.ca>
---
cygcheck-dep.sh | 9 +++++++++
1 file changed, 9 insertions(+)
create mode 100755 cygcheck-dep.sh
diff --git a/cygcheck-dep.sh b/cygcheck-dep.sh
new file mode 100755
index 000000000000..8079801bfa15
--- /dev/null
+++ b/cygcheck-dep.sh
@@ -0,0 +1,9 @@
+#! /bin/bash
+
+name="cygcheck-dep"
+cache_dir="/var/cache/$name"
+
+/bin/rm -rf "$cache_dir" 2>/dev/null
+
+/bin/true
+
--
2.39.0
[-- Attachment #6: 0005-rename-cygcheck-dep.sh-to-etc-preremove-cygcheck-dep.patch --]
[-- Type: text/plain, Size: 819 bytes --]
From 3027ff74932360f6c8d148b28cb92f18c7965734 Mon Sep 17 00:00:00 2001
Message-Id: <3027ff74932360f6c8d148b28cb92f18c7965734.1698435544.git.Brian.Inglis@Shaw.ca>
In-Reply-To: <cover.1698435544.git.Brian.Inglis@Shaw.ca>
References: <cover.1698435544.git.Brian.Inglis@Shaw.ca>
From: Brian Inglis <Brian.Inglis@Shaw.ca>
Date: Fri, 27 Oct 2023 13:33:52 -0600
Subject: [PATCH 5/7] rename cygcheck-dep.sh to etc-preremove-cygcheck-dep.sh
Signed-off-by: Brian Inglis <Brian.Inglis@Shaw.ca>
---
cygcheck-dep.sh => etc-preremove-cygcheck-dep.sh | 0
1 file changed, 0 insertions(+), 0 deletions(-)
rename cygcheck-dep.sh => etc-preremove-cygcheck-dep.sh (100%)
diff --git a/cygcheck-dep.sh b/etc-preremove-cygcheck-dep.sh
similarity index 100%
rename from cygcheck-dep.sh
rename to etc-preremove-cygcheck-dep.sh
--
2.39.0
[-- Attachment #7: 0006-add-postinstall-script-to-create-cache-dir.patch --]
[-- Type: text/plain, Size: 849 bytes --]
From 859f6299bd3371782dfede17a0fc77283ac496f7 Mon Sep 17 00:00:00 2001
Message-Id: <859f6299bd3371782dfede17a0fc77283ac496f7.1698435544.git.Brian.Inglis@Shaw.ca>
In-Reply-To: <cover.1698435544.git.Brian.Inglis@Shaw.ca>
References: <cover.1698435544.git.Brian.Inglis@Shaw.ca>
From: Brian Inglis <Brian.Inglis@Shaw.ca>
Date: Fri, 27 Oct 2023 13:35:57 -0600
Subject: [PATCH 6/7] add postinstall script to create cache dir
Signed-off-by: Brian Inglis <Brian.Inglis@Shaw.ca>
---
etc-postinstall-cygcheck-dep.sh | 1 +
1 file changed, 1 insertion(+)
create mode 100755 etc-postinstall-cygcheck-dep.sh
diff --git a/etc-postinstall-cygcheck-dep.sh b/etc-postinstall-cygcheck-dep.sh
new file mode 100755
index 000000000000..2212d7836682
--- /dev/null
+++ b/etc-postinstall-cygcheck-dep.sh
@@ -0,0 +1 @@
+/bin/mkdir -p /var/cache/cygcheck-dep
--
2.39.0
[-- Attachment #8: 0007-minimize-cache-dir-preremove-script.patch --]
[-- Type: text/plain, Size: 953 bytes --]
From 0fa54863e6bbb5a21a688aa508c02b84a0501379 Mon Sep 17 00:00:00 2001
Message-Id: <0fa54863e6bbb5a21a688aa508c02b84a0501379.1698435544.git.Brian.Inglis@Shaw.ca>
In-Reply-To: <cover.1698435544.git.Brian.Inglis@Shaw.ca>
References: <cover.1698435544.git.Brian.Inglis@Shaw.ca>
From: Brian Inglis <Brian.Inglis@Shaw.ca>
Date: Fri, 27 Oct 2023 13:37:13 -0600
Subject: [PATCH 7/7] minimize cache dir preremove script
Signed-off-by: Brian Inglis <Brian.Inglis@Shaw.ca>
---
etc-preremove-cygcheck-dep.sh | 10 +---------
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/etc-preremove-cygcheck-dep.sh b/etc-preremove-cygcheck-dep.sh
index 8079801bfa15..feeb28261967 100755
--- a/etc-preremove-cygcheck-dep.sh
+++ b/etc-preremove-cygcheck-dep.sh
@@ -1,9 +1 @@
-#! /bin/bash
-
-name="cygcheck-dep"
-cache_dir="/var/cache/$name"
-
-/bin/rm -rf "$cache_dir" 2>/dev/null
-
-/bin/true
-
+/bin/rm -fr /var/cache/cygcheck-dep 2>/dev/null || :
--
2.39.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH 0/7] cygcheck-dep updates
2023-10-27 19:45 [PATCH 0/7] cygcheck-dep updates Brian Inglis
@ 2023-10-30 21:34 ` Mikhail Usenko
0 siblings, 0 replies; 2+ messages in thread
From: Mikhail Usenko @ 2023-10-30 21:34 UTC (permalink / raw)
To: cygwin-apps
[-- Attachment #1: Type: text/plain, Size: 970 bytes --]
>Пятница, 27 октября 2023, 22:45 +03:00 от Brian Inglis via Cygwin-apps <cygwin-apps@cygwin.com>:
>
>Brian Inglis (7):
> support better compressed setup.xz instead of bz2
> fix no version for -C if only test release available
> make cygcheck-dep executable
> add /etc/{postinstall,preremove}/cygcheck-dep.sh
> rename cygcheck-dep.sh to etc-preremove-cygcheck-dep.sh
> add postinstall script to create cache dir
> minimize cache dir preremove script
>
> cygcheck-dep | 27 +++++++++++++++------------
> etc-postinstall-cygcheck-dep.sh | 1 +
> etc-preremove-cygcheck-dep.sh | 1 +
> 3 files changed, 17 insertions(+), 12 deletions(-)
> mode change 100644 => 100755 cygcheck-dep
> create mode 100755 etc-postinstall-cygcheck-dep.sh
> create mode 100755 etc-preremove-cygcheck-dep.sh
>
>--
>2.39.0
Brian, thank you for the cool solution to the issue when a package has only a test version!
--
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-10-30 21:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-27 19:45 [PATCH 0/7] cygcheck-dep updates Brian Inglis
2023-10-30 21:34 ` Mikhail Usenko
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).