This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "FusionForge".

The branch, master has been updated
       via  d6e5cfba348d8ced0f7fa68791fcc8b170221d5c (commit)
      from  aae19fa8f9296e676cbc0252c41063f3a7308698 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=d6e5cfba348d8ced0f7fa68791fcc8b170221d5c

commit d6e5cfba348d8ced0f7fa68791fcc8b170221d5c
Author: Ralf Habacker <[email protected]>
Date:   Wed Apr 12 12:47:29 2017 +0200

    Add opensuse support to scripts in autoinstall subdir
    
    Signed-off-by: Franck Villaume <[email protected]>

diff --git a/autoinstall/build.sh b/autoinstall/build.sh
index e847c43..5262434 100755
--- a/autoinstall/build.sh
+++ b/autoinstall/build.sh
@@ -21,6 +21,7 @@
 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 
 set -e
+. $(dirname $0)/common-backports
 
 # Debian and Fedora/CentOS/RHEL *package building* are so different
 # that there's nothing to factour out, so they are in separate functions.
@@ -161,10 +162,41 @@ function build_rpm {
        EOF
 }
 
+function build_suse_rpm {
+       suse_check_release
+       suse_install_repos
+       suse_install_rpms make gettext-runtime gettext-tools tar bzip2 
rpm-build createrepo php5
+
+       # Build package
+       cd $(dirname $0)/../src/
+       base_version=$(make version)
+       snapshot=$(date +%Y%m%d%H%M)
+       version=$base_version+$snapshot
+       rpm/gen_spec.sh $base_version $snapshot
+       make dist VERSION=$version
+       mkdir -p ../build/SOURCES/ ../build/SPECS/
+       mv fusionforge-$version.tar.bz2 
../build/SOURCES/fusionforge-$version.tar.bz2
+       chown -h root: ../build/SOURCES/fusionforge-$version.tar.bz2
+       cp fusionforge.spec ../build/SPECS/
+       rpmbuild ../build/SPECS/fusionforge.spec --define "_topdir 
$(pwd)/../build" -ba
+
+       (cd ../build/RPMS/ && createrepo .)
+       repopath=$(readlink  ../build/RPMS/)
+       cat <<-EOF | sed 's,@PATH@,$repopath,g' > /etc/zypp/repos.d/local.repo
+       [local]
+       name=local
+       baseurl=file://@PATH@
+       enabled=1
+       gpgcheck=0
+       EOF
+}
+
 if [ -e /etc/debian_version ]; then
     build_deb
 elif [ -e /etc/redhat-release ]; then
     build_rpm
+elif [ -e /etc/SuSE-release ]; then
+    build_suse_rpm
 else
     echo "Automated package building is not supported for this distribution."
     echo "See 
https://fusionforge.org/plugins/mediawiki/wiki/fusionforge/index.php/Installing/FromSource";
diff --git a/autoinstall/common-backports b/autoinstall/common-backports
index be17c9e..01e3304 100644
--- a/autoinstall/common-backports
+++ b/autoinstall/common-backports
@@ -242,3 +242,33 @@ EOF
     # TODO: postfix: rebuild from RHEL/CentOS sources with pgsql enabled,
     # so we can test mta-postfix
 }
