Bug 770610 - Spacewalk 1.6 breaks Solaris package support
Summary: Spacewalk 1.6 breaks Solaris package support
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Spacewalk
Classification: Community
Component: Server
Version: 1.6
Hardware: All
OS: Solaris
unspecified
high
Target Milestone: ---
Assignee: Michael Mráka
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Depends On:
Blocks: space17
TreeView+ depends on / blocked
 
Reported: 2011-12-28 01:14 UTC by Roy Keene
Modified: 2012-03-07 09:55 UTC (History)
1 user (show)

Fixed In Version: spacewalk-backend-1.7.13-1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-03-07 09:55:15 UTC
Embargoed:


Attachments (Terms of Use)

Description Roy Keene 2011-12-28 01:14:17 UTC
Description of problem:
Solaris packages uploaded to Spacewalk 1.6 cannot be installed.  Packages uploaded prior to upgrading to Spacewalk 1.6 can still be installed.


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


How reproducible:
Every time.


Steps to Reproduce:
1. Convert a Solaris package to an MPM file using "solaris2mpm"
2. Upload the package using "rhnpush"
3. Attempt to install the package using "up2date" or "smart"
  
Actual results:
The file downloaded is not a Solaris package it's an MPM file, which cannot be installed.  The error is:

# /opt/redhat/rhn/solaris/usr/bin/smart install xvfb
Loading cache...
Updating cache...

Computing transaction...

Installed packages (1):
  xvfb-1.2-2771_PSTAMP_2011.12.27.15.45

Confirm changes? (Y/n): y

Fetching packages...
-> rhn://org-solaris-sparc-10u6/xvfb/1.2/2771_PSTAMP_2011.12.27.15.45/sparc-solaris/xvfb-1.2-2771_PSTAMP_2011.12.27.15.45.sparc-solaris.pkg
xvfb-1.2-2771_PSTAMP_2011.12.27.15.45.sparc-solaris.pkg


Committing transaction...
pkgadd -a /opt/redhat/rhn/solaris/var/lib/smart/adminfile -G  -n -d /opt/redhat/rhn/solaris/var/lib/smart/packages/xvfb-1.2-2771_PSTAMP_2011.12.27.15.45.sparc-solaris.pkg xvfb
Installing xvfb

warning: Got status 25344 installing xvfb-1.2-2771_PSTAMP_2011.12.27.15.45:
warning: pkgadd: ERROR: attempt to process datastream failed
warning:     - bad format in datastream table-of-contents
warning: pkgadd: ERROR: could not process datastream from </opt/redhat/rhn/solaris/var/lib/smart/packages/xvfb-1.2-2771_PSTAMP_2011.12.27.15.45.sparc-solaris.pkg>

Saving cache...


Expected results:
The package would be installed successfully.

Additional info:
It looks like something on the server is failing to convert the MPM file to a SVR4 package when it is requested for downloads

Comment 1 Michael Mráka 2012-02-03 10:32:40 UTC
This issue should be fixed in spacewalk master by package code rewrite:

commit 31e01e204aa9bbe13b0cce78cc80affe584fe75d
    simplified checksum_exists condition
commit a10b358478ac635ea2b837093235b7f72391f524
    merged duplicated h.execute() call
commit 1bd9bd534e087b848da90a13f616fe274418cfaa
    version and release should be strings, epoch should be None or string
commit 90a0fda79fd98ae3277d7036800438fb243263cb
    modified RPM/MPM/DEB package for payload_checksum
commit c5818703826db1220403c9a5473729cabb44bb32
    generic code to compute checksum of package
commit d7bf414c6810d1ca5fb101932f303297095cd6e5
    spacewalk-repo-sync updated to use new package object
commit d0f9cf64f2122d70cd29003b00b02f32d717ab33
    created DEB_Package
commit f375719cb3665de57df1b363bcf96532f160ed97
    removed od CVS style id tag
commit 4f1c5716c4806ed808cee2f811e67b2c7e6cdeb1
    fixed push_package() to use A_Package
commit bc3931ca16913edbc4e58b64a1a3f7052e8702ec
    rewritten get_package_header() with A_Package()
commit 8d65a541b9967a3aba1c4cdd741224fae62dbdcf
    removed unused write_temp_file()
commit 4b7d7a5757195f4f102458489462110db63f5531
    implemented MPM_Package.save_payload()
commit 3174afc23727797c0a35414fe5ac7e246a94c4e1
    removed tempfile usage from MPM_Package.write()
commit 9562335d2d4e876e245f5e94f1c487658b112263
    replaced stream_copy() with _stream_copy() from super class
commit aba73d53a7eedec0ff6b3e2dd3fe21e3e6fab97e
    implemented read_header() for MPM_Package
commit 7c2b705e9d4aed97cfe649ba1aa475841d891e15
    moved _read_bytes() to A_Package
commit 5baa958b65468ed7ee51dacf8ff2b265d98e80b5
    removed commented out code
commit 21848efdeaa7f534bcb80015dcd3c134439b8c48
    moved InvalidPackageError to rhn_pkg
commit dd8af107343ccfbcfd0d037b4a0695aa08e507dd
    created RPM_Package
commit 6f31a35f552a90ed1cd3954fc8ca408187d66d51
    create proper package object
commit 9cee53a98124ec6444e25134b4f4c90829000749
    added header_start, header_end
commit 98071ac628f324cc4d5e635de28e1c2552cbe9b4
    remember payload_size
commit 0662c9d9f4d0e53b94fcd4cedb28b1e863fe119f
    compute checksum while saving payload
commit 2bb06c25da7d7bec7738ebd884d4d86d81c6ecf5
    rewritten package_push handler to use package object
commit b9233168fab79474f14d8635d125a2939025f97e
    created virtual class for RPM/MPM/DEB packages

Comment 2 Jan Pazdziora 2012-03-07 09:55:15 UTC
Spacewalk 1.7 has been released:

https://fedorahosted.org/spacewalk/wiki/ReleaseNotes17


Note You need to log in before you can comment on or make changes to this bug.