postfix: less overlayfs rewrites 4664/head
authorDenis Shulyaka <Shulyaka@gmail.com>
Wed, 2 Aug 2017 18:43:36 +0000 (21:43 +0300)
committerDenis Shulyaka <Shulyaka@gmail.com>
Wed, 2 Aug 2017 18:43:36 +0000 (21:43 +0300)
Signed-off-by: Denis Shulyaka <Shulyaka@gmail.com>
mail/postfix/Makefile
mail/postfix/patches/900_less_overlayfs_rewrites.patch [new file with mode: 0644]

index 5e545093648497fa302c951615813ef0f0faee89..2f7e8ace16759303be5e4c9d3e6cada4a3ab41f1 100644 (file)
@@ -8,7 +8,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=postfix
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 PKG_SOURCE_URL:=ftp://ftp.porcupine.org/mirrors/postfix-release/official/
 PKG_VERSION:=3.2.2
 PKG_HASH:=d06849418d119d09366997b2b481bb23f737629769b4e4a52da42fb3ad8b0576
diff --git a/mail/postfix/patches/900_less_overlayfs_rewrites.patch b/mail/postfix/patches/900_less_overlayfs_rewrites.patch
new file mode 100644 (file)
index 0000000..6e51f74
--- /dev/null
@@ -0,0 +1,24 @@
+diff -Naur a/conf/post-install b/conf/post-install
+--- a/conf/post-install        2015-12-28 00:00:45.000000000 +0000
++++ b/conf/post-install        2017-08-01 22:42:30.476896711 +0000
+@@ -561,15 +561,16 @@
+           then
+               set_permission=1
+           fi
++          test -n "$recursive" && nonrecursive="" || nonrecursive="-maxdepth 0"
+           test -n "$set_permission" && {
+-              chown $recursive $owner $path || exit 1
+-              test -z "$group" || chgrp $recursive $group $path || exit 1
++              find $path $nonrecursive ! -user $owner -exec chown $owner "{}" ";" || exit 1
++              test -z "$group" || find $path $nonrecursive ! -group $group -exec chgrp $group "{}" ";" || exit 1
+               # Don't "chmod -R"; queue file status is encoded in mode bits.
+               if [ "$type" = "d" -a -n "$recursive" ]
+               then
+-                  find $path -type d -exec chmod $mode "{}" ";"
++                  find $path -type d -a ! -perm $mode -exec chmod $mode "{}" ";"
+               else
+-                  chmod $mode $path
++                  find $path $nonrecursive ! -perm $mode -exec chmod $mode "{}" ";"
+               fi || exit 1
+           }
+       done