Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 484326

Summary: app-arch/rpm2targz: files with a-r perms are skipped when converting from cpio (and non-root)
Product: Gentoo Linux Reporter: ta2002 <throw_away_2002>
Component: Current packagesAssignee: Gentoo's Team for Core System packages <base-system>
Status: RESOLVED CANTFIX    
Severity: normal CC: jstein
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description ta2002 2013-09-09 11:26:55 UTC
See http://forums.gentoo.org/viewtopic-t-969396.html

When attempting to extract this rpm:

http://downloads.lexmark.com/downloads/pssd/print-drivers-linux-glibc2-x86.rpm

I received the following message:

rpm2targz: print-drivers-linux-glibc2-x86.rpm: failed to extract cpio via gzip (not actually an RPM?)

Forum user VoidMage claims that this is because of "stupid" permissions on one of the files in the rpm (which rpm2targz should still handle).
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2013-09-09 12:48:48 UTC
It works fine for me.

Please post your `emerge --info app-arch/rpm2targz' output in a comment.
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2013-09-09 12:49:32 UTC
Also, try the same command with --verbose.
Comment 3 Rafał Mużyło 2013-09-09 13:16:09 UTC
Well, I don't claim it fails *for you* for this reason, I'm saying it fails for me with "./usr/local/lexmark/unix_prt_drivers/bin/.scripts/setup.sh: Can't open: Access denied". That file has "005" permissions.

app-arch/rpm2targz-9.0.0.5g
app-arch/tar-1.26-r1

As rpmoffset reports correct values, I suspect it might be something as simple as running of of disk space in /tmp (or perhaps an incorrect download).
Comment 4 Rafał Mużyło 2013-09-09 13:17:25 UTC
That last line was meant to end with "for you".
Comment 5 ta2002 2013-09-11 03:11:21 UTC
(In reply to Jeroen Roovers from comment #1)
> It works fine for me.
> 
> Please post your `emerge --info app-arch/rpm2targz' output in a comment.

