1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-02-05 11:35:01 +00:00

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
This commit is contained in:
Mateusz Piotrowski 2023-06-30 16:27:54 +00:00
parent 5457f710e8
commit 349b11cfc8
2 changed files with 36 additions and 0 deletions

10
CHANGES
View File

@ -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

View File

@ -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