diff --git a/postfix.spec b/postfix.spec index 8af8af2..d79c8fa 100644 --- a/postfix.spec +++ b/postfix.spec @@ -63,7 +63,6 @@ Provides: smtp_daemon # Some defines # %define pf_docdir %{_docdir}/%{name}-doc -%define postfixfiles %{name}.filelist %define pf_config_directory /etc/%{name} %define pf_daemon_directory /usr/lib/%{name} %define pf_command_directory /usr/sbin @@ -308,45 +307,6 @@ $RPM_BUILD_ROOT/usr/sbin/postconf -c $RPM_BUILD_ROOT/etc/%{name} \ "biff = no" \ "inet_protocols = all" 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 > %{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 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}/ @@ -446,6 +406,9 @@ fi %post # We never have to run suseconfig for postfix after installation # 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_only -an mail} /sbin/ldconfig @@ -476,7 +439,7 @@ fi %clean rm -rf $RPM_BUILD_ROOT -%files -f %{postfixfiles} +%files %defattr(-,root,root) %doc LICENSE %config /etc/pam.d/* @@ -485,13 +448,13 @@ rm -rf $RPM_BUILD_ROOT /sbin/conf.d/SuSEconfig.%{name} %config(noreplace) %{omc_dir}/%{name}.xml %dir /etc/%{name} +%config /etc/%{name}/main.cf.default %config(noreplace) /etc/%{name}/access +%config(noreplace) /etc/%{name}/aliases %config(noreplace) /etc/%{name}/generic %config(noreplace) /etc/%{name}/helo_access %config(noreplace) /etc/%{name}/canonical -#%config(noreplace) /etc/%{name}/cidr_table %config(noreplace) /etc/%{name}/main.cf -%config /etc/%{name}/main.cf.default %config(noreplace) /etc/%{name}/master.cf %config(noreplace) /etc/%{name}/openssl_%{name}.conf.in %config(noreplace) /etc/%{name}/relocated @@ -499,9 +462,6 @@ rm -rf $RPM_BUILD_ROOT %config(noreplace) /etc/%{name}/virtual %config(noreplace) /etc/%{name}/sasl_passwd %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_ccerts %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}.paranoid %attr(0644, root, root) %config /etc/%{name}/makedefs.out -%attr(0644, root, root) %config /etc/%{name}/%{name}-files /usr/lib/%{name}/%{name}-files %config %attr(0755,root,root) /etc/init.d/%{name} /usr/bin/mailq @@ -529,6 +488,7 @@ rm -rf $RPM_BUILD_ROOT /usr/sbin/smtp-source /usr/sbin/mk%{name}cert /usr/sbin/check_mail_queue +/usr/sbin/post* /sbin/rc%{name} %{_libdir}/lib* /usr/lib/sendmail @@ -547,7 +507,6 @@ rm -rf $RPM_BUILD_ROOT %files doc %defattr(0644,root,root,0755) -%dir %{pf_docdir}/ %{pf_docdir}/ %files mysql