diff --git a/README.md b/README.md index efbfa3c..bd5d467 100644 --- a/README.md +++ b/README.md @@ -4,15 +4,10 @@ Roundcube for YunoHost This is a work-in-progress package review to update Roundcube to 1.1.x and make use of new YunoHost facilities - e.g. app helpers. -**Please note that upgrade from official app has not been fully tested -and so is not safe yet. Use this app at your own risk, but feel free to -report issues and/or improvements!** - ## TODO * Ask for rcmcarddav installation and/or check if *Baikal* or *ownCloud* is installed - * Test to upgrade from the current Roundcube version * ... ## Links ## diff --git a/patches/00-installto-opts.patch b/patches/00-installto-opts.patch index fc27f50..5c66498 100644 --- a/patches/00-installto-opts.patch +++ b/patches/00-installto-opts.patch @@ -1,5 +1,5 @@ ---- a/bin/installto.sh 2016-03-26 19:17:32.092002076 +0100 -+++ b/bin/installto.sh 2016-03-26 19:26:37.787511189 +0100 +--- a/bin/installto.sh 2016-03-30 15:46:11.686447589 +0200 ++++ b/bin/installto.sh 2016-03-30 15:49:27.184064426 +0200 @@ -23,6 +23,9 @@ require_once INSTALL_PATH . 'program/include/clisetup.php'; @@ -30,3 +30,16 @@ $err = false; echo "Copying files to target location..."; $dirs = array('program','installer','bin','SQL','plugins','skins'); +@@ -77,7 +82,11 @@ + + if (!$err) { + echo "Running update script at target...\n"; +- system("cd $target_dir && php bin/update.sh --version=$oldversion"); ++ $command = "cd $target_dir && php bin/update.sh --version=$oldversion"; ++ if ($opts['accept']) { ++ $command .= " --accept"; ++ } ++ system($command); + echo "All done.\n"; + } + } diff --git a/scripts/_common.sh b/scripts/_common.sh index 530e469..6a694d0 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -83,7 +83,8 @@ init_composer() { # install composer curl -sS https://getcomposer.org/installer \ - | exec_as "$AS_USER" php -- --quiet --install-dir="$DESTDIR" \ + | exec_as "$AS_USER" COMPOSER_HOME="${DESTDIR}/.composer" \ + php -- --quiet --install-dir="$DESTDIR" \ || die "Unable to install Composer" # install composer.json diff --git a/scripts/upgrade b/scripts/upgrade index 00565d7..1bfc8c7 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -63,7 +63,7 @@ if [[ -f ${DESTDIR}/composer.json ]]; then # TODO: update new Roundcube dependencies versions exec_composer www-data "$DESTDIR" update --no-dev else - init_composer "$DESTDIR" + init_composer "$DESTDIR" www-data fi # Install some plugins manually