8.28. Acl-2.3.2

The Acl package contains utilities to administer Access Control Lists, which are used to define fine-grained discretionary access rights for files and directories.

Approximate build time: less than 0.1 SBU
Required disk space: 6.5 MB

8.28.1. Installation of Acl

Create the PKGBUILD for the Acl package with the following commands:

mkdir /sources/acl
cd /sources/acl
cat > PKGBUILD << "REALEOF"
# Maintainer: Linux From Scratch <lfs-dev@lists.linuxfromscratch.org>

pkgname="acl"
pkgver="2.3.2"
pkgrel="1"
pkgdesc="The Acl package contains utilities to administer Access Control Lists."
arch=('x86'
      'x86_64')
license=('GPLv2'
         'LGPLv2.1')
groups=('core')
depends=('attr'
         'glibc')
makedepends=('bash'
             'binutils'
             'coreutils'
             'gcc'
             'gettext'
             'grep'
             'm4'
             'make'
             'perl'
             'sed'
             'texinfo')
checkdepends=('automake'
              'diffutils'
              'findutils'
              'libtool')
source=('https://download.savannah.gnu.org/releases/acl/acl-2.3.2.tar.xz')
md5sums=('590765dee95907dbc3c856f7255bd669')

build() {
  cd ${pkgname}-${pkgver}
  ./configure --prefix=/usr         \
              --disable-static      \
              --docdir=/usr/share/doc/acl-${pkgver}
  make
}

# The Acl tests must be run on a filesystem that supports access controls.
check() {
  cd ${pkgname}-${pkgver}
  make check
}

package() {
  cd ${pkgname}-${pkgver}
  make DESTDIR=${pkgdir} install
}
REALEOF

Prepare the build directory for the pacman user and build the package:

chown -R root:pacman .
chmod 2775 .
chmod 664 PKGBUILD
su pacman -c 'makepkg -L --nodeps'

Add the newly created package to the central package repository:

cp acl-2.3.2-1-$(uname -m).pkg.tar.xz \
   /srv/pacman/repos/LFS/
repo-add /srv/pacman/repos/Main/Main.db.tar.xz \
         /srv/pacman/repos/LFS/acl-2.3.2-1-$(uname -m).pkg.tar.xz

Update the local cache and install the Acl package:

pacman -Syu
pacman -S acl --overwrite \* -dd --noconfirm

Finally, copy the source files into the source repository and clean up the build directory:

mkdir /srv/pacman/source/Main/acl
cp PKGBUILD /srv/pacman/source/Main/acl
cd /sources
rm -rf acl

8.28.2. Contents of Acl

Installed programs: chacl, getfacl, and setfacl
Installed library: libacl.so
Installed directories: /usr/include/acl and /usr/share/doc/acl-2.3.2

Short Descriptions

chacl

Changes the access control list of a file or directory

getfacl

Gets file access control lists

setfacl

Sets file access control lists

libacl

Contains the library functions for manipulating Access Control Lists