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

Uploading rpm packages #5777

Open
MikhailShapovalov26 opened this issue Sep 9, 2024 · 2 comments
Open

Uploading rpm packages #5777

MikhailShapovalov26 opened this issue Sep 9, 2024 · 2 comments

Comments

@MikhailShapovalov26
Copy link

Good afternoon.
I would like to ask you for help, I can't figure out how to work with downloading rpm packages. I'm trying to do it this way,

set -ex
while read RPM_NAME; do
        echo upload ${RPM_NAME}
        SHA256=`pulp artifact upload --file ${RPM_NAME} | jq -r .sha256`
        PULP_HREF=`pulp rpm content create --sha256 ${SHA256} --relative-path ${RPM_NAME} | jq -r .pulp_href`
        echo ${PULP_HREF}
        pulp rpm repository content add --repository dev --package-href ${PULP_HREF}
        PUBLICATION=`pulp rpm publication create --repository dev  | jq -r .pulp_href`
        pulp rpm distribution update --publication "${PUBLICATION}" --base-path dev --name dev
       done < <(find ./ -type f -name "*.rpm")

But in the end I get that the package has been sent and is there

 pulp rpm repository show --name dev | jq '.latest_version_href'
"/pulp/api/v3/repositories/rpm/rpm/0191d628-ecb4-74b6-bc4a-fdae38fddc49/versions/1/"
pulp rpm repository content list --repository dev | jq '.[].location_href'
Not all 1 entries were shown.
"./zebra-0.1-2.noarch.rpm"
, but I don't see it in the web interface.

[../](...../pulp/content/dev/)
[./](....../pulp/content/dev/Packages/)                                                                                                  09-Sep-2024 09:41  3.1 kB

What I'm doing wrong, I tried to do according to the documentation, but unfortunately it didn't bring any result. Thank you and I'm sorry for this question.
I also tried as indicated here https://githubissues.com/pulp/pulp-cli/994, but I did not see my package in the web interface

@gerrod3
Copy link
Contributor

gerrod3 commented Sep 16, 2024

Do you already have a rpm distribution named dev? Try pulp rpm distribution list and see what shows up.

If you always want to distribute the latest publication of your dev repo, then I would update the distribution like this:

pulp rpm distribution update --name dev --repository dev  # Have the distro auto-distribute the latest publication 

Then you won't have to update this distribution anymore after uploads. Pulp will automatically serve the latest content from this path.
Also, if you have pulp-cli 0.27 you can simplify the whole upload into this one command:

pulp rpm content upload --directory ./ --repository dev --use-temp-repository --publish

@MikhailShapovalov26
Copy link
Author

Thank you for your answer, I will definitely try, but a little later. @gerrod3

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

No branches or pull requests

2 participants