[arch-commits] Commit in grml-zsh-config/trunk (PKGBUILD umask.patch)
Pierre Schmitz
pierre at archlinux.org
Sun Jun 19 10:56:01 UTC 2011
Date: Sunday, June 19, 2011 @ 06:56:01
Author: pierre
Revision: 127890
upgpkg: grml-zsh-config 0.3.90-2
do not override umask
Added:
grml-zsh-config/trunk/umask.patch
Modified:
grml-zsh-config/trunk/PKGBUILD
-------------+
PKGBUILD | 15 ++++++---
umask.patch | 95 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 106 insertions(+), 4 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2011-06-19 10:17:35 UTC (rev 127889)
+++ PKGBUILD 2011-06-19 10:56:01 UTC (rev 127890)
@@ -3,7 +3,7 @@
pkgname=grml-zsh-config
pkgver=0.3.90
-pkgrel=1
+pkgrel=2
pkgdesc="grml's zsh setup"
arch=('any')
url='http://grml.org/zsh/'
@@ -11,11 +11,18 @@
provides=('grmlzshrc')
depends=('zsh')
makedepends=('txt2tags')
-source=("http://deb.grml.org/pool/main/g/grml-etc-core/grml-etc-core_${pkgver}.tar.gz")
-md5sums=('84f7f2ca292c42c6d0c1b9a4bf538bc5')
+source=("http://deb.grml.org/pool/main/g/grml-etc-core/grml-etc-core_${pkgver}.tar.gz"
+ 'umask.patch')
+md5sums=('84f7f2ca292c42c6d0c1b9a4bf538bc5'
+ '0c17dc2e288a25cf9dc38391594c21fb')
build() {
- cd ${srcdir}/grml-etc-core-${pkgver}/doc
+ cd ${srcdir}/grml-etc-core-${pkgver}
+ # do not override our global umask setting in /etc/profile
+ # especially because users don't have their own group by default
+ # this is an upstream patch
+ patch -p1 -i ${srcdir}/umask.patch
+ cd doc
make
}
Added: umask.patch
===================================================================
--- umask.patch (rev 0)
+++ umask.patch 2011-06-19 10:56:01 UTC (rev 127890)
@@ -0,0 +1,95 @@
+From: Frank Terbeck <ft at grml.org>
+Date: Sun, 19 Jun 2011 08:33:44 +0000 (+0200)
+Subject: zshrc: Fix umask logic
+X-Git-Url: http://git.grml.org/?p=grml-etc-core.git;a=commitdiff_plain;h=409ee3ca56144701dcea536167808c6866598d4a
+
+zshrc: Fix umask logic
+---
+
+diff --git a/etc/zsh/zshrc b/etc/zsh/zshrc
+index a68687f..8455094 100644
+--- a/etc/zsh/zshrc
++++ b/etc/zsh/zshrc
+@@ -261,7 +261,11 @@ zrcautoload is-at-least || is-at-least() { return 1 }
+ #o# r_umaskstr rwxrwxr-x
+ #o# umask 022
+ #o# umaskstr rwxr-xr-x
+-(( EUID != 0 )) && umask 002 || umask 022
++if (( EUID == 0 )); then
++ umask 002
++else
++ umask 022
++fi
+
+ setopt append_history # append history list to the history file (important for multiple parallel zsh sessions!)
+ is4 && setopt SHARE_HISTORY # import new commands from the history file also in other zsh-session
+From: Michael Prokop <mika at grml.org>
+Date: Sun, 19 Jun 2011 09:59:39 +0000 (+0200)
+Subject: Disable specific umask settings by default.
+X-Git-Url: http://git.grml.org/?p=grml-etc-core.git;a=commitdiff_plain;h=cbbf17b3f869d4c25ca45f48ca5ee336687cafd8
+
+Disable specific umask settings by default.
+
+Recently this turned up into quite a lot of discussion.
+/etc/login.defs provides the system wide configuration
+which we shouldn't ignore and override. So move our
+umask settings from /etc/zsh/zshrc to /etc/skel/.zshrc
+and provide it as comments (so disabled by default).
+---
+
+diff --git a/doc/grmlzshrc.t2t b/doc/grmlzshrc.t2t
+index 621a384..1d810ab 100644
+--- a/doc/grmlzshrc.t2t
++++ b/doc/grmlzshrc.t2t
+@@ -26,10 +26,7 @@ features are enabled in every version).
+ //grmlzshrc// behaves differently depending on which user loads it. For the
+ root user (**EUID** == 0) only a subset of features is loaded by default. This
+ behaviour can be altered by setting the **GRML_ALWAYS_LOAD_ALL** STARTUP
+-VARIABLE (see below). Also the umask(1) for the root user is set to 022,
+-while for regular users it is set to 002. So read/write permissions
+-for the regular user and her group are set for new files (keep that
+-in mind on systems, where regular users share a common group).
++VARIABLE (see below).
+
+ = STARTUP VARIABLES =
+ Some of the behaviour of //grmlzshrc// can be altered by setting certain shell
+diff --git a/etc/skel/.zshrc b/etc/skel/.zshrc
+index dd4b14d..9837a97 100644
+--- a/etc/skel/.zshrc
++++ b/etc/skel/.zshrc
+@@ -30,6 +30,13 @@ if [ -r ~/.zshrc -a -r ~/.zshrc.global -a ! -r ~/.zshrc.local ] ; then
+ printf '-!-\n'
+ fi
+
++## Settings for umask
++#if (( EUID == 0 )); then
++# umask 002
++#else
++# umask 022
++#fi
++
+ ## Now, we'll give a few examples of what you might want to use in your
+ ## .zshrc.local file (just copy'n'paste and uncomment it there):
+
+diff --git a/etc/zsh/zshrc b/etc/zsh/zshrc
+index 8455094..c1b4955 100644
+--- a/etc/zsh/zshrc
++++ b/etc/zsh/zshrc
+@@ -256,17 +256,6 @@ zrcautoload is-at-least || is-at-least() { return 1 }
+ # }}}
+
+ # {{{ set some important options (as early as possible)
+-# Please update these tags, if you change the umask settings below.
+-#o# r_umask 002
+-#o# r_umaskstr rwxrwxr-x
+-#o# umask 022
+-#o# umaskstr rwxr-xr-x
+-if (( EUID == 0 )); then
+- umask 002
+-else
+- umask 022
+-fi
+-
+ setopt append_history # append history list to the history file (important for multiple parallel zsh sessions!)
+ is4 && setopt SHARE_HISTORY # import new commands from the history file also in other zsh-session
+ setopt extended_history # save each command's beginning timestamp and the duration to the history file
More information about the arch-commits
mailing list