portsnap fails if not root

Frank Leonhardt (m) frank2 at fjl.co.uk
Wed Nov 15 09:03:10 UTC 2017

On 14 November 2017 15:49:52 GMT+00:00, "Frank Leonhardt (m)" <frank2 at fjl.co.uk> wrote:
>On 14 November 2017 15:24:32 GMT+00:00, Frank Leonhardt
><freebsd-doc at fjl.co.uk> wrote:
>>Is there any reason why portsnap has to run as root? If you specify
>>alternative ports dir and db dir using -p and - d, it should download
>>and unpack stuff in home directory.
>>Trouble us that it gets the tag, and starts fetching Metadata, but
>>terminates with no message before it prints ..done. Not even a /n.
>>Anyone know why before I start digging?

For the sake of anyone with the same problem searching the archive...

portsnap  is very hit-and-miss at checking diagnostic returns when it runs something. In the case of the tag/metadata it can fails but still say it has completed as return is not checked. On the second one that fails there is a lazy bailout which drops you back to the prompt mid-line.

In order to preserve the mystery as long as possible, it directs stderr to the bit bucket.

In my case, the user account had insufficient file access to do the fetch.

If you edit the macro to make stderr redirect to, er, stderr you will see a lot more of what is going on.

I may do an error checking version one day if no one else does first...

Regards, Frank.

Sent from my Cray X/MP with small fiddling keyboard.

More information about the freebsd-questions mailing list