tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: no downloads except during fetch phase



On Mon, Apr 29, 2024 at 04:32:25PM +0200, Joerg Sonnenberger wrote:
> On Monday, April 29, 2024 4:26:36 PM GMT+2 Thomas Klausner wrote:
> > On Mon, Apr 29, 2024 at 04:19:15PM +0200, Joerg Sonnenberger wrote:
> > > On Monday, April 29, 2024 1:17:36 PM GMT+2 Thomas Klausner wrote:
> > > > Hi!
> > > > 
> > > > Since this keeps popping up, I thought how we could disable downloads
> > > > during configure/build/test, and came up with the attached patch.
> > > > 
> > > > Basically, it's setting the proxy environment variables to an invalid
> > > > value, so everything that honors them will break with a hopefully easy
> > > > to understand error.
> > > 
> > > Two comments.
> > > 
> > > 1) Isn't it enough to add it to ALL_ENV? The rest should inherit from that.
> > 
> > That would be enough, but then the fetch stage is also affected, which
> > we don't want.
> 
> But mk/fetch/fetch is not invoked with ALL_ENV?

You're right. This is even easier than I though :)
 Thomas
Index: bsd.pkg.mk
===================================================================
RCS file: /cvsroot/pkgsrc/mk/bsd.pkg.mk,v
retrieving revision 1.2053
diff -u -r1.2053 bsd.pkg.mk
--- bsd.pkg.mk	20 Aug 2023 18:38:37 -0000	1.2053
+++ bsd.pkg.mk	29 Apr 2024 22:02:08 -0000
@@ -183,6 +183,11 @@
 ALL_ENV+=	PREFIX=${PREFIX}
 ALL_ENV+=	MAKELEVEL=0
 ALL_ENV+=	CONFIG_SITE=${PKGSRC_CONFIG_SITE:U}
+# try stopping downloads during configure/build/...
+ALL_ENV+=	ftp_proxy=downloads-forbidden-except-during-fetch
+ALL_ENV+=	http_proxy=downloads-forbidden-except-during-fetch
+ALL_ENV+=	https_proxy=downloads-forbidden-except-during-fetch
+ALL_ENV+=	no_proxy=
 
 # This variable can be added to MAKE_ENV to ease installation of packages
 # that use BSD-style Makefiles.


Home | Main Index | Thread Index | Old Index