commit: 3ec2ee2d9d32734622aa1aff181f2dc0edb1ac2b
parent 29b0d64dd0221c051b4d5cd619c87645ac630b19
Author: Michael Forney <mforney@mforney.org>
Date: Mon, 6 Sep 2021 18:07:08 -0700
e2fsprogs: Update to 1.46.4
Diffstat:
5 files changed, 159 insertions(+), 189 deletions(-)
diff --git a/pkg/e2fsprogs/gen.lua b/pkg/e2fsprogs/gen.lua
@@ -1,4 +1,4 @@
-set('version', '1.46.2')
+set('version', '1.46.4')
cflags{
'-std=c99', '-Wall',
'-Wno-address-of-packed-member', '-Wno-format-truncation',
@@ -23,7 +23,7 @@ build('cat', '$outdir/config.h', {
set('subst', {
'-e s,@E2FSPROGS_VERSION@,$version,',
- '-e s,@E2FSPROGS_MONTH@,Feb,',
+ '-e s,@E2FSPROGS_MONTH@,Aug,',
'-e s,@E2FSPROGS_YEAR@,2021,',
'-e s,@JDEV@,,',
})
diff --git a/pkg/e2fsprogs/patch/0001-libext2fs-avoid-pointer-arithmetic-on-void.patch b/pkg/e2fsprogs/patch/0001-libext2fs-avoid-pointer-arithmetic-on-void.patch
@@ -1,29 +0,0 @@
-From e659aeb8ee69392cba017fc306cdea20c8c97b70 Mon Sep 17 00:00:00 2001
-From: Michael Forney <mforney@mforney.org>
-Date: Tue, 2 Mar 2021 14:24:01 -0800
-Subject: [PATCH] libext2fs: avoid pointer arithmetic on `void *`
-
-The pointer operand to the + operator must be to a complete object
-type.
-
-Signed-off-by: Michael Forney <mforney@mforney.org>
----
- e2fsck/recovery.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/e2fsck/recovery.c b/e2fsck/recovery.c
-index 25744f08..3c5a37e9 100644
---- a/e2fsck/recovery.c
-+++ b/e2fsck/recovery.c
-@@ -179,7 +179,7 @@ static int jbd2_descriptor_block_csum_verify(journal_t *j, void *buf)
- if (!jbd2_journal_has_csum_v2or3(j))
- return 1;
-
-- tail = (struct jbd2_journal_block_tail *)(buf + j->j_blocksize -
-+ tail = (struct jbd2_journal_block_tail *)((char *)buf + j->j_blocksize -
- sizeof(struct jbd2_journal_block_tail));
- provided = tail->t_checksum;
- tail->t_checksum = 0;
---
-2.32.0
-
diff --git a/pkg/e2fsprogs/patch/0001-libsupport-remove-unused-sort_r-definition.patch b/pkg/e2fsprogs/patch/0001-libsupport-remove-unused-sort_r-definition.patch
@@ -0,0 +1,156 @@
+From 24a0e8d916019160c1fe186ccfb9843d00a5ddde Mon Sep 17 00:00:00 2001
+From: Michael Forney <mforney@mforney.org>
+Date: Tue, 2 Mar 2021 15:47:20 -0800
+Subject: [PATCH] libsupport: remove unused sort_r definition
+
+e2fsprogs uses sort_r_simple directly, so sort_r is not needed.
+
+On any linux (including linux-musl), sort_r is defined in terms of
+qsort_r, so a compiler that does not support inlining may still
+emit a reference to qsort_r.
+---
+ lib/support/sort_r.h | 119 +------------------------------------------
+ 1 file changed, 2 insertions(+), 117 deletions(-)
+
+diff --git a/lib/support/sort_r.h b/lib/support/sort_r.h
+index 3292a26a..08f496d4 100644
+--- a/lib/support/sort_r.h
++++ b/lib/support/sort_r.h
+@@ -22,20 +22,10 @@ void sort_r(void *base, size_t nel, size_t width,
+
+ */
+
+-#define _SORT_R_INLINE inline
+-
+-#if (defined __gnu_hurd__ || defined __GNU__ || \
+- defined __linux__ || defined __MINGW32__ || defined __GLIBC__)
+-# define _SORT_R_LINUX
+-#elif (defined __APPLE__ || defined __MACH__ || defined __DARWIN__ || \
+- defined __FreeBSD__ || defined __DragonFly__)
+-# define _SORT_R_BSD
+-#elif (defined _WIN32 || defined _WIN64 || defined __WINDOWS__)
+-# define _SORT_R_WINDOWS
+-# undef _SORT_R_INLINE
++#if (defined _WIN32 || defined _WIN64 || defined __WINDOWS__)
+ # define _SORT_R_INLINE __inline
+ #else
+- /* Using our own recursive quicksort sort_r_simple() */
++# define _SORT_R_INLINE inline
+ #endif
+
+ #if (defined NESTED_QSORT && NESTED_QSORT == 0)
+@@ -211,111 +201,6 @@ static _SORT_R_INLINE void sort_r_simple(void *base, size_t nel, size_t w,
+ }
+ }
+
+-
+-#if defined NESTED_QSORT
+-
+- static _SORT_R_INLINE void sort_r(void *base, size_t nel, size_t width,
+- int (*compar)(const void *_a,
+- const void *_b,
+- void *aarg),
+- void *arg)
+- {
+- int nested_cmp(const void *a, const void *b)
+- {
+- return compar(a, b, arg);
+- }
+-
+- qsort(base, nel, width, nested_cmp);
+- }
+-
+-#else /* !NESTED_QSORT */
+-
+- /* Declare structs and functions */
+-
+- #if defined _SORT_R_BSD
+-
+- /* Ensure qsort_r is defined */
+- extern void qsort_r(void *base, size_t nel, size_t width, void *thunk,
+- int (*compar)(void *_thunk,
+- const void *_a, const void *_b));
+-
+- #endif
+-
+- #if defined _SORT_R_BSD || defined _SORT_R_WINDOWS
+-
+- /* BSD (qsort_r), Windows (qsort_s) require argument swap */
+-
+- struct sort_r_data
+- {
+- void *arg;
+- int (*compar)(const void *_a, const void *_b, void *_arg);
+- };
+-
+- static _SORT_R_INLINE int sort_r_arg_swap(void *s,
+- const void *a, const void *b)
+- {
+- struct sort_r_data *ss = (struct sort_r_data*)s;
+- return (ss->compar)(a, b, ss->arg);
+- }
+-
+- #endif
+-
+- #if defined _SORT_R_LINUX
+-
+- typedef int(* __compar_d_fn_t)(const void *, const void *, void *);
+- extern void qsort_r(void *base, size_t nel, size_t width,
+- __compar_d_fn_t __compar, void *arg)
+- __attribute__((nonnull (1, 4)));
+-
+- #endif
+-
+- /* implementation */
+-
+- static _SORT_R_INLINE void sort_r(void *base, size_t nel, size_t width,
+- int (*compar)(const void *_a,
+- const void *_b, void *_arg),
+- void *arg)
+- {
+- #if defined _SORT_R_LINUX
+-
+- #if defined __GLIBC__ && ((__GLIBC__ < 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 8))
+-
+- /* no qsort_r in glibc before 2.8, need to use nested qsort */
+- sort_r_simple(base, nel, width, compar, arg);
+-
+- #else
+-
+- qsort_r(base, nel, width, compar, arg);
+-
+- #endif
+-
+- #elif defined _SORT_R_BSD
+-
+- struct sort_r_data tmp;
+- tmp.arg = arg;
+- tmp.compar = compar;
+- qsort_r(base, nel, width, &tmp, sort_r_arg_swap);
+-
+- #elif defined _SORT_R_WINDOWS
+-
+- struct sort_r_data tmp;
+- tmp.arg = arg;
+- tmp.compar = compar;
+- qsort_s(base, nel, width, sort_r_arg_swap, &tmp);
+-
+- #else
+-
+- /* Fall back to our own quicksort implementation */
+- sort_r_simple(base, nel, width, compar, arg);
+-
+- #endif
+- }
+-
+-#endif /* !NESTED_QSORT */
+-
+ #undef _SORT_R_INLINE
+-#undef _SORT_R_WINDOWS
+-#undef _SORT_R_LINUX
+-#undef _SORT_R_BSD
+
+ #endif /* SORT_R_H_ */
+--
+2.32.0
+
diff --git a/pkg/e2fsprogs/patch/0002-libsupport-remove-unused-sort_r-definition.patch b/pkg/e2fsprogs/patch/0002-libsupport-remove-unused-sort_r-definition.patch
@@ -1,157 +0,0 @@
-From 6a898554d5862f7cffbd674b0e1c690c6c8e83e4 Mon Sep 17 00:00:00 2001
-From: Michael Forney <mforney@mforney.org>
-Date: Tue, 2 Mar 2021 15:47:20 -0800
-Subject: [PATCH] libsupport: remove unused sort_r definition
-
-e2fsprogs uses sort_r_simple directly, so sort_r is not needed.
-
-On any linux (including linux-musl), sort_r is defined in terms of
-qsort_r, so a compiler that does not support inlining may still
-emit a reference to qsort_r.
----
- lib/support/sort_r.h | 120 ++-----------------------------------------
- 1 file changed, 3 insertions(+), 117 deletions(-)
-
-diff --git a/lib/support/sort_r.h b/lib/support/sort_r.h
-index dc17e8af..4c4ebf3b 100644
---- a/lib/support/sort_r.h
-+++ b/lib/support/sort_r.h
-@@ -22,20 +22,11 @@ void sort_r(void *base, size_t nel, size_t width,
-
- */
-
--#define _SORT_R_INLINE inline
--
--#if (defined __APPLE__ || defined __MACH__ || defined __DARWIN__ || \
-- defined __FreeBSD__ || defined __DragonFly__)
--# define _SORT_R_BSD
--#elif (defined _GNU_SOURCE || defined __gnu_hurd__ || defined __GNU__ || \
-- defined __linux__ || defined __MINGW32__ || defined __GLIBC__)
--# define _SORT_R_LINUX
--#elif (defined _WIN32 || defined _WIN64 || defined __WINDOWS__)
--# define _SORT_R_WINDOWS
--# undef _SORT_R_INLINE
-+
-+#if (defined _WIN32 || defined _WIN64 || defined __WINDOWS__)
- # define _SORT_R_INLINE __inline
- #else
-- /* Using our own recursive quicksort sort_r_simple() */
-+# define _SORT_R_INLINE inline
- #endif
-
- #if (defined NESTED_QSORT && NESTED_QSORT == 0)
-@@ -211,111 +202,6 @@ static _SORT_R_INLINE void sort_r_simple(void *base, size_t nel, size_t w,
- }
- }
-
--
--#if defined NESTED_QSORT
--
-- static _SORT_R_INLINE void sort_r(void *base, size_t nel, size_t width,
-- int (*compar)(const void *_a,
-- const void *_b,
-- void *aarg),
-- void *arg)
-- {
-- int nested_cmp(const void *a, const void *b)
-- {
-- return compar(a, b, arg);
-- }
--
-- qsort(base, nel, width, nested_cmp);
-- }
--
--#else /* !NESTED_QSORT */
--
-- /* Declare structs and functions */
--
-- #if defined _SORT_R_BSD
--
-- /* Ensure qsort_r is defined */
-- extern void qsort_r(void *base, size_t nel, size_t width, void *thunk,
-- int (*compar)(void *_thunk,
-- const void *_a, const void *_b));
--
-- #endif
--
-- #if defined _SORT_R_BSD || defined _SORT_R_WINDOWS
--
-- /* BSD (qsort_r), Windows (qsort_s) require argument swap */
--
-- struct sort_r_data
-- {
-- void *arg;
-- int (*compar)(const void *_a, const void *_b, void *_arg);
-- };
--
-- static _SORT_R_INLINE int sort_r_arg_swap(void *s,
-- const void *a, const void *b)
-- {
-- struct sort_r_data *ss = (struct sort_r_data*)s;
-- return (ss->compar)(a, b, ss->arg);
-- }
--
-- #endif
--
-- #if defined _SORT_R_LINUX
--
-- typedef int(* __compar_d_fn_t)(const void *, const void *, void *);
-- extern void qsort_r(void *base, size_t nel, size_t width,
-- __compar_d_fn_t __compar, void *arg)
-- __attribute__((nonnull (1, 4)));
--
-- #endif
--
-- /* implementation */
--
-- static _SORT_R_INLINE void sort_r(void *base, size_t nel, size_t width,
-- int (*compar)(const void *_a,
-- const void *_b, void *_arg),
-- void *arg)
-- {
-- #if defined _SORT_R_LINUX
--
-- #if defined __GLIBC__ && ((__GLIBC__ < 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 8))
--
-- /* no qsort_r in glibc before 2.8, need to use nested qsort */
-- sort_r_simple(base, nel, width, compar, arg);
--
-- #else
--
-- qsort_r(base, nel, width, compar, arg);
--
-- #endif
--
-- #elif defined _SORT_R_BSD
--
-- struct sort_r_data tmp;
-- tmp.arg = arg;
-- tmp.compar = compar;
-- qsort_r(base, nel, width, &tmp, sort_r_arg_swap);
--
-- #elif defined _SORT_R_WINDOWS
--
-- struct sort_r_data tmp;
-- tmp.arg = arg;
-- tmp.compar = compar;
-- qsort_s(base, nel, width, sort_r_arg_swap, &tmp);
--
-- #else
--
-- /* Fall back to our own quicksort implementation */
-- sort_r_simple(base, nel, width, compar, arg);
--
-- #endif
-- }
--
--#endif /* !NESTED_QSORT */
--
- #undef _SORT_R_INLINE
--#undef _SORT_R_WINDOWS
--#undef _SORT_R_LINUX
--#undef _SORT_R_BSD
-
- #endif /* SORT_R_H_ */
---
-2.30.0
-
diff --git a/pkg/e2fsprogs/ver b/pkg/e2fsprogs/ver
@@ -1 +1 @@
-1.46.2 r0
+1.46.4 r0