|
| 1 | +This file presents an example of the sysdiff execution against a solaris 10 |
| 2 | +branded zone. |
| 3 | + |
| 4 | +# zoneadm list -civ |
| 5 | +... |
| 6 | + - s10clean-CPU-mc installed /system/zones/s10clean-CPU-mc solaris10 excl |
| 7 | +... |
| 8 | +# sysdiff.py -q diff s10clean-CPU-mc |
| 9 | +IPS package manifest generated: |
| 10 | +/var/tmp/s10clean-CPU-mc-20210319142906/s10clean-CPU-mc.p5m |
| 11 | + |
| 12 | +Please review and adjust it as needed before running the next step. |
| 13 | + |
| 14 | +Please provide the following directory as results-dir for the next steps: |
| 15 | + |
| 16 | +/var/tmp/s10clean-CPU-mc-20210319142906 |
| 17 | + |
| 18 | +The next step should be 'sysdiff depresolve' |
| 19 | +# sysdiff.py -q depresolve /var/tmp/s10clean-CPU-mc-20210319142906 |
| 20 | +'sysdiff depresolve' successful, next step is 'sysdiff lint' |
| 21 | +# sysdiff.py -q lint --s11.4-repo <URI of the Solaris 11.4 support repo> /var/tmp/s10clean-CPU-mc-20210319142906 |
| 22 | +command |
| 23 | + pkglint -c /var/tmp/s10clean-CPU-mc-20210319142906.cache -r <URI of the Solaris 11.4 support repo> /var/tmp/s10clean-CPU-mc-20210319142906/s10clean-CPU-mc.p5m.dep.res |
| 24 | +failed |
| 25 | +WARNING pkglint.manifest009.2 pkg.description matches pkg.summary in pkg:/ [email protected],5.11 |
| 26 | +ERROR pkglint.dupaction007 dir action for usr/share/locale/he is reference-counted but has different attributes across 3 duplicates: group: other -> package/pkg system/locale group: root -> s10clean-CPU-mc |
| 27 | +! If the 'sysdiff lint' returns an error, it needs to be analyzed and addressed |
| 28 | +! before continuing. In this case the issue is that the directory we're trying |
| 29 | +! to package has different group than on Solaris 11.4 - root instead of other. |
| 30 | +! the issue can be fixed either via removal of the problematic entry from |
| 31 | +! the manifest, or by changing the group entry in the manifest to match the OS. |
| 32 | +! Whenever the package attempts to deliver files to OS-delivered directories, |
| 33 | +! it is recommended to review them carefully to avoid conflicts with OS |
| 34 | +! delivered contents in the future. |
| 35 | +! The warning can be ignored, or addressed by providing extended description |
| 36 | +! for the package. |
| 37 | +! Once the manifest is adjusted, the process needs to be restarted from the |
| 38 | +! 'sysdiff depresolve' in case the change affected the dependencies of the |
| 39 | +! package we're trying to generate. |
| 40 | +# sysdiff.py -q depresolve /var/tmp/s10clean-CPU-mc-20210319142906 |
| 41 | +'sysdiff depresolve' successful, next step is 'sysdiff lint' |
| 42 | +# sysdiff.py -q lint --s11.4-repo <URI of the Solaris 11.4 support repo> /var/tmp/s10clean-CPU-mc-20210319142906 |
| 43 | +'sysdiff lint' successful, next step is 'sysdiff publish' |
| 44 | + |
| 45 | +# zfs create -p rpool/VARSHARE/pkgrepos/sysdiff-repo |
| 46 | +# sysdiff.py -q publish -c --target-repo /var/share/pkgrepos/sysdiff-repo/ --publisher sysdiff-publisher /var/tmp/s10clean-CPU-mc-20210319142906 |
| 47 | +'sysdiff publish' successful, the package can be converted to an archive using 'sysdiff archive' |
| 48 | + |
| 49 | +# pkgrepo list -s /var/share/pkgrepos/sysdiff-repo/ |
| 50 | +PUBLISHER NAME O VERSION |
| 51 | +sysdiff-publisher s10clean-CPU-mc 1.0:20210319T135133Z |
| 52 | + |
| 53 | +Archive creation is an optional step: |
| 54 | + |
| 55 | +# sysdiff.py -q archive --source-repo /var/share/pkgrepos/sysdiff-repo/ /var/tmp/s10clean-CPU-mc-20210319142906 |
| 56 | +/var/tmp/s10clean-CPU-mc-20210319142906/s10clean-CPU-mc.p5p created successfully |
| 57 | + |
| 58 | +Installation from the repo: |
| 59 | +# pkg set-publisher -g /var/share/pkgrepos/sysdiff-repo/ sysdiff-publisher |
| 60 | + |
| 61 | +# zlogin targetzone |
| 62 | +# pkg install s10clean-CPU-mc |
| 63 | + Packages to install: 1 |
| 64 | + Create boot environment: No |
| 65 | +Create backup boot environment: No |
| 66 | + |
| 67 | +DOWNLOAD PKGS FILES XFER (MB) SPEED |
| 68 | +Completed 1/1 152/152 2.2/2.2 -- |
| 69 | + |
| 70 | +PHASE ITEMS |
| 71 | +Installing new actions 265/265 |
| 72 | +Updating package state database Done |
| 73 | +Updating package cache 0/0 |
| 74 | +Updating image state Done |
| 75 | +Creating fast lookup database Done |
| 76 | +Updating package cache 2/2 |
| 77 | + |
| 78 | +---- |
| 79 | + |
| 80 | +If the manifest needs to be adjusted after testing: |
| 81 | +# sysdiff.py -q depresolve /var/tmp/s10clean-CPU-mc-20210319142906 |
| 82 | +'sysdiff depresolve' successful, next step is 'sysdiff lint' |
| 83 | +# sysdiff.py -q lint --s11.4-repo <URI of the Solaris 11.4 support repo> /var/tmp/s10clean-CPU-mc-20210319142906 |
| 84 | +'sysdiff lint' successful, next step is 'sysdiff publish' |
| 85 | +# sysdiff.py -q publish --target-repo /var/share/pkgrepos/sysdiff-repo/ /var/tmp/s10clean-CPU-mc-20210319142906 |
| 86 | +'sysdiff publish' successful, the package can be converted to an archive using 'sysdiff archive' |
| 87 | +# pkgrepo list -s /var/share/pkgrepos/sysdiff-repo/ |
| 88 | +PUBLISHER NAME O VERSION |
| 89 | +sysdiff-publisher s10clean-CPU-mc 1.0:20210319T135508Z |
| 90 | +sysdiff-publisher s10clean-CPU-mc 1.0:20210319T135133Z |
| 91 | + |
| 92 | +In the zone: |
| 93 | +# pkg refresh |
| 94 | +# pkg update s10clean-CPU-mc |
| 95 | + Packages to update: 1 |
| 96 | + Create boot environment: No |
| 97 | +Create backup boot environment: Yes |
| 98 | + |
| 99 | +PHASE ITEMS |
| 100 | +Removing old actions 1/1 |
| 101 | +Updating modified actions 1/1 |
| 102 | +Updating package state database Done |
| 103 | +Updating package cache 1/1 |
| 104 | +Updating image state Done |
| 105 | +Creating fast lookup database Done |
| 106 | +Updating package cache 2/2 |
| 107 | + |
| 108 | +---- |
| 109 | + |
| 110 | +Once the package is installed in the target zone, it may happen that one of |
| 111 | +the packages it depends on becomes obsolete in the Solaris 11.4, which will |
| 112 | +cause the OS update to fail, e.g.: |
| 113 | +# pkg update --accept --be-name st_103 [email protected] |
| 114 | +... |
| 115 | +A 'sync-linked' operation failed for child 'zone:targetzone' with an unexpected |
| 116 | +return value of 1 and generated the following output: |
| 117 | + |
| 118 | +pkg sync-linked: Package 's10clean-CPU-mc' must be uninstalled or upgraded if the requested operation is to be performed. |
| 119 | + Reject: pkg://sysdiff-publisher/ [email protected] |
| 120 | + Reason: All acceptable versions of 'require-any' dependencies on frozenset({'runtime/ [email protected]'}) are obsolete |
| 121 | + |
| 122 | +There are two possible approaches to addressing this issue. In the short term, |
| 123 | +the obsoleted package may be unlocked to allow it to remain installed after the |
| 124 | +update: |
| 125 | + |
| 126 | +# zlogin targetzone |
| 127 | +# pkg change-facet facet.version-lock.runtime/perl-526=false |
| 128 | + |
| 129 | +This approach may lead to further issues/conflicts in the future, and is |
| 130 | +recommended only as a stop-gap solution. |
| 131 | + |
| 132 | +Permanent solution to such an issue is to regenerate the package based on |
| 133 | +the original solaris10 branded zone and the preserved 'results-dir'. The |
| 134 | +package can be regenerated by running the 'depresolve', 'lint', and 'publish' |
| 135 | +steps as during the original creation of the package. Please keep in mind |
| 136 | +that the package is timestamped, so it is not necessary to change the version |
| 137 | +number during the respin, the updated timestamp is sufficient to make the |
| 138 | +package distinct. |
| 139 | + |
0 commit comments