bnc#684302 - postfix packaging bugs break setups (in stock 11.4 and server:mail/postfix
OBS-URL: https://build.opensuse.org/package/show/server:mail/postfix?expand=0&rev=66
This commit is contained in:
parent
4bfdb37f03
commit
9c0b35a005
55
postfix.spec
55
postfix.spec
@ -63,7 +63,6 @@ Provides: smtp_daemon
|
|||||||
# Some defines
|
# Some defines
|
||||||
#
|
#
|
||||||
%define pf_docdir %{_docdir}/%{name}-doc
|
%define pf_docdir %{_docdir}/%{name}-doc
|
||||||
%define postfixfiles %{name}.filelist
|
|
||||||
%define pf_config_directory /etc/%{name}
|
%define pf_config_directory /etc/%{name}
|
||||||
%define pf_daemon_directory /usr/lib/%{name}
|
%define pf_daemon_directory /usr/lib/%{name}
|
||||||
%define pf_command_directory /usr/sbin
|
%define pf_command_directory /usr/sbin
|
||||||
@ -308,45 +307,6 @@ $RPM_BUILD_ROOT/usr/sbin/postconf -c $RPM_BUILD_ROOT/etc/%{name} \
|
|||||||
"biff = no" \
|
"biff = no" \
|
||||||
"inet_protocols = all"
|
"inet_protocols = all"
|
||||||
install -m 644 $RPM_BUILD_ROOT/etc/%{name}/main.cf $RPM_BUILD_ROOT/%{conf_backup_dir}/main.cf
|
install -m 644 $RPM_BUILD_ROOT/etc/%{name}/main.cf $RPM_BUILD_ROOT/%{conf_backup_dir}/main.cf
|
||||||
# -----------------------------------------------------------------------
|
|
||||||
# preparing /etc/postfix/postfix-files to be able to use postfix
|
|
||||||
# own upgrade script. Unfortunately it looks in postfix-files and
|
|
||||||
# expects aliases file at /etc/postfix/aliases and it expects to have
|
|
||||||
# unzipped manpages
|
|
||||||
# also remove the both sql dictionary libs as they will not be installed
|
|
||||||
# per default
|
|
||||||
# -----------------------------------------------------------------------
|
|
||||||
rm -f $RPM_BUILD_ROOT/etc/%{name}/aliases
|
|
||||||
rm -f $RPM_BUILD_ROOT/etc/%{name}/%{name}-files
|
|
||||||
sed 's;^$config_directory/aliases\(.*\);/etc/aliases\1;' conf/%{name}-files \
|
|
||||||
| grep -v '^$manpage_directory' | grep -Ev 'dict_(mysql|pgsql)' > $RPM_BUILD_ROOT/etc/%{name}/%{name}-files
|
|
||||||
rm -f %{postfixfiles}
|
|
||||||
test -f conf/%{name}-files || {
|
|
||||||
echo "conf/%{name}-files does not exist!"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
echo "%defattr(-,root,root)" >> %{postfixfiles}
|
|
||||||
exec <conf/%{name}-files
|
|
||||||
while IFS=: read path type owner group mode flags junk; do
|
|
||||||
owner=${owner/\$mail_owner/postfix}
|
|
||||||
group=${group/\$setgid_group/%{pf_setgid_group}}
|
|
||||||
case $path in
|
|
||||||
\$queue_directory*)
|
|
||||||
path=${path/\$queue_directory/\/var\/spool\/postfix}
|
|
||||||
group=${group/-/root}
|
|
||||||
echo "%dir %attr($mode,$owner,$group) $path/" >> %{postfixfiles}
|
|
||||||
mkdir -m $mode -p $RPM_BUILD_ROOT/$path
|
|
||||||
printf '%%-38s %%-18s %%04d\n' $path "${owner}.${group}" $mode >> $RPM_BUILD_ROOT/etc/permissions.d/%{name}
|
|
||||||
;;
|
|
||||||
\$command_directory/*)
|
|
||||||
path=${path/\$command_directory/\/usr\/sbin}
|
|
||||||
group=${group/-/root}
|
|
||||||
echo "%attr($mode,$owner,$group) $path" >> %{postfixfiles}
|
|
||||||
printf '%%-38s %%-18s %%04d\n' $path "${owner}.${group}" $mode >> $RPM_BUILD_ROOT/etc/permissions.d/%{name}
|
|
||||||
;;
|
|
||||||
*) continue;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
# postfix-mysql
|
# postfix-mysql
|
||||||
install -m 644 %{name}-mysql/main.cf-mysql $RPM_BUILD_ROOT/etc/%{name}/main.cf-mysql
|
install -m 644 %{name}-mysql/main.cf-mysql $RPM_BUILD_ROOT/etc/%{name}/main.cf-mysql
|
||||||
install -m 640 %{name}-mysql/*_maps.cf $RPM_BUILD_ROOT/etc/%{name}/
|
install -m 640 %{name}-mysql/*_maps.cf $RPM_BUILD_ROOT/etc/%{name}/
|
||||||
@ -446,6 +406,9 @@ fi
|
|||||||
%post
|
%post
|
||||||
# We never have to run suseconfig for postfix after installation
|
# We never have to run suseconfig for postfix after installation
|
||||||
# We only start postfix own upgrade-configuration by update
|
# We only start postfix own upgrade-configuration by update
|
||||||
|
if [ ${1:-0} -gt 1 ]; then
|
||||||
|
/usr/sbin/postfix upgrade-configuration
|
||||||
|
fi
|
||||||
%{fillup_and_insserv -y postfix}
|
%{fillup_and_insserv -y postfix}
|
||||||
%{fillup_only -an mail}
|
%{fillup_only -an mail}
|
||||||
/sbin/ldconfig
|
/sbin/ldconfig
|
||||||
@ -476,7 +439,7 @@ fi
|
|||||||
%clean
|
%clean
|
||||||
rm -rf $RPM_BUILD_ROOT
|
rm -rf $RPM_BUILD_ROOT
|
||||||
|
|
||||||
%files -f %{postfixfiles}
|
%files
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%doc LICENSE
|
%doc LICENSE
|
||||||
%config /etc/pam.d/*
|
%config /etc/pam.d/*
|
||||||
@ -485,13 +448,13 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
/sbin/conf.d/SuSEconfig.%{name}
|
/sbin/conf.d/SuSEconfig.%{name}
|
||||||
%config(noreplace) %{omc_dir}/%{name}.xml
|
%config(noreplace) %{omc_dir}/%{name}.xml
|
||||||
%dir /etc/%{name}
|
%dir /etc/%{name}
|
||||||
|
%config /etc/%{name}/main.cf.default
|
||||||
%config(noreplace) /etc/%{name}/access
|
%config(noreplace) /etc/%{name}/access
|
||||||
|
%config(noreplace) /etc/%{name}/aliases
|
||||||
%config(noreplace) /etc/%{name}/generic
|
%config(noreplace) /etc/%{name}/generic
|
||||||
%config(noreplace) /etc/%{name}/helo_access
|
%config(noreplace) /etc/%{name}/helo_access
|
||||||
%config(noreplace) /etc/%{name}/canonical
|
%config(noreplace) /etc/%{name}/canonical
|
||||||
#%config(noreplace) /etc/%{name}/cidr_table
|
|
||||||
%config(noreplace) /etc/%{name}/main.cf
|
%config(noreplace) /etc/%{name}/main.cf
|
||||||
%config /etc/%{name}/main.cf.default
|
|
||||||
%config(noreplace) /etc/%{name}/master.cf
|
%config(noreplace) /etc/%{name}/master.cf
|
||||||
%config(noreplace) /etc/%{name}/openssl_%{name}.conf.in
|
%config(noreplace) /etc/%{name}/openssl_%{name}.conf.in
|
||||||
%config(noreplace) /etc/%{name}/relocated
|
%config(noreplace) /etc/%{name}/relocated
|
||||||
@ -499,9 +462,6 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
%config(noreplace) /etc/%{name}/virtual
|
%config(noreplace) /etc/%{name}/virtual
|
||||||
%config(noreplace) /etc/%{name}/sasl_passwd
|
%config(noreplace) /etc/%{name}/sasl_passwd
|
||||||
%config(noreplace) /etc/%{name}/sender_canonical
|
%config(noreplace) /etc/%{name}/sender_canonical
|
||||||
#%config(noreplace) /etc/%{name}/tcp_table
|
|
||||||
#%config(noreplace) /etc/%{name}/pcre_table
|
|
||||||
#%config(noreplace) /etc/%{name}/regexp_table
|
|
||||||
%config(noreplace) /etc/%{name}/relay
|
%config(noreplace) /etc/%{name}/relay
|
||||||
%config(noreplace) /etc/%{name}/relay_ccerts
|
%config(noreplace) /etc/%{name}/relay_ccerts
|
||||||
%config(noreplace) /etc/%{name}/header_checks
|
%config(noreplace) /etc/%{name}/header_checks
|
||||||
@ -518,7 +478,6 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
%config /etc/permissions.d/%{name}
|
%config /etc/permissions.d/%{name}
|
||||||
%config /etc/permissions.d/%{name}.paranoid
|
%config /etc/permissions.d/%{name}.paranoid
|
||||||
%attr(0644, root, root) %config /etc/%{name}/makedefs.out
|
%attr(0644, root, root) %config /etc/%{name}/makedefs.out
|
||||||
%attr(0644, root, root) %config /etc/%{name}/%{name}-files
|
|
||||||
/usr/lib/%{name}/%{name}-files
|
/usr/lib/%{name}/%{name}-files
|
||||||
%config %attr(0755,root,root) /etc/init.d/%{name}
|
%config %attr(0755,root,root) /etc/init.d/%{name}
|
||||||
/usr/bin/mailq
|
/usr/bin/mailq
|
||||||
@ -529,6 +488,7 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
/usr/sbin/smtp-source
|
/usr/sbin/smtp-source
|
||||||
/usr/sbin/mk%{name}cert
|
/usr/sbin/mk%{name}cert
|
||||||
/usr/sbin/check_mail_queue
|
/usr/sbin/check_mail_queue
|
||||||
|
/usr/sbin/post*
|
||||||
/sbin/rc%{name}
|
/sbin/rc%{name}
|
||||||
%{_libdir}/lib*
|
%{_libdir}/lib*
|
||||||
/usr/lib/sendmail
|
/usr/lib/sendmail
|
||||||
@ -547,7 +507,6 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
|
|
||||||
%files doc
|
%files doc
|
||||||
%defattr(0644,root,root,0755)
|
%defattr(0644,root,root,0755)
|
||||||
%dir %{pf_docdir}/
|
|
||||||
%{pf_docdir}/
|
%{pf_docdir}/
|
||||||
|
|
||||||
%files mysql
|
%files mysql
|
||||||
|
Loading…
Reference in New Issue
Block a user