forked from mirrors/nixpkgs
Merge pull request #13536 from phunehehe/postfix-symlinks
postfix: use relative symlinks for mailq and newaliases
This commit is contained in:
commit
0ac7cbe334
|
@ -35,7 +35,12 @@ in stdenv.mkDerivation rec {
|
||||||
++ lib.optional withMySQL libmysql
|
++ lib.optional withMySQL libmysql
|
||||||
++ lib.optional withSQLite sqlite;
|
++ 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 = ''
|
preBuild = ''
|
||||||
sed -e '/^PATH=/d' -i postfix-install
|
sed -e '/^PATH=/d' -i postfix-install
|
||||||
|
|
13
pkgs/servers/mail/postfix/relative-symlinks.patch
Normal file
13
pkgs/servers/mail/postfix/relative-symlinks.patch
Normal file
|
@ -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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue