rpms/postfix/devel postfix-large-fs.patch, NONE, 1.1 postfix.spec, 1.27, 1.28

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Wed Apr 20 15:28:24 UTC 2005


Update of /cvs/dist/rpms/postfix/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv14967

Modified Files:
	postfix.spec 
Added Files:
	postfix-large-fs.patch 
Log Message:
* Wed Apr 20 2005 Tomas Mraz <tmraz at redhat.com> 2:2.2.2-2
- fix fsspace on large filesystems (>2G blocks)


postfix-large-fs.patch:
 fsspace.c  |   12 ++++++++++--
 sys_defs.h |    4 ++--
 2 files changed, 12 insertions(+), 4 deletions(-)

--- NEW FILE postfix-large-fs.patch ---
--- postfix-2.2.2/src/util/sys_defs.h.large-fs	2005-02-04 01:07:44.000000000 +0100
+++ postfix-2.2.2/src/util/sys_defs.h	2005-04-20 16:36:55.621279565 +0200
@@ -618,8 +618,8 @@
 #define GETTIMEOFDAY(t)	gettimeofday(t,(struct timezone *) 0)
 #define ROOT_PATH	"/bin:/usr/bin:/sbin:/usr/sbin"
 #define FIONREAD_IN_TERMIOS_H
-#define USE_STATFS
-#define STATFS_IN_SYS_VFS_H
+#define USE_STATVFS
+#define STATVFS_IN_SYS_STATVFS_H
 #define UNIX_DOMAIN_CONNECT_BLOCKS_FOR_ACCEPT
 #define PREPEND_PLUS_TO_OPTSTRING
 #define HAS_POSIX_REGEXP
--- postfix-2.2.2/src/util/fsspace.c.large-fs	1999-06-25 02:06:14.000000000 +0200
+++ postfix-2.2.2/src/util/fsspace.c	2005-04-20 16:53:28.777232112 +0200
@@ -38,6 +38,7 @@
 /*--*/
 
 /* System library. */
+#define _FILE_OFFSET_BITS 64
 
 #include <sys_defs.h>
 
@@ -91,8 +92,15 @@
 
     if (statvfs(path, &fsbuf) < 0)
 	msg_fatal("statvfs %s: %m", path);
-    sp->block_size = fsbuf.f_frsize;
-    sp->block_free = fsbuf.f_bavail;
+    if (fsbuf.f_frsize > 0)
+	sp->block_size = fsbuf.f_frsize;
+    else
+	sp->block_size = fsbuf.f_bsize;
+    /* 4G of FS blocks is surely enough space to put a mail in */
+    sp->block_free = 0;
+    sp->block_free = ~sp->block_free;
+    if (fsbuf.f_bavail < sp->block_free)
+	sp->block_free = fsbuf.f_bavail;
 #endif
     if (msg_verbose)
 	msg_info("%s: %s: block size %lu, blocks free %lu",


Index: postfix.spec
===================================================================
RCS file: /cvs/dist/rpms/postfix/devel/postfix.spec,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -r1.27 -r1.28
--- postfix.spec	12 Apr 2005 09:40:39 -0000	1.27
+++ postfix.spec	20 Apr 2005 15:28:22 -0000	1.28
@@ -43,7 +43,7 @@
 Name: postfix
 Summary: Postfix Mail Transport Agent
 Version: 2.2.2
-Release: 1
+Release: 2
 Epoch: 2
 Group: System Environment/Daemons
 URL: http://www.postfix.org
@@ -78,6 +78,7 @@
 Patch5: postfix-2.1.1-pie.patch
 Patch6: postfix-2.1.1-obsolete.patch
 Patch7: postfix-2.1.5-aliases.patch
+Patch8: postfix-large-fs.patch
 
 # Optional patches - set the appropriate environment variables to include
 #                    them when building the package/spec file
@@ -132,6 +133,7 @@
 %patch5 -p1 -b .pie
 %patch6 -p1 -b .obsolete
 %patch7 -p1 -b .aliases
+%patch8 -p1 -b .large-fs
 
 %if %{PFLOGSUMM}
 gzip -dc %{SOURCE53} | tar xf -
@@ -459,6 +461,9 @@
 
 
 %changelog
+* Wed Apr 20 2005 Tomas Mraz <tmraz at redhat.com> 2:2.2.2-2
+- fix fsspace on large filesystems (>2G blocks)
+
 * Tue Apr 12 2005 Thomas Woerner <twoerner at redhat.com> 2:2.2.2-1
 - new version 2.2.2
 




More information about the fedora-cvs-commits mailing list