zpkg: a package manager for zos #1789
Replies: 3 comments
-
If we approve on building the package manager I can start specing it into details. The main goal is
|
Beta Was this translation helpful? Give feedback.
-
Initial requirementszpkg uses a db (sqlite) to track
Install package(s)Phase 1
Phase 2
HooksSince using this package manager will phase out the current update procedure (currently maintained by identityd). but one of the steps taken by identity is to stop, restart and wait for services. This now need to to be done by the pkg manager. hence a package need to be able to define hooks that are understood by the pkg manager for example
the hooks need to have a clear definitions. They can be any executable file (script or binary) and run at defined states.
Required changesBase image0-initramfs (the zos base image) can be minimized to only (theoretically) have only the:
on boot, zinit is configured (with proper yaml) to kickstart ZOSzos currently maintain a list of all system packages that are installed during runtime. those need to be extended (and properly moved to another dedicated repo, that will include all pkgs from both 0-initramfs and zos. This new repo on build can build all packages (properly so each contain only it's binaries/libs) and build proper pkg metadata (like versions and dependencies). The builder repo can build a package from source, or by packing the binaries directly from the system. making sure it only include it's The builder repo should be smart enough (or has the options) to specify what packages need repackaging. Will probably need a consistency check after all builds are completely. may be by means of using issues
|
Beta Was this translation helpful? Give feedback.
-
Deprecated in favor of #2012 |
Beta Was this translation helpful? Give feedback.
-
Right now the base image include all the base binaries and libraries to boot the node + some basic runtime packages (binaries that are need for zos operation).
During boot the node still also install some more packages in the form of flist. The node blindly copy all the flists content from a specific repo on the hub. Those package will contain binaries and libraries. the compatibility of the libraries are not granted (except by being always careful while building) to make sure we don't override one library (thing libc) with an older/newer version that might cause other binaries to fail.
This is why we usually prefer static builds for this kind of "packages" but it's not always possible.
What I think is instead, we need to introduce a new pkg manager that integrates well with the current system.
So basically it needs to:
This sound (and is) pretty basic package management to make sure build is always consistent and never break an installed package by a broken flist build. We should consider looking around first for existing package management system and if we can reuse them to work with flists before we jump into building our own solution.
Bad Scenario 1 that makes this necessary
Right now github is deprecating the support for ubuntu 18.04. This is the one that we use to build zos base image. Hence all base libs are from ubuntu (well, the ones that we don't rebuild ourselves - like glibc). So we need to update this to use latest ubuntu.
This means that newer images has newer libs, so newly booted nodes will have newer libs, but the older ones (that are already in the field) won't.
Now we need to rebuild the new "pakcages" to depend on the same glibc version (and other libs) to work on the new images. this means it will break for older nodes ... well without package management
Beta Was this translation helpful? Give feedback.
All reactions