Mono 4 upgrade

Tuesday, February 09, 2016 , 0 Comments

As you probably know by now, Plastic SCM requires Mono, the open source.NET Framework implementation, in order to run on non-Windows platforms: Linux, Mac, OpenBSD... Our public repositories distributed Mono version 3.0.3 so far, which we had thoroughly tested to be completely sure it could run Plastic SCM flawlessly.

However, as our GTK# GUI grew, we bumped into compatibility problems and minor issues that prevented users from having the best Plastic SCM experience. This is the reason why we decided to upgrade the shipped Mono version to version 4.3.0. Quite a leap, isn't it? :D

We've built new packages to allow Fedora, RedHat/CentOS, OpenSUSE, Debian and Ubuntu users to easily upgrade their installations, starting with version 5.4.16.726. These new packages will conflict with the previous Mono 3 ones, so the upgrade operation might require manual package dependency resolution. Don't worry, we'll walk you through it!

Alternatively, if you've never installed Plastic SCM on your Linux machine before, you just need to follow the installation instructions available on our website.

Important: This walkthrough will assume that both Plastic SCM and SemanticMerge are currently installed in your machine. If that's not the case, you can of course adapt the instructions to skip the software you don't currently have.

Upgrading a previous Plastic SCM installation

First of all, you'll need to update the repository contents stored in your local package manager. Remember to do so with administration privileges!

  • On Debian/Ubuntu: sudo aptitude update
  • On Fedora/RedHat/CentOS: sudo yum clean all
  • On OpenSUSE: sudo zypper refresh

You can now proceed with the upgrade itself. As we mentioned before, it's quite possible that you'll need to manually solve some of the broken dependencies. Let's see how to do this on each distro.

Upgrading Debian/Ubuntu

If you execute the upgrade command:

sudo aptitude upgrade

You'll probably notice a message like this:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
  plasticscm-client-complete plasticscm-client-core plasticscm-client-gtk
  plasticscm-server-complete plasticscm-server-core plasticscm-server-tools
  plasticscm-theme semanticmerge
0 upgraded, 0 newly installed, 0 to remove and 8 not upgraded.

Packages are kept back because their dependencies can't be automatically resolved. This means that we'll need to update them manually:

sudo apt-get install plasticscm-client-complete plasticscm-client-core plasticscm-client-gtk plasticscm-server-complete plasticscm-server-core plasticscm-server-tools plasticscm-theme semanticmerge

This will trigger package conflicts and you'll be asked to choose a resolution method:

The following NEW packages will be installed:
  plasticscm-certtools-mono4 plasticscm-gnome-sharp-mono4 plasticscm-gtk-sharp-mono4 plasticscm-mono4
The following packages will be REMOVED:
  plasticscm-certtools zlib1g-dev 
The following packages will be upgraded:
  plasticscm-client-complete plasticscm-client-core plasticscm-client-gtk plasticscm-server-complete plasticscm-server-core plasticscm-server-tools plasticscm-theme semanticmerge
8 packages upgraded, 4 newly installed, 2 to remove and 5 not upgraded.
Need to get 70.3 MB of archives. After unpacking 167 MB will be used.
The following packages have unmet dependencies:
 plasticscm-gtk-sharp-mono4 : Conflicts: plasticscm-gtk-sharp but 2.12.29 is installed.
 plasticscm-mono4 : Conflicts: plasticscm-libmono3-2.0-1 but 3.0.3.1-1.1 is installed.
                    Conflicts: plasticscm-libmono3-2.0-cil but 3.0.3.1-1.1 is installed.

### ... more lines ... ###

                    Conflicts: plasticscm-monodoc3-base but 3.0.3.1-1.1 is installed.
                    Conflicts: plasticscm-monodoc3-manual but 3.0.3.1-1.1 is installed.
The following actions will resolve these dependencies:
       Remove the following packages:                                           
