commit: 9fe3514fce878b0797f512e00e7a12154ac6934b Author: Sam James <sam <AT> gentoo <DOT> org> AuthorDate: Fri Jan 24 08:12:40 2025 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Fri Jan 24 08:13:13 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9fe3514f
sys-fs/cryfs: fix REPLACING_VERSIONS check Closes: https://bugs.gentoo.org/948641 Signed-off-by: Sam James <sam <AT> gentoo.org> sys-fs/cryfs/cryfs-1.0.1.ebuild | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/sys-fs/cryfs/cryfs-1.0.1.ebuild b/sys-fs/cryfs/cryfs-1.0.1.ebuild index b57ab1729115..e84bb6a6184c 100644 --- a/sys-fs/cryfs/cryfs-1.0.1.ebuild +++ b/sys-fs/cryfs/cryfs-1.0.1.ebuild @@ -165,11 +165,16 @@ src_install() { } pkg_postinst() { - if ver_test "${REPLACING_VERSIONS}" -lt 1.0.0; then - elog "Filesystems created with CryFS 0.11.x and CryFS 1.0.0 are fully compatible with each other." - elog "This means filesystems created with 0.10.x or 0.11.x can be mounted without requiring a migration." - elog "Filesystems created with 1.0.0 or 0.11.x can be mounted by CryFS 0.10.x," - elog "but only if you configure it to use a cipher supported by CryFS 0.10.x, e.g. AES-256-GCM." - elog "The new default, XChaCha20-Poly1305, is not supported by CryFS 0.10.x." + if [[ -n ${REPLACING_VERSIONS} ]] ; then + for ver in "${REPLACING_VERSIONS[@]}" ; do + if ver_test "${ver}" -lt 1.0.0; then + elog "Filesystems created with CryFS 0.11.x and CryFS 1.0.0 are fully compatible with each other." + elog "This means filesystems created with 0.10.x or 0.11.x can be mounted without requiring a migration." + elog "Filesystems created with 1.0.0 or 0.11.x can be mounted by CryFS 0.10.x," + elog "but only if you configure it to use a cipher supported by CryFS 0.10.x, e.g. AES-256-GCM." + elog "The new default, XChaCha20-Poly1305, is not supported by CryFS 0.10.x." + break + fi + done fi }