$ emerge --info app-arch/rpm2targz
Portage 2.1.12.2 (default/linux/amd64/13.0/desktop, gcc-4.6.3, glibc-2.15-r3, 3.7.10-gentoo-r1 x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-3.7.10-gentoo-r1-x86_64-Intel-R-_Core-TM-_i5_CPU_750_@_2.67GHz-with-gentoo-2.1
KiB Mem:    12304028 total,    276112 free
KiB Swap:    4112604 total,   4094776 free
Timestamp of tree: Tue, 10 Sep 2013 01:30:01 +0000
ld GNU ld (GNU Binutils) 2.22
app-shells/bash:          4.2_p37
dev-java/java-config:     2.1.12-r1
dev-lang/python:          2.7.3-r3, 3.2.3-r2
dev-util/cmake:           2.8.9
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.1-r1
sys-apps/openrc:          0.11.8
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.69
sys-devel/automake:       1.11.6, 1.12.6
sys-devel/binutils:       2.22-r1
sys-devel/gcc:            4.6.3
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.7 (virtual/os-headers)
sys-libs/glibc:           2.15-r3
Repositories: gentoo
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/openvpn/easy-rsa"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="64bit R X a52 aac aalib accessibility acpi additions aio alsa amd64 aspell audio audiofile blksha1 bluray bookmarks bwscheduler bzip2 cairo caps cdda cdio cdr chm chroot client consolekit cpumining cracklib crypt css cups cxx dbus device-mapper dga directfb djvu downloadorder dri dvd dvdnav dvdr ebook egl eigen encode espeak exceptions exif expat fam fbcon ffmpeg flac fluidsynth fontconfig fortran gcj gcrypt gecko ggi gif git glib glibc-omitfp gmp gpg gphoto2 gpm gsm gstreamer gtk handbook hardcoded-tables hddtemp holidays hpn iconv idea imap infowidget inotify iostats ipc ipfilter ipv6 jabber jbig jit joystick jpeg jsbsim kdcraw kde kmod lame lcms less libass libkms libwww live lm_sensors logviewer lzma mad matroska mbox mdns-bundled memlimit midi minizip mmx mmxext mp3 mpeg mta mudflap multilib nas ncurses net netapi network nls no-old-linux nodrm nptl ntfsprogs ntp ocamlopt offlinehelp ofx ogg okular opencl opengl openmedia openmp oscar osdmenu pcre pdf pm-utils png policykit portmon ps qt3support quotes raptor readline real recursion-limit redland rss rtc rtmp savedconfig scanfolder scanner scrypt sdl search secure-delete sensord server shared-glapi shm silc smbclient smtp sndfile sound speex spell sse sse2 sse2_4way sse2check sse4 ssl ssse3 stats subversion svg sysfs tcpd theora threads threadsafe tiff tremor truetype udev udisks unicode upnp upower urandom usb userlocales utils v4l2 vdpau video vorbis wav webdav-neon webinterface win64 wps x264 xcb xinerama xml xpdf-headers xslt xv xvid yahoo zlib zrtp" ABI_X86="64" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev" KERNEL="linux" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python3_2" PYTHON_TARGETS="python3_2" RUBY_TARGETS="ruby19 ruby18" USERLAND="GNU" VIDEO_CARDS="nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON

=================================================================
                        Package Settings
=================================================================

app-arch/rpm2targz-9.0.0.5g was built with the following:
USE="(multilib)"


(In reply to Jeroen Roovers from comment #2)
> Also, try the same command with --verbose.

($|#) rpm2targz -v ./print-drivers-linux-glibc2-x86.rpm
Processing file: ./print-drivers-linux-glibc2-x86.rpm ... rpm2targz: ./print-drivers-linux-glibc2-x86.rpm: failed to extract cpio via gzip (not actually an RPM?)
FAIL

The ($|#) means I tried both as an ordinary user and as root.
Comment 6 Rafał Mużyło 2013-09-12 00:21:14 UTC
Try going through the process step by step (as I did):
1) see what 'rpmoffset -v < print-drivers-linux-glibc2-x86.rpm' prints
( should be 'gzip 198027')
2) run 'dd ibs=198027 skip=1 if=print-drivers-linux-glibc2-x86.rpm of=print-drivers-linux-glibc2-x86.gz' (resulting file should be 42117427 bytes large)
3) run 'gunzip print-drivers-linux-glibc2-x86.gz' (should give you a cpio archive 119697408 bytes large)
Comment 7 ta2002 2013-09-12 13:25:00 UTC
(In reply to Rafał Mużyło from comment #6)
> Try going through the process step by step (as I did):
> 1) see what 'rpmoffset -v < print-drivers-linux-glibc2-x86.rpm' prints
> ( should be 'gzip 198027')
> 2) run 'dd ibs=198027 skip=1 if=print-drivers-linux-glibc2-x86.rpm
> of=print-drivers-linux-glibc2-x86.gz' (resulting file should be 42117427
> bytes large)
> 3) run 'gunzip print-drivers-linux-glibc2-x86.gz' (should give you a cpio
> archive 119697408 bytes large)

That worked exactly as you described. :) Thanks.
Comment 8 Rafał Mużyło 2013-09-12 14:15:59 UTC
(In reply to throw_away_2002 from comment #7)
> (In reply to Rafał Mużyło from comment #6)
> > Try going through the process step by step (as I did):
> > 1) see what 'rpmoffset -v < print-drivers-linux-glibc2-x86.rpm' prints
> > ( should be 'gzip 198027')
> > 2) run 'dd ibs=198027 skip=1 if=print-drivers-linux-glibc2-x86.rpm
> > of=print-drivers-linux-glibc2-x86.gz' (resulting file should be 42117427
> > bytes large)
> > 3) run 'gunzip print-drivers-linux-glibc2-x86.gz' (should give you a cpio
> > archive 119697408 bytes large)
> 
> That worked exactly as you described. :) Thanks.

...but that's about as far as you got on your own...
As I was saying, it looks like it was either a bad download or you were running out of space in /tmp.
Comment 9 SpanKY gentoo-dev 2013-09-12 20:33:51 UTC
it's not possible to do the conversion as non-root and have the process not be lossy.  the file perms in the cpio can be set to not give read permission to any users which means tar cannot read it when we try to create the new archive.
Comment 10 Jonas Stein gentoo-dev 2020-01-01 23:51:41 UTC
As far I can see there is nothing we can do in the ebuild here.
I is a limitation of the workflow/program.
I close it as CANTFIX.
Please reopen, if I am wrong.