Bug 1430984 - Automatically create a debian/changelog entry when there is no patch. r=dustin
authorMike Hommey <mh+mozilla@glandium.org>
Wed, 17 Jan 2018 15:18:47 +0900
changeset 454231 b187975efd784232b16ef1163befa99837a2c90a
parent 454230 deb8dd9fb63c94b5056d7ad27bcda544cb9094bc
child 454232 ee503300e296d9b770b7883a92a52f364d7f94aa
push id1648
push usermtabara@mozilla.com
push dateThu, 01 Mar 2018 12:45:47 +0000
treeherdermozilla-release@cbb9688c2eeb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdustin
bugs1430984
milestone59.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1430984 - Automatically create a debian/changelog entry when there is no patch. r=dustin
build/debian-packages/git-wheezy.diff
build/debian-packages/ninja-wheezy.diff
taskcluster/ci/packages/kind.yml
taskcluster/taskgraph/transforms/job/debian_package.py
deleted file mode 100644
--- a/build/debian-packages/git-wheezy.diff
+++ /dev/null
@@ -1,13 +0,0 @@
-diff -Nru git-2.8.0~rc3/debian/changelog git-2.8.0~rc3/debian/changelog
---- git-2.8.0~rc3/debian/changelog	2016-03-17 10:28:14.000000000 +0900
-+++ git-2.8.0~rc3/debian/changelog	2018-01-12 14:46:45.000000000 +0900
-@@ -1,3 +1,9 @@
-+git (1:2.8.0~rc3-1.deb7moz1) wheezy; urgency=medium
-+
-+  * Mozilla backport for wheezy.
-+
-+ -- Mike Hommey <glandium@mozilla.com>  Fri, 12 Jan 2018 14:46:45 +0900
-+
- git (1:2.8.0~rc3-1) unstable; urgency=medium
- 
-   * new upstream release candidate (see RelNotes/2.8.0.txt).
deleted file mode 100644
--- a/build/debian-packages/ninja-wheezy.diff
+++ /dev/null
@@ -1,13 +0,0 @@
-diff -Nru ninja-build-1.6.0/debian/changelog ninja-build-1.6.0/debian/changelog
---- ninja-build-1.6.0/debian/changelog	2016-02-09 04:54:03.000000000 +0900
-+++ ninja-build-1.6.0/debian/changelog	2017-12-21 16:38:47.000000000 +0900
-@@ -1,3 +1,9 @@
-+ninja-build (1.6.0-1.deb7moz1) wheezy; urgency=medium
-+
-+  * Mozilla backport for wheezy.
-+
-+ -- Mike Hommey <glandium@mozilla.com>  Thu, 21 Dec 2017 16:38:47 +0900
-+
- ninja-build (1.6.0-1) unstable; urgency=medium
- 
-   * New maintainer. (Closes: #810025)
--- a/taskcluster/ci/packages/kind.yml
+++ b/taskcluster/ci/packages/kind.yml
@@ -61,17 +61,16 @@ jobs:
     description: "Ninja backport for Debian wheezy"
     treeherder:
       symbol: Deb7(ninja)
     run:
       using: debian-package
       dsc:
         url: http://snapshot.debian.org/archive/debian/20160209T042121Z/pool/main/n/ninja-build/ninja-build_1.6.0-1.dsc
         sha256: 25cd62b011d669c31bcd51d36d454dd826bc50af6a3af8d87bcab8948ec21626
-      patch: ninja-wheezy.diff
 
   deb7-mercurial:
     description: "Modern Mercurial for Debian wheezy"
     treeherder:
       symbol: Deb7(hg)
     run:
       using: debian-package
       tarball:
@@ -87,17 +86,16 @@ jobs:
     description: "Modern git for Debian wheezy"
     treeherder:
       symbol: Deb7(git)
     run:
       using: debian-package
       dsc:
         url: http://snapshot.debian.org/archive/debian/20160317T100542Z/pool/main/g/git/git_2.8.0%7Erc3-1.dsc
         sha256: 6e81a318fb4eb5cca0333b7b6ff0c70dd0097e9fe711b159d5eac4b9f47c6c27
-      patch: git-wheezy.diff
 
   deb7-valgrind:
     description: "Valgrind for Debian Wheezy"
     treeherder:
       symbol: Deb7(valgrind)
     run:
       using: debian-package
       dsc:
--- a/taskcluster/taskgraph/transforms/job/debian_package.py
+++ b/taskcluster/taskgraph/transforms/job/debian_package.py
@@ -49,24 +49,30 @@ run_schema = Schema({
     Optional('pre-build-command'): basestring,
 })
 
 
 @run_job_using("docker-worker", "debian-package", schema=run_schema)
 def docker_worker_debian_package(config, job, taskdesc):
     run = job['run']
 
+    name = taskdesc['label'].replace('{}-'.format(config.kind), '', 1)
+
     worker = taskdesc['worker']
     worker['artifacts'] = []
     worker['docker-image'] = 'debian:{dist}-{date}'.format(
         dist=run['dist'],
         date=run['snapshot'][:8])
 
     add_public_artifacts(config, job, taskdesc, path='/tmp/artifacts')
 
+    env = worker.setdefault('env', {})
+    env['DEBFULLNAME'] = 'Mozilla build team'
+    env['DEBEMAIL'] = 'dev-builds@lists.mozilla.org'
+
     if 'dsc' in run:
         src = run['dsc']
         unpack = 'dpkg-source -x {src_file} {package}'
         package_re = DSC_PACKAGE_RE
     elif 'tarball' in run:
         src = run['tarball']
         unpack = ('mkdir {package} && '
                   'tar -C {package} -axf {src_file} --strip-components=1')
@@ -93,16 +99,22 @@ def docker_worker_debian_package(config,
     if 'pre-build-command' in run:
         adjust += run['pre-build-command'] + ' && '
     if 'tarball' in run:
         adjust += 'mv ../{src_file} ../{package}_{ver}.orig.tar.gz && '.format(
             src_file=src_file,
             package=package,
             ver='$(dpkg-parsechangelog | awk \'$1=="Version:"{print $2}\' | cut -f 1 -d -)',
         )
+    if 'patch' not in run and 'pre-build-command' not in run:
+        adjust += ('debchange -l ".{prefix}moz" --distribution "{dist}"'
+                   ' "Mozilla backport for {dist}." < /dev/null && ').format(
+            prefix=name.split('-', 1)[0],
+            dist=run['dist'],
+        )
 
     # We can't depend on docker images (since docker images depend on packages),
     # so we inline the whole script here.
     worker['command'] = [
         'sh',
         '-x',
         '-c',
         # Fill /etc/apt/sources.list with the relevant snapshot repository.
@@ -146,17 +158,16 @@ def docker_worker_debian_package(config,
             src_file=src_file,
             src_sha256=src_sha256,
             unpack=unpack,
             adjust=adjust,
             artifacts='/tmp/artifacts',
         )
     ]
 
-    name = taskdesc['label'].replace('{}-'.format(config.kind), '', 1)
     files = [
         # This file
         'taskcluster/taskgraph/transforms/job/debian_package.py',
     ]
     if 'patch' in run:
         files.append('build/debian-packages/{}'.format(run['patch']))
     data = [hash_paths(GECKO, files)]
     for k in ('snapshot', 'dist', 'pre-build-command'):