From nobody Sat Jun 10 17:14:20 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 4Qdl1900g7z4c3FB; Sat, 10 Jun 2023 17:14:21 +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 4Qdl186gMgz3tLw; Sat, 10 Jun 2023 17:14:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1686417260; 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=TmFh1Bu/tyCgMWJ1eiFa/hnl1zumwssZAxtx8trCOyI=; b=j6jpGCPPdAG09nF/gjfEupkH+l1mJUXOK1zCBHRxetcMBebVcbSIfZthRqi3XzxYk9TpMt Mt8RwT5q2/saDBoWFkFiibxX80YN2ETFvQu+0S8HCx/NdCSLMOfHkW2ikulAvzCSrJwStc 0Z8qt5BrVHtr75o3yYe6d0uda42CdBdr9kqM4zkJ1izEwShc3YBm7k5aX3LkaAuNJA0Kn0 jJsF+Mj8RSyPD5gCujkg5kLAnAk2ZuwVxVACm8jo67Ghbn0TjO78lcmf2SyCPSGNcdKR3C mUDv+umA6Xww2BPQPjPV0CqsN98ThylPrO/HR1X8P8WBf15KniiO6b7HUVIS/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1686417260; 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=TmFh1Bu/tyCgMWJ1eiFa/hnl1zumwssZAxtx8trCOyI=; b=dTezWtNiNidl6Xic89IMjhyBzlQSnJ73Po5fnJpcIDZnvLj1/gx6WbQ1cVgMlmIiHNheq+ nrwQFPfyFJj9OoysOwGLi8tYD3Uj5aYI/jCcx8031LG7z5pHHRIWavxh0hfYI1MNpcZ3MU G4+PZHIHuAmnxzLTnSDdG2q679eqTBY/nEAe03u/JgpGODONRCUBw3s3Mbxjq2gx/Stg1F Fjhc1HL+puK2AdX8vRqJTMVQyjWR97mS0N7Qwa7X5k4EJ8ypXyyXp+ROQe2cLZ4TCZdfsG SrzOkV6qopYwNWpyiRHJy+AgB5MmtXcubrsmUa5JzK1FJiJYvDJLUsOBjb6m8Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1686417260; a=rsa-sha256; cv=none; b=hL3y7ptfrQQtdGhAZ/uH42K7lWuf2xXsPpm0EDKrkRxSjvcRAjafEOpUOdbikIzDHTlBWq ft7A6qmE1zsIsk18i/KJpObNhlRVRQXpMbcryIC/w2aWYTZPS4zYZGY35TaM24f9iGHeQV jCTSgr6+Lyuw/g+7KDf2XGDd+WXzCIIWU84jew0jFU4P8Y5+XS3X9uN1z9q1Z1q8yQ9HEF h6lBlMh5YtfNyujn/YpHoOD/7wtGcsVOeO1AgwLECPsmlLRbf1HCeSVotVR9bYMJQ6QD+x R6i9CmZQU7PkFYFaJ0MV5tRm14ljc1mzquDOTCkdELy23uiTHeqiT7nrvnQ/6A== 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 4Qdl185jpgzPcw; Sat, 10 Jun 2023 17:14:20 +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 35AHEKnJ082683; Sat, 10 Jun 2023 17:14:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35AHEKRC082682; Sat, 10 Jun 2023 17:14:20 GMT (envelope-from git) Date: Sat, 10 Jun 2023 17:14:20 GMT Message-Id: <202306101714.35AHEKRC082682@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Muhammad Moinur Rahman Subject: git: ca6b3bd6d2c4 - main - sysutils/incron: Fix build with llvm15 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: bofh X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ca6b3bd6d2c4cb4cc5c31f1ccfa4adce51cf51b8 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by bofh: URL: https://cgit.FreeBSD.org/ports/commit/?id=ca6b3bd6d2c4cb4cc5c31f1ccfa4adce51cf51b8 commit ca6b3bd6d2c4cb4cc5c31f1ccfa4adce51cf51b8 Author: Muhammad Moinur Rahman AuthorDate: 2023-06-10 14:22:43 +0000 Commit: Muhammad Moinur Rahman CommitDate: 2023-06-10 17:14:07 +0000 sysutils/incron: Fix build with llvm15 - Remove legacy codes related to gcc42 - Pet portclippy - Utilize USES=localbase Approved by: portmgr (blanket) --- sysutils/incron/Makefile | 18 ++++++++++-------- sysutils/incron/files/extra-patch-FreeBSD_14 | 20 ++++++++++++++++++++ 2 files changed, 30 insertions(+), 8 deletions(-) diff --git a/sysutils/incron/Makefile b/sysutils/incron/Makefile index 3e804faea4e8..4aec6aca618b 100644 --- a/sysutils/incron/Makefile +++ b/sysutils/incron/Makefile @@ -15,27 +15,29 @@ LICENSE_FILE_MIT= ${WRKSRC}/LICENSE-X11 LIB_DEPENDS= libinotify.so:devel/libinotify -USES= compiler +USES= compiler localbase:ldflags USE_GITHUB= yes GH_ACCOUNT= ar- GH_TAGNAME= 81421d3a8bde0989d7e167d8a814d5232896c930 -CPPFLAGS+= -I${LOCALBASE}/include -D__NR_inotify_init -LDFLAGS+= -L${LOCALBASE}/lib -linotify +USE_RC_SUBR= ${PORTNAME} + MAKE_ARGS= PREFIX="${PREFIX}" USER=${UID} \ DOCDIR="${PREFIX}/etc" \ MANPATH=${MANPREFIX}/man -USE_RC_SUBR= ${PORTNAME} + +CPPFLAGS+= -D__NR_inotify_init +LDFLAGS+= -linotify .include +.if ${OPSYS} == FreeBSD && ( ${OSVERSION} >= 1400079 || ( ${OSVERSION} >= 1302505 && ${OSVERSION} < 1400000 )) +EXTRA_PATCHES= ${FILESDIR}/extra-patch-FreeBSD_14 +.endif + post-patch: ${REINPLACE_CMD} -e 's,/etc/incron,${PREFIX}/etc/incron,' \ ${WRKSRC}/*conf* ${WRKSRC}/Makefile ${WRKSRC}/*.[158h] \ ${WRKSRC}/*.cpp ${REINPLACE_CMD} -e '/INITDIR/d' ${WRKSRC}/Makefile -.if ${CHOSEN_COMPILER_TYPE} == gcc && ${COMPILER_VERSION} <= 42 - ${REINPLACE_CMD} -e '/pragma/d' ${WRKSRC}/inotify-cxx.cpp \ - ${WRKSRC}/usertable.cpp -.endif .include diff --git a/sysutils/incron/files/extra-patch-FreeBSD_14 b/sysutils/incron/files/extra-patch-FreeBSD_14 new file mode 100644 index 000000000000..9d2606f8e8a7 --- /dev/null +++ b/sysutils/incron/files/extra-patch-FreeBSD_14 @@ -0,0 +1,20 @@ +--- usertable.cpp.orig 2023-06-10 14:06:49 UTC ++++ usertable.cpp +@@ -571,17 +571,6 @@ bool UserTable::MayAccess(const std::string& rPath, bo + return false; // no access right found + } + +-#ifndef __linux__ +-static int +-clearenv(void) +-{ +- extern char **environ; +- +- environ[0] = NULL; +- return 0; +-} +-#endif +- + void UserTable::RunAsUser(std::string cmd) const + { + struct passwd* pwd = getpwnam(m_user.c_str());