ZOSOpenTools / 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
37 stars 25 forks source link

Meta - Introducing the zopen package manager

Meta adds package management facilities to z/OS, via zopen. It is similar to utilities like apt, dpkg, yum, yast2, and emerge. It is written as a pure shell script to remove any prerequisites (like python/perl/bash etc). This package manager is designed for everyday usage of the z/OS Open Tools ports within the z/OS UNIX environment or for those who wish to download the tools.

Download the latest zopen package manager here.

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

Make sure the character device /dev/tty is untagged or you may experience unexpected behaviour. Run chtag -r /dev/tty to remove any tags.

Installation and sample usage

Start with quick start guide.

Important usage notes

Root filesystem install

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 files, 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 <package>...

Used to install a z/OS Open Tools package. By default, the latest stable 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, dangling 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 <package>...

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 query --remote-search <package>

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

zopen query <option>

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

Migrating from zopen version <0.8.0

Note: The new zopen package manager is not compatible with previous versions of zopen. Migration involves creating a new directory structure for zopen tools. This is accomplished via the zopen init command, documented below.

Before you migrate

Useful resources