Commits

Zhang Huangbin  committed ea2ed30

It now works on openSUSE-12.1. Tested with openSUSE-12.1-rc1.

  • Participants
  • Parent commits d27fb93

Comments (0)

Files changed (5)

File iRedMail/ChangeLog

 iRedMail-0.7.4:
-    * It now works on Ubuntu 11.10.
+    * It now works on Ubuntu 11.10, openSUSE 12.1.
     * SPF verification is now enabled by default.
     * Add Policyd-2.0.x (code name "cluebringer") support on Ubuntu 11.10.
     * LDA (Dovecot deliver) will move SPAM to Junk folder by default.

File iRedMail/functions/iredadmin.sh

     chown -R ${IREDADMIN_HTTPD_USER}:${IREDADMIN_HTTPD_GROUP} ${IREDADMIN_HTTPD_ROOT}
     chmod -R 0555 ${IREDADMIN_HTTPD_ROOT}
 
+    if [ X"${DISTRO}" == X"SUSE" ]; then
+        if [ X"${DISTRO_VERSION}" != X"11.3" -a X"${DISTRO_VERSION}" != X"11.4" ]; then
+            # Convert 'TYPE=' to 'ENGINE=' while creating tables.
+            perl -pi -e 's#TYPE=#ENGINE=#g' ${IREDADMIN_HTTPD_ROOT}/docs/samples/iredadmin.sql
+
+            # Convert TIMESTAMP(14) to TIMESTAMP.
+            perl -pi -e 's#TIMESTAMP\(14\)#TIMESTAMP#g' ${IREDADMIN_HTTPD_ROOT}/docs/samples/iredadmin.sql
+        fi
+    fi
+
     # Copy sample configure file.
     cd ${IREDADMIN_HTTPD_ROOT}/
 

File iRedMail/functions/packages.sh

 
         elif [ X"${DISTRO}" == X"SUSE" ]; then
             # Note: Web.py will be installed locally via 'easy_install'.
-            ALL_PKGS="${ALL_PKGS} apache2-mod_wsgi python-jinja2 python-mysql python-setuptools python-xml"
+            ALL_PKGS="${ALL_PKGS} apache2-mod_wsgi python-jinja2 python-mysql python-xml"
+            if [ X"${DISTRO_VERSION}" == X"11.3" -o X"${DISTRO_VERSION}" == X"11.4" ]; then
+                ALL_PKGS="${ALL_PKGS} python-setuptools"
+            fi
             [ X"${USE_IREDAPD}" != "YES" ] && ALL_PKGS="${ALL_PKGS} python-ldap"
 
         elif [ X"${DISTRO}" == X"DEBIAN" -o X"${DISTRO}" == X"UBUNTU" ]; then

File iRedMail/functions/policyd.sh

     # Get SQL structure template file.
     tmp_sql="/tmp/policyd_config_tmp.${RANDOM}${RANDOM}"
     if [ X"${DISTRO}" == X"RHEL" -o X"${DISTRO}" == X"SUSE" ]; then
+        orig_policyd_sql_file="$(eval ${LIST_FILES_IN_PKG} ${PKG_POLICYD} | grep '/DATABASE.mysql$')"
+
+        # Convert 'TYPE=' to 'ENGINE=' while creating tables.
+        if [ X"${DISTRO}" == X"SUSE" ]; then
+            if [ X"${DISTRO_VERSION}" != X"11.3" -a X"${DISTRO_VERSION}" != X"11.4" ]; then
+                perl -pi -e 's#TYPE=#ENGINE=#g' ${orig_policyd_sql_file}
+            fi
+        fi
+
         cat > ${tmp_sql} <<EOF
 # Import SQL structure template.
-SOURCE $(eval ${LIST_FILES_IN_PKG} ${PKG_POLICYD} | grep '/DATABASE.mysql$');
+SOURCE ${orig_policyd_sql_file};
 
 # Grant privileges.
 GRANT SELECT,INSERT,UPDATE,DELETE ON ${POLICYD_DB_NAME}.* TO "${POLICYD_DB_USER}"@localhost IDENTIFIED BY "${POLICYD_DB_PASSWD}";

File iRedMail/pkgs/get_all.sh

 elif [ X"${DISTRO}" == X"SUSE" ]; then
     create_repo_suse
 
-    ECHO_INFO "Refresh zypper repositories."
-    zypper clean --all
+    ECHO_INFO "Clean and refresh metadata of zypper repositories."
+    zypper clean --metadata --raw-metadata
     zypper refresh
 elif [ X"${DISTRO}" == X"UBUNTU" ]; then
     create_repo_ubuntu