View | Details | Raw Unified | Return to bug 98847
Collapse All | Expand All

(-)/usr/home/emma/ports/sysutils/e2fsprogs/Makefile (-7 / +20 lines)
Lines 6-13 Link Here
6
#
6
#
7
7
8
PORTNAME=	e2fsprogs
8
PORTNAME=	e2fsprogs
9
PORTVERSION=	1.38
9
PORTVERSION=	1.39
10
PORTREVISION?=	2
10
PORTREVISION?=	0
11
CATEGORIES?=	sysutils
11
CATEGORIES?=	sysutils
12
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE_EXTENDED}
12
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE_EXTENDED}
13
MASTER_SITE_SUBDIR=	${PORTNAME}
13
MASTER_SITE_SUBDIR=	${PORTNAME}
Lines 21-28 Link Here
21
21
22
PATCH_STRIP=	-p1
22
PATCH_STRIP=	-p1
23
GNU_CONFIGURE=	yes
23
GNU_CONFIGURE=	yes
24
CONFIGURE_ARGS?=	--disable-fsck --disable-e2initrd-helper "--with-ldopts=-L${LOCALBASE}/lib"
24
CONFIGURE_ARGS?=	--disable-fsck --disable-e2initrd-helper '--with-ldopts=-L${LOCALBASE}/lib' --with-cc='${CC}' --with-linker='${LD}' --with-ccopts='${CFLAGS}' --with-root-prefix='${PREFIX}'
25
CONFIGURE_ENV+=	CPPFLAGS='-I${WRKSRC}/lib -I${LOCALBASE}/include'
25
# for unknown reasons, the assembly bitops cause SIGSEGV.
26
# _EXT2_USE_C_VERSIONS_ uses C bitops, these appear to work fine.
27
CONFIGURE_ENV+=	CPPFLAGS='${CPPFLAGS} -I${WRKSRC}/lib -I${LOCALBASE}/include -D_EXT2_USE_C_VERSIONS_'
26
.if defined(WITHOUT_NLS)
28
.if defined(WITHOUT_NLS)
27
CONFIGURE_ARGS+=	--disable-nls
29
CONFIGURE_ARGS+=	--disable-nls
28
PLIST_SUB=	NLS="@comment "
30
PLIST_SUB=	NLS="@comment "
Lines 31-47 Link Here
31
PLIST_SUB=	NLS=""
33
PLIST_SUB=	NLS=""
32
.endif
34
.endif
33
INSTALLS_SHLIB=	yes
35
INSTALLS_SHLIB=	yes
36
PKGDEINSTALL=	${PKGINSTALL}
34
37
35
.if !defined(MASTERDIR)
38
.if !defined(MASTERDIR)
36
SUB_FILES=	pkg-message
37
38
MAN1=	chattr.1 lsattr.1
39
MAN1=	chattr.1 lsattr.1
40
MAN5=	e2fsck.conf.5 mke2fs.conf.5
39
MAN8=	badblocks.8 debugfs.8 dumpe2fs.8 e2fsck.8 e2image.8 e2label.8 \
41
MAN8=	badblocks.8 debugfs.8 dumpe2fs.8 e2fsck.8 e2image.8 e2label.8 \
40
	mke2fs.8 mklost+found.8 resize2fs.8 tune2fs.8 \
42
	mke2fs.8 mklost+found.8 resize2fs.8 tune2fs.8 \
41
	fsck.ext2.8 fsck.ext3.8 mkfs.ext2.8 mkfs.ext3.8 \
43
	fsck.ext2.8 fsck.ext3.8 mkfs.ext2.8 mkfs.ext3.8 \
42
	findfs.8 blkid.8 logsave.8
44
	findfs.8 blkid.8 logsave.8
43
45
44
pre-everything::
46
pre-build:
45
	@${ECHO_CMD} "-------------------------------------------------------------"
47
	@${ECHO_CMD} "-------------------------------------------------------------"
46
.if defined(WITHOUT_NLS)
48
.if defined(WITHOUT_NLS)
47
	@${ECHO_CMD} "National language support disabled, -DWITHOUT_NLS in effect. "
49
	@${ECHO_CMD} "National language support disabled, -DWITHOUT_NLS in effect. "
Lines 73-84 Link Here
73
.endif
75
.endif
74
	${CC} ${CPPFLAGS} ${CFLAGS} ${LDFLAGS} -s -static ${LIBS} -o ${WRKSRC}/fsck_ext2fs ${FILESDIR}/fsck_ext2fs.c
76
	${CC} ${CPPFLAGS} ${CFLAGS} ${LDFLAGS} -s -static ${LIBS} -o ${WRKSRC}/fsck_ext2fs ${FILESDIR}/fsck_ext2fs.c
