From a49a2fae7f916f0597e9be1885e1d98e450890f8 Mon Sep 17 00:00:00 2001 From: rrw Date: Wed, 18 Jul 2001 22:56:22 +0000 Subject: [PATCH 1/1] - added support for WHOSON client library and conditional build for it Changed files: exim-whoson.patch -> 1.1 exim.spec -> 1.65 --- exim-whoson.patch | 161 ++++++++++++++++++++++++++++++++++++++++++++++ exim.spec | 8 ++- 2 files changed, 167 insertions(+), 2 deletions(-) create mode 100644 exim-whoson.patch diff --git a/exim-whoson.patch b/exim-whoson.patch new file mode 100644 index 0000000..3db3f7c --- /dev/null +++ b/exim-whoson.patch @@ -0,0 +1,161 @@ +diff -uNr exim-3.31/scripts/MakeLinks exim-3.31-whoson/scripts/MakeLinks +--- exim-3.31/scripts/MakeLinks Mon Jul 2 11:46:41 2001 ++++ exim-3.31-whoson/scripts/MakeLinks Wed Jul 18 23:21:46 2001 +@@ -79,6 +79,8 @@ + ln -s ../../src/lookups/pgsql.c pgsql.c + ln -s ../../src/lookups/testdb.h testdb.h + ln -s ../../src/lookups/testdb.c testdb.c ++ln -s ../../src/lookups/whoson.h whoson.h ++ln -s ../../src/lookups/whoson.c whoson.c + cd .. + + # Likewise for the code for the directors +diff -uNr exim-3.31/src/EDITME exim-3.31-whoson/src/EDITME +--- exim-3.31/src/EDITME Mon Jul 2 11:46:41 2001 ++++ exim-3.31-whoson/src/EDITME Wed Jul 18 20:38:52 2001 +@@ -577,3 +577,5 @@ + # USE_TCP_WRAPPERS=yes + + # End of EDITME ++ ++LOOKUP_WHOSON=yes +diff -uNr exim-3.31/src/config.h.defaults exim-3.31-whoson/src/config.h.defaults +--- exim-3.31/src/config.h.defaults Mon Jul 2 11:46:41 2001 ++++ exim-3.31-whoson/src/config.h.defaults Wed Jul 18 20:39:10 2001 +@@ -106,3 +106,5 @@ + #define ROOT_UID 0 + + /* End of config.h.defaults */ ++ ++#define LOOKUP_WHOSON +diff -uNr exim-3.31/src/drtables.c exim-3.31-whoson/src/drtables.c +--- exim-3.31/src/drtables.c Mon Jul 2 11:46:42 2001 ++++ exim-3.31-whoson/src/drtables.c Wed Jul 18 23:52:33 2001 +@@ -75,6 +75,10 @@ + #include "lookups/testdb.h" + #endif + ++#ifdef LOOKUP_WHOSON ++#include "lookups/whoson.h" ++#endif ++ + + /* The second field in each item below is a set of bit flags: + +@@ -325,6 +329,19 @@ + NULL, /* no close function */ + NULL, /* no tidy function */ + NULL /* no quoting function */ ++ }, ++#endif ++ ++#ifdef LOOKUP_WHOSON ++ { ++ "whoson", /* lookup name */ ++ lookup_querystyle, /* query-style lookup */ ++ whoson_open, /* open function */ ++ NULL, /* check function */ ++ whoson_find, /* find function */ ++ NULL, /* no close function */ ++ NULL, /* no tidy function */ ++ NULL /* no quoting function */ + }, + #endif + +diff -uNr exim-3.31/src/lookups/Makefile exim-3.31-whoson/src/lookups/Makefile +--- exim-3.31/src/lookups/Makefile Mon Jul 2 11:46:43 2001 ++++ exim-3.31-whoson/src/lookups/Makefile Wed Jul 18 21:42:36 2001 +@@ -4,7 +4,7 @@ + # defined, dummy modules get compiled. + + OBJ = cdb.o dbmdb.o dnsdb.o ldap.o lsearch.o mysql.o nis.o nisplus.o pgsql.o \ +- testdb.o ++ testdb.o whoson.o + + lookups.a: $(OBJ) + /bin/rm -f lookups.a +@@ -25,5 +25,6 @@ + nisplus.o: $(HDRS) nisplus.c nisplus.h + pgsql.o: $(HDRS) pgsql.c pgsql.h + testdb.o: $(HDRS) testdb.c testdb.h ++whoson.o: $(HDRS) whoson.c whoson.h + + # End +diff -uNr exim-3.31/src/lookups/whoson.c exim-3.31-whoson/src/lookups/whoson.c +--- exim-3.31/src/lookups/whoson.c Thu Jan 1 01:00:00 1970 ++++ exim-3.31-whoson/src/lookups/whoson.c Wed Jul 18 23:23:24 2001 +@@ -0,0 +1,57 @@ ++/************************************************* ++* Exim - an Internet mail transport agent * ++*************************************************/ ++ ++/* Copyright (c) University of Cambridge 1995 - 2001 */ ++/* See the file NOTICE for conditions of use and distribution. */ ++ ++#include ++ ++#include "../exim.h" ++#include "whoson.h" ++ ++ ++/************************************************* ++* Open entry point * ++*************************************************/ ++ ++/* See local README for interface description. */ ++ ++void * ++whoson_open(char *filename, char **errmsg) ++{ ++filename = filename; /* Keep picky compilers happy */ ++errmsg = errmsg; ++return (void *)(1); /* Just return something non-null */ ++} ++ ++ ++ ++/************************************************* ++* Find entry point * ++*************************************************/ ++ ++/* See local README for interface description. */ ++ ++int ++whoson_find(void *handle, char *filename, char *query, int length, ++ char **result, char **errmsg) ++{ ++char buffer[80]; ++handle = handle; /* Keep picky compilers happy */ ++filename = filename; ++length = length; ++errmsg = errmsg; ++ ++switch (wso_query(query,buffer,80)) { ++case 0: ++ *result = string_copy(buffer); ++ return OK; ++case -1: ++ return DEFER; ++default: ++ return FAIL; ++} ++} ++ ++/* End of lookups/whoson.c */ +diff -uNr exim-3.31/src/lookups/whoson.h exim-3.31-whoson/src/lookups/whoson.h +--- exim-3.31/src/lookups/whoson.h Thu Jan 1 01:00:00 1970 ++++ exim-3.31-whoson/src/lookups/whoson.h Wed Jul 18 21:43:17 2001 +@@ -0,0 +1,13 @@ ++/************************************************* ++* Exim - an Internet mail transport agent * ++*************************************************/ ++ ++/* Copyright (c) University of Cambridge 1995 - 2001 */ ++/* See the file NOTICE for conditions of use and distribution. */ ++ ++/* Header for the whoson lookup */ ++ ++extern void *whoson_open(char *, char **); ++extern int whoson_find(void *, char *, char *, int, char **, char **); ++ ++/* End of lookups/whoson.h */ diff --git a/exim.spec b/exim.spec index 2c4daa4..868b9e6 100644 --- a/exim.spec +++ b/exim.spec @@ -2,12 +2,13 @@ # _with_pgsql - build wiht PostgreSQ support # _with_mysql - build with MySQL support # _without_ldap - build without LDAP support +# _without_whoson - build without WHOSON support Summary: University of Cambridge Mail Transfer Agent Summary(pl): Agent Transferu Poczty Uniwersytetu w Cambridge Name: exim Version: 3.31 -Release: 1 +Release: 2 License: GPL Group: Networking/Daemons Group(de): Netzwerkwesen/Server @@ -34,8 +35,10 @@ Patch2: %{name}-texinfo.patch Patch3: %{name}-use_system_pcre.patch Patch4: %{name}-Makefile-Default.patch Patch5: %{name}-conf.patch +Patch6: %{name}-whoson.patch URL: http://www.exim.org/ %{!?_without_ldap:BuildRequires: openldap-devel >= 2.0.0} +%{!?_without_whoson:BuildRequires: whoson-devel} %{?_with_mysql:BuildRequires: mysql-devel} %{?_with_pgsql:BuildRequires: postgresql-devel} BuildRequires: XFree86-devel @@ -103,6 +106,7 @@ administracyjny. %patch2 -p0 %patch3 -p1 %patch4 -p1 +%{!?_without_whoson:%patch6 -p1} install %{SOURCE13} doc/FAQ.txt.gz install %{SOURCE14} doc/config.samples.tar.gz @@ -116,7 +120,7 @@ cp -f exim_monitor/EDITME Local/eximon.conf %{?_with_mysql:LOOKUP_MYSQL=yes} \ %{?_with_pgsql:LOOKUP_PGSQL=yes} \ %{!?_without_ldap:LOOKUP_LDAP=yes LDAP_LIB_TYPE=OPENLDAP2} \ - LOOKUP_LIBS="%{!?_without_ldap:-lldap -llber} %{?_with_mysql:-lmysqlclient} %{?_with_pgsql:-lpq}" \ + LOOKUP_LIBS="%{!?_without_ldap:-lldap -llber} %{?_with_mysql:-lmysqlclient} %{?_with_pgsql:-lpq} %{!?_without_whoson:-lwhoson}" \ LOOKUP_INCLUDE="%{?_with_mysql:-I/usr/include/mysql} %{?_with_pgsql:-I/usr/include/pgsql}" makeinfo exim-texinfo-*/doc/{oview,spec,filter}.texinfo -- 2.44.0