copy-jdk-configs-2.3-1.fc25$>D!%ȢsZO1c9>>4?4d  > %1TZdt |   X \l   (8 9 : G H 0I @X DY H\ T] d^ b d e f l t u ,v <w x y  34444Ccopy-jdk-configs2.31.fc25JDKs configuration files copierUtility script to transfer JDKs configuration files between updates or for archiving. With script to fix incorrectly created rpmnew filesYlbuildvm-10.phx2.fedoraproject.org8Fedora ProjectFedora ProjectBSDFedora ProjectUnspecifiedhttps://pagure.io/copy_jdk_configslinuxnoarch%DӁA큤YlfYlfYlYlf29ee15e1fda89278c355deaabc5a38f1d364bf9d72579a39e1c062828ece6df5160e19d8a796518c73bb646c4653612379896feb8ef741b65ef57bc6b9544eb0386eaf71633bf096e6c17471f50e867dabdf14d38a157ca27a0425dc583eb9ferootrootrootrootrootrootrootrootcopy-jdk-configs-2.3-1.fc25.src.rpmcopy-jdk-configs@ @     /bin/bash/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.1X}@X}@X@XpXWWVVVqR@VUFedora Release Engineering - 2.2.3Fedora Release Engineering - 2.2.2Fedora Release Engineering - 2.1-2Jiri Vanek - 2.1-1Jiri Vanek - 2.0-1Jiri 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 latest head- added "jre/lib/security/blacklisted.certs" to cared files- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild- moved to newest release 2.1- moved to new upstream at pagure.io - moved to newest release 2.0 - added new script of copy_jdk_configs_fixFiles.sh - copy_jdk_configs.lua aligned to it- 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 package2.3-1.fc25copy_jdk_configs.luacopy_jdk_configs_fixFiles.shcopy-jdk-configsLICENSE/usr/libexec//usr/share/licenses//usr/share/licenses/copy-jdk-configs/-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tablesdrpmxz2noarch-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 -- 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 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/security/cacerts", "jre/lib/security/blacklisted.certs", "jre/lib/ext", "lib/calendars.properties", "lib/content-types.properties", "lib/flavormap.properties", "lib/logging.properties", "lib/net.properties", "lib/psfontj2d.properties", "lib/sound.properties", "lib/deployment.properties", "lib/deployment.config", "lib/security/US_export_policy.jar", "lib/security/java.policy", "lib/security/java.security", "lib/security/local_policy.jar", "lib/security/nss.cfg", "lib/security/cacerts", "lib/security/blacklisted.certs", "lib/security/default.policy", "conf/security/policy/limited/exempt_local.policy", "conf/security/policy/limited/default_local.policy", "conf/security/policy/limited/default_US_export.policy", "conf/security/policy/unlimited/default_local.policy", "conf/security/policy/unlimited/default_US_export.policy", "conf/security/java.policy", "conf/security/java.security", "conf/logging.properties", "conf/security/nss.cfg", "conf/management/jmxremote.access", "conf/management/jmxremote.password.template", "conf/management/management.properties", "conf/net.properties", "conf/sound.properties", "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 debug = false; 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") 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 = { } 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 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 ; if (string.match(p, ".*-debug$")) then print(p.." matched but seems to be debug variant. Skipping") else table.insert(jvms, p) end 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 "..readlinkOutput if (debug) then print("executing "..linkExe) end; os.execute(linkExe) local link=trim(slurp(readlinkOutput)) if (debug) then print(" ...link is "..link) end if (not ((link) == (SOURCE))) then print("WARNING link "..link.." where file "..SOURCE.."expected!") end if (debug) then print("executing "..exe) end; if (not dry) then os.execute(exe) end else if (debug) then print(SOURCE.." does not exists") end; end end]]) 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/shutf-8? 7zXZ !#, ]"k%{AvX1ڋNHRFHkNc8A[$x1PҾa=?P s5AAto`fT.B7Ҥ3j:Vz1.(tSycBkn^@pr #AW8tfe4MA5Gdg;(­"DS)tؕG2Ĺ kgeݬ~ V3:]^^>fxZSMAf47 BO^aL\3iWH`w{8&C+J'#4Pb]E`Ť KJn9$Wbp3&$pt<1<2 fQlvKQYu~ou [5 n6J[@{b0JƀO-j I*j ^Nk-Ľc!@DP&~m#c9BA iSg4I@ _ \-"+6 | Fw  ZC@Cn2Z~wMg6_=GAV3t&!7J:ťQMoFji/OݕJ)^R_rBD/,;#8j0qh2b1@^"; H0{۲Q~r_wl Oһy!*YwW%ֳkJ<ğM~%3MQ| :"ݤAIbԸfƲ,-u胅_p`ܙK"n|< m{ύƌ?iĥ(cZJ;qAPPh6 :{@2Lh=$[8KyQKD4 ۳ 6Fcm.nZ}& 1C2#9Ӄ|ĻB/<%K!uLc`II ibM1O z~S4M <ԠP Dz Dt/hU0Ew xX=iRM[5ElM(/›G$N$ݔ|\ft( ?+4GbjՂ:){ 47zAo@z2K&ו;=ߍKO0 F/Ϡ7^@|8ŝKKجx)bsKd㓹ƿzcoZ=So#^ʇ%#27*T^ÙHj:[eL%ӭ*pٔva LSTU6TJ u fA$DZgGKEEH8=A~}TwjVR`OUD(K:K6pa+Í=Q~&Rq52= _#v?R}S>IȁA23V䭯TXȑWDTJ-CnsDaܗPMRVv,hv>_eH҇Q flt蚙k~x)(aG#=ax:C2V]@wgת/ v_BkL%Gs hҊN&RDȅsXOniP uDZM>9I!-bLjAYJL%jRzg`3ދ6f &i!N&c?< YZ