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

Add support for PhotonOS #96

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

smortex
Copy link

@smortex smortex commented Nov 23, 2022

Photon OS is a RedHat derivative by VMWare targeting cloud environments.

This is currently WIP while I am working on this for a customer, but I open the PR now in order to gather feedback early.

tdnf(1) formats outdated packages lines in an unexpected way where a
line like

```
sudo.x86_64                                  1.9.5-2.ph4          photon-updates
```

has this representation:

```
20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
20 20 70 68 6f 74 6f 6e  2d 75 70 64 61 74 65 73  |  photon-updates|
0d 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |.               |
20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
20 20 20 20 20 20 20 20  20 20 20 20 20 20 31 2e  |              1.|
39 2e 35 2d 32 2e 70 68  34 0d 73 75 64 6f 2e 78  |9.5-2.ph4.sudo.x|
38 36 5f 36 34 0a                                 |86_64.|
```

while the code expect this:

```
73 75 64 6f 2e 78 38 36  5f 36 34 20 20 20 20 20  |sudo.x86_64     |
20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
20 20 20 20 20 20 20 20  20 20 20 20 20 31 2e 39  |             1.9|
2e 35 2d 32 2e 70 68 34  20 20 20 20 20 20 20 20  |.5-2.ph4        |
20 20 70 68 6f 74 6f 6e  2d 75 70 64 61 74 65 73  |  photon-updates|
0a                                                |.|
```

that is:

```
                                                                  photon-updates<CR>
                                             1.9.5-2.ph4<CR>
sudo.x86_64<LF>
```

Add an awk script that fix the output when it contains carriage returns.
@smortex smortex marked this pull request as ready for review November 29, 2022 22:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant