libcap: Adjust the lfs file to place pkg-config files in the correct place

- libcap places the files by default in /lib and not /usr/lib etc. To fix this libcap made
   a symlink for the library file from /lib to /usr/lib. However the .pc files were left
   in /lib/pkgconfig and not /usr/lib/pkgconfig and were therefore not found by the update
   of rng-tools which now required libcap to be found.
- Changed the prefix settings for libcap which placed the libraries and .pc files in the
   correct locations while keeping the executables in their existing location.
- This removed the need for symlinking /usr/lib/libcap.so to /lib/libcap.so.2.67 as the
   libraries are now placed in /usr/lib
- Installed the ipfire build with these changes into a vm system and confirmed that
   everything worked. Input from Michael Tremer that if ping worked then libcap was
   functioning correctly.
- The prefixes have to be applied to both make and make install to end up with the files
   in the correct places.

Tested-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
This commit is contained in:
Adolf Belka
2023-05-10 22:41:10 +02:00
committed by Peter Müller
parent 173f1ffca3
commit 133b2ae6bb
2 changed files with 17 additions and 13 deletions

View File

@@ -1,11 +1,3 @@
lib/libcap.so.2
lib/libcap.so.2.67
#lib/libpsx.so
#lib/libpsx.so.2
lib/libpsx.so.2.67
#lib/pkgconfig/libcap.pc
#lib/pkgconfig/libpsx.pc
lib/security/pam_cap.so
sbin/capsh
sbin/getcap
sbin/getpcaps
@@ -13,6 +5,15 @@ sbin/setcap
#usr/include/sys/capability.h
#usr/include/sys/psx_syscall.h
usr/lib/libcap.so
usr/lib/libcap.so.2
usr/lib/libcap.so.2.67
#usr/lib/libpsx.so
#usr/lib/libpsx.so.2
usr/lib/libpsx.so.2.67
#usr/lib/pkgconfig/libcap.pc
#usr/lib/pkgconfig/libpsx.pc
#usr/lib/security
usr/lib/security/pam_cap.so
#usr/share/man/man1/capsh.1
#usr/share/man/man3/cap_clear.3
#usr/share/man/man3/cap_clear_flag.3

View File

@@ -72,10 +72,13 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar axf $(DIR_DL)/$(DL_FILE)
# Prevent a static library from being installed
cd $(DIR_APP) && sed -i '/install -m.*STA/d' libcap/Makefile
cd $(DIR_APP) && make GOLANG=no
cd $(DIR_APP) && make install GOLANG=no
rm -vf /lib/libcap.so
ln -svf /lib/libcap.so.2.67 /usr/lib/libcap.so
chmod +x /lib/libcap.so.*
cd $(DIR_APP) && make GOLANG=no \
prefix=/usr \
exec_prefix= \
lib_prefix=/usr
cd $(DIR_APP) && make install GOLANG=no \
prefix=/usr \
exec_prefix= \
lib_prefix=/usr
@rm -rf $(DIR_APP)
@$(POSTBUILD)