pkgsrc-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: net/tnftp updated: please test bootstraps
* On 2023-05-07 at 21:54 BST, Thomas Klausner wrote:
My grep foo is bad tonight, I couldn't find such logic neither in mk/
nor in bootstrap/ - do we even still have fallback code to build
either fetch or tnftp?
The default FETCH_USING is "auto":
mk/defaults/mk.conf:FETCH_USING?= auto
This means it's selected depending on what is available on the host
system in mk/bsd.prefs.mk:
.if ${FETCH_USING} == "auto"
. if defined(TOOLS_PLATFORM.fetch)
FETCH_USING= fetch
. elif defined(TOOLS_PLATFORM.curl)
FETCH_USING= curl
. elif defined(TOOLS_PLATFORM.wget)
FETCH_USING= wget
. else
FETCH_USING= ftp
. endif
.endif
This is turned into a tool and then handled in the usual way:
mk/fetch/bsd.fetch-vars.mk:USE_TOOLS+= ${_FETCH_TOOLS.${FETCH_USING}:C/$/:bootstrap/}
The upshot is that the following platforms will use the native fetch:
mk/tools/tools.FreeBSD.mk:TOOLS_PLATFORM.fetch?= /usr/bin/fetch
mk/tools/tools.Minix.mk:TOOLS_PLATFORM.fetch?= /usr/bin/fetch
mk/tools/tools.DragonFly.mk:TOOLS_PLATFORM.fetch?= /usr/bin/fetch
mk/tools/tools.MidnightBSD.mk:TOOLS_PLATFORM.fetch?= /usr/bin/fetch
The following platforms use native curl:
mk/tools/tools.SunOS.mk:TOOLS_PLATFORM.curl?= /usr/bin/curl
mk/tools/tools.Haiku.mk:TOOLS_PLATFORM.curl?= /bin/curl
mk/tools/tools.Darwin.mk:TOOLS_PLATFORM.curl?= /usr/bin/curl
mk/tools/tools.Cygwin.mk:TOOLS_PLATFORM.curl?= /bin/curl
The following platforms end up using the native ftp:
mk/tools/tools.QNX.mk:TOOLS_PLATFORM.ftp?= /usr/bin/ftp
mk/tools/tools.NetBSD.mk:TOOLS_PLATFORM.ftp?= /usr/bin/ftp
Any remaining platforms will end up building net/tnftp as part of the
usual tools mechanism on first build of a package that needs to download
distfiles. So net/fetch, while unpacked, will only ever be built if the
user explicitly sets FETCH_USING=fetch and does not have a valid
TOOLS_PLATFORM.fetch.
That all said, given net/tnftp is about 6 times bigger than net/fetch,
and that we already need fetch to be unpacked as it's used by pkgin and
pkg_install, we should probably ditch tnftp unless there is some good
reason why we need two URL retrievers unpacked in the pkgsrc tree?
--
Jonathan Perkin - mnx.io - pkgsrc.smartos.org
Open Source Complete Cloud www.tritondatacenter.com
Home |
Main Index |
Thread Index |
Old Index