Re: `port install' from github tarball fails

2018-09-25 Thread Werner LEMBERG


>> I have to use `sync' anyway since I'm running MacPorts directly
>> from the git repositories.

> If you mean you've compiled a newer version of macports from the
> macports-base git repository, then it's true that selfupdate won't
> update it, though it won't do any harm either; it'll still sync.

OK, thanks.


Werner


Re: `port install' from github tarball fails

2018-09-25 Thread Ryan Schmidt



On Sep 25, 2018, at 12:51, Werner LEMBERG wrote:

> I have to use `sync' anyway since I'm running MacPorts directly from
> the git repositories.

Not sure exactly what you mean.

If you mean you've configured macports to use the macports-ports git repository 
as your ports tree, then there's no problem running selfupdate. Running 
selfupdate runs sync for you, unless you use the --no-sync flag.

If you mean you've compiled a newer version of macports from the macports-base 
git repository, then it's true that selfupdate won't update it, though it won't 
do any harm either; it'll still sync.




Re: `port install' from github tarball fails

2018-09-25 Thread Ryan Schmidt
On Sep 25, 2018, at 19:50, Ken Cunningham wrote:

> On 2018-09-25, at 5:38 PM, Ryan Schmidt wrote:
> 
>> On Sep 25, 2018, at 10:35, Ken Cunningham wrote:
>> 
>>> There is one hiccup. Updating macports with "sudo port selfupdate" does not 
>>> respect the curlprefix. 
>> 
>> I'm not sure what you mean. selfupdate doesn't use curl; it uses rsync.
> 
> There is a ticket about this 
> 
> If you install MacPorts with certain build options, eg a non-standard 
> curlprefix, for example
> 
> ./configure --with-curlprefix=/opt/bootstrap
> make && sudo make install
> 
> 
> and then later selfupdate, and a new MacPorts is noted and installed:
> 
> sudo port -v selfupdate
> 
> it will install the new copy of MacPorts ignoring the previous curlprefix 
> (and some other build options are ignored as well).
> 
> So -- "sudo port -v selfupdate" appears to only really work with all standard 
> installation options.

Oh right, that. Yes, selfupdate doesn't preserve custom configure options.




Re: `port install' from github tarball fails

2018-09-25 Thread Ken Cunningham


On 2018-09-25, at 5:38 PM, Ryan Schmidt wrote:

> 
> 
> On Sep 25, 2018, at 10:35, Ken Cunningham wrote:
> 
>> There is one hiccup. Updating macports with "sudo port selfupdate" does not 
>> respect the curlprefix. 
> 
> I'm not sure what you mean. selfupdate doesn't use curl; it uses rsync.
> 


There is a ticket about this 

If you install MacPorts with certain build options, eg a non-standard 
curlprefix, for example

./configure --with-curlprefix=/opt/bootstrap
make && sudo make install


and then later selfupdate, and a new MacPorts is noted and installed:

sudo port -v selfupdate

it will install the new copy of MacPorts ignoring the previous curlprefix (and 
some other build options are ignored as well).

So -- "sudo port -v selfupdate" appears to only really work with all standard 
installation options.





Ken




Re: `port install' from github tarball fails

2018-09-25 Thread Ryan Schmidt



On Sep 25, 2018, at 10:35, Ken Cunningham wrote:

> There is one hiccup. Updating macports with "sudo port selfupdate" does not 
> respect the curlprefix. 

I'm not sure what you mean. selfupdate doesn't use curl; it uses rsync.



Re: `port install' from github tarball fails

2018-09-25 Thread Ken Cunningham


On 2018-09-25, at 10:51 AM, Werner LEMBERG wrote:

