Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Portage & Programming
  • Search

Extracting portage binpkgs

Problems with emerge or ebuilds? Have a basic programming question about C, PHP, Perl, BASH or something else?
Post Reply
Advanced search
4 posts • Page 1 of 1
Author
Message
lordoftheworld
n00b
n00b
User avatar
Posts: 19
Joined: Wed Jun 16, 2004 7:14 am

Extracting portage binpkgs

  • Quote

Post by lordoftheworld » Sat Apr 24, 2021 12:53 am

Is there a way to make or extract /usr/portage/packages/*/*.tbz2 packages without emerge -K/-B? I have BINPKG_COMPRESS="xz" in my make.conf, and neither tar -xJf or xz -df work for extracting. Both say compressed data is corrupt and opening in vi shows garbage. vi can usually look into compressed files. TIA.
Top
Etal
Veteran
Veteran
User avatar
Posts: 1932
Joined: Fri Jul 15, 2005 3:01 pm

  • Quote

Post by Etal » Sat Apr 24, 2021 1:37 am

I think using xz might what's causing the issue. The old bzip2 and new zstd binpkgs work fine with tar for me:

Code: Select all

$ tar tavf gnuconfig-20200621.tbz2
drwxr-xr-x root/root         0 2020-06-25 20:23 ./
drwxr-xr-x root/root         0 2020-06-25 20:23 ./usr/
drwxr-xr-x root/root         0 2020-06-25 20:23 ./usr/share/
drwxr-xr-x root/root         0 2020-06-25 20:23 ./usr/share/doc/
drwxr-xr-x root/root         0 2020-06-25 20:23 ./usr/share/doc/gnuconfig-20200621/
-rw-r--r-- root/root     28870 2020-06-25 20:23 ./usr/share/doc/gnuconfig-20200621/ChangeLog.bz2
drwxr-xr-x root/root         0 2020-06-25 20:23 ./usr/share/gnuconfig/
-rwxr-xr-x root/root     48858 2020-06-25 20:23 ./usr/share/gnuconfig/config.guess
-rwxr-xr-x root/root     31923 2020-06-25 20:23 ./usr/share/gnuconfig/config.sub

bzip2: (stdin): trailing garbage after EOF ignored

$ tar tavf gnuconfig-20210107.tbz2
drwxr-xr-x root/root         0 2021-01-14 22:59 ./
drwxr-xr-x root/root         0 2021-01-14 22:59 ./usr/
drwxr-xr-x root/root         0 2021-01-14 22:59 ./usr/share/
drwxr-xr-x root/root         0 2021-01-14 22:59 ./usr/share/doc/
drwxr-xr-x root/root         0 2021-01-14 22:59 ./usr/share/doc/gnuconfig-20210107/
-rw-r--r-- root/root      1088 2021-01-14 22:59 ./usr/share/doc/gnuconfig-20210107/ChangeLog.bz2
drwxr-xr-x root/root         0 2021-01-14 22:59 ./usr/share/gnuconfig/
-rwxr-xr-x root/root     49448 2021-01-14 22:59 ./usr/share/gnuconfig/config.guess
-rwxr-xr-x root/root     34491 2021-01-14 22:59 ./usr/share/gnuconfig/config.sub
zstd: /*stdin*\: unsupported format
tar: Child returned status 1
tar: Error is not recoverable: exiting now
The binpkg file format is a compressed tar archive with xpak data appended at the end (which is why you see the errors at the end). If xz really can't handle it, you'd need to figure out how to strip it off. The format is described in the xpak(5) man page.

…or just switch compression to zstd which is the current default.
Top
lordoftheworld
n00b
n00b
User avatar
Posts: 19
Joined: Wed Jun 16, 2004 7:14 am

  • Quote

Post by lordoftheworld » Sat Apr 24, 2021 3:04 am

Thanks, I didn't notice it extracted files before giving me the corrupt error when using tar. Knowing it's xpak appended is helpful, qtbz2 and qxpak would be the two programs that help you split the file and look inside the xpak.
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56088
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Sat Apr 24, 2021 9:20 am

lordoftheworld,

The format is like a single package stage3.
Its a tarball of the package followed by the content of /var/db/pkg for the package.

For recovery purposes, when all seems lost. its possimle to untar a binary package to the broken root filesystem and throw away the content of /var/db/pkg.
That's enough for the package to work.
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
Post Reply

4 posts • Page 1 of 1

Return to “Portage & Programming”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic