6.17. Attr-2.4.46

The Attr package contains utilities and libraries for managing filesystem extended attributes.

Approximate build time: 0.1 SBU
Required disk space: 3 MB

6.17.1. Installation of Attr

Add a missing test script:

cat > test/sort-getfattr-output << "EOF"
#! /usr/bin/perl -w

undef $/;
print join("\n\n", sort split(/\n\n/, ><)), "\n\n";
chmod 755 test/sort-getfattr-output

Modify the documentation directory so that it is a versioned directory and also adds support for a DESTDIR installation:

sed -i -e 's|/@pkg_name@|&-@pkg_version@|' \
       -e 's|@prefix|$(DESTDIR)&|'         \
       -e 's|@libexec|$(DESTDIR)&|'        \

Modify the configure script to use file from /tools:

sed -i 's@/usr/bin/file@/tools/bin/file@g' configure

Prepare Attr for compilation:

MAKE=/tools/bin/make MSGFMT=/tools/bin/msgfmt \
MSGMERGE=/tools/bin/msgmerge XGETTEXT=/tools/bin/xgettext \
./configure --prefix=/usr --libexecdir=/usr/lib

Compile the package:


To test the results, issue:

make tests root-tests ext-tests

Install the package:

make install install-dev install-lib
chmod -v 755 /usr/lib/libattr.{la,so.1.1.0}
rm -v /usr/lib/libattr.so
mv -v /usr/lib/libattr.so* /lib
ln -sfv ../../lib/libattr.so.1.1.0 /usr/lib/libattr.so

6.17.2. Contents of Attr

Installed program: attr, getfattr
Installed libraries: libattr.{a,so}
Installed directories: /usr/share/doc/attr-2.4.46

Short Descriptions


extends attributes on filesystem objects


gets the extended attributes of filesystem objects


contains the attr API functions