From nobody Wed Jul 12 14:19:26 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 4R1KcZ5lSBz4h4Cm; Wed, 12 Jul 2023 14:19:26 +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 4R1KcZ40X3z3QZf; Wed, 12 Jul 2023 14:19:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1689171566; 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=7nUPFLjV0Nq6swXm5ZmmHJeiL9TjEsdqK15th3Uouuc=; b=d4kSo3VEdWHsHy07b7/Pm3KxnM7t8u4eL9blCp3EBbAn6jzF9nMMTZHzb8TJtKOmPrsty2 XYoqZZWoILcZ4Ti814nqv9+27jv45dcRcpA0goAi6woHHQ3e4gBVuKYv4opwWLGhqjDd6/ JGJe2kbl929Rbg12iKJBLC//Z0NVvz3g82omOsLVZ+YKaptG6kZnBEvkM0lgBdC24aJdHw ie73+nfuFGbsmtJDQT97DShfJqIBWEc1qkyLNqHNiLHc6lNrxi8YtNySRGvPd1xPk4sauS jGT06saSQTNgFX+62xp2heNPNC4Yx1MTdjZgdri5goldJumIvC3cfZ/SSLoaHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1689171566; 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=7nUPFLjV0Nq6swXm5ZmmHJeiL9TjEsdqK15th3Uouuc=; b=p6/9DvKvHjMb9iTWR1liil8vni81p3Fq6mukVg7uXY3Nxpr1BAd62wvP7EhLnamb8r9Oqd X9dLlGL4TEQUhAeXX7iVznjWUATM6H/AWHZwLZmPVLPIozJoiYIgP0GmuLGhYAdjzznkRG UPyQIHcDYovEDsdh0OzRhy8wicFjDv9t3x2R0FGZ7l0TpiCjoU9CBXuJfxsABTlim++xry O0wfUKTL+HnK8Xd+NGJmM1qSeM7vQbxZtU6HDF7b5RVrkglqhn8UrWgx7WCU2BmgBpANmQ zet2N1J8Fw1hPiJ2mnN9e6obNhO4MdGVrWNJ0krzw8Hg2PZbGdt2C/YsbGnsBQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1689171566; a=rsa-sha256; cv=none; b=PWzgslPeiEWI0r+5ACrHSR3th9974JHHfcIlERlVMvLazxSybF1+Dy15SbZ+pc36QLP3sA xOVDx3zRv1jm8ujWhJJJBUyGr2N9LT8p86NulkXBVCeI7ecefMITnHXY/WLym5gsQQLI00 6pMF1SaXfFT2KiYArN+L5GtGQGlokdhwqAdciZxhbYJxYUWCiGZ/PXHmN1Kst96NJSOB8M OBzPF+8lGKPhhMDZdmbWii10auHnfU1FSckFh4TGUGDHLCedAnnxsT/oNcpd579AFWxoF+ m/PhkFwnRe/s7L+O75kEgTpy8an7i3sz7gekQ7k0QaG6sTFjmshjEcoV06DsOA== 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 4R1KcZ2sZcz1Bl6; Wed, 12 Jul 2023 14:19:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 36CEJQbJ010869; Wed, 12 Jul 2023 14:19:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 36CEJQtv010868; Wed, 12 Jul 2023 14:19:26 GMT (envelope-from git) Date: Wed, 12 Jul 2023 14:19:26 GMT Message-Id: <202307121419.36CEJQtv010868@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 349b11cfc82b - main - framework: Implement fetch-url-recursive-list and fetch-urlall-recursive-list 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: 0mp X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 349b11cfc82b530ac7ee36cd927732269ca67997 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by 0mp: URL: https://cgit.FreeBSD.org/ports/commit/?id=349b11cfc82b530ac7ee36cd927732269ca67997 commit 349b11cfc82b530ac7ee36cd927732269ca67997 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2023-06-30 16:27:54 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2023-07-12 14:19:10 +0000 framework: Implement fetch-url-recursive-list and fetch-urlall-recursive-list The recursive variants of fetch-url-list and fetch-urlall-list provide a stable interface to a list of all the to-be-accessed URLs. That is quite handy, e.g., when a list like that is necessary to implement security policies. Reviewed by: pizzamig Approved by: portmgr (pizzamig) Sponsored by: Klara Inc. Differential Revision: https://reviews.freebsd.org/D40810 --- CHANGES | 10 ++++++++++ Mk/bsd.port.mk | 26 ++++++++++++++++++++++++++ 2 files changed, 36 insertions(+) diff --git a/CHANGES b/CHANGES index 6d6da021c969..5e98b3ee86a4 100644 --- a/CHANGES +++ b/CHANGES @@ -10,6 +10,16 @@ in the release notes and/or placed into UPDATING. All ports committers are allowed to commit to this file. +20230712: +AUTHOR: 0mp@FreeBSD.org + + Two new targets are now available: fetch-url-recursive-list + and fetch-urlall-recursive-list. They are the recursive variants + of the well-established targets fetch-url-list and fetch-urlall-list, + which allow for listing the complete URLs of DISTFILES and PATCHFILES + of a port. The recursive variants add the URLs of the port's dependencies + to the output. + 20230430: AUTHOR: zirias@FreeBSD.org diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk index e35313491bcb..5e3c2e7fad2f 100644 --- a/Mk/bsd.port.mk +++ b/Mk/bsd.port.mk @@ -567,9 +567,15 @@ FreeBSD_MAINTAINER= portmgr@FreeBSD.org # fetch-url-list # - Show list of URLS to retrieve missing ${DISTFILES} and # ${PATCHFILES} for this port. +# fetch-url-recursive-list +# - Show list of URLS to retrieve missing ${DISTFILES} and +# ${PATCHFILES} for this port and dependencies. # fetch-urlall-list # - Show list of URLS to retrieve ${DISTFILES} and # ${PATCHFILES} for this port. +# fetch-urlall-recursive-list +# - Show list of URLS to retrieve ${DISTFILES} and +# ${PATCHFILES} for this port and dependencies. # # all-depends-list # - Show all directories which are dependencies @@ -3143,6 +3149,13 @@ fetch-url-list-int: . endif . endif +. if !target(fetch-url-recursive-list-int) +fetch-url-recursive-list-int: fetch-url-list-int + @recursive_cmd="fetch-url-list-int"; \ + recursive_dirs="$$(${ALL-DEPENDS-FLAVORS-LIST})"; \ + ${_FLAVOR_RECURSIVE_SH} +. endif + # Prints out all the URL for all the DISTFILES and PATCHFILES. . if !target(fetch-urlall-list) @@ -3150,12 +3163,25 @@ fetch-urlall-list: @cd ${.CURDIR} && ${SETENV} FORCE_FETCH_ALL=yes ${MAKE} fetch-url-list-int . endif +. if !target(fetch-urlall-recursive-list) +fetch-urlall-recursive-list: fetch-urlall-list + @recursive_cmd="fetch-urlall-list"; \ + recursive_dirs="$$(${ALL-DEPENDS-FLAVORS-LIST})"; \ + ${_FLAVOR_RECURSIVE_SH} +. endif + # Prints the URL for all the DISTFILES and PATCHFILES that are not here . if !target(fetch-url-list) fetch-url-list: fetch-url-list-int . endif +. if !target(fetch-url-recursive-list) +fetch-url-recursive-list: fetch-url-list + @recursive_cmd="fetch-url-list"; \ + recursive_dirs="$$(${ALL-DEPENDS-FLAVORS-LIST})"; \ + ${_FLAVOR_RECURSIVE_SH} +. endif # Extract