commit nodejs-packaging for openSUSE:Factory
Hello community, here is the log from the commit of package nodejs-packaging for openSUSE:Factory checked in at 2016-02-26 22:20:09 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/nodejs-packaging (Old) and /work/SRC/openSUSE:Factory/.nodejs-packaging.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "nodejs-packaging" Changes: -------- --- /work/SRC/openSUSE:Factory/nodejs-packaging/nodejs-packaging.changes 2016-02-26 00:36:59.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.nodejs-packaging.new/nodejs-packaging.changes 2016-02-26 22:20:58.000000000 +0100 @@ -1,0 +2,15 @@ +Fri Feb 26 16:05:46 UTC 2016 - i@marguerite.su + +- update version v10.beta8 + * recursively copy files and fix exec permissions + for all files outside bin (github#6) + * colored text to prompt sources that should be + deleted for npkg + * bugfix: .css pattern will be skipped when copy + because of the regex ".c" + * bugfix: if two versions of tarball, only one + version will be copied. + * bugfix: bower in npkg, sometimes multiple name-* + will be found + +------------------------------------------------------------------- Old: ---- nodejs-packaging-10.beta7.tar.gz New: ---- nodejs-packaging-10.beta8.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ nodejs-packaging.spec ++++++ --- /var/tmp/diff_new_pack.084VbF/_old 2016-02-26 22:20:59.000000000 +0100 +++ /var/tmp/diff_new_pack.084VbF/_new 2016-02-26 22:20:59.000000000 +0100 @@ -18,7 +18,7 @@ %define _rpmconfigdir %{_prefix}/lib/rpm Name: nodejs-packaging -Version: 10.beta7 +Version: 10.beta8 Release: 0 Summary: Node.js Dependency generators for openSUSE License: MIT ++++++ nodejs-packaging-10.beta7.tar.gz -> nodejs-packaging-10.beta8.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nodejs-packaging-10.beta7/nodejs.rb new/nodejs-packaging-10.beta8/nodejs.rb --- old/nodejs-packaging-10.beta7/nodejs.rb 2016-02-25 01:47:57.000000000 +0100 +++ new/nodejs-packaging-10.beta8/nodejs.rb 2016-02-26 16:51:36.000000000 +0100 @@ -33,19 +33,18 @@ def recursive_mkdir(json={},workspace="") - json.keys.each do |key| - version = json[key]["version"] + json.each do |key,v| + version = v["version"] dest = workspace + "/" + key + "-" + version unless has_bundle(key,version) puts "Creating #{dest}" FileUtils.mkdir_p dest end - unless json[key] == nil - if json[key].keys.include?("dependencies") - version = json[key]["version"] - json[key]["dependencies"].each do |k,v| + unless v.nil? + if v.keys.include?("dependencies") + v["dependencies"].each do |k,v1| i = {} - i[k] = v + i[k] = v1 recursive_mkdir(i,workspace + "/" + key + "-" + version + "/node_modules") end end @@ -54,6 +53,32 @@ end +def recursive_copy(path="",dir="") + file = filter(path) + unless file.nil? + if File.directory? file + dir1 = file.gsub(/^.*\//,'') + puts "Making directory " + dir + "/" + dir1 + FileUtils.mkdir_p dir + "/" + dir1 + Dir.glob(file + "/*") do |f1| + f2 = filter(f1) + unless f2.nil? + if File.directory? f2 + recursive_copy(f2,dir + "/" + dir1) + else + puts "Copying " + f2 + " => " + dir + "/" + dir1 + FileUtils.cp_r f2,dir + "/" + dir1 + end + end + end + else + puts "Copying " + file + " => " + dir + FileUtils.cp_r file,dir + end + end + +end + def backpath(path="",count="") count.times do @@ -83,11 +108,12 @@ def filter(file="") f = file.split("/") - if f.grep(/^\..*$|.*~$|\.bat|\.cmd|Makefile|test(s)?(\.js)?|example(s)?(\.js)?|benchmark(s)?(\.js)?|\.sh|_test\.|browser$|\.orig|\.bak|windows|\.sln|\.njsproj|\.exe|\.c|\.h|\.cc|\.cpp/).empty? - unless f.grep(/LICENSE|\.md|\.txt|\.markdown/).empty? - io = IO.popen("chmod -x #{file}") - io.close - end + if f.grep(/^\..*$|.*~$|\.bat$|\.cmd$|Makefile|test(s)?(\.js)?|example(s)?(\.js)?|benchmark(s)?(\.js)?|\.sh$|_test\.|browser$|\.orig$|\.bak$|windows|\.sln$|\.njsproj$|\.exe$|\.c$|\.h$|\.cc$|\.cpp$/).empty? + if File.file?(file) && File.executable?(file) && f.grep("bin").empty? + puts "Fixing permission: " + file + io = IO.popen("chmod -x #{file}") + io.close + end return file else return nil @@ -161,21 +187,7 @@ Dir.glob(buildroot + "/**/*") do |dir| name = dir.gsub(/^.*\//,'') Dir.glob(sourcedir + "/" + name + "/*") do |f| - file = filter(f) - unless file.nil? - if File.directory? file - dir1 = file.gsub(/^.*[0-9]\.[0-9]/,'') - FileUtils.mkdir_p dir + dir1 - Dir.glob(file + "/**/*") do |f1| - f2 = filter(f1) - unless f2.nil? - FileUtils.cp_r f2,dir + dir1 - end - end - else - FileUtils.cp_r file,dir - end - end + recursive_copy(f,dir) end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nodejs-packaging-10.beta7/tool/npkg new/nodejs-packaging-10.beta8/tool/npkg --- old/nodejs-packaging-10.beta7/tool/npkg 2016-02-25 01:47:57.000000000 +0100 +++ new/nodejs-packaging-10.beta8/tool/npkg 2016-02-26 16:51:36.000000000 +0100 @@ -74,18 +74,24 @@ deltaold.each do |d| unless d.nil? - p "#{d}.tgz needs to be deleted from source" + puts "\033[0;32m#{d}.tgz needs to be deleted from source\033[0m" end end end # bower -io = IO.popen("tar -xf #{name}-*.tgz") -io.close -if File.exist? "package/bower.json" - puts "Processing dependencies in bower.json" - Bower.install(name) +re = /#{name}-[0-9]/ +Dir.glob("*.tgz") do |f| + md = re.match(f) + if md + io = IO.popen("tar -xf #{f}") + io.close + if File.exist? "package/bower.json" + puts "Processing dependencies in bower.json" + Bower.install(name) + end + end end -FileUtils.rm_rf "package" +FileUtils.rm_rf "package" if File.exist? "package" #=end
participants (1)
-
root@hilbert.suse.de