I am currently working on a project where I need to convert Katello Git repositories into DEB/RPM repositories. My goal is to find an efficient method to perform this conversion so that I can centrally manage both Debian and RPM packages using Katello. I am looking for detailed steps and recommendations on tools or scripts that could facilitate this process.
What do you mean by Git repositories? You want to convert the code of Katello itself into an rpm? The packaging team already does that, and I don’t understand what else you may mean here.
You can already manage both Debs and RPMs using Katello – simply enable the deb content type.
What Jeremy said. All of the packages for RPM are here: https://yum.theforeman.org/ but can be accessed with detailed steps from the install guide. For DEB they are here https://deb.theforeman.org/ If you want things right away, there is a nightly folder and rpms that get created each night.
Automating RPM/DEB Releases Download and Integration into Katello/Pulp
Hi everyone,
I think there might have been a misunderstanding in my initial question. Just to clarify, I’m not trying to package Katello itself into RPM/DEB.
What I’m looking to do is automate the process of downloading the latest RPM/DEB releases from multiple Git repositories (such as GitHub, GitLab) and adding them to my local Katello/Pulp repository.
For example, let’s take example-project, which provides RPM and DEB packages in its GitHub/GitLab releases section. Since I don’t necessarily have API access, I need to find a way to regularly check for new versions and integrate them into Katello without manually downloading and uploading each time.
Workflow (Example with example-project)
1. Check the latest release of `example-project`
├── Manually visit the releases page or parse the webpage
├── Identify the latest `.rpm` and `.deb` versions
├── Download them via public links
└── Skip if the latest version is already present
2. Upload the files to Katello/Pulp
├── Use `hammer repository upload-content` to add the new RPM/DEB
├── Synchronize and update the content view
└── Publish so clients can access the latest versions
Steps to achieve this
Manually check or use a script to find new .rpm or .deb releases from the example-project releases page (without API access).
Download the latest available package using a public URL.
Publish the updated content view so clients can access the latest versions.
I was wondering if Katello/Pulp already provides a built-in way to sync these third-party releases without requiring API access? If so, I’d love to learn more about it. Otherwise, I’m planning to set up a scheduled script to handle this, and any advice would be greatly appreciated.
At least to my knowledge, there is no built in way. I tried automating the download of the always latest version of a package from a gitlab repo myself in the past, but without API access, this is a rather complicated task due to how the release pages work.
What might help is that there are stable URLs that always point to the latest release, but then you will still need some way to determin the correct filename, since release artifacts usually contain the filename.
On Gitlab, these links take the form of https://gitlab.com/<username or groupname>/<reponame>/-/releases/permalink/latest/downloads/<filename>, which automatically redirect to the latest release. There is a similar thing for Github, but I do not have the URL for that at hand.
It’s really similar as you say, https://github.com/<org>/<repo>/releases/download/latest/<filename>
The filename is the catch though, if this one is always the same you don’t really need the api access, but if you need to find out the version before downloading the artifact, because it’s in the artifact name then it’s really a get the versions json from the api (with credentials) and then download.