On Jan 29, 2018, at 18:15, Jepeway, Chris wrote: > I'm looking to use & build ports offline, without any direct internet access. > > Is this possible? > > I've got a recent install of MacPorts via the v2.4.2 disk image. > > I've got a copy of ports.tar. > > I've got an rsync'ed set of distfiles obtained on an online system that I've > copied to the MacBook that won't have access to the internet.
The distfiles would go in /opt/local/var/macports/distfiles. If you're wanting to copy our entire collection of distfiles from rsync://rsync.macports.org/macports/distfiles, note that it is not current for all ports, because of: https://trac.macports.org/ticket/53347 I hope I can work on resolving that soon. > I've got the command-line development tools. > > Eventually, I'll have a copy of Xcode. > > What sort of config do I need? > > This is the last line of sources.conf: > > file:///Users/chrjep2/share/macports/ports.tar [default] [nosync] > > When I try a simple test like: > > sudo port version > > I get this: > > Warning: /opt/local/etc/macports/sources.conf specifies invalid source > 'file:///Users/chrjep2/share/macports/ports.tar [default] [nosync]', ignored. > No sources defined in /opt/local/etc/macports/sources.conf > while executing "mportinit ui_options global_options > global_variations" > Error: /opt/local/bin/port: Failed to initialize MacPorts, No sources > defined in /opt/local/etc/macports/sources.conf > > FWIW, the tarball seems OK: > > nickel% sudo tar tvf /Users/chrjep2/share/macports/ports.tar | head > drwxr-xr-x 0 buildbot buildbot 0 Dec 17 11:41 ports/ > -rw-r--r-- 0 buildbot buildbot 234 Aug 22 17:13 ports/.gitattributes > drwxr-xr-x 0 buildbot buildbot 0 Nov 5 10:54 ports/.github/ > -rw-r--r-- 0 buildbot buildbot 38 Aug 22 17:13 ports/.gitignore > -rw-r--r-- 0 buildbot buildbot 1273 Aug 22 17:13 ports/.mailmap > -rw-r--r-- 0 buildbot buildbot 189 Oct 30 22:14 ports/.travis.yml > -rw-r--r-- 0 buildbot buildbot 1996 Aug 22 17:13 ports/LICENSE > drwxr-xr-x 0 buildbot buildbot 0 Jan 17 04:01 > ports/PortIndex_darwin_10_i386/ > drwxr-xr-x 0 buildbot buildbot 0 Jan 17 04:01 > ports/PortIndex_darwin_11_i386/ > drwxr-xr-x 0 buildbot buildbot 0 Jan 17 04:01 > ports/PortIndex_darwin_12_i386/ I guess a file path to a tarball is not valid in sources.conf. You could untar the tarball and point sources.conf at the resulting directory.