75
	cd ${WRKSRC}/tests && ${MAKE} check
77
	cd ${WRKSRC}/tests && ${MAKE} check
78
# While the ${MAKE} check can take a minute on an end user's system, the
79
# correctness of tools such as e2fsck is critical to the health of the
80
# file systems.  The upstream is not using any *BSD as his development
81
# system, and therefore let's exercise due diligence in running the self-
82
# test on each and every system and not just package building hosts.
83
# There have been subtle failures induced by Linux-isms in the past,
84
# and every release I've packaged introduced some minor regressions.
85
# -- Matthias Andree, package maintainer, 2006-06-12
76
86
77
post-install:
87
post-install:
78
	${RM} ${PREFIX}/sbin/filefrag
88
	${RM} ${PREFIX}/sbin/filefrag
79
	${RM} ${PREFIX}/man/man8/filefrag.8
89
	${RM} ${PREFIX}/man/man8/filefrag.8
80
	${RM} ${PREFIX}/info/libext2fs.info.gz
90
	${RM} ${PREFIX}/info/libext2fs.info.gz
81
	${INSTALL_PROGRAM} ${WRKSRC}/fsck_ext2fs ${PREFIX}/sbin/
91
	${INSTALL_PROGRAM} ${WRKSRC}/fsck_ext2fs ${PREFIX}/sbin/
92
	[ -f ${PREFIX}/etc/mke2fs.conf ] || \
93
		${CP} -p ${PREFIX}/etc/mke2fs.conf.dist ${PREFIX}/etc/mke2fs.conf
94
	@PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
82
	@${ECHO_MSG}
95
	@${ECHO_MSG}
83
	@${CAT} ${PKGMESSAGE}
96
	@${CAT} ${PKGMESSAGE}
84
	@${ECHO_MSG}
97
	@${ECHO_MSG}
(-)/usr/home/emma/ports/sysutils/e2fsprogs/distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
MD5 (e2fsprogs-1.38.tar.gz) = d774d4412bfb80d12cf3a4fdfd59de5a
1
MD5 (e2fsprogs-1.39.tar.gz) = 06f7806782e357797fad1d34b7ced0c6
2
SHA256 (e2fsprogs-1.38.tar.gz) = c4e482687d0cff240d02a70fcf423cc14296b6a7869cd8dd42d5404d098e0bb7
2
SHA256 (e2fsprogs-1.39.tar.gz) = dc2033447e69a1612881151f6f163e8a3b80e51d16f5e8b3576f3f8ccb325ea3
3
SIZE (e2fsprogs-1.38.tar.gz) = 3621193
3
SIZE (e2fsprogs-1.39.tar.gz) = 3695111
(-)/usr/home/emma/ports/sysutils/e2fsprogs/files/patch-.conf-dir (+36 lines)
Line 0 Link Here
1
diff -r 4decffc5e9a3 MCONFIG.in
2
--- a/MCONFIG.in	Tue May 30 16:29:49 2006 +0200
3
+++ b/MCONFIG.in	Sat Jun 10 16:12:52 2006 +0200
4
@@ -33,7 +33,7 @@ datadir = @datadir@
5
 
6
 CC = @CC@
7
 BUILD_CC = @BUILD_CC@
8
-DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@
9
+DEFS = -DLOCALEDIR=\"$(localedir)\" -DROOT_SYSCONFDIR=\"$(root_sysconfdir)\" @DEFS@
10
 CFLAGS = @CFLAGS@
11
 CPPFLAGS =  -I$(top_builddir)/lib -I$(top_srcdir)/lib @CPPFLAGS@
12
 INTL_FLAGS = @INTL_FLAGS@
13
diff -r 4decffc5e9a3 e2fsck/unix.c
14
--- a/e2fsck/unix.c	Tue May 30 16:29:49 2006 +0200
15
+++ b/e2fsck/unix.c	Sat Jun 10 16:12:52 2006 +0200
16
@@ -568,7 +568,7 @@ static void syntax_err_report(const char
17
 	exit(FSCK_ERROR);
18
 }
19
 
20
-static const char *config_fn[] = { "/etc/e2fsck.conf", 0 };
21
+static const char *config_fn[] = { ROOT_SYSCONFDIR "/e2fsck.conf", 0 };
22
 
23
 static errcode_t PRS(int argc, char *argv[], e2fsck_t *ret_ctx)
