[Pulp-list] Repo configured to use SHA checksums, but uploaded packages still get SHA256
Christina Plummer
cplummer at gmail.com
Mon Jun 16 21:32:17 UTC 2014
Hi Philipp,
My workaround was to modify the upload/package.py and explicitly force it
to use "sha" instead of "sha256". On my system, the file was
/usr/lib/python2.6/site-packages/pulp_rpm/extension/admin/upload/package.py
. See attached diff.
Be sure to set aside the package.pyc and package.pyo files as well, and
restart httpd. Then delete and re-upload the package to your repos.
Belated public thanks to Ryan Bowlby for the pointer on this one.
Christina
On Mon, Jun 16, 2014 at 10:19 AM, Philipp Gassmann <gassmann at puzzle.ch>
wrote:
> Hello Christina
>
> I just stumbled over the same issue. I uploaded the same noarch package
> to multiple repositories. now the installation of the package on CentOS
> 5 fails because of the wrong checksum.
>
> Did you find a solution or workaround?
> I can install the package if I download it manually and install it with
> yum --nogpgcheck.
>
> Regards,
> Philipp
>
>
> Am 11.03.2014 14:26, schrieb Christina Plummer:
> > Hi Barnaby,
> >
> > Thanks for your note. Unfortunately, --checksum-type doesn't seem to be
> > an option for the "pulp-admin rpm repo uploads rpm" command:
> >
> > CWC\cplummer1 at cbigdc-rhel6test ~ $ pulp-admin rpm repo uploads rpm
> > --repo-id=q1-ol5-x86_64 --file oracle-validated-1.0.0-34.el5.x86_64.rpm
> > --checksum-type sha
> > Command: rpm
> > Description: uploads one or more RPMs into a repository
> >
> > Available Arguments:
> >
> > --repo-id - (required) unique identifier; only alphanumeric, .,
> > -, and _
> > allowed
> > --file, -f - full path to a file to upload; may be specified
> multiple
> > times for multiple files
> > --dir, -d - full path to a directory containing files to upload;
> > may be
> > specified multiple times for multiple directories
> > -v - display extra information about the upload process
> > --skip-existing - if specified, RPMs that already exist on the server
> > will not
> > be uploaded
> > The following options were specified but do not exist on the command:
> > --checksum-type
> >
> > I am using the RPMs for 2.3.1-1. Shouldn't it default to the
> > checksum-type for the repository, if specified?
> >
> > Thanks,
> > Christina
> >
> >
> > On Mon, Mar 10, 2014 at 2:31 PM, Barnaby Court <bcourt at redhat.com
> > <mailto:bcourt at redhat.com>> wrote:
> >
> > Christina,
> >
> > The checksum on the RPM is set at upload time. Was "--checksum-type
> > SHA1" set on the "pulp-admin rpm repo uploads rpm" command? If no
> > checksum type is specified it defaults to SHA256.
> >
> > Regards,
> > Barnaby
> >
> > ----- Original Message -----
> > From: "Christina Plummer" <cplummer at gmail.com
> > <mailto:cplummer at gmail.com>>
> > To: pulp-list at redhat.com <mailto:pulp-list at redhat.com>
> > Sent: Monday, March 10, 2014 1:42:14 PM
> > Subject: [Pulp-list] Repo configured to use SHA checksums, but
> > uploaded packages still get SHA256
> >
> > On Pulp 2.1.3, I had run into issues with sha256 checksums being
> > created for some of the repo metadata files, even though the repo
> > was configured to use sha instead.
> >
> > On Pulp 2.3.1, this seems to have been fixed... however, I am now
> > seeing that packages manually uploaded into a repo are still getting
> > a sha256 checksum in the repodata, which means that RHEL5/OL5
> > clients can't handle them. Packages that were synced, or copied from
> > another repository, have the correct checksum type.
> >
> > OS: RHEL 6.5 x86_64
> > Pulp: 2.3.1-1 (RPMs from Pulp repo)
> > Steps to reproduce:
> > 1. Created "live" repo fed from Oracle public yum repositories,
> > checksum-type=sha, retain-old-count=1
> > 2. Created "q1" repo, checksum-type=sha
> > 3. Copied rpms from "live" to "q1
> > 4. Deleted "known-broken" versions of oracle-validated-1.1.0 package
> > 5. Uploaded "known-working" version of oracle-validated-1.0.0 package
> > 6. Published repo. Every package except for oracle-validated-1.0.0
> > has a 'sha' checksum; oracle-validated-1.0.0 alone has a 'sha256'
> > checksum.
> >
> > Is this a bug?
> >
> > Thanks,
> > Christina
> >
> > _______________________________________________
> > Pulp-list mailing list
> > Pulp-list at redhat.com <mailto:Pulp-list at redhat.com>
> > https://www.redhat.com/mailman/listinfo/pulp-list
> >
> >
> >
> >
> > _______________________________________________
> > Pulp-list mailing list
> > Pulp-list at redhat.com
> > https://www.redhat.com/mailman/listinfo/pulp-list
> >
>
>
> --
> Philipp Gassmann
>
> Puzzle ITC GmbH
> http://www.puzzle.ch
>
> Telefon +41 31 370 22 00
> Werfen Sie einen Blick in unseren Blog:
> http://www.puzzle.ch/blog
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/pulp-list/attachments/20140616/d39c8239/attachment.htm>
-------------- next part --------------
--- /usr/lib/python2.6/site-packages/pulp_rpm/extension/admin/upload/package.py.ORIG 2013-12-20 22:06:23.000000000 +0000
+++ /usr/lib/python2.6/site-packages/pulp_rpm/extension/admin/upload/package.py 2014-03-11 20:55:26.778572398 +0000
@@ -67,7 +67,8 @@
bundles_to_upload = []
for bundle in file_bundles:
- checksum = _calculate_checksum('sha256', bundle.filename)
+ #checksum = _calculate_checksum('sha256', bundle.filename)
+ checksum = _calculate_checksum('sha', bundle.filename)
filters = {
'name' : bundle.unit_key['name'],
@@ -75,7 +76,8 @@
'release' : bundle.unit_key['release'],
'epoch' : bundle.unit_key['epoch'],
'arch' : bundle.unit_key['arch'],
- 'checksumtype' : 'sha256',
+ #'checksumtype' : 'sha256',
+ 'checksumtype' : 'sha',
'checksum' : checksum,
}
@@ -140,7 +142,8 @@
# -- Unit Key -----------------------
# Checksum
- unit_key['checksumtype'] = 'sha256' # hardcoded to this in v1 so leaving this way for now
+ #unit_key['checksumtype'] = 'sha256' # hardcoded to this in v1 so leaving this way for now
+ unit_key['checksumtype'] = 'sha' # hardcoded to this in v1 so leaving this way for now
unit_key['checksum'] = _calculate_checksum(unit_key['checksumtype'], rpm_filename)
# Name, Version, Release, Epoch
More information about the Pulp-list
mailing list