[blag-whereto] BLAG Trac #51: SPEC dir missing on kimsufi server

BLAG admin at trac.slated.org
Thu Apr 30 17:38:27 BST 2009


#51: SPEC dir missing on kimsufi server
----------------------------------------+-----------------------------------
 Reporter:  jayeola                     |       Owner:  jayeola   
     Type:  Release Management          |      Status:  new       
 Priority:  major                       |   Milestone:  BLAG 90002
Component:  BLAG 90k                    |     Version:            
 Keywords:  specs, spec files, src,rpm  |  
----------------------------------------+-----------------------------------

Comment(by jayeola):

 This is the script used to pull the src.rpms, extract the .spec files and
 upload them to the correct directory.

 Can be done in any lang you like but done in ruby1.9
 {{{
 cat projects/blag_srpms/blag_srpms.rb
 #!/home/jayeola/ix/bin/ruby192 -w
 # -*- mode: ruby -*-
 =begin
 filename: blag_srpms.rb
 Date: 2009-04-30 12:04:42 +0100
 aim: create spec files from ks server and upload them back up
 =end

 require 'fileutils'
 require 'net/ping/tcp'

 Dir.chdir

 blag_dir = Dir.home + "/blag_srpms"

 Dir.mkdir(blag_dir) if ! Dir.exist?(blag_dir)

 sub_dirs = %w[ blag dribble fedora freshrpms fsfla kriehn livna
 planetccrma ]

 sub_dirs.each do |xx|
   if ! Dir.exist?(blag_dir + "/" + xx)
     puts  "creating sub dir ~#{blag_dir}/#{xx}"

     Dir.mkdir(blag_dir + "/" + xx)

     puts "stepping into #{xx}"
     Dir.chdir(blag_dir + "/" + xx)

     `scp -v
 kimsufi:public_html/blag/90000/en/os/source/SRPMS.#{xx}/*.src.rpm .`


     Dir.glob("*.src.rpm").each { |src_rpm| `rpm2cpio #{src_rpm} | cpio
 -idv`}
     Dir.glob("*.spec").each do  |spec_file|
                         `scp -v #{spec_file}
 kimsufi:public_html/blag/90000/en/os/i386/SPECS/#{xx}/ `
                 end
   else
     puts  " sub dir ~#{blag_dir}/#{xx} exits"
     puts "stepping into #{xx}"

     Dir.chdir(blag_dir + "/" + xx)

   end
 end


 server = "ks355011.kimsufi.com"
 kimsufi = Net::Ping::TCP.new(server, port=80)

 # raise "cannot ping server kimsufi. check this out for yourself!"  unless
 kimsufi.pingecho

 }}}

-- 
Ticket URL: <http://trac.slated.org/ticket/51#comment:3>
BLAG <http://www.blagblagblag.org/>
BLAG Linux and GNU



More information about the blag-whereto mailing list