diff options
author | Hoang Xuan Phu <phuhimself@phunehehe.net> | 2016-02-28 16:19:18 +0800 |
---|---|---|
committer | Hoang Xuan Phu <phuhimself@phunehehe.net> | 2016-02-28 16:19:18 +0800 |
commit | 6bb016101fc20e8af54c2fc92b4cd44232bb7f74 (patch) | |
tree | 7cfb8ac0d7482cb672fab2837e27e3fe6319dabc /pkgs/servers | |
parent | 40c586b7ce2c559374df435f46d673baf711c543 (diff) | |
download | nixpkgs-6bb016101fc20e8af54c2fc92b4cd44232bb7f74.tar nixpkgs-6bb016101fc20e8af54c2fc92b4cd44232bb7f74.tar.gz nixpkgs-6bb016101fc20e8af54c2fc92b4cd44232bb7f74.tar.bz2 nixpkgs-6bb016101fc20e8af54c2fc92b4cd44232bb7f74.tar.lz nixpkgs-6bb016101fc20e8af54c2fc92b4cd44232bb7f74.tar.xz nixpkgs-6bb016101fc20e8af54c2fc92b4cd44232bb7f74.tar.zst nixpkgs-6bb016101fc20e8af54c2fc92b4cd44232bb7f74.zip |
postfix: use relative symlinks for mailq and newaliases
Diffstat (limited to 'pkgs/servers')
-rw-r--r-- | pkgs/servers/mail/postfix/3.0.nix | 7 | ||||
-rw-r--r-- | pkgs/servers/mail/postfix/relative-symlinks.patch | 13 |
2 files changed, 19 insertions, 1 deletions
diff --git a/pkgs/servers/mail/postfix/3.0.nix b/pkgs/servers/mail/postfix/3.0.nix index 9ea151e597b..52327090e44 100644 --- a/pkgs/servers/mail/postfix/3.0.nix +++ b/pkgs/servers/mail/postfix/3.0.nix @@ -35,7 +35,12 @@ in stdenv.mkDerivation rec { ++ lib.optional withMySQL libmysql ++ lib.optional withSQLite sqlite; - patches = [ ./postfix-script-shell.patch ./postfix-3.0-no-warnings.patch ./post-install-script.patch ]; + patches = [ + ./postfix-script-shell.patch + ./postfix-3.0-no-warnings.patch + ./post-install-script.patch + ./relative-symlinks.patch + ]; preBuild = '' sed -e '/^PATH=/d' -i postfix-install diff --git a/pkgs/servers/mail/postfix/relative-symlinks.patch b/pkgs/servers/mail/postfix/relative-symlinks.patch new file mode 100644 index 00000000000..f7a2078c034 --- /dev/null +++ b/pkgs/servers/mail/postfix/relative-symlinks.patch @@ -0,0 +1,13 @@ +diff --git a/postfix-install b/postfix/postfix-install +index 1662c3d..0f20ec0 100644 +--- a/postfix-install ++++ b/postfix-install +@@ -336,7 +336,7 @@ compare_or_symlink() { + # 2) we cannot use mv to replace a symlink-to-directory; + # 3) "ln -n" is not in POSIX, therefore it's not portable. + # rm+ln is less atomic but this affects compatibility symlinks only. +- rm -f $2 && ln -sf $link $2 || exit 1 ++ rm -f $2 && ln -rsf $link $2 || exit 1 + } + } + |