LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 04-03-2021, 04:19 AM   #1
TurboBlaze
Member
 
Registered: Jan 2018
Location: Russian Federation, Lipetsk region, Dankov
Distribution: Porteus
Posts: 195

Rep: Reputation: Disabled
rpm2tgz - .rpm is not an RPM


Hi.

I am not able to convert ALT Linux RPM packages to txz packages
http://ftp.altlinux.org/pub/distribu...lt1.x86_64.rpm
http://ftp.altlinux.org/pub/distribu...lt1.x86_64.rpm

Code:
# file libpackagekit-glib-1.2.2-alt1.x86_64.rpm 
libpackagekit-glib-1.2.2-alt1.x86_64.rpm: RPM v3.0 bin i386/x86_64

# file -i libpackagekit-glib-1.2.2-alt1.x86_64.rpm 
libpackagekit-glib-1.2.2-alt1.x86_64.rpm: application/x-rpm; charset=binary

# rpm2tgz libpackagekit-glib-1.2.2-alt1.x86_64.rpm libpackagekit-glib-1.2.2-alt1.x86_64.txz
ERROR:  rpm2cpio failed.  (maybe libpackagekit-glib-1.2.2-alt1.x86_64.rpm is not an RPM?)
ERROR:  rpm2cpio failed.  (maybe libpackagekit-glib-1.2.2-alt1.x86_64.txz is not an RPM?)

# for i in `find . -type f | fgrep .rpm | sort`; do rpm2cpio $i | cpio -idmv &>/dev/null; done
error: ./libpackagekit-glib-1.2.2-alt1.x86_64.rpm: invalid signature tag Archivesize (1046)
error reading header from package
Anybody able to do this?

Thanks.
 
Old 04-03-2021, 05:05 AM   #2
phenixia2003
Senior Member
 
Registered: May 2006
Location: France
Distribution: Slackware
Posts: 1,052

Rep: Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008
Hello,

rpm2tgz takes only .rpm files as an argument. You don't need to specify the output file name :

Code:
$ rpm2tgz

usr/bin/rpm2tgz:  Converts RPM format to standard GNU tar + GNU zip format.
            (view converted packages with "less", install and remove
            with "installpkg", "removepkg", "pkgtool", or manually
            with "tar")

Usage:      /usr/bin/rpm2tgz [OPTION] <file.rpm>
            (Outputs "file.tgz")

  -s    extract the install scripts to /usr/doc/$PRGNAM-$VERSION/
          for review.
  -S    extracts the install scripts to be executed on package installation
          (only pre-install and post-install scripts used)
          USE WITH CAUTION! 
  -n    name the output package using the rpm's metadata
  -r    extract what the rpm's "requires" (dependencies)
          as documention to /usr/doc/$PRGNAM-$VERSION/
  -d    attempt a wellformed slack-desc from the rpm meta data
  -c    reset all directory permissions to 755 and ownership to root:root.
However, the output file name does not respect slackware naming scheme, ie. 'name-version-arch-build.ext' :

Code:
$ rpm2tgz libpackagekit-glib-1.2.2-alt1.x86_64.rpm simple-scan-40.0-alt1.x86_64.rpm
...
$ ls -1 *.tgz
libpackagekit-glib-1.2.2-alt1.x86_64.tgz
simple-scan-40.0-alt1.x86_64.tgz
To fix this, the option -n can be used :
Code:
$ rpm2tgz -n libpackagekit-glib-1.2.2-alt1.x86_64.rpm simple-scan-40.0-alt1.x86_64.rpm
...
$ ls -1 *.tgz
libpackagekit-glib-1.2.2-x86_64-alt1.tgz
simple-scan-40.0-x86_64-alt1.tgz
--
SeB
 
Old 04-03-2021, 06:55 AM   #3
alekow
Member
 
Registered: Sep 2009
Distribution: Slackware
Posts: 230

Rep: Reputation: 75
Quote:
Originally Posted by TurboBlaze View Post
Hi.

I am not able to convert ALT Linux RPM packages to txz packages
http://ftp.altlinux.org/pub/distribu...lt1.x86_64.rpm
http://ftp.altlinux.org/pub/distribu...lt1.x86_64.rpm

Code:
# file libpackagekit-glib-1.2.2-alt1.x86_64.rpm 
libpackagekit-glib-1.2.2-alt1.x86_64.rpm: RPM v3.0 bin i386/x86_64

