postfix: use relative symlinks for mailq and newaliases
commit6bb016101fc20e8af54c2fc92b4cd44232bb7f74
authorHoang Xuan Phu <phuhimself@phunehehe.net>
dateSun 28 Feb 2016, 16:19 (11 years ago)
parent40c586b
pkgs/servers/mail/postfix/3.0.nix+6−1
@@ -35,7 +35,12 @@ in stdenv.mkDerivation rec {
3535 ++ lib.optional withMySQL libmysql
3636 ++ lib.optional withSQLite sqlite;
3737
38− patches = [ ./postfix-script-shell.patch ./postfix-3.0-no-warnings.patch ./post-install-script.patch ];
38+ patches = [
39+ ./postfix-script-shell.patch
40+ ./postfix-3.0-no-warnings.patch
41+ ./post-install-script.patch
42+ ./relative-symlinks.patch
43+ ];
3944
4045 preBuild = ''
4146 sed -e '/^PATH=/d' -i postfix-install
pkgs/servers/mail/postfix/relative-symlinks.patchnew file+13
@@ -0,0 +1,13 @@
1+diff --git a/postfix-install b/postfix/postfix-install
2+index 1662c3d..0f20ec0 100644
3+--- a/postfix-install
4++++ b/postfix-install
5+@@ -336,7 +336,7 @@ compare_or_symlink() {
6+ # 2) we cannot use mv to replace a symlink-to-directory;
7+ # 3) "ln -n" is not in POSIX, therefore it's not portable.
8+ # rm+ln is less atomic but this affects compatibility symlinks only.
9+- rm -f $2 && ln -sf $link $2 || exit 1
10++ rm -f $2 && ln -rsf $link $2 || exit 1
11+ }
12+ }
13+