Hello community, here is the log from the commit of package roundcubemail for openSUSE:Factory checked in at 2014-11-11 01:10:42 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/roundcubemail (Old) and /work/SRC/openSUSE:Factory/.roundcubemail.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "roundcubemail" Changes: -------- --- /work/SRC/openSUSE:Factory/roundcubemail/roundcubemail.changes 2014-09-30 19:42:10.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.roundcubemail.new/roundcubemail.changes 2014-11-11 01:11:26.000000000 +0100 @@ -1,0 +2,5 @@ +Sat Nov 08 20:02:00 UTC 2014 - Led <led...@gmail.com> + +- fix bashisms in post scripts + +------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ roundcubemail.spec ++++++ --- /var/tmp/diff_new_pack.jm4uYe/_old 2014-11-11 01:11:27.000000000 +0100 +++ /var/tmp/diff_new_pack.jm4uYe/_new 2014-11-11 01:11:27.000000000 +0100 @@ -166,47 +166,36 @@ %pre # backup logs, temp and config for migration -if [[ ! -h %{roundcubepath}/logs ]]; then - if [[ -d %{roundcubepath}/logs ]]; then +if [ ! -h %{roundcubepath}/logs ] && [ -d %{roundcubepath}/logs ]; then mkdir -p %{roundcubepath}/migration mv %{roundcubepath}/logs %{roundcubepath}/migration/. - fi fi -if [[ ! -h %{roundcubepath}/temp ]]; then - if [[ -d %{roundcubepath}/temp ]]; then +if [ ! -h %{roundcubepath}/temp ] && [ -d %{roundcubepath}/temp ]; then mkdir -p %{roundcubepath}/migration mv %{roundcubepath}/temp %{roundcubepath}/migration/. - fi fi -if [[ ! -h %{roundcubepath}/SQL ]]; then - if [[ -d %{roundcubepath}/SQL ]]; then +if [ ! -h %{roundcubepath}/SQL ] && [ -d %{roundcubepath}/SQL ]; then mkdir -p %{roundcubepath}/migration mv %{roundcubepath}/SQL %{roundcubepath}/migration/. - fi fi for PLUGIN in acl managesieve password; do - if [[ ! -h %{roundcubepath}/plugins/$PLUGIN/config.inc.php ]]; then - if [[ -f %{roundcubepath}/plugins/$PLUGIN/config.inc.php ]]; then + if [ ! -h %{roundcubepath}/plugins/$PLUGIN/config.inc.php ] && [ -f %{roundcubepath}/plugins/$PLUGIN/config.inc.php ]; then mv %{roundcubepath}/plugins/$PLUGIN/config.inc.php %{roundcubepath}/migration/$PLUGIN.inc.php fi - fi done %post # replace default des string in config file for better security -function makedesstr () { - chars=(0 1 2 3 4 5 6 7 8 9 a b c d e f g h i j k l m n o p q r s t u v w x y z A - B C D E F G H I J K L M N O P Q R S T U V W X Y Z) - - max=${#chars[*]} - - for i in `seq 1 24`; do - let rand=${RANDOM}%%${max} - str="${str}${chars[$rand]}" +makedesstr() { + local chars="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" + local max=${#chars} + for i in $(seq 1 24); do + echo "$chars" | dd bs=1 skip=$(($(od -An -d -N2 /dev/urandom) % $max)) count=1 2>/dev/null done - echo $str + echo } + sed -i "s/rcmail-\!24ByteDESkey\*Str/`makedesstr`/" %{roundcubeconfigpath}/defaults.inc.php || : &> /dev/null # enable apache required apache modules @@ -216,38 +205,30 @@ fi # restore backed up logs, temp and config -if [[ -h %{roundcubepath}/logs ]]; then - if [[ -d %{roundcubepath}/migration/logs ]]; then +if [ -h %{roundcubepath}/logs ] && [ -d %{roundcubepath}/migration/logs ]; then mkdir -p %{roundcubepath}/migrated cp %{roundcubepath}/migration/logs/* %{roundcubepath}/logs/. mv %{roundcubepath}/migration/logs %{roundcubepath}/migrated/. - fi fi -if [[ -h %{roundcubepath}/temp ]]; then - if [[ -d %{roundcubepath}/migration/temp ]]; then +if [ -h %{roundcubepath}/temp ] && [ -d %{roundcubepath}/migration/temp ]; then mkdir -p %{roundcubepath}/migrated cp %{roundcubepath}/migration/temp/* %{roundcubepath}/temp/. mv %{roundcubepath}/migration/temp %{roundcubepath}/migrated/. - fi fi -if [[ -h %{roundcubepath}/SQL ]]; then - if [[ -d %{roundcubepath}/migration/SQL ]]; then +if [ -h %{roundcubepath}/SQL ] && [ -d %{roundcubepath}/migration/SQL ]; then rm -r %{roundcubepath}/migration/SQL - fi fi for PLUGIN in acl managesieve password; do - if [[ -f %{roundcubepath}/migration/$PLUGIN.inc.php ]]; then - if [[ -h %{roundcubepath}/plugins/$PLUGIN/config.inc.php ]]; then + if [ -f %{roundcubepath}/migration/$PLUGIN.inc.php ] && [ -h %{roundcubepath}/plugins/$PLUGIN/config.inc.php ]; then cp %{roundcubepath}/migration/$PLUGIN.inc.php %{roundcubeconfigpath}/. mv %{roundcubepath}/migration/$PLUGIN.inc.php %{roundcubepath}/migrated/$PLUGIN.inc.php fi - fi done for MIGDIR in migration migrated; do - if [[ -d %{roundcubepath}/$MIGDIR ]]; then + if [ -d %{roundcubepath}/$MIGDIR ]; then find %{roundcubepath}/$MIGDIR -empty -delete fi - if [[ -d %{roundcubepath}/$MIGDIR ]]; then + if [ -d %{roundcubepath}/$MIGDIR ]; then echo "Found %{roundcubepath}/$MIGDIR! Make sure you delete this folder after checking the migration!" fi done -- To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org For additional commands, e-mail: opensuse-commit+h...@opensuse.org