head 1.5; access; symbols OPENPKG_2_STABLE_MP:1.5 OPENPKG_E1_MP_HEAD:1.5 OPENPKG_E1_MP:1.5 OPENPKG_E1_MP_2_STABLE:1.5 OPENPKG_E1_FP:1.5 OPENPKG_2_STABLE_20061018:1.5 OPENPKG_2_STABLE:1.5.0.20 OPENPKG_2_STABLE_BP:1.5 OPENPKG_2_5_SOLID:1.5.0.18 OPENPKG_2_5_SOLID_BP:1.5 OPENPKG_2_4_RELEASE:1.5 OPENPKG_2_4_SOLID:1.5.0.16 OPENPKG_2_4_SOLID_BP:1.5 OPENPKG_2_3_RELEASE:1.5 OPENPKG_2_3_SOLID:1.5.0.14 OPENPKG_2_3_SOLID_BP:1.5 OPENPKG_2_2_RELEASE:1.5 OPENPKG_2_2_SOLID:1.5.0.12 OPENPKG_2_2_SOLID_BP:1.5 OPENPKG_2_1_RELEASE:1.5 OPENPKG_2_1_SOLID:1.5.0.10 OPENPKG_2_1_SOLID_BP:1.5 OPENPKG_2_0_RELEASE:1.5 OPENPKG_2_0_SOLID:1.5.0.8 OPENPKG_2_0_SOLID_BP:1.5 OPENPKG_1_3_RELEASE:1.5 OPENPKG_1_3_SOLID:1.5.0.6 OPENPKG_1_3_SOLID_BP:1.5 OPENPKG_1_2_SOLID:1.5.0.4 OPENPKG_1_2_SOLID_BP:1.5 OPENPKG_1_STABLE:1.5.0.2 OPENPKG_1_STABLE_BP:1.5; locks; strict; comment @# @; 1.5 date 2002.12.23.08.33.00; author rse; state dead; branches; next 1.4; 1.4 date 2002.11.23.09.14.05; author rse; state Exp; branches; next 1.3; 1.3 date 2002.11.11.16.17.54; author rse; state Exp; branches; next 1.2; 1.2 date 2002.10.14.18.02.22; author ms; state Exp; branches; next 1.1; 1.1 date 2002.10.14.17.57.13; author ms; state Exp; branches; next ; desc @@ 1.5 log @- upgrade from 1.1.12 to 2.0.0 - remove old SASL2 patch, SASL2 support is now included - remove old DB4 patch, DB 4.1 support is now included - TLS patch is still broken, because Lutz has to provide new patch first - adjusted etc/postfix/ stuff to reflect 2.0.0 changes - Remove "Optional" keyword from Berkeley-DB and PCRE support description - Remove "IPv6 support" from description, because we do not have IPv6 support - replace BuildPreReq: patch with a higher bootstrap dependency - upgrade to pflogsumm 1.0.5 @ text @--- postfix-1.1.12.orig/src/util/dict_db.c Mon Oct 14 18:54:26 2002 +++ postfix-1.1.12/src/util/dict_db.c Mon Oct 14 19:52:16 2002 @@@@ -520,8 +520,13 @@@@ msg_fatal("set DB cache size %d: %m", DICT_DB_CACHE_SIZE); if (type == DB_HASH && db->set_h_nelem(db, DICT_DB_NELM) != 0) msg_fatal("set DB hash element count %d: %m", DICT_DB_NELM); +#if (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 1) + if ((errno = db->open(db, 0, db_path, 0, type, db_flags, 0644)) != 0) + msg_fatal("open database %s: %m", db_path); +#else if ((errno = db->open(db, db_path, 0, type, db_flags, 0644)) != 0) msg_fatal("open database %s: %m", db_path); +#endif if ((errno = db->fd(db, &dbfd)) != 0) msg_fatal("get database file descriptor: %m"); #endif --- postfix-1.1.12.orig/src/global/mkmap_db.c.orig Mon Nov 20 19:05:25 2000 +++ postfix-1.1.12/src/global/mkmap_db.c Mon Nov 11 17:09:36 2002 @@@@ -66,7 +66,15 @@@@ /* * Fill in the generic members. */ +#if (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 1) + /* OpenPKG/RSE hack: lock source instead of target file because more + than one edge in Postfix really want the locked file to be created + and implicitly insist that the lock is not a dedicated file (for + instance it is not removed after closing, etc) */ + mkmap->lock_file = concatenate(path, (char *) 0); +#else mkmap->lock_file = concatenate(path, ".db", (char *) 0); +#endif mkmap->open = db_open; /* @ 1.4 log @upgrading package: postfix 1.1.11 -> 1.1.12 @ text @@ 1.3 log @make Postfix finally working with Berkeley DB 4.1 @ text @d1 2 a2 2 --- postfix-1.1.11.orig/src/util/dict_db.c Mon Oct 14 18:54:26 2002 +++ postfix-1.1.11/src/util/dict_db.c Mon Oct 14 19:52:16 2002 d17 2 a18 2 --- postfix-1.1.11.orig/src/global/mkmap_db.c.orig Mon Nov 20 19:05:25 2000 +++ postfix-1.1.11/src/global/mkmap_db.c Mon Nov 11 17:09:36 2002 @ 1.2 log @Remove an uneccessary transaction context, reducing changes to a minimum. @ text @a0 1 diff -Naur postfix-1.1.11.orig/src/util/dict_db.c postfix-1.1.11/src/util/dict_db.c d17 18 @ 1.1 log @Postfix now conforms to the new transactional API of Berkley db 4.1.24. @ text @d3 2 a4 22 +++ postfix-1.1.11/src/util/dict_db.c Mon Oct 14 19:14:12 2002 @@@@ -429,6 +429,10 @@@@ struct stat st; DB *db; char *db_path; +#if (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 1) + DB_TXN *db_txnp = NULL; + static DB_ENV *db_env = NULL; +#endif int lock_fd = -1; int dbfd; @@@@ -512,7 +516,7 @@@@ db_flags |= DB_CREATE; if (open_flags & O_TRUNC) db_flags |= DB_TRUNCATE; - if ((errno = db_create(&db, 0, 0)) != 0) + if ((errno = db_create(&db, db_env, 0)) != 0) msg_fatal("create DB database: %m"); if (db == 0) msg_panic("db_create null result"); @@@@ -520,10 +524,18 @@@@ a7 1 + d9 1 a9 3 + if ((errno = db_env->txn_begin(db_env, NULL, &db_txnp, 0)) != 0) + msg_fatal("begin transaction failed: %m"); + if ((errno = db->open(db, db_txnp, db_path, 0, type, db_flags, 0644)) != 0) d14 1 a16 1 +#endif a17 2 if (dict_flags & DICT_FLAG_LOCK) { if (myflock(lock_fd, INTERNAL_LOCK, MYFLOCK_OP_NONE) < 0) @