Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1158155 - Proxy server does not support Ubuntu/Debian packages
Summary: Proxy server does not support Ubuntu/Debian packages
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Spacewalk
Classification: Community
Component: Proxy Server
Version: 2.2
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Michael Mráka
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Depends On:
Blocks: space23
TreeView+ depends on / blocked
 
Reported: 2014-10-28 18:20 UTC by David Holland
Modified: 2015-04-14 19:03 UTC (History)
1 user (show)

Fixed In Version: spacewalk-proxy-2.3.3-1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-04-14 19:03:23 UTC
Embargoed:


Attachments (Terms of Use)
Trivial Debian Support (1.65 KB, patch)
2014-10-30 14:45 UTC, David Holland
no flags Details | Diff

Description David Holland 2014-10-28 18:20:03 UTC
Description of problem:
Configuring a Debian system to talk to Spacewalk via proxy server fails to download packages. 

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


How reproducible:
Configure Ubuntu client to talk to RHN via proxy server. 


Steps to Reproduce:
1.  Install Spacewalk
2.  Install Spacewalk Proxy
3.  Configure Ubuntu client to talk via Spacewalk Proxy.
3a.  Use the following packages for your Ubuntu clients:   https://launchpad.net/~mj-casalogic/+archive/ubuntu/spacewalk-ubuntu

Actual results:
root@repo-agent04:/usr/lib/apt/methods# apt-get install bash
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Suggested packages:
  bash-doc
The following packages will be upgraded:
  bash
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 641 kB of archives.
After this operation, 8,192 B disk space will be freed.
WARNING: The following packages cannot be authenticated!
  bash
Install these packages without verification [y/N]? y
Err spacewalk://<deleted>/ channels:/channel_default_ubuntu1204lts_x8664_security bash amd64 4.2-2ubuntu2.3
  404  Not Found
Failed to fetch spacewalk://<deleted>/XMLRPC/GET-REQ/channel_default_ubuntu1204lts_x8664_security/getPackage/bash-4.2-2ubuntu2.3.amd64-deb.deb  404  Not Found
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?


Expected results:
Package installation to succeed. 
Installation will succeed if the client is pointed directly at the Spacewalk server.


Additional info:

Turning on debugging in the broker log shows: 

2014/10/28 13:49:57 -04:00 3134 1.2.3.4: broker/rhnBroker.__callLocalRepository('GET-REQ', 'channel_default_ubuntu1204lts_x8664_security', 'getPackage', ['bash-4.2-2ubuntu2.3.amd64-deb.deb'])
2014/10/28 13:49:57 -04:00 3134 1.2.3.4: broker/rhnRepository.__init__('channel_default_ubuntu1204lts_x8664_security',)
2014/10/28 13:49:57 -04:00 3134 1.2.3.4: common/rhnRepository.__init__('channel_default_ubuntu1204lts_x8664_security',)
2014/10/28 13:49:57 -04:00 3134 1.2.3.4: broker/rhnBroker.__callLocalRepository("Calling getPackage(['bash-4.2-2ubuntu2.3.amd64-deb.deb'])",)
2014/10/28 13:49:57 -04:00 3134 1.2.3.4: common/rhnRepository.getPackage('bash-4.2-2ubuntu2.3.amd64-deb.deb',)
2014/10/28 13:49:57 -04:00 3134 1.2.3.4: broker/rhnRepository.getPackagePath('bash-4.2-2ubuntu2.3.amd64-deb.deb',)
2014/10/28 13:49:57 -04:00 3134 1.2.3.4: broker/rhnRepository._cacheObj('package_mapping:channel_default_ubuntu1204lts_x8664_security:', '20141021111613', ())
2014/10/28 13:49:57 -04:00 3134 1.2.3.4: broker/rhnRepository._getPkgListDir('/var/spool/rhn-proxy/list',)
2014/10/28 13:49:57 -04:00 3134 1.2.3.4: broker/rhnRepository.getPackagePath('ERROR', 'Package not in mapping: bash-4.2-2ubuntu2.3.amd64-deb.deb')
2014/10/28 13:49:57 -04:00 3134 1.2.3.4: proxy/apacheHandler.response('Response type', <class 'spacewalk.common.rhnException.rhnFault'>)
2014/10/28 13:49:57 -04:00 3134 1.2.3.4: common/rhnApache.logHandler
2014/10/28 13:49:57 -04:00 3134 1.2.3.4: proxy/apacheHandler.cleanupHandler
2014/10/28 13:49:57 -04:00 3134 1.2.3.4: common/rhnApache.cleanupHandler
2014/10/28 13:49:57 -04:00 3134 1.2.3.4: common/rhnApache.timer('Request served in 0.03 sec',)

