Re: Using MacPorts "Offline"

2018-02-04 Thread Ryan Schmidt

On Feb 4, 2018, at 16:05, Rainer Müller wrote:

>> nickel% ls -ltrd /opt/local/var/macports/portdirs/ports/*dex*17*
>> drwxr-xr-x  4 500  505  128 Jan 30
>> 15:17 /opt/local/var/macports/portdirs/ports/PortIndex_darwin_17_i386/
> 
> This looks like the directory belongs to a user id that has no
> corresponding user, which is quite strange... Did you restore this
> directory from a backup or something like that? You could try to use
> chown/chmod as root to give permissions to the macports user to correct
> this.
> 
> If that does not help, it might even be a problem with the tarball
> itself, but I have in fact never tried to sync from a local ports.tar.

Those (500, 505) are the uid and gid that own the files on the server that 
packages up the tarball. Is that a problem?



Re: Using MacPorts "Offline"

2018-02-04 Thread Rainer Müller
On 2018-01-30 21:28, Jepeway, Chris wrote:
> And, of course, "port selfupdate" wants to phone home to
> rsync.macports.org , which my "banned from
> the internet" MacBook can't do.

Unfortunately, there is no alternative to this. The best option is to
use 'sudo port sync', which will only update the ports sources, but not
MacPorts itself. You will have to use the packaged installers for updates.

> Is there something I can do with "port index" that'll clear this up?
>  There seem to be indexes in the extracted ports dir:
> 
> nickel% ls -ltrd /opt/local/var/macports/portdirs/ports/*dex*17*
> drwxr-xr-x  4 500  505  128 Jan 30
> 15:17 /opt/local/var/macports/portdirs/ports/PortIndex_darwin_17_i386/

This looks like the directory belongs to a user id that has no
corresponding user, which is quite strange... Did you restore this
directory from a backup or something like that? You could try to use
chown/chmod as root to give permissions to the macports user to correct
this.

If that does not help, it might even be a problem with the tarball
itself, but I have in fact never tried to sync from a local ports.tar.

Rainer


Re: Using MacPorts "Offline"

2018-01-30 Thread Joshua Root
Jepeway, Chris wrote:
> Ah, perfect, thanks (& to Ryan).
> 
> This now works:
> 
> nickel% sudo port version
> [long delay while bsdtar runs]
> Version: 2.4.2
> 
> This, however, is a bust:
> 
> nickel% sudo port echo gawk\*
> Warning: Can't open index file for source: 
> file:///Users/chrjep2/share/macports/ports.tar
> Error: /opt/local/bin/port: search for portname gawk* failed: No index(es) 
> found! Have you synced your port definitions? Try running 'port selfupdate'.
> 
> And, of course, "port selfupdate" wants to phone home to 
> rsync.macports.org, which my "banned from the 
> internet" MacBook can't do.
> 
> Is there something I can do with "port index" that'll clear this up?  There 
> seem to be indexes in the extracted ports dir:
> 
> nickel% ls -ltrd /opt/local/var/macports/portdirs/ports/*dex*17*
> drwxr-xr-x  4 500  505  128 Jan 30 15:17 
> /opt/local/var/macports/portdirs/ports/PortIndex_darwin_17_i386/

If you mark a source as nosync you are responsible for generating a
PortIndex for it, yes. That's not really possible when all you have is a
tarball. (Server-side we generate the index before tarring up the ports
tree; we distribute it as a tarball just because it's easier to generate
a signature for a single file.)

You'd be much better off using a file:// source as Ryan suggested. (And
allowing it to sync, which for a plain non-VCS-checkout directory will
just update the PortIndex.)

- Josh


Re: Re: Using MacPorts "Offline"

2018-01-30 Thread Jepeway, Chris
Ah, perfect, thanks (& to Ryan).

This now works:

nickel% sudo port version
[long delay while bsdtar runs]
Version: 2.4.2

This, however, is a bust:

nickel% sudo port echo gawk\*
Warning: Can't open index file for source: 
file:///Users/chrjep2/share/macports/ports.tar
Error: /opt/local/bin/port: search for portname gawk* failed: No index(es) 
found! Have you synced your port definitions? Try running 'port selfupdate'.

And, of course, "port selfupdate" wants to phone home to 
rsync.macports.org, which my "banned from the 
internet" MacBook can't do.

Is there something I can do with "port index" that'll clear this up?  There 
seem to be indexes in the extracted ports dir:

nickel% ls -ltrd /opt/local/var/macports/portdirs/ports/*dex*17*
drwxr-xr-x  4 500  505  128 Jan 30 15:17 
/opt/local/var/macports/portdirs/ports/PortIndex_darwin_17_i386/

Chris.

On Jan 30, 2018, at 11:23 AM, Rainer Müller 
mailto:rai...@macports.org>> wrote:

On 2018-01-30 01:15, Jepeway, Chris wrote:
This is the last line of sources.conf:

file:///Users/chrjep2/share/macports/ports.tar [default] [nosync]

The correct syntax would be to put the flags into the same brackets:

   file:///Users/chrjep2/share/macports/ports.tar [default,nosync]

Rainer



Re: Using MacPorts "Offline"

2018-01-30 Thread Rainer Müller
On 2018-01-30 01:15, Jepeway, Chris wrote:
> This is the last line of sources.conf:
> 
>   file:///Users/chrjep2/share/macports/ports.tar [default] [nosync]

The correct syntax would be to put the flags into the same brackets:

file:///Users/chrjep2/share/macports/ports.tar [default,nosync]

Rainer


Re: Using MacPorts "Offline"

2018-01-30 Thread Ryan Schmidt

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 buildbot0 Dec 17 11:41 ports/
>   -rw-r--r--  0 buildbot buildbot  234 Aug 22 17:13 ports/.gitattributes
>   drwxr-xr-x  0 buildbot buildbot0 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 buildbot0 Jan 17 04:01 
> ports/PortIndex_darwin_10_i386/
>   drwxr-xr-x  0 buildbot buildbot0 Jan 17 04:01 
> ports/PortIndex_darwin_11_i386/
>   drwxr-xr-x  0 buildbot buildbot0 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.



Using MacPorts "Offline"

2018-01-29 Thread Jepeway, Chris
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.

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 buildbot0 Dec 17 11:41 ports/
-rw-r--r--  0 buildbot buildbot  234 Aug 22 17:13 ports/.gitattributes
drwxr-xr-x  0 buildbot buildbot0 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 buildbot0 Jan 17 04:01 
ports/PortIndex_darwin_10_i386/
drwxr-xr-x  0 buildbot buildbot0 Jan 17 04:01 
ports/PortIndex_darwin_11_i386/
drwxr-xr-x  0 buildbot buildbot0 Jan 17 04:01 
ports/PortIndex_darwin_12_i386/

Any and all help much appreciated.

Chris.
--
Chris Jepeway
Principal Engineer, Technical Operations
Jewelry Television