Bug 1215689 - postfix: deamon_directory is invalid
Summary: postfix: deamon_directory is invalid
Status: RESOLVED FIXED
Alias: None
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Other (show other bugs)
Version: Current
Hardware: Other Other
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: Peter Varkoly
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-09-25 15:25 UTC by Adam Majer
Modified: 2024-06-11 13:29 UTC (History)
2 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Majer 2023-09-25 15:25:54 UTC
Seems the default directory is wrong.

# postconf -d daemon_directory
daemon_directory = /usr/libexec/postfix

I'm assuming this is suppose to be /usr/lib/postfix/bin ?

# rpm -q postfix
postfix-3.8.1-2.1.aarch64
Comment 1 Peter Varkoly 2024-06-11 10:55:57 UTC
The default is not wrong it is the build in. 
The right one is ok:
sudo postconf daemon_directory
daemon_directory = /usr/lib/postfix/bin/
Comment 2 Adam Majer 2024-06-11 11:06:57 UTC
That's kind of my point, the built in values do not represent the real values used by the deamon.

When using postfix in a container where the default is may mean no default config, results in things blowing up. And having non-default values (ie. overriding built-in values) makes the installation fragile. For example, if the location changes in some future version, all the installations will need to adjust config files.
Comment 3 Peter Varkoly 2024-06-11 11:39:59 UTC
I do not know why but by building not all paramaters will be set suse-like:
%make_build makefiles pie=yes shared=yes dynamicmaps=yes \
  shlib_directory=%{_prefix}/lib/%{name} \
  meta_directory=%{_prefix}/lib/%{name} \
  config_directory=%{_sysconfdir}/%{name} \
  SHLIB_RPATH="-Wl,-rpath,%{pf_shlib_directory} -Wl,-z,relro,-z,now"
Only by the installation will all parameters modified:
sh postfix-install -non-interactive \
       install_root=%{buildroot} \
       config_directory=%{pf_config_directory} \ 
       daemon_directory=%{pf_daemon_directory} \
       command_directory=%{pf_command_directory} \
       queue_directory=/%{pf_queue_directory} \
       sendmail_path=%{pf_sendmail_path} \
       newaliases_path=%{pf_newaliases_path} \
       mailq_path=%{pf_mailq_path} \
       manpage_directory=%{_mandir} \
       setgid_group=%{pf_setgid_group} \
       readme_directory=%{pf_readme_directory} \
       data_directory=%{pf_data_directory}

As a result, the built-in values deviate from the current values.
If this can be a problem for alp I can adapt the build part.
Comment 4 Adam Majer 2024-06-11 13:28:01 UTC
I've created request id 1180009 which adds all the settings from install section to the build section. Testing this with TW, it seems that

  postconf -d daemon_directory

now returns the correct value and the same as with

  postconf daemon_directory

I've tried removing the parameters from the install section, but this somehow failed the -bdb flavour while the regular one worked.
Comment 5 Adam Majer 2024-06-11 13:29:42 UTC
Regarding whether this breaks ALP/SLFO or not, it's mostly about ease of use. If you run postfix from container without config files, it's strange that it wants to look for things in wrong directories.