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

Parsing primary.xml error: Start tag expected, '<' not found #383

Open
asarubbo opened this issue Sep 8, 2023 · 4 comments
Open

Parsing primary.xml error: Start tag expected, '<' not found #383

asarubbo opened this issue Sep 8, 2023 · 4 comments
Labels
Triaged Someone on the DNF team has read the issue and determined the next steps to take

Comments

@asarubbo
Copy link

asarubbo commented Sep 8, 2023

Not really a bug report, but just a suggestion based on what happened.

I switched from 0.21.1 to 1.0.0

When I launched createrepo_c I got a failure because the program was not compiled with zstd support. At this point I imagine that zstd must be mandatory instead of optional or at least it should not be the default algo when the program is not compiled with zstd support.

Anyway I built it with zstd support and everything was fine, except the fact that I got an error while doing yum makecache from an up-to-date CentOS 7, the error was:

Parsing primary.xml error: Start tag expected, '<' not found

So what I did:

  • a backup of my yum archive
  • downgraded createrepo_c to 0.21.1
  • run again createrepo_c
  • made a diff between the backup of my yum archive and the freshly generate archive

Then I discovered that I did not have anymore primary.xml.gz, instead there was primary.xml.zst.
So on my side I fixed it by adding --general-compress-type=gz --compress-type=gz but since CentOS 7 is still widely used and it seems to lack support for repo compressed in zst I'd suggest to move the default to gz

@dralley
Copy link
Contributor

dralley commented Sep 11, 2023

If you look at the description in https://fedoraproject.org/wiki/Changes/createrepo_c_1.0.0#Detailed_Description, it lays out some of the rationale - notably that this isn't the only compatibility glitch with EL7 introduced in 1.0.

The other major one is

When adding groups.xml to repodata createrepo_c currently adds two variants to repomd.xml. The specified file as is, uncompressed, with the type "group" and also a compressed variant with type "group_XX", where XX is compression suffix. This is atypical and unexpected. We propose to include just one variant of groups.xml using specified compression and repomd.xml type "group". This is not compatible with yum in RHEL 7. If required users will still be able to create repositories with the old layout using modifyrepo_c.

Further information: https://bugzilla.redhat.com/show_bug.cgi?id=2056318

The version of createrepo_c shipped with CentOS Stream 8 or 9 will always be compatible by default and only Fedora Rawhide currently would have this package. Do you need to use the latest version for some reason? Are you building it yourself?

@inknos inknos removed their assignment Sep 25, 2023
@inknos inknos added the Triaged Someone on the DNF team has read the issue and determined the next steps to take label Sep 25, 2023
@kontura
Copy link
Contributor

kontura commented Oct 19, 2023

We are also considering adding some kind of a compatibility option to generate metadata compatible with older releases even with new createrepo_c.
For example: --compat=rhel7

@dralley
Copy link
Contributor

dralley commented Oct 19, 2023

There's already a --compatibility mode, is it not possible to overload that? Or add modes to it, such that --compatibility behaves the same, but --compatibility=rhel7 includes these behaviors?

@dralley
Copy link
Contributor

dralley commented May 10, 2024

--compatibility was overloaded with some additional helpful behavior, can this be closed now?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Triaged Someone on the DNF team has read the issue and determined the next steps to take
Projects
None yet
Development

No branches or pull requests

4 participants