distfile downloads failing on https

Ken Cunningham ken.cunningham.webuse at gmail.com
Wed Feb 21 16:11:26 UTC 2018

I should have been more descriptive about the /opt/bootstrap part of the post below. 

Like  you, I didn't like the circular dependency. If you "sudo port uninstall active", you're hooped. So here's what I actually do on all systems 10.4 to 10.7

using Macports from this page <https://www.macports.org/install.php> and more specifically from here <https://github.com/macports/macports-base/releases/download/v2.4.2/MacPorts-2.4.2.tar.bz2> and with reference to the instructions for <https://guide.macports.org/#installing.macports.source.multiple>

1. install a copy of macports from source code into /opt/bootstrap

cd MacPorts-2.4.2
./configure --prefix=/opt/bootstrap --with-applications-dir=/opt/bootstrap/applications
sudo make install
cd ..
rm -rf MacPorts-2.4.2

then as per <https://guide.macports.org/#installing.macports.source.multiple>

bbedit /opt/bootstrap/etc/macports/macports.conf
and add 
startupitem_install no

2. once that is finished, I do this

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

You should now have an independent free-standing macports installation with curl

3. now using a fresh copy of the Macports source

cd MacPorts-2.4.2
./configure --with-curlprefix=/opt/bootstrap
sudo make install

and then adjust your PATH to point to /opt/local/bin as usual for MacPorts.

You are done. No more circular dependency. You can use MacPorts as you wish to.

You can pretty much forget about /opt/bootstrap after that if you want to. The curl is 10 years newer, and so will likely last as long as you need. 

You can update /opt/bootstrap if you want to. You just have to keep the PATHs straight, which requires a clear head.

I always disable the PATH pointing to /opt/local/bin before I do this, and then either add the path to /opt/bootstrap/bin, or just:

sudo /opt/bootstrap/bin/port -v sync
sudo /opt/bootstrap/bin/port -v -N upgrade outdated


when Macports updates to a new version, it does not remember the curlprefix, and so it installs against /usr/lib/libcurl again.

For this reason, I always 

sudo port -v sync

to update macpports ports.

I manually install updates to macports using the souce code and the instructions in #3 above.

Sorry if this is long and seems complicated -- I was trying to be as complete as possible.


On 2018-02-21, at 4:18 AM, Jan Stary wrote:

> On Feb 21 12:43:28, hans at stare.cz wrote:
>> A more general proposed solution was to bunlde a newer curl with MP,
>> in partcular one built against a newer SSL/TLS library:
>> https://trac.macports.org/ticket/51516
> It was also suggested there to recompile MP
> using its own already installed curl port.
> Indeed,
> ./configure --with-curlprefix=/opt/local/
> results in MacPorts that uses its own /opt/local/bin/curl
> to download distfiles, and my immediate problem disappears.
> But the circular dependency on itself doesn't seem right.
> Should the curl port be a fetch dependency (if there is such a thing)
> for the affected ports, and should MP use the port's curl(1)
> to download their distfiles?
> 	Jan

More information about the macports-users mailing list