Bug 1658772

Summary: Dependencies within Packages.gz wrong within Spacewalk (and also Uyuni) (wrong string)
Product: [Community] Spacewalk Reporter: Robert Paschedag <robert.paschedag>
Component: ServerAssignee: Tomáš Kašpárek <tkasparek>
Status: CLOSED EOL QA Contact: Red Hat Satellite QA List <satqe-list>
Severity: high Docs Contact:
Priority: unspecified    
Version: 2.7CC: ngompa13
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-03-06 15:05:57 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 Robert Paschedag 2018-12-12 20:25:53 UTC
Description of problem:

It looks like the Packages.gz file is not correctly generated. It seems to have problems when there are multiple "Depends:" for several packages, each with different version strings


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

2.7 (on CentOS 6)

How reproducible:

Always

Steps to Reproduce:
1. Create a debian package on a debian system using the "debbuild" tools from https://github.com/ascherer/debbuild/releases

For example to create the debian "rhnlib" or "rhn-client-tool" packages. The sources are within Spacewalk (within ./client/rhel/rhn-client-tools) and followed the guide within ./client/debian/DEBIAN-HOWTO

2. Build the "rhn-client-tool" packages which result (one of them) in
"python2-rhn-client-tools_2.9.33-1debian9_all.deb"

3. Look into the "dependencies" with "dpkg-deb -I python2-rhn-client-tools_2.9.33-1debian9_all.deb" which results in

root@00000:~/debbuild/DEBS/all# dpkg-deb -I python2-rhn-client-tools_2.9.33-1debian9_all.deb 
 neues Debian-Paket, Version 2.0.
 Size 40562 Byte: control-Archiv= 561 Byte.
     569 Byte,    11 Zeilen      control              
      61 Byte,     2 Zeilen   *  postinst             #!/bin/bash
      51 Byte,     2 Zeilen   *  prerm                #!/bin/bash
 Package: python2-rhn-client-tools
 Version: 2.9.33-1debian9
 Section: python
 Priority: optional
 Architecture: all
 Installed-Size: 205
 Maintainer: Spacewalk Project <spacewalk-devel>
 Description: Support programs and libraries for Red Hat Satellite or Spacewalk
  Python 2 specific files of rhn-client-tools.
 Homepage: https://github.com/spacewalkproject/spacewalk
 Depends: rhn-client-tools (= 2.9.33-1debian9),rhnlib (>= 2.5.78),python-rpm,python-dmidecode,python-ethtool (>= 0.4),python2-hwdata,gir1.2-gudev-1.0,python-gi,python-pyudev,python-dbus,python-newt
root@00000:~/debbuild/DEBS/all#

The "Depends" line looks good so far (for my knowledge).

4. Transfer the .deb files to Spacewalk (or Uyuni) server and import the packages into a test channel via "rhnpush" and wait for the "Packages" and "Packages.gz" files to be generated withn /var/rhn/cache/repodata/<channel>

Actual results:

Example contents...

...
Section: admin
Description: Check for RHN actions
 Python 2 specific files for rhn-check.

Package: python2-rhn-client-tools
Version: 2.9.33-1debian9
Architecture: all
Maintainer: Spacewalk Project <spacewalk-devel>
Installed-Size: 205
Depends: rhn-client-tools  (=  2.9.33-1debian9),rhnlib )
Filename: XMLRPC/GET-REQ/stretch_test/getPackage/python2-rhn-client-tools_2.9.33-1debian9.all-deb.deb
Size: 40562
SHA256: eeda720b7312237e78ed42a1c00d79795d0522f0932b10d39206ed0befd4bdff
Section: python
Description: Support programs and libraries for Red Hat Satellite or Spacewalk
 Python 2 specific files of rhn-client-tools.

Package: python2-rhn-setup-gnome
...

The "Depends:" line is wrong. There is a closing ')' between two packages names. Also the version for the second package is missing.

The final result is, that this Packages.gz file is not parseable by a Debian client.

Expected results:

The expected results should reflect the line from the "dpkg-deb -I" call

Additional info:

I can confirm, that this error also occures within Uyuni (spacewalk-backend-server-4.0.2-1.1.noarch)

Comment 1 Michael Mráka 2020-03-06 15:05:57 UTC
Spacewalk 2.8 (and older) has already reached it's End Of Life.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before end of life. If you would still like
to see this bug fixed and are able to reproduce it against current version
of Spacewalk 2.9, you are encouraged change the 'version' and re-open it.