1)       plasticscm-gnome-sharp                                                 
2)       plasticscm-gtk-sharp                                                   
3)       plasticscm-libmono3-2.0-1                                              
4)       plasticscm-libmono3-2.0-cil                                            

### ... more lines ... ###

156)     plasticscm-mono3-utils                                                 
157)     plasticscm-mono3-xbuild                                                
158)     plasticscm-monodoc3-base                                               
159)     plasticscm-monodoc3-manual                                             



Accept this solution? [Y/n/q/?]

If you accept this solution (optionally typing "y" and pressing the "Enter" key) you will be prompted with the pre-install report:

 The following NEW packages will be installed:
  plasticscm-certtools-mono4{a} plasticscm-gnome-sharp-mono4{a} plasticscm-gtk-sharp-mono4{a} plasticscm-mono4{a} 
The following packages will be REMOVED:
  plasticscm-certtools{u} plasticscm-gnome-sharp{a} plasticscm-gtk-sharp{a} plasticscm-libmono3-2.0-1{a} plasticscm-libmono3-2.0-cil{a} plasticscm-libmono3-2.0-dev{a} 
### … more lines … #
  plasticscm-mono3-xbuild{a} plasticscm-monodoc3-base{a} plasticscm-monodoc3-manual{a} semanticmerge{a} zlib1g-dev{u} 
The following packages will be upgraded:
  plasticscm-client-complete plasticscm-client-core plasticscm-client-gtk plasticscm-server-complete plasticscm-server-core plasticscm-server-tools plasticscm-theme semanticmerge
8 packages upgraded, 4 newly installed, 162 to remove and 5 not upgraded.
Need to get 70.3 MB of archives. After unpacking 25.1 MB will be freed.
Do you want to continue? [Y/n/?]

At this point you'll just need to press "Enter" and after a few minutes the new Plastic SCM version using mono 4 will be installed and ready to use!

Upgrading Fedora/RedHat/CentOS

Unfortunately, the yum package manager doesn't support semi-automatic conflict resolution. This means that you'll need to remove the old packages first and then install the new ones.

