summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWang Mingyu <wangmy@fujitsu.com>2023-03-04 19:03:19 +0800
committerKhem Raj <raj.khem@gmail.com>2023-03-04 10:41:27 -0800
commitb00744ddd83d4ca42923f5291b0fb633f0b19cc0 (patch)
treec382e4744e4720910a93af4227521b34ccd7c66c
parentd13bea04814d98331a8638f4918d6f04d3004840 (diff)
downloadmeta-openembedded-b00744ddd83d4ca42923f5291b0fb633f0b19cc0.tar.gz
cryptsetup: upgrade 2.6.0 -> 2.6.1
0001-Replace-off64_t-with-off_t.patch removed since it's includedin 2.6.1. Signed-off-by: Wang Mingyu <wangmy@fujitsu.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--meta-oe/recipes-crypto/cryptsetup/cryptsetup/0001-Replace-off64_t-with-off_t.patch101
-rw-r--r--meta-oe/recipes-crypto/cryptsetup/cryptsetup_2.6.1.bb (renamed from meta-oe/recipes-crypto/cryptsetup/cryptsetup_2.6.0.bb)6
2 files changed, 2 insertions, 105 deletions
diff --git a/meta-oe/recipes-crypto/cryptsetup/cryptsetup/0001-Replace-off64_t-with-off_t.patch b/meta-oe/recipes-crypto/cryptsetup/cryptsetup/0001-Replace-off64_t-with-off_t.patch
deleted file mode 100644
index 23aa86c0fb..0000000000
--- a/meta-oe/recipes-crypto/cryptsetup/cryptsetup/0001-Replace-off64_t-with-off_t.patch
+++ /dev/null
@@ -1,101 +0,0 @@
1From 683d0c525765415be34c269edf9cc066276f9f65 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sun, 18 Dec 2022 13:53:51 -0800
4Subject: [PATCH] Replace off64_t with off_t
5
6AC_SYS_LARGEFILE autoconf macro is in use in configure script which will
7add needed feature macros on commandline to enable 64bit off_t.
8
9Also replace lseek64 with lseek, since it will be same when
10_FILE_OFFSET_BITS=64 is defined on relevant platforms via AC_SYS_LARGEFILE
11
12Upstream-Status: Submitted [https://gitlab.com/cryptsetup/cryptsetup/-/merge_requests/467]
13Signed-off-by: Khem Raj <raj.khem@gmail.com>
14---
15 lib/utils.c | 4 ++--
16 lib/utils_wipe.c | 4 ++--
17 src/utils_reencrypt_luks1.c | 12 ++++++------
18 3 files changed, 10 insertions(+), 10 deletions(-)
19
20diff --git a/lib/utils.c b/lib/utils.c
21index 9d79ee29..be5f5287 100644
22--- a/lib/utils.c
23+++ b/lib/utils.c
24@@ -102,9 +102,9 @@ static int keyfile_seek(int fd, uint64_t bytes)
25 char tmp[BUFSIZ];
26 size_t next_read;
27 ssize_t bytes_r;
28- off64_t r;
29+ off_t r;
30
31- r = lseek64(fd, bytes, SEEK_CUR);
32+ r = lseek(fd, bytes, SEEK_CUR);
33 if (r > 0)
34 return 0;
35 if (r < 0 && errno != ESPIPE)
36diff --git a/lib/utils_wipe.c b/lib/utils_wipe.c
37index 285a9e77..0c376f44 100644
38--- a/lib/utils_wipe.c
39+++ b/lib/utils_wipe.c
40@@ -150,7 +150,7 @@ static int wipe_block(struct crypt_device *cd, int devfd, crypt_wipe_pattern pat
41 if (blockdev && pattern == CRYPT_WIPE_ZERO &&
42 !wipe_zeroout(cd, devfd, offset, wipe_block_size)) {
43 /* zeroout ioctl does not move offset */
44- if (lseek64(devfd, offset + wipe_block_size, SEEK_SET) < 0) {
45+ if (lseek(devfd, offset + wipe_block_size, SEEK_SET) < 0) {
46 log_err(cd, _("Cannot seek to device offset."));
47 return -EINVAL;
48 }
49@@ -221,7 +221,7 @@ int crypt_wipe_device(struct crypt_device *cd,
50 if (r)
51 goto out;
52
53- if (lseek64(devfd, offset, SEEK_SET) < 0) {
54+ if (lseek(devfd, offset, SEEK_SET) < 0) {
55 log_err(cd, _("Cannot seek to device offset."));
56 r = -EINVAL;
57 goto out;
58diff --git a/src/utils_reencrypt_luks1.c b/src/utils_reencrypt_luks1.c
59index 96368bdb..d83a1da4 100644
60--- a/src/utils_reencrypt_luks1.c
61+++ b/src/utils_reencrypt_luks1.c
62@@ -729,8 +729,8 @@ static int copy_data_forward(struct reenc_ctx *rc, int fd_old, int fd_new,
63
64 log_dbg("Reencrypting in forward direction.");
65
66- if (lseek64(fd_old, rc->device_offset, SEEK_SET) < 0 ||
67- lseek64(fd_new, rc->device_offset, SEEK_SET) < 0) {
68+ if (lseek(fd_old, rc->device_offset, SEEK_SET) < 0 ||
69+ lseek(fd_new, rc->device_offset, SEEK_SET) < 0) {
70 log_err(_("Cannot seek to device offset."));
71 goto out;
72 }
73@@ -788,7 +788,7 @@ static int copy_data_backward(struct reenc_ctx *rc, int fd_old, int fd_new,
74 size_t block_size, void *buf, uint64_t *bytes)
75 {
76 ssize_t s1, s2, working_block;
77- off64_t working_offset;
78+ off_t working_offset;
79 int r = -EIO;
80 char *backing_file = NULL;
81 struct tools_progress_params prog_parms = {
82@@ -827,8 +827,8 @@ static int copy_data_backward(struct reenc_ctx *rc, int fd_old, int fd_new,
83 working_block = block_size;
84 }
85
86- if (lseek64(fd_old, working_offset, SEEK_SET) < 0 ||
87- lseek64(fd_new, working_offset, SEEK_SET) < 0) {
88+ if (lseek(fd_old, working_offset, SEEK_SET) < 0 ||
89+ lseek(fd_new, working_offset, SEEK_SET) < 0) {
90 log_err(_("Cannot seek to device offset."));
91 goto out;
92 }
93@@ -874,7 +874,7 @@ static void zero_rest_of_device(int fd, size_t block_size, void *buf,
94
95 log_dbg("Zeroing rest of device.");
96
97- if (lseek64(fd, offset, SEEK_SET) < 0) {
98+ if (lseek(fd, offset, SEEK_SET) < 0) {
99 log_dbg("Cannot seek to device offset.");
100 return;
101 }
diff --git a/meta-oe/recipes-crypto/cryptsetup/cryptsetup_2.6.0.bb b/meta-oe/recipes-crypto/cryptsetup/cryptsetup_2.6.1.bb
index 1d4f440871..2935221400 100644
--- a/meta-oe/recipes-crypto/cryptsetup/cryptsetup_2.6.0.bb
+++ b/meta-oe/recipes-crypto/cryptsetup/cryptsetup_2.6.1.bb
@@ -19,10 +19,8 @@ DEPENDS = " \
19DEPENDS:append:libc-musl = " argp-standalone" 19DEPENDS:append:libc-musl = " argp-standalone"
20LDFLAGS:append:libc-musl = " -largp" 20LDFLAGS:append:libc-musl = " -largp"
21 21
22SRC_URI = "${KERNELORG_MIRROR}/linux/utils/${BPN}/v${@d.getVar('PV').split('.')[0]}.${@d.getVar('PV').split('.')[1]}/${BP}.tar.xz \ 22SRC_URI = "${KERNELORG_MIRROR}/linux/utils/${BPN}/v${@d.getVar('PV').split('.')[0]}.${@d.getVar('PV').split('.')[1]}/${BP}.tar.xz"
23 file://0001-Replace-off64_t-with-off_t.patch \ 23SRC_URI[sha256sum] = "410ded65a1072ab9c8e41added37b9729c087fef4d2db02bb4ef529ad6da4693"
24 "
25SRC_URI[sha256sum] = "44397ba76e75a9cde5b02177bc63cd7af428a785788e3a7067733e7761842735"
26 24
27inherit autotools gettext pkgconfig 25inherit autotools gettext pkgconfig
28 26