rpms/cryptsetup-luks/F-12 cryptsetup-fix-activate-null.patch, NONE, 1.1 cryptsetup-fix-alignment-ioctl.patch, NONE, 1.1 cryptsetup-luks.spec, 1.72, 1.73 sources, 1.15, 1.16

Till Maas till at fedoraproject.org
Fri Jul 2 18:49:29 UTC 2010


Author: till

Update of /cvs/pkgs/rpms/cryptsetup-luks/F-12
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv22884

Modified Files:
	cryptsetup-luks.spec sources 
Added Files:
	cryptsetup-fix-activate-null.patch 
	cryptsetup-fix-alignment-ioctl.patch 
Log Message:
- sync with devel, see Red Hat bug 610885
- keep default encryption values


cryptsetup-fix-activate-null.patch:
 ChangeLog   |    1 +
 lib/setup.c |   11 ++++++-----
 2 files changed, 7 insertions(+), 5 deletions(-)

--- NEW FILE cryptsetup-fix-activate-null.patch ---
--- cryptsetup-1.1.2.old/ChangeLog	2010-06-07 09:34:04.000000000 +0200
+++ cryptsetup-1.1.2/ChangeLog	2010-06-07 09:34:49.000000000 +0200
@@ -1,5 +1,6 @@
 2010-06-01  Milan Broz  <mbroz at redhat.com>
 	* Fix device alignment ioctl calls parameters.
+	* Fix activate_by_* API calls to handle NULL device name as documented.
 
 2010-05-30  Milan Broz  <mbroz at redhat.com>
 	* Version 1.1.2.
