DevonianTeuchter / meta

Meta repository to tie together the various underlying z/OS Open Source tools repositories here
https://zosopentools.github.io/meta/
Apache License 2.0
2 stars 0 forks source link

meta-dt

A reworking of the main meta project to add additional package management facilities, similar to utilities like apt, dpkg, yum, yast2, emerge .... just written in pure shell script (and a tiny bit of REXX) to remove any pre-reqs (like python/perl/bash etc). This fork is designed for everyday usage of the zos Open Tools ports within the USS environment or for those who wish to download the tools; users who are interested in building and/or porting packages from scratch should use the main release of meta at this time.

Installation

Pre-config

It is advised to have the following set on the system to ensure correct operation:

export _BPXK_AUTOCVT=ON
export _CEE_RUNOPTS="$_CEE_RUNOPTS FILETAG(AUTOCVT,AUTOTAG) POSIX(ON)"
export _TAG_REDIR_ERR=txt
export _TAG_REDIR_IN=txt
export _TAG_REDIR_OUT=txt

Sample usage

. ./.env # Source the .env from meta
zopen init
. <zopen_root_path>/etc/.zopen-config
zopen list --installed
zopen install which
zopen list --installed
which which
zopen upgrade

Important usage notes

Root filesystem install

Problem resolution

If the meta package does get updated to a non-dt version, then running ./zopen alt meta -s from the meta-dt/bin directory within the z/OS Open Tools root filesystem should allow selection of the dt-forked meta; running any other non-forked zopen commands might break the installation or cause unexpected behaviour! zopen commands take a --verbose parameter to produce additional messages that can be used to aid problem diagnosis.

Basic command introduction

Most commands have extended help available using the --help parameter. The following usage guidance should be sufficient to get a system running

zopen init

Used to initialise a z/OS Open Tools environment. By default, this will create a zopen directory in your $HOME directory as the root filesystem (rootfs). The rootfs holds the various packages, configuration and environment for z/OS Open Tools packages - removing this directory will revert the system without a trace. A z/OS Open Tools main configuration file is generated in $rootfs/etc/.zopen-config - to enable the z/OS Open Tools, this will either need to be sourced after logon to the system or the following line can be added to $HOME/.profile (or .bash_profile or...) to automatically source the z/OS Open Tools configuration file

[ -e "$rootfs/etc/.zopen-config" ] && . $rootfs/etc/.zopen-config It is possible to reinitialize a system using the re-init option - doing so will remove the previous configuration though the rootfs can overlap the old filesystem to reuse installed and/or cached packages for example. Initialisation on a system that has previously had a z/OS Open Tools configuration should allow some parameters to be copied across, such as Github tokens.

zopen install ...

Used to install a z/OS Open Tools package. By default, the latest version is installed although options are available to install specific versions, tags or to pick from a selection [see --help for more]

zopen upgrade

Used to upgrade z/OS Open Tools packages. Without parameters, all installed packages will be upgraded; individual packages can be specified on the command line to upgrade only those packages. Packages can be "pinned" to prevent upgrading in case a later release is found to be broken or incompatible - creating a .pinned file in the package directory prevents the upgrade; removing the file allows upgrades to occur.

zopen clean [--cache] [--unused] [--dangling] [--all]

Used to remove resources on the system. zopen will retain old versions of packages to allow for switching versions or quick re-installs; downloaded pax files are held in a cache while the specific version files are maintained in the directory configured during initialisation. Using the clean option removes those unused resources. In addition, zopen utilises symlinks for maintaining the appropriate file structure - should a problem occur during package installation, removal or version change, danling symlinks might be present; the --dangling option will (slowly) analyse the rootfs and prune any dangling symlinks.

zopen alt [package] [-s]

Used to list versions of a package if there are multiple versions present; using the -s parameter allows for the active version to be changed

zopen remove ...

Removes a package from the system, leaving the version on the system for re-use later; the `---purge directory will also remove the versioned directory, requiring a potential download and/or an unpax to occur to re-install that version

zopen list [--installed]

With no parameters, will list the available packages against the currently installed versions; more usefully, using the --installed parameter lists the actually locally-installed packages rather than all potential packages

zopen search

Searches the remote repositiory for the specified package, returning appropriate meta-data about the package if found

zopen query

Queries the local z/OS Open Tools sytem. See ---help for more details

Useful resources