First of all, backup your configuration files and database files (if you're using SQLite) in your client/server directories. You'll probably want to save any .conf, .sqlite, .log.txt files, as well as your server license (/opt/plasticscm5/server/plasticd.lic). You can use these commands:

mkdir -p /tmp/plasticscm-backup/client
mkdir -p /tmp/plasticscm-backup/server
mkdir -p /tmp/semanticmerge-backup/
cp /opt/plasticscm5/client/*.conf /tmp/plasticscm-backup/client
cp /opt/plasticscm5/client/*.log.txt /tmp/plasticscm-backup/client
cp /opt/plasticscm5/server/*.conf /tmp/plasticscm-backup/server
cp /opt/plasticscm5/server/*.log.txt /tmp/plasticscm-backup/server 
cp /opt/plasticscm5/server/*.sqlite /tmp/plasticscm-backup/server 
cp /opt/plasticscm5/server/*.lic /tmp/plasticscm-backup/server
cp /opt/semanticmerge/*.conf /tmp/semanticmerge-backup 
cp /opt/semanticmerge/*.lic /tmp/semanticmerge-backup
cp /opt/semanticmerge/*.log.txt /tmp/semanticmerge-backup 

After that, uninstall any previously installed Plastic SCM package:

sudo yum remove 'plasticscm-*' semanticmerge

At last, reinstall your desired packages. There's a complete list of package names on the installation page. For example:

yum install plasticscm-complete semanticmerge

That's it! Restore all backups and you're ready to go! If you used the commands we suggested to create your backups, you can use these as root to restore them:

cp /tmp/plasticscm-backup/client/* /opt/plasticscm5/client
cp /tmp/plasticscm-backup/server/* /opt/plasticscm5/server
cp /tmp/semanticmerge-backup/* /opt/semanticmerge

Upgrading OpenSUSE

First of all, please note that we've dropped specific support of OpenSUSE 12.3. You'll need to use the OpenSUSE 12.2 repository URL from now on! To do so, first display your current repository list:

sudo zypper lr –u

You'll see something like this:

#  | Alias                        | Name                               | Enabled | Refresh | URI                                                                                   
---+------------------------------+------------------------------------+---------+---------+---------------------------------------------------------------------------------------
 1 | Mono:Factory                 | Mono:Factory                       | Yes      | Yes     | http://download.opensuse.org/repositories/Mono:/Factory/openSUSE_13.2/ 
 2 | openSUSE-13.2-0              | openSUSE-13.2-0                    | Yes      | No      | cd:///?devices=/dev/disk/by-id/ata-VMware_Virtual_IDE_CDROM_Drive_10000000000000000001
 3 | plasticscm-common            | plasticscm-common                  | Yes     | Yes      | https://www.plasticscm.com/plasticrepo/plasticscm-common/openSUSE_12.3/
 4 | plasticscm-latest            | plasticscm-latest                  | Yes     | Yes      | https://www.plasticscm.com/plasticrepo/plasticscm-latest/openSUSE_12.3/ 

Now you should remove your previous plasticscm-* repositories pointing to the OpenSUSE 12.3 repository (3 and 4 in this example) and add the OpenSUSE 12.2 ones:

sudo zypper rr 3 4

sudo zypper ar https://www.plasticscm.com/plasticrepo/plasticscm-common/openSUSE_12.2/ plasticscm-common
sudo zypper ar https://www.plasticscm.com/plasticrepo/plasticscm-latest/openSUSE_12.2/ plasticscm-latest

Remember to refresh your repository cache to apply the changes!

sudo zypper refresh

Now that everything's in place, you can try to automatically update your Plastic SCM installation:

sudo zypper update

The package manager will display a message reporting that your Plastic SCM packages won't be installed:

Loading repository data...
Reading installed packages...

The following 5 package updates will NOT be installed:
  plasticscm-client-complete plasticscm-client-core plasticscm-client-gtk plasticscm-server-core plasticscm-theme 

Nothing to do.

This is a similar behaviour to Debian/Ubuntu: you'll need to manually select the Plastic SCM / semanticmerge packages to update them:

zypper install plasticscm-client-complete plasticscm-client-core plasticscm-client-gtk plasticscm-theme plasticscm-server-core semanticmerge

You'll be prompted with a conflict report and you'll be asked to choose one of the proposed solutions:

Loading repository data...
Reading installed packages...
Resolving package dependencies...
4 Problems:
Problem: plasticscm-server-core-5.4.16.726-2.1.noarch requires plasticscm-mono4 = 4.3.0, but this requirement cannot be provided
Problem: plasticscm-client-gtk-5.4.16.726-1.1.noarch requires plasticscm-gtk-sharp-mono4 >= 2.12.29, but this requirement cannot be provided
Problem: plasticscm-client-complete-5.4.16.726-1.1.noarch requires plasticscm-client-gtk = 5.4.16.726, but this requirement cannot be provided
Problem: plasticscm-client-core-5.4.16.726-2.1.x86_64 requires plasticscm-certtools-mono4, but this requirement cannot be providedProblem: semanticmerge-1.0.81.0-2.1.noarch requires plasticscm-mono4 = 4.3.0, but this requirement cannot be providedProblem: plasticscm-server-core-5.4.16.726-2.1.noarch requires plasticscm-mono4 = 4.3.0, but this requirement cannot be provided
  uninstallable providers: plasticscm-mono4-4.3.0-3.1.x86_64[plasticscm-common]
                   plasticscm-mono4-4.3.0-3.1.i586[plasticscm-common]
 Solution 1: Following actions will be done:
  deinstallation of plasticscm-mono3-web-3.0.3.1-1.1.x86_64
  deinstallation of plasticscm-mono3-extras-3.0.3.1-1.1.x86_64
  deinstallation of plasticscm-mono3-data-3.0.3.1-1.1.x86_64
  deinstallation of plasticscm-mono3-core-3.0.3.1-1.1.x86_64
  deinstallation of plasticscm-libmonosgen3-2_0-0-3.0.3.1-1.1.x86_64
  deinstallation of plasticscm-libmono3-2_0-1-3.0.3.1-1.1.x86_64
 Solution 2: do not install plasticscm-server-core-5.4.16.726-2.1.noarch
 Solution 3: do not install plasticscm-server-core-5.4.16.726-2.1.noarch
 Solution 4: break plasticscm-server-core-5.4.16.726-2.1.noarch by ignoring some of its dependencies

Choose from above solutions by number or skip, retry or cancel [1/2/3/4/s/r/c] (c):

In this case, you'll need to choose solution 1. It will tell zypper to install the packages you passed as command arguments and remove any conflicting, previously installed ones. A similar question will be probably raised for each package. For instance, plasticscm-client-gtk:

Problem: plasticscm-client-gtk-5.4.16.726-1.1.noarch requires plasticscm-gtk-sharp-mono4 >= 2.12.29, but this requirement cannot be provided
  uninstallable providers: plasticscm-gtk-sharp-mono4-2.12.29-1.1.x86_64[plasticscm-common]
                   plasticscm-gtk-sharp-mono4-2.12.29-1.1.i586[plasticscm-common]
 Solution 1: Following actions will be done:
  deinstallation of plasticscm-gtk-sharp-2.12.29-8.1.x86_64
  deinstallation of plasticscm-libmono3-2_0-1-3.0.3.1-1.1.x86_64
  deinstallation of plasticscm-mono3-core-3.0.3.1-1.1.x86_64
  deinstallation of plasticscm-mono3-extras-3.0.3.1-1.1.x86_64
  deinstallation of plasticscm-mono3-data-3.0.3.1-1.1.x86_64
 Solution 2: do not install plasticscm-client-gtk-5.4.16.726-1.1.noarch
 Solution 3: break plasticscm-client-gtk-5.4.16.726-1.1.noarch by ignoring some of its dependencies

Choose from above solutions by number or skip, retry or cancel [1/2/3/s/r/c] (c):  

The first solution is usually the best fit for our needs: install all new packages, remove any old, conflicting ones.

Once you've solved all conflicts, zypper will show you the pre-install report:

Resolving dependencies...
Resolving package dependencies...

The following 4 NEW packages are going to be installed:
  plasticscm-certtools-mono4 plasticscm-gnome-sharp-mono4 plasticscm-gtk-sharp-mono4 plasticscm-mono4 

The following 9 packages are going to be REMOVED:
  plasticscm-certtools plasticscm-gnome-sharp plasticscm-gtk-sharp plasticscm-libmono3-2_0-1 plasticscm-libmonosgen3-2_0-0 
  plasticscm-mono3-core plasticscm-mono3-data plasticscm-mono3-extras plasticscm-mono3-web 

The following 5 packages are going to be upgraded:
  plasticscm-client-complete plasticscm-client-core plasticscm-client-gtk plasticscm-server-core plasticscm-theme semanticmerge

6 packages to upgrade, 4 new, 9 to remove.
Overall download size: 67.9 MiB. Already cached: 0 B  After the operation, additional 33.1 MiB will be used.
Continue? [y/n/? shows all options] (y):

Hit "Enter" and the installation process will start. Wait for a few minutes and Plastic SCM will be installed along with the brand new Mono 4.3 framework. Isn't it great?

Wrapping up

We're really excited about this new upgrade. Running Plastic SCM with Mono 4.3 will improve memory usage, process performance and robustness.

Upgrading the system might seem a little tricky due to the package incompatibilities, but the result is worth the effort, we promise! Of course, if you find any problem during the installation or you think more detailed information will be useful, please let us know in our forum! We'll be delighted to help you :-)

0 comentarios: