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

Harald Sitter apachelogger-guest at moszumanska.debian.org
Thu Feb 19 11:49:03 UTC 2015


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

The following commit has been merged in the master branch:
commit ec90076c5e9233efabc20c60cb8261bb4b60f5fe
Author: Harald Sitter <sitter at kde.org>
Date:   Thu Feb 19 12:48:54 2015 +0100

    remove source, I have a way cooler version on the way
---
 kci/builder.rb      |  23 ++++++++++++
 kci/ppa-copy-all.rb |   4 +-
 kci/source.rb       | 106 ----------------------------------------------------
 lib/lp.rb           |  18 ++++++++-
 4 files changed, 42 insertions(+), 109 deletions(-)

diff --git a/kci/builder.rb b/kci/builder.rb
index 5e5f8ed..6970bb8 100644
--- a/kci/builder.rb
+++ b/kci/builder.rb
@@ -6,6 +6,29 @@ require 'json'
 require 'timeout'
 require_relative 'lib/debian/changelog'
 
+=begin
+-> build_source
+   - copy upstream source
+   - generate tarball
+   - copy packaging source
+   - fiddle
+   - update changelog
+   - dpkg-buildpackage -S
+-> sign_source [elevated - possibly part of build_source]
+   - debsign
+-> build binary
+   - upload_source
+   - wait_for_launchpad
+   - download_logs
+-> check_logs
+   - cmake
+   - lintian
+   - symbols
+   - qml-checker
+-> update_symbols
+=end
+
+
 ENV['HOME'] = '/var/lib/jenkins'
 ENV['PATH'] = '/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin'
 ENV['GNUPGHOME'] = '/var/lib/jenkins/tooling/gnupg'
diff --git a/kci/ppa-copy-all.rb b/kci/ppa-copy-all.rb
index 4531350..30c3707 100644
--- a/kci/ppa-copy-all.rb
+++ b/kci/ppa-copy-all.rb
@@ -34,8 +34,8 @@ fail 'need dist arg' if ARGV.empty?
 
 Launchpad.authenticate
 # FIXME: current assumptions: source is unstable, target is always stable
-source_ppa = Launchpad::Rubber.from_url("https://api.launchpad.net/devel/~kubuntu-ppa/+archive/ubuntu/#{ARGV[0]}")
-target_ppa = Launchpad::Rubber.from_url("https://api.launchpad.net/devel/~kubuntu-ppa/+archive/ubuntu/next-backports")
+source_ppa = Launchpad::Rubber.from_url("https://api.launchpad.net/devel/~kubuntu-ci/+archive/ubuntu/#{ARGV[0]}")
+target_ppa = Launchpad::Rubber.from_url("https://api.launchpad.net/devel/~kubuntu-ci/+archive/ubuntu/unstable-weekly")
 # target_ppa = Launchpad::Rubber.from_url('https://api.launchpad.net/devel/~netrunner-os/+archive/ubuntu/netrunner-15-ci-52')
 series = Launchpad::Rubber.from_url("https://api.launchpad.net/devel/ubuntu/#{distribution}")
 
