[BUGFIX] Proper access rights for l10n packages 70/41970/2
authorXavier Perseguers <xavier@typo3.org>
Mon, 27 Jul 2015 08:26:18 +0000 (10:26 +0200)
committerXavier Perseguers <xavier@typo3.org>
Mon, 27 Jul 2015 13:26:05 +0000 (15:26 +0200)
Change-Id: I7f4e86e55e915a21ffd46d7cf4a062948c5899b4
Reviewed-on: http://review.typo3.org/41970
Reviewed-by: Xavier Perseguers <xavier@typo3.org>
Tested-by: Xavier Perseguers <xavier@typo3.org>
pootle/tasks/main.yml
typo3/files/scripts/bin/build-language-pack
typo3/files/scripts/bin/build-sysext-language-pack
typo3/tasks/main.yml

index ce21f3a..5e8e764 100644 (file)
   file: path=/var/log/pootle state=directory owner=pootle group=pootle
 
 - name: Create directory for PO files
-  file: path={{ pootle_po_directory }} state=directory owner=pootle
+  file: path={{ pootle_po_directory }} state=directory owner=pootle mode=0755
 
 - name: Set up init.d scripts for Pootle
-  template: src=pootle.j2 dest=/etc/init.d/pootle owner=root group=root mode=755
+  template: src=pootle.j2 dest=/etc/init.d/pootle owner=root group=root mode=0755
 
 - name: Configure Pootle
   template: src=pootle.conf.j2 dest=/etc/pootle/pootle.conf owner=pootle group=root
index 0a613ed..65076f4 100755 (executable)
@@ -15,11 +15,6 @@ else
 fi
 
 cd $(dirname $0)
-#if [ -z "$FORCE_EXTENSION" ]; then
-#      # Sync whole stores, --project seems not totally reliable
-#      echo "Synchronizing all stores ... "
-#      ${POOTLE_MANAGE} sync_stores 2>&1
-#fi
 
 for EXTNAME in $EXTENSIONS; do
        validProjectName ${EXT_PREFIX}.${EXTNAME} || exit 1
@@ -112,6 +107,7 @@ for EXTNAME in $EXTENSIONS; do
                        # ../ to include $EXTNAME directory
                        cd ../
                        zip -9 $_LANGUAGE_PACK_PATH/$EXTNAME-l10n-$LANG.zip -r . >/dev/null
+                       chmod 644 ${_LANGUAGE_PACK_PATH}/${EXTNAME}-l10n-${LANG}.zip
 
                        popd >/dev/null
 
@@ -129,7 +125,7 @@ for EXTNAME in $EXTENSIONS; do
        _LANGUAGE_PACK_NAME=${EXTNAME}-l10n
        _LANGUAGE_INDEX_FILE=${_LANGUAGE_PACK_NAME}.xml
        rm -f $_LANGUAGE_INDEX_FILE
-        touch $_LANGUAGE_INDEX_FILE
+       touch $_LANGUAGE_INDEX_FILE
 
        echo -e "<?xml version=\"1.0\" standalone=\"yes\" ?>"                   >> $_LANGUAGE_INDEX_FILE
        echo -e "<TERlanguagePackIndex>"                                        >> $_LANGUAGE_INDEX_FILE
@@ -150,14 +146,19 @@ for EXTNAME in $EXTENSIONS; do
        echo -e "\t</languagePackIndex>"                                        >> $_LANGUAGE_INDEX_FILE
        echo -e "</TERlanguagePackIndex>"                                       >> $_LANGUAGE_INDEX_FILE
 
+       chmod 644 $_LANGUAGE_INDEX_FILE
+
        popd >/dev/null
 
        rm -rf ${TER_L10N_PATH}/_$EXTNAME
 
-       # Mark changes on directories
+       # Mark changes on directories and fix access rights
        touch ${TER_L10N_PATH}/${EXTNAME:0:1}/${EXTNAME:1:1}/${EXTNAME}-l10n
+       chmod 755 ${TER_L10N_PATH}/${EXTNAME:0:1}/${EXTNAME:1:1}/${EXTNAME}-l10n
        touch ${TER_L10N_PATH}/${EXTNAME:0:1}/${EXTNAME:1:1}
+       chmod 755 ${TER_L10N_PATH}/${EXTNAME:0:1}/${EXTNAME:1:1}
        touch ${TER_L10N_PATH}/${EXTNAME:0:1}
+       chmod 755 ${TER_L10N_PATH}/${EXTNAME:0:1}
 
        popd >/dev/null
 done
index e1040e8..03a2d1c 100755 (executable)
@@ -15,11 +15,6 @@ else
 fi
 
 cd $(dirname $0)
-#if [ -z "$FORCE_EXTENSION" ]; then
-#      # Sync whole stores, --project seems not totally reliable
-#      echo "Synchronizing all stores ... "
-#      ${POOTLE_MANAGE} sync_stores 2>&1
-#fi
 
 for EXTNAME in $EXTENSIONS; do
        validProjectName ${EXT_PREFIX}.${EXTNAME} || exit 1
@@ -176,6 +171,7 @@ EOT
                                # ../ to include $EXTNAME directory
                                cd ../
                                zip -9 ${_LANGUAGE_PACK_PATH}/${EXTNAME}-l10n-${LANG}${SUFFIX}.zip -r . >/dev/null
+                               chmod 644 ${_LANGUAGE_PACK_PATH}/${EXTNAME}-l10n-${LANG}${SUFFIX}.zip
 
                                popd >/dev/null
 
@@ -216,14 +212,19 @@ EOT
                echo -e "\t</languagePackIndex>"                                        >> $_LANGUAGE_INDEX_FILE
                echo -e "</TERlanguagePackIndex>"                                       >> $_LANGUAGE_INDEX_FILE
 
+               chmod 644 $_LANGUAGE_INDEX_FILE
+
                popd >/dev/null
 
                rm -rf ${TER_L10N_PATH}/_$EXTNAME
 
-               # Mark changes on directories
+               # Mark changes on directories and fix access rights
                touch ${TER_L10N_PATH}/${EXTNAME:0:1}/${EXTNAME:1:1}/${EXTNAME}-l10n
+               chmod 755 ${TER_L10N_PATH}/${EXTNAME:0:1}/${EXTNAME:1:1}/${EXTNAME}-l10n
                touch ${TER_L10N_PATH}/${EXTNAME:0:1}/${EXTNAME:1:1}
+               chmod 755 ${TER_L10N_PATH}/${EXTNAME:0:1}/${EXTNAME:1:1}
                touch ${TER_L10N_PATH}/${EXTNAME:0:1}
+               chmod 755 ${TER_L10N_PATH}/${EXTNAME:0:1}
        done
 
        popd >/dev/null
index d8c9d61..272a3af 100644 (file)
@@ -30,7 +30,7 @@
   copy: src=bash_profile.txt dest=/home/pootle/.bash_profile owner=pootle group=pootle
 
 - name: Install TYPO3 management scripts
-  copy: src=scripts dest=/home/pootle owner=pootle group=pootle mode=750
+  copy: src=scripts dest=/home/pootle owner=pootle group=pootle mode=0750
 
 - name: Install Pootle templates
   copy: src=templates dest=/home/pootle owner=pootle group=pootle