spacewalk-scripts icon indicating copy to clipboard operation
spacewalk-scripts copied to clipboard

get Packages.xz from debian and ubuntu repositories

Open 4thomasmueller opened this issue 7 years ago • 4 comments

A Replacement for spacewalk-debian-sync.pl by Robert, see https://github.com/rpasche/spacewalk-debian-sync/tree/add-multiarch-header

Channels have to be synced by sapcewalk-repo-sync -c , afterwards run my script and then run spacewalk-add-debian-multiarch-header.py from https://github.com/rpasche/spacewalk-debian-sync/tree/add-multiarch-header

4thomasmueller avatar Aug 25 '18 18:08 4thomasmueller

@4thomasmueller I havent worked with Spacewalk for quite a while and also never used it with Debian, only CentOS and Ubuntu. So help me understand a few things:

Also, as far as I understand, Roberts spacewalk-debian-sync.pl aswell as my debianSync.py are obsolete as SW can sync Debian natively now. Correct?

Roberts https://github.com/rpasche/spacewalk-debian-sync/blob/add-multiarch-header/README.md says after the sync, you only have to run his spacewalk-add-debian-multiarch-header.py script. You write that one has to sync, then run your run script and than his. So is he missing something or what is the purpose of your script/extra-step ?

philicious avatar Sep 08 '18 15:09 philicious

You are right, in SW 2.7 works spacewalk-repo-sync with Ubuntu and Debian Repositories out of the box. Debian and Ubuntu (apt) are using a file called Packages.gz file, which describes packages, dependencies, versions and other. Without Roberts modified script spacewalk-debian-sync.pl there will be no multiarch header informations (mixed i386 and x86_64) in this uncompressed file which resides in /var/cache/rhn/repodata/ Unfortunately his script cannot decompress the Packages.gz from Ubuntu Repositories. A try to gunzip this file on shell fails, the included perl modul in Roberts script are unable to decompress this file too. Thats the reason for creating my script, which will fetch Packages.xz instead of Packages.gz from Debian and Ubuntu Repositories, decompress this and create temporarely files in /tmp/ (as in Roberts script) Finally use the script spacewalk-add-debian-multiarch-header.py to add multiarch headers in /var/cache/rhn/repodata//Packages and compress ist to Packages.gz.

Regards, Thomas

Am 08.09.2018 um 17:23 schrieb philicious [email protected]:

@4thomasmueller I havent worked with Spacewalk for quite a while and also never used it with Debian, only CentOS and Ubuntu. So help me understand a few things:

Also, as far as I understand, Roberts spacewalk-debian-sync.pl aswell as my debianSync.py are obsolete as SW can sync Debian natively now. Correct?

Roberts https://github.com/rpasche/spacewalk-debian-sync/blob/add-multiarch-header/README.md says after the sync, you only have to run his spacewalk-add-debian-multiarch-header.py script. You write that one has to sync, then run your run script and than his. So is he missing something or what is the purpose of your script/extra-step ?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

4thomasmueller avatar Sep 08 '18 16:09 4thomasmueller

so basically his script works for Debian repos/packages but doesnt work for Ubuntu ?

wouldnt it then make sense to update his script so it can also handle Ubuntu ?

philicious avatar Sep 08 '18 17:09 philicious

of course it works for debian. Here is my feedback to Robert I've given him:

Hello, I use now the advised sync script and the add-header script for Debian systems, it works. In Packages I can see the different Multi-Arch: headers. Then I tried this for Ubuntu 16.04 as well, but the sync script fails with:

INFO: Repo URL: http://ftp.tu-chemnitz.de/pub/linux/ubuntu/dists/xenial-security/multiverse/binary-amd64/ INFO: Ubuntu root is http://ftp.tu-chemnitz.de/pub/linux/ubuntu/ INFO: Fetching Packages.gz... done ERROR: Failed to uncompress Packages.gz

Who knows how packages.gz from Ubuntu can be uncompressed? or should I use the packages.xz file for ubuntu instead packages.gz?

file Packages-debian8.gz: gzip compressed data, max compression, from Unix

file Packages-ubuntu16.gz UTF-8 Unicode text, with very long lines

In Roberts script the perl function "Compress::Zlib::memGunzip" will be used for decompressing. I'm not familiar with perl, therefore my "workaround" with python as os call "unxz" and it does the job well for my customer.

Thomas

Am Sa., 8. Sep. 2018 um 19:26 Uhr schrieb philicious < [email protected]>:

so basically his script works for Debian repos/packages but doesnt work for Ubuntu ?

wouldnt it then make sense to update his script so it can also handle Ubuntu ?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/philicious/spacewalk-scripts/pull/17#issuecomment-419659395, or mute the thread https://github.com/notifications/unsubscribe-auth/AopV2FzmNdqtnT_4n8sBNppnwq3BtIXLks5uY_2vgaJpZM4WMfHR .

-- Mit freundlichen Grüßen Thomas Müller

4thomasmueller avatar Sep 08 '18 20:09 4thomasmueller