On Thu, Nov 20, 2025 at 07:34:10AM +0800, Xiao Pan wrote:
> Use INSTALL_DATA instead of INSTALL in doc/Makefile.am to install
> dovecot.conf with 644 instead of 755 file permission. After the patch,
> after ./autogen.sh and ./configure, doc/Makefile shows dovecot.conf is
> correclty installed with INSTALL_DATA which is `/usr/bin/install -c -m
> 644` instead of INSTALL which is `/usr/bin/install -c`. More info about
> INSTALL_DATA see `info make`.
> 
> Signed-off-by: Xiao Pan <[email protected]>
> ---
>  doc/Makefile.am | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/doc/Makefile.am b/doc/Makefile.am
> index 87b52dbe46..845e70e2db 100644
> --- a/doc/Makefile.am
> +++ b/doc/Makefile.am
> @@ -26,7 +26,7 @@ all-local: stamp-man
>  install-data-hook:
>       $(INSTALL) -d $(DESTDIR)$(sysconfdir)/dovecot
>       test -e $(DESTDIR)$(sysconfdir)/dovecot/dovecot.conf || \
> -     $(INSTALL) dovecot.conf $(DESTDIR)$(sysconfdir)/dovecot/dovecot.conf
> +     $(INSTALL_DATA) dovecot.conf 
> $(DESTDIR)$(sysconfdir)/dovecot/dovecot.conf
>  
>  install-data-local:
>       $(MKDIR_P) $(DESTDIR)$(docdir); \
> -- 
> 2.52.0
> 

Another way is to use `$(INSTALL) -m 644` instead of `$(INSTALL_DATA)`.
This way maybe better for compatibility reason, because I'm not sure if
old version of make or non-GNU make has `INSTALL_DATA` or not.

More detailed writings about the BUG if you prefer:

Issue description: /etc/dovecot.conf should be installed as 644 instead
of 755 file permission.

Actual behavior: /etc/dovecot.conf is installed as 755 file permission.

Expected behavior: /etc/dovecot.conf should be installed as 644 file
permission.

How to reproduce: `./autogen.sh; ./configure; make; sudo make install`
to build and install dovecot, then you can see
/usr/local/etc/dovecot/dovecot.conf is installed with 644 file
permission before apply my patch.

Attachment: signature.asc
Description: PGP signature

_______________________________________________
dovecot mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to