From 0433f8389ffa09ceb5d75c34666f904f3680520c Mon Sep 17 00:00:00 2001 From: merakor Date: Tue, 9 Nov 2021 10:08:17 +0000 Subject: 6.2.2 release FossilOrigin-Name: 6c15b2e35a139e767ad26345574e0456072a0f6b15a75aad3064e261a329e85b --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index ac4a4c7..ec82aad 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #!/bin/sh -e -version=6.2.1 +version=6.2.2 die() { printf '%s: %s\n' "${0##*/}" "$*" >&2 -- cgit v1.2.3 From 56b134697a7d8fdc5e146dc9e544bdd7a8713ba5 Mon Sep 17 00:00:00 2001 From: merakor Date: Sun, 12 Dec 2021 21:57:57 +0000 Subject: cpt-install: print messages properly when target is a tarball FossilOrigin-Name: da9d390eec590a0894658cf8dcfb82f9bc8b9bbd6ec2ba92d98ac4a0a81f00e0 --- src/cpt-install | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/cpt-install b/src/cpt-install index b64d5a0..af8b7ff 100755 --- a/src/cpt-install +++ b/src/cpt-install @@ -28,6 +28,9 @@ log "Retrieving post-installation message queue" unset msg for pkg in $order; do + # Ensure that we use package names itself, and not the tarball name if given. + pkg=${pkg##*/} pkg=${pkg%#*} + [ -f "$sys_db/$pkg/message" ] && { printf '\033[1m%s\n%s\n%s\033[m\n\n' \ "$(_multiply_char '=' 60)" \ -- cgit v1.2.3 From 51a0ff5d04184a12a216a7d0b3bf05fab63890d0 Mon Sep 17 00:00:00 2001 From: merakor Date: Sun, 12 Dec 2021 21:58:53 +0000 Subject: cpt-install: print messages entirely on stderr FossilOrigin-Name: 8c725549dac8deea7ef654abdf8b0caf4ed204eb8fd7baa343cdf383ef208a2f --- src/cpt-install | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cpt-install b/src/cpt-install index af8b7ff..78da9a8 100755 --- a/src/cpt-install +++ b/src/cpt-install @@ -36,8 +36,8 @@ for pkg in $order; do "$(_multiply_char '=' 60)" \ "$pkg" \ "$(_multiply_char '=' 60)" - cat "$sys_db/$pkg/message" >&2 + cat "$sys_db/$pkg/message" msg=1 } -done +done >&2 [ "$msg" ] || log "No message in queue" -- cgit v1.2.3 From 7dc51aeec441ed5392ce56ff415ebc59f0fe3ea5 Mon Sep 17 00:00:00 2001 From: merakor Date: Mon, 31 Jan 2022 17:06:58 +0000 Subject: pkg_tar(): read package version from the built package directory instead of using pkg_find() FossilOrigin-Name: 66363caaceb1691769982a134b3188efd538e08b2f6693c973b412fcb91fa4c5 --- src/cpt-lib.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cpt-lib.in b/src/cpt-lib.in index 96471c0..57c8e05 100644 --- a/src/cpt-lib.in +++ b/src/cpt-lib.in @@ -1063,7 +1063,7 @@ pkg_tar() { log "$1" "Creating tarball" # Read the version information to name the package. - read -r version release < "$(pkg_find "$1")/version" + read -r version release < "$pkg_dir/$1/$pkg_db/$1/version" # Create a tarball from the contents of the built package. cd "$pkg_dir/$1" -- cgit v1.2.3 From 4e92df1b2e1c18898a3438ff0b188bdfaba3664a Mon Sep 17 00:00:00 2001 From: merakor Date: Wed, 2 Feb 2022 09:41:23 +0000 Subject: pkg_verify(): fix checksum verification bug where extra sources could get away with not being verified. FossilOrigin-Name: 5cfeb17ba29e7948c744db229bca0284eebb3add0098ddda3eb072459cea5f2f --- src/cpt-lib.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cpt-lib.in b/src/cpt-lib.in index 57c8e05..7659e39 100644 --- a/src/cpt-lib.in +++ b/src/cpt-lib.in @@ -1294,7 +1294,7 @@ pkg_checksums() { pkg_verify() { # Verify all package checksums. This is achieved by generating a new set of # checksums and then comparing those with the old set. - vcmd="NR==FNR{a[\$1];next}/^git .*/{next}!((\$1)in a){exit 1}" + vcmd="NR==FNR{a[\$1];next}/^git .*/{next}!((\$1)in a){exit 1}END{if(NR/2!=FNR)exit 1}" for pkg; do repo_dir=$(pkg_find "$pkg") -- cgit v1.2.3 From c0a512c8b01ad074d6203e80f7be721e12df24cd Mon Sep 17 00:00:00 2001 From: merakor Date: Wed, 2 Feb 2022 09:43:05 +0000 Subject: cpt-manifest-tree: adapt script to the new version of tree(1) FossilOrigin-Name: 521b34d2dd38b78dffb2e6417a0249556cf442dcb339a73021fef7c913820a95 --- contrib/cpt-manifest-tree | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/cpt-manifest-tree b/contrib/cpt-manifest-tree index 599c0bd..bc38bc2 100755 --- a/contrib/cpt-manifest-tree +++ b/contrib/cpt-manifest-tree @@ -21,4 +21,4 @@ case "$1" in esac cpt-list "$1" >/dev/null printf '%s\n' "[$1]:" -tree -C --fromfile "$CPT_ROOT/var/db/cpt/installed/$1/manifest" | sed 1,2d +tree -C --fromfile "$CPT_ROOT/var/db/cpt/installed/$1/manifest" | sed 1d -- cgit v1.2.3 From 629a1313a449157f46329c35ab996499507e13ff Mon Sep 17 00:00:00 2001 From: merakor Date: Wed, 2 Feb 2022 11:08:30 +0000 Subject: cpt-reset: increase verbosity by a lot FossilOrigin-Name: 5f71dc65a577d4597c0dcb4e73ca0796f529f8eb6f4e01ecbeed385bdba99bd8 --- contrib/cpt-reset | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/contrib/cpt-reset b/contrib/cpt-reset index 2a1b66e..a2336e3 100755 --- a/contrib/cpt-reset +++ b/contrib/cpt-reset @@ -3,6 +3,7 @@ # # Disable word-splittng warnings as they're safe here. # shellcheck disable=SC2046 +# shellcheck source=../src/cpt-lib ## SYNOPSIS: ## .Nm @@ -11,10 +12,10 @@ ## removes all packages from the system that is not defined as a base package in ## .Pa /etc/cpt-base . -[ "$1" ] && { - printf 'usage: %s\n\nRemove all packages not defined in the base.\n' \ - "${0##*/}" - exit 0 +parser_definition() { + setup REST help:usage -- "usage: ${0##*/}" + global_options compact + msg -- '' "Remove all packages outside of base definition" } . cpt-lib @@ -27,9 +28,14 @@ set +f; for pkg in *; do contains "$base" "$pkg" || set -- "$pkg" "$@" done -[ "$1" ] && { - printf 'WARNING: This will remove \033[1m%s\033[m package(s).\n' "$#" - printf 'Base packages can be redefined in %s\n' "$CPT_ROOT/etc/cpt-base" - printf 'Continue? [Enter/Ctrl+C]\n' - read -r _ && CPT_FORCE=1 cpt-remove "$@" +[ -z "$1" ] && { + log "No package outside of the base definition could be found, not continuing." + exit 0 } + +warn "" "This is a potentially harmful operation, do NOT continue unless" +warn "" "you know exactly what you are doing. Continuing will remove $#" +warn "" "packages that are not listed in the base definition or that the" +warn "" "base packages don't depend on. See the CPT BASE section on the" +warn "" "user manual to learn more." +prompt && cpt-remove "$@" -- cgit v1.2.3 From c39609e1d7b49c83b3f65047c9dbd8bd26c9d606 Mon Sep 17 00:00:00 2001 From: merakor Date: Wed, 2 Feb 2022 11:17:31 +0000 Subject: CHANGELOG: update FossilOrigin-Name: a276abf9863528721a35ed9360d33c171abf6f9d8438ca59a297b0c53d34abfd --- CHANGELOG.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 212b3e1..46e4977 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,22 @@ this project _somewhat_ adheres to [Semantic Versioning]. [Semantic Versioning]: https://semver.org/spec/v2.0.0.html +[6.2.3] - 2022-02-02 +-------------------------------------------------------------------------------- + +### Fixed +- Fixed a checksum verification bug where adding an extra source did not require + checksum verification. +- `cpt-manifest-tree` now modifies the output of `tree(1)` according to the new + version. +- `cpt-reset` is now much more verbose. +- Fixed the displayed messages on `cpt-install` when it is given a tarball as an + argument. +- Fixed a faulty implementation in `pkg_tar()` where it used `pkg_find()` + instead of using the built package's database directory for gathering + information. + + [6.2.2] - 2021-11-09 -------------------------------------------------------------------------------- -- cgit v1.2.3 From 198050a44673b16ed4d8200fd9802a4653a21969 Mon Sep 17 00:00:00 2001 From: merakor Date: Wed, 2 Feb 2022 11:18:25 +0000 Subject: cpt: bump version to 6.2.3 FossilOrigin-Name: b6acdcb1b2a2070ef1d4426fbfc140483eb4019b6f2a2b494a0736037944e002 --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index ec82aad..d971a9e 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #!/bin/sh -e -version=6.2.2 +version=6.2.3 die() { printf '%s: %s\n' "${0##*/}" "$*" >&2 -- cgit v1.2.3 From fbc04171c1f8afc5e95ea736f1d4668141659d7f Mon Sep 17 00:00:00 2001 From: merakor Date: Wed, 2 Feb 2022 11:22:12 +0000 Subject: Update LICENSE year FossilOrigin-Name: e266d48421c08daeff48694c7ec3483f126fa888d7f9ba4d05179ff44fff52cc --- LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index faf1233..b732ecc 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2020-2021 Cem Keylan +Copyright (c) 2020-2022 Cem Keylan Copyright (c) 2019-2020 Dylan Araps Permission is hereby granted, free of charge, to any person obtaining a copy -- cgit v1.2.3