rpms/dbmail/devel dbmail-hup.patch, NONE, 1.1 dbmail-thread-references.patch, NONE, 1.1 dbmail.spec, 1.13, 1.14
Bernard Johnson (bjohnson)
fedora-extras-commits at redhat.com
Sat Jun 23 19:55:11 UTC 2007
Author: bjohnson
Update of /cvs/pkgs/rpms/dbmail/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv30067/devel
Modified Files:
dbmail.spec
Added Files:
dbmail-hup.patch dbmail-thread-references.patch
Log Message:
don't filter libdbmail.so* from provides
patch to make logfiles rotate on -HUP
patch to give correct error when thread references are requested
dbmail-hup.patch:
--- NEW FILE dbmail-hup.patch ---
Index: server.c
===================================================================
--- server.c (revision 2646)
+++ server.c (revision 2647)
@@ -172,20 +172,36 @@
return Restart;
}
-pid_t server_daemonize(serverConfig_t *conf)
+/* Should be called after a HUP to allow for log rotation,
+ * as the filesystem may want to give us new inodes and/or
+ * the user may have changed the log file configs. */
+static void reopen_logs(serverConfig_t *conf)
{
int serr;
- assert(conf);
+
+ if (! (freopen(conf->log, "a", stdout))) {
+ serr = errno;
+ TRACE(TRACE_ERROR, "freopen failed on [%s] [%s]",
+ conf->log, strerror(serr));
+ }
+ if (! (freopen(conf->error_log, "a", stderr))) {
+ serr = errno;
+ TRACE(TRACE_ERROR, "freopen failed on [%s] [%s]",
+ conf->error_log, strerror(serr));
+ }
+ if (! (freopen("/dev/null", "r", stdin))) {
+ serr = errno;
+ TRACE(TRACE_ERROR, "freopen failed on stdin [%s]",
+ strerror(serr));
+ }
+}
- if (fork())
- exit(0);
- setsid();
- if (fork())
- exit(0);
+/* Should be called once to initially close the actual std{in,out,err}
+ * and open the redirection files. */
+static void reopen_logs_fatal(serverConfig_t *conf)
+{
+ int serr;
- chdir("/");
- umask(0077);
-
if (! (freopen(conf->log, "a", stdout))) {
serr = errno;
TRACE(TRACE_FATAL, "freopen failed on [%s] [%s]",
@@ -201,7 +217,23 @@
TRACE(TRACE_FATAL, "freopen failed on stdin [%s]",
strerror(serr));
}
+}
+pid_t server_daemonize(serverConfig_t *conf)
+{
+ assert(conf);
+
+ if (fork())
+ exit(0);
+ setsid();
+ if (fork())
+ exit(0);
+
+ chdir("/");
+ umask(0077);
+
+ reopen_logs_fatal(conf);
+
TRACE(TRACE_DEBUG, "sid: [%d]", getsid(0));
return getsid(0);
@@ -225,6 +257,8 @@
int serrno, status, result = 0;
pid_t pid = -1;
+ reopen_logs(conf);
+
CreateSocket(conf);
switch ((pid = fork())) {
dbmail-thread-references.patch:
--- NEW FILE dbmail-thread-references.patch ---
Index: imapcommands.c
===================================================================
--- imapcommands.c (revision 2641)
+++ imapcommands.c (revision 2642)
@@ -1384,7 +1384,8 @@
if (MATCH(self->args[0],"ORDEREDSUBJECT"))
return sorted_search(self,SEARCH_THREAD_ORDEREDSUBJECT);
if (MATCH(self->args[0],"REFERENCES"))
- return sorted_search(self,SEARCH_THREAD_REFERENCES);
+ dbmail_imap_session_printf(self, "%s BAD THREAD=REFERENCES not supported\r\n",self->tag);
+ //return sorted_search(self,SEARCH_THREAD_REFERENCES);
return 1;
}
Index: dbmail.spec
===================================================================
RCS file: /cvs/pkgs/rpms/dbmail/devel/dbmail.spec,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- dbmail.spec 23 Jun 2007 09:29:40 -0000 1.13
+++ dbmail.spec 23 Jun 2007 19:54:36 -0000 1.14
@@ -11,7 +11,7 @@
Name: dbmail
Version: 2.2.5
-Release: 4%{?dist}
+Release: 5%{?dist}
Summary: The DBMail mail storage system
Group: System Environment/Daemons
@@ -25,6 +25,8 @@
Source5: dbmail.cron
Source6: dbmail.logrotate
Source7: README.fedora
+Patch0: dbmail-thread-references.patch
+Patch1: dbmail-hup.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -65,6 +67,9 @@
%prep
%setup -q
+%patch0 -p0 -b .thread-references
+%patch1 -p0 -b .hup
+
# we don't need README.solaris and we don't want it caught up in the %%doc
# README* wildcard - but we do want our shiny new README.fedora file to be
# installed
@@ -88,7 +93,6 @@
%{__find_provides} $* |\
sed -e '/libauth_ldap\.so/d' \
-e '/libauth_sql\.so/d' \
- -e '/libdbmail\.so/d' \
-e '/libsort_sieve\.so/d' \
-e '/libsqlite\.so/d' \
-e '/libsqlite\.so/d' \
@@ -231,6 +235,11 @@
%{_libdir}/dbmail/libpgsql*
%changelog
+* Sat Jun 23 2007 Bernard Johnson <bjohnson at symetrix.com> 2.2.5-5
+- patch to reopen logs files on -HUP
+- patch to send error when thread references requested
+- don't filter libdbmail.so*
+
* Sat Jun 23 2007 Bernard Johnson <bjohnson at symetrix.com> 2.2.5-4
- kill ld.so config
- filter private libraries from provides (bz#245326)
More information about the scm-commits
mailing list