Sat May 4 17:58:53 2024 UTC (19d)
mk: Document ALLOW_NETWORK_ACCESS

This can be useful for e.g. `show-go-modules` or similar targets where
such use is okay.

(Probably we should adjust such targets in order to unconditionally set
ALLOW_NETWORK_ACCESS because they are likely not very useful otherwise,
but this is a separate problem.)


(leot)
diff -r1.2054 -r1.2055 pkgsrc/mk/bsd.pkg.mk

cvs diff -r1.2054 -r1.2055 pkgsrc/mk/bsd.pkg.mk (expand / switch to unified diff)

--- pkgsrc/mk/bsd.pkg.mk 2024/04/30 20:59:25 1.2054
+++ pkgsrc/mk/bsd.pkg.mk 2024/05/04 17:58:53 1.2055
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: bsd.pkg.mk,v 1.2054 2024/04/30 20:59:25 wiz Exp $ 1# $NetBSD: bsd.pkg.mk,v 1.2055 2024/05/04 17:58:53 leot Exp $
2# 2#
3# This file is in the public domain. 3# This file is in the public domain.
4# 4#
5# Please see the pkgsrc/doc/guide manual for details on the 5# Please see the pkgsrc/doc/guide manual for details on the
6# variables used in this make file template. 6# variables used in this make file template.
7# 7#
8# Default sequence for "all" is: 8# Default sequence for "all" is:
9# 9#
10# bootstrap-depends 10# bootstrap-depends
11# fetch 11# fetch
12# checksum 12# checksum
13# depends 13# depends
14# tools 14# tools
@@ -174,26 +174,40 @@ ALL_ENV+= LC_ALL=C @@ -174,26 +174,40 @@ ALL_ENV+= LC_ALL=C
174ALL_ENV+= LC_COLLATE=C 174ALL_ENV+= LC_COLLATE=C
175ALL_ENV+= LC_CTYPE=C 175ALL_ENV+= LC_CTYPE=C
176ALL_ENV+= LC_MESSAGES=C 176ALL_ENV+= LC_MESSAGES=C
177ALL_ENV+= LC_MONETARY=C 177ALL_ENV+= LC_MONETARY=C
178ALL_ENV+= LC_NUMERIC=C 178ALL_ENV+= LC_NUMERIC=C
179ALL_ENV+= LC_TIME=C 179ALL_ENV+= LC_TIME=C
180ALL_ENV+= LDFLAGS=${LDFLAGS:M*:Q} 180ALL_ENV+= LDFLAGS=${LDFLAGS:M*:Q}
181ALL_ENV+= LINKER_RPATH_FLAG=${LINKER_RPATH_FLAG:Q} 181ALL_ENV+= LINKER_RPATH_FLAG=${LINKER_RPATH_FLAG:Q}
182ALL_ENV+= PATH=${PATH:Q}:${TOOLBASE}/bin:${X11BASE}/bin 182ALL_ENV+= PATH=${PATH:Q}:${TOOLBASE}/bin:${X11BASE}/bin
183ALL_ENV+= PREFIX=${PREFIX} 183ALL_ENV+= PREFIX=${PREFIX}
184ALL_ENV+= MAKELEVEL=0 184ALL_ENV+= MAKELEVEL=0
185ALL_ENV+= CONFIG_SITE=${PKGSRC_CONFIG_SITE:U} 185ALL_ENV+= CONFIG_SITE=${PKGSRC_CONFIG_SITE:U}
186.if !defined(ALLOW_NETWORK_ACCESS) 186.if !defined(ALLOW_NETWORK_ACCESS)
 187
 188#ALLOW_NETWORK_ACCESS=
 189# If defined network access is permitted also outside the "fetch" phase.
 190#
 191# Network access should be permitted only during the "fetch" phase.
 192# By defining this variable fetching is permitted also in other phases.
 193# This can be useful to MAINTAINERs for fetching distfiles to initialize
 194# a package or for custom packages.
 195#
 196# Possible: defined, not defined
 197# Default: undefined
 198#
 199# Keywords: fetch download network
 200
187# try stopping downloads during configure/build/... 201# try stopping downloads during configure/build/...
188ALL_ENV+= ftp_proxy=downloads-forbidden-except-during-fetch 202ALL_ENV+= ftp_proxy=downloads-forbidden-except-during-fetch
189ALL_ENV+= http_proxy=downloads-forbidden-except-during-fetch 203ALL_ENV+= http_proxy=downloads-forbidden-except-during-fetch
190ALL_ENV+= https_proxy=downloads-forbidden-except-during-fetch 204ALL_ENV+= https_proxy=downloads-forbidden-except-during-fetch
191ALL_ENV+= no_proxy= 205ALL_ENV+= no_proxy=
192.endif 206.endif
193 207
194# This variable can be added to MAKE_ENV to ease installation of packages 208# This variable can be added to MAKE_ENV to ease installation of packages
195# that use BSD-style Makefiles. 209# that use BSD-style Makefiles.
196BSD_MAKE_ENV= BINOWN=${BINOWN} BINGRP=${BINGRP} 210BSD_MAKE_ENV= BINOWN=${BINOWN} BINGRP=${BINGRP}
197BSD_MAKE_ENV+= GAMEOWN=${GAMEOWN} GAMEGRP=${GAMEGRP} 211BSD_MAKE_ENV+= GAMEOWN=${GAMEOWN} GAMEGRP=${GAMEGRP}
198BSD_MAKE_ENV+= MANOWN=${MANOWN} MANGRP=${MANGRP} 212BSD_MAKE_ENV+= MANOWN=${MANOWN} MANGRP=${MANGRP}
199BSD_MAKE_ENV+= SHAREOWN=${SHAREOWN} SHAREGRP=${SHAREGRP} 213BSD_MAKE_ENV+= SHAREOWN=${SHAREOWN} SHAREGRP=${SHAREGRP}