Sogo Frontends

sogo-frontends package contains SOGo Integrator XPI addons for Thunderbird and metadata necessary to direct nethserver-sogo-thunderbird output.

Note
After upgrading to sogo-frontends-1.1.1-1 run the following command:

    # signal-event nethserver-sogo-thunderbird-update

The MANIFEST metadata file format

nethserver-sogo-thunderbird expects that some files named MANIFEST-<something>.tsv are installed in /usr/share/nethesis/sogo-frontends/ directory. A MANIFEST file must be in Tab Separated Value (TSV) format: fields are separated by a single TAB "\t" character. The following fields must be defined on each line of the file:

  • file The XPI file name in /usr/share/nethesis/sogo-frontends/
  • plugin Plugin identifier
  • version Plugin version
  • platform Plugin platform (for binaries). Valid values are
    • * anything, the plugin is platform-indipendent
    • WINNT_x86-msvc Win
    • Darwin_x86-gcc Mac
    • Linux_x86-gcc3 Linux 32bit
    • Linux_x86_64-gcc3 Linux 64bit
  • appmatch A perl regular expression to match the client version (User-Agent HTTP header)
  • appminver Lower client version supported
  • appmaxver Higher client version supported
This is an example table for TB10 ESR:
file plugin version platform appmatch appminver appmaxver
lightning-1.2.3_win32.xpi {e2fda1a4-762b-4020-b5ad-a41df1933103} 1.2.3 WINNT_x86-msvc Thunderbird/10\.0 10.0 10.0.*
lightning-1.2.3_mac.xpi {e2fda1a4-762b-4020-b5ad-a41df1933103} 1.2.3 Darwin_x86-gcc3 Thunderbird/10\.0 10.0 10.0.*
lightning-1.2.3_linux-i686.xpi {e2fda1a4-762b-4020-b5ad-a41df1933103} 1.2.3 Linux_x86-gcc3 Thunderbird/10\.0 10.0 10.0.*
sogo-connector-10.0.3.xpi sogo-connector@inverse.ca 10.0.3 * Thunderbird/10\.0 10.0 10.0.*
sogo-integrator-10.0.3-sogo-demo.xpi sogo-integrator@inverse.ca 10.0.3 * Thunderbird/10\.0 10.0 10.0.*

A line beginning with an hash # character is ignored.

Packing new addons

To add a new version of SOGO Integrator and its dependencies to sogo-frontends package follow these steps:

1. XPI checksums

  1. Prepare the package build environment (see Building RPMs)
  2. clone sogo-frontends repo and move into it
        $ git clone git://code.nethesis.it/sogo-frontends.git
        $ cd sogo-frontends/
    
  3. Publish XPI files in one of the web URLs listed in Makefile. Type the follwing command to see the current list:
        $ grep ^XPIMIRRORS Makefile
    
    Output:
    XPIMIRRORS += $(shell echo http://`hostname`/nethserver/sogo-frontends)
    XPIMIRRORS += $(shell echo http://`hostname`/sogo-thunderbird/frontends)
    XPIMIRRORS += http://dev.nethserver.org/nethserver/sogo-frontends
    XPIMIRRORS += http://www.sogo.nu/files/downloads/extensions
    
    Note that the first two choices are URLs pointing to your machine.
  4. Copy new XPI files inside sogo-frontends/ directory and add their sha1 checksums to SHA1SUM file:
        $ sha1sum *.xpi >> SHA1SUM
    
  5. Test XPI checksums:
        $ make clean download check
    

2. Edit MANIFEST

  1. Edit MANIFEST-sogo-frontends.tsv, respecting the MANIFEST metadata file format.

3. Prepare the patch templates

According to SOGo Thunderbird Configuration Guide some files must be changed in SOGo Integrator plugin to deploy it in your environment. XPI files can be exploded by unzip command. To change those files automatically, nethserver-sogo-thunderbird expects a patch file for each XPI file.

Before applying the patch, nethserver-sogo-thunderbird processes it as a common e-smith template, so you can create a "dynamic" patch that reads values from ConfigDB as usual. You can use also a specific variable in your template: $updateURL.

Remember to escape curly braces, '{' and '}' characters!

To create the patch:

  1. Unzip SOGo Integrator XPI into two directories a/ and b/.
       $ unzip sogo-integrator-<version>.xpi -d a
       $ unzip sogo-integrator-<version>.xpi -d b
    
  2. Edit files under b/ directory:
       $ vi b/chrome/content/extensions.rdf
       $ vi b/defaults/preferences/site.js
    
  3. Create the patch file:
       $ diff -x '*~' -u -r a b > sogo-integrator-<version>.xpi.patch
    

4. Commit changes

Commit changes to SHA1SUM, .patch and MANIFEST-sogo-frontends.tsv. Then re-build sogo-frontends package (see Building rpms).