Am 09.02.2015 um 21:46 schrieb Wietse Venema:
li...@rhsoft.net:
well, meta_directory=%{postfix_daemon_dir} at build leads in
/usr/libexec/postfix/postfix-files instead /etc/postfix/postfix-files
but postfix refuses to start like below

cp /usr/libexec/postfix/postfix-files /etc/postfix/postfix-files

Please do a proper install without copying files by hand

*i do*

that was only to demonstrate that it still seeks it in /etc
the problem is that built-in "meta_directory" defaults to /etc/postfix

[root@testserver:~]$ postconf -d meta_directory
meta_directory = /etc/postfix

hence for now "mv %{buildroot}%{postfix_daemon_dir}/postfix-files %{buildroot}%{_sysconfdir}/%{name}/postfix-files" after "sh postfix-install"
__________________________________________

%build
CCARGS="-fPIC -DNO_NIS -DNO_NISPLUS -DNO_EAI -DNO_LMDB -DNO_CDB -DNO_LDAP -DNO_PGSQL -DNO_SQLITE -DHAS_PCRE -I%{_includedir}/pcre -DHAS_MYSQL -I%{_includedir}/mysql -DUSE_TLS -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I%{_includedir}/sasl -DDEF_CONFIG_DIR=\\\"%{postfix_config_dir}\\\"" AUXLIBS="-lpcre -L%{_libdir}/mysql -lmysqlclient -lm -L%{_libdir}/sasl2 -lsasl2 -lssl -lcrypto -pie -Wl,-z,now -Wl,-z,relro,-z,noexecstack" %{__make} %{?_smp_mflags} -f Makefile.init makefiles shared=no CCARGS="${CCARGS}" AUXLIBS="${AUXLIBS}" DEBUG="" OPT="%{optflags} -Wno-comment -fno-strict-aliasing" %{__make} %{?_smp_mflags} CCARGS="${CCARGS}" AUXLIBS="${AUXLIBS}" DEBUG="" OPT="%{optflags} -Wno-comment -fno-strict-aliasing"

%install
sh postfix-install -non-interactive install_root=%{buildroot} config_directory=%{postfix_config_dir} meta_directory=%{postfix_daemon_dir} daemon_directory=%{postfix_daemon_dir} command_directory=%{postfix_command_dir} queue_directory=%{postfix_queue_dir} data_directory=%{postfix_data_dir} sendmail_path=%{postfix_command_dir}/sendmail newaliases_path=%{_bindir}/newaliases mailq_path=%{_bindir}/mailq mail_owner=%{postfix_user} setgid_group=%{maildrop_group} manpage_directory=%{_mandir} sample_directory=%{postfix_sample_dir} readme_directory=%{postfix_readme_dir} || exit 1
install -c auxiliary/rmail/rmail %{buildroot}%{_bindir}/rmail

for i in active bounce corrupt defer deferred flush incoming private saved maildrop public pid saved trace; do
 mkdir -p %{buildroot}%{postfix_queue_dir}/$i
done

mkdir -p %{buildroot}%{_sysconfdir}/pam.d %{buildroot}%{postfix_doc_dir} %{buildroot}%{postfix_doc_dir}/examples{,/chroot-setup}
install -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/pam.d/smtp.%{name}
cp -pr examples/{qmail-local,smtpd-policy} %{buildroot}%{postfix_doc_dir}/examples cp -p examples/chroot-setup/LINUX2 %{buildroot}%{postfix_doc_dir}/examples/chroot-setup rm -f %{buildroot}%{postfix_config_dir}/{TLS_,}LICENSE %{buildroot}%{_sysconfdir}/%{name}/bounce.cf.default %{buildroot}%{_sysconfdir}/%{name}/main.cf.default mv %{buildroot}%{postfix_daemon_dir}/postfix-files %{buildroot}%{_sysconfdir}/%{name}/postfix-files
find %{buildroot}%{postfix_doc_dir} -type f | xargs chmod 644
find %{buildroot}%{postfix_doc_dir} -type d | xargs chmod 755

Reply via email to