Opened 5 years ago

Closed 5 years ago

#6961 closed Bug/Something is broken (fixed)

move roundcube.mayfirst.org to roundcube 0.9

Reported by: https://id.mayfirst.org/dkg Owned by: https://id.mayfirst.org/srevilak
Priority: Urgent Component: Tech
Keywords: roundcube roundcube.dev.mayfirst.org Cc:
Sensitive: no

Description

roundcube 0.9's first release candidate is out. If we're going to be encouraging users to use roundcube, we can be better players in the ecosystem (and make sure our itches get scratched) by testing out the release candidates and reporting bugs.

Someone who is used to using and evaluating webmail interfaces might want to go ahead and upgrade https://roundcube.dev.mayfirst.org/ to 0.9-rc (or the head of the 0.9-release branch) to evaluate it and make it available to our more adventurous members. this will help us to give better feedback to upstream.

Change History (36)

comment:1 Changed 5 years ago by https://id.mayfirst.org/ross

  • Owner set to https://id.mayfirst.org/jamie
  • Status changed from new to assigned

Seems like jamie is now a roundcube expert at upgrading.

comment:2 Changed 5 years ago by https://id.mayfirst.org/jamie

  • Owner changed from https://id.mayfirst.org/jamie to https://id.mayfirst.org/srevilak

Hey Steve - would you mind taking a stab at this? I tried rebasing against the 0.9 branch and got some conflicts with the commits either you or joseph made.

jamie

p.s. I've written some general documentation on upgrading roundcube.

jamie

comment:3 Changed 5 years ago by https://id.mayfirst.org/srevilak

Jamie - sure, I can take a stab at this. (hopefully starting in a few days)

comment:4 Changed 5 years ago by https://id.mayfirst.org/srevilak

Roundcube 1, srevilak 0.

Jamie, thanks for the great instructions in how-to/roundcube-upgrade. There's probably an element of user error here, but I'm seeing merge conflicts, if when the mfpl modifications are taken out of the picture.

## create repository with only vendor sources
##
(0:0)sunny:~$ mkdir test-roundcube
(0:0)sunny:~$ cd test-roundcube/
(0:0)sunny:test-roundcube$ git init
Initialized empty Git repository in /home/srevilak/test-roundcube/.git/
(0:0)sunny:test-roundcube$ git remote add origin https://github.com/roundcube/roundcubemail
(0:0)sunny:test-roundcube$ git remote update
Fetching origin
remote: Counting objects: 60545, done.
remote: Compressing objects: 100% (15982/15982), done.
remote: Total 60545 (delta 44095), reused 60103 (delta 43742)
Receiving objects: 100% (60545/60545), 16.12 MiB | 1.98 MiB/s, done.
Resolving deltas: 100% (44095/44095), done.
From https://github.com/roundcube/roundcubemail
 * [new branch]      dev-advanced-ldap-groups -> origin/dev-advanced-ldap-groups
 * [new branch]      devel-ldap-refactoring -> origin/devel-ldap-refactoring
 * [new branch]      keep-alive -> origin/keep-alive
 * [new branch]      master     -> origin/master
 * [new branch]      release-0.6 -> origin/release-0.6
 * [new branch]      release-0.7 -> origin/release-0.7
 * [new branch]      release-0.8 -> origin/release-0.8
 * [new branch]      release-0.9 -> origin/release-0.9
 * [new branch]      schema_upgrades -> origin/schema_upgrades
 * [new branch]      session_backport -> origin/session_backport
 * [new branch]      topics/composer -> origin/topics/composer
From https://github.com/roundcube/roundcubemail
 * [new tag]         v0.1-beta2 -> v0.1-beta2
 * [new tag]         v0.7.3     -> v0.7.3
 * [new tag]         v0.8-rc    -> v0.8-rc
 * [new tag]         v0.8.0     -> v0.8.0
 * [new tag]         v0.8.1     -> v0.8.1
 * [new tag]         v0.8.2     -> v0.8.2
 * [new tag]         v0.8.3     -> v0.8.3
 * [new tag]         v0.8.4     -> v0.8.4
 * [new tag]         v0.8.5     -> v0.8.5
 * [new tag]         v0.9-beta  -> v0.9-beta
 * [new tag]         v0.9-rc    -> v0.9-rc

## create "test-upgrade" branch from release-0.8
##
(0:0)sunny:test-roundcube$ git checkout -b test-upgrade origin/release-0.8
Branch test-upgrade set up to track remote branch release-0.8 from origin.
Switched to a new branch 'test-upgrade'

## try to merge release-0.9 -> test-upgrade
##
(0:0)sunny:test-roundcube$ git merge origin/release-0.9
warning: Cannot merge binary files: skins/larry/images/overflowshadow.png (HEAD vs. origin/release-0.9)

warning: Cannot merge binary files: skins/larry/images/listicons.png (HEAD vs. origin/release-0.9)

warning: Cannot merge binary files: skins/larry/images/filetypes.png (HEAD vs. origin/release-0.9)

warning: Cannot merge binary files: skins/larry/images/buttons.png (HEAD vs. origin/release-0.9)

warning: Cannot merge binary files: skins/larry/images/buttons.gif (HEAD vs. origin/release-0.9)

warning: Cannot merge binary files: skins/classic/images/icons/groupactions.png (HEAD vs. origin/release-0.9)

