copy-jdk-configs-4.1-5.fc40 >t 6 6_6 3!]W>D] 'p~[ye 'p~[y̶Uվ Wؙ$B'HIO7p]kit88H:3L8rjwu6D] 'p~[ye 'p~[ỷOp+婟t3b:᱖-?MT΄8w7r;LZ{X0iJ~AF*G,}+-O S*/PTXĦ%  ^=gʌYbD8vsż#l<98IPPQ4I&bp,>>/&X RR"ؒӀR~T{}xlЙS<|^J:;b,Z88+j8+8B~C#_zdF$> Quqzϓr 0٭dUE[Vn0thL=V Hi8F2\L:J pt[:ᑊ`=Q4r a>Q/ 1G,7k_ 6B_ǸOLTdEᚽh֦[#pPp 4xAm `E@?@d  > )5X^hx    \ `p   (89:GHIXY\]^;bd Te Yf ^l at |u v w x y $ ,?^?@@ @@@@J@L@P@V@@Ccopy-jdk-configs4.15.fc40JDKs configuration files copierUtility script to transfer JDKs configuration files between updates or for archiving. With script to fix incorrectly created rpmnew filesebuildhw-x86-02.iad2.fedoraproject.orgQFedora ProjectFedora ProjectBSDFedora ProjectUnspecifiedhttps://pagure.io/copy_jdk_configslinuxnoarch1ӁA큤eSeSeSeS8a81cc8d2d07d525c97b56f4bf5d1457ce716b3c1de1e103e6acb4c9a1ffd5a448cc059a99fd4617b9b24a64413c734705fa31f87c018f848ea65bb633818fb4386eaf71633bf096e6c17471f50e867dabdf14d38a157ca27a0425dc583eb9ferootrootrootrootrootrootrootrootcopy-jdk-configs-4.1-5.fc40.src.rpmcopy-jdk-configs @@     /bin/sh/usr/bin/bash/usr/bin/luafindutilslualua-posixrpmlib(BuiltinLuaScripts)rpmlib(CompressedFileNames)rpmlib(FileDigests)rpmlib(PayloadFilesHavePrefix)rpmlib(PayloadIsZstd)4.2.2-13.0.4-14.6.0-14.0-15.4.18-14.19.1eed@d@c0c5c47@b@Fedora Release Engineering - 4.1-5Fedora Release Engineering - 4.1-4Fedora Release Engineering - 4.1-3Fedora Release Engineering - 4.1-2Fedora Release Engineering - 4.1-1Fedora Release Engineering - 4.1-0Fedora Release Engineering - 4.0-4- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild- update to attempt to solve bug which could delete empty dirs in /etc- update to attempt to solve bug which could delete empty dirs in /etc- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild4.1-5.fc40copy_jdk_configs.luacopy_jdk_configs_fixFiles.shcopy-jdk-configsLICENSE/usr/libexec//usr/share/licenses//usr/share/licenses/copy-jdk-configs/-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wno-complain-wrong-lang -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointercpiozstd19noarch-redhat-linux-gnuLua script, ASCII text executableBourne-Again shell script, ASCII text executabledirectoryASCII textRRfunction createPretransScript() -- the sript must be available during pretrans, so multiply it to tmp os.execute("mkdir -p /var/lib/rpm-state") temp_path="/var/lib/rpm-state/copy_jdk_configs.lua" -- print("generating " .. temp_path) 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 -- in netinst, the above call may fail. pcall should save instalation (as there is nothing to copy anyway) -- https://bugzilla.redhat.com/show_bug.cgi?id=1295701 -- todo, decide whether to check for {rpm_state_dir} and skip on not-existing, or keep creating if pcall(createPretransScript) then -- ok else -- print("Error running copy-jdk-configs pretrans.") end# remove file created in pretrans # echo "removing /var/lib/rpm-state/copy_jdk_configs.lua" || : rm "/var/lib/rpm-state/copy_jdk_configs.lua" 2> /dev/null || :/bin/shhttps://bugz.fedoraproject.org/copy-jdk-configsfindutilsutf-81a131b86a57bf8d2d1551ce31d98db25f8b114f5feb9cc74435872603261a1637599cc64ac7a726bc7cf8aaf7b3ac098556a31d9125443d016b3670a6b562a63?(/h-=km6Rn˚cwz(fP~zMV W?m-THcbn)S8i8om}/wqy܅/ޏt{VH#SZ T* *K $z!9=b (3PV(TBn]Rưw遤W[yT(D62ep:hpG•(N2T:8ڜsKDjrIW%f%{)ՔSF*YbJ2UzZpS7/U1+b}HB,@V"@fWc09HQTXJb2 X "q0vȔ؝L7JqynnR1~5X&Q`V3L5&8|'ղ?7( Nw~MmL&D\>XXjv10?tl;pT FsT4Ho7S y]a@<>4>XQh2>8B&!ʰlddHh0 Cl26FDѨq0tdh2x3l*xHd.FG !"i`42<4@a[V=5n8d:/a](reAQzQˡ },EѻaE't/%A5X) LӾ`*$"*!r䜛E*,P> rzᡑ\ ӅzH8ra|ԻpLB]rZC5Tk8RKz]jZ`"d`8B.]!hPdl<Ll;-m-@;*S ڭٵ9׎BjB0U*UT^7۞XOդT$"n%Z حsAbB /9Fld2 |[: Ҿ%a,L<)j?Lq]PK8I%y6oM*­ubi[I0|4$p,CIuLьH$@ "4,NYsBrL(0!b !8""##ҤQPQMj*0̩p7=A-?U)lET&W,~dÉﵷNVC٨#C}hh@ff !y4{0MOB(EZ*oAH2}ʆ;}8۰%[~YdaV]ndcI{:/6Ю17^ZTdHdj*jʋc:Bs$| `5_lijm<Ѭl<=2n9:QӪ آ|yi 0?n<j;׭a*^9^:ApF3xR_$o7k&@/>^kO<#\^+ U4S2)W0ُ`شIb~w%O.(xc.E`$gޚz;EB8p!ܳQ&RR.LH :GP٥Yf*s10F{9%'rXy.Tvmҿ7L҉o}6bUjk<| -#`t1)5kϞGr*KDS> ,3l+NJ|F$ls՘ܖZIbR Hka} .l>MDK Daax\@N9qCL{5N`epfӅ;aB[d_r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