#1664 only noarch when bare mergerepo_c and armhfp arch
Closed: Dropped 4 years ago by tkopecek. Opened 4 years ago by slords.

When trying to do a bare mergerepo_c with arch set to armhfp all the binary rpms are rejected because mergerepo_c doesn't expand the arch to include armv7hl and armv7hnl. The expansion only happens if the koji flag is passed in.


Do you mean, that we need to pass expanded archlist to mergerepo_c?

Metadata Update from @tkopecek:
- Custom field Size adjusted to None

4 years ago

I'm not sure what the best way to handle this is. The hack I did to get things running in my situation was to do as you suggested and pass expanded archlist to mergerepo_c.

Koji could expand and pass the archlist to mergerepo_c in the case of a bare repo, or mergerepo_c could be enhanced. Right now we get the right expansion if we pass --koji and blocklist. It could be enhanced to not expect a blocklist if we pass --all and --pkgorigins. Or it could be enhanced to expand the archlist if --koji or --pkgorigins is passed.

I'll let those that have more knowledge then I debate the correct thing to do. For the moment I have a working system with the hacking I've done.

I'm seeing the same thing with x86_64/i686, koji 1.19.1, and createrepo_c 0.14.1. Our RHEL external repo contains both the x86_64 and i686 versions of glibc-2.17-292.el7, but the koji repos only contain the x86_64 version. This is breaking the installation of some compiler RPMs that depend on both architectures. @slords, would you be willing to share your patch?

If you look at the code for mergerepo_c you will see a section of code where archs get expanded:

https://github.com/rpm-software-management/createrepo_c/blob/master/src/mergerepo_c.c#L147

However, this function only gets called if --koji is passed in as a parameter.

https://github.com/rpm-software-management/createrepo_c/blob/master/src/mergerepo_c.c#L260

When doing a bare repo to include all packages --koji isn't passed and therefore the arch list doesn't get expanded and you don't get all the sub-archs included in the repo:

https://pagure.io/koji/blob/master/f/builder/kojid#_5339

This behavior needs to be fixed in one place or the other as right now bare repos aren't usable when there are multiple archs that need to be included.

The hack I did was to modify kojid around line 5350 and change the line that appends the arch to the following:

cmd.extend(['-a', arch + (arch == 'armhfp' and ',armv7hl,armv7hnl' or ''), '-o', self.outdir])

It is ugly and only works for my case but does temporarly solve the issue for me.

Metadata Update from @tkopecek:
- Issue set to the milestone: 1.21

4 years ago

Thank you. Looking a little deeper into it, it looks like my issue is a subset of yours. We're both having problems with the lack of architecture expansion in mergerepo_c, but mine is multilib-related while yours is simple subarch expansion, and additionally it looks to me like Koji's own arch code is lacking the entries to support expanding armhfp. I created #1865 to document the multilib case, although the admins should feel free to close it as a dupe of this one if they prefer.

Metadata Update from @tkopecek:
- Issue set to the milestone: None (was: 1.21)

4 years ago

Will be fixed in mergerepo_c, closing here.

Metadata Update from @tkopecek:
- Issue close_status updated to: Dropped
- Issue status updated to: Closed (was: Open)

4 years ago

Login to comment on this ticket.

Metadata