warning: Cannot merge binary files: skins/classic/images/icons/groupactions.gif (HEAD vs. origin/release-0.9)

CONFLICT (modify/delete): tests/src/johndoe.vcf deleted in HEAD and modified in origin/release-0.9. Version origin/release-0.9 of tests/src/johndoe.vcf left in tree.
CONFLICT (rename/delete): tests/bootstrap.php deleted in HEAD and renamed in origin/release-0.9. Version origin/release-0.9 of tests/bootstrap.php left in tree.
CONFLICT (rename/delete): tests/Framework/Html2text.php deleted in HEAD and renamed in origin/release-0.9. Version origin/release-0.9 of tests/Framework/Html2text.php left in tree.
Auto-merging skins/larry/ui.js
CONFLICT (content): Merge conflict in skins/larry/ui.js
Auto-merging skins/larry/templates/messagepreview.html
CONFLICT (content): Merge conflict in skins/larry/templates/messagepreview.html
Auto-merging skins/larry/templates/message.html

 (many more more conflicts removed)

This is where I'm at now, but I'll keep working on it.

comment:5 Changed 5 years ago by https://id.mayfirst.org/srevilak

As far as I can tell, release-0.8 and release-0.9 have very divergent histories. They're different enough that you can't get a clean merge of release-0.9 onto release-0.8.

So I'll suggest a different strategy

# new branch, based on release-0.9
git branch mfpl9 origin/release-0.9
git checkout mfpl9

Then take the delta from origin/release-0.8..gmo/mfpl, and apply it to mfpl9.

This delta contains three commits. Two apply cleanly, and one requires a manual merge (due to significant changes in skins/larry).

comment:6 Changed 5 years ago by https://id.mayfirst.org/dkg

This seems reasonable. it might also be possible to drop one of the commits directly, since i believe it was pulled from 0.9 in the first place.

I've just authorized srevilak for access to roundcube-code@stallman.

thanks for working on this, srevilak!

comment:7 Changed 5 years ago by https://id.mayfirst.org/srevilak

Hoping to work on roundcube in the next day or two. Apologies for my hiatus.

comment:8 Changed 5 years ago by https://id.mayfirst.org/dkg

  • Priority changed from Medium to Urgent
  • Summary changed from move roundcube.dev.mayfirst.org to roundcube 0.9 release candidate to move roundcube.dev.mayfirst.org to roundcube 0.9

Roundcube 0.9.0 has been released. All users are recommended to upgrade. We need to move forward with this.

comment:9 Changed 5 years ago by https://id.mayfirst.org/srevilak

I've prepared an mfpl-0.9 branch, as follows.

git checkout -b mfpl-0.9 origin/release-0.9
git cherry-pick 53d90ff610258f5c3777396b7df6b0e35fb07320
git cherry-pick 39e1ff7addf825b2c9751c37b459b0ae3249bc27
git push gmo mfpl-0.9

Testing next.

comment:10 Changed 5 years ago by https://id.mayfirst.org/srevilak

roundcube-dev seems to be in a detached head state (if that's the proper term) for it:

0 roundcube-code@stallman:/srv/roundcube-dev$  git branch
* (no branch)
  master
  mfpl
  release-0.7
  release-0.8

To ensure that I have a place to get back to

0 roundcube-code@stallman:/srv/roundcube-dev$ git checkout -b mfpl-0.8
Switched to a new branch 'mfpl-0.8'
0 roundcube-code@stallman:/srv/roundcube-dev$ 

Reading through UPGRADING and config/main.inc.php, I see something that's giving me pause. As far as I can tell, roundcube's database connection parameters appear in the last three statements of config/main.inc.php; /srv/roundcube-dev/config/main.inc.php and /srv/roundcube/config/main.inc.php have identical connection parmeters. In other words, it looks like both instances are using the same database backend.

If that's correct, then I'd like to do my first upgrade attempt on a personal system. roundcube-0.9 contains schema changes, and I don't know if they'll be backwards compatible with a 0.8 installation. And of course, I don't want to break 0.8.

comment:11 Changed 5 years ago by https://id.mayfirst.org/dkg

roundcube-dev is checked out at a tag, rather than on a branch (see how-to/roundcube-upgrade), which is why it was in a detached head state.

you're right to be wary of the database setups, thanks for checking! I believe the two installs (roundcube and roundcube-dev) do *not* use the same database. in particular, you want to look in config/db.inc.php for the main roundcube database, which defines $rcmail_config['db_dsnw'] -- they use different postgres databases.

The three lines you're talking about are read-only access to the horde installation, used for the two plugins that you cherry-picked earlier. I don't think those should be a problem during the upgrade (the horde-ro user shouldn't have write access anyway).

Last edited 5 years ago by https://id.mayfirst.org/dkg (previous) (diff)

comment:12 Changed 5 years ago by https://id.mayfirst.org/srevilak

With some assistance from dkg, I've gotten the roundcube database issue figured out.

The last few lines of main.inc.php provide (read-only) database connection parameters to horde's, not to roundcube's.

Roundcube's database is postgres. The connection parameters appear in db.inc.php, and there are separate databases for roundcube vs roundcube-dev.

Roundcube uses SO_PEERCRED to authenticate to postgres; the database authenication is based on the operating system user id. User roundcube-dev has access to the roundcube-dev database, and user roundcube has access to the roundcube database.

In order to do a code + schema upgrade, one needs access to two user accounts: roundcube-code to update the code, and roundcube-dev (resp. roundcube) to update the database.

dkg has given me access to the roundcube-dev@stallman account, so I'll continue working on the dev installation.

comment:13 Changed 5 years ago by https://id.mayfirst.org/srevilak

I've made some progress. I succeeded in backing up roundcube-dev's database. I also learned that roundcube 0.9 requires date.timezone to be set to a non-empty value.

I ended up backing out my work, but here I what I managed to do:

backup database

0 roundcube-dev@stallman:~$ pg_dump roundcube-dev > roundcube-dev.sql
0 roundcube-dev@stallman:~$

I see that we want to deploy from signed tags. Locally, create tag roundcube-mfpl-0.9.0, sign, and push to git.mayfirst.org

Pull code into roundcube-dev

0 roundcube-code@stallman:/srv/roundcube-dev$ git remote update
Fetching gmo
remote: Counting objects: 560, done.
remote: Compressing objects: 100% (150/150), done.
remote: Total 476 (delta 360), reused 440 (delta 326)
Receiving objects: 100% (476/476), 69.95 KiB, done.
Resolving deltas: 100% (360/360), completed with 73 local objects.
From git://git.mayfirst.org/mfpl/roundcube
 * [new branch]      mfpl-0.9   -> gmo/mfpl-0.9
 * [new tag]         roundcube-mfpl-0.9.0 -> roundcube-mfpl-0.9.0
From git://git.mayfirst.org/mfpl/roundcube
 * [new tag]         0.9-rc2    -> 0.9-rc2

0 roundcube-code@stallman:/srv/roundcube-dev$ git tag -v roundcube-mfpl-0.9.0
object 3909c394466678594ea65bde545aefceeb484532
type commit
tag roundcube-mfpl-0.9.0
tagger Steve Revilak <steve@srevilak.net> 1366247142 -0400

Tag taken from head of mfpl-0.9 branch
https://support.mayfirst.org/ticket/6961
gpg: Signature made Wed 17 Apr 2013 09:06:14 PM EDT
gpg:                using DSA key 0x5FB60923806EC834
gpg: Good signature from "Steve Revilak <steve@srevilak.net>"
gpg:                 aka "Steve Revilak <srevilak@cs.umb.edu>"
0 roundcube-code@stallman:/srv/roundcube-dev$

0 roundcube-code@stallman:/srv/roundcube-dev$ git checkout roundcube-mfpl-0.9.0

Now, we follow Roundcube's UPGRADE doc.

0 roundcube-dev@stallman:/srv/roundcube-dev$ ./bin/update.sh 
ERROR: Wrong 'suhosin.session.encrypt' option value and it wasn't possible to set it to required value (0).
Check your PHP configuration (including php_admin_flag).0 roundcube-dev@stallman:/srv/roundcube-dev$

That didn't work out. Let's try the web ui variant.

Set

$rcmail_config['enable_installer'] = true;

Then https://roundcube.dev.mayfirst.org/installer/

The configuration check found one problem

date.timezone:  NOT OK(empty value detected)

Roundcube runs under mod_fastcgi, so I don't have the option of setting a php_value in .htaccess.

Not seeing an obvious place to set date.timezone, I'll back out my work via git checkout roundcube-mfpl-0.8.6. I've also set enable_installer back to false.

comment:14 Changed 5 years ago by https://id.mayfirst.org/dkg

thanks for the work, steve! I think we don't want the database dump to be world-readable, and there's no sense in leaving it uncompressed, so i just cleaned that up and datestamped it while i was at it:

0 roundcube-dev@stallman:~$ chmod go-rwx roundcube-dev.sql 
0 roundcube-dev@stallman:~$ gzip roundcube-dev.sql 
0 roundcube-dev@stallman:~$ mv roundcube-dev.sql{,.$(date +%F)}.gz 
0 roundcube-dev@stallman:~$ 

I also just set the default timezone for all php-cgi processes on stallman and restarted the fastcgi process for roundcube-dev:

0 stallman:~# diff -u /etc/php5/cgi/php.ini{~,}
--- /etc/php5/cgi/php.ini~	2012-02-02 12:47:07.000000000 -0500
+++ /etc/php5/cgi/php.ini	2013-04-18 01:52:22.000000000 -0400
@@ -949,7 +949,7 @@
 [Date]
 ; Defines the default timezone used by the date functions
 ; http://php.net/date.timezone
-;date.timezone =
+date.timezone = America/New_York
 
 ; http://php.net/date.default-latitude
 ;date.default_latitude = 31.7667
1 stallman:~# sv restart roundcube-dev
ok: run: roundcube-dev: (pid 7616) 0s
0 stallman:~# 

I considered making a change in the same place for suhosin.session.encrypt, but realized that these changes will take effect on all CGI php processes on stallman (which includes horde, for example), which implies that it would invalidate existing sessions, if i understand the mechanism correctly.

i figured setting date.timezone explicitly wasn't much of a risk, since it should be pulling from /etc/localtime anyway, and that's set to America/New_York anyway.

I recommend pursuing the upgrade via the shell script, and not setting $rcmail_config['enable_installer'] = true; ever, since i don't trust web-based installers much in general, and i'm not convinced it's worth it to expose our users to those risks (for the main roundcube site in particular i'd like to minimize that risk, so i think that means that if we want the roundcube-dev upgrade to be useful practice, we should try to test it with the same workflow.

bin/upgrade.sh appears to actually be a php script (see head -n1 bin/upgrade.sh), which you can manually invoke without relying on the shebang line.

So instead of doing ./bin/upgrade.sh, you could do:

php -d suhosin.session.encrypt=off -d date.timezone=America/New_York bin/upgrade.sh

and php-cli should prefer the settings set on the command line. directly.

make sense?

comment:15 Changed 5 years ago by https://id.mayfirst.org/srevilak

I think we have a successful upgrade of roundcube-dev

General upgrade recipie

# pg_dump database

# verify and checkout roundcube-mfpl-0.9.0 tag

php -d suhosin.session.encrypt=off -d date.timezone=America/New_York bin/update.sh.  

## DO NOT accept the installer's offer to fix roundcube's configuration files.

php -d suhosin.session.encrypt=off -d date.timezone=America/New_York bin/updatedb.sh --package=roundcube --version=0.8.6 --dir=`pwd`/SQL

php -d suhosin.session.encrypt=off -d date.timezone=America/New_York bin/indexcontacts.sh

# update main.inc.php, along the lines of the diff provided later

Details

One more backup (which, conveniently, clobbers the last pre-upgrade backup)

0 roundcube-dev@stallman:~$ pg_dump roundcube-dev > roundcube-dev.sql.`date +%F`
0 roundcube-dev@stallman:~$ chmod 400 roundcube-dev.sql.2013-04-18
0 roundcube-dev@stallman:~$ gzip -9 roundcube-dev.sql.2013-04-18 
gzip: roundcube-dev.sql.2013-04-18.gz already exists; do you wish to overwrite (y or n)? y
0 roundcube-dev@stallman:~$ 

Check out the 0.9 tag

0 roundcube-code@stallman:/srv/roundcube-dev$ git checkout roundcube-mfpl-0.9.0
Previous HEAD position was 39e1ff7... (fetch_identity_objects): avoid redundant call to unserialize
HEAD is now at 3909c39... (fetch_identity_objects): avoid redundant call to unserialize
0 roundcube-code@stallman:/srv/roundcube-dev$

upgrade.sh. (I should have realized the bit about "php -d". Thanks, dkg, for the clue).

130 roundcube-code@stallman:/srv/roundcube-dev$ cp config/main.inc.php config/main.inc.php.`date +%F`
0 roundcube-code@stallman:/srv/roundcube-dev$ php -d suhosin.session.encrypt=off -d date.timezone=America/New_York bin/update.sh 
What version are you upgrading from? Type '?' if you don't know.
0.8.6
WARNING: Missing config options:
(These config options should be present in the current configuration)
- 'support_url'

WARNING: Replaced config options:
(These config options have been replaced or renamed)
- 'default_imap_folders' was replaced by 'default_folders'
- 'pagesize' was replaced by 'mail_pagesize'
- 'top_posting' was replaced by 'reply_mode'

NOTICE: Obsolete config options:
(You still have some obsolete or inexistent properties set. This isn't a problem but should be noticed)
- 'mime_magic'

Do you want me to fix your local configuration? (y/N)
y
. backing up the current config files...
. writing /srv/roundcube-dev/config/main.inc.php...
. writing /srv/roundcube-dev/config/main.db.php...
Done.
Your configuration files are now up-to-date!
But you still need to add the following missing options:
- 'support_url'
Executing database schema update.
ERROR: Wrong 'suhosin.session.encrypt' option value and it wasn't possible to set it to required value (0).
Check your PHP configuration (including php_admin_flag).This instance of Roundcube is up-to-date.
Have fun!
0 roundcube-code@stallman:/srv/roundcube-dev$

update.sh "fixed" more of main.inc.php than I had hoped. For example, it clobbered the horde database config.

Restore the original main.inc.php

1 roundcube-code@stallman:/srv/roundcube-dev/config$ cp main.inc.php main.inc.php.BAD
0 roundcube-code@stallman:/srv/roundcube-dev/config$ cp main.inc.php.2013-04-18 main.inc.php
0 roundcube-code@stallman:/srv/roundcube-dev/config$ chmod 600 main.inc.php main.inc.php.2013-04-18 main.inc.php.BAD 
0 roundcube-code@stallman:/srv/roundcube-dev/config$ getfacl main.inc.php~ | setfacl --set-file=- main.inc.php
0 roundcube-code@stallman:/srv/roundcube-dev/config$

Note

  • main.inc.php.BAD is the version created by update.sh
  • main.inc.php.2013-04-18 is the prior version

Next try to figure out what went wrong with ERROR: Wrong 'suhosin.session.encrypt'.

This seems like a likely culprit:

    system(INSTALL_PATH . "bin/updatedb.sh --package=roundcube --version=" . $opts['ver
sion']
      . " --dir=" . INSTALL_PATH . DIRECTORY_SEPARATOR . "SQL", $res);

Let's run updatedb.sh by hand

0 roundcube-dev@stallman:/srv/roundcube-dev$ php -d suhosin.session.encrypt=off -d date.timezone=America/New_York bin/updatedb.sh --package=roundcube --version=0.8.6 --dir=`pwd`/SQL
Updating database schema (2012080700)... [OK]
Updating database schema (2013011000)... [OK]
0 roundcube-dev@stallman:/srv/roundcube-dev$

UPGRADING doc suggests running bin/indexcontacts.sh. Let's do that.

0 roundcube-dev@stallman:/srv/roundcube-dev$ php -d suhosin.session.encrypt=off -d date.timezone=America/New_York bin/indexcontacts.sh 
Indexing contacts for user 10...done.
Indexing contacts for user 2...done.
Indexing contacts for user 9...done.
Indexing contacts for user 11...done.
Indexing contacts for user 5...done.
Indexing contacts for user 7...done.
Indexing contacts for user 8...done.
Indexing contacts for user 31...done.
Indexing contacts for user 12...done.
Indexing contacts for user 14...done.
Indexing contacts for user 13...done.
Indexing contacts for user 15...done.
Indexing contacts for user 1...done.
Indexing contacts for user 16...done.
Indexing contacts for user 18...done.
Indexing contacts for user 20...done.
Indexing contacts for user 19...done.
Indexing contacts for user 25...done.
Indexing contacts for user 23...done.
Indexing contacts for user 24...done.
Indexing contacts for user 26...done.
Indexing contacts for user 21...done.
Indexing contacts for user 28...done.
Indexing contacts for user 4...done.
Indexing contacts for user 29...done.
Indexing contacts for user 17...done.
Indexing contacts for user 30...done.
Indexing contacts for user 6...done.
Indexing contacts for user 32...done.
Indexing contacts for user 33...done.
Indexing contacts for user 35...done.
Indexing contacts for user 38...done.
Indexing contacts for user 37...done.
Indexing contacts for user 36...done.
Indexing contacts for user 22...done.
Indexing contacts for user 27...done.
0 roundcube-dev@stallman:/srv/roundcube-dev$ 

Finally, here are the changes I made to main.inc.php

0 roundcube-code@stallman:/srv/roundcube-dev/config$ diff -u main.inc.php.2013-04-18  main.inc.php
--- main.inc.php.2013-04-18     2013-04-18 21:12:46.000000000 -0400
+++ main.inc.php        2013-04-18 21:38:19.000000000 -0400
@@ -327,6 +327,10 @@
 // don't allow these settings to be overriden by the user
 $rcmail_config['dont_override'] = array();
 
+// provide an URL where a user can get support for this Roundcube installation
+// PLEASE DO NOT LINK TO THE ROUNDCUBE.NET WEBSITE HERE!
+$rcmail_config['support_url'] = 'https://support.mayfirst.org/';
+
 // Set identities access level:
 // 0 - many identities with possibility to edit all params
 // 1 - many identities with possibility to edit all params but not email address
@@ -420,7 +424,7 @@
 // display these folders separately in the mailbox list.
 // these folders will also be displayed with localized names
 // NOTE: Use folder names with namespace prefix (INBOX. on Courier-IMAP)
-$rcmail_config['default_imap_folders'] = array('INBOX', 'Drafts', 'Sent', 'Junk', 'Trash');
+$rcmail_config['default_folders'] = array('INBOX', 'Drafts', 'Sent', 'Junk', 'Trash');
 
 // automatically create the above listed default folders on first login
 $rcmail_config['create_default_folders'] = true;
@@ -653,7 +657,7 @@
 $rcmail_config['skin'] = 'default';
 
 // show up to X items in list view
-$rcmail_config['pagesize'] = 40;
+$rcmail_config['mail_pagesize'] = 40;
 
 // sort contacts by this col (preferably either one of name, firstname, surname)
 $rcmail_config['addressbook_sort_col'] = 'surname';
@@ -739,8 +743,11 @@
 // 2 - Expand only threads with unread messages 
 $rcmail_config['autoexpand_threads'] = 0;
 
-// When replying place cursor above original message (top posting)
-$rcmail_config['top_posting'] = false;
+// When replying:
+// -1 - don't cite the original message
+// 0  - place cursor below the original message
+// 1  - place cursor above original message (top posting)
+$rcmail_config['reply_mode'] = 0;
 
 // When replying strip original signature from message
 $rcmail_config['strip_existing_sig'] = true;
1 roundcube-code@stallman:/srv/roundcube-dev/config$

comment:16 follow-up: Changed 5 years ago by https://id.mayfirst.org/dkg

nice work, srevilak. This looks great. I just tested https://roundcube.dev.mayfirst.org/ and had no problems with my test account. I'd like other folks (esp. those who use webmail regularly) to give it a try too and report their experience.

i'm curious what you think about the support link. Maybe we could link to https://support.mayfirst.org/wiki/how-to/webmail/roundcube directly, or even just to https://support.mayfirst.org/newticket?keywords=roundcube ?

comment:17 Changed 5 years ago by https://id.mayfirst.org/dkg

I also wonder if we shouldn't move our custom config (for the horde integration plugins) out to a separate file, and just include() that file directly from main.inc.php, to protect against future clobbering. I've asked about the config clobbering on the upstream development mailing list.

comment:18 follow-up: Changed 5 years ago by https://id.mayfirst.org/dkg

The followup on the upstream mailing list suggests that we're doing the wrong thing by storing the configs in config/main.inc.php, and that they should be stored in plugins/pluginname/config.inc.php. Given that the two plugins have the same configuration, maybe we only need one config file, and we could symlink it in the other location? Note that the permissions on this additional config need to be at least as tight as they are on config/main.inc.php.

comment:19 Changed 5 years ago by https://id.mayfirst.org/ross

In my cursory walk through of the dev upgrade, I didn't see anything problematic. It all seemed to work great. Awesome job steve!!!!

~/ross

comment:20 Changed 5 years ago by https://id.mayfirst.org/jamie

I did some tooling around and didn't see any problems either. Nice work!!

comment:21 follow-up: Changed 5 years ago by https://id.mayfirst.org/danielstrum

I just tried to log-in and got a box asking me to complete my identity which I could not move past. No matter what I did, including closing the browser tab and trying to re-enter, the box would just block me from entering my account. Finally, I had to close my browser and re-start it... then I was able to access my account without the box coming up at all.

comment:22 Changed 5 years ago by https://id.mayfirst.org/dkg

Sounds like danielstrum ran into this issue. srevilak, maybe we should pull 39062647473c7ff105fff7e5295ee9c0ca931e32 into the mf/pl roundcube setup.

comment:23 in reply to: ↑ 16 Changed 5 years ago by https://id.mayfirst.org/srevilak

Replying to https://id.mayfirst.org/dkg:

i'm curious what you think about the support link

I like the idea of linking to our roundcube wiki documentation, and I changed main.inc.php to do this.

$rcmail_config['support_url'] = 'https://support.mayfirst.org/wiki/how-to/webmail/roundcube'

Plus, wiki/how-to/webmail/roundcube already has an "open a new ticket" link (in the "Resources" section).

comment:24 in reply to: ↑ 18 ; follow-up: Changed 5 years ago by https://id.mayfirst.org/srevilak

Replying to https://id.mayfirst.org/dkg:

I've moved the horde plugin configuration into a separate config.inc.php

# file magic first
echo "<?php" > config.inc.php

# the following egrep matches three lines
0 roundcube-code@stallman:/srv/roundcube-dev/plugins/import_horde_contacts$ egrep "rcmail_config.'horde_" ../../config/main.inc.php >> config.inc.php

0 roundcube-code@stallman:/srv/roundcube-dev/plugins/import_horde_contacts$ chmod 600 config.inc.php 
0 roundcube-code@stallman:/srv/roundcube-dev/plugins/import_horde_contacts$ getfacl ../../config/main.inc.php | setfacl --set-file=- config.inc.php 
0 roundcube-code@stallman:/srv/roundcube-dev/plugins/import_horde_contacts$ cd  ../import_horde_identities/
0 roundcube-code@stallman:/srv/roundcube-dev/plugins/import_horde_identities$ ln -s ../import_horde_contacts/config.inc.php 

After doing this, I removed the last three configuration directives from config/main.inc.php.

I don't see any ill-effects from doing this. However, I don't know of a good positive test case to use here. (Any suggestions?)

Last edited 5 years ago by https://id.mayfirst.org/srevilak (previous) (diff)

comment:25 in reply to: ↑ 21 ; follow-up: Changed 5 years ago by https://id.mayfirst.org/srevilak

Replying to https://id.mayfirst.org/danielstrum:

I was able to reproduce this by doing

roundcube-dev=> begin;
BEGIN
roundcube-dev=> delete from users where username = 'srevilak';
DELETE 1
roundcube-dev=> commit;
COMMIT

and then logging in. I'll try dkg's suggestion from Comment #22.

comment:26 in reply to: ↑ 24 ; follow-up: Changed 5 years ago by https://id.mayfirst.org/dkg

Replying to https://id.mayfirst.org/srevilak:

I've moved the horde plugin configuration into a separate config.inc.php

these steps looked good to me.

I don't see any ill-effects from doing this. However, I don't know of a good positive test case to use here. (Any suggestions?)

you can test by creating a contact or an identity in horde, and then logging into roundcube to be sure that it gets picked up automatically.

comment:27 in reply to: ↑ 25 Changed 5 years ago by https://id.mayfirst.org/srevilak

Choose identity dialog issue fixed.

# on HEAD of mfpl-0.9 branch
(0:0)sunny:test-roundcube$ git cherry-pick 39062647473c7ff105fff7e5295ee9c0ca931e32
[mfpl-0.9 10dc6fc] Fix typos
 Author: Victor Benincasa <vbenincasa@gmail.com>
 1 file changed, 3 insertions(+), 3 deletions(-)
(0:0)sunny:test-roundcube$ 

After deploying this to roundcube.dev, I deleted srevilak's user record, then attempted to log in. Roundcube prompted me to choose an identity, and I was able to save it. The behavior noted in comment 21 did not occur.

I've created (and signed) a new tag with this change: roundcube-mfpl-0.9.0.1. (Roundcube seems to use three-part version numbers for its own releases; this seems like a patch, so I went with a four-part number).

comment:28 follow-up: Changed 5 years ago by https://id.mayfirst.org/dkg

Great, thanks for sorting this out, srevilak.

re: version number extensions: i think 0.9.0.1 is fine for this go-round since the signed tag already exists, but in general, i'd like to make it clear which part comes from us and which comes from upstream (we don't have any guarantees that they won't want to use 0.9.0.1 for a brown paper bag release, for example). For future releases, what would you think of the following form: roundcube-0.9.0+mfpl1? This manages to inject our name between upstream's version number and our revision; it gives us a chance to make multiple tweaks to our own installation from the same upstream version, and it lets us indicate which upstream version we're based off of. (similar to the approach debian has settled on)

what do you think?

comment:29 in reply to: ↑ 26 Changed 5 years ago by https://id.mayfirst.org/srevilak

Replying to https://id.mayfirst.org/dkg:

you can test by creating a contact or an identity in horde, and then logging into roundcube to be sure that it gets picked up automatically.

Glad I asked for the test case -- there was a bug in my config.inc.php.

At any rate, I've verified that contact import works with the new configuration file arrangement.

comment:30 in reply to: ↑ 28 Changed 5 years ago by https://id.mayfirst.org/srevilak

Replying to https://id.mayfirst.org/dkg:

For future releases, what would you think of the following form: roundcube-0.9.0+mfpl1?

Seems fine to me.

comment:31 follow-up: Changed 5 years ago by https://id.mayfirst.org/dkg

I think we've given this enough time for people to find problems (and have resolved the one problem that was reported, thanks danielstrum!). I think we should roll out roundcube-mfpl-0.9.0.1 to the live site.

srevilak, i've granted you access to the roundcube@stallman user so you can handle the database upgrade step. let me know if you run into any trouble or have any concerns.

comment:32 Changed 5 years ago by https://id.mayfirst.org/dkg

  • Summary changed from move roundcube.dev.mayfirst.org to roundcube 0.9 to move roundcube.mayfirst.org to roundcube 0.9

comment:33 in reply to: ↑ 31 Changed 5 years ago by https://id.mayfirst.org/srevilak

Replying to https://id.mayfirst.org/dkg:

Thanks, dkg.

I've succeeded in logging into the roundcube@stallman account. I'll plan to do the upgrade Wed. evening after work. (I'll hop on IRC before starting)

comment:34 Changed 5 years ago by https://id.mayfirst.org/srevilak

I upgraded roundcube.mayfirst.org.

Details

Roundcube prior to upgrade

0 roundcube-code@stallman:/srv/roundcube$ git tag --contains `cat .git/HEAD`
roundcube-mfpl-0.8.6
0 roundcube-code@stallman:/srv/roundcube$ 

Database backup

0 roundcube@stallman:~$ pg_dump roundcube > roundcube.sql.`date +%F`
0 roundcube@stallman:~$ chmod 400 roundcube.sql.2013-04-24 
0 roundcube@stallman:~$ gzip -9 roundcube.sql.2013-04-24 
0 roundcube@stallman:~$ 

Checkout new tag

0 roundcube-code@stallman:/srv/roundcube$ git remote update
Fetching gmo
remote: Counting objects: 567, done.
remote: Compressing objects: 100% (157/157), done.
remote: Total 483 (delta 364), reused 440 (delta 326)
Receiving objects: 100% (483/483), 72.34 KiB, done.
Resolving deltas: 100% (364/364), completed with 73 local objects.
From git://git.mayfirst.org/mfpl/roundcube
 * [new branch]      mfpl-0.9   -> gmo/mfpl-0.9
 * [new tag]         roundcube-mfpl-0.9.0.1 -> roundcube-mfpl-0.9.0.1
From git://git.mayfirst.org/mfpl/roundcube
 * [new tag]         0.9-rc2    -> 0.9-rc2
 * [new tag]         roundcube-mfpl-0.9.0 -> roundcube-mfpl-0.9.0
0 roundcube-code@stallman:/srv/roundcube$ git checkout roundcube-mfpl-0.9.0.1
Previous HEAD position was 39e1ff7... (fetch_identity_objects): avoid redundant call to unserialize
HEAD is now at 10dc6fc... Fix typos
0 roundcube-code@stallman:/srv/roundcube$ 

Preserve old config

0 roundcube-code@stallman:/srv/roundcube$ cp config/main.inc.php config/main.inc.php.`date +%F`
0 roundcube-code@stallman:/srv/roundcube$ 

Upgrade script

0 roundcube-code@stallman:/srv/roundcube$ php -d suhosin.session.encrypt=off -d date.timezone=America/New_York bin/update.sh
What version are you upgrading from? Type '?' if you don't know.
0.8.6
WARNING: Missing config options:
(These config options should be present in the current configuration)
- 'support_url'

WARNING: Replaced config options:
(These config options have been replaced or renamed)
- 'default_imap_folders' was replaced by 'default_folders'
- 'pagesize' was replaced by 'mail_pagesize'
- 'top_posting' was replaced by 'reply_mode'

NOTICE: Obsolete config options:
(You still have some obsolete or inexistent properties set. This isn't a problem but should be noticed)
- 'mime_magic'

Do you want me to fix your local configuration? (y/N)
N
Please update your config files manually according to the above messages.
Executing database schema update.
ERROR: Wrong 'suhosin.session.encrypt' option value and it wasn't possible to set it to required value (0).
Check your PHP configuration (including php_admin_flag).This instance of Roundcube is up-to-date.
Have fun!
0 roundcube-code@stallman:/srv/roundcube$ 

Upgrade database

0 roundcube@stallman:/srv/roundcube$ php -d suhosin.session.encrypt=off -d date.timezone=America/New_York bin/updatedb.sh --package=roundcube --version=0.8.6 --dir=`pwd`/SQL
Updating database schema (2012080700)... [OK]
Updating database schema (2013011000)... [OK]
0 roundcube@stallman:/srv/roundcube$ 

Index contacts

0 roundcube@stallman:/srv/roundcube$ php -d suhosin.session.encrypt=off -d date.timezone=America/New_York bin/indexcontacts.sh 
Indexing contacts for user 2...done.
Indexing contacts for user 9...done.

  [ many similar lines trimmed ]

Indexing contacts for user 427...done.
Indexing contacts for user 65...done.
Indexing contacts for user 94...done.
0 roundcube@stallman:/srv/roundcube$ 

Update main.inc.php. Here are diffs

148 roundcube-code@stallman:/srv/roundcube$ diff -u config/main.inc.php.2013-04-24 config/main.inc.php
--- config/main.inc.php.2013-04-24      2013-04-24 19:49:30.000000000 -0400
+++ config/main.inc.php 2013-04-24 19:57:50.000000000 -0400
@@ -324,6 +324,10 @@
 // send plaintext messages as format=flowed
 $rcmail_config['send_format_flowed'] = true;
 
+// provide an URL where a user can get support for this Roundcube installation
+// PLEASE DO NOT LINK TO THE ROUNDCUBE.NET WEBSITE HERE!
+$rcmail_config['support_url'] = 'https://support.mayfirst.org/wiki/how-to/webmail/roundcube';
+
 // don't allow these settings to be overriden by the user
 $rcmail_config['dont_override'] = array();
 
@@ -339,9 +343,6 @@
 // either a comma-separated list or an array: 'text/plain,text/html,text/xml,image/jpeg,image/gif,image/png,application/pdf'
 $rcmail_config['client_mimetypes'] = null;  # null == default
 
-// mime magic database
-$rcmail_config['mime_magic'] = '/usr/share/misc/magic';
-
 // path to imagemagick identify binary
 $rcmail_config['im_identify_path'] = null;
 
@@ -420,7 +421,7 @@
 // display these folders separately in the mailbox list.
 // these folders will also be displayed with localized names
 // NOTE: Use folder names with namespace prefix (INBOX. on Courier-IMAP)
-$rcmail_config['default_imap_folders'] = array('INBOX', 'Drafts', 'Sent', 'Junk', 'Trash');
+$rcmail_config['default_folders'] = array('INBOX', 'Drafts', 'Sent', 'Junk', 'Trash');
 
 // automatically create the above listed default folders on first login
 $rcmail_config['create_default_folders'] = true;
@@ -653,7 +654,7 @@
 $rcmail_config['skin'] = 'default';
 
 // show up to X items in list view
-$rcmail_config['pagesize'] = 40;
+$rcmail_config['mail_pagesize'] = 40;
 
 // sort contacts by this col (preferably either one of name, firstname, surname)
 $rcmail_config['addressbook_sort_col'] = 'surname';
@@ -739,8 +740,11 @@
 // 2 - Expand only threads with unread messages 
 $rcmail_config['autoexpand_threads'] = 0;
 
-// When replying place cursor above original message (top posting)
-$rcmail_config['top_posting'] = false;
+// When replying:
+// -1 - don't cite the original message
+// 0  - place cursor below the original message
+// 1  - place cursor above original message (top posting)
+$rcmail_config['reply_mode'] = 0;
 
 // When replying strip original signature from message
 $rcmail_config['strip_existing_sig'] = true;
1 roundcube-code@stallman:/srv/roundcube$

main.inc.php's facls got lost during editing. Restore them

0 roundcube-code@stallman:/srv/roundcube/config$ getfacl main.inc.php~ | setfacl --set-file=- main.inc.php
0 roundcube-code@stallman:/srv/roundcube/config$

Separate horde plugin configuration

0 roundcube-code@stallman:/srv/roundcube/plugins/import_horde_contacts$ echo "<?php" > config.inc.php
0 roundcube-code@stallman:/srv/roundcube/plugins/import_horde_contacts$ egrep "rcmail_config.'horde_" ../../config/main.inc.php >> config.inc.php
0 roundcube-code@stallman:/srv/roundcube/plugins/import_horde_contacts$ getfacl ../../config/main.inc.php | setfacl --set-file=- config.inc.php 
0 roundcube-code@stallman:/srv/roundcube/plugins/import_horde_contacts$ cd ../import_horde_identities/
0 roundcube-code@stallman:/srv/roundcube/plugins/import_horde_identities$ ln -s ../import_horde_contacts/config.inc.php 
0 roundcube-code@stallman:/srv/roundcube/plugins/import_horde_identities$

# delete roundcube contacts.  Log out, log in.  Verify that contacts
# sync from horde -> roundcube

And now we have User-Agent: Roundcube Webmail/0.9.0

comment:35 Changed 5 years ago by https://id.mayfirst.org/srevilak

  • Resolution set to fixed
  • Status changed from assigned to feedback

Leaving status as feedback; I'll close the ticket in a day or two if nothing bad happens.

comment:36 Changed 5 years ago by automatic

  • Status changed from feedback to closed

No news is good news (we hope)! Given the lack of feedback, we think this ticket can be closed.

Please login to add comments to this ticket.

Note: See TracTickets for help on using tickets.