2.6 System Update Guide

Calculate Linux uses Portage to manage packages. You can update your system in two different ways:
  • Update all packages;
  • Update from an ISO image.

Updating the packages

Please follow the steps below.

1. Update the Calculate overlay and the Portage tree

As our repositories are regularly updated, remember to always have the most recent versions of Portage and the calculate overlay before you install or update anything.

To update your system, the following command should be enough:

cl-update --sync-only
Once launched, cl-update will update all system components subsequently, namely:
  • repositories,
  • the Portage tree,
  • templates,
  • revisions.

If you use another overlays than the default one, you should add --update-other (-o), too:

cl-update --sync-only --update-other

2. Update software

Each flavor of Calculate Linux features a binary repository for precompiled packages that are optimized for the given distribution. If you prefer to compile from source code, add the following line to your /etc/portage/make.conf/custom file:

FEATURES="-getbinpkg"

Calculate is a rolling release operating system that provides a set of distributions featuring each its own list of directly available or masked packages, as well as its own specific USE flags. All of these are found in the distribution profile. For a complete list of profiles provided for your architecture, please run:

cl-update-profile list

You can also specify the profile explicitly, with cl-update-profile as well:

cl-update-profile CLDX

Moreover, you can use a non official profile: add the --url option to do so.

After the release of Calculate Linux 14, update became easier with cl-update. The man page for the latter is available on this site. If you want to make a complete update, with syncing all overlays and Portage, simply run without arguments:

cl-update
Our update protocol includes:
  1. Synchronizing the distribution's repositories
  2. If any modifications found at the previous step, running egencache and eix-update
  3. Updating the revision and regenerating the world file
  4. Updating the packages
  5. Updating Python/Perl; if broken packages are detected, all of them will be recompiled
  6. Deleting orphaned packages
  7. Recompiling kernel modules if needed
  8. Recompiling other affected packages if any
  9. Recompiling Xorg-related packages (if needed)
  10. Running dispatch-conf

3. Update configuration files

When you update packages, no configuration files are overwritten by default. You will be notified any time a modification is detected. The main commands of this utility are: "PageUp"/"PageDown" - browse the configuration file, "u" - replace the current configuration file with the new one, "z" - delete the new configuration file, "q" - quit.

If you want your configuration files to be corrected automatically, set the cl_autoupdate_set variable to "on" in /etc/calculate/calculate.env, as shown below:

[main]
cl_autoupdate_set = on

If you choose this option, always make sure that all config modifications are done correctly and use templates.

Updating from an ISO image

It is also possible to upgrade your system by installing a new image onto the free system partition. Main existing parameters such as user accounts, network settings, mount points, screen resolution and other will be transferred. If needed, additional settings will be adjusted by Calculate templates during installation.

If you have Calculate Directory Server installed, make sure that the /var/calculate directory is mounted at a separate partition on your hard drive. If it is not so, transfer your data and add the necessary mount point in /etc/fstab.

Now, how do you upgrade from an ISO?

Log in as root in the command line and follow the instructions below:

1. Update the installer first

We recommend to always use the latest version of calculate-install, so update it:

cl-update -s && emerge calculate-utils

2. Download the latest Stage image

New ISO images of Calculate Linux are available for download on our HTTP and FTP servers every week. We suggest that you fetch the latest one to be found in the stages directory. Choose the flavor you like, as in:

mkdir -p /var/calculate/remote/linux
cd /var/calculate/remote/linux
wget http://mirror.yandex.ru/calculate/CLD/stages/i686/cld-********-i686.iso

The command shown above must contain the correct path to the file image of your distribution; choose the appropriate architecture.

3. Install the latest version available

cl-install

If you are updating a Calculate Directory Server, you can save a copy of your current server settings and the LDAP database by running:

cl-backup

Now reboot. Enter the following to restore the database and the settings of your server:

cl-rebuild
The main advantages of this technique are:
  • Reliability: you can always boot into the previous system, if the new one should ever become unstable.
  • Speed: it requires about 5-7 minutes to complete the upgrade.

Note that software included in the ISO image can be pre-modified. If interested, please refer to the Interactive system build guide.

Thank you!