From 9d6ce6117aaeb0fa9a0e51fc64943aee0bee0728 Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Sun, 13 Feb 2011 13:59:07 +0000 Subject: [PATCH] Rework how symlinks work. The only directory to use is /var/lib/roundcube. We use symlink from /usr/share/roundcube to /var/lib/roundcube and not the other way. Moreover, plugins and skins are also symlinked. A user should be able to add plugins and skins in /var/lib/roundcube while default ones are in /usr/share/roundcube. Closes: #612553. --- debian/changelog | 6 ++++++ debian/roundcube-core.dirs | 2 ++ debian/roundcube-core.install | 5 +++-- debian/roundcube-core.links | 10 +++++----- debian/rules | 11 ----------- 5 files changed, 16 insertions(+), 18 deletions(-) diff --git a/debian/changelog b/debian/changelog index c5004c8..fd8d1af 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,6 +5,12 @@ roundcube (0.5-3) UNRELEASED; urgency=low dbconfig-common. We do not ship UPGRADING file any more since it is misleading. Closes: #612511. * Fix MySQL indexes if upgrading from 0.5-2 or lesser. Closes: #610725. + * Rework how symlinks work. The only directory to use is + /var/lib/roundcube. We use symlink from /usr/share/roundcube to + /var/lib/roundcube and not the other way. Moreover, plugins and skins + are also symlinked. A user should be able to add plugins and skins in + /var/lib/roundcube while default ones are in + /usr/share/roundcube. Closes: #612553. -- Vincent Bernat Wed, 09 Feb 2011 07:32:42 +0100 diff --git a/debian/roundcube-core.dirs b/debian/roundcube-core.dirs index a008a6e..0b78331 100644 --- a/debian/roundcube-core.dirs +++ b/debian/roundcube-core.dirs @@ -7,4 +7,6 @@ etc/roundcube var/log/roundcube var/lib/roundcube/config var/lib/roundcube/plugins +var/lib/roundcube/skins +var/lib/roundcube/temp etc/default diff --git a/debian/roundcube-core.install b/debian/roundcube-core.install index ddeac9e..c93c681 100644 --- a/debian/roundcube-core.install +++ b/debian/roundcube-core.install @@ -1,5 +1,6 @@ robots.txt index.php .htaccess program/ bin/ usr/share/roundcube -skins temp var/lib/roundcube -plugins/filesystem_attachments var/lib/roundcube/plugins +skins/default/ usr/share/roundcube/skins +plugins/filesystem_attachments/ usr/share/roundcube/plugins + debian/conf/* etc/roundcube config/*.php etc/roundcube diff --git a/debian/roundcube-core.links b/debian/roundcube-core.links index fa13d43..11be6ca 100644 --- a/debian/roundcube-core.links +++ b/debian/roundcube-core.links @@ -1,8 +1,8 @@ etc/roundcube/main.inc.php var/lib/roundcube/config/main.inc.php -var/lib/roundcube/temp usr/share/roundcube/temp -var/lib/roundcube/plugins usr/share/roundcube/plugins -var/lib/roundcube/skins usr/share/roundcube/skins -var/lib/roundcube/config usr/share/roundcube/config +usr/share/roundcube/index.php var/lib/roundcube/index.php +usr/share/roundcube/robots.txt var/lib/roundcube/robots.txt +usr/share/roundcube/program var/lib/roundcube/program +usr/share/roundcube/skins/default var/lib/roundcube/skins/default +usr/share/roundcube/plugins/filesystem_attachments var/lib/roundcube/plugins/filesystem_attachments var/log/roundcube var/lib/roundcube/logs -var/lib/roundcube/logs usr/share/roundcube/logs usr/share/roundcube/main.inc.php.dist usr/share/doc/roundcube/main.inc.php.dist diff --git a/debian/rules b/debian/rules index e7322f5..49ef123 100755 --- a/debian/rules +++ b/debian/rules @@ -5,17 +5,6 @@ include /usr/share/cdbs/1/rules/debhelper.mk DEB_INSTALL_CHANGELOGS_ALL=CHANGELOG binary-install/roundcube-core:: - # Remove plugins - rm -rf $(CURDIR)/debian/roundcube-core/usr/share/roundcube/plugins - - # Symlink all that is in /usr/share/roundcube to /var/lib/roundcube - find debian/roundcube-core/usr/share/roundcube -maxdepth 1 -mindepth 1 | \ - while read i; do \ - if [ ! -L "$$i" ]; then \ - dh_link -proundcube-core "`echo "$$i" | sed -e s#debian/roundcube-core/##`" \ - "`echo "$$i" | sed -e s#debian/roundcube-core/usr/share/roundcube/#var/lib/roundcube/#`"; \ - fi \ - done # Install config files install -m 0640 $(CURDIR)/config/db.inc.php.dist $(CURDIR)/debian/roundcube-core/etc/roundcube/db.inc.php install -m 0640 $(CURDIR)/config/main.inc.php.dist $(CURDIR)/debian/roundcube-core/usr/share/roundcube -- 2.39.2