Summary: | doins ${FILESDIR}/foo fails to work when ${FILESDIR} is on ZFS with portage 2.2.1 and FEATURES=xattr | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Rick Farina (Zero_Chaos) <zerochaos> |
Component: | New packages | Assignee: | Richard Yao (RETIRED) <ryao> |
Status: | RESOLVED FIXED | ||
Severity: | major | CC: | hardened, nikoli |
Priority: | High | Keywords: | Bug, PATCH, REGRESSION |
Version: | autobuilds | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | Python xattr.list() reads regular file attributes, which are present in ZFS, but unimplemented in ZFSOnLinux | ||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 465000 | ||
Attachments: |
portage-2.1.12.2 build.log
portage-2.2.1 build.log |
Description
Rick Farina (Zero_Chaos)
![]() Created attachment 357784 [details]
portage-2.1.12.2 build.log
Created attachment 357786 [details]
portage-2.2.1 build.log
debug patches from Zac show this:
>>> Install hidclient-20120728 into /var/tmp/portage/net-wireless/hidclient-20120728/image/ category net-wireless
Traceback (most recent call last):
File "/usr/lib64/portage/bin/install.py", line 180, in copy_xattrs
_copyxattr(s, abs_path, exclude=exclude)
File "/usr/lib64/portage/pym/portage/util/movefile.py", line 112, in _copyxattr
(_unicode_decode(src),))
portage.exception.OperationNotSupported: Filesystem containing file '/usr/portage/net-wireless/hidclient/files/README' does not support listing of extended attributes
!!! install: copy_xattrs failed with the following arguments: -m0644 /usr/portage/net-wireless/hidclient/files/README /var/tmp/portage/net-wireless/hidclient-20120728/image/usr/share/doc/hidclient-20120728//
!!! dodoc: /usr/portage/net-wireless/hidclient/files/README does not exist
* ERROR: net-wireless/hidclient-20120728::gentoo failed (install phase):
* dodoc failed
Does ZFS lack xattr support?
Referenced debug patches: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=patch;h=356abf4adb756362ef6f207cbaa47915eb12e494 http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=patch;h=d6d555e0b43d0beee617952267406c305edecb05 It looks like the listxattr VFS call is broken on ZFS. This can be reproduced easily by doing `listxattr /path/to/anything` on ZFS. I am reassigning this to myself putting the hardened team on CC. A fix has been sent upstream for review: https://github.com/zfsonlinux/zfs/pull/1693 I consider this to be a high priority issue, so I intend to merge the fix into the zfs-kmod package by committing 0.6.2-r1 soon. I would like Rick Farina to confirm that it resolves the problem for him before I do that. The patch can be installed via epatch_user: mkdir -p /etc/portage/patches/sys-fs/zfs-kmod-0.6.2 curl https://github.com/zfsonlinux/zfs/pull/1693.patch > /etc/portage/patches/sys-fs/zfs-kmod-0.6.2/zfs-kmod-read-file-attribute-support.patch A rebuild of zfs-kmod, a rebuild of any initramfs being used and a reload of the module (a reboot if ZFS is your rootfs) will apply the patch. Upstream confirmed that the fix was sane, but refused to merge it because they would like support for both getting and setting file attributes to be implemented at the same time. Additionally, they pointed out that this regression was caused by the following commit: https://github.com/zfsonlinux/zfs/commit/88c2839 I have rewritten the patch and refreshed the pull request. It now includes support for reading and writing file attributes. I had feedback from upstream while working on it, so it should be sane. As soon as I get confirmation from upstream that it is sane and Rick that it fixes his issue, I will commit -r1 with the fix. Also, I should mention that the commmit that python's xattr.list() checks both regular file attributes and extended file attributes. Had it not been for that, there would not have been a problem when the return values in zpl_ioctl() were changed. 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 After patch, rebuild of zfs-kmod, and reboot. Where are we on this? I haven't been able for weeks (since the update to portage 2.2). I'm about ready to clear ZFS from the system. (In reply to Rick Farina (Zero_Chaos) from comment #10) > Where are we on this? I haven't been able for weeks (since the update to > portage 2.2). I'm about ready to clear ZFS from the system. A proper fix was merged upstream today: https://github.com/zfsonlinux/zfs/commit/9d317793aa66d05a8c44410ea24a9a4166a89bbd I need to try to reproduce this to verify that commit fixes it. I will backport the commit shortly if it does, but I suspect that is the case. I am fairly confident that this was fixed in either 0.6.2-r5 or 0.6.3. I am closing it as such. |