Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 556408 - handbook stage3 unpack step suggests --xattrs but minimal install cd ships app-arch/tar[-xattr] - tar: XATTR support is not available
Summary: handbook stage3 unpack step suggests --xattrs but minimal install cd ships ap...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Release Media
Classification: Unclassified
Component: InstallCD (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Release Team
URL: https://archives.gentoo.org/gentoo-de...
Whiteboard:
Keywords:
Depends on: 506198
Blocks:
  Show dependency tree
 
Reported: 2015-07-31 20:56 UTC by Ben Kohler
Modified: 2015-10-16 19:34 UTC (History)
7 users (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 Ben Kohler gentoo-dev 2015-07-31 20:56:51 UTC
Hello,

It would seem that our official handbook instructions added --xattrs to the tar unpack command some time ago.  This is good as it will allow us to use filecaps and such on system packages.  However, our official install media currently do not enable xattr support on app-arch/tar.

When --xattrs is passed, it does still unpack, but shows a warning on the terminal "tar: XATTR support is not available" which is a bit scary for new users.

I'm not sure if the best course of action would be to enable it in the installcd package.use, or IUSE="+xattr" on tar ebuilds, or a more wide reaching profile change.

Thanks!
Comment 1 Rick Farina (Zero_Chaos) gentoo-dev 2015-07-31 20:58:55 UTC
Two possible fixes:

force tar to build with the xattr flag for livecd builds

just add +xattr to the tar ebuild and call it a day


I would lean towards just making xattr default on tar, but I'm curious if base-system is against that.
Comment 2 Anthony Basile gentoo-dev 2015-08-01 11:37:11 UTC
(In reply to Rick Farina (Zero_Chaos) from comment #1)
> Two possible fixes:
> 
> force tar to build with the xattr flag for livecd builds
> 
> just add +xattr to the tar ebuild and call it a day
> 
> 
> I would lean towards just making xattr default on tar, but I'm curious if
> base-system is against that.

The kernel has to be able to support xattr on the filesystems where it will be used.  This includes tmpfs.  One problem would be on arches where the kernel is not that well supported.  eg. coming to mind are older mips machines.  i know kumba had issues when I hard coded --xattrs in catalyst.  This just throws a warning but then we trade one "scary" warning for another.  (I just live with the warnings on my mips32r2 boxes.)

Another issue that comes to mind is what scripts would break?  Scripts are often written with assumpitons about default behavior, so deviating could cause stuff to break out in the hinterlands and then people would have to laboriously trace back the origin to this changed default.

So this doesn't argue against enable xattr support on app-arch/tar, it just limits it to the install media for amd64, x86 and possibly some others like arm.  So my advice @releng is just build the install media with USE=xattr.
Comment 3 Ben Kohler gentoo-dev 2015-08-01 11:40:13 UTC
This breaks tar usage on those kernels when you simply install app-arch/tar with xattr support *available*?
Comment 4 Joshua Kinard gentoo-dev 2015-08-02 05:17:12 UTC
(In reply to Anthony Basile from comment #2)
> 
> The kernel has to be able to support xattr on the filesystems where it will
> be used.  This includes tmpfs.  One problem would be on arches where the
> kernel is not that well supported.  eg. coming to mind are older mips
> machines.  i know kumba had issues when I hard coded --xattrs in catalyst. 
> This just throws a warning but then we trade one "scary" warning for
> another.  (I just live with the warnings on my mips32r2 boxes.)

The problem was running an untar on an XFS filesystem that lacked XFS' xattr support.  That caused....I think 'tar' itself to report "Operation not supported" once //per// file.  ext3/ext4 filesystems only generate the error once and then silence themselves.  Might be an XFS bug in the end, but I'm not sure.  I strip out the xattr option in catalyst before I do runs on my MIPS machines now.

See Bug #538654.
Comment 5 SpanKY gentoo-dev 2015-08-04 02:39:15 UTC
we should have USE=xattr in the default profile imo now
Comment 6 Ben Kohler gentoo-dev 2015-10-12 14:28:02 UTC
Should a new bug be opened about USE=xattr in default profile?  Or how is the best way to get the ball rolling on this?

Seems like a no-brainer to me, any anti- comments seem to be under the impression that having xattr support available on a tool like tar somehow makes that tar unusable for kernels/filesystems w/o support.
Comment 7 SpanKY gentoo-dev 2015-10-12 16:44:59 UTC
there's no need for another bug.  we just announce it on the lists, see if anyone complains, and then enable it.
Comment 8 SpanKY gentoo-dev 2015-10-16 04:11:50 UTC
i've enabled this by default now:
http://gitweb.gentoo.org/repo/gentoo.git/commit/?id=824d0647e08da946ec357e436038d795ac589fd4

was able to build stage1/2/3 and the attr/pyxattr packages were pulled in.  this should start making its way out to release media.
Comment 9 Joshua Kinard gentoo-dev 2015-10-16 05:46:52 UTC
I guess the advice on the kernel side is build xattr into XFS or hunt down the spamming bug I've encountered kernel-side?
Comment 10 Alexander Tsoy 2015-10-16 06:20:11 UTC
(In reply to Joshua Kinard from comment #4)
> The problem was running an untar on an XFS filesystem that lacked XFS' xattr
> support.  That caused....I think 'tar' itself to report "Operation not
> supported" once //per// file.

This reminds me [1]. I guess that setting xattrs also results in different errors on different filesystems while ext[234] fails silently.

[1] https://github.com/systemd/systemd/issues/560#issuecomment-124010744
Comment 11 SpanKY gentoo-dev 2015-10-16 15:32:10 UTC
(In reply to Joshua Kinard from comment #9)

it's up to you to make sure your system is coherent.  that means enabling the kernel options to support USE=xattr, or disabling USE=xattr in your make.conf.
Comment 12 Joshua Kinard gentoo-dev 2015-10-16 18:54:54 UTC
(In reply to SpanKY from comment #11)
> (In reply to Joshua Kinard from comment #9)
> 
> it's up to you to make sure your system is coherent.  that means enabling
> the kernel options to support USE=xattr, or disabling USE=xattr in your
> make.conf.

Okay, still need to get Catalyst fixed then to make xattr support optional/configurable.  It's got the --xattr switch hardcoded right now, which is how I found the XFS issue in the first place.
Comment 13 SpanKY gentoo-dev 2015-10-16 19:34:59 UTC
(In reply to Joshua Kinard from comment #12)

for your own personal/local builds, you're certainly free to make this into a USE flag.  but for public releases, i think you're doing a disservice to users if you're producing stages that lack xattr info in them.