# file -i libpackagekit-glib-1.2.2-alt1.x86_64.rpm 
libpackagekit-glib-1.2.2-alt1.x86_64.rpm: application/x-rpm; charset=binary

# rpm2tgz libpackagekit-glib-1.2.2-alt1.x86_64.rpm libpackagekit-glib-1.2.2-alt1.x86_64.txz
ERROR:  rpm2cpio failed.  (maybe libpackagekit-glib-1.2.2-alt1.x86_64.rpm is not an RPM?)
ERROR:  rpm2cpio failed.  (maybe libpackagekit-glib-1.2.2-alt1.x86_64.txz is not an RPM?)

# for i in `find . -type f | fgrep .rpm | sort`; do rpm2cpio $i | cpio -idmv &>/dev/null; done
error: ./libpackagekit-glib-1.2.2-alt1.x86_64.rpm: invalid signature tag Archivesize (1046)
error reading header from package
Anybody able to do this?

Thanks.
Hi,

rpm2tgz does work for me. As phenixia2003 already wrote you don't want to specify the output file name, however it should still create a tgz file even if you do.

When i tried running your command:

Code:
rpm2tgz libpackagekit-glib-1.2.2-alt1.x86_64.rpm libpackagekit-glib-1.2.2-alt1.x86_64.tgz

(...)

Creating Slackware package:  /home/username/libpackagekit-glib-1.2.2-alt1.x86_64.tgz

./
install/
install/doinst.sh
usr/
usr/lib64/
usr/lib64/girepository-1.0/
usr/lib64/girepository-1.0/PackageKitGlib-1.0.typelib
usr/lib64/libpackagekit-glib2.so.18.1.3

Slackware package /home/username/libpackagekit-glib-1.2.2-alt1.x86_64.tgz created.

ERROR:  rpm2cpio failed.  (maybe libpackagekit-glib-1.2.2-alt1.x86_64.tgz is not an RPM?)
So first it creates a tgz package from rpm, then complains the tgz file is not an rpm as expected.

Try downloading the file again. I can see there is no checksum files on the mirror but try checking the md5sum of the file to see if it is identical to the one I have:

Code:
$ md5sum libpackagekit-glib-1.2.2-alt1.x86_64.rpm
48c57a7f0e6dbd0ec70cf19beeb6ed35  libpackagekit-glib-1.2.2-alt1.x86_64.rpm
 
Old 04-03-2021, 10:40 PM   #4
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
The error seems to imply the rpm file is corrupted and not able to be properly extracted. If you redownload the file (and you can check the md5sum against the one provided by alekow), it will likely fix your issue.
 
Old 06-27-2021, 05:38 AM   #5
TurboBlaze
Member
 
Registered: Jan 2018
Location: Russian Federation, Lipetsk region, Dankov
Distribution: Porteus
Posts: 195

Original Poster
Rep: Reputation: Disabled
BUG!!!
rpm2tgz is not support any packages from ALT Linux Sisyphus and ALT Linux P9.

For example you can search any packages on this web site https://pkgs.org/
and you can't to convert rpm2tgz from ALT Linux reposytorys.

How to fix this?

Thanks.
 
Old 06-27-2021, 05:52 AM   #6
shruggy
Senior Member
 
Registered: Mar 2020
Posts: 3,670

Rep: Reputation: Disabled
Can you extract those packages with rpm2cpio? E.g.
Code:
rpm2cpio libpackagekit-glib-1.2.2-alt1.x86_64.rpm|cpio -tv
 
Old 06-27-2021, 06:49 AM   #7
pghvlaans
Member
 
Registered: Jan 2021
Distribution: Slackware64 {15.0,-current}, FreeBSD, stuff on QEMU
Posts: 451

Rep: Reputation: 363Reputation: 363Reputation: 363Reputation: 363
I think it's just a bad rpm. rpm -V got me this:

Code:
[root@ambiorix slackbuilds]# rpm -V libpackagekit-glib-1.2.3-alt3.x86_64.rpm
warning: libpackagekit-glib-1.2.3-alt3.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID ae4ae412: NOKEY
error: libpackagekit-glib-1.2.3-alt3.x86_64.rpm: invalid signature tag Archivesize (1046)
error: libpackagekit-glib-1.2.3-alt3.x86_64.rpm: not an rpm package (or package manifest)
The messages for another random ALT Linux rpm were the same.

