Publicizing MacPorts [installation]

Jason Liu jasonliu at umich.edu
Sat May 22 18:55:08 UTC 2021


On Sat, May 22, 2021 at 1:35 PM Ken Cunningham <
ken.cunningham.webuse at gmail.com> wrote:
>
> Yes, thanks for the tips! I am pretty sure that it is possible to automate
>> it one way or another. But my point is that it would be helpful to have a
>> one-liner to install MacPorts and maintain it as a part of the main
>> repository.
>
>
> This was of course suggested years ago as well, when homebrew first did
> it, but at that time was that it was both not needed and not a useful
> addition to MacPorts, if I recall the full email exchange correctly, so we
> let the idea die.
>

I feel like having a one-liner to install MacPorts, similar to Homebrew,
would be incredibly useful, especially for people who are not tech savvy.
It seems that many of us on the mailing list, including myself, already
have our own home-grown scripts to automate installing MacPorts. One thing
that I particularly like about the Homebrew installer is that it
automatically installs the CLT... I've been doing something similar in my
own MacPorts install script for around a decade.

My script even automatically accepts the Xcode license by using a small
chunk of expect. I realize that from the perspective of the MacPorts
developers, we might not want to be taking over control of this step from
the user. But from personal experience as a sysadmin, even this seemingly
minor step can be a fairly high hurdle for people who are not tech savvy.

Another thing that my script tries to automate is to add /opt/local to
everyone's $PATH if the script detects that SIP is disabled.

On Sat, May 22, 2021 at 2:31 PM Joshua Root <jmr at macports.org> wrote:

>
> I think the best thing we could do to facilitate one-liner command
> line installation is set up a redirect so you can download the latest
> binary installer for your OS version without having to construct
> its not-so-easy-to-derive name yourself. It would then be simple to
> download the .pkg and feed it to installer(8).
>

This would be incredibly useful, and would allow me to cut out around 40-50
lines of code from my MacPorts install script (which is currently
constructing the not-so-easy-to-derive name myself). A single permalink
redirect would also allow the installation instructions to be simplified on
the MacPorts website, instead of what's currently there:

3. Install MacPorts for your version of the operating system:
    * macOS Big Sur v11
<https://github.com/macports/macports-base/releases/download/v2.7.0/MacPorts-2.7.0-11-BigSur.pkg>
    * macOS Cataline v10.15
<https://github.com/macports/macports-base/releases/download/v2.7.0/MacPorts-2.7.0-10.15-Catalina.pkg>
    * macOS Mojave v10.14
<https://github.com/macports/macports-base/releases/download/v2.7.0/MacPorts-2.7.0-10.14-Mojave.pkg>
    * Older OS? See here. <https://www.macports.org/install.php#installing>

-- 
Jason Liu


On Sat, May 22, 2021 at 1:35 PM Ken Cunningham <
ken.cunningham.webuse at gmail.com> wrote:

> > Yes, thanks for the tips! I am pretty sure that it is possible to
> automate it one way or another. But my point is that it would be helpful to
> have a one-liner to install MacPorts and maintain it as a part of the main
> repository.
>
> This was of course suggested years ago as well, when homebrew first did
> it, but at that time was that it was both not needed and not a useful
> addition to MacPorts, if I recall the full email exchange correctly, so we
> let the idea die.
>
> I wrote up a MacPorts install script for Jeremy’s Xquartz project here <
> https://github.com/XQuartz/XQuartz/blob/master/install-or-update-macports.sh>
> that adds a bit more trickery he needed, but the basic guts was extremely
> simple and what I recommend to people who complain that MacPorts is
> extremely difficult to get installed and they claim to have spent hours and
> hours and hours trying to make it work:
>
> ==
>
> cd /tmp
> git clone -b release-2.7 https://github.com/macports/macports-base.git
> cd macports-base
> ./configure && make && sudo make install
>
>
> and then add to the $PATH as usual
>
> ==
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macports.org/pipermail/macports-dev/attachments/20210522/af5c0679/attachment.htm>


More information about the macports-dev mailing list