From 19f5f144aeeb29b1140ce739aa18ff797e0fe8fc Mon Sep 17 00:00:00 2001 From: Joshua Tauberer Date: Thu, 1 May 2014 20:28:40 +0000 Subject: [PATCH] installing roundcube from debian would cause update from ubuntu later, now install from Ubuntu debs We were installing .deb's from Debian. The next apt-get upgrade would cause roundcube to be upgraded. Maybe that also triggered the installation of apache. Now install roundcube from Ubuntu. So long as Ubuntu doesn't post an update to roundcube, at least it won't trigger an upgrade on the next apt-get upgrade. This should also mean we don't need to purge the installation of apache2. Also try using apt-mark hold to prevent roundcube from being updated, in case that will trigger dependencies. --- scripts/web.sh | 5 ----- scripts/webmail.sh | 21 ++++++++++++--------- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/scripts/web.sh b/scripts/web.sh index cc0c1b4a..93a76f8c 100755 --- a/scripts/web.sh +++ b/scripts/web.sh @@ -3,11 +3,6 @@ source scripts/functions.sh # load our functions -# Remove Apache before installing Nginx. Apache may leave -# some unwanted configuration files around (e.g. a ufw -# application config), so purge the packages. -apt-get purge -q -y apache2 apache2.2-common - apt_install nginx php5-cgi rm -f /etc/nginx/sites-enabled/default diff --git a/scripts/webmail.sh b/scripts/webmail.sh index d842911b..09203d0f 100755 --- a/scripts/webmail.sh +++ b/scripts/webmail.sh @@ -4,26 +4,29 @@ source scripts/functions.sh # load our functions source /etc/mailinabox.conf # load global vars -# Ubuntu's roundcube-core has a dependency on Apache & MySQL, which we don't want, so we can't +# Ubuntu's roundcube-core has dependencies on Apache & MySQL, which we don't want, so we can't # install roundcube directly via apt-get install. We'll use apt-get to manually install the -# dependencies of roundcube that we know we need, and then we'll manually install debs for the -# roundcube version we want from Debian. -# -# The dependencies are from 'apt-cache showpkg roundcube-core'. +# dependencies of roundcube that we know we need, and then we'll manually install debs for +# roundcube using dpkg so that dependencies aren't triggered. +# These dependencies are from 'apt-cache showpkg roundcube-core'. apt_install \ dbconfig-common \ php5 php5-sqlite php5-mcrypt php5-intl php5-json php5-common php-auth php-net-smtp php-net-socket php-net-sieve php-mail-mime php-crypt-gpg php5-gd php5-pspell \ tinymce libjs-jquery libjs-jquery-mousewheel libmagic1 -mkdir -p externals -pkg_ver=0.9.5-4_all -wget -nc -P externals http://ftp.debian.org/debian/pool/main/r/roundcube/{roundcube,roundcube-core,roundcube-sqlite3,roundcube-plugins}_$pkg_ver.deb -DEBIAN_FRONTEND=noninteractive dpkg -Gi externals/{roundcube,roundcube-core,roundcube-sqlite3,roundcube-plugins}_$pkg_ver.deb +mkdir -p /tmp/roundcube_debs +pushd /tmp/roundcube_debs +apt-get download roundcube roundcube-core roundcube-sqlite3 roundcube-plugins +DEBIAN_FRONTEND=noninteractive dpkg -Gi *.deb +popd +rm -rf /tmp/roundcube_debs +apt-mark hold roundcube-core # hopefully apt-get won't attempt to upgrade it, which might trigger dependenciees? # Buuuut.... the .deb is missing things? src_fn=roundcube_0.9.5.orig.tar.gz src_dir=roundcubemail-0.9.5-dep +mkdir -p externals wget -nc -P externals http://ftp.debian.org/debian/pool/main/r/roundcube/$src_fn tar -C /tmp -xzf $(pwd)/externals/$src_fn if [ ! -d /var/lib/roundcube/SQL ]; then mv /tmp/$src_dir/SQL/ /var/lib/roundcube/; fi