Meanwhile, an rpm from Fedora was fine:

Code:
[root@ambiorix slackbuilds]# rpm -V AllegroOGG-1.0.3-26.fc34.x86_64.rpm
warning: AllegroOGG-1.0.3-26.fc34.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID 45719a39: NOKEY
Unsatisfied dependencies for AllegroOGG-1.0.3-26.fc34.x86_64:
        liballeg.so.4.4()(64bit) is needed by AllegroOGG-1.0.3-26.fc34.x86_64
        libc.so.6()(64bit) is needed by AllegroOGG-1.0.3-26.fc34.x86_64
        libc.so.6(GLIBC_2.14)(64bit) is needed by AllegroOGG-1.0.3-26.fc34.x86_64
        libc.so.6(GLIBC_2.2.5)(64bit) is needed by AllegroOGG-1.0.3-26.fc34.x86_64
        libogg.so.0()(64bit) is needed by AllegroOGG-1.0.3-26.fc34.x86_64
        libvorbis.so.0()(64bit) is needed by AllegroOGG-1.0.3-26.fc34.x86_64
        libvorbisfile.so.3()(64bit) is needed by AllegroOGG-1.0.3-26.fc34.x86_64
        rtld(GNU_HASH) is needed by AllegroOGG-1.0.3-26.fc34.x86_64
missing   a /usr/lib/.build-id
missing   a /usr/lib/.build-id/a1
missing   a /usr/lib/.build-id/a1/03a7244edcb8418ab31c3d2e96798a118d96d7
missing     /usr/lib64/libAllegroOGG.so.0
missing     /usr/share/doc/AllegroOGG
missing   d /usr/share/doc/AllegroOGG/ALOGG.txt
missing   d /usr/share/doc/AllegroOGG/AUTHORS.txt
missing   d /usr/share/doc/AllegroOGG/COPYING.txt
rpm2tgz managed to make a tgz package out of the Fedora rpm.
 
Old 06-27-2021, 09:13 AM   #8
TurboBlaze
Member
 
Registered: Jan 2018
Location: Russian Federation, Lipetsk region, Dankov
Distribution: Porteus
Posts: 195

Original Poster
Rep: Reputation: Disabled
Code:
# rpm2cpio libpackagekit-glib-1.2.3-alt3.x86_64.rpm | cpio -tv
error: libpackagekit-glib-1.2.3-alt3.x86_64.rpm: invalid signature tag Archivesize (1046)
error reading header from package
cpio: premature end of archive 

# rpm2cpio leafpad-0.8.18.1-alt4.x86_64.rpm | cpio -tv
error: leafpad-0.8.18.1-alt4.x86_64.rpm: invalid signature tag Archivesize (1046)
error reading header from package
cpio: premature end of archive 

# rpm -V *.rpm
warning: Generating 18 missing index(es), please wait...
error: leafpad-0.8.18.1-alt4.x86_64.rpm: invalid signature tag Archivesize (1046)
error: leafpad-0.8.18.1-alt4.x86_64.rpm: not an rpm package (or package manifest)
warning: libpackagekit-glib-1.2.3-alt3.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID ae4ae412: NOKEY
error: libpackagekit-glib-1.2.3-alt3.x86_64.rpm: invalid signature tag Archivesize (1046)
error: libpackagekit-glib-1.2.3-alt3.x86_64.rpm: not an rpm package (or package manifest)
error: mariadb-bench-10.4.17-alt2.noarch.rpm: invalid signature tag Archivesize (1046)
error: mariadb-bench-10.4.17-alt2.noarch.rpm: not an rpm package (or package manifest)
With Fedora rpm - all is ok, but with ALT Linux rpm is a very bad story.

Last edited by TurboBlaze; 06-27-2021 at 09:16 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] rpm2tgz vs rpm M0M0 Slackware 5 09-10-2020 04:35 PM
[SOLVED] rpm2tgz does not work bathory Slackware 7 11-08-2018 06:15 AM
rpm2tgz/cpio cant handle rpm v4? Artanicus Slackware 0 03-12-2005 09:17 AM
rpm2tgz question. trn Slackware 6 03-03-2003 02:04 PM
rpm2tgz not cutting it Kellvyn Slackware 2 07-28-2002 02:46 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 03:45 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration