Provide puppet-agent on RPM#21
Conversation
|
We did this on purpose. People shouldn’t be able to mix openvox-agent with puppetserver and vice versa. While it works for now, it may not forever. And we left it unversioned because OpenVox and puppet won’t have similar versions after the fork, so putting a version limiter on puppet agent based on the OpenVox agent version seems incorrect. But it doesn’t necessarily have to stay this way if there are strong reasons to change it. |
|
Splitting this up into 2 discussions ObsoletesAdding versions is IMHO something you want to do. It means If you feel that the specific version will result in mismatches (and I agree, it's hacky) we could also reduce the ProvidesThe reason I'd like to add this is that Foreman users can then simply use OpenVox without needing theforeman/foreman-packaging#11840. It's unlikely we'll cherry pick that down to all versions (including unsupported ones). This is to address https://community.theforeman.org/t/support-for-openvox-puppet-within-foreman-katello/42717/3. |
|
Oh yeah, that makes sense to do it on the major version. We’ll see if our major ends up coinciding with Puppet’s major, but I imagine it will. I’m not totally against having it provide puppet-agent. I worry a bit about unintentional breakage, but we can make it clear in docs you should not mix and match. And making it easier on Foreman is a big plus. |
|
I wonder if we can drop the provides on OpenVox 9, which is where is where I imagine we'll start setting our own path more. |
Rather than hardcoding it we take the major version as a variable.
This allows users to perform `dnf install puppet-agent` or `apt install puppet-agent` and get openvox-agent instead. It also means packages don't need to modify their dependencies. They probably still should, but this helps users migrate. It also tightens the Obsoletes statement to include the major version. rpmlint raises the unversioned-explicit-obsoletes warning on the old case. The Conflicts is kept unversioned, which is correct.
7b7b120 to
83d06f3
Compare
|
I haven't quite tested the current changes, but pushing nonetheless so I don't forget. |
EL 9Build$ bundle exec vanagon build -e docker openvox-agent el-9-x86_64
...
mkdir -p output/el/9/openvox8/x86_64
cp /var/tmp/tmp.sq1L5WpId9/rpmbuild/*RPMS/**/*.rpm ./output/el/9/openvox8/x86_64
...
$ rpm -q --provides output/el/9/openvox8/x86_64/openvox-agent-8.15.0.7.g83d06f38a-1.el9.x86_64.rpm
openvox-agent = 8.15.0.7.g83d06f38a-1.el9
openvox-agent(x86-64) = 8.15.0.7.g83d06f38a-1.el9
puppet-agent = 8
$ rpm -q --conflicts output/el/9/openvox8/x86_64/openvox-agent-8.15.0.7.g83d06f38a-1.el9.x86_64.rpm
puppet-agent
$ rpm -q --obsoletes output/el/9/openvox8/x86_64/openvox-agent-8.15.0.7.g83d06f38a-1.el9.x86_64.rpm
puppet-agent < 9
$ createrepo output/el/9/openvox8/x86_64
Directory walk started
Directory walk done - 1 packages
Temporary output repo path: output/el/9/openvox8/x86_64/.repodata/
Pool started (with 5 workers)
Pool finishedinstall test with openvox-agent$ podman run -v $PWD/output/el/9/openvox8/x86_64:/repo:Z --rm -it almalinux:9
# ls /repo
openvox-agent-8.15.0.7.g83d06f38a-1.el9.x86_64.rpm repodata
# cat > /etc/yum.repos.d/local.repo <<EOF
> [openvox8]
name=OpenVox 8 Repository el 9 -
baseurl=file:///repo
enabled=1
gpgcheck=0
> EOF
# dnf install -y --quiet openvox-agent
Installed:
openvox-agent-8.15.0.7.g83d06f38a-1.el9.x86_64 install test with puppet-agent# ls /repo
openvox-agent-8.15.0.7.g83d06f38a-1.el9.x86_64.rpm repodata
# cat > /etc/yum.repos.d/local.repo <<EOF
> [openvox8]
name=OpenVox 8 Repository el 9 -
baseurl=file:///repo
enabled=1
gpgcheck=0
> EOF
# dnf install -y --quiet puppet-agent
Installed:
openvox-agent-8.15.0.7.g83d06f38a-1.el9.x86_64upgrade test from puppet.com's puppet-agent to openvox-agent$ podman run -v $PWD/output/el/9/openvox8/x86_64:/repo:Z --rm -it almalinux:9
# ls /repo
openvox-agent-8.15.0.7.g83d06f38a-1.el9.x86_64.rpm repodata
# dnf install -y --quiet https://yum.puppet.com/puppet8-release-el-9.noarch.rpm
Installed:
puppet8-release-1.0.0-10.el9.noarch
# dnf install -y --quiet puppet-agent
Importing GPG key 0x9E61EF26:
Userid : "Puppet, Inc. Release Key (Puppet, Inc. Release Key) <release@puppet.com>"
Fingerprint: D681 1ED3 ADEE B844 1AF5 AA8F 4528 B6CD 9E61 EF26
From : /etc/pki/rpm-gpg/RPM-GPG-KEY-puppet8-release
Installed:
puppet-agent-8.10.0-1.el9.x86_64
# cat > /etc/yum.repos.d/local.repo <<EOF
> [openvox8]
name=OpenVox 8 Repository el 9 -
baseurl=file:///repo
enabled=1
gpgcheck=0
> EOF
# dnf upgrade -y --quiet
Installed:
openvox-agent-8.15.0.7.g83d06f38a-1.el9.x86_64 |
|
Currently it fails on Debian 12 because it doesn't provide Debian 12Build$ bundle exec vanagon build -e docker openvox-agent debian-12-amd64
...
cp /var/tmp/tmp.zUyp0LqsuE/*.deb ./output/deb/debian12/openvox8
...
$ ls ./output/deb/debian12/openvox8
openvox-agent_8.15.0.7.g83d06f38a-1+debian12_amd64.deb
openvox-agent-dbgsym_8.15.0.7.g83d06f38a-1+debian12_amd64.debThen I followed https://linuxopsys.com/create-your-own-repository-for-packages-on-debian to create a repo: $ podman run -v ./output/deb/debian12/openvox8:/repo:Z --rm -it debian:12
# apt install dpkg-dev
# cd /repo
# dpkg-scanpackages . /dev/null > Release
dpkg-scanpackages: warning: Packages in archive but missing from override file:
dpkg-scanpackages: warning: openvox-agent openvox-agent-dbgsym
dpkg-scanpackages: info: Wrote 2 entries to output Packages file.
# dpkg-scanpackages . /dev/null | gzip -9c > Packages.gz
dpkg-scanpackages: warning: Packages in archive but missing from override file:
dpkg-scanpackages: warning: openvox-agent openvox-agent-dbgsym
dpkg-scanpackages: info: Wrote 2 entries to output Packages file.install test with openvox-agent# echo 'deb [trusted=yes] file:/repo ./' > /etc/apt/sources.list.d/local.list
# apt update -qqq
# apt install openvox-agent
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
openvox-agent
0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
Need to get 0 B/31.6 MB of archives.
After this operation, 102 MB of additional disk space will be used.
Get:1 file:/repo ./ openvox-agent 8.15.0.7.g83d06f38a-1+debian12 [31.6 MB]
debconf: delaying package configuration, since apt-utils is not installed
Selecting previously unselected package openvox-agent.
(Reading database ... 6091 files and directories currently installed.)
Preparing to unpack .../openvox-agent_8.15.0.7.g83d06f38a-1+debian12_amd64.deb
...
Unpacking openvox-agent (8.15.0.7.g83d06f38a-1+debian12) ...
Setting up openvox-agent (8.15.0.7.g83d06f38a-1+debian12) ...
Processing triggers for libc-bin (2.36-9+deb12u10) ...install test with puppet-agent$ podman run -v ./output/deb/debian12/openvox8:/repo:Z --rm -it debian:12
# echo 'deb [trusted=yes] file:/repo ./' > /etc/apt/sources.list.d/local.list
# apt update -qqq
# apt install puppet-agentThis installs a package, but it's the distro package. For completeness: # apt show openvox-agent
Package: openvox-agent
Version: 8.15.0.7.g83d06f38a-1+debian12
Priority: optional
Section: admin
Maintainer: Vox Pupuli <openvox@voxpupuli.org>
Installed-Size: 102 MB
Provides: puppet-agent
Depends: findutils, tar
Conflicts: puppet-agent
Breaks: puppet-agent (<< 9)
Replaces: puppet-agent (<< 9)
Homepage: https://voxpupuli.org
Download-Size: 31.6 MB
APT-Sources: file:/repo ./ Packages
Description: The OpenVox Agent package contains all of the elements needed to run the agent, including ruby and facter.
.
Contains the following components:
cleanup
facter 4.10.0-3-gaae367139
module-puppetlabs-augeas_core v1.5.0
module-puppetlabs-cron_core v1.3.0
module-puppetlabs-host_core v1.3.0
module-puppetlabs-mount_core v1.3.0
module-puppetlabs-scheduled_task v3.2.0
module-puppetlabs-selinux_core v1.4.0
module-puppetlabs-sshkeys_core v2.5.0
module-puppetlabs-yumrepo_core v2.1.0
module-puppetlabs-zfs_core v1.6.1
module-puppetlabs-zone_core v1.2.0
puppet 8.15.0
puppet-resource_api 1.9.0
puppet-runtime 202504221
pxp-agent 202504221
shellpath 2023-02-15
wrapper-scriptupgrade test from OS puppet-agent to openvox-agent$ podman run -v ./output/deb/debian12/openvox8:/repo:Z --rm -it debian:12
# apt update -qqq
# apt install puppet-agent
# echo 'deb [trusted=yes] file:/repo ./' > /etc/apt/sources.list.d/local.list
# apt update -qqq
# apt upgradeAlso fails. upgrade test from puppet.com's puppet-agent to openvox-agentNot tested since the OS packages upgrade already failed. |
|
Currently the Debian packages don't replace puppet-agent either so this isn't a regression. @nmburgan can we merge this so at least RPM users can simply add the new repository and run |
|
@ekohl does this mean that the upgrade process it to add the new yumrepo, remove the old yumrepo, then upgrade? What happens if they don't remove the puppet.com yumrepo? What happens if perforce decides to arms-race us and jacks their version up higher than ours? |
Pretty much, but also that an RPM like Similarly, Puppet will also recognize and I'd expect the following code to work: package { 'puppet-agent':
ensure => installed,
}I also tried to do the same for Debian, but couldn't make that work even though the docs say this should work.
I'm not too worried about that. This is about upgrading between major versions. If this is applied it won't replace Puppet 8 with OpenVox 7. IMHO that's a sane thing to do. And if Puppet releases Puppet 9, then I think we should see if we actually replace that or not. |
|
@ekohl oh, the Debian failure is because it doesn't look like you pinned the package. You'll need this to install the puppetlabs version of apt::pin { 'puppet-release':
priority => 1001,
originator => 'Puppet*',
packages => 'puppet-agent',
} |
|
talked with a few people about this and I'm more convinced. The |
|
Circling back: @evgeni suggested on IRC that the Debian part is broken because there is no version in the provides. Turns out Vanagon simply ignores that altogether. OpenVoxProject/vanagon#51 makes sure the value is actually used. Then #120 fixed up the syntax. |
This allows users to perform
dnf install puppet-agentand get openvox-agent instead. It also means packages don't need to modify their dependencies. They probably still should, but this helps users migrate.It also tightens the Obsoletes statement to include a version. rpmlint raises the unversioned-explicit-obsoletes warning on the old case. The Conflicts is kept unversioned, which is correct.
Currently untested, but submitting early for discussion.