Skip to content

Commit

Permalink
Create tarballs with Guzzle v6 and v7 (Fixes #385)
Browse files Browse the repository at this point in the history
  • Loading branch information
mstilkerich committed Jun 20, 2022
1 parent f71e708 commit ba39ece
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 12 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# Changelog for RCMCardDAV

## Version 4.x.x (to 4.3.0)
## Version 4.4.0 (to 4.3.0)

- MySQL/PostgreSQL: Increase maximum length limit for addressbook name (Fixes #382)
- Fix: log messages could go to the wrong logger (carddav\_http.log) for a small part of the init code
- Support setting roundcube's collected senders/recipients to addressbooks from preset (Fixes #383)
- Provide tarball releases in two variants: Guzzle v6 (roundcube 1.5) and v7 (roundcube 1.6) (Fixes #385)

## Version 4.3.0 (to 4.2.2)

Expand Down
14 changes: 9 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,16 @@ tarball:
git archive --format tar --prefix carddav/ -o releases/carddav-$(RELEASE_VERSION).tar --worktree-attributes $(RELEASE_VERSION)
@# Fetch a clean state of all dependencies
composer create-project --repository='{"type":"vcs", "url":"file://$(PWD)" }' -q --no-dev --no-plugins roundcube/carddav releases/carddav $(RELEASE_VERSION)
@# Force a Guzzle version compatible with roundcube 1.5
@# Tar the release with up-to-date dependencies as roundcube 1.6+ release tarball
cp releases/carddav-$(RELEASE_VERSION).tar releases/carddav-$(RELEASE_VERSION)-roundcube16.tar
tar -C releases --owner 0 --group 0 -rf releases/carddav-$(RELEASE_VERSION)-roundcube16.tar carddav/vendor
@# Force a Guzzle version compatible with roundcube 1.5 (^6.5.5)
cd releases/carddav && composer require -q --update-no-dev --update-with-dependencies 'guzzlehttp/guzzle:^6.5.5'
@# Append dependencies to the tar
tar -C releases --owner 0 --group 0 -rf releases/carddav-$(RELEASE_VERSION).tar carddav/vendor
@# gzip the tarball
gzip releases/carddav-$(RELEASE_VERSION).tar
@# Append dependencies to the 1.5 tar
cp releases/carddav-$(RELEASE_VERSION).tar releases/carddav-$(RELEASE_VERSION)-roundcube15.tar
tar -C releases --owner 0 --group 0 -rf releases/carddav-$(RELEASE_VERSION)-roundcube15.tar carddav/vendor
@# gzip the tarballs
gzip -v releases/carddav-$(RELEASE_VERSION)*.tar

define EXECDBSCRIPT_postgres
sed -e 's/TABLE_PREFIX//g' $(2) | $(PSQL) $(1)
Expand Down
21 changes: 15 additions & 6 deletions doc/INSTALL.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Installation of RCMCardDAV plugin

There is two ways to install the plugin.
There are two ways to install the plugin.

1. Using composer with libraries globally managed across the entire roundcube installation (__recommended__)
2. Installation from release tarball with the plugin's dependencies located in the plugin directory. There is the
Expand Down Expand Up @@ -54,11 +54,18 @@ inside that tarball for the appropriate instructions.

- Log out of Roundcube!
This is important because RCMCardDAV runs its database initialisation / update procedure only when a user logs in!
- Choose the correct release tarball
- For roundcube version 1.5, or if your PHP version is older than PHP 7.2.5, use `carddav-vX.Y.Z-roundcube15.tar.gz`
- Otherwise, use `carddav-vX.Y.Z-roundcube16.tar.gz`
- The difference between the two is only in the included dependencies. The 1.5 version includes an older version of
the Guzzle HTTP client library as used by roundcube 1.5. Roundcube versions older than 1.5 do not use Guzzle, so you
can use the 1.6 tarball with the current Guzzle if your PHP version is recent enough for Guzzle v7 (PHP 7.2.5).
- Note: Release tarballs prior to v4.4.0 are only provided in a single version including Guzzle v6.
- Download the release tarball from [here](https://github.com/mstilkerich/rcmcarddav/releases)
- Note: The correct tarball is named `carddav-vX.Y.Z.tar.gz`. Do not use the "Source code" tar.gz or zip files, these
are only exports of the repository. Unfortunately, github creates these automatically for each release.
- Note: The correct tarball is named `carddav-vX.Y.Z-roundcube1V.tar.gz`. Do not use the "Source code" tar.gz or zip
files, these are only exports of the repository. Unfortunately, github creates these automatically for each release.
- Extract the tarball to the roundcube/plugins directory (assuming roundcube is installed at `/var/lib/roundcube`)
`cd /var/lib/roundcube/plugins && tar xvzf /tmp/carddav-v4.1.0.tar.gz`
`cd /var/lib/roundcube/plugins && tar xvzf /tmp/carddav-v4.1.0-roundcube16.tar.gz`
- [Configure](#configuration) the plugin if needed.
- Enable RCMCardDAV in Roundcube
Open the file `config/config.inc.php` and add `carddav` to the array `$config['plugins']`.
Expand All @@ -70,8 +77,8 @@ The version of roundcube packaged by Debian and distributed through the Debian a
installation scheme that is probably needed to comply with the Debian packaging guidelines.
- The static part of roundcube is installed to `/usr/share/roundcube`
- The files that may need to be modified are placed in `/var/lib/roundcube`
- The plugins are searched for in `/var/lib/roundcube/plugins`, some pre-installed plugins are actually stored with the
static part and symlinked from the `plugins` directory.
- The plugins are searched for in `/var/lib/roundcube/plugins`, some pre-installed plugins are actually stored with
the static part and symlinked from the `plugins` directory.

The easiest way to install the RCMCardDAV plugin in this situation is to install from tarball using the corresponding
[instructions](#Installation-from-release-tarball) above. The example code already contains the correct paths for
Expand All @@ -83,3 +90,5 @@ Configuration is optional. See [ADMIN-SETTINGS.md](ADMIN-SETTINGS.md) for a desc

- Copy the template `config.inc.php.dist` to `config.inc.php` (composer may already have done this for you)
- Edit `plugins/carddav/config.inc.php` as you need.

<!-- vim: set ts=4 sw=4 expandtab fenc=utf8 ff=unix tw=120: -->

0 comments on commit ba39ece

Please sign in to comment.