OpenPKG CVS Repository
http://cvs.openpkg.org/
____________________________________________________________________________
Server: cvs.openpkg.org Name: Thomas Lotterer
Root: /e/openpkg/cvs Email: [EMAIL PROTECTED]
Module: openpkg-src Date: 25-Nov-2003 17:57:56
Branch: OPENPKG_1_3_SOLID Handle: 2003112516575500
Modified files: (Branch: OPENPKG_1_3_SOLID)
openpkg-src/postfix fsl.postfix postfix.patch postfix.spec rc.postfix
Log:
MFC: PR#268 fsl monitor feature; PR#285 use soft not hard limits
Summary:
Revision Changes Path
1.2.2.1.2.1 +1 -1 openpkg-src/postfix/fsl.postfix
1.2.2.1.2.1 +82 -0 openpkg-src/postfix/postfix.patch
1.109.2.3.2.3+6 -3 openpkg-src/postfix/postfix.spec
1.11.2.1.2.2+1 -1 openpkg-src/postfix/rc.postfix
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: openpkg-src/postfix/fsl.postfix
============================================================================
$ cvs diff -u -r1.2.2.1 -r1.2.2.1.2.1 fsl.postfix
--- openpkg-src/postfix/fsl.postfix 24 Jul 2003 20:45:04 -0000 1.2.2.1
+++ openpkg-src/postfix/fsl.postfix 25 Nov 2003 16:57:55 -0000 1.2.2.1.2.1
@@ -9,7 +9,7 @@
-> {
debug: file(
path="@l_prefix@/var/postfix/log/postfix.log",
- perm=0644
+ perm=0644, monitor=3600
)
}
};
@@ .
patch -p0 <<'@@ .'
Index: openpkg-src/postfix/postfix.patch
============================================================================
$ cvs diff -u -r1.2.2.1 -r1.2.2.1.2.1 postfix.patch
--- openpkg-src/postfix/postfix.patch 24 Jul 2003 20:45:04 -0000 1.2.2.1
+++ openpkg-src/postfix/postfix.patch 25 Nov 2003 16:57:55 -0000 1.2.2.1.2.1
@@ -23,3 +23,85 @@
#endif
}
if (msg_verbose)
+
+https://rt.openpkg.org/Ticket/Display.html?id=285
+ USE_SOFTLIMITONLY kludge
+
+Index: src/util/file_limit.c
+--- src/util/file_limit.c.orig 2000-08-22 23:44:44.000000000 +0200
++++ src/util/file_limit.c 2003-10-28 11:11:47.000000000 +0100
+@@ -80,12 +80,21 @@
+ void set_file_limit(off_t limit)
+ {
+ #ifdef USE_ULIMIT
++#ifdef USE_SOFTLIMITONLY
++#error "USE_ULIMIT and USE_SOFTLIMITONLY are mutual exclusive"
++#endif
+ if (ulimit(UL_SETFSIZE, limit / ULIMIT_BLOCK_SIZE) < 0)
+ msg_fatal("ulimit: %m");
+ #else
+ struct rlimit rlim;
+
++#ifdef USE_SOFTLIMITONLY
++ if (getrlimit(RLIMIT_FSIZE, &rlim) < 0)
++ rlim.rlim_max = RLIM_INFINITY;
++ rlim.rlim_cur = limit;
++#else
+ rlim.rlim_cur = rlim.rlim_max = limit;
++#endif
+ if (setrlimit(RLIMIT_FSIZE, &rlim) < 0)
+ msg_fatal("setrlimit: %m");
+ #ifdef SIGXFSZ
+
+Index: src/util/msg_syslog.c
+--- src/util/msg_syslog.c.orig 2003-09-14 03:34:33.000000000 +0200
++++ src/util/msg_syslog.c 2003-10-28 11:14:00.000000000 +0100
+@@ -49,6 +49,11 @@
+ #include <errno.h>
+ #include <syslog.h>
+ #include <string.h>
++#ifdef USE_SOFTLIMITONLY
++#include <sys/time.h>
++#include <sys/resource.h>
++#include <signal.h>
++#endif
+
+ /* Application-specific. */
+
+@@ -144,6 +149,9 @@
+
+ static void msg_syslog_print(int level, const char *text)
+ {
++#ifdef USE_SOFTLIMITONLY
++ struct rlimit save, rlim;
++#endif
+ static int log_level[] = {
+ LOG_INFO, LOG_WARNING, LOG_ERR, LOG_CRIT, LOG_CRIT,
+ };
+@@ -154,6 +162,15 @@
+ if (level < 0 || level >= (int) (sizeof(log_level) / sizeof(log_level[0])))
+ msg_panic("msg_syslog_print: invalid severity level: %d", level);
+
++#ifdef USE_SOFTLIMITONLY
++ if (getrlimit(RLIMIT_FSIZE, &save) < 0) {
++ save.rlim_cur = RLIM_INFINITY;
++ save.rlim_max = RLIM_INFINITY;
++ }
++ rlim.rlim_cur = save.rlim_max;
++ rlim.rlim_max = save.rlim_max;
++ (void)setrlimit(RLIMIT_FSIZE, &rlim);
++#endif
+ if (level == MSG_INFO) {
+ syslog(syslog_facility | log_level[level], "%.*s",
+ (int) MSG_SYSLOG_RECLEN, text);
+@@ -161,6 +178,9 @@
+ syslog(syslog_facility | log_level[level], "%s: %.*s",
+ severity_name[level], (int) MSG_SYSLOG_RECLEN, text);
+ }
++#ifdef USE_SOFTLIMITONLY
++ (void)setrlimit(RLIMIT_FSIZE, &save);
++#endif
+ }
+
+ /* msg_syslog_init - initialize */
+
@@ .
patch -p0 <<'@@ .'
Index: openpkg-src/postfix/postfix.spec
============================================================================
$ cvs diff -u -r1.109.2.3.2.2 -r1.109.2.3.2.3 postfix.spec
--- openpkg-src/postfix/postfix.spec 25 Sep 2003 12:33:10 -0000 1.109.2.3.2.2
+++ openpkg-src/postfix/postfix.spec 25 Nov 2003 16:57:55 -0000 1.109.2.3.2.3
@@ -39,7 +39,7 @@
Group: Mail
License: IPL
Version: %{V_postfix}
-Release: 1.3.1
+Release: 1.3.2
# package options
%option with_fsl yes
@@ -69,8 +69,8 @@
BuildPreReq: pcre, db
PreReq: pcre, db
%if "%{with_fsl}" == "yes"
-BuildPreReq: fsl >= 1.2.0
-PreReq: fsl >= 1.2.0
+BuildPreReq: fsl >= 1.3.0
+PreReq: fsl >= 1.3.0
%endif
%if "%{with_tls}" == "yes"
BuildPreReq: openssl
@@ -181,7 +181,10 @@
CCARGS="$CCARGS -DHAS_LDAP"
AUXLIBS="$AUXLIBS -lldap -llber -lssl -lcrypto"
%endif
+%if "%{with_fsl}" == "yes"
AUXLIBS="$AUXLIBS %{l_fsl_ldflags} %{l_fsl_libs}"
+ CCARGS="$CCARGS -DUSE_SOFTLIMITONLY"
+%endif
%if "%{with_fdsetsize}" != "no"
%if "%{with_fdsetsize}" == "yes"
CCARGS="$CCARGS -DFD_SETSIZE=1024"
@@ .
patch -p0 <<'@@ .'
Index: openpkg-src/postfix/rc.postfix
============================================================================
$ cvs diff -u -r1.11.2.1.2.1 -r1.11.2.1.2.2 rc.postfix
--- openpkg-src/postfix/rc.postfix 25 Sep 2003 12:33:10 -0000 1.11.2.1.2.1
+++ openpkg-src/postfix/rc.postfix 25 Nov 2003 16:57:55 -0000 1.11.2.1.2.2
@@ -69,6 +69,6 @@
-n ${postfix_log_numfiles} -s ${postfix_log_minsize} -d \
-z ${postfix_log_complevel} -m 644 -o @l_musr@ -g @l_mgrp@ \
-P "$postfix_log_prolog" \
- -E "$postfix_log_epilog && rc postfix reload" \
+ -E "$postfix_log_epilog" \
@l_prefix@/var/postfix/log/postfix.log
@@ .
______________________________________________________________________
The OpenPKG Project www.openpkg.org
CVS Repository Commit List [EMAIL PROTECTED]