aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2014-09-26 13:46:40 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2014-09-26 13:46:45 +0000
commit68f23bbc1f6ca0939a156e4614dc5c00678b9bc6 (patch)
treef891ff7251d00837508386c1930e7fc5814cb143 /main
parent6fc54d781321696283ed53f8c6f6124481aac652 (diff)
downloadaports-68f23bbc1f6ca0939a156e4614dc5c00678b9bc6.tar.bz2
aports-68f23bbc1f6ca0939a156e4614dc5c00678b9bc6.tar.xz
main/cryptsetup: upgrade to 1.6.6
Diffstat (limited to 'main')
-rw-r--r--main/cryptsetup/APKBUILD14
-rw-r--r--main/cryptsetup/direct-io.patch148
2 files changed, 5 insertions, 157 deletions
diff --git a/main/cryptsetup/APKBUILD b/main/cryptsetup/APKBUILD
index d29c090a29..798864f368 100644
--- a/main/cryptsetup/APKBUILD
+++ b/main/cryptsetup/APKBUILD
@@ -1,7 +1,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=cryptsetup
-pkgver=1.6.5
-pkgrel=1
+pkgver=1.6.6
+pkgrel=0
pkgdesc="Userspace setup tool for transparent encryption of block devices using the Linux 2.6 cryptoapi"
url="http://code.google.com/p/cryptsetup/"
arch="all"
@@ -10,7 +10,6 @@ depends=""
makedepends="lvm2-dev openssl-dev popt-dev util-linux-dev !libiconv-dev"
subpackages="$pkgname-dev $pkgname-doc $pkgname-libs"
source="https://www.kernel.org/pub/linux/utils/cryptsetup/v${pkgver%.*}/cryptsetup-$pkgver.tar.gz
- direct-io.patch
"
_builddir="$srcdir"/$pkgname-$pkgver
@@ -51,9 +50,6 @@ libs() {
mv "$pkgdir"/lib "$subpkgdir"/
}
-md5sums="847c9f1df3c20966f27470b2a62fc797 cryptsetup-1.6.5.tar.gz
-eff4426fdbba93daf61011ec3f9db685 direct-io.patch"
-sha256sums="7bfde843a12b150aed758a528c81e64755f224f050159410c493e7d70b77d97d cryptsetup-1.6.5.tar.gz
-3cd05276966ee714315be6a3bca056bf500d3c7ac1b0481b29e1c6d5bd80eb2a direct-io.patch"
-sha512sums="c500d7f9f72b9ae0844cd8bab81c880ad6e65ea0e03f7d35b5f4ebbdb006618ce3ed808a457c00b589d4c72c0b10f5e26d61cefb9ccebe79af92910620f5a9e8 cryptsetup-1.6.5.tar.gz
-d3950d9bd84453aacd8bc4092e39e52e06ae5dbc4284587f5209353e5315524ece8a4c2f492bf2dcde862bd2ec75cf59e9768936f21659029a49e5b1e201201d direct-io.patch"
+md5sums="24790bd4f4fa24570d7ea9af27ccf079 cryptsetup-1.6.6.tar.gz"
+sha256sums="38ccd1ceff41760ccfbaaa5394ebb6117d69bd0ea2e00bf07c0d1353c41be6ac cryptsetup-1.6.6.tar.gz"
+sha512sums="ce8ea9402f0eb9f3ab920df51837492802dd35394422ef4643a0eb82e6aad67cf72ac428b7caf622539af188f9fe5ba530f06b522f65ed55b0133c5c67ab2723 cryptsetup-1.6.6.tar.gz"
diff --git a/main/cryptsetup/direct-io.patch b/main/cryptsetup/direct-io.patch
deleted file mode 100644
index 25a242575f..0000000000
--- a/main/cryptsetup/direct-io.patch
+++ /dev/null
@@ -1,148 +0,0 @@
-From 89f795d7b453acf347c0b293d09746a8c0d48d12 Mon Sep 17 00:00:00 2001
-From: Milan Broz <gmazyland@gmail.com>
-Date: Fri, 8 Aug 2014 14:49:38 +0200
-Subject: [PATCH] Fix keyslot device access for devices not supporting
- O_DIRECT.
-
----
- lib/luks1/keyencryption.c | 55 ++++++++++++++++++++++++++++-------------------
- lib/utils_device.c | 6 ++++++
- 2 files changed, 39 insertions(+), 22 deletions(-)
-
-diff --git a/lib/luks1/keyencryption.c b/lib/luks1/keyencryption.c
-index 66e942e..3bc9c33 100644
---- a/lib/luks1/keyencryption.c
-+++ b/lib/luks1/keyencryption.c
-@@ -136,7 +136,7 @@ int LUKS_encrypt_to_storage(char *src, size_t srcLength,
-
- struct device *device = crypt_metadata_device(ctx);
- struct crypt_storage *s;
-- int devfd, bsize, r = 0;
-+ int devfd = -1, bsize, r = 0;
-
- /* Only whole sector writes supported */
- if (srcLength % SECTOR_SIZE)
-@@ -164,25 +164,33 @@ int LUKS_encrypt_to_storage(char *src, size_t srcLength,
-
- r = crypt_storage_encrypt(s, 0, srcLength / SECTOR_SIZE, src);
- crypt_storage_destroy(s);
-+
- if (r)
- return r;
-
-+ r = -EIO;
-+
- /* Write buffer to device */
- bsize = device_block_size(device);
- if (bsize <= 0)
-- return -EIO;
-+ goto out;
-
-- devfd = open(device_path(device), O_RDWR | O_DIRECT);
-+ devfd = device_open(device, O_RDWR);
- if (devfd == -1)
-- return -EIO;
-+ goto out;
-
- if (lseek(devfd, sector * SECTOR_SIZE, SEEK_SET) == -1 ||
- write_blockwise(devfd, bsize, src, srcLength) == -1)
-- r = -EIO;
-+ goto out;
-
-- close(devfd);
-- return r;
-+ r = 0;
-+out:
-+ if(devfd != -1)
-+ close(devfd);
-+ if (r)
-+ log_err(ctx, _("IO error while encrypting keyslot.\n"));
-
-+ return r;
- }
-
- int LUKS_decrypt_from_storage(char *dst, size_t dstLength,
-@@ -194,7 +202,7 @@ int LUKS_decrypt_from_storage(char *dst, size_t dstLength,
- {
- struct device *device = crypt_metadata_device(ctx);
- struct crypt_storage *s;
-- int devfd, bsize, r = 0;
-+ int devfd = -1, bsize, r = 0;
-
- /* Only whole sector reads supported */
- if (dstLength % SECTOR_SIZE)
-@@ -219,25 +227,20 @@ int LUKS_decrypt_from_storage(char *dst, size_t dstLength,
-
- log_dbg("Using userspace crypto wrapper to access keyslot area.");
-
-+ r = -EIO;
-+
- /* Read buffer from device */
- bsize = device_block_size(device);
-- if (bsize <= 0) {
-- crypt_storage_destroy(s);
-- return -EIO;
-- }
-+ if (bsize <= 0)
-+ goto bad;
-
-- devfd = open(device_path(device), O_RDONLY | O_DIRECT);
-- if (devfd == -1) {
-- crypt_storage_destroy(s);
-- return -EIO;
-- }
-+ devfd = device_open(device, O_RDONLY);
-+ if (devfd == -1)
-+ goto bad;
-
- if (lseek(devfd, sector * SECTOR_SIZE, SEEK_SET) == -1 ||
-- read_blockwise(devfd, bsize, dst, dstLength) == -1) {
-- crypt_storage_destroy(s);
-- close(devfd);
-- return -EIO;
-- }
-+ read_blockwise(devfd, bsize, dst, dstLength) == -1)
-+ goto bad;
-
- close(devfd);
-
-@@ -246,4 +249,12 @@ int LUKS_decrypt_from_storage(char *dst, size_t dstLength,
- crypt_storage_destroy(s);
-
- return r;
-+bad:
-+ if(devfd != -1)
-+ close(devfd);
-+
-+ log_err(ctx, _("IO error while decrypting keyslot.\n"));
-+ crypt_storage_destroy(s);
-+
-+ return r;
- }
-diff --git a/lib/utils_device.c b/lib/utils_device.c
-index d74149a..491a026 100644
---- a/lib/utils_device.c
-+++ b/lib/utils_device.c
-@@ -72,6 +72,9 @@ int device_open(struct device *device, int flags)
- devfd = open(device_path(device), flags | O_SYNC);
- }
-
-+ if (devfd < 0)
-+ log_dbg("Cannot open device %s.", device_path(device));
-+
- return devfd;
- }
-
-@@ -229,6 +232,9 @@ int device_block_size(struct device *device)
- if (ioctl(fd, BLKSSZGET, &bsize) >= 0)
- r = bsize;
- out:
-+ if (r <= 0)
-+ log_dbg("Cannot get block size for device %s.", device_path(device));
-+
- close(fd);
- return r;
- }
---
-2.0.3
-