From nobody Thu Mar 20 16:49:12 2025 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4ZJWkc5VkBz5r5BB; Thu, 20 Mar 2025 16:49:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZJWkc4qYBz3l9q; Thu, 20 Mar 2025 16:49:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742489352; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=i2Q3nfKYrgQwRbUw0zF8UqLBf+SLQHZb5CcSjWbemzg=; b=AB5sIwEXUvLsQo5LUZQMRiZouM+JFW3Ks0ZgMWBrQvna+wqhgGcf6xNv2US5CYN//IKvDK SH9gB7dbe4bIlgHK9MQGXWtTSPI9mtL3lwSVwBQ3OjUBcM0+IDz53dq9bEW2agjroXah31 wmZg69IBKakdheqI2LjWVjl0IP4eIuBtue7FrTPr53uzlP6ys1gPFIWRFOonJuelgTHd3t u1wTiNFvY/lC4xbOTjVo+MYDVRNRKz5yvYB1IkxFbwXoeflVyGBJBM7HdX04NHf0qQsG14 rPp3Skqofs6pAbGDrY54DB3q9uwzLvrQdPKsdrz55Sf76EQZgG9ZgZgpeOqxWA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1742489352; a=rsa-sha256; cv=none; b=yT3E/KEenldnU/+WSArjpgVKplhZt7G+9n8wkhwA54iZrpb6tatyfz1qvSFoG/kL67k9wd cSQwMP2PUkAMgyqq0sVgo9T/ok1tPZn+6gWSbKUTBHjoaLYcpjKXECtrd5//8Oem5NfZIu t+xYRbB1WQXFXxYLdK4DeSQiiLRweiHuHtiNs0viKCO3o69P5oXuDl8UiHchQ07e/Mse7w IwqKpf/ka4tWTauaiNUprhQCD5fQHT3axEHS0ocHBQC+C0Sv5w1jRpjOWlTK1HT0ulrCk0 J5fWjjUjTmBFPLJoEqdYu9U+4fs82t7vUmRE0h93KJFFTIr/UvhTWvv+oez2Ng== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742489352; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=i2Q3nfKYrgQwRbUw0zF8UqLBf+SLQHZb5CcSjWbemzg=; b=FDddRAPMZly2hbuOoMD4QSlVyQx32ZvEBVj9/jzom6Mv26GGzI5Chet2RgbpLCMia9TzsM b8SFsYLNPDFG8BJguP1bx6Aku6bvBiDC6keM9Xz/IsTA/SIieBlcF8HHSeHtK+NWtLwHJQ m/qgEnJQXD9ia6fCQx7aFmNSUOK/D6GPT/ZRtuHjH5tixRGOzMsDIUicqgOzGIPHYhyble EcJ0lKO9LcZfylrF478enx7stOVbw27QJ6UxZ2nbxbE1eO6LBU/cKTNk0nTkKMpAuky/Cs 5NZhlfXEzTr2Tqa1lq7wHJ0oII24OcddpMV0u7klFXW+T8V8+wfc0HMiEvOQRg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZJWkc4QTNz1CdT; Thu, 20 Mar 2025 16:49:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 52KGnCRZ009890; Thu, 20 Mar 2025 16:49:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52KGnCKY009887; Thu, 20 Mar 2025 16:49:12 GMT (envelope-from git) Date: Thu, 20 Mar 2025 16:49:12 GMT Message-Id: <202503201649.52KGnCKY009887@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Baptiste Daroussin Subject: git: 2ec0ea0e3f77 - main - Mk: add a new HAS_SYMBOL_VERSION List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-ports-main@freebsd.org Sender: owner-dev-commits-ports-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2ec0ea0e3f7757b4bb991edb52f26e12cfc8cd2e Auto-Submitted: auto-generated The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/ports/commit/?id=2ec0ea0e3f7757b4bb991edb52f26e12cfc8cd2e commit 2ec0ea0e3f7757b4bb991edb52f26e12cfc8cd2e Author: Baptiste Daroussin AuthorDate: 2025-03-20 09:22:43 +0000 Commit: Baptiste Daroussin CommitDate: 2025-03-20 16:49:02 +0000 Mk: add a new HAS_SYMBOL_VERSION When a port is tagged with this (should contain the list of libraries with SYMBOL version) the ports tree will add an extra check that the built library actually have symbols versions. --- Mk/Scripts/check_have_symbols.sh | 27 +++++++++++++++++++++++++++ Mk/bsd.port.mk | 9 ++++++++- x11/libxkbcommon/Makefile | 2 ++ 3 files changed, 37 insertions(+), 1 deletion(-) diff --git a/Mk/Scripts/check_have_symbols.sh b/Mk/Scripts/check_have_symbols.sh new file mode 100644 index 000000000000..ee3095dabf74 --- /dev/null +++ b/Mk/Scripts/check_have_symbols.sh @@ -0,0 +1,27 @@ +#!/bin/sh + +set -eu +set -o pipefail + +# the 3 implementations of readelf we can use have different output, but they all have a similarity +# for the .gnu.version_d section they all have the symbol version in last element of their output +# and have "Name:" or "vda_name": in the 10th position, no other section displayed have this +# it means that if there are no symbols exported then nothing matches this search pattern. + +STAGEDIR=$1 +shift +ret=0 +failed="" +for lib; do + if ! /usr/bin/readelf -V ${STAGEDIR}$lib | awk 'BEGIN { ret=1 } $10 == "Name:" || $10 == "vda_name:" { ret=0; exit 0 } END { exit ret }'; then + ret=1 + failed="${failed} ${lib}" + fi +done +if [ "$failed" != "" ]; then + echo "the following libraries are supposed to have symbols versioning but they don't" >&2 + for l in ${failed}; do + echo "- $l" >&2 + done +fi +exit $ret diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk index 709f554ee078..5bfbf1728b95 100644 --- a/Mk/bsd.port.mk +++ b/Mk/bsd.port.mk @@ -5394,6 +5394,12 @@ show-dev-errors: . endif . endif #DEVELOPER +. if defined(HAS_SYMBOL_VERSION) +stage-sanity: check_has_symbol_version +check_has_symbol_version: + ${SH} ${SCRIPTSDIR}/check_have_symbols.sh ${STAGEDIR} ${HAS_SYMBOL_VERSION} +. endif # HAS_SYMBOL_VERSION + ${_PORTS_DIRECTORIES}: @${MKDIR} ${.TARGET} @@ -5465,7 +5471,8 @@ _STAGE_SEQ= 050:stage-message 100:stage-dir 150:run-depends \ 900:add-plist-info 910:add-plist-docs 920:add-plist-examples \ 930:add-plist-data 940:add-plist-post ${POST_PLIST:C/^/990:/} \ ${_OPTIONS_install} ${_USES_install} \ - ${_OPTIONS_stage} ${_USES_stage} ${_FEATURES_stage} + ${_OPTIONS_stage} ${_USES_stage} ${_FEATURES_stage} \ + 994:stage-sanity . if defined(DEVELOPER) _STAGE_SEQ+= 995:stage-qa . else diff --git a/x11/libxkbcommon/Makefile b/x11/libxkbcommon/Makefile index 489cde98c08e..32f1662d4802 100644 --- a/x11/libxkbcommon/Makefile +++ b/x11/libxkbcommon/Makefile @@ -25,6 +25,8 @@ CPE_VENDOR= xkbcommon SHEBANG_FILES= test/xkeyboard-config-test.py.in \ test/*.py +HAS_SYMBOL_VERSION= ${PREFIX}/lib/libxkbregistry.so.0.8.1 + OPTIONS_DEFINE= EVDEV WAYLAND X11 OPTIONS_DEFAULT=EVDEV WAYLAND X11 OPTIONS_SUB= yes