. Update to 1.35.w20040131.
. Make the submitter the maintainer. . Run test suite as part of the build. . Support -DDISABLE_NLS to compile without gettext. . Add a fsck_ext2fs wrapper that interfaces between fsck and e2fsck. PR: 62563 Submitted by: Matthias Andree <matthias.andree@gmx.de>
This commit is contained in:
parent
ad8522a92e
commit
107f89ae5c
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=101545
@ -6,43 +6,91 @@
|
||||
#
|
||||
|
||||
PORTNAME= e2fsprogs
|
||||
PORTVERSION= 1.32
|
||||
PORTREVISION= 1
|
||||
PORTVERSION= 1.35.w20040131
|
||||
CATEGORIES= sysutils
|
||||
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
|
||||
MASTER_SITE_SUBDIR= ${PORTNAME}
|
||||
DISTNAME= ${PORTNAME}-1.35-WIP-0131
|
||||
|
||||
MAINTAINER= ports@FreeBSD.org
|
||||
COMMENT= A set of utilities and library to manipulate an ext2 filesystem
|
||||
MAINTAINER= matthias.andree@gmx.de
|
||||
COMMENT= Utilities and library to manipulate an ext2 or ext3 filesystem
|
||||
|
||||
.if !defined(DISABLE_NLS)
|
||||
USE_GETTEXT= yes
|
||||
.endif
|
||||
|
||||
WRKSRC= ${WRKDIR}/${PORTNAME}-1.35
|
||||
|
||||
USE_GCC= 3.3
|
||||
PATCH_STRIP= -p1
|
||||
USE_REINPLACE= yes
|
||||
USE_GMAKE= yes
|
||||
INSTALLS_SHLIB= yes
|
||||
NO_FILTER_SHLIBS= yes
|
||||
GNU_CONFIGURE= yes
|
||||
CONFIGURE_ARGS= --enable-elf-shlibs
|
||||
CONFIGURE_ENV= CPPFLAGS="-Derrcode_t=long"
|
||||
CONFIGURE_ARGS= --enable-elf-shlibs --disable-fsck "--with-ldopts=-L${LOCALBASE}/lib"
|
||||
CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include"
|
||||
.if defined(DISABLE_NLS)
|
||||
CONFIGURE_ARGS+= --disable-nls
|
||||
PLIST_SUB= NLS="@comment "
|
||||
.else
|
||||
MAKE_ARGS+= STATIC_LIBS="../lib/libext2fs.a ../lib/libcom_err.a ../lib/libblkid.a ../lib/libuuid.a ${LOCALBASE}/lib/libintl.a ${LOCALBASE}/lib/libiconv.a"
|
||||
PLIST_SUB= NLS=""
|
||||
.endif
|
||||
|
||||
CONFLICTS= ossp-uuid-*
|
||||
|
||||
PKGMESSAGE= ${WRKDIR}/pkg-message
|
||||
|
||||
MAN1= chattr.1 lsattr.1 uuidgen.1
|
||||
MAN8= badblocks.8 debugfs.8 dumpe2fs.8 e2fsck.8 e2image.8 e2label.8 fsck.8 \
|
||||
findfs.8 mke2fs.8 mklost+found.8 resize2fs.8 tune2fs.8 \
|
||||
fsck.ext2.8 fsck.ext3.8 mkfs.ext2.8 mkfs.ext3.8
|
||||
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
|
||||
|
||||
pre-everything::
|
||||
@${ECHO_CMD} "-------------------------------------------------------------"
|
||||
.if defined(DISABLE_NLS)
|
||||
@${ECHO_CMD} "National language support disabled, -DDISABLE_NLS in effect. "
|
||||
.else
|
||||
@${ECHO_CMD} "Use -DDISABLE_NLS to build without national language support."
|
||||
.endif
|
||||
@${ECHO_CMD} "-------------------------------------------------------------"
|
||||
|
||||
post-extract:
|
||||
${CHMOD} u+w ${WRKSRC}/po/*.po ${WRKSRC}/po/*.pot
|
||||
|
||||
post-patch:
|
||||
@${FIND} ${WRKSRC} -name "*.[ch]" | ${XARGS} ${CHMOD} 644
|
||||
@${FIND} ${WRKSRC} -name "*.[ch]" | ${XARGS} ${REINPLACE_CMD} -e \
|
||||
's|LIST_HEAD|LIN_LST_HEAD|g ; \
|
||||
s|et/com_err.h|com_err.h|g ; s|<malloc.h>|<stdlib.h>|'
|
||||
${REINPLACE_CMD} -e 's|-DRESOURCE_TRACK||' ${WRKSRC}/e2fsck/Makefile.in
|
||||
${GUNZIP_CMD} ${WRKSRC}/tests/m_*/expect*.gz
|
||||
${REINPLACE_CMD} -e 's|OS type: Linux|OS type: (unknown os)|' \
|
||||
-e 's|Filesystem OS type: Linux|Filesystem OS type: unknown|' \
|
||||
-e 's|group root|group wheel|' \
|
||||
-e '/Exit status is 0/ N;s/Exit status is 0\n/Exit status is 0/' \
|
||||
${WRKSRC}/tests/m_*/expect.1
|
||||
|
||||
pre-build:
|
||||
@cd ${WRKSRC}/lib/et && ${GMAKE}
|
||||
@cd ${WRKSRC}/lib/ss && ${GMAKE}
|
||||
post-configure:
|
||||
@${CAT} ${FILESDIR}/pkg-message.in | ${SED} -e "s:%%PREFIX%%:${PREFIX}:" > ${PKGMESSAGE}
|
||||
|
||||
post-build:
|
||||
cd ${WRKSRC}/tests && ${GMAKE} check
|
||||
${CC} ${CPPFLAGS} ${CFLAGS} ${LDFLAGS} ${LIBS} -o ${WRKSRC}/fsck_ext2fs ${FILESDIR}/fsck_ext2fs.c
|
||||
|
||||
post-install:
|
||||
@${MKDIR} ${PREFIX}/include/ext2fs
|
||||
@${INSTALL_DATA} ${WRKSRC}/lib/ext2fs/*.h ${PREFIX}/include/ext2fs
|
||||
@${MKDIR} ${PREFIX}/include/uuid
|
||||
@${INSTALL_DATA} ${WRKSRC}/lib/uuid/*.h ${PREFIX}/include/uuid
|
||||
${RM} ${PREFIX}/sbin/filefrag
|
||||
${RM} ${PREFIX}/man/man8/filefrag.8
|
||||
${INSTALL_PROGRAM} ${WRKSRC}/fsck_ext2fs ${PREFIX}/sbin/
|
||||
${INSTALL_PROGRAM} ${WRKSRC}/e2fsck/e2fsck.shared ${PREFIX}/sbin/e2fsck
|
||||
${INSTALL_PROGRAM} ${WRKSRC}/e2fsck/e2fsck.static ${PREFIX}/sbin/e2fsck.static
|
||||
${MKDIR} ${PREFIX}/include/ext2fs
|
||||
${INSTALL_DATA} ${WRKSRC}/lib/ext2fs/*.h ${PREFIX}/include/ext2fs/
|
||||
${MKDIR} ${PREFIX}/include/uuid
|
||||
${INSTALL_DATA} ${WRKSRC}/lib/uuid/*.h ${PREFIX}/include/uuid/
|
||||
.for i in e2p ext2fs uuid
|
||||
${INSTALL_DATA} ${WRKSRC}/lib/${i}/lib${i}.a ${PREFIX}/lib/
|
||||
.endfor
|
||||
@${ECHO_MSG}
|
||||
@${CAT} ${PKGMESSAGE}
|
||||
@${ECHO_MSG}
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
@ -1,2 +1,2 @@
|
||||
MD5 (e2fsprogs-1.32.tar.gz) = a7ced9d6edaba3a000ccc5200e09b90d
|
||||
SIZE (e2fsprogs-1.32.tar.gz) = 2894603
|
||||
MD5 (e2fsprogs-1.35-WIP-0131.tar.gz) = eccc46cd55d8295d686cf5ac6bbc3784
|
||||
SIZE (e2fsprogs-1.35-WIP-0131.tar.gz) = 3123309
|
||||
|
81
sysutils/e2fsprogs/files/fsck_ext2fs.c
Normal file
81
sysutils/e2fsprogs/files/fsck_ext2fs.c
Normal file
@ -0,0 +1,81 @@
|
||||
/*
|
||||
* fsck_ext2fs - wrapper for e2fsck on FreeBSD
|
||||
* Copyright (C) 2004 Matthias Andree
|
||||
* redistributable in accordance with the
|
||||
* GNU General Public License v2
|
||||
*
|
||||
* $FreeBSD$
|
||||
*
|
||||
* format: gindent -kr
|
||||
*/
|
||||
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
int ch, i = 1, force = 0;
|
||||
long block = 0;
|
||||
enum { normal, preen, yes, no } mode = normal;
|
||||
char *cmd[256];
|
||||
|
||||
cmd[0] = "/sbin/e2fsck";
|
||||
while ((ch = getopt(argc, argv, "BFpfnyb:")) != -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 'B':
|
||||
case 'F':
|
||||
default:
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
|
||||
if (force)
|
||||
cmd[i++] = "-f";
|
||||
|
||||
switch (mode) {
|
||||
case normal:
|
||||
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;
|
||||
}
|
||||
|
||||
while (optind < argc)
|
||||
cmd[i++] = argv[optind++];
|
||||
|
||||
cmd[i++] = 0;
|
||||
|
||||
(void)execv(cmd[0], cmd);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
@ -1,12 +0,0 @@
|
||||
$FreeBSD$
|
||||
|
||||
--- MCONFIG.in.orig Thu Oct 31 00:49:21 2002
|
||||
+++ MCONFIG.in Wed Aug 27 20:00:17 2003
|
||||
@@ -64 +64 @@
|
||||
-LIBCOM_ERR = $(LIB)/libcom_err@LIB_EXT@
|
||||
+LIBCOM_ERR = /usr/lib/libcom_err.so
|
||||
@@ -70,2 +70,2 @@
|
||||
-STATIC_LIBSS = $(LIB)/libss@STATIC_LIB_EXT@
|
||||
-STATIC_LIBCOM_ERR = $(LIB)/libcom_err@STATIC_LIB_EXT@
|
||||
+STATIC_LIBSS = STATIC_LIBSS = $(LIB)/libss@STATIC_LIB_EXT@
|
||||
+STATIC_LIBCOM_ERR = /usr/lib/libcom_err.a
|
@ -1,7 +0,0 @@
|
||||
$FreeBSD$
|
||||
|
||||
--- Makefile.in.orig Wed Jul 23 06:08:04 2003
|
||||
+++ Makefile.in Wed Aug 27 10:52:04 2003
|
||||
@@ -14 +14 @@
|
||||
-LIB_SUBDIRS=lib/et lib/ss lib/e2p lib/ext2fs lib/uuid lib/blkid intl
|
||||
+LIB_SUBDIRS= lib/e2p lib/ext2fs lib/uuid lib/blkid intl
|
@ -1,17 +0,0 @@
|
||||
|
||||
$FreeBSD$
|
||||
|
||||
--- debugfs/Makefile.in.orig Sat Jun 23 07:25:59 2001
|
||||
+++ debugfs/Makefile.in Tue Jul 3 18:49:18 2001
|
||||
@@ -75,9 +75,9 @@
|
||||
# the Makefile.in file
|
||||
#
|
||||
debug_cmds.o: debug_cmds.c $(top_srcdir)/lib/ss/ss.h \
|
||||
- $(top_builddir)/lib/ss/ss_err.h
|
||||
+
|
||||
debugfs.o: $(srcdir)/debugfs.c $(top_srcdir)/lib/et/com_err.h \
|
||||
- $(top_srcdir)/lib/ss/ss.h $(top_builddir)/lib/ss/ss_err.h \
|
||||
+ $(top_srcdir)/lib/ss/ss.h \
|
||||
$(srcdir)/debugfs.h $(top_srcdir)/lib/ext2fs/ext2_fs.h \
|
||||
$(top_builddir)/lib/ext2fs/ext2_types.h $(top_srcdir)/lib/ext2fs/ext2fs.h \
|
||||
$(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
|
@ -1,14 +0,0 @@
|
||||
|
||||
$FreeBSD$
|
||||
|
||||
--- e2fsck/journal.c 2001/07/03 14:35:01 1.1
|
||||
+++ e2fsck/journal.c 2001/07/03 14:35:13
|
||||
@@ -13,6 +13,8 @@
|
||||
*/
|
||||
|
||||
#ifdef HAVE_SYS_MOUNT_H
|
||||
+#include <sys/param.h>
|
||||
+#include <sys/types.h>
|
||||
#include <sys/mount.h>
|
||||
#define MNT_FL (MS_MGC_VAL | MS_RDONLY)
|
||||
#endif
|
30
sysutils/e2fsprogs/files/patch-ext2fs_e2fsck.c
Normal file
30
sysutils/e2fsprogs/files/patch-ext2fs_e2fsck.c
Normal file
@ -0,0 +1,30 @@
|
||||
$FreeBSD$
|
||||
|
||||
# This is a BitKeeper generated diff -Nru style patch.
|
||||
#
|
||||
# ChangeSet
|
||||
# 2004/02/03 03:22:19+01:00 matthias.andree@gmx.de
|
||||
# e2fsck.c:
|
||||
# Add missing ctx->flags &= ~E2F_FLAG_SETJMP_OK; when
|
||||
# returning after setjmp returned true (i. e. from longjmp).
|
||||
#
|
||||
# e2fsck/e2fsck.c
|
||||
# 2004/02/03 03:16:40+01:00 matthias.andree@gmx.de +3 -1
|
||||
# Add missing ctx->flags &= ~E2F_FLAG_SETJMP_OK; when
|
||||
# returning after setjmp returned true (i. e. from longjmp).
|
||||
#
|
||||
diff -Nru a/e2fsck/e2fsck.c b/e2fsck/e2fsck.c
|
||||
--- a/e2fsck/e2fsck.c Tue Feb 3 03:23:50 2004
|
||||
+++ b/e2fsck/e2fsck.c Tue Feb 3 03:23:50 2004
|
||||
@@ -180,8 +180,10 @@
|
||||
pass_t e2fsck_pass;
|
||||
|
||||
#ifdef HAVE_SETJMP_H
|
||||
- if (setjmp(ctx->abort_loc))
|
||||
+ if (setjmp(ctx->abort_loc)) {
|
||||
+ ctx->flags &= ~E2F_FLAG_SETJMP_OK;
|
||||
return (ctx->flags & E2F_FLAG_RUN_RETURN);
|
||||
+ }
|
||||
ctx->flags |= E2F_FLAG_SETJMP_OK;
|
||||
#endif
|
||||
|
@ -1,10 +0,0 @@
|
||||
$FreeBSD: /tmp/pcvs/ports/sysutils/e2fsprogs/files/Attic/patch-intl::Makefile.in,v 1.1 2004-02-18 11:07:12 eik Exp $
|
||||
|
||||
--- intl/Makefile.in.orig Sun Feb 24 13:03:59 2002
|
||||
+++ intl/Makefile.in Sun Aug 31 02:58:10 2003
|
||||
@@ -142,4 +142,5 @@
|
||||
# Define this as empty until I found a useful application.
|
||||
installcheck:
|
||||
+install-shlibs:
|
||||
|
||||
uninstall:
|
@ -1,22 +0,0 @@
|
||||
|
||||
$FreeBSD$
|
||||
|
||||
--- lib/Makefile.elf-lib.orig Sat Jun 23 07:25:59 2001
|
||||
+++ lib/Makefile.elf-lib Tue Jul 3 18:57:04 2001
|
||||
@@ -39,13 +39,12 @@
|
||||
installdirs:: installdirs-elf-lib
|
||||
|
||||
install-shlibs install:: $(ELF_LIB) installdirs-elf-lib
|
||||
- $(INSTALL_PROGRAM) $(ELF_LIB) $(DESTDIR)$(ELF_INSTALL_DIR)/$(ELF_LIB)
|
||||
+ $(INSTALL_PROGRAM) $(ELF_LIB) $(DESTDIR)$(ELF_INSTALL_DIR)/$(ELF_SONAME)
|
||||
+ $(INSTALL_DATA) $(ELF_IMAGE).a $(DESTDIR)$(ELF_INSTALL_DIR)/
|
||||
$(STRIP) --strip-debug \
|
||||
- $(DESTDIR)$(ELF_INSTALL_DIR)/$(ELF_LIB)
|
||||
- $(LN_S) -f $(ELF_LIB) $(DESTDIR)$(ELF_INSTALL_DIR)/$(ELF_SONAME)
|
||||
+ $(DESTDIR)$(ELF_INSTALL_DIR)/$(ELF_SONAME)
|
||||
$(LN_S) -f $(ELF_INSTALL_DIR)/$(ELF_SONAME) \
|
||||
$(DESTDIR)$(libdir)/$(ELF_IMAGE).so
|
||||
- -$(LDCONFIG)
|
||||
|
||||
uninstall-shlibs uninstall::
|
||||
$(RM) -f $(DESTDIR)$(ELF_INSTALL_DIR)/$(ELF_LIB) \
|
@ -1,5 +0,0 @@
|
||||
--- lib/ext2fs/Makefile.in.orig Wed Jul 23 06:53:05 2003
|
||||
+++ lib/ext2fs/Makefile.in Thu Aug 28 09:58:57 2003
|
||||
@@ -173 +173 @@
|
||||
-COMPILE_ET=../et/compile_et --build-tree
|
||||
+COMPILE_ET=compile_et
|
@ -1,13 +0,0 @@
|
||||
|
||||
$FreeBSD$
|
||||
|
||||
--- lib/ext2fs/flushb.c 2001/07/03 14:28:59 1.1
|
||||
+++ lib/ext2fs/flushb.c 2001/07/03 14:30:57
|
||||
@@ -21,6 +21,7 @@
|
||||
#include <sys/ioctl.h>
|
||||
#endif
|
||||
#if HAVE_SYS_MOUNT_H
|
||||
+#include <sys/param.h>
|
||||
#include <sys/mount.h> /* This may define BLKFLSBUF */
|
||||
#endif
|
||||
|
@ -1,7 +0,0 @@
|
||||
$FreeBSD$
|
||||
|
||||
--- e2fsck/pass1.c.orig Wed Aug 27 19:59:14 2003
|
||||
+++ e2fsck/pass1.c Wed Aug 27 19:59:19 2003
|
||||
@@ -165 +165 @@
|
||||
-static int strnlen(const char * s, int count)
|
||||
+int strnlen(const char * s, int count)
|
6
sysutils/e2fsprogs/files/pkg-message.in
Normal file
6
sysutils/e2fsprogs/files/pkg-message.in
Normal file
@ -0,0 +1,6 @@
|
||||
To have your ext2 and ext3 filesystems fsck'ed correctly without explicitly
|
||||
invoking the fsck_ext2fs utility installed by this port you will need to
|
||||
create links for the fsck utilities installed by this port in /sbin, e.g.
|
||||
|
||||
ln %%PREFIX%%/sbin/fsck_ext2fs /sbin/
|
||||
ln %%PREFIX%%/sbin/e2fsck.static /sbin/e2fsck
|
@ -1,3 +1,3 @@
|
||||
Set of utilities and library to manipulate an ext2 filesystem.
|
||||
Set of utilities and library to manipulate an ext2 or ext3 filesystem.
|
||||
|
||||
WWW: http://e2fsprogs.sourceforge.net/
|
||||
|
@ -20,31 +20,55 @@ include/ext2fs/kernel-jbd.h
|
||||
include/ext2fs/kernel-list.h
|
||||
include/uuid/uuid.h
|
||||
include/uuid/uuidP.h
|
||||
include/uuid/uuid_types.h
|
||||
info/libext2fs.info.gz
|
||||
lib/libblkid.so.1.0
|
||||
lib/libblkid.so.1
|
||||
lib/libblkid.so
|
||||
lib/libcom_err.so.2.1
|
||||
lib/libcom_err.so.2
|
||||
lib/libcom_err.so
|
||||
lib/libe2p.a
|
||||
lib/libe2p.so
|
||||
lib/libe2p.so.2
|
||||
lib/libe2p.so.2.3
|
||||
lib/libext2fs.a
|
||||
lib/libext2fs.so
|
||||
lib/libext2fs.so.2
|
||||
lib/libext2fs.so.2.4
|
||||
lib/libuuid.a
|
||||
lib/libuuid.so
|
||||
lib/libuuid.so.1
|
||||
lib/libuuid.so.1.2
|
||||
lib/libss.so.2.0
|
||||
lib/libss.so.2
|
||||
lib/libss.so
|
||||
sbin/badblocks
|
||||
sbin/blkid
|
||||
sbin/debugfs
|
||||
sbin/dumpe2fs
|
||||
sbin/e2fsck
|
||||
sbin/e2fsck.static
|
||||
sbin/e2image
|
||||
sbin/e2label
|
||||
sbin/findfs
|
||||
sbin/fsck
|
||||
sbin/fsck.ext2
|
||||
sbin/fsck.ext3
|
||||
sbin/fsck_ext2fs
|
||||
sbin/logsave
|
||||
sbin/mke2fs
|
||||
sbin/mkfs.ext2
|
||||
sbin/mkfs.ext3
|
||||
sbin/mklost+found
|
||||
sbin/resize2fs
|
||||
sbin/tune2fs
|
||||
%%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/it/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%%@unexec for i in cs de es it pl sv tr ; do rmdir -p %D/share/locale/$i/LC_MESSAGES 2>/dev/null || true ; done
|
||||
@dirrm include/uuid
|
||||
@dirrm include/ext2fs
|
||||
|
Loading…
Reference in New Issue
Block a user