Difference between revisions of "Bering-uClibc 5.x - User Guide - Upgrade LEAF Bering-uClibc"

From bering-uClibc
Jump to: navigation, search
m (Invocation)
(Upgrade LEAF Bering-uClibc)
 
(4 intermediate revisions by the same user not shown)
Line 9: Line 9:
 
== Upgrade LEAF Bering-uClibc ==
 
== Upgrade LEAF Bering-uClibc ==
  
 
+
Starting with LEAF Bering-uClibc 5.2.2 the new tool '''''upgrade''''' is available. It allows to upgrade your LEAF software online using the git-based [https://sourceforge.net/p/leaf/packages/ci/master/tree/ Packages repository] at sourceforge.net.
Starting with LEAF Bering-uClibc 5.2.2 the new tool '''''upgrade''''' is available. It allows to upgrade your LEAF software online using a server at sourceforge.net.
+
 
+
  
 
=== Invocation ===
 
=== Invocation ===
 
+
<code class="filename">upgrade</code> is a command line tool. Establish a terminal connection to your LEAF box and run <code class="filename">upgrade</code> with your preferred options. Without any option, <code class="filename">upgrade</code> will use the current stable version as defined on the repository server. Options you can use with <code class="filename">upgrade</code> are shown below.
<code class="filename">upgrade</code> is a command line tool. Just establish a terminal connection to your LEAF box and enter '''''upgrade''''' with your preferred options. Without options, <code class="filename">upgrade</code> will use the current stable version as defined on the repository server. Below you can find the options you can use with <code class="filename">upgrade</code>.
+
  
 
<pre>
 
<pre>
Line 36: Line 33:
  
 
Your LEAF box must have the software stored on a RW medium, which excludes all CD based systems. There must be some free space on the storage medium as the distribution tends to grow.
 
Your LEAF box must have the software stored on a RW medium, which excludes all CD based systems. There must be some free space on the storage medium as the distribution tends to grow.
You need a working internet connection and use either shorewall as your firewalling software or your router must be able to open a http connection to sourceforge.
+
You need a working internet connection and use either shorewall as your firewalling software or your router must be able to open a http connection to sourceforge.net.
  
 
== How does it work ==
 
== How does it work ==
  
Upgrade connects to a repository server at sourceforge.net and tries to find the software you specified according to the chosen options. It then inspects the running system and selects the packages to be upgraded. The packages are downloaded to your storage medium. Upgrade inspects your configuration files and tries to detect the modifications you made to the originals. It patches the new configuration files using those modifications with the goal to provide a seamless upgrade.  
+
<code class="filename">upgrade</code> connects to the git repository at sourceforge.net and tries to find the software you specified according to the chosen options. It investigates the running system, selects the Packages to be upgraded and downloads modified Packages to your storage media. <code class="filename">upgrade</code>  then inspects your configuration files and tries to detect the modifications you made. It patches the new configuration files using those modifications with the goal to provide a seamless upgrade.  
All operations are logged to syslog with the syslog facility local0 for you to inspect and, if needed, fix inconsistencies before you reboot the system. If a configuration file cannot be patched safely, then copies of the old and new files are left in the /tmp directory. If an error occurs by upgrade a non null status code is returned by upgrade.
+
All operations are logged to syslog with the syslog facility local0 for you to inspect and, if needed, fix inconsistencies before you reboot the system. If a configuration file cannot be patched safely, copies of the old and new files are left in the <code class="filename">/tmp</code> directory. If an error occurs by <code class="filename">upgrade</code>, it returns a non null status code.
If you decide to inspect your modifications manually, the option -u lets you invoke the apkg -u tool to freely check and select your configuration files for each package.
+
If you decide to look into your changes manually, the option -u lets you invoke the <code class="filename">apkg</code> tool with option -u, to check and select your configuration files for each package.
 
You must save the newly built configuration files to storage before you reboot.
 
You must save the newly built configuration files to storage before you reboot.
  
 
== Suggestions and hints ==
 
== Suggestions and hints ==
  
Before you start upgrade save your configuration files to storage using the web GUI or lrcfg.
+
Before you start <code class="filename">upgrade</code>, save your configuration files using the web GUI or <code class="filename">leaf.cfg</code>.
 
Save your current software by connecting to the LEAF box and copying everything from storage using a tool like scp.
 
Save your current software by connecting to the LEAF box and copying everything from storage using a tool like scp.
It is best to run upgrade on a dual boot system, so you have a fallback should there be a problem booting the new software.
+
It is advised, to run <code class="filename">upgrade</code> on a dual boot system, so you have a fallback in case a problem booting the new software occurs.
  
 
== Examples ==
 
== Examples ==

Latest revision as of 15:52, 13 December 2015

Upgrade LEAF Bering-uClibc
Bering-uClibc 5.x - User Guide


Upgrade LEAF Bering-uClibc

Starting with LEAF Bering-uClibc 5.2.2 the new tool upgrade is available. It allows to upgrade your LEAF software online using the git-based Packages repository at sourceforge.net.

Invocation

upgrade is a command line tool. Establish a terminal connection to your LEAF box and run upgrade with your preferred options. Without any option, upgrade will use the current stable version as defined on the repository server. Options you can use with upgrade are shown below.

SALT# upgrade --help
Usage: upgrade [-s] [-c] [-vv | --vvv] [--stable | --latest | --release x.y.z] [--compact-modules] [-u | --use_apkg]

-c			just check the version on the server
-s			be silent
-vv | -vvv		be more chatty  
--stable		upgrade to stable release, this is the default behaviour
--latest		upgrade to latest release
--release x.y.z		upgrade to release x.y.z
--compact_modules	remove unloaded modules
-u | --use_apkg		use apkg -u to handle modified packages
			instead of the internal routines
-h | --help		show this page

Prerequisites

Your LEAF box must have the software stored on a RW medium, which excludes all CD based systems. There must be some free space on the storage medium as the distribution tends to grow. You need a working internet connection and use either shorewall as your firewalling software or your router must be able to open a http connection to sourceforge.net.

How does it work

upgrade connects to the git repository at sourceforge.net and tries to find the software you specified according to the chosen options. It investigates the running system, selects the Packages to be upgraded and downloads modified Packages to your storage media. upgrade then inspects your configuration files and tries to detect the modifications you made. It patches the new configuration files using those modifications with the goal to provide a seamless upgrade. All operations are logged to syslog with the syslog facility local0 for you to inspect and, if needed, fix inconsistencies before you reboot the system. If a configuration file cannot be patched safely, copies of the old and new files are left in the /tmp directory. If an error occurs by upgrade, it returns a non null status code. If you decide to look into your changes manually, the option -u lets you invoke the apkg tool with option -u, to check and select your configuration files for each package. You must save the newly built configuration files to storage before you reboot.

Suggestions and hints

Before you start upgrade, save your configuration files using the web GUI or leaf.cfg. Save your current software by connecting to the LEAF box and copying everything from storage using a tool like scp. It is advised, to run upgrade on a dual boot system, so you have a fallback in case a problem booting the new software occurs.

Examples

Check for the current stable release

SALT# upgrade -c
5.2.0

Check for the latest available release

SALT# upgrade -c –latest
5.2.2

Run upgrade to latest

SALT# upgrade –latest
upgrade: starting
upgrade: retrieve http://sourceforge.net/p/leaf/packages/ci/master/tree/latest
upgrade: retrieve http://sourceforge.net/p/leaf/packages/ci/5.2.2/tree/i386/linux-geode
upgrade: retrieve http://sourceforge.net/p/leaf/packages/ci/5.2.2/tree/i386/initrd.lrp
upgrade: retrieve http://sourceforge.net/p/leaf/packages/ci/5.2.2/tree/i386/initmod-geode.lrp
upgrade: retrieve http://sourceforge.net/p/leaf/packages/ci/5.2.2/tree/i386/moddb-geode.lrp
upgrade: retrieve http://sourceforge.net/p/leaf/packages/ci/5.2.2/tree/i386/modules-geode.sqfs
upgrade: retrieve http://sourceforge.net/p/leaf/packages/ci/5.2.2/tree/geode/firmware/e100
upgrade: build /tmp/moddb.lrp
upgrade: retrieve http://sourceforge.net/p/leaf/packages/ci/5.2.2/tree/i386/sha1sum.list
upgrade: retrieve http://sourceforge.net/p/leaf/packages/ci/5.2.2/tree/i386/dnsmasq.lwp
upgrade: retrieve http://sourceforge.net/p/leaf/packages/ci/5.2.2/tree/i386/hostapd.lwp
upgrade: retrieve http://sourceforge.net/p/leaf/packages/ci/5.2.2/tree/i386/webconf.lwp
upgrade: retrieve http://sourceforge.net/p/leaf/packages/ci/5.2.2/tree/i386/wpasupp.lwp
upgrade: upgrade terminated successfully

Up