Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1042208

Summary: rpm metadata ignores --checksum-type from repository
Product: [Retired] Pulp Reporter: Alex Chvatal <achvatal>
Component: rpm-supportAssignee: Barnaby Court <bcourt>
Status: CLOSED DUPLICATE QA Contact: pulp-qe-list
Severity: medium Docs Contact:
Priority: high    
Version: 2.3CC: skarmark, tbielawa
Target Milestone: ---Keywords: Triaged
Target Release: 2.4.0   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-12-18 18:54:16 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Alex Chvatal 2013-12-12 21:22:24 UTC
Description of problem:

rpm repos created with `--checksum-type sha` still use sha256 checksums for rpm metadata.


Version-Release number of selected component (if applicable):

2.3.0

How reproducible:

every time

Steps to Reproduce:
1. pulp-admin rpm repo create --repo-id achvtest-dev --serve-http true --serve-https true --relative-url /dev/achvtest/ --checksum-type sha --display-name achvtest
2. pulp-admin rpm repo uploads rpm --repo-id achvtest-dev -f ~/code/juicer/share/juicer/empty-0.0.1-1.fc17.x86_64.rpm
3. pulp-admin rpm repo publish run --repo-id achvtest-dev

Actual results:

yum metadata contains sha256 checksums. eg:

<checksum type="sha256" pkgid="YES">ee095b5f7c7fe451a5e8493def923ae656f06beec08dc3e838352dd7d0f58e86</checksum>

Expected results:

yum metadata that contains checksum types that match what was provided with step 1 (above)

Additional info:

Comment 1 Tim Bielawa 2013-12-16 17:52:17 UTC
I can confirm this behavior as well using Alexs documented steps above. I've tested this back to Pulp 2.1 and 2.2.

This is especially frustrating when supporting RHEL 5 boxes.

One "work-around" I discovered is to create a repository somewhere else (for example: using 'createrepo -s sha /path/to/test-repo/') and then:

1. Create a new repo (rpm repo create) giving the location of your SHA checksum type repo to the --feed option
2. Publish the new repo (rpm repo publish)
3. Sync the new repo (rpm repo sync)

In this work-around I have been able to successfully "create" yum repositories with the SHA checksum type.

Comment 2 Tim Bielawa 2013-12-16 21:08:48 UTC
I think this can be closed now, thanks to Barnaby on the mailing lists!

https://www.redhat.com/archives/pulp-list/2013-December/msg00051.html

Comment 3 Alex Chvatal 2013-12-16 21:23:56 UTC
I should note that while repomd.xml will contain the correct (sha) checksum type, primary.xml.gz will not.

Comment 4 Barnaby Court 2013-12-18 18:54:16 UTC
As per https://www.redhat.com/archives/pulp-list/2013-December/msg00051.html, this has been fixed in the 2.3

*** This bug has been marked as a duplicate of bug 1029057 ***

Comment 5 Alex Chvatal 2013-12-18 19:05:17 UTC
(In reply to Barnaby Court from comment #4)
> As per
> https://www.redhat.com/archives/pulp-list/2013-December/msg00051.html, this
> has been fixed in the 2.3
> 
> *** This bug has been marked as a duplicate of bug 1029057 ***

In that email, Tim had verified that repomd.xml contains the correct checksum type, but as I pointed out in https://bugzilla.redhat.com/show_bug.cgi?id=1042208#c3 , primary.xml.gz still uses the incorrect checksum type.

I was testing this with pulp-2.3.0-1.fc19, so apologies if this has been fixed in a version that hasn't yet been pushed out through the fedora repo (baseurl=http://repos.fedorapeople.org/repos/pulp/pulp/stable/2/fedora-$releasever/$basearch/)