Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ubuntu Pro Patches #7897

Closed
hsh-it opened this issue Nov 17, 2023 · 9 comments
Closed

Ubuntu Pro Patches #7897

hsh-it opened this issue Nov 17, 2023 · 9 comments
Labels
question Further information is requested

Comments

@hsh-it
Copy link

hsh-it commented Nov 17, 2023

I believe that the Unbunt Pro patches "simply" come from the appropriate source list and are applied to systems if it is connected to Ubuntu Pro, if not, then not.

In Uyuni you could then create a group that has this source. But I don't know if and how Uyuni can download the packages to distribute them from Uyuni Master to the systems.

https://ubuntu.com/server/docs/install/subscription

@hsh-it hsh-it added the question Further information is requested label Nov 17, 2023
@stdevel
Copy link
Contributor

stdevel commented Mar 22, 2024

Good idea. I'd also like to see Ubuntu Pro support. I just saw an Ubuntu Pro systems and saw that, after registration, only public URLs are defined below /etc/apt/sources.list.d. So there must be a different way how Canonical ensures that only paid customers retrieve the packages (maybe using client certificates like the Red Hat CDN). Will have a look at it.

@hsh-it
Copy link
Author

hsh-it commented Mar 25, 2024

I have asked Canonical how this can work. The problem is that the Uyuni server cannot load the packages because the authorization fails. So it should be possible somehow to authorize Suse Linux with the token. I have not found a way yet. In general, there is still very little information on this.

Maybe Canonical has an answer. I'll probably get one in one working day, at least that's what it said on the website after I sent the question :-)

@hsh-it
Copy link
Author

hsh-it commented Apr 17, 2024

No answer from Canonical ... @stdevel if you got some informations about that im happy to hear from you

@stdevel
Copy link
Contributor

stdevel commented Apr 24, 2024

if you got some informations about that im happy to hear from you

Someone pasted me the following link about airgapped environments: https://github.com/canonical/ubuntu-pro-docs/blob/main/airgapped-setup.rst

Unfortunately you'll need an Ubuntu One account in order to read it. Will have a look at it later.

EDIT: It seems like these links do not work with a free account. 🤡 🤡 🤡
EDIT 2: Dealing with username/password or the Ubuntu Pro token might do the trick for the ESM servers: https://gist.github.com/fluential/ab15352563c71ac195e7a74041b44517, https://discuss.tchncs.de/post/440586

@stdevel
Copy link
Contributor

stdevel commented Apr 27, 2024

Update: As suspected, synching Ubuntu Pro packages works if you extract the GPG key and bearer token from a registered system. See the following screenshot:

uyuni_ubuntu_pro

I also published a write-up here: https://cstan.io/en/post/2024/04/ubuntu-pro-mirror/

So, there are no technical changes required in Uyuni - it could be documented in the docs. I'm just unsure if we should document this detailed as this procedure can lead into misusing the Ubuntu Pro service. On the other hand, Uyuni can also mirror RHEL packages and break the terms of service, too. The user needs to ensure having as many subscriptions as systems.

What do you think, @mmmmmmpc and @dvosburg?

@hsh-it
Copy link
Author

hsh-it commented Apr 29, 2024

Something must be different

2024/04/29 12:39:58 +02:00 Command: ['/usr/bin/spacewalk-repo-sync', '--channel', 'ubuntu-22.04-pro', '--type', 'deb', '--non-interactive']
2024/04/29 12:39:58 +02:00 Sync of channel started.
2024/04/29 12:40:00 +02:00 Repo URL: https://bearer:<secret>@esm.ubuntu.com/infra/ubuntu/dists/jammy-infra-updates/main/binary-amd64/
2024/04/29 12:40:00 +02:00     Packages in repo:                 1
2024/04/29 12:40:00 +02:00     Packages already synced:          0
2024/04/29 12:40:00 +02:00     Packages to sync:                 1
2024/04/29 12:40:00 +02:00     New packages to download:         1
2024/04/29 12:40:00 +02:00   Downloading packages:
2024/04/29 12:40:01 +02:00     1/1 : hello_2.10-2ubuntu4+esm1_amd64.deb
2024/04/29 12:40:01 +02:00 Filtering packages that failed to download
2024/04/29 12:40:01 +02:00 Importing packages started.
2024/04/29 12:40:01 +02:00 
2024/04/29 12:40:01 +02:00   Importing packages to DB:
2024/04/29 12:40:01 +02:00   Package batch #1 of 1 completed...
2024/04/29 12:40:01 +02:00 Importing packages finished.
2024/04/29 12:40:01 +02:00 
2024/04/29 12:40:01 +02:00   Linking packages to the channel.
2024/04/29 12:40:01 +02:00     1 packages linked
2024/04/29 12:40:01 +02:00 
2024/04/29 12:40:01 +02:00   Patches in repo: 0.
2024/04/29 12:40:01 +02:00   Regenerating bootstrap repositories.
2024/04/29 12:40:02 +02:00 Sync completed.
2024/04/29 12:42:30 +02:00 Command: ['/usr/bin/spacewalk-repo-sync', '--channel', 'ubuntu-22.04-pro', '--type', 'deb', '--non-interactive']
2024/04/29 12:42:30 +02:00 Sync of channel started.
2024/04/29 12:42:30 +02:00 Repo URL: https://bearer:<secret>@esm.ubuntu.com/infra/ubuntu/dists/jammy-infra-updates/main/binary-amd64/
2024/04/29 12:42:30 +02:00     Packages in repo:                 1
2024/04/29 12:42:30 +02:00     No new packages to sync.
2024/04/29 12:42:30 +02:00 Filtering packages that failed to download
2024/04/29 12:42:30 +02:00 Importing packages started.
2024/04/29 12:42:30 +02:00 
2024/04/29 12:42:30 +02:00   Importing packages to DB:
2024/04/29 12:42:30 +02:00 Importing packages finished.
2024/04/29 12:42:30 +02:00 
2024/04/29 12:42:30 +02:00   Patches in repo: 0.
2024/04/29 12:42:30 +02:00 Sync completed.

image

Cahnnel:
Ubuntu 22.04 ESM Infra

repo:
image

@stdevel
Copy link
Contributor

stdevel commented Apr 29, 2024

There aren't that many infra updates for 22.04 available, yet. Have a look at an older release such as 18.04 - or check-out the apps-security repository. There are more available packages.

@hsh-it
Copy link
Author

hsh-it commented Apr 30, 2024

Your solution worked perfectly. Thank you very much.

There are actually only a few packages in the sources. Still, that will change.

@hsh-it hsh-it closed this as completed Apr 30, 2024
@stdevel
Copy link
Contributor

stdevel commented Apr 30, 2024

Happy to help!

As discussed with @admd, I will provide a PR.

EDIT: PR was created: uyuni-project/uyuni-docs#2972

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants