]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
libcap: Adjust the lfs file to place pkg-config files in the correct place
authorAdolf Belka <adolf.belka@ipfire.org>
Wed, 10 May 2023 20:41:10 +0000 (22:41 +0200)
committerPeter Müller <peter.mueller@ipfire.org>
Thu, 11 May 2023 20:10:00 +0000 (20:10 +0000)
- 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>
config/rootfiles/common/libcap
lfs/libcap

index 194fc7f199174fe1839fae8b5d768c38a64ba5ea..af1c22e83c4e43050cb5be39225c3f90d63e76f6 100644 (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
index 9eab679ff7148042fba7bc236a6d261c36584c51..63f4ef8b0c3da14c3ae3a0a102ff9bf7961b3e6d 100644 (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)