[Midnightbsd-cvs] mports: mports/sysutils: Tools to manipulate ext 2/3/4 file systems.

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Fri May 30 15:35:40 EDT 2008


Log Message:
-----------
Tools to manipulate ext 2/3/4 file systems.  Oddly enough a dependancy for samba with some of the optional features enabled. (indirectly)

Modified Files:
--------------
    mports/sysutils:
        Makefile (r1.66 -> r1.67)

Added Files:
-----------
    mports/sysutils/e2fsprogs:
        Makefile (r1.1)
        distinfo (r1.1)
        pkg-descr (r1.1)
        pkg-message (r1.1)
        pkg-plist (r1.1)
    mports/sysutils/e2fsprogs/files:
        fsck_ext2fs.8 (r1.1)
        fsck_ext2fs.c (r1.1)
        patch-SIGINFO-e2fck_unix.c (r1.1)
        patch-configure (r1.1)
        patch-lib_ext2fs_ext2_fs.h (r1.1)
        patch-lib_ext2fs_tst_bitops.c (r1.1)
        patch-misc_Makefile.in (r1.1)
        patch-tdb.c (r1.1)

-------------- next part --------------
--- /dev/null
+++ sysutils/e2fsprogs/pkg-message
@@ -0,0 +1,7 @@
+===========================================================================
+
+Note: this is a modified version of the e2fsprogs package, not the official
+package. Report all building and run-time trouble that originates in the
+package to the port maintainer, <matthias.andree at gmx.de>.
+
+===========================================================================
--- /dev/null
+++ sysutils/e2fsprogs/pkg-descr
@@ -0,0 +1,3 @@
+Set of utilities and library to manipulate an ext2, ext3 or ext4 filesystem.
+
+WWW: http://e2fsprogs.sourceforge.net/
--- /dev/null
+++ sysutils/e2fsprogs/pkg-plist
@@ -0,0 +1,39 @@
+bin/chattr
+bin/lsattr
+ at unexec if cmp -s %D/etc/mke2fs.conf %D/etc/mke2fs.conf.dist ; then rm -f %D/etc/mke2fs.conf ; else echo "If and only if you are deleting e2fsprogs forever," ; echo "remember to delete %D/etc/mke2fs.conf." ; fi
+ at unexec if test -f %D/etc/e2fsck.conf ; then echo "If and only if you are deleting e2fsprogs forever," ; echo "remember to delete %D/etc/e2fsck.conf, too." ; fi
+etc/mke2fs.conf.dist
+ at exec test -f %D/etc/mke2fs.conf || cp -p %D/etc/mke2fs.conf.dist %D/etc/mke2fs.conf
+sbin/badblocks
+sbin/blkid
+sbin/debugfs
+sbin/dumpe2fs
+sbin/e2fsck
+sbin/e2image
+sbin/e2label
+sbin/findfs
+sbin/fsck.ext2
+sbin/fsck.ext3
+sbin/fsck_ext2fs
+ at exec ln -f %D/sbin/e2fsck /sbin 2>/dev/null || cp -p %D/sbin/e2fsck /sbin
+ at exec ln -f %D/sbin/fsck_ext2fs /sbin 2>/dev/null || cp -p %D/sbin/fsck_ext2fs /sbin
+ at unexec rm -f /sbin/fsck_ext2fs /sbin/e2fsck
+sbin/logsave
+sbin/mke2fs
+sbin/mkfs.ext2
+sbin/mkfs.ext3
+sbin/mklost+found
+sbin/resize2fs
+sbin/tune2fs
+%%NLS%%share/locale/ca/LC_MESSAGES/e2fsprogs.mo
+%%NLS%%share/locale/cs/LC_MESSAGES/e2fsprogs.mo
+%%NLS%%share/locale/de/LC_MESSAGES/e2fsprogs.mo
+%%NLS%%share/locale/es/LC_MESSAGES/e2fsprogs.mo
+%%NLS%%share/locale/fr/LC_MESSAGES/e2fsprogs.mo
+%%NLS%%share/locale/it/LC_MESSAGES/e2fsprogs.mo
+%%NLS%%share/locale/nl/LC_MESSAGES/e2fsprogs.mo
+%%NLS%%share/locale/pl/LC_MESSAGES/e2fsprogs.mo
+%%NLS%%share/locale/sv/LC_MESSAGES/e2fsprogs.mo
+%%NLS%%share/locale/tr/LC_MESSAGES/e2fsprogs.mo
+%%NLS%%share/locale/vi/LC_MESSAGES/e2fsprogs.mo
+%%NLS%%@unexec for i in ca cs de es fr it nl pl sv tr vi ; do rmdir -p %D/share/locale/$i/LC_MESSAGES 2>/dev/null || true ; done
--- /dev/null
+++ sysutils/e2fsprogs/Makefile
@@ -0,0 +1,118 @@
+# New ports collection makefile for:	e2fsprogs
+# Date created:				3 July 2001
+# Whom:					Maxim Sobolev <sobomax at FreeBSD.org>
+#
+# $MidnightBSD: mports/sysutils/e2fsprogs/Makefile,v 1.1 2008/05/30 19:35:38 laffer1 Exp $
+# $FreeBSD: ports/sysutils/e2fsprogs/Makefile,v 1.42 2008/04/29 11:09:27 miwi Exp $
+#
+
+PORTNAME=	e2fsprogs
+PORTVERSION=	1.40.9
+PORTREVISION?=	0
+CATEGORIES?=	sysutils
+MASTER_SITES=	${MASTER_SITE_SOURCEFORGE_EXTENDED}
+MASTER_SITE_SUBDIR=	${PORTNAME}
+
+MAINTAINER?=	ports at MidnightBSD.org
+COMMENT?=	Utilities & library to manipulate ext2/ext3/ext4 filesystems
+LICENSE=	agg
+
+PATCH_STRIP=	-p1
+USE_LDCONFIG=	yes
+GNU_CONFIGURE=	yes
+CONFIGURE_ARGS+=--disable-fsck --disable-e2initrd-helper \
+		--with-cc='${CC}' --with-linker='${LD}' \
+		--with-ccopts='${CFLAGS}' \
+		--with-root-prefix='${PREFIX}'
+# for unknown reasons, the assembly bitops cause SIGSEGV.
+# _EXT2_USE_C_VERSIONS_ uses C bitops, these appear to work fine.
+CONFIGURE_ENV+=	CPPFLAGS='${CPPFLAGS} -I${WRKSRC}/lib \
+		-I${LOCALBASE}/include -D_EXT2_USE_C_VERSIONS_'
+
+MAKE_ARGS+=	LDFLAGS='${LDFLAGS} -L${LOCALBASE}/lib'
+
+OPTIONS=	NLS "Enable national language support" on
+
+.if !defined(MASTERDIR)
+MAN1=	chattr.1 lsattr.1
+MAN5=	e2fsck.conf.5 mke2fs.conf.5
+MAN8=	badblocks.8 debugfs.8 dumpe2fs.8 e2fsck.8 e2image.8 e2label.8 \
+	mke2fs.8 mklost+found.8 resize2fs.8 tune2fs.8 \
+	fsck.ext2.8 fsck.ext3.8 mkfs.ext2.8 mkfs.ext3.8 \
+	findfs.8 blkid.8 logsave.8 fsck_ext2fs.8
+
+post-extract:
+	@${CHMOD} u+w ${WRKSRC}/po/*.po ${WRKSRC}/po/*.pot \
+		${WRKSRC}/${CONFIGURE_SCRIPT}
+.endif
+
+.include <bsd.port.pre.mk>
+
+.if defined(WITHOUT_NLS)
+CONFIGURE_ARGS+=--disable-nls
+PLIST_SUB=	NLS="@comment "
+.else
+USE_GETTEXT=	yes
+PLIST_SUB=	NLS=""
+.endif
+
+post-patch::
+	@${REINPLACE_CMD} -E -e \
+		's:\$$\(libdir\)/pkgconfig:${PREFIX}/libdata/pkgconfig:' \
+		${WRKSRC}/lib/*/Makefile.in
+# don't build/install libext2fs.info
+	@${REINPLACE_CMD} -e 's/ install-doc-libs$$//' ${WRKSRC}/Makefile.in
+
+.if ${MASTERDIR} == ${.CURDIR}
+post-build:
+# Relink e2fsck statically - We need to make sure that tools for the root file
+# system are statically linked against anything that is outside the root fs,
+# else we're in trouble if e2fsck is needed for boot:
+# (we don't use e2fsck.static, since we can link libc.so dynamically)
+	cd ${WRKSRC}/e2fsck && ${RM} -f e2fsck \
+		&& ${MAKE} e2fsck \
+		STATIC_LIBS="../lib/libext2fs.a ../lib/libcom_err.a \
+		../lib/libblkid.a  ../lib/libuuid.a" \
+		LIBINTL="${LOCALBASE}/lib/libintl.a ${LOCALBASE}/lib/libiconv.a"
+# Regression check: avoid a port (not upstream!) regression from 1.40.5,
+# check that e2fsck isn't dynalinked against anything but libc.so:
+	@${ECHO_CMD} -n "===>  checking that e2fsck depends on no shared objects beyond libc.so: "
+	@a="$$(ldd ${WRKSRC}/e2fsck/e2fsck 2>/dev/null \
+	    | ${GREP} -v 'not a dynamic executable' \
+	    | ${GREP} '=>' \
+	    | ${AWK}  '{print $$3;}' \
+	    | ${GREP} -v '^/lib/libc\.so\.' || :)"; \
+	if test "x$$a" = "x" ; then echo 'PASS' ; else \
+	    echo 'FAIL' ; echo '===>  e2fsck depends on:' ; echo "$$a" ; exit 1 ; fi
+# Update translation binary files
+.if !defined(WITHOUT_NLS)
+	cd ${WRKSRC}/po && ${MAKE} update-gmo
+.endif
+# Build fsck(8) wrapper
+	${CC} ${CPPFLAGS} ${CFLAGS} ${LDFLAGS} -s ${LIBS} \
+		-o ${WRKSRC}/fsck_ext2fs ${FILESDIR}/fsck_ext2fs.c
+# While the ${MAKE} check can take a minute on an end user's system, the
+# correctness of tools such as e2fsck is critical to the health of the
+# file systems.  The upstream is not using any *BSD as his development
+# system, and therefore let's exercise due diligence in running the self-
+# test on each and every system and not just package building hosts.
+# There have been subtle failures induced by Linux-isms in the past.
+# -- Matthias Andree, package maintainer, 2007-09-18
+	@${ECHO_CMD} '===>  Running e2fsprogs self-test suite'
+	cd ${WRKSRC}/tests && ${MAKE} check \
+	    || { head -n30000 ${WRKSRC}/tests/*.failed 2>/dev/null ; exit 1 ; }
+
+post-install:
+	${INSTALL_PROGRAM} ${WRKSRC}/fsck_ext2fs ${PREFIX}/sbin/
+	@: # stuff into /sbin since we might need e2fsck early on
+	${LN} ${PREFIX}/sbin/fsck_ext2fs /sbin/ 2>/dev/null || \
+		${INSTALL_PROGRAM} ${PREFIX}/sbin/fsck_ext2fs /sbin/
+	${LN} ${PREFIX}/sbin/e2fsck /sbin/ 2>/dev/null || \
+		${INSTALL_PROGRAM} ${PREFIX}/sbin/e2fsck /sbin/
+	${INSTALL_MAN} ${FILESDIR}/fsck_ext2fs.8 ${PREFIX}/man/man8/
+	[ -f ${PREFIX}/etc/mke2fs.conf ] || \
+		${CP} -p ${PREFIX}/etc/mke2fs.conf.dist \
+			${PREFIX}/etc/mke2fs.conf
+.endif
+
+.include <bsd.port.post.mk>
--- /dev/null
+++ sysutils/e2fsprogs/distinfo
@@ -0,0 +1,3 @@
+MD5 (e2fsprogs-1.40.9.tar.gz) = 3b785d2cbe374818ca3f89a5cdb6144f
+SHA256 (e2fsprogs-1.40.9.tar.gz) = ab6852230dcb30d75f640125a5d0c7b496bbc31502afdb76528e3bcd4089c9e4
+SIZE (e2fsprogs-1.40.9.tar.gz) = 4092812
Index: Makefile
===================================================================
RCS file: /home/cvs/mports/sysutils/Makefile,v
retrieving revision 1.66
retrieving revision 1.67
diff -L sysutils/Makefile -L sysutils/Makefile -u -r1.66 -r1.67
--- sysutils/Makefile
+++ sysutils/Makefile
@@ -16,6 +16,7 @@
     SUBDIR += dmidecode
     SUBDIR += dvd+rw-tools
     SUBDIR += dvdbackup
+    SUBDIR += e2fsprogs
     SUBDIR += etoile-behavior
     SUBDIR += etoile-installer
     SUBDIR += etoile-system
--- /dev/null
+++ sysutils/e2fsprogs/files/fsck_ext2fs.c
@@ -0,0 +1,147 @@
+/*
+ * fsck_ext2fs - wrapper for e2fsck on FreeBSD
+ * Copyright (C) 2004,2006 Matthias Andree <matthias.andree at gmx.de>
+ * redistributable in accordance with the
+ * GNU General Public License v2
+ *
+ * $FreeBSD: ports/sysutils/e2fsprogs/files/fsck_ext2fs.c,v 1.5 2006/07/04 15:47:51 leeym Exp $
+ *
+ * Upstream: $Id: fsck_ext2fs.c,v 1.6 2006/07/02 11:37:49 emma Exp $
+ *
+ * format: gindent -kr
+ */
+
+#include <sys/types.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <sys/wait.h>
+#include <sys/time.h>
+#include <sys/resource.h>
+#include <errno.h>
+
+__attribute__ ((noreturn))
+static int die(const char *tag)
+{
+	perror(tag);
+	exit(EXIT_FAILURE);
+}
+
+int main(int argc, char **argv)
+{
+	int ch, i = 1, force = 0, status, verbose = 0, t;
+	long block = 0;
+	enum { normal, preen, yes, no } mode = normal;
+	char *cmd[256];
+	pid_t pid;
+
+	cmd[0] = "/sbin/e2fsck";
+	while ((ch = getopt(argc, argv, "BFpfnyb:v")) != -1) {
+		switch (ch) {
+		case 'p':
+			mode = preen;
+			break;
+		case 'f':
+			force = 1;
+			break;
+		case 'n':
+			mode = no;
+			break;
+		case 'y':
+			mode = yes;
+			break;
+		case 'b':
+			block = atol(optarg);
+			break;
+		case 'v':
+			verbose++;
+			break;
+		case 'F':
+			/* e2fsck does not support background checking,
+			 * hence exit with nonzero status to force
+			 * the foreground check. */
+			exit(1);
+		case 'B':
+		default:
+			fprintf(stderr, "%s: unknown option -%c\n",
+				argv[0], optopt);
+			exit(EXIT_FAILURE);
+		}
+	}
+
+	if (force)
+		cmd[i++] = "-f";
+
+	switch (mode) {
+	case normal:
+		/* FreeBSD needs -f to force a check only in context
+		 * with -p -- so map normal to force to match
+		 * expectations */
+		if (!force)
+		    cmd[i++] = "-f";
+		break;
+	case yes:
+		cmd[i++] = "-y";
+		break;
+	case no:
+		cmd[i++] = "-n";
+		break;
+	case preen:
+		cmd[i++] = "-p";
+		break;
+	}
+
+	if (block) {
+		static char b[30];
+
+		sprintf(b, "-b %ld", block);
+		cmd[i++] = b;
+	}
+
+	/* silently limit verbose to 15 so we don't overflow the cmd array */
+	if (verbose > 15)
+	    verbose = 15;
+
+	for (t = verbose; t > 1; t--)
+	    cmd[i++] = "-v";
+
+	while (optind < argc) {
+		cmd[i++] = argv[optind++];
+		/* sanity check so we don't overflow the cmd buffer */
+		if (i+1 == sizeof(cmd)/sizeof(cmd[0])) {
+		    errno = E2BIG;
+		    die(argv[0]);
+		}
+	}
+
+	cmd[i++] = 0;
+
+	if (verbose) {
+		for (i=0; cmd[i]; i++)
+			fputs(cmd[i], stderr),
+			fputc(' ', stderr);
+		fputc('\n', stderr);
+	}
+
+	pid = fork();
+	switch (pid) {
+	case -1:
+		/* error */
+		die("fork");
+		break;
+	case 0:
+		/* child */
+		(void) execv(cmd[0], cmd);
+		perror("execve");
+		_exit(127);
+	default:
+		/* parent */
+		if (pid != waitpid(pid, &status, 0))
+			die("waitpid");
+		if (WIFSIGNALED(status)
+		    || (WIFEXITED(status) && WEXITSTATUS(status) >= 4))
+			exit(EXIT_FAILURE);
+	}
+	exit(EXIT_SUCCESS);
+}
--- /dev/null
+++ sysutils/e2fsprogs/files/patch-SIGINFO-e2fck_unix.c
@@ -0,0 +1,54 @@
+--- a/e2fsck/unix.c.orig	2008-04-23 20:56:25.000000000 +0200
++++ b/e2fsck/unix.c	2008-04-29 09:05:01.000000000 +0200
+@@ -462,6 +462,24 @@
+ 	return 0;
+ }
+ 
++static int e2fsck_progress_once(e2fsck_t ctx, int pass, unsigned long cur, unsigned long max)
++{
++	char buf[80];
++	float percent;
++
++	if (pass == 0)
++		return 0;
++	
++	percent = calc_percent(&e2fsck_tbl, pass, cur, max);
++	e2fsck_simple_progress(ctx, ctx->device_name,
++			percent, 0);
++
++	printf("\n");
++	ctx->progress = 0;
++	return 0;
++}
++
++
+ #define PATH_SET "PATH=/sbin"
+ 
+ static void reserve_stdio_fds(void)
+@@ -493,6 +511,17 @@
+ 	ctx->progress = e2fsck_update_progress;
+ }
+ 
++static void signal_progress_now(int sig EXT2FS_ATTR((unused)))
++{
++	e2fsck_t ctx = e2fsck_global_ctx;
++
++	if (!ctx)
++		return;
++
++	ctx->progress = e2fsck_progress_once;
++	ctx->progress_fd = 0;
++}
++
+ static void signal_progress_off(int sig EXT2FS_ATTR((unused)))
+ {
+ 	e2fsck_t ctx = e2fsck_global_ctx;
+@@ -830,6 +859,8 @@
+ 	sigaction(SIGUSR1, &sa, 0);
+ 	sa.sa_handler = signal_progress_off;
+ 	sigaction(SIGUSR2, &sa, 0);
++	sa.sa_handler = signal_progress_now;
++	sigaction(SIGINFO, &sa, 0);
+ #endif
+ 
+ 	/* Update our PATH to include /sbin if we need to run badblocks  */
--- /dev/null
+++ sysutils/e2fsprogs/files/fsck_ext2fs.8
@@ -0,0 +1,96 @@
+.TH fsck_ext2fs 8 2006-07-02 "Matthias Andree" "FreeBSD Ports"
+.\"
+.\" fsck_ext2fs.8 - manual page for fsck_ext2fs wrapper
+.\"
+.\" (C) Copyright 2006 by Matthias Andree <matthias.andree at gmx.de>
+.\"
+.\" License: This file may be redistributed in accordance with the terms
+.\" of the GNU General Public License v2.
+.\"
+.\" Upstream $Id: fsck_ext2fs.8,v 1.3 2006/07/02 11:45:21 emma Exp $
+.\" $FreeBSD: ports/sysutils/e2fsprogs/files/fsck_ext2fs.8,v 1.1 2006/07/04 15:47:51 leeym Exp $
+.\"
+.SH NAME
+.B fsck_ext2fs
+\- compatibility wrapper for e2fsck
+.SH SYNOPSIS
+.P
+.B fsck_ext2fs
+[\fB\-Fpfnyv\fR] [\fB\-b\fR \fIblock\fR]
+.SH DESCRIPTION
+.P
+\fBfsck_ext2fs\fR maps the traditional FreeBSD \fBfsck_ffs\fR options to
+options with the same functionality for \fBe2fsck,\fR runs \fBe2fsck\fR
+and then maps its exit status to values that FreeBSD understands.
+\fBe2fsck\fR is a utility to check and repair ext2 and ext3 file
+systems.
+
+.SH OPTIONS
+.IP \fB\-F\fR
+(check foreground mode required) Immediately exits with status 1 to tell
+\fBfsck\fR that ext2fs cannot be checked in the background. \fBfsck\fR
+usually runs \fBfsck_*\fR programs twice, first with \fB\-F\fR to find
+out if they can do background checking, then either immediately without
+\fB\-F\fR for foreground checking or deferred in the background with
+\fB\-B\fR.
+.IP \fB\-p\fR
+(preen mode) This option suppresses adding the \fB\-f\fR option (unless
+\fB\-f\fR is also given) and adds the \fB\-p\fR option to the
+\fBe2fsck\fR command line. This causes \fBe2fsck\fR to automatically fix
+any filesystem problems that can safely be fixed without operator
+intervention. Without this option given, \fBe2fsck\fR will be run with
+the \fB\-f\fR option to force a check, since interactive scan and repair
+mode is the default on FreeBSD, but not on Linux where \fBe2fsck\fR
+comes from.
+.IP \fB\-f\fR
+(force check) This option forces the check of a clean file system while
+preening and is passed to \fBe2fsck\fR verbatim.
+.IP \fB\-n\fR
+("no" mode) This option causes the file system to be opened in read-only
+mode and assume "no" as answer to all questions. This is the only way to
+safely run \fBfsck\fR on a mounted ext2 or ext3 file system. This option
+is passed to \fBe2fsck\fR verbatim.
+.IP \fB\-y\fR
+("yes" mode) This option is passed verbatim to \fBe2fsck\fR and causes
+it to assume "yes" as answer to all questions. This allows the
+non-interactive use of e2fsck but is rather aggressive. Use with care.
+.IP \fB\-v\fR
+(verbose output) This option is passed verbatim to \fBe2fsck\fR and
+causes it to verbosely report its progress.
+.IP "\fB\-b\fR \fIblock\fR"
+(use alternate super block) This option is passed verbatim to
+\fBe2fsck\fR and selects an alternate super block, for use when the
+primary super block has been damaged. Please see the \fBe2fsck\fR(8)
+manual page for details.
+
+.SH EXIT STATUS
+If errors remain after \fBe2fsck\fR, an invalid option or too many
+options have been specified, \fBe2fsck\fR was killed with a signal or
+the \fIfork\fB system call failed, \fBfsck_ext2fs\fR exits with status
+EXIT_FAILURE (usually 1). If \fBe2fsck\fR cannot be started, exits with
+status 127. If the file system is clean after \fBe2fsck\fR operation,
+exits with status EXIT_SUCCESS (0).
+
+.SH NOTES
+.P
+This utility is merely meant as an adaptor so that \fBe2fsck\fR can be
+run during the boot process, it does not support all options that
+\fBe2fsck\fR offers. If you need one of its advanced options, please run
+\fBe2fsck\fR directly.
+
+.SH FILES
+.TP
+.I /sbin/e2fsck
+is the location of the \fBe2fsck\fR program to run.
+
+.SH AUTHOR
+.P
+Matthias Andree <matthias.andree at gmx.de> wrote the program and this
+manual page.
+.SH CONFORMING TO
+The FreeBSD 6.1 command line interface for \fBfsck_ufs\fR(8).
+.SH SEE ALSO
+.BR fsck (8),
+.BR e2fsck (8)
+and
+.BR fsck_ufs (8).
--- /dev/null
+++ sysutils/e2fsprogs/files/patch-lib_ext2fs_tst_bitops.c
@@ -0,0 +1,12 @@
+diff -r 4decffc5e9a3 lib/ext2fs/tst_bitops.c
+--- a/lib/ext2fs/tst_bitops.c	Tue May 30 16:29:49 2006 +0200
++++ b/lib/ext2fs/tst_bitops.c	Thu Jun 08 15:28:11 2006 +0200
+@@ -103,7 +103,7 @@ main(int argc, char **argv)
+ 	bigarray = malloc(1 << 29);
+ 	if (!bigarray) {
+ 		fprintf(stderr, "Failed to allocate scratch memory!\n");
+-		exit(1);
++		exit(0);
+ 	}
+ 
+         bigarray[BIG_TEST_BIT >> 3] = 0;
--- /dev/null
+++ sysutils/e2fsprogs/files/patch-misc_Makefile.in
@@ -0,0 +1,34 @@
+--- a/misc/Makefile.in.orig	Tue Jan  1 04:35:42 2008
++++ b/misc/Makefile.in	Sun Jan 13 10:46:31 2008
+@@ -19,14 +19,14 @@
+ 
+ SPROGS=		mke2fs badblocks tune2fs dumpe2fs blkid logsave \
+ 			$(E2IMAGE_PROG) @FSCK_PROG@
+-USPROGS=	mklost+found filefrag $(UUIDD_PROG)
++USPROGS=	mklost+found
+ SMANPAGES=	tune2fs.8 mklost+found.8 mke2fs.8 dumpe2fs.8 badblocks.8 \
+ 			e2label.8 findfs.8 blkid.8 $(E2IMAGE_MAN) \
+-			logsave.8 filefrag.8 $(UUIDD_MAN) @FSCK_MAN@
++			logsave.8 @FSCK_MAN@
+ FMANPAGES=	mke2fs.conf.5
+ 
+-UPROGS=		chattr lsattr uuidgen
+-UMANPAGES=	chattr.1 lsattr.1 uuidgen.1
++UPROGS=		chattr lsattr
++UMANPAGES=	chattr.1 lsattr.1
+ 
+ LPROGS=		@E2INITRD_PROG@
+ 
+@@ -315,11 +314,9 @@
+ 		echo "	INSTALL_DATA $(man5dir)/$$i"; \
+ 		$(INSTALL_DATA) $$i $(DESTDIR)$(man5dir)/$$i; \
+ 	done
+-	@if ! test -f $(DESTDIR)$(root_sysconfdir)/mke2fs.conf; then \
+ 		echo "	INSTALL_DATA $(root_sysconfdir)/mke2fs.conf"; \
+ 		$(INSTALL_DATA) $(srcdir)/mke2fs.conf \
+-			$(DESTDIR)$(root_sysconfdir)/mke2fs.conf; \
+-	fi
++			$(DESTDIR)$(root_sysconfdir)/mke2fs.conf.dist; \
+ 
+ install-strip: install
+ 	@for i in $(SPROGS); do \
--- /dev/null
+++ sysutils/e2fsprogs/files/patch-configure
@@ -0,0 +1,11 @@
+--- a/configure.orig	Thu Jun  8 15:30:16 2006
++++ b/configure	Thu Jun  8 15:30:34 2006
+@@ -9045,7 +9045,7 @@
+ 
+ 
+ 
+-for ac_header in argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
++for ac_header in argz.h limits.h locale.h nl_types.h stddef.h \
+ stdlib.h string.h unistd.h sys/param.h
+ do
+ as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
--- /dev/null
+++ sysutils/e2fsprogs/files/patch-lib_ext2fs_ext2_fs.h
@@ -0,0 +1,11 @@
+--- a/lib/ext2fs/ext2_fs.h.orig	Sat Jun 30 16:36:37 2007
++++ b/lib/ext2fs/ext2_fs.h	Sat Jun 30 16:36:43 2007
+@@ -418,7 +418,7 @@
+ 
+ #define i_size_high	i_dir_acl
+ 
+-#if defined(__KERNEL__) || defined(__linux__)
++#if defined(__KERNEL__) || defined(__linux__) || defined(__FreeBSD__)
+ #define i_reserved1	osd1.linux1.l_i_reserved1
+ #define i_frag		osd2.linux2.l_i_frag
+ #define i_fsize		osd2.linux2.l_i_fsize
--- /dev/null
+++ sysutils/e2fsprogs/files/patch-tdb.c
@@ -0,0 +1,10 @@
+--- a/lib/ext2fs/tdb.c.orig	Thu Apr  5 02:43:05 2007
++++ b/lib/ext2fs/tdb.c	Sat Jun 30 16:13:15 2007
+@@ -36,7 +36,6 @@
+ #define HAVE_UTIME_H
+ #define HAVE_UTIME
+ #endif
+-#define _XOPEN_SOURCE 500
+ 
+ #include <unistd.h>
+ #include <stdio.h>


More information about the Midnightbsd-cvs mailing list