Hello Monks,

I bit off a couple implementation problems with approximating geological problems with highway data that I can now address better, as I have upgraded my hosting situation to include a new machine:

mymac@Merrills-Mini ~ % sw_vers ProductName: macOS ProductVersion: 13.3 BuildVersion: 22E252 mymac@Merrills-Mini ~ %

I use perl to explore the new environment:

#!/usr/bin/perl use warnings; use strict; use File::Find; use Cwd; =pod =head1 DESCRIPTION This is a pretty good first attempt at figuring out where your modules + are. It is meant to follow the development of _Intermediate Perl_, a +nd I will adhere to the idioms. =cut my $current = cwd; find( \&pm_beneath, $current, ); sub pm_beneath { use File::Basename; my $basename = basename($File::Find::name); return unless $basename =~ /\.pm$/; print "$File::Find::name\n"; my $access_age = -A $basename; print " $basename\n"; printf "access age in days: %.2f\n", $access_age; } __END__

and then I change the find line to:

find( \&pm_beneath, "/", );

I was a bit shocked to see the output, as it looked very different than what I might call "usual." I usually develop on Debian-based linux, and am redeveloping a rapport with the terminal as I can't do a whole lot otherwise, missing in particular the ability to right-click. But I'm trying to get the hang of doing things "the Mac way," for example, using zsh instead of bash. That hasn't killed me yet.

My strategy with installing perl was going to be to march in the front door as root and type cpan. Well, that failed.

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!! ERROR: Can't create '/usr/bin' Do not have write permissions on '/usr/bin' !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!! at -e line 1.

Similar failures followed. I noticed that the places I could not write to were in the wheel group and prodded further with:

Merrills-Mini:Library root# grep '^wheel:.*$' /etc/group | cut -d: -f4 root

My next idea was to add myself to the wheel group:

sudo dseditgroup -o edit -a mymac -t user wheel

That didn't move the needle. Then I realized that the reason nothing can write to /usr is a newer security layer that we shouldn't trespass against:

Merrills-Mac-mini:~ root# ls -lO /System /usr /System: total 0 -rw-r--r-- 10 root wheel restricted 0 Apr 1 10:46 .localized drwxr-xr-x 43 root wheel restricted 1376 Apr 1 10:46 Applications drwxr-xr-x 4 root wheel restricted 128 Apr 1 10:46 Cryptexes drwxr-xr-x@ 2 root wheel restricted 64 Apr 1 10:46 Developer drwxr-xr-x 5 root wheel restricted 160 Apr 1 10:46 DriverKit drwxr-xr-x 145 root wheel restricted 4640 Apr 1 10:46 Library drwxr-xr-x 14 root wheel restricted 448 Apr 1 10:46 Volumes drwxr-xr-x 5 root wheel restricted 160 Apr 1 10:46 iOSSupport /usr: total 0 lrwxr-xr-x 1 root wheel restricted 25 Apr 1 10:46 X11 -> ../p +rivate/var/select/X11 lrwxr-xr-x 1 root wheel restricted 25 Apr 1 10:46 X11R6 -> .. +/private/var/select/X11 drwxr-xr-x 936 root wheel restricted 29952 Apr 1 10:46 bin drwxr-xr-x 32 root wheel restricted 1024 Apr 1 10:46 lib drwxr-xr-x 347 root wheel restricted 11104 Apr 1 10:46 libexec drwxr-xr-x 4 root wheel sunlnk 128 Apr 19 20:26 local drwxr-xr-x 230 root wheel restricted 7360 Apr 1 10:46 sbin drwxr-xr-x 42 root wheel restricted 1344 Apr 1 10:46 share drwxr-xr-x 5 root wheel restrexity icted 160 Apr 1 10:46 standalone

I changed tack and put git to work:

mkdir brew cd brew git clone https://github.com/Homebrew/brew homebrew

And then:

brew install perl

I rather like the notion of "bottling" an application, and the export to the envelope seems right:

mymac@Merrills-Mac-mini ~ % env | grep perl PATH=/Users/mymac/perl5/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/ +local/bin:/System/Cryptexes/ ... PERL5LIB=/Users/mymac/perl5/lib/perl5 PERL_LOCAL_LIB_ROOT=/Users/mymac/perl5 PERL_MB_OPT=--install_base "/Users/mymac/perl5" PERL_MM_OPT=INSTALL_BASE=/Users/mymac/perl5 mymac@Merrills-Mac-mini ~ %

I'm still not sure how we are supposed to elevate privileges or forego a dialog window asking for one more auth. If I bump my head into the architecture, I'm inclined to trust the architect in this case, "knowing" as I did some of the innovators of BSD from my days in comp.lang.c, including Chris Torek. I wonder if he still lives in Salt Lake. If I'm indistinguishable from malware, I present a problem to my system. I think the filesystem a strength of this platform, and it is me that needs to conform.

sudo grep -R Torek "/"

Q1) Does any of this makes sense? Do I need to walk back any of this?

Q2) What's the deal with wheel?

As I was pitching about being unable to even install anything, I thought of installing perlbrew, which wasn't available. Then it occured to me that perlbrew might have been a backformation from homebrew.(?)

bash-3.2$ brew info perl ==> perl: stable 5.36.0 (bottled), HEAD Highly capable, feature-rich programming language https://www.perl.org/ (2,494 files, 67MB) * Poured from bottle using the formulae.brew.sh API on 2023-04-20 at 1 +6:17:27 From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/perl +.rb ... ==> Analytics install: 513 (30 days), 28,031 (90 days), 348,514 (365 days) install-on-request: 159 (30 days), 7,746 (90 days), 91,325 (365 days) build-error: 0 (30 days) bash-3.2$

Q3) It looks like the homebrew people are keeping primitive stats on downloads, including failures. Is that the case?

Cheers,


In reply to Establishing a beachhead and acquiring privileges on a Mac-mini by Aldebaran

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.