copy-jdk-configs-1.2-1.fc23$>-2ʽDmfZ`>>#:?#*d  > -3<H N T `  8DX |  (D8P9h:iG H,I8X<Y@\L]X^bdefltuv wXxdypt"r### #$Ccopy-jdk-configs1.21.fc23JDKs configuration files copierUtility script to transfer JDKs configuration files between updates or for archiving.Wbuildhw-09.phx2.fedoraproject.org2Fedora ProjectFedora ProjectBSDFedora ProjectUnspecifiedhttps://hg.fedorahosted.org/hg/copy_jdk_configslinuxnoarch_ӁA큤W}WW}0c74403d97fc725748b61f269d8d13dd6f50a9eb1c8225f3bca77824a8e76cea386eaf71633bf096e6c17471f50e867dabdf14d38a157ca27a0425dc583eb9ferootrootrootrootrootrootcopy-jdk-configs-1.2-1.fc23.src.rpmcopy-jdk-configs @     /bin/sh/usr/bin/lualualua-posixrpmlib(BuiltinLuaScripts)rpmlib(CompressedFileNames)rpmlib(FileDigests)rpmlib(PayloadFilesHavePrefix)rpmlib(PayloadIsXz)4.2.2-13.0.4-14.6.0-14.0-15.2-14.13.0-rc1WWVVVqR@VUJiri Vanek - 1.2-1Jiri Vanek - 1.1-5Fedora Release Engineering - 1.1-4Jiri Vanek - 1.1-3Jiri Vanek - 1.1-2Jiri Vanek - 1.1-1- updated to 1,3 which fixing nss minor issue- posttrans silenced, the error is appearing only in state, when there is nothing to copy- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild- pretrasn lua call now done in pcall (protected call) - also posttrans now always return 0- package now "installs" also during pretrans, so pretrasn scripts can use it - pretrasn "install" is removed in postrans- initial package1.2-1.fc23copy_jdk_configs.luacopy-jdk-configsLICENSE/usr/libexec//usr/share/licenses//usr/share/licenses/copy-jdk-configs/-O2 -g -march=pentium3drpmxz2noarch-redhat-linux-gnuLua script, ASCII text executabledirectoryASCII textRfunction 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 -- lua -- copy_jdk_configs.lua --currentjvm "%{uniquesuffix %{nil}}" --jvmdir "%{_jvmdir %{nil}}" --origname "%{name}" --origjavaver "%{javaver}" --arch "%{_arch}" --debug true --test call --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" --debug true --jvmDestdir /home/jvanek/Desktop -- 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 debug = 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") print(" Enables printing out whats going on. true/false") 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 end if (jvmDestdir == nill) 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 = { } 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/java.policy", "jre/lib/security/java.security", "jre/lib/security/local_policy.jar", "jre/lib/security/nss.cfg", "jre/lib/ext"} 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 if (debug) then print("started") end; foundJvms = posix.dir(jvmdir); if (foundJvms == nil) then if (debug) then print("no, or nothing in "..jvmdir.." exit") end; return end if (debug) then print("found "..#foundJvms.."jvms") end; 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 if (debug) then print("matched: "..p) end; if (currentjvm == p) then if (debug) then print("this jdk is already installed. exiting lua script") end; return end ; table.insert(jvms, p) else if (debug) then print("NOT matched: "..p) end; end end if (#jvms <=0) then if (debug) then print("no matching jdk in "..jvmdir.." exit") end; return end; if (debug) then print("matched "..#jvms.." jdk in "..jvmdir) end; --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 /dev/null || :/bin/shutf-8? 7zXZ !#,o]"k%{AvX1ڋNHRFHh15Ʃl.XM>" Κ}\) =>ҚGjshli:lҷ |5I8k<4҇ kP54k6fR,r,֕džc0n!Hgs4ֆKW\?AFuԽVPw, _vW5JkU!uU~R+̍%ʷJڳVJ"_PVH83#\Q0mNY\T|]y6L@ӠἑpXaxr$ zά|_|VGxu Hs7mK)V_m*A˒/Dns:+,gW)s adbCkTaxUVIj`g돸%_^ Z[/Lqh }^2h{92͌Mrl_),:̐"9f)7GlT圸~E4Pf`/כW)+sިT,MMW4 wPDVLǮfDꯪa2gFwXKLD5"M_G/%J9qp-o+Y@`~ŕ HUΌD 5py_&~VRrn+8&Kt?8o3X۲m*=snS%5|au@qH ON&m~I蓘3k+gJ`8 (:Կ<tǛ'3m~f 3gttЗ-@ve!*_ 166"xW< v_YQdG؈_M?lFx+7/>l7m ?b!  ,{a YZ