1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-28 05:29:48 +00:00

. Update to a February 24th snapshot (1.35.w20040131.20040224135102).

. Use official "install-libs" target rather than try to install things
  with a custom post-install target.
. Add a note to pkg-message that we're using a modified copy.

PR:		63327
Submitted by:	Matthias Andree <matthias.andree@gmx.de> (maintainer)
This commit is contained in:
Greg Lewis 2004-02-26 18:22:18 +00:00
parent 480eab9fa2
commit 17871c7091
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=102224
6 changed files with 302 additions and 60 deletions

View File

@ -6,8 +6,7 @@
#
PORTNAME= e2fsprogs
PORTVERSION= 1.35.w20040131
PORTREVISION= 2
PORTVERSION= 1.35.w20040131.20040224135102
CATEGORIES= sysutils
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ${PORTNAME}
@ -24,8 +23,10 @@ WRKSRC= ${WRKDIR}/${PORTNAME}-1.35
USE_GCC= 3.3
PATCH_STRIP= -p1
USE_AUTOCONF= yes
USE_REINPLACE= yes
USE_GMAKE= yes
INSTALL_TARGET= install install-libs
INSTALLS_SHLIB= yes
NO_FILTER_SHLIBS= yes
GNU_CONFIGURE= yes
@ -38,15 +39,16 @@ PLIST_SUB= NLS="@comment "
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
.if ${MACHINE_ARCH} == "alpha"
CFLAGS+= -mieee
.endif
CONFLICTS= ossp-uuid-*
PKGMESSAGE= ${WRKDIR}/pkg-message
MAN1= chattr.1 lsattr.1 uuidgen.1
MAN1= chattr.1 lsattr.1 uuidgen.1 compile_et.1 mk_cmds.1
MAN3= libuuid.3 uuid_clear.3 com_err.3 uuid_compare.3 uuid_copy.3 \
uuid_generate.3 uuid_is_null.3 uuid_parse.3 uuid_time.3 \
uuid_unparse.3 uuid_generate_random.3 uuid_generate_time.3 \
libblkid.3
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 \
@ -62,7 +64,8 @@ pre-everything::
@${ECHO_CMD} "-------------------------------------------------------------"
post-extract:
${CHMOD} u+w ${WRKSRC}/po/*.po ${WRKSRC}/po/*.pot
${CHMOD} u+w ${WRKSRC}/po/*.po ${WRKSRC}/po/*.pot \
${WRKSRC}/${CONFIGURE_SCRIPT}
post-patch:
${REINPLACE_CMD} -e 's|-DRESOURCE_TRACK||' ${WRKSRC}/e2fsck/Makefile.in
@ -73,7 +76,7 @@ post-patch:
-e '/Exit status is 0/ N;s/Exit status is 0\n/Exit status is 0/' \
${WRKSRC}/tests/m_*/expect.1
.if ${MACHINE_ARCH} == "alpha" || ${MACHINE_ARCH} == "sparc64"
${RM} -r ${WRKSRC}/tests/m_large_file
${RM} -rf ${WRKSRC}/tests/m_large_file
.endif
pre-install:
@ -90,13 +93,6 @@ post-install:
${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}

View File

@ -1,30 +0,0 @@
$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

View File

