- Maintenance and security teams
- Training and technical support
- Managers and other internal key stakeholders
- Future project/feature owners/maintainers
CentOS 8 replaced yum
with a new package manager named dnf
. The dnf
hook system is not backwards compatible with yum
[1]. Third-parties may rely on the cPanel universal hooks plugin and it is difficult to know if they use hooks that are not available in dnf
.
Ubuntu uses apt
which is very different than RPM based systems.
To have the same experience on dnf
and apt
systems as yum
as far as universal hooks go.
Otherwise things will be left in weird state because the hooks do things like update configutation and restart services.
There is not a one-to-one mapping from yum
“slots” to dnf
and apt
hook points [1]. Fortunately we only use the posttrans
slot which does exist in dnf
as the transaction
hook point and in apt
as Post-Invoke
. That is likely to be true of the majority of users. If not we have documentation thay can use to make a decision on what to do.
For example, our hooks are installed by the ea-apache24-config-runtime
package.
For yum
systems that package must install its scripts under /etc/yum/universal-hooks
using the “slot” posttrans
.
For dnf
systems that package must install its scripts under /etc/dnf/universal-hooks
using the transaction
hook point.
For apt
systems that package must install its scripts under /etc/apt/universal-hooks
using the Post-Invoke
hook point.
Existing code (ours and possibly 3rdparty) need to be considered.
Note: this part only mentions yum
and dnf
but the same ideas apply even when we add apt
to the mix.
Estimate:
- how much time and resources will be needed to maintain the feature in the future
- how frequently maintenance will need to happen
Very little, the python API doesn’t change much and when it did they came up with a whole new system (i.e. dnf
).
Its possible that dnf
will add hook points which we can then support [2].
Approach | Pros | Cons |
---|---|---|
Have yum-plugin-universal-hooks install different things on yum and dnf systems |
Just Works. | - |
↑ | It can Provide: dnf-plugin-universal-hooks on dnf systems for convenience without casing confusion on yum systems. |
- |
↑ | Both versions live together so if a change is needed we are less likely to overlook one. | - |
↑ | - | The spec file has to operate on different files based on the OS. |
Create a new package dnf-plugin-universal-hooks |
Clear delination of yum and dnf |
- |
↑ | - | Any place we (or 3rdparty) deal with the yum-plugin-universal-hooks package would need updated to choose the right package based onthe OS. |
↑ | - | That would be impossible on older versions. |
↑ | - | Even if it Provides: yum-plugin-universal-hooks there would be a chicken and egg battle as versions change. |
We opted for yum-plugin-universal-hooks
doing the right thing because it requires far less effort, will have no chicken and egg problem, and the if/else logic is encapsulated in one spot.