Help! I am trapped by my Old Application Which Cannot Change. I need to update my Oracle Solaris 11 system to a later Update and/or Support Repository Update (SRU) but I find upon the update my favourite FOSS component has been removed. My Old Application Which Cannot Change has a dependency upon it and so no longer starts. Help!
Oracle Solaris, by default, will ensure that the software installed on the system is up to date. This includes the removal (uninstall) of software that is obsolete. Packages can be marked as obsolete due to the owning community no longer supporting it, being replaced by another package or later major version or for some other valid reason (we are very careful about the removal of software components).
However, by design, the contention problem of wanting to keep the operating system up to date but allowing for exceptions is addressed by Oracle Solaris's packaging system. This is performed via the 'version locks' within it.
Taking an example:
Oracle Solaris 11.3 SRU 20 obsoleted Python 2.6. This was because that version of python has been End of Lifed by the Python community. And so updating a system beyond that SRU will result in Python 2.6 being removed.
But what happens if you actually need to use Python 2.6 because of some application dependency ?
Well the first thing is check with the application vendor to see if there is a later version that supports the newer version Python, if so consider updating to that later version.
Maybe there is no later release of the application and so in this instance how do you get python-26 onto your system. Follow the steps below:
pkg list -af runtime/python-26
pkg contents -r -t depend firstname.lastname@example.org
The python-26 package is interesting as it has a conditional dependency upon the package runtime/tk-8 so that it depends upon library/python/tkinter-26. So if tk-8 is installed then tkinter-26 will need to be installed.
pkg search depend:incorporate:runtime/python-26
pkg contents -m userland-incorporation | egrep 'runtime/python-26|python/tkinter-26'
pkg change-facet version-lock.runtime/python-26=false version-lock.library/python/tkinter-26=false
pkg update email@example.com
No need to worry about tkinter-26 here because the dependency within the python-26 package will cause it to be installed.
pkg freeze -c 'Needed for Old Application' runtime/python-26
Another complete example using the current Oracle Solaris 11.4 Beta and Java 7
# pkg list -af jre-7 NAME (PUBLISHER) VERSION IFO runtime/java/jre-7 18.104.22.1689.99 --o runtime/java/jre-7 22.214.171.124.8 --- runtime/java/jre-7 126.96.36.199.9 --- runtime/java/jre-7 188.8.131.52.11 --- runtime/java/jre-7 184.108.40.206.13 --- ... # pkg search depend:incorporate:runtime/java/jre-7 INDEX ACTION VALUE PACKAGE incorporate depend firstname.lastname@example.org,5.11 pkg:/email@example.com # pkg contents -m java-7-incorporation|grep jre-7 depend firstname.lastname@example.org,5.11 type=incorporate
Oh. There is no lock. What should we do now ? Is there a lock on the Java 7 incorporation that can be used ? Yes! See the results of the searching in the first command below. So we can unlock that one and install Java 7.
# pkg search depend:incorporate:consolidation/java-7/java-7-incorporation INDEX ACTION VALUE PACKAGE incorporate depend email@example.com pkg:/firstname.lastname@example.org # pkg contents -m entire | grep java-7-incorporation depend fmri=consolidation/java-7/java-7-incorporation type=require depend facet.version-lock.consolidation/java-7/java-7-incorporation=true email@example.com type=incorporate # pkg change-facet version-lock.consolidation/java-7/java-7-incorporation=false Packages to change: 1 Variants/Facets to change: 1 Create boot environment: No Create backup boot environment: Yes PHASE ITEMS Removing old actions 1/1 Updating package state database Done Updating package cache 0/0 Updating image state Done Creating fast lookup database Done Updating package cache 1/1 # pkg list -af java-7-incorporation NAME (PUBLISHER) VERSION IFO consolidation/java-7/java-7-incorporation 220.127.116.119.99-0 i-- consolidation/java-7/java-7-incorporation 18.104.22.168.8-0 --- consolidation/java-7/java-7-incorporation 22.214.171.124.9-0 --- .... # pkg install --accept firstname.lastname@example.org email@example.com Packages to install: 2 Packages to update: 1 Create boot environment: No Create backup boot environment: Yes DOWNLOAD PKGS FILES XFER (MB) SPEED Completed 3/3 881/881 71.8/71.8 5.2M/s PHASE ITEMS Removing old actions 4/4 Installing new actions 1107/1107 Updating modified actions 2/2 Updating package state database Done Updating package cache 1/1 Updating image state Done Creating fast lookup database Done Updating package cache 1/1 # pkg freeze -c 'Needed for Old Application' java-7-incorporation consolidation/java-7/java-7-incorporation was frozen at 126.96.36.199.8-0:20180711T215211Z # pkg freeze NAME VERSION DATE COMMENT consolidation/java-7/java-7-incorporation 188.8.131.52.8-0:20180711T215211Z 07 Aug 2018 14:50:34 UTC Needed for Old Application
A couple of points with the above example. When installing the required version of java the corresponding incorporation at the correct version needed to be installed. The freeze has been applied to the Java 7 incorporation because that is the package that controls the Java 7 package version. The default version of Java remains as Java 8 but that can be changed as per the next steps below via the use of mediators (see pkg(1) and look for mediator).
# java -version java version "1.8.0_181" Java(TM) SE Runtime Environment (build 1.8.0_181-b12) Java HotSpot(TM) 64-Bit Server VM (build 25.181-b12, mixed mode) # /usr/jdk/instances/jdk1.7.0/bin/java -version java version "1.7.0_191" Java(TM) SE Runtime Environment (build 1.7.0_191-b08) Java HotSpot(TM) Server VM (build 24.191-b08, mixed mode) # pkg set-mediator -V 1.7 java Packages to change: 3 Mediators to change: 1 Create boot environment: No Create backup boot environment: Yes PHASE ITEMS Removing old actions 2/2 Updating modified actions 3/3 Updating package state database Done Updating package cache 0/0 Updating image state Done Creating fast lookup database Done Updating package cache 1/1 # java -version java version "1.7.0_191" Java(TM) SE Runtime Environment (build 1.7.0_191-b08) Java HotSpot(TM) Server VM (build 24.191-b08, mixed mode)
Another example of unlocking packages is the article More Tips for Updating Your Oracle Solaris 11 System from the Oracle Support Repository.
In summary Oracle Solaris 11 provides a single method to update all the operating system software via a pkg update but additionally allows for exceptions to be used to permit legacy applications to run.
Contributed by: Pavel Heimlich and Ales Cernosek Oracle Solaris 11.4 delivers a modern and extensible enterprise desktop environment. The...
Oracle Solaris 11.4: The trusted business platform. I'm pleased to announce the release of Oracle Solaris 11.4. Of the four releases of...
Keywords: Solaris package IPS+Repository pkg 1 Work on Directory Structure Start with organizing the package contents (files) into the...