From patchwork Wed May 10 20:41:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adolf Belka X-Patchwork-Id: 6856 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4QGn4M1ycZz3wk1 for ; Wed, 10 May 2023 20:41:23 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail02.haj.ipfire.org", Issuer "R3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4QGn4J6FvVzyp; Wed, 10 May 2023 20:41:20 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4QGn4J44vhz3028; Wed, 10 May 2023 20:41:20 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4QGn4G37YLz2xtr for ; Wed, 10 May 2023 20:41:18 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4QGn4G1Fv6zv5; Wed, 10 May 2023 20:41:18 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1683751278; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=EEf7tjYtvg8zHEw9tJUKFxdFf/fBYPJ55A1OmL04TdI=; b=vARGDaRIKlplUBAW+F97YitKiaEIVOcwqUZ/UgomfLPnM+o354jA8KqXCZNRjR20JGyu0Z YXL57X4wCVGYIuCw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1683751278; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=EEf7tjYtvg8zHEw9tJUKFxdFf/fBYPJ55A1OmL04TdI=; b=vb2o0iQB+Ze1Wp+L1j/gPFSQdYm+OXrSs553uDiKQ1Def9SzUUvh32tEnk9shSri97RkQv hI7eyX52kHQDxQDJSYjUEJGTeGlykgVyan/CbHkIuMd0nLnCx5vUD7S3r5JfGXrD6AvcWs MTndFjJ2yB0b4jaZ8lncWK2u8z+SiofetwkWHuAIkwVQfiLk4j3iQ4PvWdzBHfYwWWHBM7 V1Ni1PGAcG9TREQl1yel/N1IFWhL7EgnlYDnKDIbpLzy2a7qtlzUhyEaoqlxqojarIylTA xSYZJXPhbdpKUzwSKpJ6WA3GDVeKBKGabliX+84jB5JL6ShiG+D2fTRvrd0kMA== From: Adolf Belka To: development@lists.ipfire.org Subject: [PATCH v2 2/2] libcap: Adjust the lfs file to place pkg-config files in the correct place Date: Wed, 10 May 2023 22:41:10 +0200 Message-Id: <20230510204110.1183975-2-adolf.belka@ipfire.org> In-Reply-To: <20230510204110.1183975-1-adolf.belka@ipfire.org> References: <20230510204110.1183975-1-adolf.belka@ipfire.org> MIME-Version: 1.0 X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: IPFire development talk List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: development-bounces@lists.ipfire.org Sender: "Development" - 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 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=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)