General notes about MacOS
The Keyboard under MacOS
⌘ |
⌥ |
⇧ |
Command key |
Option key |
Shift key |
"command" |
"option" |
"shift" |
CMD |
CTRL |
Special character |
Designation |
Key combination |
@ |
At |
cmd + L |
€ |
Euro |
alt + E |
$ |
Dollar |
shift + 4 |
£ |
British Pound |
alt + shift + 4 |
© |
Copyright |
alt + G |
® |
Registered |
alt + R |
™ |
Trademark |
alt + shift + D |
? |
Apple |
alt + shift + + |
§ |
Paragraph |
shift + 3 |
~ |
Tilde |
alt + N (dann Leertaste) |
( |
opening Bracket |
shift + 8 |
) |
closing Bracket |
shift + 9 |
[ |
opening Square bracket |
alt + 5 |
] |
closing Square bracket |
alt + 6 |
{ |
opening Curly bracket |
alt + 8 |
} |
closing Curly bracket |
alt + 9 |
/ |
Slash |
shift + 7 |
\ |
Backslash |
alt + shift + 7 |
Pipe (vertical line) |
||
alt + 7 |
„ |
Right double quote |
alt + ^ |
“ |
Left double quote |
alt + shift + ^ |
‚ |
Comma |
alt + S |
‘ |
Single quote |
alt + # |
» |
Double right angle quotation mark |
alt + shift + Q |
« |
Double left angle quotation mark |
alt + Q |
› |
Single right angle quotation mark |
alt + shift + N |
‹ |
Single left angle quotation mark |
alt + shift + B |
= |
Equal |
shift + 0 |
≠ |
Unequal |
alt + 0 |
≤ |
Less than equal |
alt + > |
≥ |
Greater than equal |
alt + shift + > |
> |
Greater |
shift + > |
< |
Smaller |
fn + > |
± |
Plus or minus |
alt + + |
≈ |
Approximate |
alt + X |
ø |
Average |
alt + O |
∞ |
Infinity |
alt + , |
% |
Percent |
shift + 5 |
π |
Pi |
alt + P |
√ |
Check mark |
The opsi product m-homebrew
There are a number of package management programs for MacOS, which allow to provide common Unix programs under MacOS. Typical examples of this package management programs are:
-
'homebrew' (https://brew.sh/)
-
'macport' (https://www.macports.org/)
-
'fink' (https://finkproject.org/)
The opsi product m-homebrew
installs the homebrew
system on a MacOS system.
homebrew
installs the command brew
on the system, which allows then programs to be downloaded from the Internet. Either a binary is installed directly or the sources are downloaded and the program is compiled on the machine. Therefore homebrew
also needs the development command line tools to compile programs (xcode-select --install
).
For security reasons homebrew
is conceived to not be executed as root, but only with user rights. To ensure this in the opsi context a hidden user named opsisetupadmin
is created during the installation of the opsi-client-agent
(see also The MacOS pseudo user opsisetupadmin).
This user owns the whole homebrew
system on the machine and therefore, only this user should be used to perform the installation of software on the machine via the brew
command.
I.e. The brew
command should be executed as root as follows:
sudo -H -u opsisetupadmin /usr/local/bin/brew
For example, the installation of Java in the product m-javavm
is implemented as follows:
[ShellScript_brew_install_java]
; https://github.com/SAP/SapMachine/wiki/Installation
EXITCODE=0
sudo -H -u opsisetupadmin /usr/local/bin/brew tap sap/sapmachine
EC=$?; if [ $EC -ne 0 ]; then EXITCODE=$EC; fi
sudo -H -u opsisetupadmin /usr/local/bin/brew install --cask sapmachine-jdk
EC=$?; if [ $EC -ne 0 ]; then EXITCODE=$EC; fi
exit $EXITCODE
To find out if the installation of a desired product is supported via homebrew
, it is best to use the following website:
https://formulae.brew.sh/
Helpful links for homebrew
:
https://formulae.brew.sh/
Additional helpful Links for homebrew
:
https://docs.brew.sh/
https://devhints.io/homebrew
The MacOS pseudo user opsisetupadmin
When installing the opsi-client-agent
a 'hidden user' named opsisetupadmin
is created. This user has no password and cannot be used for login.
The home directory of this user is /var/lib/opsisetupadmin
.
This user is employed for the following purposes:
-
Operating the
homebrew
system (see The opsi product m-homebrew). -
The directory
/var/lib/opsisetupadmin/opsi_depot
is the mount point on which the opsiclientd mounts the depotshare.
This is done since access to network shares not mounted in a user directory are very limited.
The opsi directories on MacOS
Essential opsi directories and files on the MacOS client
-
/var/log/opsi-script (Log files opsi-script)
-
/var/log/opsi-client-agent (other opsi Log files)
-
/usr/local/bin/opsi* (Command line programs)
-
/Applications/opsi-script-gui.app
-
/Applications/opsi-notifier.app
-
/etc/opsi-client-agent (Configuration opsi-client-agent)
-
/etc/opsi-script (Configuration opsi-script)
-
/usr/local/lib (Help libraries e.g. ssl)
-
/usr/local/lib/opsiclientd
-
/usr/local/bin/locale (local opsi-script)
-
/usr/local/share/opsi-client-agent
-
/usr/local/share/opsi-script
-
/usr/local/share/notifier.d
-
/var/opsisetupadmin (Home directory opsisetupadmin)
-
/var/lib/opsi-client-agent
-
/Library/LaunchDaemons/ (Start configuration for opsi deamons)
-
/Library/LaunchAgents/ (Start configuration for opsi-systray)
MacOS directory structure with 'go' and 'nogo'.
MacOS is based on BSD-Unix and has a typical Unix file system structure. However, due to security reasons, there are several areas that are exclusively reserved for Apple and a few other specifics that are important for the person doing the packaging work:
-
/Applications
This is the directory where the graphical applications are located. An application consists of a directory <Application name>.app. Such a directory is not shown in theFinder
as a directory, but as an 'Application'. Inside this directory the files of the application must be located according to a certain specific pattern. -
/sbin
,/bin
,/usr/bin
,/usr/share
,/usr/lib
These areapple only
directories into which nobody else is allowed to copy anything. Use instead thelocal
variants:
/usr/local/bin
,/usr/local/share
,/usr/local/lib