OpenPKG CVS Repository
http://cvs.openpkg.org/
____________________________________________________________________________
Server: cvs.openpkg.org Name: Michael van Elst
Root: /e/openpkg/cvs Email: [EMAIL PROTECTED]
Module: openpkg-web, openpkg-src Date: 10-Dec-2002 22:33:44
Branch: HEAD Handle: 2002121021334201
Modified files:
openpkg-src/sendmail etc.sendmail.tar sendmail-db4.patch sendmail.spec
openpkg-web news.txt
Log:
make db4 patch conditional, remove some dependencies, make tls/sasl/ldap/milter
options
Summary:
Revision Changes Path
1.6 BLOB openpkg-src/sendmail/etc.sendmail.tar
1.3 +53 -9 openpkg-src/sendmail/sendmail-db4.patch
1.44 +54 -8 openpkg-src/sendmail/sendmail.spec
1.2241 +1 -0 openpkg-web/news.txt
____________________________________________________________________________
Index: openpkg-src/sendmail/etc.sendmail.tar
============================================================
$ cvs update -p -r1.5 etc.sendmail.tar >etc.sendmail.tar.old
$ cvs update -p -r1.6 etc.sendmail.tar >etc.sendmail.tar.new
$ diff -u etc.sendmail.tar.old etc.sendmail.tar.new
Binary files etc.sendmail.tar.old and etc.sendmail.tar.new differ
Index: openpkg-src/sendmail/sendmail-db4.patch
============================================================
$ cvs diff -u -r1.2 -r1.3 sendmail-db4.patch
--- openpkg-src/sendmail/sendmail-db4.patch 5 Dec 2002 14:48:08 -0000 1.2
+++ openpkg-src/sendmail/sendmail-db4.patch 10 Dec 2002 21:33:43 -0000 1.3
@@ -1,6 +1,6 @@
diff -Naur sendmail-8.12.6.orig/libsmdb/smdb2.c sendmail-8.12.6/libsmdb/smdb2.c
--- sendmail-8.12.6.orig/libsmdb/smdb2.c Wed Dec 4 17:24:48 2002
-+++ sendmail-8.12.6/libsmdb/smdb2.c Thu Dec 5 14:29:52 2002
++++ sendmail-8.12.6/libsmdb/smdb2.c Tue Dec 10 14:05:09 2002
@@ -523,7 +523,11 @@
}
}
@@ -13,15 +13,19 @@
if (result != 0)
{
(void) (*db)->close(*db, 0);
-@@ -571,7 +575,6 @@
+@@ -571,7 +575,10 @@
SMDB_USER_INFO *user_info;
SMDB_DBPARAMS *db_params;
{
- bool lockcreated = false;
++#if (DB_VERSION_MAJOR >=4 && DB_VERSION_MINOR >= 1)
++#else
++ bool lockcreated = false;
++#endif
int result;
int db_flags;
int lock_fd;
-@@ -580,7 +583,6 @@
+@@ -580,7 +587,6 @@
SMDB_DB2_DATABASE *db2;
DB *db;
DBTYPE db_type;
@@ -29,7 +33,7 @@
char db_file_name[MAXPATHLEN];
*database = NULL;
-@@ -590,27 +592,7 @@
+@@ -590,27 +596,33 @@
if (result != SMDBE_OK)
return result;
@@ -54,11 +58,37 @@
- mode |= O_TRUNC;
- mode &= ~(O_CREAT|O_EXCL);
- }
++#if (DB_VERSION_MAJOR >=4 && DB_VERSION_MINOR >= 1)
++#else
++ result = smdb_setup_file(db_name, SMDB2_FILE_EXTENSION,
++ mode_mask, sff, user_info, &stat_info);
++ if (result != SMDBE_OK)
++ return result;
++#endif
++
+ lock_fd = -1;
++
++#if (DB_VERSION_MAJOR >=4 && DB_VERSION_MINOR >= 1)
++#else
++ if (stat_info.st_mode == ST_MODE_NOFILE &&
++ bitset(mode, O_CREAT))
++ lockcreated = true;
++
++ result = smdb_lock_file(&lock_fd, db_name, mode, sff,
++ SMDB2_FILE_EXTENSION);
++ if (result != SMDBE_OK)
++ return result;
++
++ if (lockcreated)
++ {
++ mode |= O_TRUNC;
++ mode &= ~(O_CREAT|O_EXCL);
++ }
++#endif
smdb_db = smdb_malloc_database();
if (smdb_db == NULL)
-@@ -620,8 +602,6 @@
+@@ -620,8 +632,6 @@
if (db2 == NULL)
return SMDBE_MALLOC;
@@ -67,7 +97,7 @@
db_type = smdb_type_to_db2_type(type);
db = NULL;
-@@ -634,7 +614,7 @@
+@@ -634,7 +644,7 @@
if (mode == O_RDONLY)
db_flags |= DB_RDONLY;
# if !HASFLOCK && defined(DB_FCNTL_LOCKING)
@@ -76,7 +106,7 @@
# endif /* !HASFLOCK && defined(DB_FCNTL_LOCKING) */
result = smdb_db_open_internal(db_file_name, db_type,
-@@ -645,6 +625,8 @@
+@@ -645,6 +655,8 @@
result = db->fd(db, &db_fd);
if (result == 0)
result = SMDBE_OK;
@@ -85,38 +115,52 @@
}
else
{
-@@ -655,12 +637,17 @@
+@@ -655,12 +667,25 @@
result = SMDBE_BAD_OPEN;
}
- if (result == SMDBE_OK)
- result = smdb_filechanged(db_name, SMDB2_FILE_EXTENSION, db_fd,
- &stat_info);
++#if (DB_VERSION_MAJOR >=4 && DB_VERSION_MINOR >= 1)
+ if (result == SMDBE_OK) {
+ result = smdb_lock_file(&lock_fd, db_name, mode, sff,
+ SMDB2_FILE_EXTENSION);
+ if (result != SMDBE_OK)
+ lock_fd = -1; /* paranoia */
+ }
++#else
++ if (result == SMDBE_OK)
++ result = smdb_filechanged(db_name, SMDB2_FILE_EXTENSION, db_fd,
++ &stat_info);
++#endif
if (result == SMDBE_OK)
{
++#if (DB_VERSION_MAJOR >=4 && DB_VERSION_MINOR >= 1)
+ db2->smdb2_lock_fd = lock_fd;
++#endif
+
/* Everything is ok. Setup driver */
db2->smdb2_db = db;
-@@ -680,10 +667,12 @@
+@@ -680,10 +705,18 @@
return SMDBE_OK;
}
++#if (DB_VERSION_MAJOR >=4 && DB_VERSION_MINOR >= 1)
+ if (lock_fd != -1)
+ smdb_unlock_file(lock_fd);
++#endif
+
if (db != NULL)
db->close(db, 0);
- smdb_unlock_file(db2->smdb2_lock_fd);
++#if (DB_VERSION_MAJOR >=4 && DB_VERSION_MINOR >= 1)
++#else
++ smdb_unlock_file(db2->smdb2_lock_fd);
++#endif
free(db2);
smdb_free_database(smdb_db);
Index: openpkg-src/sendmail/sendmail.spec
============================================================
$ cvs diff -u -r1.43 -r1.44 sendmail.spec
--- openpkg-src/sendmail/sendmail.spec 6 Dec 2002 13:51:53 -0000 1.43
+++ openpkg-src/sendmail/sendmail.spec 10 Dec 2002 21:33:43 -0000 1.44
@@ -27,6 +27,12 @@
# 1 User, group ids in %files must be reviewed
# 2 default config files use 8.11.6 options
+# build options
+%{!?with_tls: %define with_tls yes}
+%{!?with_sasl: %define with_sasl no}
+%{!?with_milter: %define with_milter no}
+%{!?with_ldap: %define with_ldap no}
+
# package information
Name: sendmail
Summary: Mail Transfer Agent
@@ -37,7 +43,7 @@
Group: Mail
License: BSD
Version: 8.12.6
-Release: 20021205
+Release: 20021210
# list of sources
Source0: ftp://ftp.sendmail.org/pub/sendmail/sendmail.%{version}.tar.gz
@@ -47,13 +53,24 @@
Source4: rc.sendmail
Patch0: http://www.sendmail.org/patches/smrsh-20020924.patch
Patch1: http://www.sendmail.org/patches/proto.m4.8.649.2.13
-Patch2: sendmail-db4.patch
+Patch2: http://www.sendmail.org/~ca/email/patches/recipient.c.8.330.2.1
+Patch3: http://www.sendmail.org/~ca/email/patches/proto.m4.8.646
+Patch4: sendmail-db4.patch
# build information
Prefix: %{l_prefix}
BuildRoot: %{l_buildroot}
-BuildPreReq: OpenPKG, openpkg >= 20020206, m4, fsl, tar, gcc, make, db >= 4.1.24,
openssl
-PreReq: OpenPKG, openpkg >= 20020206, m4, fsl, make, perl
+BuildPreReq: OpenPKG, openpkg, m4, fsl, tar, gcc, make, db
+PreReq: OpenPKG, openpkg, m4, fsl, make, perl
+%if "%{with_tls}" == "yes"
+BuildPreReq: openssl
+%endif
+%if "%{with_sasl}" == "yes"
+BuildPreReq: sasl, openssl
+%endif
+%if "%{with_ldap}" == "yes"
+BuildPreReq: openldap, openssl
+%endif
AutoReq: no
AutoReqProv: no
Provides: MTA
@@ -64,17 +81,29 @@
features specific to the OpenPKG distribution including fsl(3) logging
rather than syslog(3) and STARTTLS support by default.
+ Options:
+ --define 'with_tls %{with_tls}'
+ --define 'with_sasl %{with_sasl}'
+ --define 'with_milter %{with_milter}'
+ --define 'with_ldap %{with_ldap}'
+
%prep
# unpack standard tarballs
%setup0 -q -c
%setup1 -q -T -D -a 1
- ( cd sendmail-%{version}/smrsh ;
+ ( cd sendmail-%{version}/smrsh
%patch0 -p0
)
( cd sendmail-%{version}/cf/m4
%patch1 -p0
)
- %patch2 -p0
+ ( cd sendmail-%{version}/sendmail
+ %patch2 -p0
+ )
+ ( cd sendmail-%{version}/cf/m4
+ %patch3 -p0
+ )
+ %patch4 -p0
# add own M4 stuff to Sendmail configuration set
( cd sendmail-%{version}
@@ -126,9 +155,25 @@
echo "APPENDDEF(\`confLIBDIRS', \`-L%{l_prefix}/lib')dnl"
echo "APPENDDEF(\`confLIBS', \`-lfsl -ldb')dnl"
echo "define(\`confSTDIO_TYPE', \`portable')dnl"
+ echo "APPENDDEF(\`confENVDEF', \`-DDNSMAP')dnl"
+%if "%{with_tls}" == "yes"
echo "APPENDDEF(\`conf_sendmail_ENVDEF', \`-DSTARTTLS')dnl"
- echo "APPENDDEF(\`conf_sendmail_ENVDEF', \`-DDNEWDB')dnl"
echo "APPENDDEF(\`conf_sendmail_LIBS', \`-lssl -lcrypto')dnl"
+%endif
+%if "%{with_sasl}" == "yes"
+ echo "APPENDDEF(\`confENVDEF', \`-DSASL=1')dnl"
+ echo "APPENDDEF(\`confINCDIRS', \`-I%{l_prefix}/include/sasl')dnl"
+ echo "APPENDDEF(\`confLIBS', \`-lsasl2 -lcrypto')dnl"
+%endif
+%if "%{with_milter}" == "yes"
+ echo "APPENDDEF(\`conf_sendmail_ENVDEF', \`-DMILTER')dnl"
+ echo "APPENDDEF(\`conf_libmilter_ENVDEF',
\`-D_FFR_MILTER_ROOT_UNSAFE')dnl"
+%endif
+%if "%{with_ldap}" == "yes"
+ echo "APPENDDEF(\`confMAPDEF', \`-DLDAPMAP')dnl"
+ echo "APPENDDEF(\`confENVDEF', \`-DSM_CONF_LDAP_MEMFREE=1')dnl"
+ echo "APPENDDEF(\`confLIBS', \`-lldap -llber -lssl -lcrypto')dnl"
+%endif
) >devtools/Site/site.config.m4
# build Sendmail package
@@ -244,7 +289,8 @@
# create important files which have to be present from the beginning
%{l_shtool} mkdir -f -p -m 700 \
$RPM_BUILD_ROOT%{l_prefix}/var/sendmail/mqueue \
- $RPM_BUILD_ROOT%{l_prefix}/var/sendmail/mqueue/.hoststat \
+ $RPM_BUILD_ROOT%{l_prefix}/var/sendmail/mqueue/.hoststat
+ %{l_shtool} mkdir -f -p -m 770 \
$RPM_BUILD_ROOT%{l_prefix}/var/sendmail/clientmqueue \
$RPM_BUILD_ROOT%{l_prefix}/var/sendmail/clientmqueue/.hoststat
touch $RPM_BUILD_ROOT%{l_prefix}/var/sendmail/sendmail.in.pid
Index: openpkg-web/news.txt
============================================================
$ cvs diff -u -r1.2240 -r1.2241 news.txt
--- openpkg-web/news.txt 10 Dec 2002 19:35:33 -0000 1.2240
+++ openpkg-web/news.txt 10 Dec 2002 21:33:42 -0000 1.2241
@@ -1,3 +1,4 @@
+10-Dec-2002: Upgraded package: P<sendmail-8.12.6-20021210>
10-Dec-2002: Upgraded package: P<easysoap-0.6.1-20021210>
10-Dec-2002: New package: P<perl-text-20021210-20021210>
10-Dec-2002: New package: P<perl-dbix-20021210-20021210>
______________________________________________________________________
The OpenPKG Project www.openpkg.org
CVS Repository Commit List [EMAIL PROTECTED]