Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 134885 - emerge-webrsync script fails due to broken owner and group args to tarsync
Summary: emerge-webrsync script fails due to broken owner and group args to tarsync
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS, REGRESSION
Depends on:
Blocks: 115839
  Show dependency tree
 
Reported: 2006-05-30 01:28 UTC by Bryan Childs
Modified: 2006-07-28 06:25 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bryan Childs 2006-05-30 01:28:12 UTC
Recently (like a couple of portage upgrades ago) emerge-webrsync has stopped working.

The script tries to run the tarsync command, which fails because the '-o' and '-g' arguments don't seem to expand properly. I've had to manually edit the emerge-webrsync script to replace the shell expansions there with 'root' in both cases (as I don't understand the shell expansions well enough to fix them).

Prior to fixing the script - this is the output I get :

-----------
Fetching most recent snapshot
Attempting to fetch file dated: 20060530
 --- No md5sum present on the mirror. (Not yet available.)
Attempting to fetch file dated: 20060529
 --- No md5sum present on the mirror. (Not yet available.)
Attempting to fetch file dated: 20060528
portage-20060528.tar.bz2: OK
Syncing local tree...
failed looking up uid for 0
tarsync version 0.1 (C) 2005 Brian Harring
http://dev.gentoo.org/~ferringb/tarsync
THIS SOFTWARE COMES WITH ABSOLUTELY NO WARRANTY! USE AT YOUR OWN RISK!
Report bugs to <ferringb@gentoo.org>

    usage: tarsync [flags] [options] tarball directory target

  -V --version         print version
  -v --verbose         increase verbosity
  -u --usage           give this help
  -h --help            give this help
  -s --strip-dirs      specify the number of directories to strip from the
+tarball archive during recreation
  -o --overide-owner   Ensure files has this owner, instead of what the tarball
+states
  -g --overide-group   Ensure files have this username, instead of what the
+tarball states
  -e --exclude-fnmatch Specify a glob pattern for excluding files.
  -p --preserve        Enforce tarball permissions, rather then users (modified
+by -o and -g).

tarsync expects two args, a tarball (can be bzip2 or gzip compressed), and a
+name for the directory to 'sync'
up to the tarballs contents
Example usage: tarsync --strip-dir 1 portage-20050511.tar.bz2 /usr/portage

tarsync failed; tarball is corrupt?
-----------

Replacing the -o and -g shell expressions in the script makes this issue go away - but I have to do this edit every time portage is upgraded. This makes doing automated emerge-webrsyncs and emerge -uD worlds rather a pain!


Output from emerge --info :
gentoo sbin # emerge --info
Portage 2.1_rc3-r1 (default-linux/x86/2006.0, gcc-3.4.5, glibc-2.3.6-r3, 2.6.16-gentoo-r3 i686)
=================================================================
System uname: 2.6.16-gentoo-r3 i686 Intel(R) Pentium(R) 4 CPU 2.00GHz
Gentoo Base System version 1.6.14
dev-lang/python:     2.3.5-r2, 2.4.2
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     [Not Present]
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=pentium4 -fomit-frame-pointer -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/lib/mozilla/defaults/pref /usr/share/X11/xkb /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=pentium4 -fomit-frame-pointer -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 16bit GAPING_SECURITY_HOLE X X509 a52 aac alsa apache2 apm arts artswrappersuid artworkextra asm avi bdf berkdb bindist bitmap-fonts bonobo bootsplash cairo cdda cddb cdio cdparanoia cdrom cli crypt css cups curlwrappers dga dnd doc dri dvd dvdread ecc edl eds emboss emoticon encode escreen esd ethereal etwin exim exiscan exiscan-acl extensions fame fbcon fbdev flash font-server foomaticdb fortran ftp gb gcc-libffi gcj gdbm gif gkrellm glade glitz gmail gnome gnomedb gnustep gnutls gpm gsnd gstreamer gtk gtk2 icq idea imlib inline innodb insecure-drivers ipv6 isdnlog ithreads jabber java javascript jpeg jpeg2k kde lcd libg++ libwww logrotate ltsp lzo lzw mad math matrox mikmod mmx mono motif mozsvg mozxmlterm mp3 mpeg mplayer msn musicbrainz mysqli ncurses netbeans nethack nls nocd nptl ntlm objc ogg ole opengl openssh oracle oscar oss pam pcre pdf pdflib perl png posix povray pppd python qt quicktime rdesktop readline reflection rhythmbox sasl sdl sensord server session sharedext smime sockets spell spf spl sql srs sse sse2 ssl startup-notification subversion symlink sysfs syslog tcpd tga theora threads thumbnail tidy truetype truetype-fonts type1-fonts udev uml underscores unicode uudeview vim-with-x visualization vnc vorbis wxwindows xanim xchattext xemacs xface xml xmms xorg xpm xrandr xscreensaver xslt xv xvmc yahoo yv12 zlib elibc_glibc input_devices_keyboard input_devices_mouse kernel_linux userland_GNU video_cards_i810 video_cards_vesa video_cards_fbdev"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, MAKEOPTS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 1 Zac Medico gentoo-dev 2006-05-30 02:12:57 UTC
This is fixed in svn r3442.
Comment 2 Zac Medico gentoo-dev 2006-05-31 07:32:10 UTC
This has been released in 2.1_rc3-r3.
Comment 3 Bryan Childs 2006-05-31 07:41:32 UTC
Awesome - thanks very much - very speedy!
Comment 4 Alexander Wessel 2006-07-28 06:25:22 UTC
I still had problems with emerge-webrsync after the fix, but found out it was because my make.conf had

PORTAGE_INST_UID="root"
PORTAGE_INST_GID="root"

changing this to the numeric counterpart

PORTAGE_INST_UID="0"
PORTAGE_INST_GID="0"

fixed the problem (since this is the default in /etc/make.globals one could also simply remove it from /etc/make.conf).

I thought I'd post this here, in case others ran into the same trap... ;)