diff options
5 files changed, 99 insertions, 3 deletions
diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-Add-option-to-enable-disable-largefile-support.patch b/meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-Add-option-to-enable-disable-largefile-support.patch new file mode 100644 index 0000000000..a770d0cf89 --- /dev/null +++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-Add-option-to-enable-disable-largefile-support.patch | |||
| @@ -0,0 +1,57 @@ | |||
| 1 | From 6fab3346d448298a24cee1faeb5fc8507a3b9712 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Thu, 10 Nov 2022 20:34:54 -0800 | ||
| 4 | Subject: [PATCH] Add option to enable/disable largefile support | ||
| 5 | |||
| 6 | fallocate can be used to have 64bit off_t provided its compiled with | ||
| 7 | _FILE_OFFSET_BITS=64 which will be added automatically when | ||
| 8 | --enable-largefile is used. | ||
| 9 | |||
| 10 | Upstream-Status: Submitted [https://github.com/tytso/e2fsprogs/pull/129] | ||
| 11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 12 | --- | ||
| 13 | configure.ac | 3 +++ | ||
| 14 | misc/e4defrag.c | 6 +----- | ||
| 15 | 2 files changed, 4 insertions(+), 5 deletions(-) | ||
| 16 | |||
| 17 | diff --git a/configure.ac b/configure.ac | ||
| 18 | index dff3d1ca..ec1c5b64 100644 | ||
| 19 | --- a/configure.ac | ||
| 20 | +++ b/configure.ac | ||
| 21 | @@ -1800,6 +1800,9 @@ OS_IO_FILE="" | ||
| 22 | ;; | ||
| 23 | esac] | ||
| 24 | AC_SUBST(OS_IO_FILE) | ||
| 25 | + | ||
| 26 | +AC_SYS_LARGEFILE | ||
| 27 | + | ||
| 28 | dnl | ||
| 29 | dnl Make our output files, being sure that we create the some miscellaneous | ||
| 30 | dnl directories | ||
| 31 | diff --git a/misc/e4defrag.c b/misc/e4defrag.c | ||
| 32 | index 86e97ee3..e7175c37 100644 | ||
| 33 | --- a/misc/e4defrag.c | ||
| 34 | +++ b/misc/e4defrag.c | ||
| 35 | @@ -195,10 +195,6 @@ static struct frag_statistic_ino frag_rank[SHOW_FRAG_FILES]; | ||
| 36 | #error posix_fadvise not available! | ||
| 37 | #endif | ||
| 38 | |||
| 39 | -#ifndef HAVE_FALLOCATE64 | ||
| 40 | -#error fallocate64 not available! | ||
| 41 | -#endif /* ! HAVE_FALLOCATE64 */ | ||
| 42 | - | ||
| 43 | /* | ||
| 44 | * get_mount_point() - Get device's mount point. | ||
| 45 | * | ||
| 46 | @@ -1568,7 +1564,7 @@ static int file_defrag(const char *file, const struct stat64 *buf, | ||
| 47 | /* Allocate space for donor inode */ | ||
| 48 | orig_group_tmp = orig_group_head; | ||
| 49 | do { | ||
| 50 | - ret = fallocate64(donor_fd, 0, | ||
| 51 | + ret = fallocate(donor_fd, 0, | ||
| 52 | (ext2_loff_t)orig_group_tmp->start->data.logical * block_size, | ||
| 53 | (ext2_loff_t)orig_group_tmp->len * block_size); | ||
| 54 | if (ret < 0) { | ||
| 55 | -- | ||
| 56 | 2.38.1 | ||
| 57 | |||
diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-ext2fs-Use-64bit-lseek-when-_FILE_OFFSET_BITS-is-64.patch b/meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-ext2fs-Use-64bit-lseek-when-_FILE_OFFSET_BITS-is-64.patch new file mode 100644 index 0000000000..20ed6ecb3b --- /dev/null +++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-ext2fs-Use-64bit-lseek-when-_FILE_OFFSET_BITS-is-64.patch | |||
| @@ -0,0 +1,37 @@ | |||
| 1 | From 1a8aaa8ff7f4aca68b5ae964458e49ab16b4315f Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Wed, 14 Dec 2022 20:56:44 -0800 | ||
| 4 | Subject: [PATCH] ext2fs: Use 64bit lseek when _FILE_OFFSET_BITS is 64 | ||
| 5 | |||
| 6 | Use lseek() with 64bit off_t when _FILE_OFFSET_BITS is 64 | ||
| 7 | this fixes build with musl where there is no _llseek but lseek | ||
| 8 | is using off_t which is 64bit on musl | ||
| 9 | |||
| 10 | Upstream-Status: Submitted [https://github.com/tytso/e2fsprogs/pull/129] | ||
| 11 | Signe-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 12 | --- | ||
| 13 | lib/ext2fs/llseek.c | 4 ++-- | ||
| 14 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
| 15 | |||
| 16 | diff --git a/lib/ext2fs/llseek.c b/lib/ext2fs/llseek.c | ||
| 17 | index 922a0d56..45f21d09 100644 | ||
| 18 | --- a/lib/ext2fs/llseek.c | ||
| 19 | +++ b/lib/ext2fs/llseek.c | ||
| 20 | @@ -51,7 +51,7 @@ extern long long llseek (int fd, long long offset, int origin); | ||
| 21 | |||
| 22 | #else /* ! HAVE_LLSEEK */ | ||
| 23 | |||
| 24 | -#if SIZEOF_LONG == SIZEOF_LONG_LONG | ||
| 25 | +#if SIZEOF_LONG == SIZEOF_LONG_LONG || _FILE_OFFSET_BITS+0 == 64 | ||
| 26 | |||
| 27 | #define my_llseek lseek | ||
| 28 | |||
| 29 | @@ -69,7 +69,7 @@ static int _llseek (unsigned int, unsigned long, | ||
| 30 | |||
| 31 | static _syscall5(int,_llseek,unsigned int,fd,unsigned long,offset_high, | ||
| 32 | unsigned long, offset_low,ext2_loff_t *,result, | ||
| 33 | - unsigned int, origin) | ||
| 34 | + unsigned int, origin); | ||
| 35 | #endif | ||
| 36 | |||
| 37 | static ext2_loff_t my_llseek (int fd, ext2_loff_t offset, int origin) | ||
diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs/e2fsprogs-fix-missing-check-for-permission-denied.patch b/meta/recipes-devtools/e2fsprogs/e2fsprogs/e2fsprogs-fix-missing-check-for-permission-denied.patch index 29078f9dd3..92bd0d0c1f 100644 --- a/meta/recipes-devtools/e2fsprogs/e2fsprogs/e2fsprogs-fix-missing-check-for-permission-denied.patch +++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs/e2fsprogs-fix-missing-check-for-permission-denied.patch | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | From 22d7557905534d9e1b39f7d2a6d2036a40bf0c4e Mon Sep 17 00:00:00 2001 | 1 | From cce489c96aa3f4272a19d2137c2a46b439636712 Mon Sep 17 00:00:00 2001 |
| 2 | From: Jackie Huang <jackie.huang@windriver.com> | 2 | From: Jackie Huang <jackie.huang@windriver.com> |
| 3 | Date: Wed, 10 Aug 2016 11:19:44 +0800 | 3 | Date: Wed, 10 Aug 2016 11:19:44 +0800 |
| 4 | Subject: [PATCH] Fix missing check for permission denied. | 4 | Subject: [PATCH] Fix missing check for permission denied. |
diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs/quiet-debugfs.patch b/meta/recipes-devtools/e2fsprogs/e2fsprogs/quiet-debugfs.patch index 902a369eb0..d695580c92 100644 --- a/meta/recipes-devtools/e2fsprogs/e2fsprogs/quiet-debugfs.patch +++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs/quiet-debugfs.patch | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | From 5408b6463ee700a080a15102bccccdeb2615d734 Mon Sep 17 00:00:00 2001 | 1 | From 20bf59365646af0466c1910e8763b352380b26d6 Mon Sep 17 00:00:00 2001 |
| 2 | From: Ross Burton <ross.burton@intel.com> | 2 | From: Ross Burton <ross.burton@intel.com> |
| 3 | Date: Mon, 23 Dec 2013 13:38:34 +0000 | 3 | Date: Mon, 23 Dec 2013 13:38:34 +0000 |
| 4 | Subject: [PATCH] e2fsprogs: silence debugfs | 4 | Subject: [PATCH] e2fsprogs: silence debugfs |
diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.46.5.bb b/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.46.5.bb index 5b2d1921f0..ceceb7edcc 100644 --- a/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.46.5.bb +++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.46.5.bb | |||
| @@ -5,6 +5,8 @@ SRC_URI += "file://remove.ldconfig.call.patch \ | |||
| 5 | file://ptest.patch \ | 5 | file://ptest.patch \ |
| 6 | file://mkdir_p.patch \ | 6 | file://mkdir_p.patch \ |
| 7 | file://extents.patch \ | 7 | file://extents.patch \ |
| 8 | file://0001-Add-option-to-enable-disable-largefile-support.patch \ | ||
| 9 | file://0001-ext2fs-Use-64bit-lseek-when-_FILE_OFFSET_BITS-is-64.patch \ | ||
| 8 | " | 10 | " |
| 9 | SRC_URI:append:class-native = " \ | 11 | SRC_URI:append:class-native = " \ |
| 10 | file://e2fsprogs-fix-missing-check-for-permission-denied.patch \ | 12 | file://e2fsprogs-fix-missing-check-for-permission-denied.patch \ |
| @@ -17,7 +19,7 @@ UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+\.\d+(\.\d+)*)$" | |||
| 17 | EXTRA_OECONF += "--libdir=${base_libdir} --sbindir=${base_sbindir} \ | 19 | EXTRA_OECONF += "--libdir=${base_libdir} --sbindir=${base_sbindir} \ |
| 18 | --enable-elf-shlibs --disable-libuuid --disable-uuidd \ | 20 | --enable-elf-shlibs --disable-libuuid --disable-uuidd \ |
| 19 | --disable-libblkid --enable-verbose-makecmds \ | 21 | --disable-libblkid --enable-verbose-makecmds \ |
| 20 | --with-crond-dir=no" | 22 | --enable-largefile --with-crond-dir=no" |
| 21 | 23 | ||
| 22 | EXTRA_OECONF:darwin = "--libdir=${base_libdir} --sbindir=${base_sbindir} --enable-bsd-shlibs" | 24 | EXTRA_OECONF:darwin = "--libdir=${base_libdir} --sbindir=${base_sbindir} --enable-bsd-shlibs" |
| 23 | 25 | ||
