From mboxrd@z Thu Jan 1 00:00:00 1970 From: Adolf Belka To: development@lists.ipfire.org Subject: [PATCH 2/2] libcap: Adjust the lfs file to place pkg-config files inj correct place Date: Mon, 08 May 2023 13:34:39 +0200 Message-ID: <20230508113439.2241-2-adolf.belka@ipfire.org> In-Reply-To: <20230508113439.2241-1-adolf.belka@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0576165048065609346==" List-Id: --===============0576165048065609346== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable - libcap places the files by default in /lib and not /usr/lib etc. To fix thi= s libcap made a symlink for the library file from /lib to /usr/lib. However the .pc file= s 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 f= iles 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 confirme= d that everything worked. Input from Michael Tremer that if ping worked then libc= ap was functioning correctly. - The prefixes have to be applied to both make and make install to end up wit= h the files in the correct places. Tested-by: Adolf Belka Signed-off-by: Adolf Belka --- config/rootfiles/common/libcap | 17 +++++++++-------- lfs/libcap | 13 ++++++++----- 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/config/rootfiles/common/libcap b/config/rootfiles/common/libcap index 194fc7f19..af1c22e83 100644 --- a/config/rootfiles/common/libcap +++ b/config/rootfiles/common/libcap @@ -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 diff --git a/lfs/libcap b/lfs/libcap index 9eab679ff..63f4ef8b0 100644 --- a/lfs/libcap +++ b/lfs/libcap @@ -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=3Dno - cd $(DIR_APP) && make install GOLANG=3Dno - 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=3Dno \ + prefix=3D/usr \ + exec_prefix=3D \ + lib_prefix=3D/usr + cd $(DIR_APP) && make install GOLANG=3Dno \ + prefix=3D/usr \ + exec_prefix=3D \ + lib_prefix=3D/usr @rm -rf $(DIR_APP) @$(POSTBUILD) --=20 2.40.1 --===============0576165048065609346==--