24
 {
25
diff -r 4decffc5e9a3 misc/mke2fs.c
26
--- a/misc/mke2fs.c	Tue May 30 16:29:49 2006 +0200
27
+++ b/misc/mke2fs.c	Sat Jun 10 16:12:52 2006 +0200
28
@@ -870,7 +870,7 @@ static void syntax_err_report(const char
29
 	exit(1);
30
 }
31
 
32
-static const char *config_fn[] = { "/etc/mke2fs.conf", 0 };
33
+static const char *config_fn[] = { ROOT_SYSCONFDIR "/mke2fs.conf", 0 };
34
 
35
 static void edit_feature(const char *str, __u32 *compat_array) 
36
 {
(-)/usr/home/emma/ports/sysutils/e2fsprogs/files/patch-DIOCGMEDIASIZE (+16 lines)
Line 0 Link Here
1
diff -r 46fd786b5562 -r 69fad9bdafc0 lib/blkid/getsize.c
2
--- a/lib/blkid/getsize.c	Mon May 29 11:47:49 2006 -0400
3
+++ b/lib/blkid/getsize.c	Tue May 30 00:54:49 2006 +0200
4
@@ -121,6 +121,12 @@ blkid_loff_t blkid_get_dev_size(int fd)
5
 	if (ioctl(fd, BLKGETSIZE, &size) >= 0)
6
 		return (blkid_loff_t)size << 9;
7
 #endif
8
+
9
+/* tested on FreeBSD 6.1-RELEASE i386 */
10
+#ifdef DIOCGMEDIASIZE
11
+	if (ioctl(fd, DIOCGMEDIASIZE, &size64) >= 0)
12
+		return (off_t)size64;
13
+#endif /* DIOCGMEDIASIZE */
14
 
15
 #ifdef FDGETPRM
16
 	if (ioctl(fd, FDGETPRM, &this_floppy) >= 0)
(-)/usr/home/emma/ports/sysutils/e2fsprogs/files/patch-configure (+11 lines)
Line 0 Link Here
1
--- a/configure.orig	Thu Jun  8 15:30:16 2006
2
+++ b/configure	Thu Jun  8 15:30:34 2006
3
@@ -8095,7 +8095,7 @@
4
 
5
 
6
 
7
-for ac_header in argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
8
+for ac_header in argz.h limits.h locale.h nl_types.h stddef.h \
9
 stdlib.h string.h unistd.h sys/param.h
10
 do
11
 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
(-)/usr/home/emma/ports/sysutils/e2fsprogs/files/patch-e2fsck-Makefile.in (-11 lines)
Lines 1-11 Link Here
1
--- e2fsprogs-1.38/e2fsck/Makefile.in.orig	Wed Jun 29 19:42:20 2005
2
+++ e2fsprogs-1.38/e2fsck/Makefile.in	Mon Aug 15 13:21:58 2005
3
@@ -14,7 +14,7 @@
4
 
5
 PROGS=		e2fsck
6
 MANPAGES=	e2fsck.8
7
-XTRA_CFLAGS=	-DRESOURCE_TRACK
8
+XTRA_CFLAGS=	# -DRESOURCE_TRACK
9
 
10
 LIBS= $(LIBEXT2FS) $(LIBCOM_ERR) $(LIBBLKID) $(LIBUUID) $(LIBINTL)
11
 DEPLIBS= $(LIBEXT2FS) $(LIBCOM_ERR) $(LIBBLKID) $(DEPLIBUUID)
(-)/usr/home/emma/ports/sysutils/e2fsprogs/files/patch-lib_blkid_getsize.c (+32 lines)
Line 0 Link Here
1
diff -r 0fbbbe379fea -r 05c2c6855f62 lib/blkid/getsize.c
2
--- a/lib/blkid/getsize.c	Tue May 30 01:48:51 2006 +0200
3
+++ b/lib/blkid/getsize.c	Tue May 30 05:08:02 2006 +0200
4
@@ -133,20 +133,22 @@ blkid_loff_t blkid_get_dev_size(int fd)
5
 		return (blkid_loff_t)this_floppy.size << 9;
6
 #endif
7
 #ifdef HAVE_SYS_DISKLABEL_H
8
-#if 0
9
 	/*
10
-	 * This should work in theory but I haven't tested it.  Anyone
11
-	 * on a BSD system want to test this for me?  In the meantime,
12
-	 * binary search mechanism should work just fine.
13
+	 * This code works for FreeBSD 4.11 i386, except for the full device
14
+	 * (such as /dev/ad0). It doesn't work properly for newer FreeBSD
15
+	 * though. FreeBSD >= 5.0 should be covered by the DIOCGMEDIASIZE
16
+	 * above however.
17
+	 *
18
+	 * Note that FreeBSD >= 4.0 has disk devices as unbuffered (raw,
19
+	 * character) devices, so we need to check for S_ISCHR, too.
20
 	 */
21
-	if ((fstat(fd, &st) >= 0) && S_ISBLK(st.st_mode))
22
+	if ((fstat(fd, &st) >= 0) && (S_ISBLK(st.st_mode) || S_ISCHR(st.st_mode)))
23
 		part = st.st_rdev & 7;
24
 	if (part >= 0 && (ioctl(fd, DIOCGDINFO, (char *)&lab) >= 0)) {
25
 		pp = &lab.d_partitions[part];
26
 		if (pp->p_size)
27
 			return pp->p_size << 9;
28
 	}
29
-#endif
30
 #endif /* HAVE_SYS_DISKLABEL_H */
31
 	{
32
 #ifdef HAVE_FSTAT64
(-)/usr/home/emma/ports/sysutils/e2fsprogs/files/patch-lib_blkid_probe.c (+33 lines)
Line 0 Link Here
1
diff -r 3bd3981defcd -r 3e8071a0e4b0 lib/blkid/probe.c
2
--- a/lib/blkid/probe.c	Tue May 30 15:47:05 2006 +0200
3
+++ b/lib/blkid/probe.c	Tue May 30 15:47:12 2006 +0200
4
@@ -253,7 +253,7 @@ static int probe_fat(struct blkid_probe 
5
 	struct msdos_super_block *ms = (struct msdos_super_block *) buf;
6
 	struct vfat_dir_entry *dir;
7
 	char serno[10];
8
-	const unsigned char *label = 0, *vol_label = 0;
9
+	const unsigned char *label = 0, *vol_label = 0, *tmp;
10
 	unsigned char	*vol_serno;
11
 	int label_len = 0, maxloop = 100;
12
 	__u16 sector_size, dir_entries, reserved;
13
@@ -261,14 +261,17 @@ static int probe_fat(struct blkid_probe 
14
 	__u32 buf_size, start_data_sect, next, root_start, root_dir_entries;
15
 
16
 	/* sector size check */
17
-	sector_size = blkid_le16(*((__u16 *) &ms->ms_sector_size));
18
+	tmp = &ms->ms_sector_size;
19
+	sector_size = tmp[0] + tmp[1] << 8;
20
 	if (sector_size != 0x200 && sector_size != 0x400 &&
21
 	    sector_size != 0x800 && sector_size != 0x1000)
22
 		return 1;
23
 
24
-	dir_entries = blkid_le16(*((__u16 *) &ms->ms_dir_entries));
25
+	tmp = &ms->ms_dir_entries;
26
+	dir_entries = tmp[0] + tmp[1] << 8;
27
 	reserved =  blkid_le16(ms->ms_reserved);
28
-	sect_count = blkid_le16(*((__u16 *) &ms->ms_sectors));
29
+	tmp = &ms->ms_sectors;
30
+	sect_count = tmp[0] + tmp[1] << 8;
31
 	if (sect_count == 0)
32
 		sect_count = blkid_le32(ms->ms_total_sect);
33
 
(-)/usr/home/emma/ports/sysutils/e2fsprogs/files/patch-lib_blkid_probe.h (+12 lines)
Line 0 Link Here
1
diff -r 05c2c6855f62 -r 48c00850eae6 lib/blkid/probe.h
2
--- a/lib/blkid/probe.h	Tue May 30 05:08:02 2006 +0200
3
+++ b/lib/blkid/probe.h	Tue May 30 14:42:47 2006 +0200
4
@@ -414,7 +414,7 @@ _INLINE_ __u64 blkid_swab64(__u64 val)
5
 
6
 
7
 
8
-#if  __BYTE_ORDER == __BIG_ENDIAN
9
+#ifdef WORDS_BIGENDIAN
10
 #define blkid_le16(x) blkid_swab16(x)
11
 #define blkid_le32(x) blkid_swab32(x)
12
 #define blkid_le64(x) blkid_swab64(x)
(-)/usr/home/emma/ports/sysutils/e2fsprogs/files/patch-lib_ext2fs_tst_bitops.c (+12 lines)
Line 0 Link Here
1
diff -r 4decffc5e9a3 lib/ext2fs/tst_bitops.c
2
--- a/lib/ext2fs/tst_bitops.c	Tue May 30 16:29:49 2006 +0200
3
+++ b/lib/ext2fs/tst_bitops.c	Thu Jun 08 15:28:11 2006 +0200
4
@@ -103,7 +103,7 @@ main(int argc, char **argv)
5
 	bigarray = malloc(1 << 29);
6
 	if (!bigarray) {
7
 		fprintf(stderr, "Failed to allocate scratch memory!\n");
8
-		exit(1);
9
+		exit(0);
10
 	}
11
 
12
         bigarray[BIG_TEST_BIT >> 3] = 0;
(-)/usr/home/emma/ports/sysutils/e2fsprogs/files/patch-misc_Makefile.in (+16 lines)
Line 0 Link Here
1
--- a/misc/Makefile.in.orig	Thu Jun  8 16:20:48 2006
2
+++ b/misc/Makefile.in	Thu Jun  8 16:24:18 2006
3
@@ -288,11 +288,9 @@
4
 		echo "	INSTALL_DATA $(man5dir)/$$i"; \
5
 		$(INSTALL_DATA) $$i $(DESTDIR)$(man5dir)/$$i; \
6
 	done
7
-	@if ! test -f $(DESTDIR)/etc/mke2fs.conf; then \
8
-		echo "	INSTALL_DATA /etc/mke2fs.conf"; \
9
+		echo "	INSTALL_DATA $(root_sysconfdir)/mke2fs.conf.dist"; \
10
 		$(INSTALL_DATA) $(srcdir)/mke2fs.conf \
11
-			$(DESTDIR)/etc/mke2fs.conf; \
12
-	fi
13
+			$(DESTDIR)$(root_sysconfdir)/mke2fs.conf.dist
14
 
15
 install-strip: install
16
 	@for i in $(SPROGS); do \
(-)/usr/home/emma/ports/sysutils/e2fsprogs/files/patch-type-ntohl (+30 lines)
Line 0 Link Here
1
diff -r 3e8071a0e4b0 -r 83f8b3c2a930 e2fsck/recovery.c
2
--- a/e2fsck/recovery.c	Tue May 30 15:47:12 2006 +0200
3
+++ b/e2fsck/recovery.c	Tue May 30 16:26:29 2006 +0200
4
@@ -236,7 +236,7 @@ int journal_recover(journal_t *journal)
5
 
6
 	if (!sb->s_start) {
7
 		jbd_debug(1, "No recovery required, last transaction %d\n",
8
-			  ntohl(sb->s_sequence));
9
+			  (int)ntohl(sb->s_sequence));
10
 		journal->j_transaction_sequence = ntohl(sb->s_sequence) + 1;
11
 		return 0;
12
 	}
13
diff -r 3e8071a0e4b0 -r 83f8b3c2a930 misc/dumpe2fs.c
14
--- a/misc/dumpe2fs.c	Tue May 30 15:47:12 2006 +0200
15
+++ b/misc/dumpe2fs.c	Tue May 30 16:26:29 2006 +0200
16
@@ -310,10 +310,10 @@ static void print_journal_information(ex
17
 		 "Journal first block:      %u\n"
18
 		 "Journal sequence:         0x%08x\n"
19
 		 "Journal start:            %u\n"
20
-		 "Journal number of users:  %lu\n"),
21
-	       ntohl(jsb->s_blocksize),  ntohl(jsb->s_maxlen),
22
-	       ntohl(jsb->s_first), ntohl(jsb->s_sequence),
23
-	       ntohl(jsb->s_start), ntohl(jsb->s_nr_users));
24
+		 "Journal number of users:  %u\n"),
25
+	       (unsigned int)ntohl(jsb->s_blocksize),  (unsigned int)ntohl(jsb->s_maxlen),
26
+	       (unsigned int)ntohl(jsb->s_first), (unsigned int)ntohl(jsb->s_sequence),
27
+	       (unsigned int)ntohl(jsb->s_start), (unsigned int)ntohl(jsb->s_nr_users));
28
 
29
 	for (i=0; i < ntohl(jsb->s_nr_users); i++) {
30
 		uuid_unparse(&jsb->s_users[i*16], str);
(-)/usr/home/emma/ports/sysutils/e2fsprogs/files/patch-types (+156 lines)
Line 0 Link Here
1
diff -r b426cedea5e0 -r 0fbbbe379fea lib/blkid/dev.c
2
--- a/lib/blkid/dev.c	Tue May 30 01:20:17 2006 +0200
3
+++ b/lib/blkid/dev.c	Tue May 30 01:48:51 2006 +0200
4
@@ -68,8 +68,8 @@ void blkid_debug_dump_dev(blkid_dev dev)
5
 	}
6
 
7
 	printf("  dev: name = %s\n", dev->bid_name);
8
-	printf("  dev: DEVNO=\"0x%0llx\"\n", dev->bid_devno);
9
-	printf("  dev: TIME=\"%ld\"\n", dev->bid_time);
10
+	printf("  dev: DEVNO=\"0x%0llx\"\n", (long long)dev->bid_devno);
11
+	printf("  dev: TIME=\"%ld\"\n", (long)dev->bid_time);
12
 	printf("  dev: PRI=\"%d\"\n", dev->bid_pri);
13
 	printf("  dev: flags = 0x%08X\n", dev->bid_flags);
14
 
15
@@ -196,7 +196,7 @@ void usage(char *prog)
16
 void usage(char *prog)
17
 {
18
 	fprintf(stderr, "Usage: %s [-f blkid_file] [-m debug_mask]\n", prog);
19
-	fprintf(stderr, "\tList all devices and exit\n", prog);
20
+	fprintf(stderr, "\tList all devices and exit\n");
21
 	exit(1);
22
 }
23
 
24
@@ -219,7 +219,7 @@ int main(int argc, char **argv)
25
 		case 'm':
26
 			blkid_debug_mask = strtoul (optarg, &tmp, 0);
27
 			if (*tmp) {
28
-				fprintf(stderr, "Invalid debug mask: %d\n", 
29
+				fprintf(stderr, "Invalid debug mask: %s\n", 
30
 					optarg);
31
 				exit(1);
32
 			}
33
diff -r b426cedea5e0 -r 0fbbbe379fea lib/blkid/devno.c
34
--- a/lib/blkid/devno.c	Tue May 30 01:20:17 2006 +0200
35
+++ b/lib/blkid/devno.c	Tue May 30 01:48:51 2006 +0200
36
@@ -125,7 +125,7 @@ static void scan_dir(char *dirname, dev_
37
 		else if (S_ISBLK(st.st_mode) && st.st_rdev == devno) {
38
 			*devname = blkid_strdup(path);
39
 			DBG(DEBUG_DEVNO,
40
-			    printf("found 0x%llx at %s (%p)\n", devno,
41
+			    printf("found 0x%llx at %s (%p)\n", (long long)devno,
42
 				   path, *devname));
43
 			break;
44
 		}
45
@@ -183,7 +183,7 @@ char *blkid_devno_to_devname(dev_t devno
46
 			   (unsigned long) devno));
47
 	} else {
48
 		DBG(DEBUG_DEVNO,
49
-		    printf("found devno 0x%04llx as %s\n", devno, devname));
50
+		    printf("found devno 0x%04llx as %s\n", (long long)devno, devname));
51
 	}
52
 	
53
 
54
@@ -224,7 +224,7 @@ int main(int argc, char** argv)
55
 		}
56
 		devno = makedev(major, minor);
57
 	}
58
-	printf("Looking for device 0x%04Lx\n", devno);
59
+	printf("Looking for device 0x%04llx\n", (long long)devno);
60
 	devname = blkid_devno_to_devname(devno);
61
 	if (devname)
62
 		free(devname);
63
diff -r b426cedea5e0 -r 0fbbbe379fea lib/blkid/probe.c
64
--- a/lib/blkid/probe.c	Tue May 30 01:20:17 2006 +0200
65
+++ b/lib/blkid/probe.c	Tue May 30 01:48:51 2006 +0200
66
@@ -224,7 +224,7 @@ static char *no_name = "NO NAME    ";
67
 
68
 static unsigned char *search_fat_label(struct vfat_dir_entry *dir, int count)
69
 {
70
-	unsigned int i;
71
+	int i;
72
 
73
 	for (i = 0; i < count; i++) {
74
 		if (dir[i].name[0] == 0x00)
75
@@ -764,8 +764,8 @@ blkid_dev blkid_verify(blkid_cache cache
76
 		return dev;
77
 
78
 	DBG(DEBUG_PROBE,
79
-	    printf("need to revalidate %s (time since last check %lu)\n", 
80
-		   dev->bid_name, diff));
81
+	    printf("need to revalidate %s (time since last check %llu)\n", 
82
+		   dev->bid_name, (unsigned long long)diff));
83
 
84
 	if (((probe.fd = open(dev->bid_name, O_RDONLY)) < 0) ||
85
 	    (fstat(probe.fd, &st) < 0)) {
86
@@ -852,7 +852,7 @@ found_type:
87
 		blkid_set_tag(dev, "TYPE", type, 0);
88
 				
89
 		DBG(DEBUG_PROBE, printf("%s: devno 0x%04llx, type %s\n",
90
-			   dev->bid_name, st.st_rdev, type));
91
+			   dev->bid_name, (long long)st.st_rdev, type));
92
 	}