@ -0,0 +1,262 @@
diff -Nru a/debugfs/debugfs.8.in b/debugfs/debugfs.8.in
--- a/debugfs/debugfs.8.in Wed Feb 25 02:10:02 2004
+++ b/debugfs/debugfs.8.in Wed Feb 25 02:10:02 2004
@@ -237,7 +237,7 @@
of the inode
.IR filespec .
.TP
-.I initialize device blocksize
+.I init_filesys device blocksize
Create an ext2 file system on
.I device
with device size
diff -Nru a/debugfs/debugfs.c b/debugfs/debugfs.c
--- a/debugfs/debugfs.c Wed Feb 25 02:10:02 2004
+++ b/debugfs/debugfs.c Wed Feb 25 02:10:02 2004
@@ -456,9 +456,26 @@
if (inode->i_dtime)
fprintf(out, "%sdtime: 0x%08x -- %s", prefix, inode->i_dtime,
time_to_string(inode->i_dtime));
- if (LINUX_S_ISLNK(inode->i_mode) && inode->i_blocks == 0)
+ if (LINUX_S_ISLNK(inode->i_mode) && ext2fs_inode_data_blocks(current_fs,inode) == 0)
fprintf(out, "%sFast_link_dest: %.*s\n", prefix,
(int) inode->i_size, (char *)inode->i_block);
+ else if (LINUX_S_ISBLK(inode->i_mode) || LINUX_S_ISCHR(inode->i_mode)) {
+ int major, minor;
+ const char *devnote;
+
+ if (inode->i_block[0]) {
+ major = (inode->i_block[0] >> 8) & 255;
+ minor = inode->i_block[0] & 255;
+ devnote = "";
+ } else {
+ major = (inode->i_block[1] & 0xfff00) >> 8;
+ minor = ((inode->i_block[1] & 0xff) |
+ ((inode->i_block[1] >> 12) & 0xfff00));
+ devnote = "(New-style) ";
+ }
+ fprintf(out, "%sDevice major/minor number: %02d:%02d (hex %02x:%02x)\n",
+ devnote, major, minor, major, minor);
+ }
else if (do_dump_blocks)
dump_blocks(out, prefix, inode_num);
}
@@ -1181,7 +1198,7 @@
if (nr == 5) {
major = strtoul(argv[3], argv+3, 0);
minor = strtoul(argv[4], argv+4, 0);
- if (major > 255 || minor > 255 || argv[3][0] || argv[4][0])
+ if (major > 65535 || minor > 65535 || argv[3][0] || argv[4][0])
nr = 0;
}
if (argc != nr)
@@ -1215,7 +1232,13 @@
memset(&inode, 0, sizeof(inode));
inode.i_mode = mode;
inode.i_atime = inode.i_ctime = inode.i_mtime = time(NULL);
- inode.i_block[0] = major*256+minor;
+ if ((major < 256) && (minor < 256)) {
+ inode.i_block[0] = major*256+minor;
+ inode.i_block[1] = 0;
+ } else {
+ inode.i_block[0] = 0;
+ inode.i_block[1] = (minor & 0xff) | (major << 8) | ((minor & ~0xff) << 12);
+ }
inode.i_links_count = 1;
if (debugfs_write_inode(newfile, &inode, argv[0]))
return;
diff -Nru a/e2fsck/Makefile.in b/e2fsck/Makefile.in
--- a/e2fsck/Makefile.in Wed Feb 25 02:10:02 2004
+++ b/e2fsck/Makefile.in Wed Feb 25 02:10:02 2004
@@ -25,9 +25,9 @@
$(DEPSTATIC_LIBUUID)
PROFILED_LIBS= $(PROFILED_LIBEXT2FS) $(PROFILED_LIBCOM_ERR) \
- $(PROFILED_BLKID) $(PROFILED_LIBUUID) $(LIBINTL)
+ $(PROFILED_LIBBLKID) $(PROFILED_LIBUUID) $(LIBINTL)
PROFILED_DEPLIBS= $(PROFILED_LIBEXT2FS) $(PROFILED_LIBCOM_ERR) \
- $(PROFILED_BLKID) $(DEPPROFILED_LIBUUID)
+ $(PROFILED_LIBBLKID) $(DEPPROFILED_LIBUUID)
.c.o:
$(CC) -c $(ALL_CFLAGS) $< -o $@
diff -Nru a/e2fsck/e2fsck.8.in b/e2fsck/e2fsck.8.in
--- a/e2fsck/e2fsck.8.in Wed Feb 25 02:10:02 2004
+++ b/e2fsck/e2fsck.8.in Wed Feb 25 02:10:02 2004
@@ -8,7 +8,7 @@
.SH SYNOPSIS
.B e2fsck
[
-.B \-pacnyrdfvstDFSV
+.B \-pacnyrdfkvstDFSV
]
[
.B \-b
@@ -159,6 +159,14 @@
@JDEV@.BI \-j " external-journal"
@JDEV@Set the pathname where the external-journal for this filesystem can be
@JDEV@found.
+.TP
+.BI \-k
+When combined with the
+.B \-c
+option, any existing bad blocks in the bad blocks list are preserved,
+and any new bad blocks found by running
+.BR badblocks (8)
+will be added to the existing bad blocks list.
.TP
.BI \-l " filename"
Add the block numbers listed in the file specified by
diff -Nru a/e2fsck/e2fsck.c b/e2fsck/e2fsck.c
--- a/e2fsck/e2fsck.c Wed Feb 25 02:10:02 2004
+++ b/e2fsck/e2fsck.c Wed Feb 25 02:10:02 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
diff -Nru a/e2fsck/pass1b.c b/e2fsck/pass1b.c
--- a/e2fsck/pass1b.c Wed Feb 25 02:10:02 2004
+++ b/e2fsck/pass1b.c Wed Feb 25 02:10:02 2004
@@ -248,7 +248,8 @@
clear_problem_context(&pctx);
- fix_problem(ctx, PR_1B_PASS_HEADER, &pctx);
+ if (!(ctx->options & E2F_OPT_PREEN))
+ fix_problem(ctx, PR_1B_PASS_HEADER, &pctx);
pctx.errcode = ext2fs_open_inode_scan(fs, ctx->inode_buffer_blocks,
&scan);
if (pctx.errcode) {
@@ -382,7 +383,8 @@
clear_problem_context(&pctx);
- fix_problem(ctx, PR_1C_PASS_HEADER, &pctx);
+ if (!(ctx->options & E2F_OPT_PREEN))
+ fix_problem(ctx, PR_1C_PASS_HEADER, &pctx);
/*
* Search through all directories to translate inodes to names
@@ -412,7 +414,8 @@
clear_problem_context(&pctx);
- fix_problem(ctx, PR_1D_PASS_HEADER, &pctx);
+ if (!(ctx->options & E2F_OPT_PREEN))
+ fix_problem(ctx, PR_1D_PASS_HEADER, &pctx);
e2fsck_read_bitmaps(ctx);
pctx.num = dup_inode_count; /* dict_count(&ino_dict); */
diff -Nru a/e2fsck/problem.c b/e2fsck/problem.c
--- a/e2fsck/problem.c Wed Feb 25 02:10:02 2004
+++ b/e2fsck/problem.c Wed Feb 25 02:10:02 2004
@@ -724,12 +724,12 @@
/* Duplicate/bad block(s) in inode */
{ PR_1B_DUP_BLOCK,
" %b",
- PROMPT_NONE, PR_LATCH_DBLOCK },
+ PROMPT_NONE, PR_LATCH_DBLOCK | PR_PREEN_NOHDR },
/* Duplicate/bad block(s) end */
{ PR_1B_DUP_BLOCK_END,
"\n",
- PROMPT_NONE, 0 },
+ PROMPT_NONE, PR_PREEN_NOHDR },
/* Error while scanning inodes */
{ PR_1B_ISCAN_ERROR,
diff -Nru a/e2fsck/unix.c b/e2fsck/unix.c
--- a/e2fsck/unix.c Wed Feb 25 02:10:02 2004
+++ b/e2fsck/unix.c Wed Feb 25 02:10:02 2004
@@ -53,6 +53,7 @@
static int verbose;
static int replace_bad_blocks;
+static int keep_bad_blocks;
static char *bad_blocks_file;
e2fsck_t e2fsck_global_ctx; /* Try your very best not to use this! */
@@ -554,7 +555,7 @@
ctx->program_name = *argv;
else
ctx->program_name = "e2fsck";
- while ((c = getopt (argc, argv, "panyrcC:B:dE:fvtFVM:b:I:j:P:l:L:N:SsD")) != EOF)
+ while ((c = getopt (argc, argv, "panyrcC:B:dE:fvtFVM:b:I:j:P:l:L:N:SsDk")) != EOF)
switch (c) {
case 'C':
ctx->progress = e2fsck_update_progress;
@@ -675,6 +676,8 @@
"of e2fsck\n"));
exit(1);
#endif
+ case 'k':
+ keep_bad_blocks++;
default:
usage(ctx);
}
@@ -1034,7 +1037,7 @@
if (bad_blocks_file)
read_bad_blocks_file(ctx, bad_blocks_file, replace_bad_blocks);
else if (cflag)
- read_bad_blocks_file(ctx, 0, 1); /* Test disk */
+ read_bad_blocks_file(ctx, 0, !keep_bad_blocks); /* Test disk */
if (ctx->flags & E2F_FLAG_SIGNAL_MASK)
fatal_error(ctx, 0);
#ifdef ENABLE_SWAPFS
diff -Nru a/lib/ext2fs/ext2fs.h b/lib/ext2fs/ext2fs.h
--- a/lib/ext2fs/ext2fs.h Wed Feb 25 02:10:02 2004
+++ b/lib/ext2fs/ext2fs.h Wed Feb 25 02:10:02 2004
@@ -977,7 +977,7 @@
/*
* Resize memory
*/
-_INLINE_ errcode_t ext2fs_resize_mem(unsigned long old_size EXT2FS_ATTR((unused)),
+_INLINE_ errcode_t ext2fs_resize_mem(unsigned long EXT2FS_ATTR((unused)) old_size,
unsigned long size, void *ptr)
{
void *p;
diff -Nru a/lib/ext2fs/namei.c b/lib/ext2fs/namei.c
--- a/lib/ext2fs/namei.c Wed Feb 25 02:10:02 2004
+++ b/lib/ext2fs/namei.c Wed Feb 25 02:10:02 2004
@@ -47,7 +47,7 @@
if (link_count++ > 5) {
return EXT2_ET_SYMLINK_LOOP;
}
- if (ei.i_blocks) {
+ if (ext2fs_inode_data_blocks(fs,&ei)) {
retval = ext2fs_get_mem(fs->blocksize, &buffer);
if (retval)
return retval;
diff -Nru a/misc/fsck.c b/misc/fsck.c
--- a/misc/fsck.c Wed Feb 25 02:10:02 2004
+++ b/misc/fsck.c Wed Feb 25 02:10:02 2004
@@ -439,7 +439,7 @@
for (i=0; i <num_args; i++)
argv[argc++] = string_copy(args[i]);
- if (progress & !progress_active()) {
+ if (progress && !progress_active()) {
if ((strcmp(type, "ext2") == 0) ||
(strcmp(type, "ext3") == 0)) {
argv[argc++] = string_copy("-C0");
diff -Nru a/util/gen-tarball.in b/util/gen-tarball.in
--- a/util/gen-tarball.in Wed Feb 25 02:10:02 2004
+++ b/util/gen-tarball.in Wed Feb 25 02:10:02 2004
@@ -79,7 +79,8 @@
(cd $top_srcdir/.. ; find $base_e2fsprogs \( -name \*~ -o -name \*.orig \
-o -name CVS -o -name \*.rej -o -name Makefile.pq \
-o -name TAGS -o -name \*.old -o -name \*.gmo -o -name SCCS \
- -o -name changed-files -o -name .#\* -o -name \*.tar.gz \) \
+ -o -name changed-files -o -name .#\* -o -name \*.tar.gz \
+ -o -name autom4te.cache \) \
-print) | sed -e "s/^$base_e2fsprogs/$SRCROOT/" > $exclude
sed -e "s;^;$SRCROOT/;" < $srcdir/$list.exclude >> $exclude

View File

@ -1,3 +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@gmx.de.
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.

View File

@ -1,7 +1,7 @@
if [ "$2" = "POST-DEINSTALL" ] ; then cat - <<_EOF
If you are deinstalling the e2fsprogs port for good, rather than upgrading it,
remember to remove the files you have installed into /sbin, example:
remember to remove the files you may have installed into /sbin, example:
rm -f /sbin/fsck_ext2fs /sbin/e2fsck

View File

@ -1,30 +1,29 @@
bin/chattr
bin/compile_et
bin/lsattr
bin/mk_cmds
bin/uuidgen
include/blkid/blkid.h
include/blkid/blkid_types.h
include/e2p/e2p.h
include/et/com_err.h
include/ext2fs/bitops.h
include/ext2fs/brel.h
include/ext2fs/dosio.h
include/ext2fs/e2image.h
include/ext2fs/ext2_err.h
include/ext2fs/ext2_ext_attr.h
include/ext2fs/ext2_fs.h
include/ext2fs/ext2_io.h
include/ext2fs/ext2_types.h
include/ext2fs/ext2fs.h
include/ext2fs/ext2fsP.h
include/ext2fs/irel.h
include/ext2fs/jfs_compat.h
include/ext2fs/jfs_dat.h
include/ext2fs/jfs_user.h
include/ext2fs/kernel-jbd.h
include/ext2fs/kernel-list.h
include/ss/ss.h
include/ss/ss_err.h
include/uuid/uuid.h
include/uuid/uuidP.h
include/uuid/uuid_types.h
info/libext2fs.info.gz
lib/libblkid.a
lib/libblkid.so.1.0
lib/libblkid.so.1
lib/libblkid.so
lib/libcom_err.a
lib/libcom_err.so.2.1
lib/libcom_err.so.2
lib/libcom_err.so
@ -36,13 +35,14 @@ lib/libext2fs.a
lib/libext2fs.so
lib/libext2fs.so.2
lib/libext2fs.so.2.4
lib/libss.a
lib/libss.so.2.0
lib/libss.so.2
lib/libss.so
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
@ -62,6 +62,10 @@ sbin/mkfs.ext3
sbin/mklost+found
sbin/resize2fs
sbin/tune2fs
share/et/et_c.awk
share/et/et_h.awk
share/ss/ct_c.awk
share/ss/ct_c.sed
%%NLS%%share/locale/cs/LC_MESSAGES/e2fsprogs.mo
%%NLS%%share/locale/de/LC_MESSAGES/e2fsprogs.mo
%%NLS%%share/locale/es/LC_MESSAGES/e2fsprogs.mo
@ -70,5 +74,11 @@ sbin/tune2fs
%%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 share/ss
@dirrm share/et
@dirrm include/uuid
@dirrm include/ss
@dirrm include/ext2fs
@dirrm include/et
@dirrm include/e2p
@dirrm include/blkid