git: 349b11cfc82b - main - framework: Implement fetch-url-recursive-list and fetch-urlall-recursive-list
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 12 Jul 2023 14:19:26 UTC
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