# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

loader: taskgraph.loader.transform:loader

transforms:
  - taskgraph.transforms.try_job:transforms
  - taskgraph.transforms.job:transforms
  - taskgraph.transforms.task:transforms

job-defaults:
  treeherder:
    kind: build
    platform: packages/opt
    tier: 1
  worker-type: aws-provisioner-v1/gecko-{level}-b-linux
  worker:
    max-run-time: 1800
  run-on-projects: []
  run:
    dist: wheezy
    snapshot: 20171210T214726Z

jobs:
  deb7-python:
    description: "Python backport for Debian wheezy"
    treeherder:
      symbol: Deb7(python)
    run:
      using: debian-package
      dsc:
        url: http://snapshot.debian.org/archive/debian/20160813T164221Z/pool/main/p/python2.7/python2.7_2.7.9-2+deb8u1.dsc
        sha256: 274c293e7156edf59cb9f0a9d8cedcd94fa801df35adf39b8a9f3d776a250ead
      patch: python-wheezy.diff
      pre-build-command: debian/rules control-file

  deb7-cmake:
    description: "Cmake backport for Debian wheezy"
    treeherder:
      symbol: Deb7(cmake)
    run:
      using: debian-package
      dsc:
        url: http://snapshot.debian.org/archive/debian/20161204T034107Z/pool/main/c/cmake/cmake_3.7.1-1.dsc
        sha256: 406a12c0d0a2e92d44a8d444fd1b32bcc29a8810e9631427161a7cb411f60172
      patch: cmake-wheezy.diff

  deb7-make:
    description: "Make backport for Debian wheezy"
    treeherder:
      symbol: Deb7(make)
    run:
      using: debian-package
      dsc:
        url: http://snapshot.debian.org/archive/debian/20150121T220334Z/pool/main/m/make-dfsg/make-dfsg_4.0-8.1.dsc
        sha256: ae258d9abb68e756d1ff5195dc3060748b3d4b019ccce19a249d4de23039a0ce
      patch: make-wheezy.diff

  deb7-ninja:
    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

  deb7-mercurial:
    description: "Modern Mercurial for Debian wheezy"
    treeherder:
      symbol: Deb7(hg)
    run:
      using: debian-package
      tarball:
        url: https://www.mercurial-scm.org/release/mercurial-4.4.2.tar.gz
        sha256: dc2f72caccd6b760226753d48c2f4e8889fe176a6b23ef50775caac55ce28b85
      pre-build-command: >-
        cp -r contrib/debian debian &&
        sed -i -e "s/__VERSION__/$(awk -F\" '$2 {print $2}' mercurial/__version__.py)-1.deb7moz1/" \
               -e "s/__DATE__/$(date --rfc-2822)/" \
               -e "s/__CODENAME__/wheezy/" debian/changelog

  deb7-git:
    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

  deb7-valgrind:
    description: "Valgrind for Debian Wheezy"
    treeherder:
      symbol: Deb7(valgrind)
    run:
      using: debian-package
      dsc:
        url: http://snapshot.debian.org/archive/debian/20170725T040438Z/pool/main/v/valgrind/valgrind_3.13.0-1.dsc
        sha256: ab84e017d1660efd30e9e0593a4c8b976aeda013cefb8c416dd284cc7222c11c
      patch: valgrind-wheezy.diff

  deb7-dpkg-1.17:
    description: "dpkg 1.17 for Debian wheezy"
    treeherder:
      symbol: Deb7(dpkg)
    worker:
      env:
        # The compiler in wheezy doesn't support the stackprotector flags.
        DEB_BUILD_MAINT_OPTIONS: hardening=-stackprotector
    run:
      using: debian-package
      dsc:
        url: http://snapshot.debian.org/archive/debian/20141023T043132Z/pool/main/d/dpkg/dpkg_1.17.20.dsc
        sha256: c706ad3f5db11968086ab2e0767f87d6e3522b13ebf136ae46f7722a82f645f6
      patch: dpkg-wheezy.diff

  deb7-devscripts-2.14:
    description: "devscripts 2.14 for Debian wheezy"
    treeherder:
      symbol: Deb7(devscripts)
    run:
      using: debian-package
      dsc:
        url: http://snapshot.debian.org/archive/debian/20141204T100716Z/pool/main/d/devscripts/devscripts_2.14.11.dsc
        sha256: 47009dd76b2e8ce0f64b9f0d1caa4f648e0815ae5f79624bb96e3d06de1cb0d6
      resolver: aptitude

  deb7-automake-1.14:
    description: "automake 1.14 for Debian wheezy"
    treeherder:
      symbol: Deb7(am)
    run:
      using: debian-package
      dsc:
        url: http://snapshot.debian.org/archive/debian/20141027T102134Z/pool/main/a/automake-1.14/automake-1.14_1.14.1-4.dsc
        sha256: d798619c504a686a5ebe46d106fd992971e805916032607e473541182da12167

  deb7-xz-utils:
    description: "xz-utils for Debian wheezy"
    treeherder:
      symbol: Deb7(xz)
    worker:
      env:
        # The compiler in wheezy doesn't support the stackprotector flags.
        DEB_BUILD_MAINT_OPTIONS: hardening=-stackprotector
    run:
      using: debian-package
      dsc:
        url: http://snapshot.debian.org/archive/debian/20161010T223637Z/pool/main/x/xz-utils/xz-utils_5.2.2-1.2.dsc
        sha256: 13c8d8d0c243af78dc89b6e2cd670c8d8a2522379e1fcd196957c95d988d5961
      packages:
        - deb7-automake-1.14
        # The xz debian source is in a format not supported by dpkg in wheezy,
        # so we need a newer version of dpkg, which also needs a newer version
        # of devscripts.
        - deb7-devscripts-2.14
        - deb7-dpkg-1.17
