Bug 1243387 - Add "Multi-Arch" header to debian packages.gz file if present in debian package header
Summary: Add "Multi-Arch" header to debian packages.gz file if present in debian packa...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Spacewalk
Classification: Community
Component: Server
Version: 2.3
Hardware: Unspecified
OS: Unspecified
unspecified
urgent
Target Milestone: ---
Assignee: Michael Mráka
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Depends On:
Blocks: space210
TreeView+ depends on / blocked
 
Reported: 2015-07-15 11:06 UTC by Robert Paschedag
Modified: 2020-03-19 12:16 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-03-19 12:16:59 UTC


Attachments (Terms of Use)

Description Robert Paschedag 2015-07-15 11:06:21 UTC
Description of problem:

MultiArch feature has been added to Debian since wheezy. Debian Packages "may" contain the header "Multi-Arch". This header must also be written to the Packages.gz file generated by Spacewalk if the packages contains this header.

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

2.2, 2.3

How reproducible:

always

Steps to Reproduce:
1. import some debian packages (with Multi-Arch header) into spacewalk
2. wait until taskomatic generates the "Packages.gz" file for this repo
3. inspect the file and check the headers of the package

Actual results:

Header "Multi-Arch" is missing

Expected results:

Header added to packages.gz file (just like "Depends", "Breaks", etc.)

Additional info:

Packages in current Debian version (jessie) often depend on "python:any" which indicate a multiarch version. To resolve the dependencies, the package "python" must contain a "Multi-Arch" header.

See further:

Currently, only repos from spacewalk are included. Running "apt-get upgrade" results in this.

root@deb-prod-test:/var/lib/apt/lists# apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
 apt-transport-spacewalk : Depends: python:any (>= 2.6.6-7~) but it is not installable
 python-cffi : Depends: python:any (>= 2.7.5-5~) but it is not installable
 python-crypto : Depends: python:any (>= 2.7.5-5~) but it is not installable
 python-cryptography : Depends: python:any (>= 2.7.5-5~) but it is not installable
 python-dnspython : Depends: python:any (< 2.8) but it is not installable
                    Depends: python:any (>= 2.7.5-5~) but it is not installable
 python-openssl : Depends: python:any (>= 2.7.5-5~) but it is not installable
                  Depends: python:any (< 2.8) but it is not installable
 python-pkg-resources : Depends: python:any (>= 2.7) but it is not installable
                        Depends: python:any (< 2.8) but it is not installable
 python-pycparser : Depends: python:any (>= 2.7.5-5~) but it is not installable
                    Depends: python:any (< 2.8) but it is not installable
 python-six : Depends: python:any (>= 2.7.5-5~) but it is not installable
              Depends: python:any (< 2.8) but it is not installable
 rhn-client-tools : Depends: python:any but it is not installable
                    Recommends: apt-spacewalk but it is not installable
 samba : Depends: python2.7:any but it is not installable
 samba-common-bin : Depends: python2.7:any but it is not installable
E: Unmet dependencies. Try using -f.
root@deb-prod-test:/var/lib/apt/lists#

Adding "Multi-Arch: allowed" (just as in original Debian packages.gz file) in "python" and "python2.7" package section, resolves this problem

root@deb-prod-test:~# apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@deb-prod-test:~#

See also https://bugzilla.redhat.com/show_bug.cgi?id=1226329

Regards,
Robert

Comment 1 Robert Paschedag 2015-07-16 10:05:48 UTC
I changed this to "urgent", because it is not possible to run a debian jessie system connected to spacewalk without having the "packages.gz" file of the installation DVD also included as a source in sources.list.

Regards,
Robert

Comment 2 Dirk Götz 2016-03-18 11:03:25 UTC
I hit this bug, too, and created a workaround or better really dirty hack.

I added a Post-Invoke to apt-update in /etc/apt/apt.conf.d/50spacewalk which adds the minimum required "Multi-Arch: allowed" headers because I did not find the required data in the spacewalk database.

#
# The configuration for apt-spacewalk
#

APT {
  Update {
        List-Refresh "true";
        Pre-Invoke {
            "/usr/lib/apt-spacewalk/pre_invoke.py";
        }
        Post-Invoke {
            "/bin/sed -rie 's/^Package: (cpp|guile-2.0|python(2.7|3)?)$/\0\nMulti-Arch: allowed/' /var/lib/apt/lists/spacewalk.example.com_dists_channels\:_main_binary-amd64_Packages";
        }
  }
};
DPkg::Post-Invoke {
    "[ ! -e /usr/lib/apt-spacewalk/post_invoke.py ] || /usr/lib/apt-spacewalk/post_invoke.py";
};

Hope this helps someone until there is a proper fix.

Regards,
 Dirk

Comment 3 liberodark 2019-05-03 12:41:47 UTC
Have the same problem on SpaceWalk 2.8.
Please a fixe for that.

Comment 4 Robert Paschedag 2019-07-24 09:39:39 UTC
@liberadark:

See https://github.com/spacewalkproject/spacewalk/pull/697 (and https://github.com/uyuni-project/uyuni/pull/1072 for uyuni). Tested this only on a uyuni test server but "should" also work on spacewalk.

Comment 5 liberodark 2019-10-07 13:24:11 UTC
(In reply to Robert Paschedag from comment #4)
> @liberadark:
> 
> See https://github.com/spacewalkproject/spacewalk/pull/697 (and
> https://github.com/uyuni-project/uyuni/pull/1072 for uyuni). Tested this
> only on a uyuni test server but "should" also work on spacewalk.

Thanks for this information

Comment 6 Michael Mráka 2019-10-07 13:31:34 UTC
PR https://github.com/spacewalkproject/spacewalk/pull/697 has been merged.

Comment 7 Michael Mráka 2020-03-19 12:16:59 UTC
Spacewalk 2.10 has been released.
https://github.com/spacewalkproject/spacewalk/wiki/ReleaseNotes210


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