diff --git a/kci/source.rb b/kci/source.rb
deleted file mode 100644
index fac8958..0000000
--- a/kci/source.rb
+++ /dev/null
@@ -1,106 +0,0 @@
-#!/usr/bin/env ruby
-
-require "date"
-require "fileutils"
-require "timeout"
-
-require "debian/changelog"
-
-ENV['HOME'] = '/var/lib/jenkins'
-ENV['PATH'] = '/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin'
-ENV['GNUPGHOME'] = '/var/lib/jenkins/tooling/gnupg'
-PPA = 'ppa:kubuntu-ci/unstable'
-
-Project = Struct.new(:series, :stability, :name)
-
-# get basename, distro series, unstable/stable
-components = ARGV[0].split('_')
-raise 'Did not get a valid project identifier via ARGV0' unless components.size == 3
-project = Project.new(components[0], components[1], components[2])
-
-File.open('/etc/apt/apt.conf.d/apt-cacher', 'w') { |file| file.puts('Acquire::http { Proxy "http://10.0.3.1:3142"; };') }
-
-# PWD
-raise 'Could not change dir to ARGV1' unless Dir.chdir(ARGV[1])
-
-# install deps
-`apt-get install -y xz-utils dpkg-dev ruby dput debhelper pkg-kde-tools devscripts python-launchpadlib ubuntu-dev-tools git`
-
-# version
-Dir.chdir("packaging") do
-    $changelog = Changelog.new
-end
-
-# Note that the kubuntu version needs to be part of the *base* version as otherwise
-# different series uploads can end up with exactly the same tar name and launchpad
-# freaks out. So, kubuntu version in base/suffix not revision/suffix.
-eval %x[grep VERSION_ID /etc/os-release].strip
-
-source_name = $changelog.name
-version_suffix = "+git#{DateTime.now().strftime('%Y%m%d.%H%M')}+#{VERSION_ID}"
-version = "#{$changelog.version(Changelog::EPOCH | Changelog::BASE)}#{version_suffix}" # <-- needs git version and bzr version possibly
-tar_version = "#{$changelog.version(Changelog::BASE)}#{version_suffix}"
-version += "-0ubuntu0"
-
-# copy sources around
-FileUtils.rm_r("build") if File.exist?("build")
-FileUtils.mkpath("build/source/")
-FileUtils.cp_r(Dir.glob("source/*"), "build/source/", :verbose => true)
-
-Dir.chdir("build/source") do
-    %w[.bzr .git .hg .svn].each do |vcsdir|
-        FileUtils.rm_rf(Dir.glob("**/#{vcsdir}")
-    end
-end
-
-# create orig tar
-Dir.chdir("build/") do
-    tar = "#{source_name}_#{tar_version}.orig.tar"
-    raise "Failed to create a tarball" unless system("tar -cf #{tar} source")
-    raise "Failed to compress the tarball" unless system("xz -6 #{tar}")
-end
-
-# Copy some more
-FileUtils.cp_r(Dir.glob("packaging/*"), "build/source/", :verbose => true)
-
-# Create changelog entry
-Dir.chdir("build/source/") do
-    unless system({"DEBFULLNAME" => "Kubuntu CI",
-                   "DEBEMAIL" => "kubuntu-ci at lists.launchpad.net"},
-                   "dch -b -v #{version} -D #{project.series} 'Automatic Kubuntu Build'")
-        raise "Failed to create changelog entry"
-    end
-end
-
-# Rip out locale install
-Dir.chdir("build/source/") do
-    Dir.glob("debian/*.install").each do | install_file_path |
-        # Strip localized manpages
-        # e.g.  usr /share /man /  *  /man 7 /kf5options.7
-        subbed = File.open(install_file_path).read().gsub(/^.*usr\/share\/man\/(\*|\w+)\/man\d\/.*$/, '')
-        File.open(install_file_path, 'w') do |f|
-            f << subbed
-        end
-
-        # FIXME: bloody workaround for kconfigwidgets and kdelibs4support containing legit locale data
-        next if source_name == 'kconfigwidgets' or source_name == 'kdelibs4support'
-        subbed = File.open(install_file_path).read().gsub(/^.*usr\/share\/locale.*$/, '')
-        File.open(install_file_path, 'w') do |f|
-            f << subbed
-        end
-    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 |
-        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')
-        puts "#{package_name} is now empty, trying to add lintian override"
-        File.open(lintian_overrides_path, 'a') { |file| file.write("#{package_name}: empty-binary-package
") }
-    end
-end
-
-# dpkg-buildpackage
-Dir.chdir("build/source/") do
-    system("update-maintainer")
-    raise "Failed to build source package" unless system("dpkg-buildpackage -us -uc -S")
-end
diff --git a/lib/lp.rb b/lib/lp.rb
index 75927dd..a0bfb10 100644
--- a/lib/lp.rb
+++ b/lib/lp.rb
@@ -25,6 +25,22 @@ require 'thread'
 require 'oauth'
 require 'oauth/signature/plaintext'
 
+# BEGIN {
+#
+#   require 'net/http'
+#
+#   Net::HTTP.module_eval do
+#     alias_method '__initialize__', 'initialize'
+#
+#     def initialize(*args,&block)
+#       __initialize__(*args, &block)
+#     ensure
+#       @debug_output = $stderr ### if ENV['HTTP_DEBUG']
+#     end
+#   end
+#
+# }
+
 # A simple launchpad REST API wrapper.
 module Launchpad
   @mutex = Mutex.new
@@ -49,7 +65,7 @@ module Launchpad
       return nil
     end
 
-    consumer_options.merge(scheme: :header, site: 'https://api.launchpad.net')
+    consumer_options = consumer_options.merge(scheme: :header, site: 'https://api.launchpad.net')
     consumer = OAuth::Consumer.new('kubuntu-ci', '', consumer_options)
     access_token = OAuth::AccessToken.from_hash(consumer, token_hash)
     @token = access_token

-- 
ci-tooling packaging



More information about the pkg-kde-commits mailing list