diff --git a/0001-cryptsetup-add-system-library-paths.patch b/0001-cryptsetup-add-system-library-paths.patch index cc22adf..b09218e 100644 --- a/0001-cryptsetup-add-system-library-paths.patch +++ b/0001-cryptsetup-add-system-library-paths.patch @@ -1,7 +1,17 @@ -diff -rupN cryptsetup-2.0.4.old/configure cryptsetup-2.0.4/configure ---- cryptsetup-2.0.4.old/configure 2018-08-03 12:31:52.000000000 +0200 -+++ cryptsetup-2.0.4/configure 2018-08-03 13:42:50.605275535 +0200 -@@ -12300,6 +12300,9 @@ fi +From b4d26d1500682dc375759c0ed16677197a433c64 Mon Sep 17 00:00:00 2001 +From: geruijun +Date: Sat, 18 Jul 2020 10:29:43 +0800 +Subject: [PATCH 1/2] cryptsetup add system library paths + +--- + configure | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/configure b/configure +index 145be42..7643af8 100755 +--- a/configure ++++ b/configure +@@ -12294,6 +12294,9 @@ fi # before this can be enabled. hardcode_into_libs=yes @@ -11,7 +21,7 @@ diff -rupN cryptsetup-2.0.4.old/configure cryptsetup-2.0.4/configure # Ideally, we could use ldconfig to report *all* directores which are # searched for libraries, however this is still not possible. Aside from not # being certain /sbin/ldconfig is available, command -@@ -12308,7 +12311,7 @@ fi +@@ -12302,7 +12305,7 @@ fi # appending ld.so.conf contents (and includes) to the search path. if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` @@ -20,3 +30,6 @@ diff -rupN cryptsetup-2.0.4.old/configure cryptsetup-2.0.4/configure fi # We used to test for /lib/ld.so.1 and disable shared libraries on +-- +1.8.3.1 + diff --git a/0002-fix-compat-test.patch b/0002-fix-compat-test.patch new file mode 100644 index 0000000..d302aa9 --- /dev/null +++ b/0002-fix-compat-test.patch @@ -0,0 +1,66 @@ +From f73c9760f43897fce0d6aa32042f751a2e7d0de0 Mon Sep 17 00:00:00 2001 +From: hanzhijun +Date: Sat, 18 Jul 2020 10:30:03 +0800 +Subject: [PATCH 2/2] fix compat test + +--- + tests/compat-test | 15 ++++++++------- + 1 file changed, 8 insertions(+), 7 deletions(-) + +diff --git a/tests/compat-test b/tests/compat-test +index a61453e..7ee946e 100755 +--- a/tests/compat-test ++++ b/tests/compat-test +@@ -22,6 +22,7 @@ PWD0="compatkey" + PWD1="93R4P4pIqAH8" + PWD2="mymJeD8ivEhE" + PWD3="ocMakf3fAcQO" ++PWD4="hkj123HJGS12" + PWDW="rUkL4RUryBom" + VK_FILE="compattest_vkfile" + +@@ -225,17 +226,17 @@ echo $PWD1 | $CRYPTSETUP luksAddKey $IMG $FAST_PBKDF_OPT 2>/dev/null && fail + echo -e "$PWD1\n$PWD2" | $CRYPTSETUP luksAddKey $IMG $FAST_PBKDF_OPT || fail + echo -e "$PWD0\n$PWD1" | $CRYPTSETUP luksAddKey $IMG $FAST_PBKDF_OPT 2>/dev/null && fail + echo "[4] change key" +-echo -e "$PWD1\n$PWD0\n" | $CRYPTSETUP luksChangeKey $FAST_PBKDF_OPT $IMG || fail ++echo -e "$PWD1\n$PWD4\n" | $CRYPTSETUP luksChangeKey $FAST_PBKDF_OPT $IMG || fail + echo -e "$PWD1\n$PWD2\n" | $CRYPTSETUP luksChangeKey $FAST_PBKDF_OPT $IMG 2>/dev/null && fail + [ $? -ne 2 ] && fail "luksChangeKey should return EPERM exit code" + echo "[5] remove key" +-# delete active keys PWD0, PWD2 ++# delete active keys PWD2, PWD4 + echo $PWD1 | $CRYPTSETUP luksRemoveKey $IMG 2>/dev/null && fail + [ $? -ne 2 ] && fail "luksRemove should return EPERM exit code" +-echo $PWD0 | $CRYPTSETUP luksRemoveKey $IMG || fail + echo $PWD2 | $CRYPTSETUP luksRemoveKey $IMG || fail ++echo $PWD4 | $CRYPTSETUP luksRemoveKey $IMG || fail + # check if keys were deleted +-echo $PWD0 | $CRYPTSETUP luksOpen $IMG --test-passphrase 2>/dev/null && fail ++echo $PWD4 | $CRYPTSETUP luksOpen $IMG --test-passphrase 2>/dev/null && fail + [ $? -ne 1 ] && fail "luksOpen should return ENOENT exit code" + echo $PWD2 | $CRYPTSETUP luksOpen $IMG --test-passphrase 2>/dev/null && fail + [ $? -ne 1 ] && fail "luksOpen should return ENOENT exit code" +@@ -867,16 +868,16 @@ expect timeout abort "Are you sure? (Type 'yes' in capital letters):" + send "YES\n" + expect timeout abort "Enter passphrase for $EXPECT_DEV:" + sleep 0.1 +-send "$PWD0\n" ++send "$PWD4\n" + expect timeout abort "Verify passphrase:" + sleep 0.1 +-send "$PWD0\n" ++send "$PWD4\n" + expect timeout abort "Command successful." + expect timeout abort eof + eval spawn $CRYPTSETUP luksOpen -v $LOOPDEV --test-passphrase + expect timeout abort "Enter passphrase for $EXPECT_DEV:" + sleep 0.1 +-send "$PWD0\n" ++send "$PWD4\n" + expect timeout abort "Command successful." + expect timeout abort eof + exit +-- +1.8.3.1 + diff --git a/cryptsetup-2.3.1.tar.xz b/cryptsetup-2.3.3.tar.xz similarity index 81% rename from cryptsetup-2.3.1.tar.xz rename to cryptsetup-2.3.3.tar.xz index 1dfe57b..674c6aa 100644 Binary files a/cryptsetup-2.3.1.tar.xz and b/cryptsetup-2.3.3.tar.xz differ diff --git a/cryptsetup.spec b/cryptsetup.spec index 5d9f8da..170414a 100644 --- a/cryptsetup.spec +++ b/cryptsetup.spec @@ -1,26 +1,24 @@ Name: cryptsetup -Version: 2.3.1 +Version: 2.3.3 Release: 1 Summary: Utility used to conveniently set up disk encryption License: GPLv2+ and LGPLv2+ URL: https://gitlab.com/cryptsetup/cryptsetup -Source0: https://www.kernel.org/pub/linux/utils/cryptsetup/v2.0/cryptsetup-%{version}.tar.xz +Source0: https://www.kernel.org/pub/linux/utils/cryptsetup/v2.3/cryptsetup-%{version}.tar.xz +Patch1: 0001-cryptsetup-add-system-library-paths.patch +Patch2: 0002-fix-compat-test.patch -Patch0: 0001-cryptsetup-add-system-library-paths.patch - -BuildRequires: openssl-devel, popt-devel, device-mapper-devel git -BuildRequires: libuuid-devel, json-c-devel, libargon2-devel, libpwquality-devel libblkid-devel -BuildRequires: python2-devel python3-devel +BuildRequires: openssl-devel, popt-devel, device-mapper-devel, git +BuildRequires: libuuid-devel, json-c-devel, libargon2-devel, libpwquality-devel, libblkid-devel Requires: libpwquality >= 1.2.0 Provides: %{name}-luks = %{version}-%{release} Obsoletes: %{name}-luks < 1.4.0 Provides: %{name}-libs %{name}-libs%{?_isa} Obsoletes: %{name}-libs - -%{!?python_sitearch: %global python_sitearch %(%{__python} -c \ -"from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} +Obsoletes: python2-%{name} < 2.1.0 +Obsoletes: %{name}-python3 < 2.1.0 %description cryptsetup is a utility used to conveniently set up disk encryption based @@ -74,7 +72,6 @@ This contains man files for the using of cryptsetup. %install %make_install - %find_lang cryptsetup %post -n cryptsetup -p /sbin/ldconfig @@ -96,7 +93,6 @@ This contains man files for the using of cryptsetup. %{_includedir}/libcryptsetup.h %{_libdir}/pkgconfig/libcryptsetup.pc - %files -n veritysetup %{_sbindir}/veritysetup @@ -111,6 +107,9 @@ This contains man files for the using of cryptsetup. %{_mandir}/man8/* %changelog +* Sat Jul 18 2020 Ruijun Ge - 2.3.3-1 +- update to 2.3.3 version + * Mon Apr 13 2020 wangjufeng - 2.3.1-1 - Type:enhancemnet - ID:NA