1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-18 19:49:40 +00:00

sysutils/e2fsprogs-core: clean up a bit, drop coreutils depends

Patch a test script to work around BSD dd's missing oconv=append,
and do away with coreutils as a build requisite.

Move some REINPLACE_CMD features to individual patches that I
intend to send upstream for inclusion, and remove others that
are now no longer required.

This should only affect the build and self-test phases,
and not change package content, so not bumping PORTREVISION.
This commit is contained in:
Matthias Andree 2023-02-09 21:50:14 +01:00
parent e0f318708a
commit 2cf20a89ee
3 changed files with 30 additions and 7 deletions

View File

@ -36,7 +36,6 @@ CONFIGURE_ARGS?=--disable-fsck \
--libdir='${PREFIX}/lib/e2fsprogs/' \
--includedir='${PREFIX}/include/e2fsprogs/' \
--with-root-prefix='${PREFIX}' \
DD=${LOCALBASE}/bin/gdd \
LDFLAGS='${LDFLAGS} -L${LOCALBASE}/lib -Wl,--rpath -Wl,${LOCALBASE}/lib/e2fsprogs'
CONFIGURE_ENV?= LIBS='-Wl,--as-needed ${LIBS} -lexecinfo -lelf'
# apparently HAVE_PTHREAD_H checks go missing if the FUSEFS option is unset, force it:
@ -74,7 +73,6 @@ FUSEFS_USES= fuse
NLS_USES= gettext iconv:build
BUILD_DEPENDS+= gdd:sysutils/coreutils
BASHTESTS_BUILD_DEPENDS= ${BASH_CMD}:shells/bash
BASH_CMD= ${LOCALBASE}/bin/bash
@ -136,13 +134,8 @@ libintl=
EXTRA_PATCHES+= ${FILESDIR}/extrapatch-no-sbrk
.endif
# d_fallocate_blkmap appears to fail on some systems for unknown reasons.
# m_offset sometimes failes, a make clean and re-build usually fixes this. Reason unknown.
post-patch::
.if !empty(DISTFILES)
@${REINPLACE_CMD} -E -e 's/md5sum ([^ ]*)/printf "%s %s\\n" $$(md5 -q \1) \1/' \
-e "s/ == 0/ = 0/" -e "s/tar x$$/tar xf -/" -e "s/\<dd\>/gdd/" \
${WRKSRC}/tests/[a-z]_*/script
@${REINPLACE_CMD} -e 's/<malloc\.h>/<stdlib.h>/' ${WRKSRC}/*/*.c
@${REINPLACE_CMD} -e 's,/etc/blkid.tab,${ETCDIR}/blkid.tab,' ${WRKSRC}/misc/blkid* ${WRKSRC}/lib/blkid/blkidP.h
@${REINPLACE_CMD} -E -e 's/__GNUC_PREREQ\>/__GNUC_PREREQ__/' ${WRKSRC}/*/*/*.[ch] ${WRKSRC}/*/*.c

View File

@ -0,0 +1,11 @@
--- tests/f_detect_junk/script.orig 2023-02-07 03:31:53 UTC
+++ tests/f_detect_junk/script
@@ -9,7 +9,7 @@ FSCK_OPT=-fn
IMAGE=$test_dir/image.bz2
bzip2 -d < $IMAGE > $TMPFILE
-$DD if=/dev/zero of=$TMPFILE conv=notrunc oflag=append bs=1024k count=16 > /dev/null 2>&1
+$DD if=/dev/zero of=$TMPFILE conv=notrunc bs=1024k count=16 2>/dev/null >>$TMPFILE
# Run fsck to fix things?
if [ -x $DEBUGFS_EXE ]; then

View File

@ -0,0 +1,19 @@
--- tests/t_mmp_fail/script.orig 2023-02-07 03:31:53 UTC
+++ tests/t_mmp_fail/script
@@ -10,14 +10,14 @@ fi
$TUNE2FS -O project $TMPFILE >> $test_name.log 2>&1
status=$?
-if [ "$status" == 0 ] ; then
+if [ "$status" = 0 ] ; then
echo "'tune2fs -O project' succeeded on small inode" > $test_name.failed
echo "$test_name: $test_description: failed"
return 1
fi
$TUNE2FS -o bad_option $TMPFILE >> $test_name.log 2>&1
status=$?
-if [ "$status" == 0 ] ; then
+if [ "$status" = 0 ] ; then
echo "'tune2fs -o bad_option' succeeded" > $test_name.failed
echo "$test_name: $test_description: failed"
return 1