!4 use lmdb instead of libdb
From: @eaglegai Reviewed-by: @zengwefeng Signed-off-by: @zengwefeng
This commit is contained in:
commit
e04d9e00bb
25
postfix.spec
25
postfix.spec
@ -23,7 +23,7 @@
|
|||||||
Name: postfix
|
Name: postfix
|
||||||
Summary: Postfix Mail Transport Agent
|
Summary: Postfix Mail Transport Agent
|
||||||
Version: 3.3.1
|
Version: 3.3.1
|
||||||
Release: 10
|
Release: 11
|
||||||
Epoch: 2
|
Epoch: 2
|
||||||
URL: http://www.postfix.org
|
URL: http://www.postfix.org
|
||||||
License: (IBM and GPLv2+) or (EPL-2.0 and GPLv2+)
|
License: (IBM and GPLv2+) or (EPL-2.0 and GPLv2+)
|
||||||
@ -45,7 +45,7 @@ Patch10: pflogsumm-1.1.5-ipv6-warnings-fix.patch
|
|||||||
|
|
||||||
Patch6000: fix-postfix-build-failed.patch
|
Patch6000: fix-postfix-build-failed.patch
|
||||||
|
|
||||||
BuildRequires: libdb-devel perl-generators pkgconfig zlib-devel systemd-units libicu-devel libnsl2-devel gcc m4 openldap-devel
|
BuildRequires: lmdb-devel perl-generators pkgconfig zlib-devel systemd-units libicu-devel libnsl2-devel gcc m4 openldap-devel
|
||||||
BuildRequires: cyrus-sasl-devel pcre-devel mariadb-connector-c-devel postgresql-devel sqlite-devel tinycdb-devel openssl-devel procps-ng
|
BuildRequires: cyrus-sasl-devel pcre-devel mariadb-connector-c-devel postgresql-devel sqlite-devel tinycdb-devel openssl-devel procps-ng
|
||||||
Requires(post): systemd-sysv %{_sbindir}/alternatives %{_bindir}/openssl
|
Requires(post): systemd-sysv %{_sbindir}/alternatives %{_bindir}/openssl
|
||||||
Requires(pre): %{_sbindir}/groupadd %{_sbindir}/useradd
|
Requires(pre): %{_sbindir}/groupadd %{_sbindir}/useradd
|
||||||
@ -131,11 +131,13 @@ for f in README_FILES/TLS_{LEGACY_,}README TLS_ACKNOWLEDGEMENTS; do
|
|||||||
done
|
done
|
||||||
|
|
||||||
%build
|
%build
|
||||||
unset AUXLIBS AUXLIBS_LDAP AUXLIBS_PCRE AUXLIBS_MYSQL AUXLIBS_PGSQL AUXLIBS_SQLITE AUXLIBS_CDB
|
unset AUXLIBS AUXLIBS_LDAP AUXLIBS_LMDB AUXLIBS_PCRE AUXLIBS_MYSQL AUXLIBS_PGSQL AUXLIBS_SQLITE AUXLIBS_CDB
|
||||||
CCARGS="-fPIC"
|
CCARGS="-fPIC"
|
||||||
AUXLIBS="-lnsl"
|
AUXLIBS="-lnsl"
|
||||||
CCARGS="${CCARGS} -DHAS_LDAP -DLDAP_DEPRECATED=1 %{?with_sasl:-DUSE_LDAP_SASL}"
|
CCARGS="${CCARGS} -DHAS_LDAP -DLDAP_DEPRECATED=1 %{?with_sasl:-DUSE_LDAP_SASL}"
|
||||||
AUXLIBS_LDAP="-lldap -llber"
|
AUXLIBS_LDAP="-lldap -llber"
|
||||||
|
CCARGS="${CCARGS} -DHAS_LMDB"
|
||||||
|
AUXLIBS_LMDB="-llmdb"
|
||||||
CCARGS="${CCARGS} -DHAS_PCRE -I%{_includedir}/pcre"
|
CCARGS="${CCARGS} -DHAS_PCRE -I%{_includedir}/pcre"
|
||||||
AUXLIBS_PCRE="-lpcre"
|
AUXLIBS_PCRE="-lpcre"
|
||||||
CCARGS="${CCARGS} -DHAS_MYSQL -I%{_includedir}/mysql"
|
CCARGS="${CCARGS} -DHAS_MYSQL -I%{_includedir}/mysql"
|
||||||
@ -163,8 +165,8 @@ CCARGS="${CCARGS} $(getconf LFS_CFLAGS)"
|
|||||||
LDFLAGS="%{?__global_ldflags} %{?_hardened_build:-Wl,-z,relro,-z,now}"
|
LDFLAGS="%{?__global_ldflags} %{?_hardened_build:-Wl,-z,relro,-z,now}"
|
||||||
|
|
||||||
make -f Makefile.init makefiles shared=yes dynamicmaps=yes \
|
make -f Makefile.init makefiles shared=yes dynamicmaps=yes \
|
||||||
%{?_hardened_build:pie=yes} CCARGS="${CCARGS}" AUXLIBS="${AUXLIBS}" \
|
%{?_hardened_build:pie=yes} CCARGS="${CCARGS} -DNO_DB" AUXLIBS="${AUXLIBS}" \
|
||||||
AUXLIBS_LDAP="${AUXLIBS_LDAP}" AUXLIBS_PCRE="${AUXLIBS_PCRE}" \
|
AUXLIBS_LDAP="${AUXLIBS_LDAP}" AUXLIBS_LMDB="${AUXLIBS_LMDB}" AUXLIBS_PCRE="${AUXLIBS_PCRE}" \
|
||||||
AUXLIBS_MYSQL="${AUXLIBS_MYSQL}" AUXLIBS_PGSQL="${AUXLIBS_PGSQL}" \
|
AUXLIBS_MYSQL="${AUXLIBS_MYSQL}" AUXLIBS_PGSQL="${AUXLIBS_PGSQL}" \
|
||||||
AUXLIBS_SQLITE="${AUXLIBS_SQLITE}" AUXLIBS_CDB="${AUXLIBS_CDB}"\
|
AUXLIBS_SQLITE="${AUXLIBS_SQLITE}" AUXLIBS_CDB="${AUXLIBS_CDB}"\
|
||||||
DEBUG="" SHLIB_RPATH="-Wl,-rpath,%{postfix_shlib_dir} $LDFLAGS" \
|
DEBUG="" SHLIB_RPATH="-Wl,-rpath,%{postfix_shlib_dir} $LDFLAGS" \
|
||||||
@ -275,7 +277,7 @@ function split_file
|
|||||||
}
|
}
|
||||||
|
|
||||||
pushd %{buildroot}%{postfix_config_dir}
|
pushd %{buildroot}%{postfix_config_dir}
|
||||||
for map in mysql pgsql sqlite cdb ldap pcre; do
|
for map in mysql pgsql sqlite cdb ldap lmdb pcre; do
|
||||||
rm -f dynamicmaps.cf.d/"$map" "postfix-files.d/$map"
|
rm -f dynamicmaps.cf.d/"$map" "postfix-files.d/$map"
|
||||||
split_file "^\s*$map\b" "$map" dynamicmaps.cf
|
split_file "^\s*$map\b" "$map" dynamicmaps.cf
|
||||||
sed -i "s|postfix-$map\\.so|%{postfix_shlib_dir}/\\0|" "dynamicmaps.cf.d/$map"
|
sed -i "s|postfix-$map\\.so|%{postfix_shlib_dir}/\\0|" "dynamicmaps.cf.d/$map"
|
||||||
@ -450,6 +452,11 @@ fi
|
|||||||
%{_bindir}/rmail.postfix
|
%{_bindir}/rmail.postfix
|
||||||
%{_sbindir}/sendmail.postfix
|
%{_sbindir}/sendmail.postfix
|
||||||
/usr/lib/sendmail.postfix
|
/usr/lib/sendmail.postfix
|
||||||
|
|
||||||
|
%attr(0644, root, root) %{postfix_config_dir}/dynamicmaps.cf.d/lmdb
|
||||||
|
%attr(0644, root, root) %{postfix_config_dir}/postfix-files.d/lmdb
|
||||||
|
%attr(0755, root, root) %{postfix_shlib_dir}/postfix-lmdb.so
|
||||||
|
|
||||||
%ghost %{_sysconfdir}/pam.d/smtp
|
%ghost %{_sysconfdir}/pam.d/smtp
|
||||||
%ghost %attr(0755, root, root) %{_bindir}/mailq
|
%ghost %attr(0755, root, root) %{_bindir}/mailq
|
||||||
%ghost %attr(0755, root, root) %{_bindir}/newaliases
|
%ghost %attr(0755, root, root) %{_bindir}/newaliases
|
||||||
@ -505,6 +512,12 @@ fi
|
|||||||
%{postfix_doc_dir}/README_FILES/*
|
%{postfix_doc_dir}/README_FILES/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Jan 15 2021 gaihuiying <gaihuiying1@huawei.com> - 2:3.3.1-11
|
||||||
|
- Type:requirement
|
||||||
|
- ID:NA
|
||||||
|
- SUG:NA
|
||||||
|
- DESC:use lmdb instead of libdb
|
||||||
|
|
||||||
* Wed Dec 25 2019 openEuler Buildteam <buildteam@openeuler.org> - 2:3.3.1-10
|
* Wed Dec 25 2019 openEuler Buildteam <buildteam@openeuler.org> - 2:3.3.1-10
|
||||||
- change permission of files
|
- change permission of files
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user