svn commit: r564228 - in head/sysutils/e2fsprogs: . files
Matthias Andree
mandree at FreeBSD.org
Sat Feb 6 15:42:07 UTC 2021
Author: mandree
Date: Sat Feb 6 15:42:06 2021
New Revision: 564228
URL: https://svnweb.freebsd.org/changeset/ports/564228
Log:
sysutils/e2fsprogs: update to new upstream release v1.46.0
https://git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git/plain/doc/RelNotes/v1.46.0.txt?h=v1.46.0
The major item in porting is to switch from GNU libc's qsort_r()
interface to ours, but see https://reviews.freebsd.org/D17083
Also, it appears at cursory glance that it takes the FUSEFS option
to get HAVE_PTHREAD_H #defined. Just pass -DHAVE_PTHREAD_H through
CPPFLAGS without further investigation.
Finally, there appears to be some confusion around __u64 vs.
unsigned long long, we get format string complaints. Use <inttypes.h>
and leverage the PRIu64 macro.
I do not intend to MFH this.
Added:
head/sysutils/e2fsprogs/files/patch-e2fsck_rehash.c (contents, props changed)
head/sysutils/e2fsprogs/files/patch-lib_ext2fs_blkmap64__rb.c (contents, props changed)
Modified:
head/sysutils/e2fsprogs/Makefile
head/sysutils/e2fsprogs/distinfo
head/sysutils/e2fsprogs/files/patch-e2fsck__unix.c
head/sysutils/e2fsprogs/files/patch-misc__Makefile.in
Modified: head/sysutils/e2fsprogs/Makefile
==============================================================================
--- head/sysutils/e2fsprogs/Makefile Sat Feb 6 15:34:28 2021 (r564227)
+++ head/sysutils/e2fsprogs/Makefile Sat Feb 6 15:42:06 2021 (r564228)
@@ -2,7 +2,7 @@
# $FreeBSD$
PORTNAME= e2fsprogs
-PORTVERSION= 1.45.7
+PORTVERSION= 1.46.0
PORTREVISION?= 0
CATEGORIES?= sysutils
MASTER_SITES= KERNEL_ORG/linux/kernel/people/tytso/${PORTNAME}/v${PORTVERSION}
@@ -41,7 +41,8 @@ CONFIGURE_ARGS?=--disable-fsck \
--without-included-gettext \
LDFLAGS='${LDFLAGS} -L${LOCALBASE}/lib -Wl,--rpath -Wl,${LOCALBASE}/lib/e2fsprogs'
CONFIGURE_ENV?= LIBS='-Wl,--as-needed ${LIBS} -lexecinfo -lelf'
-CPPFLAGS+= -I${WRKSRC}/lib -I${LOCALBASE}/include # -D_EXT2_USE_C_VERSIONS
+# apparently HAVE_PTHREAD_H checks go missing if the FUSEFS option is unset, force it:
+CPPFLAGS+= -I${WRKSRC}/lib -I${LOCALBASE}/include -DHAVE_PTHREAD_H # -D_EXT2_USE_C_VERSIONS
MAKE_ARGS+= pkgconfigdir='${PREFIX}/libdata/pkgconfig'
MAKE_ENV+= CHECK_CMD=@true
Modified: head/sysutils/e2fsprogs/distinfo
==============================================================================
--- head/sysutils/e2fsprogs/distinfo Sat Feb 6 15:34:28 2021 (r564227)
+++ head/sysutils/e2fsprogs/distinfo Sat Feb 6 15:42:06 2021 (r564228)
@@ -1,3 +1,3 @@
-TIMESTAMP = 1612301930
-SHA256 (e2fsprogs-1.45.7.tar.xz) = 62d49c86d9d4becf305093edd65464484dc9ea41c6ff9ae4f536e4a341b171a2
-SIZE (e2fsprogs-1.45.7.tar.xz) = 5570052
+TIMESTAMP = 1612477988
+SHA256 (e2fsprogs-1.46.0.tar.xz) = 91d61cef9a251a18e49a700be0028a8d35b0549a25d2bc263af6fa5d9f7c7d13
+SIZE (e2fsprogs-1.46.0.tar.xz) = 7007144
Modified: head/sysutils/e2fsprogs/files/patch-e2fsck__unix.c
==============================================================================
--- head/sysutils/e2fsprogs/files/patch-e2fsck__unix.c Sat Feb 6 15:34:28 2021 (r564227)
+++ head/sysutils/e2fsprogs/files/patch-e2fsck__unix.c Sat Feb 6 15:42:06 2021 (r564228)
@@ -2,7 +2,7 @@
// remove the #define _XOPEN_SOURCE 600
// It would hide all non-POSIX declarations, including SIGINFO.
---- e2fsck/unix.c.orig 2021-01-29 05:51:02 UTC
+--- e2fsck/unix.c.orig 2021-01-29 22:02:31 UTC
+++ e2fsck/unix.c
@@ -9,8 +9,6 @@
* %End-Header%
@@ -65,7 +65,7 @@
static void signal_progress_off(int sig EXT2FS_ATTR((unused)))
{
e2fsck_t ctx = e2fsck_global_ctx;
-@@ -1111,6 +1138,10 @@ static errcode_t PRS(int argc, char *argv[], e2fsck_t
+@@ -1120,6 +1147,10 @@ static errcode_t PRS(int argc, char *argv[], e2fsck_t
sigaction(SIGUSR1, &sa, 0);
sa.sa_handler = signal_progress_off;
sigaction(SIGUSR2, &sa, 0);
Added: head/sysutils/e2fsprogs/files/patch-e2fsck_rehash.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/sysutils/e2fsprogs/files/patch-e2fsck_rehash.c Sat Feb 6 15:42:06 2021 (r564228)
@@ -0,0 +1,32 @@
+e2fsprogs is developed on GNU/Linux and with glibc in particular,
+which uses a qsort_r() function interface differing from FreeBSD's,
+both WRT argument ordering on qsort_r() itself, as well as
+the thunk argument on hash_cmp() is first on FreeBSD, last on glibc.
+This applies to FreeBSD 11 and 12 and might change on FreeBSD 13.
+
+Watch https://reviews.freebsd.org/D17083
+
+--- e2fsck/rehash.c.orig 2021-01-29 22:02:31 UTC
++++ e2fsck/rehash.c
+@@ -305,7 +305,7 @@ static EXT2_QSORT_TYPE name_cf_cmp(const struct name_c
+ }
+
+ /* Used for sorting the hash entry */
+-static EXT2_QSORT_TYPE hash_cmp(const void *a, const void *b, void *arg)
++static EXT2_QSORT_TYPE hash_cmp(void *arg, const void *a, const void *b)
+ {
+ const struct name_cmp_ctx *ctx = (struct name_cmp_ctx *) arg;
+ const struct hash_entry *he_a = (const struct hash_entry *) a;
+@@ -1049,10 +1049,10 @@ retry_nohash:
+ resort:
+ if (fd.compress && fd.num_array > 1)
+ qsort_r(fd.harray+2, fd.num_array-2, sizeof(struct hash_entry),
+- hash_cmp, &name_cmp_ctx);
++ &name_cmp_ctx, hash_cmp);
+ else
+ qsort_r(fd.harray, fd.num_array, sizeof(struct hash_entry),
+- hash_cmp, &name_cmp_ctx);
++ &name_cmp_ctx, hash_cmp);
+
+ /*
+ * Look for duplicates
Added: head/sysutils/e2fsprogs/files/patch-lib_ext2fs_blkmap64__rb.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/sysutils/e2fsprogs/files/patch-lib_ext2fs_blkmap64__rb.c Sat Feb 6 15:42:06 2021 (r564228)
@@ -0,0 +1,36 @@
+--- lib/ext2fs/blkmap64_rb.c.orig 2021-01-29 22:02:31 UTC
++++ lib/ext2fs/blkmap64_rb.c
+@@ -12,6 +12,7 @@
+ #include "config.h"
+ #include <stdio.h>
+ #include <string.h>
++#include <inttypes.h>
+ #if HAVE_UNISTD_H
+ #include <unistd.h>
+ #endif
+@@ -907,7 +908,7 @@ static void rb_print_stats(ext2fs_generic_bitmap_64 bi
+ struct ext2fs_rb_private *bp;
+ struct rb_node *node = NULL;
+ struct bmap_rb_extent *ext;
+- __u64 count = 0;
++ unsigned long long count = 0;
+ __u64 max_size = 0;
+ __u64 min_size = ULONG_MAX;
+ __u64 size = 0, avg_size = 0;
+@@ -951,12 +952,12 @@ static void rb_print_stats(ext2fs_generic_bitmap_64 bi
+ fprintf(stderr, "%16llu extents (%llu bytes)\n",
+ count, ((count * sizeof(struct bmap_rb_extent)) +
+ sizeof(struct ext2fs_rb_private)));
+- fprintf(stderr, "%16llu bits minimum size\n",
++ fprintf(stderr, "%16" PRIu64 " bits minimum size\n",
+ min_size);
+- fprintf(stderr, "%16llu bits maximum size\n"
+- "%16llu bits average size\n",
++ fprintf(stderr, "%16" PRIu64 " bits maximum size\n"
++ "%16" PRIu64 " bits average size\n",
+ max_size, avg_size);
+- fprintf(stderr, "%16llu bits set in bitmap (out of %llu)\n", size,
++ fprintf(stderr, "%16" PRIu64 " bits set in bitmap (out of %" PRIu64 ")\n", size,
+ bitmap->real_end - bitmap->start);
+ fprintf(stderr,
+ "%16.4lf memory / bitmap bit memory ratio (bitarray = 1)\n",
Modified: head/sysutils/e2fsprogs/files/patch-misc__Makefile.in
==============================================================================
--- head/sysutils/e2fsprogs/files/patch-misc__Makefile.in Sat Feb 6 15:34:28 2021 (r564227)
+++ head/sysutils/e2fsprogs/files/patch-misc__Makefile.in Sat Feb 6 15:42:06 2021 (r564228)
@@ -1,6 +1,6 @@
---- misc/Makefile.in.orig 2021-01-29 05:51:02 UTC
+--- misc/Makefile.in.orig 2021-01-29 22:02:31 UTC
+++ misc/Makefile.in
-@@ -35,17 +35,17 @@ MKDIR_P = @MKDIR_P@
+@@ -38,17 +38,17 @@ MKDIR_P = @MKDIR_P@
SPROGS= mke2fs badblocks tune2fs dumpe2fs $(BLKID_PROG) logsave \
$(E2IMAGE_PROG) @FSCK_PROG@ e2undo
@@ -23,7 +23,7 @@
UMANPAGES+= @FUSE_CMT@ fuse2fs.1
LPROGS= @E2INITRD_PROG@
-@@ -148,14 +148,14 @@ profiled:
+@@ -154,14 +154,14 @@ profiled:
mke2fs.conf: $(srcdir)/mke2fs.conf.in
if test -f $(srcdir)/mke2fs.conf.custom.in ; then \
@@ -41,7 +41,7 @@
> default_profile.c
findsuper: findsuper.o
$(E) " LD $@"
-@@ -606,34 +606,9 @@ install: all $(SMANPAGES) $(UMANPAGES) installdirs
+@@ -612,34 +612,9 @@ install: all $(SMANPAGES) $(UMANPAGES) installdirs
(cd $(DESTDIR)$(man5dir); \
$(LN) $(LINK_INSTALL_FLAGS) ext4.5 $$i.5); \
done
More information about the svn-ports-all
mailing list