Version 1 (modified by 12 years ago) (diff) | ,
---|
Using Yum as an SPMA backend
Table of Contents
Introduction
This document describes the internals of the integration of Yum and SPMA. User documentation will be provided in Github pages.
The main priority is to make the transition as smooth as possible for users. În the first stage, all changes are on the client side. This means *no changes to any Pan schemas*. In the second phase, some schemas may add fields for the user's benefit, but it *should* be backwards-compatible.
Whatever changes we do to SPMA schema or internals, we *must* port them into AII, which is going to be time consuming.
What ncm-spma
does
ncm-spma
, essentially, writes two files: /etc/spma.conf
and /var/lib/spma-target.cf
. Afterwards, it may need to transfer the control to the spma
program, who actually deals with the packages.
What spma
does
The spma
program reads its configuration file and the list of desired packages, potentially manipulates some URLs, and passes control to SPM::RPMPPkgr
.
Current problems
First of all, it's the obvious lack of dependency resolution. To avoid any dependency problems in Pan, we install way too much.
Also, there are bugs in some RPM bindings that limit the size of our transactions.
Proposal
We'll fork off ncm-spma
completely. Updating the system will require running ncm-ncd --co spma
, as is currently done. The new ncm-spma
will:
- Use
/software/repositories
to populate/etc/yum.repos.d
.- In a future iteration, all fields allowed in a Yum repository will be allowed.
- For packages with a fixed repository, include them in the
includepkgs
entry of the relevant repository. - For packages with no fixed repository, include them in the
includepkgs
entry of/etc/main.conf
. - Compute the set difference between
rpm -qa
and/software/packages
. - Execute
yum shell
to:- Remove the difference (these are outdated packages), unless
userpkgs
is set. - Install all entries in
/software/packages
- Remove the difference (these are outdated packages), unless
In future iterations, version and architecture of any given package will be optional.
The spma
command will become an alias for ncm-ncd --co spma
. The rpmt-py
and spma
packages will become deprecated.
Users willing to go back to the previous behaviour can just downgrade ncm-spma, and it will just work.
Attachments (4)
-
deps-intermediate.png (4.9 KB) - added by 11 years ago.
Dependency graph for an example
- deps.png (4.5 KB) - added by 11 years ago.
- deps-transaction.png (7.3 KB) - added by 11 years ago.
- deps-updated.png (5.5 KB) - added by 11 years ago.
Download all attachments as: .zip