On Mon, Nov 22, 2010 at 11:31:27PM -0500, Victor Duchovni wrote: > There is plenty of room for polish, but none of this rocket science, > just some tedious wacking of the library and program Makefile after > making some naming and style choices.
By the way, with a bit more effort, got all of Postfix *compiled* with
shared libraries, and found a couple of non-Makefile obstacles. Other
than that, everything builds with all libraries as shared objects. This is
of course just on one platform and with the install logic still pending.
The Makefile/makedefs work in progress is attached. Many of the test
programs will not yet compile, have not updated their make rules...
The non-Makefile issues:
- libglobal has dependencies on variables not found in all
executables.
* The scache_clnt driver erroneously uses var_scache_service,
instead of the intended "server" argument.
--- src/global/scache_clnt.c 2010-02-06 02:34:53.000000000 -0500
+++ src/global/scache_clnt.c 2010-11-23 01:21:36.000000000 -0500
@@ -414,7 +414,7 @@
sp->scache->size = scache_clnt_size;
sp->scache->free = scache_clnt_free;
- service = concatenate("local:private/", var_scache_service, (char *) 0);
+ service = concatenate("local:private/", server, (char *) 0);
sp->auto_clnt = auto_clnt_create(service, timeout, idle_limit, ttl_limit);
myfree(service);
* The var_command_maxtime variable used in pipe_command() is
not available in all executables. The simplest fix is to
initialize it in mail_params.c. There are of course other
solutions, if we want to restrict growth of the list of
parameters initialized for all Postfix daemons and utilities.
diff -Nru postfix0/src/global/mail_params.c postfix/src/global/mail_params.c
--- postfix0/src/global/mail_params.c 2010-02-06 02:34:48.000000000 -0500
+++ postfix/src/global/mail_params.c 2010-11-23 01:37:01.000000000 -0500
@@ -50,6 +50,7 @@
/* char *var_mail_version;
/* int var_ipc_idle_limit;
/* int var_ipc_ttl_limit;
+/* int var_command_maxtime;
/* char *var_db_type;
/* char *var_hash_queue_names;
/* int var_hash_queue_depth;
@@ -235,6 +236,7 @@
char *var_mail_version;
int var_ipc_idle_limit;
int var_ipc_ttl_limit;
+int var_command_maxtime;
char *var_db_type;
char *var_hash_queue_names;
int var_hash_queue_depth;
@@ -607,6 +609,7 @@
VAR_FLOCK_STALE, DEF_FLOCK_STALE, &var_flock_stale, 1, 0,
VAR_DAEMON_TIMEOUT, DEF_DAEMON_TIMEOUT, &var_daemon_timeout, 1, 0,
VAR_IN_FLOW_DELAY, DEF_IN_FLOW_DELAY, &var_in_flow_delay, 0, 10,
+ VAR_COMMAND_MAXTIME, DEF_COMMAND_MAXTIME, &var_command_maxtime, 1, 0,
0,
};
static const CONFIG_BOOL_TABLE bool_defaults[] = {
diff -Nru postfix0/src/local/local.c postfix/src/local/local.c
--- postfix0/src/local/local.c 2010-10-07 16:02:38.000000000 -0400
+++ postfix/src/local/local.c 2010-11-23 01:34:18.000000000 -0500
@@ -626,7 +626,6 @@
char *var_allow_files;
char *var_alias_maps;
int var_dup_filter_limit;
-int var_command_maxtime;
char *var_home_mailbox;
char *var_mailbox_command;
char *var_mailbox_cmd_maps;
@@ -866,10 +865,6 @@
int main(int argc, char **argv)
{
- static const CONFIG_TIME_TABLE time_table[] = {
- VAR_COMMAND_MAXTIME, DEF_COMMAND_MAXTIME, &var_command_maxtime, 1, 0,
- 0,
- };
static const CONFIG_INT_TABLE int_table[] = {
VAR_DUP_FILTER_LIMIT, DEF_DUP_FILTER_LIMIT, &var_dup_filter_limit, 0, 0,
VAR_MAILBOX_LIMIT, DEF_MAILBOX_LIMIT, &var_mailbox_limit, 0, 0,
@@ -925,7 +920,6 @@
MAIL_SERVER_STR_TABLE, str_table,
MAIL_SERVER_RAW_TABLE, raw_table,
MAIL_SERVER_BOOL_TABLE, bool_table,
- MAIL_SERVER_TIME_TABLE, time_table,
MAIL_SERVER_PRE_INIT, pre_init,
MAIL_SERVER_POST_INIT, post_init,
MAIL_SERVER_PRE_ACCEPT, pre_accept,
diff -Nru postfix0/src/pipe/pipe.c postfix/src/pipe/pipe.c
--- postfix0/src/pipe/pipe.c 2010-02-06 02:34:58.000000000 -0500
+++ postfix/src/pipe/pipe.c 2010-11-23 01:34:35.000000000 -0500
@@ -1311,10 +1311,6 @@
int main(int argc, char **argv)
{
- static const CONFIG_TIME_TABLE time_table[] = {
- VAR_COMMAND_MAXTIME, DEF_COMMAND_MAXTIME, &var_command_maxtime, 1, 0,
- 0,
- };
/*
* Fingerprint executables and core dumps.
@@ -1322,7 +1318,6 @@
MAIL_VERSION_STAMP_ALLOCATE;
single_server_main(argc, argv, pipe_service,
- MAIL_SERVER_TIME_TABLE, time_table,
MAIL_SERVER_PRE_INIT, pre_init,
MAIL_SERVER_POST_INIT, drop_privileges,
MAIL_SERVER_PRE_ACCEPT, pre_accept,
diff -Nru postfix0/src/spawn/spawn.c postfix/src/spawn/spawn.c
--- postfix0/src/spawn/spawn.c 2010-02-06 02:35:08.000000000 -0500
+++ postfix/src/spawn/spawn.c 2010-11-23 01:35:05.000000000 -0500
@@ -346,10 +346,6 @@
int main(int argc, char **argv)
{
- static const CONFIG_TIME_TABLE time_table[] = {
- VAR_COMMAND_MAXTIME, DEF_COMMAND_MAXTIME, &var_command_maxtime, 1, 0,
- 0,
- };
/*
* Fingerprint executables and core dumps.
@@ -357,7 +353,6 @@
MAIL_VERSION_STAMP_ALLOCATE;
single_server_main(argc, argv, spawn_service,
- MAIL_SERVER_TIME_TABLE, time_table,
MAIL_SERVER_POST_INIT, drop_privileges,
MAIL_SERVER_PRE_ACCEPT, pre_accept,
MAIL_SERVER_PRIVILEGED,
--
Viktor.
p.diff.gz
Description: application/gunzip
