forked from pool/postfix
- Set default lmd to default db. Convert btree tables to lmdb too.
This package is without bdb support. That's why convert must be done without any suse release condition. o remove patch postfix-no-btree.patch o add set-default-db-type.patch OBS-URL: https://build.opensuse.org/package/show/server:mail/postfix?expand=0&rev=398
This commit is contained in:
parent
a8b270e441
commit
d5d7245c6d
@ -2,6 +2,9 @@
|
||||
if grep -q "hash:" /etc/postfix/{main.cf,master.cf}; then
|
||||
sed -i 's/hash:/lmdb:/g' /etc/postfix/{main.cf,master.cf}
|
||||
fi
|
||||
if grep -q "btree:" /etc/postfix/{main.cf,master.cf}; then
|
||||
sed -i 's/btree:/lmdb:/g' /etc/postfix/{main.cf,master.cf}
|
||||
fi
|
||||
for i in $( find /etc/postfix/ -name "*.db" )
|
||||
do
|
||||
mv $i $i-back
|
||||
|
@ -1,20 +0,0 @@
|
||||
--- src/global/mail_params.h.orig 2020-05-09 17:51:27.000000000 +0200
|
||||
+++ src/global/mail_params.h 2020-12-25 21:04:11.428544623 +0100
|
||||
@@ -2826,7 +2826,7 @@ extern int var_vrfy_pend_limit;
|
||||
extern char *var_verify_service;
|
||||
|
||||
#define VAR_VERIFY_MAP "address_verify_map"
|
||||
-#define DEF_VERIFY_MAP "btree:$data_directory/verify_cache"
|
||||
+#define DEF_VERIFY_MAP "lmdb:$data_directory/verify_cache"
|
||||
extern char *var_verify_map;
|
||||
|
||||
#define VAR_VERIFY_POS_EXP "address_verify_positive_expire_time"
|
||||
@@ -3594,7 +3594,7 @@ extern char *var_multi_cntrl_cmds;
|
||||
* postscreen(8)
|
||||
*/
|
||||
#define VAR_PSC_CACHE_MAP "postscreen_cache_map"
|
||||
-#define DEF_PSC_CACHE_MAP "btree:$data_directory/postscreen_cache"
|
||||
+#define DEF_PSC_CACHE_MAP "lmdb:$data_directory/postscreen_cache"
|
||||
extern char *var_psc_cache_map;
|
||||
|
||||
#define VAR_SMTPD_SERVICE "smtpd_service_name"
|
@ -1,3 +1,12 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Jan 4 12:17:03 UTC 2021 - Peter Varkoly <varkoly@suse.com>
|
||||
|
||||
- Set default lmd to default db. Convert btree tables to lmdb too.
|
||||
This package is without bdb support. That's why convert must be done
|
||||
without any suse release condition.
|
||||
o remove patch postfix-no-btree.patch
|
||||
o add set-default-db-type.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Dec 25 20:32:04 UTC 2020 - Arjen de Korte <suse+build@de-korte.org>
|
||||
|
||||
|
@ -81,7 +81,7 @@ Patch7: %{name}-ssl-release-buffers.patch
|
||||
Patch8: %{name}-vda-v14-3.0.3.patch
|
||||
Patch9: fix-postfix-script.patch
|
||||
Patch10: %{name}-avoid-infinit-loop-if-no-permission.patch
|
||||
Patch11: %{name}-no-btree.patch
|
||||
Patch11: set-default-db-type.patch
|
||||
BuildRequires: ca-certificates
|
||||
BuildRequires: cyrus-sasl-devel
|
||||
#BuildRequires: db-devel
|
||||
@ -496,10 +496,8 @@ if [ ${1:-0} -gt 1 ]; then
|
||||
if [ "$(%{_sbindir}/postconf -h daemon_directory)" != "%{pf_daemon_directory}" ]; then
|
||||
%{_sbindir}/postconf daemon_directory=%{pf_daemon_directory}
|
||||
fi
|
||||
%if 0%{?suse_version} >= 1520
|
||||
#Replace berkely db
|
||||
/usr/lib/postfix/bin/convert-bdb-to-lmdb.sh
|
||||
%endif
|
||||
fi
|
||||
|
||||
%service_add_post %{name}.service
|
||||
|
85
set-default-db-type.patch
Normal file
85
set-default-db-type.patch
Normal file
@ -0,0 +1,85 @@
|
||||
--- src/util/sys_defs.h.orig 2021-01-04 13:12:06.272285413 +0100
|
||||
+++ src/util/sys_defs.h 2021-01-04 13:12:38.412720371 +0100
|
||||
@@ -51,7 +51,7 @@
|
||||
#define HAS_FSYNC
|
||||
#define HAS_DB
|
||||
#define HAS_SA_LEN
|
||||
-#define NATIVE_DB_TYPE "hash"
|
||||
+#define NATIVE_DB_TYPE "lmdb"
|
||||
#if (defined(__NetBSD_Version__) && __NetBSD_Version__ >= 104250000)
|
||||
#define ALIAS_DB_MAP DEF_DB_TYPE ":/etc/mail/aliases" /* sendmail 8.10 */
|
||||
#endif
|
||||
@@ -232,7 +232,7 @@
|
||||
#define HAS_FSYNC
|
||||
#define HAS_DB
|
||||
#define HAS_SA_LEN
|
||||
-#define NATIVE_DB_TYPE "hash"
|
||||
+#define NATIVE_DB_TYPE "lmdb"
|
||||
#define ALIAS_DB_MAP DEF_DB_TYPE ":/etc/aliases"
|
||||
#define GETTIMEOFDAY(t) gettimeofday(t,(struct timezone *) 0)
|
||||
#define ROOT_PATH "/bin:/usr/bin:/sbin:/usr/sbin"
|
||||
@@ -289,7 +289,7 @@
|
||||
#define HAS_FSYNC
|
||||
/* might be set by makedef */
|
||||
#ifdef HAS_DB
|
||||
-#define NATIVE_DB_TYPE "hash"
|
||||
+#define NATIVE_DB_TYPE "lmdb"
|
||||
#define ALIAS_DB_MAP DEF_DB_TYPE ":/etc/aliases"
|
||||
#else
|
||||
#define HAS_DBM
|
||||
@@ -761,7 +761,7 @@
|
||||
#define DEF_MAILBOX_LOCK "fcntl, dotlock" /* RedHat >= 4.x */
|
||||
#define HAS_FSYNC
|
||||
#define HAS_DB
|
||||
-#define NATIVE_DB_TYPE "hash"
|
||||
+#define NATIVE_DB_TYPE "lmdb"
|
||||
#define ALIAS_DB_MAP DEF_DB_TYPE ":/etc/aliases"
|
||||
#ifndef NO_NIS
|
||||
#define HAS_NIS
|
||||
@@ -841,7 +841,7 @@
|
||||
#define DEF_MAILBOX_LOCK "dotlock" /* verified RedHat 3.03 */
|
||||
#define HAS_FSYNC
|
||||
#define HAS_DB
|
||||
-#define NATIVE_DB_TYPE "hash"
|
||||
+#define NATIVE_DB_TYPE "lmdb"
|
||||
#define ALIAS_DB_MAP DEF_DB_TYPE ":/etc/aliases"
|
||||
#ifndef NO_NIS
|
||||
#define HAS_NIS
|
||||
@@ -874,7 +874,7 @@
|
||||
#define DEF_MAILBOX_LOCK "fcntl, dotlock" /* RedHat >= 4.x */
|
||||
#define HAS_FSYNC
|
||||
#define HAS_DB
|
||||
-#define NATIVE_DB_TYPE "hash"
|
||||
+#define NATIVE_DB_TYPE "lmdb"
|
||||
#define ALIAS_DB_MAP DEF_DB_TYPE ":/etc/aliases"
|
||||
#ifndef NO_NIS
|
||||
#define HAS_NIS
|
||||
@@ -1199,7 +1199,7 @@
|
||||
#define INTERNAL_LOCK MYFLOCK_STYLE_FCNTL
|
||||
#define DEF_MAILBOX_LOCK "fcntl, dotlock"
|
||||
#define HAS_FSYNC
|
||||
-#define NATIVE_DB_TYPE "hash"
|
||||
+#define NATIVE_DB_TYPE "lmdb"
|
||||
#define ALIAS_DB_MAP DEF_DB_TYPE ":/etc/aliases"
|
||||
/* Uncomment the following line if you have NIS package installed */
|
||||
/* #define HAS_NIS */
|
||||
--- src/global/mail_params.h.orig 2020-05-09 17:51:27.000000000 +0200
|
||||
+++ src/global/mail_params.h 2020-12-25 21:04:11.428544623 +0100
|
||||
@@ -2826,7 +2826,7 @@ extern int var_vrfy_pend_limit;
|
||||
extern char *var_verify_service;
|
||||
|
||||
#define VAR_VERIFY_MAP "address_verify_map"
|
||||
-#define DEF_VERIFY_MAP "btree:$data_directory/verify_cache"
|
||||
+#define DEF_VERIFY_MAP "lmdb:$data_directory/verify_cache"
|
||||
extern char *var_verify_map;
|
||||
|
||||
#define VAR_VERIFY_POS_EXP "address_verify_positive_expire_time"
|
||||
@@ -3594,7 +3594,7 @@ extern char *var_multi_cntrl_cmds;
|
||||
* postscreen(8)
|
||||
*/
|
||||
#define VAR_PSC_CACHE_MAP "postscreen_cache_map"
|
||||
-#define DEF_PSC_CACHE_MAP "btree:$data_directory/postscreen_cache"
|
||||
+#define DEF_PSC_CACHE_MAP "lmdb:$data_directory/postscreen_cache"
|
||||
extern char *var_psc_cache_map;
|
||||
|
||||
#define VAR_SMTPD_SERVICE "smtpd_service_name"
|
Loading…
Reference in New Issue
Block a user