[SCM] ci-tooling packaging branch, master, updated. bf6916c7f87518e23bfec112d7ac4fca15b60fa5
Harald Sitter
apachelogger-guest at moszumanska.debian.org
Thu Dec 3 13:41:49 UTC 2015
Gitweb-URL: http://git.debian.org/?p=pkg-kde/ci-tooling.git;a=commitdiff;h=7f478c1
The following commit has been merged in the master branch:
commit 7f478c102ab406c83574a2892cc332555da2be12
Author: Harald Sitter <sitter at kde.org>
Date: Thu Dec 3 14:18:13 2015 +0100
resolve a million style violations in mozilla.rb, still a million more...
---
dci/mozilla.rb | 66 +++++++++++++++++++++++++++++++++++-----------------------
1 file changed, 40 insertions(+), 26 deletions(-)
diff --git a/dci/mozilla.rb b/dci/mozilla.rb
index 981d3d3..e5a8800 100644
--- a/dci/mozilla.rb
+++ b/dci/mozilla.rb
@@ -25,7 +25,8 @@ def package_releases
threads << Thread.new do
# Find the latest release from the Mozilla releases page
begin
- doc = Nokogiri::HTML(open("https://www.mozilla.org/en-US/#{PACKAGE}/releases"))
+ doc_url = "https://www.mozilla.org/en-US/#{PACKAGE}/releases"
+ doc = Nokogiri::HTML(open(doc_url))
rescue
sleep 30
retry
@@ -43,15 +44,17 @@ def package_releases
end
threads << Thread.new do
- `rmadison -u ubuntu -a amd64 -s #{RELEASE} #{PACKAGE}`.to_str.each_line do | line |
+ rmadison = `rmadison -u ubuntu -a amd64 -s #{RELEASE} #{PACKAGE}`
+ rmadison.to_str.each_line do |line|
match_data = line.match('(\d+[.]\d+)')
- ubuntu_versions << match_data[0].to_f unless match_data.nil?
+ ubuntu_versions << match_data[0].to_f unless match_data.nil?
end
# Make sure we take the updates suite into account too
- `rmadison -u ubuntu -a amd64 -s #{RELEASE}-updates #{PACKAGE}`.to_str.each_line do | line |
+ rmadison = `rmadison -u ubuntu -a amd64 -s #{RELEASE} #{PACKAGE}`
+ rmadison.to_str.each_line do |line|
match_data = line.match('(\d+[.]\d+)')
- ubuntu_versions << match_data[0].to_f unless match_data.nil?
+ ubuntu_versions << match_data[0].to_f unless match_data.nil?
end
ubuntu_versions.uniq!
@@ -65,13 +68,15 @@ end
def bump_version
changelog = Changelog.new
- version = "#{changelog.version(Changelog::EPOCH)}1000~#{changelog.version(Changelog::BASE)}"
+ changelog_epoch = changelog.version(Changelog::EPOCH)
+ changelog_base = changelog.version(Changelog::BASE)
+ version = "#{changelog_epoch}1000~#{changelog_base}"
# Need to check if the original release is a debian release
if (DEBIAN_RELEASES.include? ARGV[2]) && (PACKAGE == 'firefox')
version += '-1'
- File.open('debian/config/mozconfig.in', 'a') { |f|
+ File.open('debian/config/mozconfig.in', 'a') do |f|
f.puts("ac_add_options --enable-gstreamer=1.0
")
- }
+ end
else
version += '-0ubuntu1'
end
@@ -81,14 +86,15 @@ def bump_version
new_changelog = Changelog.new
# Rename orig
- File.rename("../#{PACKAGE}_#{changelog.version(Changelog::BASE)}.orig.tar.bz2",
- "../#{PACKAGE}_#{new_changelog.version(Changelog::BASE)}.orig.tar.bz2")
+ new_changelog_base = new_changelog.version(Changelog::BASE)
+ File.rename("../#{PACKAGE}_#{changelog_base}.orig.tar.bz2",
+ "../#{PACKAGE}_#{new_changelog_base}.orig.tar.bz2")
end
def install_kde_js
$logger.info('Modifying debian/rules')
rules = File.read('debian/rules')
- rules.gsub!(/pre-build.*$/) do | m |
+ rules.gsub!(/pre-build.*$/) do |m|
m += "
mkdir -p $(MOZ_DISTDIR)/bin/defaults/pref/
cp $(CURDIR)/debian/kde.js $(MOZ_DISTDIR)/bin/defaults/pref/kde.js"
end
File.write('debian/rules', rules)
@@ -123,25 +129,28 @@ Pin-Priority: 1000
end
def build_firefox(release_info)
- system("hg clone http://www.rosenauer.org/hg/mozilla/#firefox#{release_info[:ubuntu].to_i} suse")
+ release_version = release_info[:ubuntu].to_i
+ hg_url = "http://www.rosenauer.org/hg/mozilla/#firefox#{release_version}"
+ system("hg clone #{hg_url} suse")
fail 'Could not clone mercurial repo!' unless $?.success?
- firefox_dir = Dir["firefox-*"][0]
+ firefox_dir = Dir['firefox-*'][0]
Dir.chdir(firefox_dir) do
bump_version
`cp ../suse/firefox-kde.patch ../suse/mozilla-kde.patch debian/patches/`
`cp ../suse/MozillaFirefox/kde.js debian/`
- system("quilt pop -a")
- # Need to remove unity menubar from patches first since it interferes with the KDE patches
- system("quilt delete unity-menubar.patch")
+ system('quilt pop -a')
+ # Need to remove unity menubar from patches first since it interferes with
+ # the KDE patches
+ system('quilt delete unity-menubar.patch')
- $logger.info("Adding Firefox KDE patches")
- File.open('debian/patches/series', 'a') { |f|
+ $logger.info('Adding Firefox KDE patches')
+ File.open('debian/patches/series', 'a') do |f|
# Please preserve this order of patch
f.puts("mozilla-kde.patch
firefox-kde.patch
unity-menubar.patch
")
- }
+ end
system('quilt push -fa')
system('quilt refresh')
@@ -156,15 +165,16 @@ def build_firefox(release_info)
end
end
-def build_thunderbird(release_info)
- thunderbird_dir = Dir["thunderbird-*"][0]
+def build_thunderbird(_release_info)
+ thunderbird_dir = Dir['thunderbird-*'][0]
Dir.chdir(thunderbird_dir) do
bump_version
- open('debian/patches/mozilla-kde.patch', 'wb') do | file |
+ patch_path = 'debian/patches/mozilla-kde.patch'
+ open(patch_path, 'wb') do |file|
file << open('https://build.opensuse.org/source/openSUSE:Factory/MozillaThunderbird/mozilla-kde.patch').read
end
- filterdiff = `filterdiff --addprefix=a/mozilla/ --strip 1 debian/patches/mozilla-kde.patch`
+ filterdiff = `filterdiff --addprefix=a/mozilla/ --strip 1 #{patch_path}`
system('quilt pop -fa')
File.write('debian/patches/mozilla-kde.patch', filterdiff)
File.write('debian/patches/series', "mozilla-kde.patch
", mode: 'a')
@@ -180,7 +190,8 @@ def build_thunderbird(release_info)
end
dci_run_cmd('apt-get update')
-packages = %w(ubuntu-dev-tools mercurial ruby-nokogiri distro-info cdbs debhelper)
+packages = %w(ubuntu-dev-tools mercurial ruby-nokogiri distro-info cdbs
+ debhelper)
system("apt-get -y install #{packages.join(' ')}")
# TODO: Fix the control file parser to take optional build-deps into account
@@ -190,7 +201,9 @@ system("apt-get -y install #{packages.join(' ')}")
# control.source['build-depends'].each do |dep|
# build_depends << dep.name
# end
-# fail "Failed to install build deps!" unless system("apt-get -y install #{build_depends.join(' ')}")
+# unless system("apt-get -y install #{build_depends.join(' ')}")
+# fail 'Failed to install build deps!'
+# end
UBUNTU_RELEASES = `ubuntu-distro-info -a`.split
DEBIAN_RELEASES = `debian-distro-info -a`.split
@@ -206,7 +219,8 @@ end
`rm -rf build`
Dir.mkdir('build')
Dir.chdir('build') do
- dci_run_cmd("pull-lp-source -m http://127.0.0.1:3142/ubuntu #{PACKAGE} #{RELEASE}")
+ dci_run_cmd("pull-lp-source -m http://127.0.0.1:3142/ubuntu #{PACKAGE}" \
+ " #{RELEASE}")
build_firefox(release_info) if PACKAGE == 'firefox'
build_thunderbird(release_info) if PACKAGE == 'thunderbird'
--
ci-tooling packaging
More information about the pkg-kde-commits
mailing list