Project

General

Profile

Actions

Bug #37864

closed

Upload deb package through hammer results in an invalid package being included when it's uploaded for the first time

Added by Macley kun about 2 months ago. Updated 5 days ago.

Status:
Closed
Priority:
Low
Assignee:
-
Category:
-
Target version:
-
Difficulty:
Triaged:
Yes
Fixed in Releases:
Found in Releases:

Description

See: https://community.theforeman.org/t/upload-deb-package-through-hammer-results-in-empty-invalid-packages-in-repo/39628
Summary: When uploading a deb package using hammer, the first time the package is uploaded it will result in a successful upload but the repo contains an empty line. When refreshing from a debian host an error is generated that no package was found.
When uploading the same package again it will be shown as another line with the right name and version and does indeed work fine.
Subsequent uploads don't add extra packages which is expected and prefered behavior.

Quick way to test this bug out:
#!/bin/bash
curl --fail-with-body --output /tmp/vim_9.1.0496-1ubuntu5_amd64.deb "http://archive.ubuntu.com/ubuntu/pool/main/v/vim/vim_9.1.0496-1ubuntu5_amd64.deb"
hammer repository upload-content --path /tmp/vim_9.1.0496-1ubuntu5_amd64.deb --organization ORGNAME --product "product name" --name "Repo name"
read -p "Upload successful, please check the repo currently before doing the next upload"
hammer repository upload-content --path /tmp/vim_9.1.0496-1ubuntu5_amd64.deb --organization ORGNAME --product "product name" --name "Repo name"
read -p "Check the repo again, now there's a second entry which has the correct details and works"
rm /tmp/vim_9.1.0496-1ubuntu5_amd64.deb

I've chosen to put this on prioty low as uploading it a second time does push the package through. While this sadly generates a warning on the host that can reach the repository, it doesn't change the return code of the subscription-manager/apt.


Files

08d0c2da7085ca41c9f1c7fb42da04c7aae18c92.png View 08d0c2da7085ca41c9f1c7fb42da04c7aae18c92.png 27.8 KB Uploaded Debs UI Macley kun, 09/30/2024 12:21 PM
7168a0b9c83b388c2062a06bd1b1d66e38fa6090.png View 7168a0b9c83b388c2062a06bd1b1d66e38fa6090.png 47 KB Removing invalid debs job stuck Macley kun, 09/30/2024 12:21 PM

Related issues 1 (0 open1 closed)

Related to Katello - Bug #38035: Upload deb package through hammer may not add it publicationClosedActions
Actions #1

Updated by Evgeni Golov about 2 months ago

  • Fixed in Releases deleted (3.11.3)
Actions #2

Updated by Macley kun about 1 month ago

Refering to this post aswell: https://community.theforeman.org/t/making-my-own-deb-package-resulsts-in-default-inrelease-doesnt-support-architecture-amd64/39835/6

It seems that packages that are uploaded through the API, can't be fetched from the hosts that want to query/install from the published repository.

A way to verify this behavior is by doing the following:

Create two custom repositories in foreman.
In one, upload a deb package through the UI.
in the other, upload the same deb package through the API.

After the CV is published, subscription-manager refresh and apt update on a ubuntu host.
The repository where a package was uploaded through the API returns:
N: Skipping acquire of configured file ‘all/binary-amd64/Packages’ as repository ‘katello://server.foreman.lan/pulp/deb/acme/Production/CV_UBUNTU_22-04/custom/Ubuntu_22-04/Today_I_Patched_Package default InRelease’ doesn’t support architecture ‘amd64’

When checking the packages list in: /var/lib/apt/lists
and catting the repositories named files, shows that only the UI variant has the package in it.

Actions #3

Updated by Evgeni Golov 6 days ago

  • Project changed from Foreman to Katello
Actions #4

Updated by The Foreman Bot 6 days ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/Katello/katello/pull/11221 added
Actions #5

Updated by The Foreman Bot 5 days ago

  • Fixed in Releases Katello 4.16.0 added
Actions #6

Updated by Markus Bucher 5 days ago

  • Status changed from Ready For Testing to Closed
Actions #7

Updated by Markus Bucher 3 days ago

  • Related to Bug #38035: Upload deb package through hammer may not add it publication added
Actions

Also available in: Atom PDF