From nobody Mon May 22 18:27:48 2023 X-Original-To: dev-commits-ports-all@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 4QQ5Xj0YjMz4CJ83; Mon, 22 May 2023 18:27:49 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QQ5Xj05g6z3wB2; Mon, 22 May 2023 18:27:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1684780069; 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=gdBDI+wsILfov6pRyncVrohGs3K/QTZ0dEQsd+26vWI=; b=PI+Lo4tsH3FXIpFIGNblBFDf8Yi7SnVSg+VckDVgWB3CKvTkf5giEgcEP4jaDdJ6IH4EAO MvP4pzfXIokOEQE9M33WqyC6vtkeHPZDjWZRknxNgpBP4XNARyyDCg+4oN6ZsCnHGNt29p gElmGaEv2WKvYqMTmBGdRhymFig7D70DPp4NSM5PRVbQ/l8zd3ylzMJVthvB0K3GfEgyuh KdeIvMTmG1nq/RhGUlWg+7D5jL1mFYilkXMBhwl/Ym4W0FsQll8l6CDuEjBbSuN0YgU41o z161WBTiXQtbwCAxbFI2VG6QTzQziY7R3KC05nxKPlxlNTz2MrYcxc/6HdODBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1684780069; 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=gdBDI+wsILfov6pRyncVrohGs3K/QTZ0dEQsd+26vWI=; b=UiABQCHJlLdmR78kQC7iyhYFlExtNR7R1vSaz98EmKz6z/diQSZj2voPuYJ1+bFBoadY8U Vm4KNaAqw2uQ8jtFVJrVJD1H03jFFXwEPOo1d6ZZv7tTPZKW7aWVYlSZl16IVvERXFOSyG f4KS7y2GSJrCZByNU+867va6EiSGi+IbEX3mIMZ2vS2jwF8tg2S27IUHATuUTwTloy9+6v hxuRQpGqv8xsB0HpoI/1vYfb8l3V3G1dy3HZeTmYNA+M7q61dZ6JKvY9xycKb634ak6dzV 2r9Vk+jfSt6YdXRvl7FFhKCNNE9BiZsl7ELaHOQuv9700JyQLRzEaKaynE4AMw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1684780069; a=rsa-sha256; cv=none; b=wh6e/60O7KPSXAn486R97D2PNoxKp8xiCYO/RHzBkib6gLKLLrW17uzKsCm+WBvc8gRb1j xJ6DGJ44V/j8g1OJKZk4rLm5uYcnOOmp+4AoTDSEDGt5X3grxbInkyquHT7LfN65QKxKcO rhWUP5gSS7i4U7uNUskipE4uaGt8li/0phBlW2ahYFvr1O9a4vY4czAzKv696x8zt3zJWm xI86+XBkmWum6WXjDiWW3N5muwO0h7DslXGeEoahU2SSDx0L0EVy/FRrjFtiK/b/WSezR5 XEzJovQmyCi29sPIPZ6Jyqz+KxX+mNDRodELKzGClcf8Her4oRnJhW8n5Gr8dw== 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 4QQ5Xh6DJdzSqt; Mon, 22 May 2023 18:27:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 34MIRmaX038680; Mon, 22 May 2023 18:27:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 34MIRmo1038679; Mon, 22 May 2023 18:27:48 GMT (envelope-from git) Date: Mon, 22 May 2023 18:27:48 GMT Message-Id: <202305221827.34MIRmo1038679@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Dmitry Marakasov Subject: git: f5bf335f3015 - main - devel/fossology-nomos-standalone: try to fix build on 14.x List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: amdmi3 X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f5bf335f30152e9a883e7cdb984cd5bcd3580b0a Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by amdmi3: URL: https://cgit.FreeBSD.org/ports/commit/?id=f5bf335f30152e9a883e7cdb984cd5bcd3580b0a commit f5bf335f30152e9a883e7cdb984cd5bcd3580b0a Author: Dmitry Marakasov AuthorDate: 2023-05-22 14:24:19 +0000 Commit: Dmitry Marakasov CommitDate: 2023-05-22 18:27:09 +0000 devel/fossology-nomos-standalone: try to fix build on 14.x Adjust code to XSI compliant strerror_r version FreeBSD has Reported by: pkg-fallout --- .../files/patch-src_nomos_agent_nomos.c | 38 ++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/devel/fossology-nomos-standalone/files/patch-src_nomos_agent_nomos.c b/devel/fossology-nomos-standalone/files/patch-src_nomos_agent_nomos.c new file mode 100644 index 000000000000..172d2a70930b --- /dev/null +++ b/devel/fossology-nomos-standalone/files/patch-src_nomos_agent_nomos.c @@ -0,0 +1,38 @@ +There are two strerror_r impementations, + +int strerror_r(int errnum, char *buf, size_t buflen); /* XSI-compliant */ +char *strerror_r(int errnum, char *buf, size_t buflen); /* GNU-specific */ + +FreeBSD only uses the former, while Linux may use either depending +on compiler flags. I haven't figured out how to check for this +correctly, so just use right version on FreeBSD for now. + +--- src/nomos/agent/nomos.c.orig 2022-11-15 10:13:05 UTC ++++ src/nomos/agent/nomos.c +@@ -309,16 +309,26 @@ int main(int argc, char **argv) + + if (putenv("LANG=C") < 0) + { ++#if defined(__FreeBSD__) ++ strerror_r(errno, sErrorBuf, sizeof(sErrorBuf)); ++ LOG_FATAL("Cannot set LANG=C in environment. Error: %s", sErrorBuf) ++#else + char * estr = strerror_r(errno, sErrorBuf, sizeof(sErrorBuf)); + LOG_FATAL("Cannot set LANG=C in environment. Error: %s", estr) ++#endif + Bail(-__LINE__); + } + + /* Save the current directory */ + if (getcwd(gl.initwd, sizeof(gl.initwd)) == NULL_STR) + { ++#if defined(__FreeBSD__) ++ strerror_r(errno, sErrorBuf, sizeof(sErrorBuf)); ++ LOG_FATAL("Cannot obtain starting directory. Error: %s", sErrorBuf) ++#else + char *estr = strerror_r(errno, sErrorBuf, sizeof(sErrorBuf)); + LOG_FATAL("Cannot obtain starting directory. Error: %s", estr) ++#endif + Bail(-__LINE__); + } +