Skip to content

Installation of libsepol fails when using /usr/lib #2

@fishilico

Description

@fishilico

Hi,

I'm packaging libsepol for Arch Linux and as this distro is using /usr/lib for all libraries, I'm using this command line to install libsepol:

make DESTDIR="${pkgdir}" LIBDIR="${pkgdir}"/usr/lib SHLIBDIR="${pkgdir}"/usr/lib install

However this creates a broken symlink, as /usr/lib/libsepol.so is linked to ../../lib/libsepol.so.1 which does not exists in the temporary build directory.

This symlink is created by https://github.com/SELinuxProject/selinux/blob/libsepol-2.4-rc3/libsepol/src/Makefile#L73 :

cd $(LIBDIR) && ln -sf ../../`basename $(SHLIBDIR)`/$(LIBSO) $(TARGET)

... which is expanded to:

cd /tmp/makepkg-user/libsepol/pkg/libsepol/usr/lib && ln -sf ../../`basename /tmp/makepkg-user/libsepol/pkg/libsepol/usr/lib`/libsepol.so.1 libsepol.so

... which is buggy.

A possible solution consists in replacing the command in the Makefile with ln -sf --relative $(SHLIBDIR)/$(LIBSO) $(LIBDIR)/$(TARGET), available since coreutils-8.16 (according to http://savannah.gnu.org/forum/forum.php?forum_id=7170).

Could you please do this before the next release, for all libraries in this project?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions