.. _sec-offline: Workflow: Offline ================= Please **ignore** the offline workflow if your target machine has internet access! Sometimes a user or an organization has the requirement that downloaded packages be virus-checked before installation, or that the actual installation be done on a machine without internet access. We here describe a basic offline workflow using gsm (gempa software manager) enabling this. .. note:: * Note that on some systems, the command `gsm` has to be replaced by `./gsm`. * Replace the exemplary package *seiscomp* by your actual packages. * On the offline machine every command requires :option:`-o`. Commands which contact the repository, e.g. :command:`update` or :command:`sync`, cannot be used there. Transferred directories ----------------------- Two directories below the gsm base directory carry everything the offline machine needs: :file:`var/sync` Package index (:file:`core.db`) and the module description files. :file:`var/packages` Downloaded package archives and licenses. First time ---------- On the **online** machine Download and install gsm as described in :ref:`sec-inst`. Download the required |scname| or |gempa| packages in **download-only mode**, e.g.: .. code-block:: sh ./gsm install -d seiscomp On the **offline** machine Copy the complete gsm directory from the online machine, either with a memory stick or with :program:`scp`: .. code-block:: sh mkdir -p ~/install cd ~/install scp -r user@online-machine:install/gsm . Install the required packages in **offline mode**: .. code-block:: sh cd ~/install/gsm ./gsm install -o seiscomp Subsequent times ---------------- On the **online** machine Go to the gsm directory: .. code-block:: sh cd ~/install/gsm Remove the previously downloaded packages to reduce the virus-checking effort: .. code-block:: sh ./gsm clean packages Perform the update via the gempa repository. This also updates gsm itself: .. code-block:: sh ./gsm update Download the required packages in **download-only mode**, e.g.: .. code-block:: sh ./gsm install -d gsm ./gsm install -d seiscomp On the **offline** machine Go to the gsm directory: .. code-block:: sh cd ~/install/gsm Clean the *sync* and *packages* directories: .. code-block:: sh ./gsm clean all .. warning:: :command:`clean all` removes :file:`var/sync` including the package index. Do not run it unless the directories are replaced in the next step. Copy :file:`var/sync` and :file:`var/packages` from the online machine using a memory stick or :program:`scp`: .. code-block:: sh cd ~/install/gsm/var scp -r user@online-machine:install/gsm/var/sync . scp -r user@online-machine:install/gsm/var/packages . Install the latest version of gsm. Nothing is done if the installed version is already the latest one: .. code-block:: sh cd ~/install/gsm ./gsm install -o gsm Install the latest versions of all previously installed packages in **offline mode**: .. code-block:: sh ./gsm install -o