This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
aix:aix_package [2021/12/06 10:11] manu [Library static/library dynamic] |
aix:aix_package [2025/01/16 12:37] (current) manu [Standard commands to manage AIX packages] |
||
|---|---|---|---|
| Line 28: | Line 28: | ||
| </cli> | </cli> | ||
| - | Efix invertory is stored in a text file: "/usr/emgrdata/DBS/efix.db" | + | Efix inventory is stored in a text file: "/usr/emgrdata/DBS/efix.db" and "/usr/emgrdata/DBS/pkglck.db" |
| + | <cli prompt='#'> | ||
| + | [root@aix01]/root# cat "/usr/emgrdata/DBS/efix.db" | ||
| + | IJ36810s3a|:|IJ36810 Potential security issue|:|.|:|.|:|.|:|.|:|0|:|1|:|00F7CD554C00121710122121|:|1|:|05/02/22 12:21:09|:|S|:|0|:|7|:|.|:|.|:|.|:|0|:|1|:|1|:|. | ||
| + | 1022103a|:|Ifix for Openssl CVE-2022-0778|:|.|:|.|:|.|:|.|:|0|:|1|:|00F787C74C00042206045322|:|5|:|06/30/22 08:52:53|:|S|:|0|:|7|:|.|:|.|:|.|:|0|:|1|:|1|:|. | ||
| + | [root@aix01]/root# cat "/usr/emgrdata/DBS/pkglck.db" | ||
| + | IJ36810s3a|:|1|:|/usr/bin/lscore|:|bos.rte.security|:|1|:|1|:|050212051122|:|7.2.5.101 | ||
| + | 1022103a|:|1|:|/usr/lib/libcrypto.a|:|openssl.base|:|1|:|5|:|063008060322|:|1.0.2.2103 | ||
| + | 1022103a|:|2|:|/usr/lib/libssl.a|:|openssl.base|:|1|:|5|:|063008060422|:|1.0.2.2103 | ||
| + | 1022103a|:|3|:|/usr/lib/libcrypto.a.min|:|openssl.base|:|1|:|5|:|063008060422|:|1.0.2.2103 | ||
| + | 1022103a|:|4|:|/usr/bin/openssl|:|openssl.base|:|1|:|5|:|063008060422|:|1.0.2.2103 | ||
| + | 1022103a|:|5|:|/usr/bin/openssl64|:|openssl.base|:|1|:|5|:|063008060522|:|1.0.2.2103 | ||
| + | </cli> | ||
| ==== To find all known maintenance or service levels ==== | ==== To find all known maintenance or service levels ==== | ||
| Line 46: | Line 59: | ||
| 6100-06-03-1048 | 6100-06-03-1048 | ||
| 6100-06-02-1044 | 6100-06-02-1044 | ||
| - | 6100-06-01-1043 | ||
| - | 6100-06-00-0000 | ||
| - | 6100-05-03-1036 | ||
| - | 6100-05-02-1034 | ||
| - | 6100-05-01-1016 | ||
| - | 6100-04-07-1036 | ||
| 6100-04-06-1034 | 6100-04-06-1034 | ||
| 6100-04-05-1015 | 6100-04-05-1015 | ||
| 6100-04-04-1014 | 6100-04-04-1014 | ||
| - | 6100-04-03-1009 | ||
| - | 6100-04-02-1007 | ||
| - | 6100-04-01-0944 | ||
| 6100-03-07-1036 | 6100-03-07-1036 | ||
| . | . | ||
| Line 107: | Line 111: | ||
| ===== Standard commands to manage AIX packages ===== | ===== Standard commands to manage AIX packages ===== | ||
| + | |||
| + | List the content of a repository (with detailed packages) | ||
| + | <cli prompt='#'> | ||
| + | [root@aix01]/root# installp -L -d /export/softs/PowerHA/7.2.5.3/ | ||
| + | cluster.adt.es:cluster.adt.es.client.include:7.2.5.0::I:T:::::N:PowerHA SystemMirror Client Include Files::::0:0743: | ||
| + | cluster.adt.es:cluster.adt.es.client.include:7.2.5.1::S:T:::::N:PowerHA SystemMirror Client Include Files::::0:0743: | ||
| + | </cli> | ||
| <cli prompt='#'> | <cli prompt='#'> | ||
| Line 114: | Line 125: | ||
| # lslpp -f <package_name> : list all files from an installed package | # lslpp -f <package_name> : list all files from an installed package | ||
| # lslpp -w <command_full_path> : list the package from which the command belong to | # lslpp -w <command_full_path> : list the package from which the command belong to | ||
| + | # lslpp -qch : list hostory on packages | ||
| # install_all_updates -d ./ -rc -Y : update all packages from current directory (-Y: accept licenses) | # install_all_updates -d ./ -rc -Y : update all packages from current directory (-Y: accept licenses) | ||
| Line 123: | Line 135: | ||
| # installp -u -g <package name> : remove installed package and dependencies | # installp -u -g <package name> : remove installed package and dependencies | ||
| </cli> | </cli> | ||
| + | |||
| + | Best practice for updating you OS: | ||
| + | * first update the install tools | ||
| + | * preview the remainder of the TL update | ||
| + | * apply the TL update | ||
| + | |||
| + | <code> | ||
| + | installp -d <path> -i | ||
| + | installp -d <path> -p | ||
| + | installp -d <path> | ||
| + | </code> | ||
| **IMPORTANT** | **IMPORTANT** | ||
| Line 128: | Line 151: | ||
| <cli prompt='#'> | <cli prompt='#'> | ||
| # installp -Or -agX ios.cli.rte | # installp -Or -agX ios.cli.rte | ||
| + | </cli> | ||
| + | |||
| + | ===== Date of package update ===== | ||
| + | |||
| + | Date for latest kernel upgrade | ||
| + | <cli prompt='>'> | ||
| + | root@nimprod /root> lslpp -h | grep -p bos.mp | ||
| + | bos.mp64 | ||
| + | 7.2.5.203 COMMIT COMPLETE 07/24/23 15:05:28 | ||
| + | 7.2.5.205 COMMIT COMPLETE 11/15/23 10:27:26 | ||
| </cli> | </cli> | ||
| Line 134: | Line 167: | ||
| Set the following variable before starting installation | Set the following variable before starting installation | ||
| export INST_DEBUG=y | export INST_DEBUG=y | ||
| + | |||
| + | ===== check package consistency ===== | ||
| + | |||
| + | Check AIX package consistency: normal, checksum, deep, file list, links | ||
| + | <cli prompt='#'> | ||
| + | # lppchk -v | ||
| + | # lppchk -c | ||
| + | # lppchk -vm3 | ||
| + | # lppchk -f | ||
| + | # lppchk -l | ||
| + | </cli> | ||
| ===== Convert bff AIX packages ===== | ===== Convert bff AIX packages ===== | ||
| Line 368: | Line 412: | ||
| ===== To convert a library file .a from static to a dynamic file .so ===== | ===== To convert a library file .a from static to a dynamic file .so ===== | ||
| - | * Use the command: | + | * Use the command (here 64 bits): |
| + | <cli prompt='#'># /opt/freeware/bin/gcc -maix64 -shared -Wall /opt/freeware/lib/libgmp.a -o libgmp.so.10</cli> | ||
| + | |||
| + | Now check if library 32 or 64 bits (32b 'll failed) | ||
| + | <cli prompt='>'> | ||
| + | [root@aix06] /opt/freeware/lib> dump -X32 -H /opt/freeware/lib/libgmp.so.10 | ||
| + | |||
| + | /opt/freeware/lib/libgmp.so.10: | ||
| + | dump: /opt/freeware/lib/libgmp.so.10: 0654-108 file is not valid in the current object file mode. | ||
| + | Use the -X option to specify the desired object mode. | ||
| + | |||
| + | [root@aix06] /opt/freeware/lib> dump -X64 -H /opt/freeware/lib/libgmp.so.10 | ||
| + | |||
| + | /opt/freeware/lib/libgmp.so.10: | ||
| + | |||
| + | ***Loader Section*** | ||
| + | Loader Header Information | ||
| + | VERSION# #SYMtableENT #RELOCent LENidSTR | ||
| + | 0x00000001 0x00000007 0x0000001c 0x000000d3 | ||
| + | |||
| + | #IMPfilID OFFidSTR LENstrTBL OFFstrTBL | ||
| + | 0x00000002 0x000002a0 0x0000009b 0x00000373 | ||
| + | |||
| + | |||
| + | ***Import File Strings*** | ||
| + | INDEX PATH BASE MEMBER | ||
| + | 0 /opt/freeware/lib/gcc/powerpc-ibm-aix7.2.0.0/10/ppc64:/opt/freeware/lib/gcc/powerpc-ibm-aix7.2.0.0/10:/opt/freeware/lib/gcc/powerpc-ibm-aix7.2.0.0/10/../../..:/opt/freeware/lib:/usr/lib:/lib | ||
| + | 1 libgcc_s.a shr.o | ||
| + | </cli> | ||
| + | Old command | ||
| <cli prompt='#'># gcc -shared -Wl,--whole-archive library.a -o library.so</cli> | <cli prompt='#'># gcc -shared -Wl,--whole-archive library.a -o library.so</cli> | ||