When installing postfix with 'pkg -r <rootdir> install', at the extraction phase, I get the following error: [1/1] Extracting postfix-3.9.0_1,1: 100% /bin/sh: cannot open /usr/local/libexec/postfix/post-install: No such file or directory Presumably, this is because files/pkg-install.in takes the DAEMONDIR from SUB_LIST and isn't dynamic to the chroot installation DESTDIR. This is a problem because the post-install script fixes permissions, so without this, the RC script fails to run because the /var/spool/postfix directory is installed with the wrong permissions.
Thanks for the report. I will need to test this scenario and come up with a fix.
(In reply to Juraj Lutter from comment #1) A very quick way to reproduce this is: 1) bsdinstall jail testjail 2) pkg -r $PWD/testjail install postfix Observe the above error message and the permissions of the /var/spool/postfix folder inside the jail directory
Created attachment 251751 [details] [PATCH] mail/postfix: fix pkg -r installation This fixes the issue and other related dormant issues/style fixups. This patch follows the upstream post-install guidelines found here https://www.postfix.org/PACKAGE_README.html (see section "Installing a pre-built Postfix package").
Any updates on reviewing my patch?