--- cryptsetup-1.1.2.old/lib/setup.c	2010-05-29 17:30:48.000000000 +0200
+++ cryptsetup-1.1.2/lib/setup.c	2010-06-07 09:34:49.000000000 +0200
@@ -355,6 +355,9 @@ static int create_device_helper(struct c
 	char *processed_key = NULL;
 	int r;
 
+	if (!name)
+		return -EINVAL;
+
 	ci = crypt_status(cd, name);
 	if (ci == CRYPT_INVALID)
 		return -EINVAL;
@@ -1656,9 +1659,6 @@ int crypt_activate_by_passphrase(struct
 		name ? "Activating" : "Checking", name ?: "",
 		keyslot, passphrase ? "" : "[none] ");
 
-	if (!name)
-		return -EINVAL;
-
 	/* plain, use hashed passphrase */
 	if (isPLAIN(cd->type))
 		return create_device_helper(cd, name, cd->plain_hdr.hash,
@@ -1712,7 +1712,7 @@ int crypt_activate_by_keyfile(struct cry
 	int r;
 
 	log_dbg("Activating volume %s [keyslot %d] using keyfile %s.",
-		name, keyslot, keyfile ?: "[none]");
+		name ?: "", keyslot, keyfile ?: "[none]");
 
 	if (!isLUKS(cd->type)) {
 		log_err(cd, _("This operation is supported only for LUKS device.\n"));
@@ -1744,7 +1744,8 @@ int crypt_activate_by_keyfile(struct cry
 
 	if (r >= 0) {
 		keyslot = r;
-		r = open_from_hdr_and_mk(cd, mk, name, flags);
+		if (name)
+			r = open_from_hdr_and_mk(cd, mk, name, flags);
 	}
 
 	LUKS_dealloc_masterkey(mk);

cryptsetup-fix-alignment-ioctl.patch:
 ChangeLog   |    3 +++
 lib/utils.c |   16 ++++++++--------
 2 files changed, 11 insertions(+), 8 deletions(-)

--- NEW FILE cryptsetup-fix-alignment-ioctl.patch ---
--- cryptsetup-1.1.2.old/ChangeLog	2010-06-07 09:31:25.000000000 +0200
+++ cryptsetup-1.1.2/ChangeLog	2010-06-07 09:31:39.000000000 +0200
@@ -1,3 +1,6 @@
+2010-06-01  Milan Broz  <mbroz at redhat.com>
+	* Fix device alignment ioctl calls parameters.
+
 2010-05-30  Milan Broz  <mbroz at redhat.com>
 	* Version 1.1.2.
 
--- cryptsetup-1.1.2.old/lib/utils.c	2010-05-27 18:02:06.000000000 +0200
+++ cryptsetup-1.1.2/lib/utils.c	2010-06-07 09:31:39.000000000 +0200
@@ -690,8 +690,8 @@ void get_topology_alignment(const char *
 			    unsigned long *alignment_offset,   /* bytes */
 			    unsigned long default_alignment)
 {
-	unsigned int dev_alignment_offset = 0;
-	unsigned long min_io_size = 0, opt_io_size = 0;
+	int dev_alignment_offset = 0;
+	unsigned int min_io_size = 0, opt_io_size = 0;
 	int fd;
 
 	*required_alignment = default_alignment;
@@ -713,18 +713,18 @@ void get_topology_alignment(const char *
 		opt_io_size = min_io_size;
 
 	/* alignment offset, bogus -1 means misaligned/unknown */
-	if (ioctl(fd, BLKALIGNOFF, &dev_alignment_offset) == -1 || (int)dev_alignment_offset < 0)
+	if (ioctl(fd, BLKALIGNOFF, &dev_alignment_offset) == -1 || dev_alignment_offset < 0)
 		dev_alignment_offset = 0;
 
-	if (*required_alignment < min_io_size)
-		*required_alignment = min_io_size;
+	if (*required_alignment < (unsigned long)min_io_size)
+		*required_alignment = (unsigned long)min_io_size;
 
-	if (*required_alignment < opt_io_size)
-		*required_alignment = opt_io_size;
+	if (*required_alignment < (unsigned long)opt_io_size)
+		*required_alignment = (unsigned long)opt_io_size;
 
 	*alignment_offset = (unsigned long)dev_alignment_offset;
 
-	log_dbg("Topology: IO (%lu/%lu), offset = %lu; Required alignment is %lu bytes.",
+	log_dbg("Topology: IO (%u/%u), offset = %lu; Required alignment is %lu bytes.",
 		min_io_size, opt_io_size, *alignment_offset, *required_alignment);
 out:
 	(void)close(fd);


Index: cryptsetup-luks.spec
===================================================================
RCS file: /cvs/pkgs/rpms/cryptsetup-luks/F-12/cryptsetup-luks.spec,v
retrieving revision 1.72
retrieving revision 1.73
diff -u -p -r1.72 -r1.73
--- cryptsetup-luks.spec	14 Dec 2009 15:43:51 -0000	1.72
+++ cryptsetup-luks.spec	2 Jul 2010 18:49:29 -0000	1.73
@@ -1,7 +1,7 @@
 Summary: A utility for setting up encrypted filesystems
 Name: cryptsetup-luks
-Version: 1.1.0
-Release: 0.4%{?dist}
+Version: 1.1.2
+Release: 2%{?dist}.1
 License: GPLv2
 Group: Applications/System
 URL: http://cryptsetup.googlecode.com/
@@ -14,8 +14,10 @@ Obsoletes: cryptsetup <= 0.1
 Requires: cryptsetup-luks-libs = %{version}-%{release}
 
 %define _root_sbindir /sbin
-%define upstream_version %{version}-rc3
+%define upstream_version %{version}
 Source0: http://cryptsetup.googlecode.com/files/cryptsetup-%{upstream_version}.tar.bz2
+Patch0: cryptsetup-fix-alignment-ioctl.patch
+Patch1: cryptsetup-fix-activate-null.patch
 
 %description
 This package contains cryptsetup, a utility for setting up
@@ -33,6 +35,7 @@ The cryptsetup-luks-devel package contai
 used for writing code that makes use of encrypted filesystems.
 
 %package libs
+Group: System Environment/Libraries
 Summary: Cryptsetup shared library
 
 %description libs
@@ -40,12 +43,15 @@ This package contains the cryptsetup sha
 
 %prep
 %setup -q -n cryptsetup-%{upstream_version}
+%patch0 -p1 -b align
+%patch1 -p1 -b activate
 
 iconv -f latin1 -t utf8 ChangeLog > ChangeLog.new
-mv -f ChangeLog.new ChangeLog 
+mv -f ChangeLog.new ChangeLog
 
 %build
-%configure  --sbindir=%{_root_sbindir} --libdir=/%{_lib}
+%configure  --sbindir=%{_root_sbindir} --libdir=/%{_lib} --with-luks1-keybits 128 --with-plain-mode cbc-plain
+
 # remove rpath
 sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
 sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
@@ -56,7 +62,7 @@ rm -rf $RPM_BUILD_ROOT
 make install DESTDIR=$RPM_BUILD_ROOT
 rm -rf  $RPM_BUILD_ROOT/%{_lib}/*.la $RPM_BUILD_ROOT/%{_lib}/cryptsetup
 
-# move libcryptsetup.so to %{_libdir}
+# move libcryptsetup.so to %%{_libdir}
 pushd $RPM_BUILD_ROOT/%{_lib}
 rm libcryptsetup.so
 mkdir -p $RPM_BUILD_ROOT/%{_libdir}
@@ -89,9 +95,49 @@ popd 
 rm -rf $RPM_BUILD_ROOT
 
 %changelog
-* Mon Dec 14 2009 Milan Broz <mbroz at redhat.com> - 1.1.0-0.4
+* Fri Jul 02 2010 Till Maas <opensource at till.name> - 1.1.2-2.1
+- Add --with-luks1-keybits 128 --with-plain-mode cbc-plain to %%configure to
+  keep the same default values for F12
+
+* Mon Jun 07 2010 Milan Broz <mbroz at redhat.com> - 1.1.2-2
+- Fix alignment ioctl use.
+- Fix API activation calls to handle NULL device name.
+
+* Sun May 30 2010 Milan Broz <mbroz at redhat.com> - 1.1.2-1
+- Update to cryptsetup 1.1.2
+- Fix luksOpen handling of new line char on stdin.
+
+* Sun May 23 2010 Milan Broz <mbroz at redhat.com> - 1.1.1-1
+- Update to cryptsetup 1.1.1
+- Fix luksClose for stacked LUKS/LVM devices.
+
+* Mon May 03 2010 Milan Broz <mbroz at redhat.com> - 1.1.1-0.2
+- Update to cryptsetup 1.1.1-rc2.
+
+* Sat May 01 2010 Milan Broz <mbroz at redhat.com> - 1.1.1-0.1
+- Update to cryptsetup 1.1.1-rc1.
+
+* Sun Jan 17 2010 Milan Broz <mbroz at redhat.com> - 1.1.0-1
+- Update to cryptsetup 1.1.0.
+
+* Fri Jan 15 2010 Milan Broz <mbroz at redhat.com> - 1.1.0-0.6
+- Fix gcrypt initialisation.
+- Fix backward compatibility for hash algorithm (uppercase).
+
+* Wed Dec 30 2009 Milan Broz <mbroz at redhat.com> - 1.1.0-0.5
+- Update to cryptsetup 1.1.0-rc4
+
+* Mon Nov 16 2009 Milan Broz <mbroz at redhat.com> - 1.1.0-0.4
 - Update to cryptsetup 1.1.0-rc3
 
+* Thu Oct 01 2009 Milan Broz <mbroz at redhat.com> - 1.1.0-0.3
+- Update to cryptsetup 1.1.0-rc2
+- Fix libcryptsetup to properly export only versioned symbols.
+
+* Tue Sep 29 2009 Milan Broz <mbroz at redhat.com> - 1.1.0-0.2
+- Update to cryptsetup 1.1.0-rc1
+- Add luksHeaderBackup and luksHeaderRestore commands.
+
 * Thu Sep 11 2009 Milan Broz <mbroz at redhat.com> - 1.1.0-0.1
 - Update to new upstream testing version with new API interface.
 - Add luksSuspend and luksResume commands.


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/cryptsetup-luks/F-12/sources,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -p -r1.15 -r1.16
--- sources	14 Dec 2009 15:43:51 -0000	1.15
+++ sources	2 Jul 2010 18:49:29 -0000	1.16
@@ -1 +1 @@
-ec18128afd25617a0fb2a45e4c55ae27  cryptsetup-1.1.0-rc3.tar.bz2
+f3928c1f1d49fcee39bb1e8d42fe707a  cryptsetup-1.1.2.tar.bz2



More information about the scm-commits mailing list