Score:0

yum unable to find a specific package in private repo

jp flag

I have a really weird problem. I've setup my private yum repo, it is serving the rpm just fine, EXCEPT one rpm.

Let's say I've build and copied over all of my rpms to my custom repo directory, something along the line:

postgresql-myStuff11-11.7-2.el8.x86_64.rpm
postgresql-myStuff11-libs-11.7-2.el8.x86_64.rpm
postgresql-myStuff11-devel.7-2.el8.x86_64.rpm
postgresql-myStuff11-docs-11.7-2.el8.x86_64.rpm
...

All of them are there, I've clear my yum cache, rebuilt my yum repo using createrepo --update or even deleting the whole repodata folder and recreate it etc. But no matter what I do, it will not find my main package, when I run yum search myStuff (or myStuff11 etc).

It would only return EVERYTHING ELSE, except the main package.

Searching Packages:
==========================================================================================
Name Matched: myStuff11
==========================================================================================
postgresql-myStuff11-libs.x86_64 : The shared libraries required for any PostgreSQL clients
Repo        : @System
Matched from:
Provide    : postgresql-myStuff11-libs = 11.7-2.el8
...

At first, I thought maybe it was due to the Name: inside my spec file was using a defined variable, but even after I changed it to a string, it remained the exact same thing...

Question:

  • How do you make yum to see the package postgresql-myStuff11-11.7-2.el8.x86_64.rpm?
djdomi avatar
za flag
Questions seeking installation, configuration or diagnostic help must include the desired end state, the specific problem or error, sufficient information about the configuration and environment to reproduce it, and attempted solutions. Questions without a clear problem statement are not useful to other readers and are unlikely to get good answers.
codenamezero avatar
jp flag
@djdomi Better...?
djdomi avatar
za flag
not yet at all, please read carefully the text i provided.
codenamezero avatar
jp flag
@djdomi I built a rpm package, put it in my yum repository, despite I clean and recreate all the cache and everything, but `yum` not seeing it. I want it to see the rpm that's in the yum repo. If you have better wording to my question, please feel free to edit it.
Nikita Kipriyanov avatar
za flag
verify your repo index contains your new package after you updated it with createrepo. That index in just a text file, try grepping it.
codenamezero avatar
jp flag
@NikitaKipriyanov yeah that's the thing, the index file never contained my package, and that was from a fresh run of `createrpo`. See my answer, I had to run `createrepo` with the `-d` option.
Nikita Kipriyanov avatar
za flag
sure, also notice that I gave that comment a day before you posted your answer ;)
Score:0
jp flag

For whatever reason, I had to createrepo using the database (-d) flag. Here is what I did to be able to get it to work/show my packages.

  1. Go to your YUM repo folder, ex: cd /opt/myrepo
  2. rm -rf repodata, to wipe it clean
  3. Recreate the repo but with database, createrepo -v -d ., (where . is /opt/myrepo)

Then on your remote machine, you could run yum update --refresh to pick up the new changes.

Without the -d flag, it was not able to list/display all of the packages I built, I have no idea why. The environment was in a RHEL 8 system, so this might (or might not) be a bug specific to createrepo.

createrepo --version
Version: 0.17.7 (Features: DeltaRPM LegacyWeakdeps )
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.