RPM Packages Consumption Guideline for zopen community #1223
sachintu47
announced in
Announcements
Replies: 1 comment 3 replies
|
This is amazing! Thank you. I think it’d be important to set up DNS and TLS for pulp. I’d be open to helping get this up and running if needed. Let me know if I can help. |
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
RPM Packages Consumption Guideline for zopen community
This guide explains how to configure your z/OS Unix System Services (USS) client to consume, verify, and install RPM packages delivered by the zopen community.
Important
System package management operations (such as importing GPG signing keys and installing packages using
rpmanddnf5) modify system directories and database files. You must perform this setup and run these commands logged in directly under a user account with superuser authority (root user / UID 0).Step 0: Install Package Management Tools
If you do not have
dnf5andrpminstalled on your z/OS USS system, you can download and install them directly from the zopen community using thezopenpackage manager:Once installed, verify they are in your environment by running:
rpmversion 6.0.1 or higherdnf5version 5.4.2.1 or higherStep 1: Configure the Repository (Requires Superuser/Root)
Create the configuration file to tell
dnf5where to find the package metadata and GPG keys.755):/etc/yum.repos.d/zopen.repo:Option 1: Manual Setup (Recommended)
Paste the following configuration.
Note
The primary domain is
http://repo.zopen.community/. If your system is behind a firewall that cannot resolve external domains or has TLS issues, you can fall back to the direct IP endpointhttp://163.74.83.190:8080/.Primary Configuration:
Alternative (Direct IP Fallback) Configuration:
(Note: The
metadata_expire=300tells DNF5 to check for new repository updates every 5 minutes by default).Ensure the file permissions are set to
644(read-only for non-root):Option 2: Download via Curl
Alternatively, you can download the configuration file directly:
Step 2: Import the GPG Public Key (Requires Superuser/Root)
All RPM packages in the zopen repository are cryptographically signed to ensure security. Import the community public key into your system's RPM database:
(Fallback IP URL:
http://163.74.83.190:8080/pulp/content/keys/zopen.pub)Verify the GPG Key Import
To confirm that the GPG public key has been successfully imported into the RPM database, run:
Expected output should list the imported key (e.g.,
gpg-pubkey-xxxxxxxx-xxxxxxxx). To view the detailed information of the imported zopen key (such as the signer details), run:Step 3: Clear Cache and Initialize Metadata (Requires Superuser/Root)
Initialize the local package database cache. Because z/OS clients require uncompressed metadata formats, the repository serves XML layouts natively.
Directory and Storage Requirements
This step writes to the following paths on
/var:/var/lib/rpm/: Stores the system RPM package database./var/cache/libdnf5/: Stores downloaded package metadata and cache.Important
Ensure the filesystem hosting
/varhas at least 200 MB to 500 MB of free space available to store the packages database and metadata cache safely.Run the synchronization command:
Tip
If a new package has just been published to the repository but
dnf5is not showing it, you can force the metadata cache to refresh instantly from the remote server by passing the--refreshflag:Step 4: Install and Query Packages (Requires Superuser/Root to Install)
Now you can list, search, and install tools from the repository.
Discover Package Installation Paths
To discover exactly what files were installed by a package and where they were placed on your filesystem, use the
rpmquery command:Package Installation Paths & Alternatives
All packages installed from the zopen RPM repository are placed under the
/opt/pkgdirectory structure on the z/OS client system:/opt/pkg/bin/opt/pkg/lib/opt/pkg/shareTo run and use the installed packages, make sure to add the binaries to your
PATHenvironment variable:Alternatives and zopen Integration
For utilities where multiple versions might coexist (such as
opensslor python), the system uses thealternativescommand structure to manage symbolic links pointing to the active version:zopen's standard user-profile environment scripts to automatically register/opt/pkgbinaries.Installing Packages into a Staged Filesystem
On z/OS, software is commonly installed or serviced in a separate writable filesystem before that filesystem is mounted at its production location.
For example, a filesystem can be temporarily mounted at
/SERVICE, updated using DNF5, validated, unmounted, and then remounted at its normal production mount point.Install into the Staged Filesystem
To install
ztraceinto the filesystem mounted at/SERVICE:The options have the following purposes:
--installroot=/SERVICEtells DNF5 to treat/SERVICEas the root of the filesystem being serviced.--use-host-configtells DNF5 to use the repository configuration from the active system, including:Without
--use-host-config, DNF5 looks for repository configuration inside the staged filesystem instead:Important
Use the same
--installrootvalue for every DNF5 command that operates on the staged filesystem. If the option is omitted, DNF5 operates on the active system root and its RPM database instead.List Packages Installed in the Staged Filesystem
Example output:
Query the Staged RPM Database Directly
When using
rpm, specify the staged filesystem using--root:To query a specific package:
Commands that do not specify the staged root query the active system RPM database and may therefore return no results:
Remove or Upgrade Packages in the Staged Filesystem
Remove a package:
Upgrade the packages installed in the staged filesystem:
Typical z/OS Deployment Flow
A typical staged deployment follows this sequence:
/SERVICE.--installroot=/SERVICE./SERVICE.For example:
Note
Package paths are interpreted relative to the installation root. For example, a package file with the path:
is written during staging as:
After the filesystem is mounted at its production location, the files become available through the corresponding production paths.
Troubleshooting
1. Error:
add_librepo_xattr: Operation not supported2. Error:
Permission deniedrpm --import,dnf5 makecache, ordnf5 installfrom a user account without superuser privileges.Pending TODOs
zopenand bootstraps the package managers automatically./varare written to by DNF5 and measure the exact filesystem size needed.zopen's standard profile environment scripts.All reactions