Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 484540 - sys-apps/portage-2.2.1 USE=xattr with PORTDIR on NFS share - /usr/lib64/portage/bin/install.py: IOError: [Errno 95] Operation not supported
Summary: sys-apps/portage-2.2.1 USE=xattr with PORTDIR on NFS share - /usr/lib64/porta...
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks: 484436
  Show dependency tree
 
Reported: 2013-09-11 01:33 UTC by Robert Trace
Modified: 2013-09-15 22:18 UTC (History)
0 users

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 Robert Trace 2013-09-11 01:33:21 UTC
After upgrade to portage 2.2.1, rsync won't install seemingly due to portage trying to run xattr.list() on a file in an NFS mounted PORTDIR.


Reproducible: Always

Steps to Reproduce:
# emerge -va1 rsync

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild     U  ] net-misc/rsync-3.0.9-r3 [3.0.9-r2] USE="acl iconv ipv6 xattr -static" 0 kB

Total: 1 package (1 upgrade), Size of downloads: 0 kB

....

>>> Source compiled.
>>> Test phase [not enabled]: net-misc/rsync-3.0.9-r3

>>> Install rsync-3.0.9-r3 into /var/tmp/portage/net-misc/rsync-3.0.9-r3/image/ category net-misc
make -j3 DESTDIR=/var/tmp/portage/net-misc/rsync-3.0.9-r3/image/ install 
mkdir -p /var/tmp/portage/net-misc/rsync-3.0.9-r3/image//usr/bin
/usr/lib64/portage/bin/ebuild-helpers/xattr/install -c  -m 755 rsync /var/tmp/portage/net-misc/rsync-3.0.9-r3/image//usr/bin
mkdir -p /var/tmp/portage/net-misc/rsync-3.0.9-r3/image//usr/share/man/man1
mkdir -p /var/tmp/portage/net-misc/rsync-3.0.9-r3/image//usr/share/man/man5
if test -f rsync.1; then /usr/lib64/portage/bin/ebuild-helpers/xattr/install -c -m 644 rsync.1 /var/tmp/portage/net-misc/rsync-3.0.9-r3/image//usr/share/man/man1; fi
if test -f rsyncd.conf.5; then /usr/lib64/portage/bin/ebuild-helpers/xattr/install -c -m 644 rsyncd.conf.5 /var/tmp/portage/net-misc/rsync-3.0.9-r3/image//usr/share/man/man5; fi
 * Adjusting to prefix /
 *   rsyncd.conf ...                                                                                      [ ok ]
 *   rsyncd ...                                                                                           [ ok ]
Traceback (most recent call last):
  File "/usr/lib64/portage/bin/install.py", line 248, in <module>
    sys.exit(main(sys.argv[1:]))
  File "/usr/lib64/portage/bin/install.py", line 243, in main
    returncode = copy_xattrs(opts, files)
  File "/usr/lib64/portage/bin/install.py", line 179, in copy_xattrs
    _copyxattr(s, abs_path, exclude=exclude)
  File "/usr/lib64/portage/pym/portage/util/movefile.py", line 101, in _copyxattr
    attrs = xattr.list(src)
