Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 327997 - sys-fs/encfs should not depend on sys-apps/attr
Summary: sys-fs/encfs should not depend on sys-apps/attr
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High enhancement
Assignee: Marcelo Goes (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-12 21:10 UTC by Martin Väth
Modified: 2010-08-31 19:06 UTC (History)
0 users

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


Attachments
Patch for ebuild to provide USE=xattr, avoiding automagic (encfs-xattr.patch,605 bytes, patch)
2010-07-16 14:13 UTC, Martin Väth
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Väth 2010-07-12 21:10:10 UTC
For some reason sys-fs/encfs-1.6 lists sys-apps/attr in its DEPEND.
However, I tested, and encfs-1.6 compiles and runs fine without this package.
Please drop this dependency or make it at least optional by a USE flag,
since for systems on which extended file attributes are not desired,
it does not make any sense (or might even introduce some problems, possibly
including security issues) to have sys-apps/attr installed.
Comment 1 Samuli Suominen (RETIRED) gentoo-dev 2010-07-12 21:44:20 UTC
configure.ac has:

AC_CHECK_HEADERS([attr/xattr.h sys/xattr.h])

encfs/encfs.cpp has:

#ifdef HAVE_ATTR_XATTR_H
#include <attr/xattr.h>

it's checked for and used if present build-time. please write a patch to upstream to make it configurable from ./configure switch, meanwhile I see no reason to do anything in tree
Comment 2 Martin Väth 2010-07-13 12:36:56 UTC
(In reply to comment #1)
> configure.ac has:
> 
> AC_CHECK_HEADERS([attr/xattr.h sys/xattr.h])
>
> it's checked for and used if present build-time. please write a patch [...]

Note that sys/xattr.h is part of glibc, so the second header-file is fine,
and the removal of the attr/xattr.h automagic does not require any patch:
To force a negative result, it suffices to export the environment variable
  ac_cv_header_attr_xattr_h=no
This is not a hack but documented behavior:
This cache variable name is documented in the autoconf info
for AC_CHECK_HEADERS.

In fact, exporting of this variable appears "cleaner" to me than any patch,
since this removes the automagic even if a future version of autoconf
should call AC_CHECK_HEADERS(attr/xattr.h) implicitly for some other reason.
Comment 3 Martin Väth 2010-07-16 14:13:44 UTC
Created attachment 239059 [details, diff]
Patch for ebuild to provide USE=xattr, avoiding automagic

For the case that my previous explanation was a bit unclear:
I attach a patch for the ebuild to make the sys-apps/attr dependency
really optional (and non-automagic).

As I tried to explain previously, I think this is cleaner than an
upstream patch could be.
Comment 4 Martin Väth 2010-07-16 14:20:07 UTC
(Since the bug is not assigned yet and nobody is on the CC list,
I guess I have to reopen it so that my previous replies do not vanish unseen).
Comment 5 Jeroen Roovers (RETIRED) gentoo-dev 2010-07-19 00:51:56 UTC
(In reply to comment #4)
> (Since the bug is not assigned yet and nobody is on the CC list,
> I guess I have to reopen it so that my previous replies do not vanish unseen).

It helps...
Comment 6 Samuli Suominen (RETIRED) gentoo-dev 2010-08-31 19:06:02 UTC
that works. thanks.

+  31 Aug 2010; Samuli Suominen <ssuominen@gentoo.org> encfs-1.6.ebuild:
+  USE="xattr" by Martin Väth.