MFH: r563848

sysutils/e2fsprogs: update to new 1.45.7 upstream release

Changelog:
https://git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git/plain/doc/RelNotes/v1.45.7.txt?h=v1.45.7
This commit is contained in:
Matthias Andree 2021-02-02 23:24:03 +00:00
parent b8131db84d
commit 2de69f8574
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/branches/2021Q1/; revision=563850
10 changed files with 35 additions and 226 deletions

View File

@ -1,7 +1,7 @@
# Created by: Matthias Andree <matthias.andree@gmx.de>
# $FreeBSD$
PORTREVISION= 1
PORTREVISION= 0
CATEGORIES= misc devel
PKGNAMESUFFIX= -libblkid

View File

@ -2,8 +2,8 @@
# $FreeBSD$
PORTNAME= e2fsprogs
PORTVERSION= 1.45.6
PORTREVISION?= 5
PORTVERSION= 1.45.7
PORTREVISION?= 0
CATEGORIES?= sysutils
MASTER_SITES= KERNEL_ORG/linux/kernel/people/tytso/${PORTNAME}/v${PORTVERSION}
@ -213,21 +213,18 @@ _CHECK_JOBS=${_MAKE_JOBS}
_CHECK_JOBS=
.endif
_checkaddargs=
.if ${PORT_OPTIONS:MBASHTESTS}
_CHECK_SHELL=${SHELL}
_checkaddargs+=--eval SHELL:=${BASH_CMD}
.else
_CHECK_SHELL=${LOCALBASE}/bin/bash
.endif
_checkaddargs=
.if !defined(TMPDIR)
_checkaddargs+=TMPDIR=${WRKDIR}/tmp
.endif
.if ${PORT_OPTIONS:MBASHTESTS}
_checkaddargs+=--eval SHELL:=${BASH_CMD}
.endif
.if ${PORT_OPTIONS:MSLOWTESTS}
_check_target=SKIP_SLOW_TESTS= check
_check_timeout=7200

View File

@ -1,3 +1,3 @@
TIMESTAMP = 1584954798
SHA256 (e2fsprogs-1.45.6.tar.xz) = ffa7ae6954395abdc50d0f8605d8be84736465afc53b8938ef473fcf7ff44256
SIZE (e2fsprogs-1.45.6.tar.xz) = 5572144
TIMESTAMP = 1612301930
SHA256 (e2fsprogs-1.45.7.tar.xz) = 62d49c86d9d4becf305093edd65464484dc9ea41c6ff9ae4f536e4a341b171a2
SIZE (e2fsprogs-1.45.7.tar.xz) = 5570052

View File

