Added undocumented support for /opt/perforce/helix-sdp package directory.
#review
With this change, mkdirs.sh behavior is changed depending on the pre-existence of the
directory /opt/perforce/helix-sdp, the future package install location. The
/opt/perforce/helix-sdp folder is not created by design, effectively making support
for the package structure a Tech Preview (i.e. Beta) feature. This change provides
behaviors needed to support package installation that also dovetail with goals of
decoupling the /p4/common and /p4/sdp folders from NFS in NFS environments.
If the /opt/perforce/helix-sdp is created with proper permissions and user/group
ownersihp before mkdirs.sh is run, new behaviors apply. The proper ownership
and permissions are:
/opt/perforce/helix-sdp - root:perforce, 775 perms. Allows perforce user
to manage subdirs, e.g. common, downloads, helix_binaries, p4/sdp.
/opt/perforce/helix-sdp/sdp - root:root, 755 perms. This is the immutable
area, an extract of the SDP tarball and no additional files. This root-managed
area is intended to be updated only by OS package upgrades, and cannot be
affected by the perforce user.
These folders in the structure are modifiable by the perforce user (owned by
perforce:perforce), and will contain generated files, symlinks,
and possibly even local custom files.
* /opt/perforce/helix-sdp/downloads, for unpacking SDP tarballs for upgrades.
* /opt/perforce/helix-sdp/helix_binaries, contains get_helix_binaries.sh, p4*.
* /opt/perforce/helix-sdp/p4/sdp - A copy of /opt/perforce/helix-sdp/sdp,
owned by perforce:perforce rather than root:root.
In this version, the following behaviour changes occur if /opt/perforce/helix-sdp
exists when this script is run:
* The /p4/sdp symlink points to /opt/perforce/helix-sdp/p4/sdp rather than
/hxdepots/sdp.
* The /p4/common symlink points to /opt/perforce/helix-sdp/p4/sdp/Server/Unix/p4/common
rather than /hxdepots/p4/common.
In this beta version, if run in an environment where those /p4/common and /p4/sdp
symlinks already exist, the symlinks are NOT changed even if /opt/perforce/helix-sdp
exists.
This is Phase 1 if a multi-phased release of this feature. Phase 1 will support
only greenfield installations where /opt/perforce/helix-sdp is created externally
to this script. (Targeted for SDP 2024.1 Patch 1, July 2024)
In Phase 2, the /opt/perforce/helix-sdp will be created by this script in greenfield
installations with a documented '-pkg' option (if run as root), and sdp_upgrade.sh
will migrate to this structure if and only if /opt/perforce/helix-sdp exists. Targeted
for SDP 2024.1 Patch 2 (Summer 2024).
In Phase 3, this will be integrated into the OS package installation mechanism for
Rocky9+ and Ubuntu 22.04+, possibly others. (Targeted for SDP 2025.1+.)
SDP-1069: Decouple /p4/common and /p4/sdp from NFS.