+
+function suse_check_release {
+       supported=$(. /etc/os-release; echo $VERSION | grep "42\.[12]")
+       if test -z "$supported"; then
+               echo "unsupported openSUSE version"
+               exit 1
+       fi
+}
+
+function suse_install_repos {
+       has_repo=$(zypper lr | grep 'Apache:Modules' | sed 's,  ,,g')
+       if test -z "$has_repo"; then
+               dist_path=$(. /etc/os-release; echo $PRETTY_NAME | sed 's, 
,_,g')
+               zypper ar 
http://download.opensuse.org/repositories/Apache:/Modules/$dist_path/ 
Apache:Modules
+       fi
+}
+
+function suse_install_rpms {
+       # Install build dependencies
+       modules="$*"
+       instmods=""
+       for m in $modules; do
+               if ! rpm -q $m >/dev/null; then
+                       instmods="$instmods $m"
+               fi
+       done
+       if [ -n "$instmods" ] ; then
+               zypper install -y $instmods
+       fi
+}
diff --git a/autoinstall/install-gui.sh b/autoinstall/install-gui.sh
index c403dbf..0677851 100755
--- a/autoinstall/install-gui.sh
+++ b/autoinstall/install-gui.sh
@@ -1,9 +1,15 @@
 #!/bin/bash
 
+set -e
+. $(dirname $0)/common-backports
+
 if [ -e /etc/debian_version ]; then
     apt-get install -y xorg nodm xfce4 gnome-icon-theme
     sed -i -e 's/^NODM_ENABLED=.*/NODM_ENABLED=true/' -e 
's/^NODM_USER=.*/NODM_USER=root/' /etc/default/nodm
     /etc/init.d/nodm restart
+elif [ -e /etc/SuSE-release ]; then
+    suse_check_release
+    suse_install_rpms patterns-openSUSE-xfce_basis
 else
     yum -y groupinstall 'X Window system'
     yum -y --enablerepo=epel groupinstall xfce
diff --git a/autoinstall/install-src.sh b/autoinstall/install-src.sh
index 27b6c67..a07664e 100755
--- a/autoinstall/install-src.sh
+++ b/autoinstall/install-src.sh
@@ -39,6 +39,20 @@ if [ -e /etc/debian_version ]; then
     if ! dpkg-vendor --is Ubuntu; then
        apt-get install locales-all  # 
https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1394929
     fi
+elif [ -e /etc/SuSE-release ]; then
+       suse_check_release
+       suse_install_repos
+       suse_install_rpms make gettext-runtime php5 php5-gettext php5-posix 
php5-pgsql \
+               apache2 apache2-mod_php5 apache2-mod_wsgi apache2-mod_mpm_itk \
+               postgresql-server subversion \
+               php5-pear php5-pear-htmlpurifier \
+               mailman postfix  \
+               openssh  \
+               cvs rcs perl-IPC-Run perl-URI \
+               subversion-server  \
+               git git-web \
+               python-psycopg2 \
+               mediawiki moinmoin-wiki
 else
     yum install -y make tar
     backports_rpm
diff --git a/autoinstall/install.sh b/autoinstall/install.sh
index 2ea555c..cb04c86 100755
--- a/autoinstall/install.sh
+++ b/autoinstall/install.sh
@@ -49,6 +49,16 @@ if [ -e /etc/debian_version ]; then
            apt-get install locales-all  # 
https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1394929
        fi
     fi
+elif [ -e /etc/SuSE-release ]; then
+       suse_check_release
+       suse_install_repos
+       if rpm -q fusionforge >/dev/null ; then
+               zypper update -y
+       else
+               suse_install_rpms make tar fusionforge fusionforge-shell 
fusionforge-scm \
+                       fusionforge-plugin-scmcvs fusionforge-plugin-scmsvn 
fusionforge-plugin-scmgit \
+                       fusionforge-plugin-blocks 
fusionforge-plugin-online_help fusionforge-plugin-taskboard \
+                       fusionforge-plugin-message
 else
     yum install -y make tar
     backports_rpm
diff --git a/autoinstall/uninstall.sh b/autoinstall/uninstall.sh
index fd40e90..761d87b 100755
--- a/autoinstall/uninstall.sh
+++ b/autoinstall/uninstall.sh
@@ -2,6 +2,10 @@
 # Aggressive desinstall for testing a clean re-install
 if [ -e /etc/debian_version ]; then
     aptitude purge ~nforge ~npostgres ~nnss-pgsql ~napache2 ~nphp ~npostfix 
~nexim4
+
+elif [ -e /etc/SuSE-release ]; then
+    zypper remove -y 'fusionforge*' postgresql-server
+    rm -f /etc/cron.d/fusionforge-*
 else
     yum remove -y 'fusionforge*' postgresql
     rm -f /etc/cron.d/fusionforge-*
diff --git a/autoinstall/update.sh b/autoinstall/update.sh
index 69fa60f..ab2cf2c 100755
--- a/autoinstall/update.sh
+++ b/autoinstall/update.sh
@@ -4,6 +4,8 @@
 if [ -e /etc/debian_version ]; then
     aptitude update
     aptitude -y dist-upgrade
+elif [ -e /etc/SuSE-release ]; then
+    zypper update -y
 else
     yum upgrade
 fi

-----------------------------------------------------------------------

Summary of changes:
 autoinstall/build.sh         | 32 ++++++++++++++++++++++++++++++++
 autoinstall/common-backports | 30 ++++++++++++++++++++++++++++++
 autoinstall/install-gui.sh   |  6 ++++++
 autoinstall/install-src.sh   | 14 ++++++++++++++
 autoinstall/install.sh       | 10 ++++++++++
 autoinstall/uninstall.sh     |  4 ++++
 autoinstall/update.sh        |  2 ++
 7 files changed, 98 insertions(+)


hooks/post-receive
-- 
FusionForge

_______________________________________________
Fusionforge-commits mailing list
[email protected]
http://lists.fusionforge.org/cgi-bin/mailman/listinfo/fusionforge-commits

Reply via email to