@ -1,72 +0,0 @@
The patch was provided by Ted Y. Ts'o, with the final loff_t ->
ext2_loff_t manually added by mandree@FreeBSD.org
--------------
From 3fab0b6872b74ae0efab1ebdc6318924fda5f3a5 Mon Sep 17 00:00:00 2001
From: Theodore Ts'o <tytso@mit.edu>
Date: Sun, 22 Mar 2020 23:30:14 -0400
Subject: [PATCH 1/3] Use ext2_loff_t instead of loff_t
The loff_t type is a glibc'ism and is not fully portable. Use
ext2_loff_t instead.
Fixes: 382ed4a1c2b6 ("e2fsck: use proper types for variables")
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Reported-by: Matthias Andree <matthias.andree@gmx.de>
---
lib/ext2fs/imager.c | 2 +-
misc/e2fuzz.c | 9 +++++----
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/lib/ext2fs/imager.c b/lib/ext2fs/imager.c
index b3ede9a8..1aebe625 100644
--- ./lib/ext2fs/imager.c
+++ b/lib/ext2fs/imager.c
@@ -67,7 +67,7 @@ errcode_t ext2fs_image_inode_write(ext2_filsys fs, int fd, int flags)
blk64_t blk;
ssize_t actual;
errcode_t retval;
- loff_t r;
+ ext2_loff_t r;
buf = malloc(fs->blocksize * BUF_BLOCKS);
if (!buf)
diff --git a/misc/e2fuzz.c b/misc/e2fuzz.c
index 7c0f776f..f22c9f32 100644
--- ./misc/e2fuzz.c
+++ b/misc/e2fuzz.c
@@ -33,9 +33,10 @@ static unsigned long long user_corrupt_bytes = 0;
static double user_corrupt_pct = 0.0;
#if !defined HAVE_PWRITE64 && !defined HAVE_PWRITE
-static ssize_t my_pwrite(int fd, const void *buf, size_t count, off_t offset)
+static ssize_t my_pwrite(int fd, const void *buf, size_t count,
+ ext2_loff_t offset)
{
- if (lseek(fd, offset, SEEK_SET) < 0)
+ if (ext2fs_llseek(fd, offset, SEEK_SET) < 0)
return 0;
return write(fd, buf, count);
@@ -82,7 +83,7 @@ static int find_block_helper(ext2_filsys fs EXT2FS_ATTR((unused)),
}
static errcode_t find_metadata_blocks(ext2_filsys fs, ext2fs_block_bitmap bmap,
- off_t *corrupt_bytes)
+ ext2_loff_t *corrupt_bytes)
{
dgrp_t i;
blk64_t b, c;
@@ -181,7 +182,7 @@ static int process_fs(const char *fsname)
int flags, fd;
ext2_filsys fs = NULL;
ext2fs_block_bitmap corrupt_map;
- loff_t hsize, count, off, offset, corrupt_bytes;
+ ext2_loff_t hsize, count, off, offset, corrupt_bytes;
unsigned char c;
- loff_t i;
+ ext2_loff_t i;
--
2.24.1

View File

@ -1,72 +0,0 @@
From ef858c7194ff6f3dc0de162fe7bd82a8cb5e8fba Mon Sep 17 00:00:00 2001
From: Theodore Ts'o <tytso@mit.edu>
Date: Sun, 22 Mar 2020 23:47:12 -0400
Subject: [PATCH 2/3] e2fsck: fix various gcc -Wall nits
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
---
e2fsck/rehash.c | 4 ++--
e2fsck/unix.c | 2 +-
e2fsck/util.c | 4 ++--
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/e2fsck/rehash.c b/e2fsck/rehash.c
index 1616d07a..30e510a6 100644
--- ./e2fsck/rehash.c
+++ b/e2fsck/rehash.c
@@ -109,7 +109,7 @@ static int fill_dir_block(ext2_filsys fs,
void *priv_data)
{
struct fill_dir_struct *fd = (struct fill_dir_struct *) priv_data;
- struct hash_entry *new_array, *ent;
+ struct hash_entry *ent;
struct ext2_dir_entry *dirent;
char *dir;
unsigned int offset, dir_offset, rec_len, name_len;
@@ -460,7 +460,7 @@ static errcode_t copy_dir_entries(e2fsck_t ctx,
struct hash_entry *ent;
struct ext2_dir_entry *dirent;
unsigned int rec_len, prev_rec_len, left, slack, offset;
- int i;
+ blk_t i;
ext2_dirhash_t prev_hash;
int csum_size = 0;
struct ext2_dir_entry_tail *t;
diff --git a/e2fsck/unix.c b/e2fsck/unix.c
index e71d7833..1b7ccea9 100644
--- ./e2fsck/unix.c
+++ b/e2fsck/unix.c
@@ -1439,7 +1439,7 @@ int main (int argc, char *argv[])
fputs("<?xml version=\"1.0\" encoding=\"utf-8\"?>\n",
ctx->problem_logf);
fprintf(ctx->problem_logf, "<problem_log time=\"%lu\">\n",
- ctx->now);
+ (unsigned long) ctx->now);
fprintf(ctx->problem_logf, "<invocation prog=\"%s\"",
argv[0]);
for (i = 1; i < argc; i++)
diff --git a/e2fsck/util.c b/e2fsck/util.c
index d98b8e47..8cebd95a 100644
--- ./e2fsck/util.c
+++ b/e2fsck/util.c
@@ -126,7 +126,7 @@ void *e2fsck_allocate_memory(e2fsck_t ctx, unsigned long size,
printf("Allocating %u bytes for %s...\n", size, description);
#endif
if (ext2fs_get_memzero(size, &ret)) {
- sprintf(buf, "Can't allocate %u bytes for %s\n",
+ sprintf(buf, "Can't allocate %lu bytes for %s\n",
size, description);
fatal_error(ctx, buf);
}
@@ -436,7 +436,7 @@ void print_resource_track(e2fsck_t ctx, const char *desc,
#define kbytes(x) (((unsigned long long)(x) + 1023) / 1024)
#ifdef HAVE_MALLINFO
/* don't use mallinfo() if over 2GB used, since it returns "int" */
- if ((char *)sbrk(0) - (char *)track->brk_start < 2ULL << 30) {
+ if ((char *)sbrk(0) - (char *)track->brk_start < 2LL << 30) {
struct mallinfo malloc_info = mallinfo();
log_out(ctx, _("Memory used: %lluk/%lluk (%lluk/%lluk), "),
--
2.24.1

View File

@ -1,64 +0,0 @@
From e3b002dcc43364972275fe32438af299dd6629a0 Mon Sep 17 00:00:00 2001
From: Theodore Ts'o <tytso@mit.edu>
Date: Sun, 22 Mar 2020 23:56:14 -0400
Subject: [PATCH 3/3] tests: use grep -E for better portability in
r_inline_xattr
Since r_inline_xattr is using an extended regexp, we need grep -E on
some implementations of grep.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
---
tests/r_inline_xattr/expect | 4 ++--
tests/r_inline_xattr/script | 8 ++++----
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/tests/r_inline_xattr/expect b/tests/r_inline_xattr/expect
index 885de59d..773db102 100644
--- ./tests/r_inline_xattr/expect
+++ b/tests/r_inline_xattr/expect
@@ -1,5 +1,5 @@
resize2fs test
-debugfs -R ''stat file'' test.img 2>&1 | grep ''^Inode\|in inode body\|user.name (''
+debugfs -R ''stat file'' test.img 2>&1 | grep -E ''^Inode\|in inode body\|user.name \(''
Inode: 1550 Type: regular Mode: 0644 Flags: 0x0
user.name (11) = "propervalue"
Exit status is 0
@@ -8,7 +8,7 @@ Resizing the filesystem on test.img to 5120 (1k) blocks.
The filesystem on test.img is now 5120 (1k) blocks long.
Exit status is 0
-debugfs -R ''stat file'' test.img 2>&1 | grep ''^Inode\|in inode body\|user.name (''
+debugfs -R ''stat file'' test.img 2>&1 | grep -E ''^Inode\|in inode body\|user.name \(''
Inode: 12 Type: regular Mode: 0644 Flags: 0x0
user.name (11) = "propervalue"
Exit status is 0
diff --git a/tests/r_inline_xattr/script b/tests/r_inline_xattr/script
index 4e7dd94c..2f754e60 100644
--- ./tests/r_inline_xattr/script
+++ b/tests/r_inline_xattr/script
@@ -13,8 +13,8 @@ gunzip < $IMAGE > $TMPFILE
echo "resize2fs test" > $OUT.new
# Look at existing inline extended attribute
-echo "debugfs -R ''stat file'' test.img 2>&1 | grep ''^Inode\|in inode body\|user.name (''" >> $OUT.new
-$DEBUGFS -R "stat file" $TMPFILE 2>&1 | grep "^Inode\|in inode body\|user.name (" >> $OUT.new
+echo "debugfs -R ''stat file'' test.img 2>&1 | grep -E ''^Inode\|in inode body\|user.name \\(''" >> $OUT.new
+$DEBUGFS -R "stat file" $TMPFILE 2>&1 | grep -E "^Inode|in inode body|user.name \(" >> $OUT.new
status=$?
echo Exit status is $status >> $OUT.new
@@ -25,8 +25,8 @@ status=$?
echo Exit status is $status >> $OUT.new
# Look at inline extended attribute in resized fs
-echo "debugfs -R ''stat file'' test.img 2>&1 | grep ''^Inode\|in inode body\|user.name (''" >> $OUT.new
-$DEBUGFS -R "stat file" $TMPFILE 2>&1 | grep "^Inode\|in inode body\|user.name (" >> $OUT.new
+echo "debugfs -R ''stat file'' test.img 2>&1 | grep -E ''^Inode\|in inode body\|user.name \\(''" >> $OUT.new
+$DEBUGFS -R "stat file" $TMPFILE 2>&1 | grep -E "^Inode|in inode body|user.name \(" >> $OUT.new
status=$?
echo Exit status is $status >> $OUT.new
--
2.24.1

View File

@ -2,7 +2,7 @@
// remove the #define _XOPEN_SOURCE 600
// It would hide all non-POSIX declarations, including SIGINFO.
--- e2fsck/unix.c.orig 2020-03-21 04:24:04 UTC
--- e2fsck/unix.c.orig 2021-01-29 05:51:02 UTC
+++ e2fsck/unix.c
@@ -9,8 +9,6 @@
* %End-Header%
@ -13,6 +13,15 @@
#include "config.h"
#include <stdio.h>
#ifdef HAVE_STDLIB_H
@@ -37,7 +35,7 @@ extern int optind;
#include <sys/ioctl.h>
#endif
#ifdef HAVE_MALLOC_H
-#include <malloc.h>
+#include <stdlib.h>
#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
@@ -602,6 +600,24 @@ static int e2fsck_update_progress(e2fsck_t ctx, int pa
return 0;
}

View File

@ -0,0 +1,11 @@
--- lib/support/Makefile.in.orig 2021-01-29 05:51:02 UTC
+++ lib/support/Makefile.in
@@ -44,7 +44,7 @@ LIBDIR= support
@MAKEFILE_LIBRARY@
@MAKEFILE_PROFILE@
-COMPILE_ET= _ET_DIR_OVERRIDE=$(srcdir)/../et ../et/compile_et
+COMPILE_ET= /usr/bin/env _ET_DIR_OVERRIDE=$(srcdir)/../et ../et/compile_et
.c.o:
$(E) " CC $<"

View File

@ -1,6 +1,6 @@
--- misc/Makefile.in.orig 2020-01-06 23:10:17 UTC
--- misc/Makefile.in.orig 2021-01-29 05:51:02 UTC
+++ misc/Makefile.in
@@ -34,17 +34,17 @@ INSTALL = @INSTALL@
@@ -35,17 +35,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@
@@ -147,14 +147,14 @@ profiled:
@@ -148,14 +148,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 $@"
@@ -605,34 +605,9 @@ install: all $(SMANPAGES) $(UMANPAGES) installdirs
@@ -606,34 +606,9 @@ install: all $(SMANPAGES) $(UMANPAGES) installdirs
(cd $(DESTDIR)$(man5dir); \
$(LN) $(LINK_INSTALL_FLAGS) ext4.5 $$i.5); \
done

View File

@ -1,6 +1,6 @@
--- tests/Makefile.in.orig 2019-07-15 01:03:14 UTC
--- tests/Makefile.in.orig 2021-01-29 05:51:02 UTC
+++ tests/Makefile.in
@@ -16,7 +16,7 @@ all:: @DO_TEST_SUITE@ test_one test_script
@@ -17,7 +17,7 @@ all:: @DO_TEST_SUITE@ test_one test_script
test_one: $(srcdir)/test_one.in Makefile mke2fs.conf test_data.tmp
@echo "Creating test_one script..."
@[ -f test_one ] && chmod u+w test_one || true