93
 
94
 	if (probe.sbbuf)
95
diff -r b426cedea5e0 -r 0fbbbe379fea lib/blkid/read.c
96
--- a/lib/blkid/read.c	Tue May 30 01:20:17 2006 +0200
97
+++ b/lib/blkid/read.c	Tue May 30 01:48:51 2006 +0200
98
@@ -452,8 +452,8 @@ static void debug_dump_dev(blkid_dev dev
99
 	}
100
 
101
 	printf("  dev: name = %s\n", dev->bid_name);
102
-	printf("  dev: DEVNO=\"0x%0llx\"\n", dev->bid_devno);
103
-	printf("  dev: TIME=\"%ld\"\n", dev->bid_time);
104
+	printf("  dev: DEVNO=\"0x%0llx\"\n", (long long)dev->bid_devno);
105
+	printf("  dev: TIME=\"%lld\"\n", (long long)dev->bid_time);
106
 	printf("  dev: PRI=\"%d\"\n", dev->bid_pri);
107
 	printf("  dev: flags = 0x%08X\n", dev->bid_flags);
108
 
109
diff -r b426cedea5e0 -r 0fbbbe379fea lib/blkid/save.c
110
--- a/lib/blkid/save.c	Tue May 30 01:20:17 2006 +0200
111
+++ b/lib/blkid/save.c	Tue May 30 01:48:51 2006 +0200
112
@@ -38,7 +38,7 @@ static int save_dev(blkid_dev dev, FILE 
113
 
114
 	fprintf(file,
115
 		"<device DEVNO=\"0x%04lx\" TIME=\"%ld\"",
116
-		(unsigned long) dev->bid_devno, dev->bid_time);
117
+		(unsigned long) dev->bid_devno, (long) dev->bid_time);
118
 	if (dev->bid_pri)