> 
>> Don't be put off too much by this.  It takes only about 10 minutes
>> to fix, if you care to.  I use it on every machine < 10.9 routinely.
>> [...]
> 
> Thanks, Mojca and Ken!  Configuring with
> 
>  ./configure ac_cv_have_decl_rl_username_completion_function=yes \
>  --enable-readline \
>  --with-curlprefix=/opt/local
> 
> (cf. https://trac.macports.org/ticket/57160#ticket, which I've just
> filed) gives me a `port' program that can download files from github.


I did that at first, and it works, but I changed it a day later. Watch out. 
That makes MacPorts self-dependant on the curl installed by that same 
installation of MacPorts. So, if you ever "sudo port uninstall curl", or any 
part of it, or similar, the whole thing will stop working.

That's why the /opt/bootstrap recommendation.

Ken

Re: `port install' from github tarball fails

2018-09-25 Thread Werner LEMBERG


> Don't be put off too much by this.  It takes only about 10 minutes
> to fix, if you care to.  I use it on every machine < 10.9 routinely.
> [...]

Thanks, Mojca and Ken!  Configuring with

  ./configure ac_cv_have_decl_rl_username_completion_function=yes \
  --enable-readline \
  --with-curlprefix=/opt/local

(cf. https://trac.macports.org/ticket/57160#ticket, which I've just
filed) gives me a `port' program that can download files from github.

> There is one hiccup. Updating macports with "sudo port selfupdate"
> does not respect the curlprefix.
> 
> So instead, "sync" macports instead of "selfupdating" it
> 
> sudo port -v sync

I have to use `sync' anyway since I'm running MacPorts directly from
the git repositories.


Werner


Re: `port install' from github tarball fails

2018-09-25 Thread Ken Cunningham
Don't be put off too much by this. It takes only about 10 minutes to fix, if 
you care to. I use it on every machine < 10.9 routinely.

Download the macports source tarball. You'll use it twice.


First disable any PATH settings in your .profile. Then configure a "bootstrap" 
installation of macports that will hold a modern SSL:

./configure --with-prefix=/opt/bootstrap  
--with-applications-dir=/opt/bootstrap/Applications
make && sudo make install


Then use that installation to install a current version of curl

sudo /opt/bootstrap/bin/port -v -N install curl



Once it's finished, start with a fresh copy of the macports source, and tell it 
to use the new curl

./configure --with-curlprefix=/opt/bootstrap
make && sudo make install

it will write a new copy of macports over your old copy in /opt/local, keeping 
all your settings and installed ports intact.

Then re-enable your PATH settings in .profile



There is one hiccup. Updating macports with "sudo port selfupdate" does not 
respect the curlprefix. 

So instead, "sync" macports instead of "selfupdating" it

sudo port -v sync


When you want to update MacPorts, build a copy from source against 
/opt/bootstrap.

Once in a while, as often as you feel you need to, update curl in 
/opt/bootstrap.


Ken




On 2018-09-25, at 2:35 AM, Mojca Miklavec wrote:

> Dear Werner,
> 
> Lion does not properly support HTTPS. You might need to recompile
> MacPorts from source to link against a version of libcurl with full
> SSL support.
> 
> See for example:
>https://trac.macports.org/ticket/51516
> 
> Mojca



Re: `port install' from github tarball fails

2018-09-25 Thread Chris Jones




On 25/09/18 10:35, Mojca Miklavec wrote:

Dear Werner,

Lion does not properly support HTTPS. You might need to recompile
MacPorts from source to link against a version of libcurl with full
SSL support.


... or update your OS. Lion is now pretty out of date.



See for example:
 https://trac.macports.org/ticket/51516

Mojca

On Tue, 25 Sep 2018 at 11:15, Werner LEMBERG wrote:



[macports-base 60483e6e71054bcd741a55901c52117077ec7c43]

I'm working on a new Portfile for the `extractpdfmark' tool.  Within
the file I have

   github.setuptrueroad extractpdfmark 1.0.2 v
   github.tarball_from releases

After `port sync' I tried `port -v install' and I got

   --->  Attempting to fetch extractpdfmark-1.0.2.tar.gz from
   http://nue.de.distfiles.macports.org/extractpdfmark
   [...]
   --->  Attempting to fetch extractpdfmark-1.0.2.tar.gz from
   https://github.com/trueroad/extractpdfmark/releases/download/v1.0.2
   [...]
   Error: Failed to fetch extractpdfmark: The requested URL returned error: 404

Saying `curl --version' returns

   curl 7.61.1 (x86_64-apple-darwin11.4.2)
 libcurl/7.61.1 OpenSSL/1.0.2p zlib/1.2.11 libidn2/2.0.5
 libpsl/0.20.2 (+libidn2/2.0.5)
   Release-Date: 2018-09-05
   Protocols: dict file ftp ftps gopher http https imap imaps pop3
 pop3s rtsp smb smbs smtp smtps telnet tftp
   Features: AsynchDNS IDN IPv6 Largefile NTLM NTLM_WB SSL libz TLS-SRP
 UnixSockets HTTPS-proxy PSL

which looks OK to me.

Doing some manual tests with `curl' I tried

   curl -o x 
https://github.com/trueroad/extractpdfmark/releases/download/v1.0.2/extractpdfmark-1.0.2.tar.gz

which returned a `you are redirected' HTML document (attached).
However, adding the `-L' flag to curl (to follow redirections) makes
the program successfully download the tarball.

How shall I proceed?  It seems to me that I've hit a bug in
macports...


 Werner


PS: Looking into the log file I see

   :notice:fetch --->  Attempting to fetch extractpdfmark-1.0.2.tar.gz
 from 
https://github.com/trueroad/extractpdfmark/releases/download/v1.0.2
   :debug:fetch Fetching distfile failed: error:1407742E:SSL
 routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version

 Maybe this is related also.


Re: `port install' from github tarball fails

2018-09-25 Thread Mojca Miklavec
Dear Werner,

Lion does not properly support HTTPS. You might need to recompile
MacPorts from source to link against a version of libcurl with full
SSL support.

See for example:
https://trac.macports.org/ticket/51516

Mojca

On Tue, 25 Sep 2018 at 11:15, Werner LEMBERG wrote:
>
>
> [macports-base 60483e6e71054bcd741a55901c52117077ec7c43]
>
> I'm working on a new Portfile for the `extractpdfmark' tool.  Within
> the file I have
>
>   github.setuptrueroad extractpdfmark 1.0.2 v
>   github.tarball_from releases
>
> After `port sync' I tried `port -v install' and I got
>
>   --->  Attempting to fetch extractpdfmark-1.0.2.tar.gz from
>   http://nue.de.distfiles.macports.org/extractpdfmark
>   [...]
>   --->  Attempting to fetch extractpdfmark-1.0.2.tar.gz from
>   https://github.com/trueroad/extractpdfmark/releases/download/v1.0.2
>   [...]
>   Error: Failed to fetch extractpdfmark: The requested URL returned error: 404
>
> Saying `curl --version' returns
>
>   curl 7.61.1 (x86_64-apple-darwin11.4.2)
> libcurl/7.61.1 OpenSSL/1.0.2p zlib/1.2.11 libidn2/2.0.5
> libpsl/0.20.2 (+libidn2/2.0.5)
>   Release-Date: 2018-09-05
>   Protocols: dict file ftp ftps gopher http https imap imaps pop3
> pop3s rtsp smb smbs smtp smtps telnet tftp
>   Features: AsynchDNS IDN IPv6 Largefile NTLM NTLM_WB SSL libz TLS-SRP
> UnixSockets HTTPS-proxy PSL
>
> which looks OK to me.
>
> Doing some manual tests with `curl' I tried
>
>   curl -o x 
> https://github.com/trueroad/extractpdfmark/releases/download/v1.0.2/extractpdfmark-1.0.2.tar.gz
>
> which returned a `you are redirected' HTML document (attached).
> However, adding the `-L' flag to curl (to follow redirections) makes
> the program successfully download the tarball.
>
> How shall I proceed?  It seems to me that I've hit a bug in
> macports...
>
>
> Werner
>
>
> PS: Looking into the log file I see
>
>   :notice:fetch --->  Attempting to fetch extractpdfmark-1.0.2.tar.gz
> from 
> https://github.com/trueroad/extractpdfmark/releases/download/v1.0.2
>   :debug:fetch Fetching distfile failed: error:1407742E:SSL
> routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version
>
> Maybe this is related also.