Examining the package cache file: /var/spool/rhn-proxy/list/package_mapping:channel_default_ubuntu1204lts_x8664_security:-20141021111613  (via strings) 

[root@spacewalk-proxy01 list]# strings *ubuntu*
(U!bash-4.2-2ubuntu2.3.amd64-deb.rpmq
(Uhrhn/6ec/bash/4.2-2ubuntu2.3/amd64-deb/6ecda87f241b2aa325a7a6db6925af01/bash-4.2-2ubuntu2.3.amd64-deb.rpmq
UCrhn/bash/4.2-2ubuntu2.3/amd64-deb/bash-4.2-2ubuntu2.3.amd64-deb.rpmq
eU*bash-builtins-4.2-2ubuntu2.3.amd64-deb.rpmq
(Uzrhn/b2f/bash-builtins/4.2-2ubuntu2.3/amd64-deb/b2f6077dc75cf8f33fdf9353a2050a5e/bash-builtins-4.2-2ubuntu2.3.amd64-deb.rpmq
UUrhn/bash-builtins/4.2-2ubuntu2.3/amd64-deb/bash-builtins-4.2-2ubuntu2.3.amd64-deb.rpmq	eU(bash-static-4.2-2ubuntu2.3.amd64-deb.rpmq
(Uvrhn/fda/bash-static/4.2-2ubuntu2.3/amd64-deb/fda214b733937ad03285f6c780f5a0d7/bash-static-4.2-2ubuntu2.3.amd64-deb.rpmq
UQrhn/bash-static/4.2-2ubuntu2.3/amd64-deb/bash-static-4.2-2ubuntu2.3.amd64-deb.rpmq
eU!bash-4.2-2ubuntu2.1.amd64-deb.rpmq
(Uhrhn/e5d/bash/4.2-2ubuntu2.1/amd64-deb/e5d12ea045b762e6c62824acacc70e93/bash-4.2-2ubuntu2.1.amd64-deb.rpmq
UCrhn/bash/4.2-2ubuntu2.1/amd64-deb/bash-4.2-2ubuntu2.1.amd64-deb.rpmq

(Note all the "-deb.rpm" named files.) 

Further examination of the rhnRepository.py source code:   https://github.com/spacewalkproject/spacewalk/blob/master/proxy/proxy/broker/rhnRepository.py

Shows such code as:   (Line 234) 

            extension = "rpm"
            if isSolarisArch(arch):
                extension = "pkg"

There are other examples. 

So, if its not a Solaris package, it has to be a RPM?     

I know Ubuntu is the OS of choice for lemonade stand vendors, but unfortunately due to reasons beyond my control, we're stuck with it, and would prefer a centrally managed Spacewalk infrastructure using proxies, instead of standalone servers.

Comment 1 David Holland 2014-10-30 14:45:39 UTC
Created attachment 952174 [details]
Trivial Debian Support

Against the 2.2 branch.

Comment 2 David Holland 2014-10-30 14:49:19 UTC
Attached a trivial patch to the rhnRepository.py proxy code.   It works for the cases I could think to try..

I don't know what kind of a package might show up as a list type, so I had to ignore that case....   "Works for me"

Comment 3 Michael Mráka 2014-11-04 09:35:35 UTC
Patch committed to spacewalk master as
commit 4b80f0a3874d345207771e7b069922c5fe8eb51e
    1158155 - fixed renaming of deb packages

Comment 4 Grant Gainey 2015-03-23 16:59:12 UTC
Moving bugs to ON_QA as we move to release Spacewalk 2.3

Comment 5 Grant Gainey 2015-04-14 19:03:23 UTC
Spacewalk 2.3 has been released. See

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


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