From 8186dc11a90dbc310acaad7ee867ee995adbd6ed Mon Sep 17 00:00:00 2001 From: Chantry Xavier Date: Sun, 13 Jan 2008 11:08:59 +0100 Subject: Ensure correct dir permissions in the database. Fix for FS#9176. A previous commit (6e8daa553bbd5) already forced all database files to 644. Now the directories are also forced to 755. Additionally, repo-add now sets the umask to 022, just like makepkg does, to fix the problem at its root. Signed-off-by: Chantry Xavier Signed-off-by: Dan McGee --- scripts/repo-add.sh.in | 3 +++ 1 file changed, 3 insertions(+) (limited to 'scripts/repo-add.sh.in') diff --git a/scripts/repo-add.sh.in b/scripts/repo-add.sh.in index 98191b62..c7aa11a2 100644 --- a/scripts/repo-add.sh.in +++ b/scripts/repo-add.sh.in @@ -28,6 +28,9 @@ confdir='@sysconfdir@' FORCE=0 REPO_DB_FILE="" +# ensure we have a sane umask set +umask 0022 + msg() { local mesg=$1; shift printf "==> ${mesg}\n" "$@" >&1 -- cgit v1.2.3-70-g09d2 From fd86c62db856cea7cdd8edac2e721543dd1ebf04 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Sun, 13 Jan 2008 23:26:31 -0600 Subject: Fix typos in code comments Signed-off-by: Dan McGee --- scripts/repo-add.sh.in | 8 ++++---- scripts/repo-remove.sh.in | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'scripts/repo-add.sh.in') diff --git a/scripts/repo-add.sh.in b/scripts/repo-add.sh.in index c7aa11a2..c37a12fa 100644 --- a/scripts/repo-add.sh.in +++ b/scripts/repo-add.sh.in @@ -80,7 +80,7 @@ test_repo_db_file () { return 0 # YES fi else - return 0 # YES - No database file is also aloud. + return 0 # YES - No database file is also allowed fi return 1 # NO @@ -141,7 +141,7 @@ db_write_entry() startdir local OLDIFS="$IFS" - # IFS (field seperator) is only the newline character + # IFS (field separator) is only the newline character IFS=" " @@ -288,7 +288,7 @@ gstmpdir=$(mktemp -d /tmp/repo-add.XXXXXXXXXX) || (\ exit 1) success=0 -# parse arguements +# parse arguments for arg in "$@"; do if [ "$arg" == "--force" -o "$arg" == "-f" ]; then FORCE=1 @@ -318,7 +318,7 @@ for arg in "$@"; do fi done -# if all operations were a success, rezip database +# if all operations were a success, re-zip database if [ $success -eq 1 ]; then msg "$(gettext "Creating updated database file %s")" "$REPO_DB_FILE" pushd "$gstmpdir" 2>&1 >/dev/null diff --git a/scripts/repo-remove.sh.in b/scripts/repo-remove.sh.in index 6335c00f..05bec390 100644 --- a/scripts/repo-remove.sh.in +++ b/scripts/repo-remove.sh.in @@ -132,7 +132,7 @@ gstmpdir=$(mktemp -d /tmp/repo-remove.XXXXXXXXXX) || (\ exit 1) success=0 -# parse arguements +# parse arguments for arg in "$@"; do if [ -z "$REPO_DB_FILE" ]; then REPO_DB_FILE=$(readlink -f "$arg") @@ -154,7 +154,7 @@ for arg in "$@"; do fi done -# if all operations were a success, rezip database +# if all operations were a success, re-zip database if [ $success -eq 1 ]; then msg "$(gettext "Creating updated database file '%s'...")" "$REPO_DB_FILE" pushd "$gstmpdir" 2>&1 >/dev/null -- cgit v1.2.3-70-g09d2