[SCM] ci-tooling packaging branch, master, updated. 3badc9fffb42c2ea4ab6dc1c2eed7a933e2c188f

Harald Sitter apachelogger-guest at moszumanska.debian.org
Thu Jun 11 22:48:30 UTC 2015


Gitweb-URL: http://git.debian.org/?p=pkg-kde/ci-tooling.git;a=commitdiff;h=3badc9f

The following commit has been merged in the master branch:
commit 3badc9fffb42c2ea4ab6dc1c2eed7a933e2c188f
Author: Harald Sitter <sitter at kde.org>
Date:   Thu Jun 11 15:48:20 2015 -0700

    add a sourcer forked from builder
---
 kci/{build_source.rb => sourcer.rb} | 47 +++++++++++++++++--------------------
 1 file changed, 22 insertions(+), 25 deletions(-)

diff --git a/kci/build_source.rb b/kci/sourcer.rb
old mode 100755
new mode 100644
similarity index 79%
copy from kci/build_source.rb
copy to kci/sourcer.rb
index f2cdcf9..cd89bf6
--- a/kci/build_source.rb
+++ b/kci/sourcer.rb
@@ -1,13 +1,20 @@
 #!/usr/bin/env ruby
 
+require 'date'
 require 'fileutils'
 require 'json'
+require 'timeout'
 
 require_relative 'lib/ci/build_version'
 require_relative 'lib/debian/changelog'
+require_relative 'lib/cmake_parser'
+
+ENV['HOME'] = '/var/lib/jenkins'
 
 Project = Struct.new(:series, :stability, :name)
 
+$stdout = $stderr
+
 # get basename, distro series, unstable/stable
 components = ARGV[0].split('_')
 unless components.size == 3
@@ -15,12 +22,6 @@ unless components.size == 3
 end
 project = Project.new(components[0], components[1], components[2])
 
-PPA = "ppa:kubuntu-ci/#{project.stability}"
-
-File.open('/etc/apt/apt.conf.d/apt-cacher', 'w') do |file|
-  file.puts('Acquire::http { Proxy "http://10.0.3.1:3142"; };')
-end
-
 # PWD
 abort 'Could not change dir to ARGV1' unless Dir.chdir(ARGV[1])
 
@@ -36,21 +37,16 @@ at_exit do
   FileUtils.chown_R('jenkins', 'jenkins', WORKSPACE_PATH, verbose: true)
 end
 
-# install deps
-# TODO: clean out and probably get rid entirely
-`apt-get install -y xz-utils dpkg-dev ruby dput debhelper pkg-kde-tools devscripts python-launchpadlib ubuntu-dev-tools git`
-
 # version
 changelog = Changelog.new('packaging')
 version = CI::BuildVersion.new(changelog)
 source_name = changelog.name
 
-# copy sources around
 FileUtils.rm_r('build') if File.exist?('build')
 FileUtils.mkpath('build/source/')
 
 # copy upstream sources around
-if Dir.exist?('source')
+if Dir.exist?('source') && !Dir.glob('source/*').empty?
   abort 'Failed to copy source' unless system('cp -r source/* build/source/')
   Dir.chdir('build/source') do
     FileUtils.rm_rf(Dir.glob('**/.bzr'))
@@ -62,7 +58,7 @@ if Dir.exist?('source')
   Dir.chdir('build/') do
     tar = "#{source_name}_#{version.tar}.orig.tar"
     abort 'Failed to create a tarball' unless system("tar -cf #{tar} source")
-    abort 'Failed to compress the tarball' unless system("xz -6 #{tar}")
+    abort 'Failed to compress the tarball' unless system("xz -1 #{tar}")
   end
 
   # Copy packaging
@@ -114,34 +110,35 @@ Dir.chdir('build/source/') do
   end
   # If the package is now empty, lintian override the empty warning to avoid
   # false positives
-  Dir.glob('debian/*.install').each do |install_file_path|
+  Dir.glob('debian/*.install').each do | install_file_path |
     next unless File.open(install_file_path, 'r').read.strip.empty?
     package_name = File.basename(install_file_path, '.install')
-    lintian_overrides_path = install_file_path.gsub('.install', '.lintian-overrides')
+    lintian_overrides_path = install_file_path.gsub('.install',
+                                                    '.lintian-overrides')
     puts "#{package_name} is now empty, trying to add lintian override"
     File.open(lintian_overrides_path, 'a') do |file|
       file.write("#{package_name}: empty-binary-package
")
     end
   end
-  # Rip out symbol files unless we are on vivid
-  unless project.series == 'vivid'
-    symbols = Dir.glob('debian/symbols') +
-              Dir.glob('debian/*.symbols') +
-              Dir.glob('debian/*.symbols.*')
-    symbols.each { |s| FileUtils.rm(s) }
-  end
+  # Rip out symbol files unless we are on latest
+  # unless project.series == KCI.latest_series
+  #   symbols = Dir.glob('debian/symbols') +
+  #             Dir.glob('debian/*.symbols') +
+  #             Dir.glob('debian/*.symbols.*')
+  #   symbols.each { |s| FileUtils.rm(s) }
+  # end
 end
 
 # dpkg-buildpackage
 Dir.chdir('build/source/') do
   system('update-maintainer')
-  unless system('dpkg-buildpackage -S -us -uc')
+  unless system('dpkg-buildpackage -us -uc -S')
     abort 'Failed to build source package'
   end
 end
 
-# Write metadata about the upload for other scripts to use.
-changelog = Changelog.new('build/source/')
+# Write upload data to file, we perhaps want to do something outside
+# build container.
 data = { name: changelog.name,
          version: changelog.version,
          type: project.stability }

-- 
ci-tooling packaging



More information about the pkg-kde-commits mailing list