119
 		fprintf(file, " PRI=\"%d\"", dev->bid_pri);
120
 	list_for_each(p, &dev->bid_tags) {
121
diff -r b426cedea5e0 -r 0fbbbe379fea lib/blkid/tag.c
122
--- a/lib/blkid/tag.c	Tue May 30 01:20:17 2006 +0200
123
+++ b/lib/blkid/tag.c	Tue May 30 01:48:51 2006 +0200
124
@@ -386,7 +386,7 @@ void usage(char *prog)
125
 	fprintf(stderr, "Usage: %s [-f blkid_file] [-m debug_mask] device "
126
 		"[type value]\n", 
127
 		prog);
128
-	fprintf(stderr, "\tList all tags for a device and exit\n", prog);
129
+	fprintf(stderr, "\tList all tags for a device and exit\n");
130
 	exit(1);
131
 }
132
 
133
@@ -412,7 +412,7 @@ int main(int argc, char **argv)
134
 		case 'm':
135
 			blkid_debug_mask = strtoul (optarg, &tmp, 0);
136
 			if (*tmp) {
137
-				fprintf(stderr, "Invalid debug mask: %d\n", 
138
+				fprintf(stderr, "Invalid debug mask: %s\n", 
139
 					optarg);
140
 				exit(1);
141
 			}
142
diff -r b426cedea5e0 -r 0fbbbe379fea lib/blkid/tst_types.c
143
--- a/lib/blkid/tst_types.c	Tue May 30 01:20:17 2006 +0200
144
+++ b/lib/blkid/tst_types.c	Tue May 30 01:48:51 2006 +0200
145
@@ -11,7 +11,10 @@
146
 
147
 #include "blkid/blkid_types.h"
148
 
149
-main(int argc, char **argv)
150
+#include <stdlib.h>
151
+#include <stdio.h>
152
+
153
+int main(int argc, char **argv)
154
 {
155
 	if (sizeof(__u8) != 1) {
156
 		printf("Sizeof(__u8) is %d should be 1\n", 
(-)/usr/home/emma/ports/sysutils/e2fsprogs/files/pkg-message.in (-14 lines)
Lines 1-14 Link Here
1
Note: this is a modified version of the e2fsprogs package, not the official
2
package. Report all building and run-time trouble that originates in the
3
package to the port maintainer, <matthias.andree@gmx.de>.
4
5
To have your ext2 and ext3 filesystems fsck'ed correctly without explicitly
6
invoking the fsck_ext2fs utility installed by this port you will need to
7
create links for the fsck utilities installed by this port in /sbin, e.g.
8
9
ln -f %%PREFIX%%/sbin/fsck_ext2fs /sbin/ 2>/dev/null \
10
  || install -m755 %%PREFIX%%/sbin/fsck_ext2fs /sbin/
11
ln -f %%PREFIX%%/sbin/e2fsck /sbin/e2fsck 2>/dev/null \
12
  || install -m755 %%PREFIX%%/sbin/e2fsck /sbin/e2fsck
13
14
IMPORTANT: you also need to repeat the steps above after a port upgrade!
(-)/usr/home/emma/ports/sysutils/e2fsprogs/pkg-deinstall (-9 lines)
Lines 1-9 Link Here
1
if [ "$2" = "POST-DEINSTALL" ] ; then cat - <<_EOF
2
3
If you are deinstalling the e2fsprogs port for good, rather than upgrading it,
4
remember to remove the files you may have installed into /sbin, example:
5
6
rm -f /sbin/fsck_ext2fs /sbin/e2fsck
7
8
_EOF
9
fi
(-)/usr/home/emma/ports/sysutils/e2fsprogs/pkg-install (+79 lines)
Line 0 Link Here
1
# $FreeBSD$
2
#
3
# ports/sysutils/e2fsprogs/pkg-install - (C) 2006 by Matthias Andree
4
# redistributable under the modified BSD license
5
#
6
# ask() and yesno() based on ports/mail/postfix/pkg-install
7
8
PKG_PREFIX=${PKG_PREFIX:=/usr/local}
9
BATCH=${BATCH:=no}
10
11
ask() {
12
        local question default answer
13
14
        question=$1
15
        default=$2
16
        if [ -z "${PACKAGE_BUILDING}" -a x${BATCH} = xno ]; then
17
                read -p "${question} [${default}]? " answer
18
        fi
19
        if [ x${answer} = x ]; then
20
                answer=${default}
21
        fi
22
        echo ${answer}
23
}
24
25
yesno() {
26
        local question default answer
27
28
        question=$1
29
        default=$2
30
        while :; do
31
                answer=$(ask "${question}" "${default}")
32
                case "${answer}" in
33
                        [Yy][Ee][SsPp]|[Yy])  return 0;;
34
                        [Nn]|[Nn][Oo])  return 1;;
35
                esac
36
                echo "Please answer yes or no."
37
        done
38
}
39
40
if [ "x$2" = xPOST-INSTALL ] && [ -z "${PACKAGE_BUILDING}" ]; then
41
	cat <<_EOF
42
43
To have your ext2 and ext3 filesystems fsck'ed correctly without explicitly
44
invoking the fsck_ext2fs utility installed by this port you will need to
45
create links or copy the fsck utilities installed by this port in/to /sbin, e.g.
46
47
ln -f "${PKG_PREFIX}/sbin/fsck_ext2fs" /sbin/ 2>/dev/null \\
48
  || install -m755 "${PKG_PREFIX}/sbin/fsck_ext2fs" /sbin/
49
ln -f "${PKG_PREFIX}/sbin/e2fsck" /sbin/e2fsck 2>/dev/null \\
50
  || install -m755 "${PKG_PREFIX}/sbin/e2fsck" /sbin/e2fsck
51
52
IMPORTANT: you also need to repeat the steps above after a port upgrade!
53
54
_EOF
55
56
	if yesno "Shall I create the links now?" yes ; then
57
		echo "Installing /sbin/fsck_ext2fs and /sbin/e2fsck."
58
		ln -f "${PKG_PREFIX}/sbin/fsck_ext2fs" /sbin/ 2>/dev/null \
59
		  || install -m755 "${PKG_PREFIX}/sbin/fsck_ext2fs" /sbin/
60
		ln -f "${PKG_PREFIX}/sbin/e2fsck" /sbin/e2fsck 2>/dev/null \
61
		  || install -m755 "${PKG_PREFIX}/sbin/e2fsck" /sbin/e2fsck
62
	fi
63
fi
64
65
if [ "x$2" = xDEINSTALL ] ; then
66
	cat <<_EOF
67
68
If you are deinstalling the e2fsprogs port for good, rather than upgrading it,
69
remember to remove the files you may have installed into /sbin, example:
70
71
rm -f /sbin/fsck_ext2fs /sbin/e2fsck
72
73
_EOF
74
75
	if yesno "Shall I remove the links now?" yes ; then
76
		echo "Removing /sbin/fsck_ext2fs and /sbin/e2fsck."
77
		rm -f /sbin/fsck_ext2fs /sbin/e2fsck
78
	fi
79
fi
(-)/usr/home/emma/ports/sysutils/e2fsprogs/pkg-message (+3 lines)
Line 0 Link Here
1
Note: this is a modified version of the e2fsprogs package, not the official
2
package. Report all building and run-time trouble that originates in the
3
package to the port maintainer, <matthias.andree@gmx.de>.
(-)/usr/home/emma/ports/sysutils/e2fsprogs/pkg-plist (+4 lines)
Lines 1-5 Link Here
1
bin/chattr
1
bin/chattr
2
bin/lsattr
2
bin/lsattr
3
@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
4
@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
5
etc/mke2fs.conf.dist
6
@exec test -f %D/etc/mke2fs.conf || cp -p %D/etc/mke2fs.conf.dist %D/etc/mke2fs.conf
3
sbin/badblocks
7
sbin/badblocks
4
sbin/blkid
8
sbin/blkid
5
sbin/debugfs
9
sbin/debugfs

Return to bug 98847