copy-jdk-configs-4.0-1.oe2309>  <@PT@7!.ܶujG7oe popeneuler@compass-ci.com G7o OmG.I~lDd([s> {NqlAZ! mC]ڴP&IΩ\ez)0c@QoE5cYQb?"@b5"iT ZW#:SPIXV]L#ΓA'"pA~^EM/`rne(w1[CeS,^AĊD`W.7_З6ElELAb0-]K˩)uNW˾9jw/pʐ0 5{8Jhg= 4ba) VL/9[ouE YRdJ=mhЦ)@bw' sH\Tv{f9#9(@I ?d9c1a26000a7264252ba71ab55f3154feee8c1708fd86b4bf0aa2471e83078d67523e7fe2207093a6e0955cf11b8b1a84faec03a1Y5uu !ԣUQԎvT>A<?<d  8 $*4L X d |  D\p  B (k8t9|:F(GHH`IxXY\]^ubdefltu0vHwxyz;;<< << - 4.0-1gulining - 3.7-3- Upgrade 4.0 to fix Packaging scriptlets assume global 'arg' in Lua environment- Pakcage initdc-64g.compass-ci 16953141314.0-1.oe23090-metadata_list-compact_tlv-copy-jdk-configs-4.0-1.oe2309.noarch0-metadata_list-compact-copy-jdk-configs-4.0-1.oe2309.noarchcopy_jdk_configs.luacopy_jdk_configs_fixFiles.shcopy-jdk-configsLICENSE/etc/ima/digest_lists.tlv//etc/ima/digest_lists//usr/libexec//usr/share/licenses//usr/share/licenses/copy-jdk-configs/-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/generic-hardened-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection cpioxz2noarch-openEuler-linux-gnuLua script, ASCII text executableBourne-Again shell script, ASCII text executabledirectoryASCII textRR_ K[.function createPretransScript() os.execute("mkdir -p /var/lib/rpm-state") temp_path="/var/lib/rpm-state/copy_jdk_configs.lua" file = io.open(temp_path, "w") file:write([[#!/usr/bin/lua -- rpm call -- debug=true lua -- copy_jdk_configs.lua --currentjvm "%{uniquesuffix %{nil}}" --jvmdir "%{_jvmdir %{nil}}" --origname "%{name}" --origjavaver "%{javaver}" --arch "%{_arch}" --test call -- debug=true lua -- copy_jdk_configs.lua --currentjvm "java-1.8.0-openjdk-1.8.0.65-3.b17.fc22.x86_64" --jvmdir "/usr/lib/jvm" --origname "java-1.8.0-openjdk" --origjavaver "1.8.0" --arch "x86_64" --jvmDestdir /home/jvanek/Desktop local M = {} if (os.getenv("debug") == "true") then debug = true; else debug = false; end local function debugOneLinePrint(string) if (debug) then print(string) end ; end function getPath(str, sep) sep = sep or '/' return str:match("(.*" .. sep .. ")") end function splitToTable(source, pattern) local i1 = string.gmatch(source, pattern) local l1 = {} for i in i1 do table.insert(l1, i) end return l1 end local function slurp(path) local f = io.open(path) local s = f:read("*a") f:close() return s end function trim(s) return (s:gsub("^%s*(.-)%s*$", "%1")) end local function dirWithParents(path) local s = "" local dirs = splitToTable(path, "[^/]+") for i, d in pairs(dirs) do if (i == #dirs) then break end s = s .. "/" .. d local stat2 = posix.stat(s, "type"); if (stat2 == nil) then debugOneLinePrint(s .. " does not exists, creating") if (not dry) then posix.mkdir(s) end else debugOneLinePrint(s .. " exists,not creating") end end end -- main function, -- formelry main body -- move to function resolved -- https://bugzilla.redhat.com/show_bug.cgi?id=1892224 -- for readability not indented, todo, indent once tuned function M.mainProgram(arg) debugOneLinePrint("cjc: lua debug on") local caredFiles = { "jre/lib/calendars.properties", "jre/lib/content-types.properties", "jre/lib/flavormap.properties", "jre/lib/logging.properties", "jre/lib/net.properties", "jre/lib/psfontj2d.properties", "jre/lib/sound.properties", "jre/lib/deployment.properties", "jre/lib/deployment.config", "jre/lib/security/US_export_policy.jar", "jre/lib/security/unlimited/US_export_policy.jar", "jre/lib/security/limited/US_export_policy.jar", "jre/lib/security/policy/unlimited/US_export_policy.jar", "jre/lib/security/policy/limited/US_export_policy.jar", "jre/lib/security/java.policy", "jre/lib/security/java.security", "jre/lib/security/local_policy.jar", "jre/lib/security/unlimited/local_policy.jar", "jre/lib/security/limited/local_policy.jar", "jre/lib/security/policy/unlimited/local_policy.jar", "jre/lib/security/policy/limited/local_policy.jar", "jre/lib/security/nss.cfg", "jre/lib/security/cacerts", "jre/lib/security/blacklisted.certs", "jre/lib/security/jssecacerts", "jre/lib/security/trusted.certs", "jre/lib/security/trusted.jssecerts", "jre/lib/security/trusted.clientcerts", "jre/lib/ext", "jre/lib/security/blacklist", "jre/lib/security/javaws.policy", "jre/lib/security/nss.fips.cfg", "lib/security", "conf", "lib/ext" } -- before import to allow run from spec if (arg[1] == "--list") then for i, file in pairs(caredFiles) do print(file) end return 0; end -- yum install lua-posix local posix = require "posix" -- the one we are installing local currentjvm = nil local jvmdir = nil local jvmDestdir = nil local origname = nil local origjavaver = nil local arch = nil local temp = nil; local dry = false; for i = 1, #arg, 2 do if (arg[i] == "--help" or arg[i] == "-h") then print("all but jvmDestdir and debug are mandatory") print(" --currentjvm") print(" NVRA of currently installed java") print(" --jvmdir") print(" Directory where to find this kind of virtual machine. Generally /usr/lib/jvm") print(" --origname") print(" convinient switch to determine jdk. Generally java-1.X.0-vendor") print(" --origjavaver") print(" convinient switch to determine jdk's version. Generally 1.X.0") print(" --arch") print(" convinient switch to determine jdk's arch") print(" --jvmDestdir") print(" Migration/testing switch. Target Mostly same as jvmdir, but you may wont to copy ouside it.") print(" --debug or $debug") print(" Enables printing out whats going on. true/false. False by default") print(" --temp") print(" optional file to save intermediate result - directory configs were copied from") print(" --dry") print(" true/fase if true, then no changes will be written to disk except one tmp file. False by default") print(" **** specil parasm ****") print(" --list") print(" if present on cmdline, list all cared files and exists") os.exit(0) end if (arg[i] == "--currentjvm") then currentjvm = arg[i + 1] end if (arg[i] == "--jvmdir") then jvmdir = arg[i + 1] end if (arg[i] == "--origname") then origname = arg[i + 1] end if (arg[i] == "--origjavaver") then origjavaver = arg[i + 1] end if (arg[i] == "--arch") then arch = arg[i + 1] end if (arg[i] == "--jvmDestdir") then jvmDestdir = arg[i + 1] end if (arg[i] == "--debug") then --no string, boolean, workaround if (arg[i + 1] == "true") then debug = true end end if (arg[i] == "--dry") then --no string, boolean, workaround if (arg[i + 1] == "true") then dry = true end end if (arg[i] == "--temp") then temp = arg[i + 1] end end if (jvmDestdir == nil) then jvmDestdir = jvmdir end if (debug) then print("--currentjvm:"); print(currentjvm); print("--jvmdir:"); print(jvmdir); print("--jvmDestdir:"); print(jvmDestdir); print("--origname:"); print(origname); print("--origjavaver:"); print(origjavaver); print("--arch:"); print(arch); print("--debug:"); print(debug); end --trasnform substitute names to lua patterns local name = string.gsub(string.gsub(origname, "%-", "%%-"), "%.", "%%.") local javaver = string.gsub(origjavaver, "%.", "%%.") local jvms = { } debugOneLinePrint("started") foundJvms = posix.dir(jvmdir); if (foundJvms == nil) then debugOneLinePrint("no, or nothing in " .. jvmdir .. " exit") return end debugOneLinePrint("found " .. #foundJvms .. " jvms") for i, p in pairs(foundJvms) do -- regex similar to %{_jvmdir}/%{name}-%{javaver}*%{_arch} bash command if (string.find(p, name .. "%-" .. javaver .. ".*" .. arch) ~= nil) then debugOneLinePrint("matched: " .. p) if (currentjvm == p) then debugOneLinePrint("this jdk is already installed. exiting lua script") return end ; if (string.match(p, ".*-debug$")) then print(p .. " matched but seems to be debug variant. Skipping") else table.insert(jvms, p) end else debugOneLinePrint("NOT matched: " .. p) end end if (#jvms <= 0) then debugOneLinePrint("no matching jdk in " .. jvmdir .. " exit") return end ; debugOneLinePrint("matched " .. #jvms .. " jdk in " .. jvmdir) --full names are like java-1.7.0-openjdk-1.7.0.60-2.4.5.1.fc20.x86_64 table.sort(jvms, function(a, b) -- version-sort -- split on non word: . - local l1 = splitToTable(a, "[^%.-]+") local l2 = splitToTable(b, "[^%.-]+") for x = 1, math.min(#l1, #l2) do local l1x = tonumber(l1[x]) local l2x = tonumber(l2[x]) if (l1x ~= nil and l2x ~= nil) then --if hunks are numbers, go with them if (l1x < l2x) then return true; end if (l1x > l2x) then return false; end else if (l1[x] < l2[x]) then return true; end if (l1[x] > l2[x]) then return false; end end -- if hunks are equals then move to another pair of hunks end return a < b end) if (debug) then print("sorted lsit of jvms") for i, file in pairs(jvms) do print(file) end end latestjvm = jvms[#jvms] if (temp ~= nil) then src = jvmdir .. "/" .. latestjvm debugOneLinePrint("temp declared as " .. temp .. " saving used dir of " .. src) file = io.open(temp, "w") file:write(src) file:close() end local readlinkOutput = os.tmpname() for i, file in pairs(caredFiles) do local SOURCE = jvmdir .. "/" .. latestjvm .. "/" .. file local DEST = jvmDestdir .. "/" .. currentjvm .. "/" .. file debugOneLinePrint("going to copy " .. SOURCE) debugOneLinePrint("to " .. DEST) local stat1 = posix.stat(SOURCE, "type"); if (stat1 ~= nil) then debugOneLinePrint(SOURCE .. " exists") dirWithParents(DEST) -- Copy with -a to keep everything intact local exe = "cp" .. " -ar " .. SOURCE .. " " .. DEST local linkExe = "readlink" .. " -f " .. SOURCE .. " > " .. readlinkOutput debugOneLinePrint("executing " .. linkExe) os.remove(readlinkOutput) os.execute(linkExe) local link = trim(slurp(readlinkOutput)) debugOneLinePrint(" ...link is " .. link) if (not ((link) == (SOURCE))) then debugOneLinePrint("WARNING link " .. link .. " where file " .. SOURCE .. " expected!") debugOneLinePrint("Will try to copy link target rather then link itself!") --replacing any NVRA by future NVRA (still execting to have NVRA for any multiple-installable targets -- lua stubbornly consider dash as inteval. Replacing by dot to match X-Y more correct as X.Y rather then not at all local linkDest = string.gsub(link, latestjvm:gsub("-", "."), currentjvm) debugOneLinePrint("attempting to copy " .. link .. " to " .. linkDest) if (link == linkDest) then debugOneLinePrint("Those are identical files! Nothing to do!") else local exe2 = "cp" .. " -ar " .. link .. " " .. linkDest dirWithParents(linkDest) debugOneLinePrint("executing " .. exe2) if (not dry) then os.execute(exe2) end end else debugOneLinePrint("executing " .. exe) if (not dry) then os.execute(exe) end end else debugOneLinePrint(SOURCE .. " does not exists") end end end --unindented main function if (arg == nil) then debugOneLinePrint("arg variable is nil, you have to call mainProgram manually") -- this can actually not be invoked, as the debug is set via arg else M.mainProgram(arg) end return M]]) file:close() end if pcall(createPretransScript) then -- ok else -- print("Error running copy-jdk-configs pretrans.") endrm "%{rpm_state_dir}/copy_jdk_configs.lua" 2> /dev/null || :/bin/shutf-852543d91492423d8fa758135726ec875b9202605fe8e36d0c332606b1abb69fedef22fdc4b727668f3fa31cd181ed2d54fa81fcd934e25a4e5170f89a141cf07?7zXZ !#,T] b2u Q{LWW|O~ uwjL[FqŁF PIö›p7!+qUxsizv`ט^շR@wn̗Lݠ؎Qík;1|>XɿW[_8qufD)XCVskF Vvxsk$\<TI ]1'\ǟ yv4Z3B Fp鯿x ſ0|b2 -C6ZJkM&AfsKƋ!?H;%Rir|3f/R==<0iD^s̓i ]H ={IJjh\uJXb}Ť 40.6kw[vVoaW g Ħ#WZKhhH"BH`;pEom-P^~B*ѹx_w)nQn@J.dT8}j}7+P{U3rȃ mtVZ*:Aڬ8?gjnvOĊvl$KER|jT)U3 @G#G+D@!1<1Gy2B&PoI"~@+^x#ho‡gX{>цY T31`M Z1;F%c>m@d2r bJ9TcPI|&(Ͼ>֤;^j VY3f~$upY)w4V$5@x6$!* )%(O88Ig,ת#1;FP!~mu":dl8' jc9)Xp]14('/{f94A-O1``:׷@<7XH (3f͸`(= 8C֯/k2(O#QFiV?NI;ӿoij \neFl"=IQo!o$rj5ɏ1 =:z?K> zɹuWw[5Ia=1AJ&a- T*.>a bMyW\)4ՠǜ;m>D)YXt?F&qRM锄ɾU OC8[9+[5{x`~{:L[Qg{e-H½PQʄɷk)ɑ| oq/zjfu<>m/]Se;P욫Uz.PNPVʋ"Du-+)$qV~>Ζ:?icR3x,ss- H`Lx6Xڻ3g2E5$-䗷OӜH6!5-['cNYCZ?AV/'r F ԉHn^Yvr/ĸ޹R=6h#|!׶SE=DG\ELy:nEX&{ ?X%3°e!,T14C߈QZʿ U&vч-Evg:qII.wD-Q)g\4.H|&e<28Gbk.+4W ֎vcF y]1# ?@KeH8CG?I RqY©JNހRM 5©/w)]EkVqv8-nW+SBݽKVd/CYYfVdjC]ުH%tA5̊ tV^6k[xF;^w6g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