copy-jdk-configs-4.0-1.oe2203sp3>  <@PT@7!.ܶujG7oe}Džopeneuler@compass-ci.com G7od ^ fZ_;2ݹfb׬{-| 'n<<~ZD Sp8:sZ=Gư 8йh\/Mްg6!< XPN2PpهSHp>n)QK`۪ir?n~RuEO?ߎZR!P=+2ܲΈ8 }q tKq3NY|[%qEس)^ +ze8:^фؗiEA oXE.6>Y;ӥ6=B"zV22g/nmKXٽ&.Є9t0yɊb/tɟo3wM栳Vx%M552762ce5d1d2aa4154569805fe26451ce1353bf00be3e4215df8336508698bd13e4aa2b42e04cf2ea348ab9e6b0a0a82251d787Y  -ڋDZT>A<?<d # ; (.8P \ h    Ldx  J (s8|9:F0GPHhIXY\]^bdefltu(v@wxyz;;<< << - 4.0-1gulining - 3.7-3- Upgrade 4.0 to fix Packaging scriptlets assume global 'arg' in Lua environment- Pakcage initdc-64g.compass-ci 17027418694.0-1.oe2203sp30-metadata_list-compact_tlv-copy-jdk-configs-4.0-1.oe2203sp3.noarch0-metadata_list-compact-copy-jdk-configs-4.0-1.oe2203sp3.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 -fasynchronous-unwind-tables -fstack-clash-protectioncpioxz2noarch-openEuler-linux-gnua /usr/bin/lua script, ASCII text executableBourne-Again shell script, ASCII text executabledirectoryASCII textRRU{{=T=ޚ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-8133bc7ce98c87cc3c0cd180263652a332bdd4998e6e9246693593a14514326d7bb0676d18e69ef4e995fffb431e69fed551e9572dcb1142960ff4385bd722bc4?7zXZ !#,T] b2u Q{LWA)MR{Qݨk/S{;SZ]u0*0}gl~B~/=>̫г4 Xrוtr^(@S!xoqa"ڳdTmCji6VTMfRm,'$a;3Rhsϴ e]("DMC6ce$d ď'%! A%IM6Sxb`+"H-"3Z"!&H7X؋TqR&"J8pM.TXÓq'? Ae z-˫0ڤ#KPqȞkkUsƱ3jni&!6l \<:J1oY͸X^KvA1ekN҂2.}?}^\U! yOG2s (>.]ЏN)=e8TL`bW9֮.z Qt/Y\;̈́7%sACg1- H2qJY͡!bk9!;0fa=CJ@Qo_$8",G{ӺݔE+s"J|\_V6+D3O6&D9Po6 aL/J.vQ*]AFk>_"$RHXqL5^=v"$ +{zژI 0 !FL0K"RDm.62bz㣘z9 G2#Au'l>4r蓸98h].X1Xyb_:xCm;\G7Kd_]o*<ˋ hdԧfs||&>8UPMpW1tH*IvY(MI 9_| YA`#RaM y桭pp@.G%p* Z12jv1s&Gu6^cx4nc׌l8}VFT@!('賟r /t hCȧ:hp6uХ"f]^\KaY~C[.-Sadc#b1Hښrl!u+zӕ+D_GXn\q\aAwqAEY ߻lȟ#ib"7}2iNJǗ,j-:b'dϕamԾ@g Y;@$GLwI];~0άfM][di\8oQ@m4 F\K],2Vu$ g2׼Vgt%w&57~*ևk_.dd~^V :>C48oC()<0?#',%0 N~sucȺ2﵏_(?E  }HM;MR.Wܘhe ]z/L2տ637G5Ѵb&I'B^_]- @c UхGG+x/]m-p\dԖ1{ nG2;Qu% b] z5;mP8.PYiyR:u3*`ͳJ|SEzl[Aߤo4+ ,b'i< oY)+3L.+ܯ>n~VB֓$3F1 B<<8,X,I)2NW勿qO؇\}єܥ_t>U!)'zwz'PmbDd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