Open
Conversation
gen_patch_metadata.py is a helper script for Oracle quarterly patches,
but has not kept up with toolkit updates, as well as data
inconsistencies upstream. This change retains the basic structure, but
fixes several issues:
* Support for database combo patches, in addition to the existing GI
combo patches
* Using the now-standard lowercase for TRUE and FALSE
* Handling an issue in current 21c patches where the HTML title tag is
empty, but the text is still in the meta tag
* Handling the new `minimum_opatch` field by extracting `version.txt`
from the current OPatch zip file
* Some formatting updates that Gemini liked
* Handling 21c patch variances, notably the lack of sub-patches
* Updating type hints for Requests
Sample output from latest patches:
```
$ python3 new_gen_patch_metadata.py --patch=38658588 --mosuser mfielding@google.com
MOS Password:
INFO:root:Abstract: COMBO OF OJVM COMPONENT 19.30.0.0.260120 + GI RU 19.30.0.0.260120
INFO:root:Downloading OPatch metadata...
Add to roles/common/defaults/main/gi_patches.yml:
- { category: "RU", base: "19.3.0.0.0", release: "19.30.0.0.260120", patchnum: "38658588", patchfile: "p38658588_190000_Linux-x86-64.zip", patch_subdir: "/38629535", prereq_check: false, method: "opatchauto apply", ocm: false, upgrade: false, md5sum: "OiwVAK9ag4pbCxXqvkxUpw==", minimum_opatch: "12.2.0.1.49" }
Add to roles/common/defaults/main/rdbms_patches.yml:
- { category: "RU_Combo", base: "19.3.0.0.0", release: "19.30.0.0.260120", patchnum: "38658588", patchfile: "p38658588_190000_Linux-x86-64.zip", patch_subdir: "/38523609", prereq_check: true, method: "opatch apply", ocm: false, upgrade: true, md5sum: "OiwVAK9ag4pbCxXqvkxUpw==", minimum_opatch: "12.2.0.1.49" }
$ python3 new_gen_patch_metadata.py --patch=38658587 --mosuser mfielding@google.com
MOS Password:
INFO:root:Abstract: COMBO OF OJVM COMPONENT 19.30.0.0.260120 + DB RU 19.30.0.0.260120
INFO:root:Downloading OPatch metadata...
Add to roles/common/defaults/main/rdbms_patches.yml:
- { category: "DB_OJVM_RU", base: "19.3.0.0.0", release: "19.30.0.0.260120", patchnum: "38658587", patchfile: "p38658587_190000_Linux-x86-64.zip", patch_subdir: "/38523609", prereq_check: true, method: "opatch apply", ocm: false, upgrade: true, md5sum: "De2izV3i+NgGZ8M1nHUEZQ==", minimum_opatch: "12.2.0.1.49" }
- { category: "DB_RU", base: "19.3.0.0.0", release: "19.30.0.0.260120", patchnum: "38658587", patchfile: "p38658587_190000_Linux-x86-64.zip", patch_subdir: "/38632161", prereq_check: true, method: "opatch apply", ocm: false, upgrade: true, md5sum: "De2izV3i+NgGZ8M1nHUEZQ==", minimum_opatch: "12.2.0.1.49" }
$ python3 new_gen_patch_metadata.py --patch=38725048 --mosuser mfielding@google.com --debug
MOS Password:
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): updates.oracle.com:443
DEBUG:urllib3.connectionpool:https://updates.oracle.com:443 "GET /Orion/SimpleSearch/process_form?search_type=patch&patch_number=38725048&plat_lang=226P HTTP/1.1" 200 3870
INFO:root:Abstract: DATABASE RELEASE UPDATE 21.21.0.0.0
DEBUG:root:21c patch with no subdirs found; defaulting to root "/"
DEBUG:root:Final selection - GI: None, DB: , OJVM: None. is_gi: False
INFO:root:Downloading OPatch metadata...
DEBUG:urllib3.connectionpool:https://updates.oracle.com:443 "GET /Orion/SimpleSearch/process_form?search_type=patch&patch_number=6880880&plat_lang=226P HTTP/1.1" 200 None
Add to roles/common/defaults/main/rdbms_patches.yml:
- { category: "DB_RU", base: "21.0.0.0.0", release: "21.21.0.0.0", patchnum: "38725048", patchfile: "p38725048_210000_Linux-x86-64.zip", patch_subdir: "/", prereq_check: true, method: "opatch apply", ocm: false, upgrade: true, md5sum: "GwM+wklzKV+cZpJ5g22WkA==", minimum_opatch: "12.2.0.1.49" }
```
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mfielding The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
To avoid incorrect hostname matching, and to make the security scanner happy.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
gen_patch_metadata.py is a helper script for Oracle quarterly patches, but has not kept up with toolkit updates, as well as data inconsistencies upstream. This change retains the basic structure, but fixes several issues:
minimum_opatchfield by extractingversion.txtfrom the current OPatch zip fileA diff ignoring the whitespace changes:
https://gist.github.com/mfielding/39713d4318f677bc45981080e8f7caa2
Sample output from latest patches: