Am 09.02.2015 um 20:13 schrieb Viktor Dukhovni:
On Mon, Feb 09, 2015 at 07:47:50PM +0100, li...@rhsoft.net wrote:

one question:

why are "postfix-files", "main.cf.proto" and "master.cf.proto" below /etc
since they are not intended to get modified by the admin and hence belongs
somewhere below /usr?

They are not in "/etc":

     $ egrep '(master|main|dynamicmaps)\.cf|postfix-files' conf/postfix-files  
| egrep -v '^#' | sort
     $config_directory/main.cf.default:f:root:-:644:1
     $config_directory/main.cf:f:root:-:644:p
     $config_directory/master.cf:f:root:-:644:p
     $daemon_directory/main.cf:f:root:-:644:o
     $daemon_directory/master.cf:f:root:-:644:o
     $meta_directory/dynamicmaps.cf.d:d:root:-:755
     $meta_directory/dynamicmaps.cf:f:root:-:644
     $meta_directory/main.cf.proto:f:root:-:644
     $meta_directory/master.cf.proto:f:root:-:644
     $meta_directory/postfix-files.d:d:root:-:755
     $meta_directory/postfix-files:f:root:-:644

Rather they are in $meta_directory.  I don't set meta_directory to
/etc in my builds.  Indeed none of the meta_directory files are
intended to be "configuration" files that are hand-edited.  They
should only be modified as a side-effect of package installation
are removal.  This includes dynamicmaps.cf{,.d}, which list installed
dictionary plugins.

well, looks like $meta_directory defaults to /etc, at least *that* is where they ended in my rpmbuild just change the tarball

[harry@srv-rhsoft:~]$ postconf -d | grep meta
meta_directory = /etc/postfix

http://www.postfix.org/postconf.5.html#meta_directory
For backwards compatibility with Postfix versions 2.6..2.11, specify "meta_directory = $daemon_directory" in main.cf before installing or upgrading Postfix, or specify "meta_directory = /path/name" on the "make makefiles", "make install" or "make upgrade" command line

IMHO that should default to $daemon_directory

%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} 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

If there is a complaint here to be made, it is that perhaps
main.cf.default is largely obsolete (duplicates "postconf -d"),
and is perhaps no longer needed in $config_directory

agreed

Reply via email to