IOError: [Errno 95] Operation not supported
!!! doins: /usr/portage/net-misc/rsync/files/rsyncd.service does not exist
 * ERROR: net-misc/rsync-3.0.9-r3::gentoo failed (install phase):
 *   doins failed
 * 
 * If you need support, post the output of `emerge --info '=net-misc/rsync-3.0.9-r3::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=net-misc/rsync-3.0.9-r3::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/net-misc/rsync-3.0.9-r3/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/net-misc/rsync-3.0.9-r3/temp/environment'.
 * Working directory: '/var/tmp/portage/net-misc/rsync-3.0.9-r3/work/rsync-3.0.9'
 * S: '/var/tmp/portage/net-misc/rsync-3.0.9-r3/work/rsync-3.0.9'
 * QA Notice: file does not exist:
 * 
 * 	doins: /usr/portage/net-misc/rsync/files/rsyncd.service does not exist

>>> Failed to emerge net-misc/rsync-3.0.9-r3

... and yet:

# # ls -l /usr/portage/net-misc/rsync/files/rsyncd.service
-rw-r--r-- 1 root root 206 Jul  6 02:26 /usr/portage/net-misc/rsync/files/rsyncd.service
# cat /usr/portage/net-misc/rsync/files/rsyncd.service
[Unit]
Description=rsync daemon
After=networking.target

[Service]
Type=simple
ExecStart=/usr/bin/rsync --daemon --no-detach
StandardOutput=syslog
StandardError=syslog

[Install]
WantedBy=multi-user.target

#
# mount | grep portage
server:/usr/portage on /usr/portage type nfs (rw,addr=x.x.x.x)




Portage 2.2.1 (default/linux/amd64/13.0/desktop/gnome, gcc-4.6.3, glibc-2.15-r3, 3.8.13-gentoo x86_64)
=================================================================
                        System Settings
=================================================================
System uname: Linux-3.8.13-gentoo-x86_64-Intel-R-_Core-TM-2_Duo_CPU_T9300_@_2.50GHz-with-gentoo-2.2
KiB Mem:     4046320 total,    778980 free
KiB Swap:    1572856 total,    685808 free
Timestamp of tree: Wed, 11 Sep 2013 00:00:01 +0000
ld GNU ld (GNU Binutils) 2.23.1
app-shells/bash:          4.2_p45
dev-java/java-config:     2.1.12-r1
dev-lang/python:          2.7.5-r2, 3.2.5-r2
dev-util/cmake:           2.8.10.2-r2
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.11.8
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.9.6-r3, 1.10.3, 1.11.6, 1.12.6, 1.13.4
sys-devel/binutils:       2.23.1
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.9 (virtual/os-headers)
sys-libs/glibc:           2.15-r3
Repositories: gentoo personal
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-mtune=core2 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-mtune=core2 -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 parallel-fetch preserve-libs protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.utf8"
LC_ALL="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j3"
PKGDIR="/var/cache/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-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="/var/lib/layman/personal"
USE="X a52 aac acl acpi alsa amd64 applet archive bluetooth bluray branding bzip2 cairo caps cdda cdparanoia cdr cleartype cli colord consolekit cracklib crypt cscope cups cxx dbus device-mapper dri dts dv dvd dvdr dvdread emboss encode evo exif fam fat ffmpeg firefox flac fontconfig fuse gif gnome gnome-keyring gnome-online-accounts gpg gstreamer gtk hfs iconv imap introspection iproute2 ipv6 java jpeg laptop lcms libass libnotify libsecret lzma mad mmx mmxext mng modules mp3 mp4 mpeg mtp mudflap multilib nautilus ncurses nls nptl nsplugin ntfs ogg opengl openmp openssl pam pango pcre pdf png policykit ppds pulseaudio qt3support qt4 readline rtc samba sdl sensord session socialweb spell sqlite srt sse sse2 ssl ssse3 startup-notification svg syslog tcpd threads tiff truetype udev udisks unicode upower usb uxa v4l v4l2 vorbis wxwidgets wxwindows x264 xattr xcb xinerama xml xscreensaver xv xvid xvmc zlib" 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" GRUB_PLATFORMS="pc efi-64" INPUT_DEVICES="evdev keyboard mouse synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7" QEMU_SOFTMMU_TARGETS="i386 x86_64" RUBY_TARGETS="ruby19 ruby18" USERLAND="GNU" VIDEO_CARDS="intel" 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"
USE_PYTHON="2.7"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, SYNC
Comment 1 Robert Gill 2013-09-12 22:21:16 UTC
I ran into this issue as well. You can fix it by disabling the 'xattr' USE flag for sys-apps/portage, then re-emerge.

Would it be possible to change portage so that when the exception raised by copyxattrs is caught, a normal copy is tried before failing and exiting?
Comment 2 Jeroen Roovers gentoo-dev 2013-09-13 14:16:38 UTC
With sys-apps/portage-2.2.3 I get:
getfattr: /newaches/gentoo/cvs/gentoo-x86/net-misc/rsync/files/rsyncd.service: Operation not supported

which is non-fatal.

That's with user_xattr enabled for the NFS mount.
Comment 4 Arfrever Frehtes Taifersar Arahesis 2013-09-15 06:17:54 UTC
Robert Trace or somebody else: Please test with Portage running under Python >=3.3. I suspect that a different exception might be raised.
(The fix described in comment #3 is in code used with Python <3.3.)
Comment 6 Zac Medico gentoo-dev 2013-09-15 11:27:37 UTC
This is fixed in 2.2.5.
Comment 7 Robert Trace 2013-09-15 22:18:38 UTC
Since Arfrever asked, here's portage-2.2.1 with python-3.3.2-r2:

Traceback (most recent call last):
  File "/usr/lib64/portage/bin/install.py", line 248, in <module>
    sys.exit(main(sys.argv[1:]))
  File "/usr/lib64/portage/bin/install.py", line 243, in main
    returncode = copy_xattrs(opts, files)
  File "/usr/lib64/portage/bin/install.py", line 179, in copy_xattrs
    _copyxattr(s, abs_path, exclude=exclude)
  File "/usr/lib64/portage/pym/portage/util/movefile.py", line 75, in _copyxattr
    attrs = _os.listxattr(src)
OSError: [Errno 95] Operation not supported: '/usr/portage/net-misc/rsync/files/rsyncd.service'

--

Otherwise I can confirm that portage-2.2.6 fixed it with both python-2.7 and 3.3.

Thanks!