Compare commits

...

100 Commits

Author SHA1 Message Date
  Daniel Reurich 787f1cf611 Merge branch 'suites/experimental' into suites/unstable 2 years ago
  Daniel Reurich 3b41c90022 Fixup changelog 2 years ago
  Daniel Reurich b290e52b3f Update changelog for 0.18.4.99+devuan2 release 2 years ago
  Daniel Reurich 2bb2d25e81 Merge 'remotes/jdg-github/master' from upstream 2 years ago
  Daniel Reurich d7c1985325 tidy up trailing whitespace 3 years ago
  Daniel Reurich 97e40a4c83 added variable for changelog file location 3 years ago
  Daniel Reurich 0bedb2dc47 release 0.18.4 3 years ago
  Michael Prokop e270387629 debian: run wrap-and-sort 3 years ago
  Michael Prokop 9e2117c2f8 Support autopkgtest v5 3 years ago
  Michael Prokop e1db6a7682 puppet: don't rely on outside variable inside package_check 3 years ago
  Michael Prokop d27375db70 puppet: make check for installed packages more reliable 3 years ago
  Michael Prokop 3529ae6bc2 piuparts_tap: don't check only for error code 100 but accept any digit 3 years ago
  Michael Prokop 3c53ca6cc4 puppet: ensure that apt-transport-https is present 3 years ago
  Michael Prokop 3a0a8fa766 puppet: ensure recent Jenkins Git client plugin dependencies are fulfilled 3 years ago
  Guillem Jover 2126ad02e9 Bump Standards-Version to 4.1.1 3 years ago
  Guillem Jover 00602c6b35 Remove Copyright notice from License field 3 years ago
  Guillem Jover cdf1b88715 Use the canonical URL for the debian/copyright Format field 3 years ago
  Guillem Jover 575728b099 Bump debhelper compatibility level to 10 3 years ago
  Guillem Jover dce1238fbb Add new debian/.gitignore file 3 years ago
  Guillem Jover b9196d5897 Remove boilerplate comment from debian/rules 3 years ago
  Guillem Jover d9db8693c2 Switch from Priority extra to optional 3 years ago
  Guillem Jover 616d23e8e5 Wrap and sort dependency fields 3 years ago
  Michael Prokop 28fdb633b6 Release new version 0.18.4 4 years ago
  Michael Prokop e98da4b868 Bump Standards-Version to 4.0.1 4 years ago
  Michael Prokop 5d02459e9a tap: avoid deep inspection of scripts by dropping file(1)'s `--keep-going` option 4 years ago
  Michael Prokop c6c8c0246f puppet: workspace cleanup plugin depends on further plugins 4 years ago
  klemens a3b8324ad2 spelling fix 4 years ago
  Michael Prokop 2f939f25df puppet: further changes to work with recent puppet versions 4 years ago
  Michael Prokop 2061ac0166 puppet: rework apt-get/apt-key handling to work with recent puppet versions 4 years ago
  Michael Prokop a9ab3f46ef puppet: ensure that jenkins + jenkins-debian-glue packages are installed and only then report a successful run 4 years ago
  Michael Prokop b4b82aea10 Release new version 0.18.3 4 years ago
  Michael Prokop 12e873dca3 Further regression fixes for commit 8fe677820f WRT dpkg-buildpackage options 4 years ago
  Michael Prokop 066a1c0e4d puppet: no longer run wget with --no-check-certificate 4 years ago
  Michael Prokop 5a7d041202 puppet: switch from jenkins-ci.org to jenkins.io 4 years ago
  Michael Prokop d210c1406a Fix regression from commit 8fe677820f to apply safe dpkg-buildpackage defaults 4 years ago
  Victor Seva b7075523e4 build-and-provide-package: fix trunk_release if SKIP_REPREPRO_WRAPPER 4 years ago
  Victor Seva a7b350e6af scripts: SIGKILL cannot be trapped 4 years ago
  Michael Prokop 42a7ea8f94 Support skipping reprepro wrapper via SKIP_REPREPRO_WRAPPER 4 years ago
  Michael Prokop 16ec0f3923 Support SKIP_SOURCE_REMOVAL to not remove source package in binary only package builds 4 years ago
  Michael Prokop 6cd165a2ea deployment: fail if we don't have a FQDN to avoid runtime errors later on 4 years ago
  Michael Prokop 7daf7366f8 Release new version 0.18.2 4 years ago
  Will DeBerry 8fe677820f Don't override filter regexs 4 years ago
  Michael Prokop bfd5b1f7da Release new version 0.18.1 4 years ago
  Michael Prokop f59be8919f Bump debhelper compat version to v9 4 years ago
  Michael Prokop 5673a28e4e Don't fail when hitting .buildinfo files in reprepro's incoming stage 4 years ago
  Michael Prokop e6373df6db Include .buildinfo files in list of artifact files 4 years ago
  Michael Prokop 798fdf6cd8 build-and-provide-package: enable builtin support for eatmydata in pbuilder 4 years ago
  Michael Prokop ab3f255aba puppet: warn users of automated installations regarding missing jenkins plugin dependencies 5 years ago
  Michael Prokop cbd5c0984e puppet: ensure display-url-api plugin is installed 5 years ago
  Michael Prokop 9221f9c8ef generate-svn-snapshot: avoid mergeWithUpstream failure with recent subversion versions 5 years ago
  André Draszik 94ea6334e4 build-and-provide-package: make sure to remove pbuilderrc 5 years ago
  André Draszik 986fe7f49d build-and-provide-package: use mktemp rather than PID for directory name 5 years ago
  André Draszik 8d13d2c3c9 build-and-provide-package: don't create freight dirs unnecessarily 5 years ago
  André Draszik 5cf12e58b1 build-and-provide-package: fix a typo wrt freight 5 years ago
  André Draszik 02a8ec4d02 jdg-debc: works for foreign architecture packages 5 years ago
  Michael Prokop fef7d5ab0a Release new version 0.18.0 5 years ago
  Michael Prokop 0f436f220c Bump Standards-Version to 3.9.8 5 years ago
  Michael Prokop 737e4e950a generate-git-snapshot: do not fail with branch specifier being a commit ID 5 years ago
  Michael Prokop 59e1a99c79 Avoid dpkg-architecture usage for identifying host architecture 5 years ago
  Alexis Bezverkhyy 6561c543db take into account .udebs in remove_packages() 5 years ago
  Michael Prokop 16f0ba5565 Adjust runtime detection to properly work with LXC hosts 5 years ago
  Michael Prokop 96fe9fe79d puppet: install antisamy-markup-formatter plugin for HTML markup support 5 years ago
  Michael Prokop db599984f8 puppet: update dependencies for git, ws-cleanup + ssh-agent Jenkins plugins 5 years ago
  Franco Lanza 2ceba501b9 Merge branch 'master' into 'suites/ascii' 5 years ago
  Franco Lanza 03b8562bd4 Merge branch 'master' into 'suites/unstable' 5 years ago
  Daniel Reurich b437fef88a Merge branch 'suites/unstable' into 'suites/unstable' 5 years ago
  Daniel Reurich 7e03bd00d5 Merge branch 'suites/ascii' into 'suites/ascii' 5 years ago
  Daniel Reurich aaacf3865f Merge branch 'master' into suites/unstable 5 years ago
  Daniel Reurich fc500a6a51 Merge branch 'master' into suites/ascii 5 years ago
  Daniel Reurich b48e31587a Merge branch 'master' into suites/ascii 5 years ago
  Daniel Reurich 0742422a47 update changelog - Release 0.15.2+devuan 5 years ago
  Daniel Reurich 4432cd2e00 Merge branch 'master' into 'suites/ascii' 5 years ago
  Daniel Reurich 6e9a1f7b91 Merge branch 'master' into 'suites/unstable' 5 years ago
  Daniel Reurich 61358154ca fix handling of debian/source/options 5 years ago
  Franco Lanza 6a348366aa Merge branch 'master' into 'suites/unstable' 5 years ago
  Franco Lanza 9659350cd8 Merge branch 'master' into 'suites/ascii' 5 years ago
  Franco Lanza 3720652274 Merge branch 'master' into 'suites/ascii' 5 years ago
  Franco Lanza ee7bd896f0 Merge branch 'master' into 'suites/unstable' 5 years ago
  Daniel Reurich 9019144413 Merge branch 'master' into suites/ascii 5 years ago
  Daniel Reurich f755c8631e Merge branch 'suites/jessie' into suites/ascii 5 years ago
  Franco Lanza 68ec9dc4b3 Merge branch 'master' into 'suites/ascii' 5 years ago
  Franco Lanza b6e35ba4bb Merge branch 'master' into 'suites/ascii' 5 years ago
  Franco Lanza 5374c2df6d Merge branch 'master' into 'suites/ascii' 5 years ago
  Franco Lanza 9f1f9c2e73 Merge branch 'master' into 'suites/ascii' 5 years ago
  Franco Lanza 7491047046 Merge branch 'master' into 'suites/ascii' 5 years ago
  Franco Lanza 20d40e24ea Merge branch 'master' into 'suites/ascii' 6 years ago
  Franco Lanza f57b404b39 Merge branch 'master' into 'suites/ascii' 6 years ago
  Franco Lanza f76e616003 Merge branch 'master' into 'suites/ascii' 6 years ago
  Franco Lanza f378478c14 Merge branch 'master' into 'suites/ascii' 6 years ago
  Franco Lanza b5b5520858 Merge branch 'master' into 'suites/ascii' 6 years ago
  Franco Lanza 1dd8cde891 Merge branch 'master' into 'suites/ascii' 6 years ago
  Franco Lanza 1e6f3dea76 Merge branch 'master' into 'suites/ascii' 6 years ago
  Franco Lanza 2d39b708df Merge branch 'master' into 'suites/ascii' 6 years ago
  Franco Lanza 2445f42a24 Merge branch 'master' into 'suites/ascii' 6 years ago
  Franco Lanza ee2add7312 Merge branch 'master' into 'suites/ascii' 6 years ago
  Franco Lanza 7193558247 Merge branch 'master' into 'suites/ascii' 6 years ago
  Franco Lanza 1ca8144ca4 Merge branch 'master' into 'suites/ascii' 6 years ago
  Franco Lanza 2295a5076d Merge branch 'master' into 'suites/ascii' 6 years ago
  Franco Lanza 644f4530ef Merge branch 'master' into 'suites/ascii' 6 years ago
  Franco Lanza 43a294ebf3 Merge branch 'master' into 'suites/ascii' 6 years ago
23 changed files with 542 additions and 169 deletions
Split View
  1. +8
    -0
      debian/.gitignore
  2. +142
    -0
      debian/changelog
  3. +1
    -1
      debian/compat
  4. +54
    -48
      debian/control
  5. +1
    -3
      debian/copyright
  6. +0
    -5
      debian/rules
  7. +1
    -1
      examples/debian_glue
  8. +2
    -2
      jjb/jdg-freight.yaml
  9. +2
    -2
      jjb/jdg-reprepro.yaml
  10. +32
    -9
      pbuilder-hookdir/B20autopkgtest
  11. +60
    -7
      puppet/apply.sh
  12. +100
    -31
      puppet/jenkins_debian_glue.pp
  13. +88
    -45
      scripts/build-and-provide-package
  14. +34
    -4
      scripts/generate-git-snapshot
  15. +2
    -1
      scripts/generate-svn-snapshot
  16. +7
    -2
      scripts/jdg-debc
  17. +1
    -1
      scripts/piuparts_wrapper
  18. +1
    -1
      scripts/repository_checker
  19. +1
    -1
      tap/checkbashism_tap
  20. +1
    -1
      tap/pep8_tap
  21. +1
    -1
      tap/perlcritic_tap
  22. +2
    -2
      tap/piuparts_tap
  23. +1
    -1
      tap/shellcheck_tap

+ 8
- 0
debian/.gitignore View File

@@ -0,0 +1,8 @@
*.debhelper
*.log
*.substvars
/.debhelper/
/debhelper-build-stamp
/files
/jenkins-debian-glue-buildenv/
/jenkins-debian-glue/

+ 142
- 0
debian/changelog View File

@@ -1,3 +1,145 @@
jenkins-debian-glue (0.18.4.99+devuan2) unstable; urgency=medium

[ Daniel Reurich ]
* merged 0.18.4 from upstream
* added variable for changelog file location
* tidy up trailing whitespace
* merge from upstream fixes for autopkgtest v5 breakage

[ Guillem Jover ]
* Wrap and sort dependency fields
* Switch from Priority extra to optional
* Remove boilerplate comment from debian/rules
* Add new debian/.gitignore file
* Bump debhelper compatibility level to 10
* Use the canonical URL for the debian/copyright Format field
* Remove Copyright notice from License field
* Bump Standards-Version to 4.1.1

[ Michael Prokop ]
* puppet: ensure recent Jenkins Git client plugin dependencies are fulfilled
* puppet: ensure that apt-transport-https is present
* piuparts_tap: don't check only for error code 100 but accept any digit
* puppet: make check for installed packages more reliable.
Thanks to Guillem Jover for feedback and code review
* puppet: don't rely on outside variable inside package_check.
Thanks to Alex Lutay
* Support autopkgtest v5.
Thanks to Christoph Berg <myon@debian.org> for feedback
* debian: run wrap-and-sort


-- Daniel Reurich <centurion@haggai.centurion.net.nz> Fri, 26 Oct 2018 00:25:58 +1300

jenkins-debian-glue (0.18.4) unstable; urgency=medium

[ Michael Prokop ]
* [a9ab3f4] puppet: ensure that jenkins + jenkins-debian-glue packages
are installed and only then report a successful run
* [2061ac0] puppet: rework apt-get/apt-key handling to work with recent
puppet versions. Thanks to msqk for reporting on IRC
* [2f939f2] puppet: further changes to work with recent puppet versions
* [c6c8c02] puppet: workspace cleanup plugin depends on further plugins
* [5d02459] tap: avoid deep inspection of scripts by dropping file(1)'s
`--keep-going` option
* [e98da4b] Bump Standards-Version to 4.0.1

[ klemens ]
* [a3b8324] spelling fix

-- Michael Prokop <mika@debian.org> Thu, 17 Aug 2017 14:51:57 +0200

jenkins-debian-glue (0.18.3) experimental; urgency=medium

The "¡Hola Alicante!" release

[ Michael Prokop ]
* [6cd165a] deployment: fail if we don't have a FQDN to avoid runtime
errors later on. Thanks to Arthur Lutz for the bugreport
* [16ec0f3] Support SKIP_SOURCE_REMOVAL to not remove source package in
binary only package builds. Thanks to Antoine Delvaux
<antoine.delvaux@gmail.com> for the bugreport + initial patch
* [42a7ea8] Support skipping reprepro wrapper via SKIP_REPREPRO_WRAPPER
* [d210c14] Fix regression from commit 8fe677820fae2 to apply safe dpkg-
buildpackage defaults. Thanks to Guillem Jover for feedback and code
review
* [5a7d041] puppet: switch from jenkins-ci.org to jenkins.io. Thanks to
Cyril Brulebois for the hint
* [066a1c0] puppet: no longer run wget with --no-check-certificate
* [12e873d] Further regression fixes for commit 8fe677820fae2 WRT dpkg-
buildpackage options. Thanks to Guillem Jover for feedback and code
review

[ Victor Seva ]
* [a7b350e] scripts: SIGKILL cannot be trapped
* [b707552] build-and-provide-package: fix trunk_release if
SKIP_REPREPRO_WRAPPER

-- Michael Prokop <mika@debian.org> Thu, 27 Apr 2017 18:29:07 +0200

jenkins-debian-glue (0.18.2) unstable; urgency=medium

[ Will DeBerry ]
* [8fe6778] Don't override filter regexs

-- Michael Prokop <mika@debian.org> Tue, 24 Jan 2017 22:13:48 +0100

jenkins-debian-glue (0.18.1) unstable; urgency=medium

[ André Draszik ]
* jdg-debc: works for foreign architecture packages
* build-and-provide-package: fix a typo wrt freight
* build-and-provide-package: don't create freight dirs unnecessarily
* build-and-provide-package: use mktemp rather than PID for directory
name
* build-and-provide-package: make sure to remove pbuilderrc

[ Michael Prokop ]
* generate-svn-snapshot: avoid mergeWithUpstream failure with recent
subversion versions
* puppet: ensure display-url-api plugin is installed
* puppet: warn users of automated installations regarding missing
jenkins plugin dependencies
* build-and-provide-package: enable builtin support for eatmydata in
pbuilder
* Include .buildinfo files in list of artifact files. Thanks to
Christoph Berg <myon@debian.org>
* Don't fail when hitting .buildinfo files in reprepro's incoming stage
* Bump debhelper compat version to v9

-- Michael Prokop <mika@debian.org> Fri, 18 Nov 2016 11:29:55 +0100

jenkins-debian-glue (0.18.0) unstable; urgency=medium

[ Michael Prokop ]
* [f9b1fc8] puppet: update list of Jenkis plugins to satisfy
dependencies. Thanks to youam the bug report
* [db59998] puppet: update dependencies for git, ws-cleanup + ssh-agent
Jenkins plugins
* [96fe9fe] puppet: install antisamy-markup-formatter plugin for HTML
markup support
* [16f0ba5] Adjust runtime detection to properly work with LXC hosts.
Thanks to Ondřej Surý
* [59e1a99] Avoid dpkg-architecture usage for identifying host
architecture. Thanks to Guillem Jover for feedback
* [737e4e9] generate-git-snapshot: do not fail with branch specifier
being a commit ID. Thanks to Jan Alexander Steffens
<jan.steffens@gmail.com> for bugreport + patch
* [0f436f2] Bump Standards-Version to 3.9.8

[ Antoine Delvaux ]
* [c1e13b9] Adding SKIP_MISSING_BINARY_REMOVAL to prevent removal of
binary packages not belonging to the currently built source package.

[ Sebastian Damm ]
* [09a78f2] generate-git-snapshot: support DCH_CHANGELOG_FILE to change
path for git-dch

[ Alexis Bezverkhyy ]
* [6561c54] take into account .udebs in remove_packages()

-- Michael Prokop <mika@debian.org> Tue, 04 Oct 2016 14:20:23 +0200

jenkins-debian-glue (0.17.0+devuan1) unstable; urgency=medium

* Import latest changes from upstream


+ 1
- 1
debian/compat View File

@@ -1 +1 @@
8
10

+ 54
- 48
debian/control View File

@@ -4,22 +4,25 @@ Priority: extra
Maintainer: Franco (nextime) Lanza <nextime@devuan.org>
Build-Depends: debhelper (>= 8.0.0),
shunit2
Standards-Version: 3.9.7
Standards-Version: 4.1.1
Homepage: https://git.devuan.org/devuan-infrastructure/jenkins-devuan-glue
Vcs-Git: https://git.devuan.org/devuan-infrastructure/jenkins-devuan-glue.git
Vcs-Browser: https://git.devuan.org/devuan-infrastructure/jenkins-devuan-glue/tree/master

Package: jenkins-debian-glue
Architecture: all
Depends: sudo | sudo-ldap,
${misc:Depends}
Recommends: jenkins-debian-glue-buildenv
Conflicts: jenkins-debian-glue-buildenv-git,
jenkins-debian-glue-buildenv-lintian,
jenkins-debian-glue-buildenv-piuparts,
jenkins-debian-glue-buildenv-slave,
jenkins-debian-glue-buildenv-svn,
jenkins-debian-glue-buildenv-taptools
Depends:
sudo | sudo-ldap,
${misc:Depends},
Recommends:
jenkins-debian-glue-buildenv,
Conflicts:
jenkins-debian-glue-buildenv-git,
jenkins-debian-glue-buildenv-lintian,
jenkins-debian-glue-buildenv-piuparts,
jenkins-debian-glue-buildenv-slave,
jenkins-debian-glue-buildenv-svn,
jenkins-debian-glue-buildenv-taptools,
Description: Jenkins Debian glue scripts
This package provides scripts which make building Debian
packages inside Jenkins (a Continuous Integration suite) easier.
@@ -33,44 +36,47 @@ Description: Jenkins Debian glue scripts

Package: jenkins-debian-glue-buildenv
Architecture: all
Depends: build-essential,
cowbuilder,
devscripts,
dpkg-dev,
eatmydata,
fakeroot,
file,
git-buildpackage,
gnupg,
jenkins-debian-glue,
lintian,
parallel | moreutils,
piuparts,
pristine-tar,
quilt,
reprepro| freight,
rsync,
ruby,
subversion-tools (<= 1.6.18dfsg-1) | svn2cl,
ccache,
${misc:Depends}
Conflicts: jenkins-debian-glue-buildenv-git,
jenkins-debian-glue-buildenv-lintian,
jenkins-debian-glue-buildenv-piuparts,
jenkins-debian-glue-buildenv-slave,
jenkins-debian-glue-buildenv-svn,
jenkins-debian-glue-buildenv-taptools
Replaces: jenkins-debian-glue-buildenv-git,
jenkins-debian-glue-buildenv-lintian,
jenkins-debian-glue-buildenv-piuparts,
jenkins-debian-glue-buildenv-slave,
jenkins-debian-glue-buildenv-svn,
jenkins-debian-glue-buildenv-taptools
Recommends: curl,
libperl-critic-perl,
pep8 (>= 1.4.6~),
qemu-user-static,
shellcheck
Depends:
build-essential,
cowbuilder,
devscripts,
dpkg-dev,
eatmydata,
fakeroot,
file,
git-buildpackage,
gnupg,
jenkins-debian-glue,
lintian,
parallel | moreutils,
piuparts,
pristine-tar,
quilt,
reprepro | freight,
rsync,
ruby,
subversion-tools (<= 1.6.18dfsg-1) | svn2cl,
${misc:Depends},
Conflicts:
jenkins-debian-glue-buildenv-git,
jenkins-debian-glue-buildenv-lintian,
jenkins-debian-glue-buildenv-piuparts,
jenkins-debian-glue-buildenv-slave,
jenkins-debian-glue-buildenv-svn,
jenkins-debian-glue-buildenv-taptools,
Replaces:
jenkins-debian-glue-buildenv-git,
jenkins-debian-glue-buildenv-lintian,
jenkins-debian-glue-buildenv-piuparts,
jenkins-debian-glue-buildenv-slave,
jenkins-debian-glue-buildenv-svn,
jenkins-debian-glue-buildenv-taptools,
Recommends:
curl,
libperl-critic-perl,
pep8 (>= 1.4.6~),
qemu-user-static,
shellcheck,
Description: Jenkins Debian glue scripts - dependency package
This package depends on all Debian packaging/repository
management and VCS tools which may be used with


+ 1
- 3
debian/copyright View File

@@ -1,4 +1,4 @@
Format: http://dep.debian.net/deps/dep5
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: jenkins-debian-glue
Source: https://github.com/mika/jenkins-debian-glue

@@ -16,8 +16,6 @@ Copyright: 2012 Christoph Berg <myon@debian.org>
License: MIT

License: MIT
Copyright (c) 2011-2105 by Michael Prokop <mika@debian.org>
.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights


+ 0
- 5
debian/rules View File

@@ -1,10 +1,5 @@
#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.

# Uncomment this to turn on verbose mode.
# export DH_VERBOSE=1


+ 1
- 1
examples/debian_glue View File

@@ -86,7 +86,7 @@

# autopkgtests are executed automatically inside the cowbuilder environment by
# default, corresponding to the ADT='internal' setting or if ADT is unset.
# To execute autopkgtests also externally via adt-run you need to set ADT to
# To execute autopkgtests also externally you need to set ADT to
# either 'external' (no internal runs) or 'all' (internal + external runs).
# The external autopkgtests depend on a configured ADT_RUNNER setting.
# To skip internal as well as external autopkgtests set ADT='skip'.


+ 2
- 2
jjb/jdg-freight.yaml View File

@@ -32,7 +32,7 @@
/usr/bin/lintian-junit-report *.dsc > report/lintian.xml
publishers:
- archive:
artifacts: '*.gz,*.bz2,*.xz,*.deb,*.dsc,*.git,*.changes,lintian.txt'
artifacts: '*.gz,*.bz2,*.xz,*.deb,*.dsc,*.git,*.changes,*.buildinfo,lintian.txt'
- trigger:
project: '{name}-binaries'
- junit:
@@ -83,7 +83,7 @@
/usr/bin/lintian-junit-report *.changes > report/lintian.xml
publishers:
- archive:
artifacts: '*.gz,*.bz2,*.xz,*.deb,*.dsc,*.git,*.changes,lintian.txt'
artifacts: '*.gz,*.bz2,*.xz,*.deb,*.dsc,*.git,*.changes,*.buildinfo,lintian.txt'
- junit:
results: '**/lintian.xml'
keep-long-stdio: false


+ 2
- 2
jjb/jdg-reprepro.yaml View File

@@ -33,7 +33,7 @@
/usr/bin/lintian-junit-report *.dsc > report/lintian.xml
publishers:
- archive:
artifacts: '*.gz,*.bz2,*.xz,*.deb,*.dsc,*.git,*.changes,lintian.txt'
artifacts: '*.gz,*.bz2,*.xz,*.deb,*.dsc,*.git,*.changes,*.buildinfo,lintian.txt'
- trigger:
project: '{name}-binaries'
- junit:
@@ -83,7 +83,7 @@
/usr/bin/lintian-junit-report *.changes > report/lintian.xml
publishers:
- archive:
artifacts: '*.gz,*.bz2,*.xz,*.deb,*.dsc,*.git,*.changes,lintian.txt'
artifacts: '*.gz,*.bz2,*.xz,*.deb,*.dsc,*.git,*.changes,*.buildinfo,lintian.txt'
- junit:
results: '**/lintian.xml'
keep-long-stdio: false


+ 32
- 9
pbuilder-hookdir/B20autopkgtest View File

@@ -31,7 +31,7 @@ if [ -n "${ADT_OPTIONS:-}" ] ; then
echo "*** Using provided ADT_OPTIONS $ADT_OPTIONS ***"
fi

# try to launch adt-run in a new PID namespace so several testsuites can run
# try to launch autopkgtest in a new PID namespace so several testsuites can run
# in parallel, newpid exists in jessie and newer only though
unset newpid_name
if ! apt-cache policy newpid | grep -q 'newpid:' ; then
@@ -41,7 +41,7 @@ else
newpid_name='newpid'
fi

# runner/adt-run uses apt-utils's apt-ftparchive and
# autopkgtest uses apt-utils's apt-ftparchive and
# pbuilder's pbuilder-satisfydepends-classic
apt-get install -y autopkgtest apt-utils pbuilder $newpid_name

@@ -55,9 +55,21 @@ case ${NEWPID_OPTS:-} in
;;
esac

if [ -x /usr/bin/autopkgtest ]; then
# starting with autopkgtest 5.0 there's only the dedicated autopkgtest CLI
AUTOPKG_BINARY=autopkgtest
elif [ -x /usr/bin/adt-run ] ; then
# autopkgtest as in Debian/jessie (v3.6jessie1) and older doesn't provide
# autopkgtest binary yet, but let's be backwards compatible
AUTOPKG_BINARY=adt-run
else
echo "Error: neither autopkgtest nor adt-run binary found." >&2
exit 1
fi

# since autopkgtest 3.16 the --tmp-dir option is gone, make sure
# we've --output-dir available though before using it
if adt-run --help | grep -q -- --output-dir 2>/dev/null ; then
if "$AUTOPKG_BINARY" --help | grep -q -- --output-dir 2>/dev/null ; then
OUTPUT_OPTION='--output-dir'
else
OUTPUT_OPTION='--tmp-dir'
@@ -65,12 +77,23 @@ fi

mkdir -p /tmp/buildd/autopkgtest.out

$newpid_name adt-run \
${OUTPUT_OPTION} /tmp/buildd/autopkgtest.out \
--summary /tmp/buildd/autopkgtest.summary \
/tmp/buildd/*.deb \
--built-tree "${PWD}" \
${ADT_OPTIONS:-} --- adt-virt-null || EXIT=$?
if [ -x /usr/bin/autopkgtest ]; then
# new autopkgtest interface
$newpid_name "$AUTOPKG_BINARY" \
${OUTPUT_OPTION} /tmp/buildd/autopkgtest.out \
--summary /tmp/buildd/autopkgtest.summary \
"${PWD}" \
/tmp/buildd/*.deb \
${ADT_OPTIONS:-} -- null || EXIT=$?
else
# old adt interface
$newpid_name "$AUTOPKG_BINARY" \
${OUTPUT_OPTION} /tmp/buildd/autopkgtest.out \
--summary /tmp/buildd/autopkgtest.summary \
/tmp/buildd/*.deb \
--built-tree "${PWD}" \
${ADT_OPTIONS:-} --- adt-virt-null || EXIT=$?
fi

# collect autopkgtest output in a single file so pbuilder automatically copies it
tar acf /tmp/buildd/autopkgtest.tar.gz /tmp/buildd/autopkgtest.out


+ 60
- 7
puppet/apply.sh View File

@@ -1,7 +1,7 @@
#!/bin/bash

start_seconds=$(cut -d . -f 1 /proc/uptime)
[ -n "$start_seconds" ] && SECONDS="$[$(cut -d . -f 1 /proc/uptime)-$start_seconds]" || SECONDS="unknown"
start_seconds=$(sed -e 's/^\([0-9]*\).*/\1/' < /proc/uptime)
[ -n "$start_seconds" ] && SECONDS="$[$(sed -e 's/^\([0-9]*\).*/\1/' < /proc/uptime)-$start_seconds]" || SECONDS="unknown"

if [ -r /var/lib/jenkins/config.xml ] ; then
echo "Configuration file /var/lib/jenkins/config.xml exists already." >&2
@@ -34,11 +34,11 @@ if [ -n "$2" ] ; then
exit 1
else
echo "Retrieving $2 and storing as jenkins_debian_glue.pp"
wget -O jenkins_debian_glue.pp --no-check-certificate "$2"
wget -O jenkins_debian_glue.pp "$2"
fi
else
if ! [ -r jenkins_debian_glue.pp ] ; then
wget --no-check-certificate https://raw.github.com/mika/jenkins-debian-glue/master/puppet/jenkins_debian_glue.pp
wget https://raw.github.com/mika/jenkins-debian-glue/master/puppet/jenkins_debian_glue.pp
fi
fi

@@ -88,7 +88,7 @@ if [ -z "$IP" ] ; then
IP=$(ip addr show dev $(route -n | awk '/^0\.0\.0\.0/{print $NF}') | awk '/inet / {print $2}' | head -1 |sed "s;/.*;;")
fi

if [[ $(facter fqdn) == "" ]] ; then
if [[ "$(hostname -f 2>/dev/null)" == "" ]] ; then
echo "Error: please make sure you have a valid FQDN configured in /etc/hosts" >&2
echo "NOTE: Something like adding the following snippet to /etc/hosts might help:

@@ -97,13 +97,66 @@ $IP $(hostname).example.org $(hostname)
exit 1
fi

if dpkg --compare-versions "$(dpkg-query -f "\${Version}\n" -W dpkg 2>/dev/null)" ge '1.17.11' 2>/dev/null ; then
package_check() {
local package="$1"
[ "$(dpkg-query -f "\${db:Status-Status} \${db:Status-Eflag}" -W "$package" 2>/dev/null)" = 'installed ok' ]
}
else # dpkg versions older than 1.17.11 (e.g. Debian/wheezy) don't support db:Status* flags, so fall back then
package_check() {
local package="$1"
dpkg --list "$package" 2>/dev/null | grep -q '^.i'
}
fi

package_installed() {
local packages="$*"

for package in $packages ; do
if ! package_check "$package" ; then
return 1
fi
done
}

if puppet apply jenkins_debian_glue.pp ; then
[ -n "$start_seconds" ] && SECONDS="$[$(cut -d . -f 1 /proc/uptime)-$start_seconds]" || SECONDS="unknown"
if ! package_installed jenkins jenkins-debian-glue; then
echo "While puppet reported a successful run, jenkins and/or jenkins-debian-glue aren't successfully installed. :(" >&2
echo "Please re-execute this script and if the problem persists please report this at" >&2
echo "https://github.com/mika/jenkins-debian-glue/issues" >&2
exit 1
fi

[ -n "$start_seconds" ] && SECONDS="$[$(sed -e 's/^\([0-9]*\).*/\1/' < /proc/uptime)-$start_seconds]" || SECONDS="unknown"
echo "jenkins-debian-glue deployment finished after ${SECONDS} seconds."
else
echo "Fatal error during puppet run. :(" >&2
exit 1
fi

echo "
NOTE: if you should notice failing Jenkins jobs this might be related to
incomplete Jenkins plugin dependencies (see
https://github.com/jenkinsci/puppet-jenkins/issues/64 +
https://github.com/jenkinsci/puppet-jenkins/issues/12 for details why we
can't easily automate that yet).

Usually this is related to the Git plugin. You can check whether the
Git plugin for Jenkins is installed by checking if the following URL
displays '<installed/>':

http://${IP}:8080/updateCenter/plugin/git/api/xml?xpath=plugin/installed

If it returns something like 'XPath plugin/installed didn't match' then
please install the plugin by visiting:

http://${IP}:8080/pluginManager/install?plugin.git.default

and then click on the 'Restart Jenkins' option there.

If the Git plugin is missing a dependency please report this at
https://github.com/mika/jenkins-debian-glue/issues

Enjoy your jenkins-debian-glue system!

echo "Now point your browser to http://${IP}:8080"
Now point your browser to http://${IP}:8080"

+ 100
- 31
puppet/jenkins_debian_glue.pp View File

@@ -6,10 +6,10 @@ define jenkins::plugin::install($version=0, $force=0) {
$plugin_dir = '/var/lib/jenkins/plugins'

if ($version != 0) {
$base_url = "http://updates.jenkins-ci.org/download/plugins/${name}/${version}/"
$base_url = "http://updates.jenkins.io/download/plugins/${name}/${version}/"
}
else {
$base_url = 'http://updates.jenkins-ci.org/latest/'
$base_url = 'http://updates.jenkins.io/latest/'
}

if (!defined(File[$plugin_dir])) {
@@ -22,7 +22,7 @@ define jenkins::plugin::install($version=0, $force=0) {

if ($force != 0) {
exec { "download-${name}" :
command => "touch $plugin_dir/${name}.jpi.pinned; wget --no-check-certificate -O $plugin_dir/${name}.jpi ${base_url}${plugin}",
command => "touch $plugin_dir/${name}.jpi.pinned; wget -O $plugin_dir/${name}.jpi ${base_url}${plugin}",
cwd => $plugin_dir,
require => File[$plugin_dir],
path => ['/usr/bin', '/usr/sbin',],
@@ -31,7 +31,7 @@ define jenkins::plugin::install($version=0, $force=0) {
}
} else {
exec { "download-${name}" :
command => "wget --no-check-certificate ${base_url}${plugin}",
command => "wget ${base_url}${plugin}",
cwd => $plugin_dir,
require => File[$plugin_dir],
path => ['/usr/bin', '/usr/sbin',],
@@ -43,20 +43,12 @@ define jenkins::plugin::install($version=0, $force=0) {

}

exec { 'apt-get_update':
refreshonly => true,
path => '/bin:/usr/bin',
command => 'apt-get update',
}

define apt::key($ensure = present, $source) {
case $ensure {
present: {
exec { "/usr/bin/wget -O - '$source' | /usr/bin/apt-key add -":
unless => "apt-key list | grep -Fqe '${name}'",
path => '/bin:/usr/bin',
before => Exec['apt-get_update'],
notify => Exec['apt-get_update'],
}
}

@@ -68,9 +60,9 @@ define apt::key($ensure = present, $source) {
}
}

if $ec2_public_ipv4 {
if defined('$ec2_public_ipv4') {
$jenkins_server = "$ec2_public_ipv4"
} elsif $ipaddress {
} elsif defined('$ipaddress') {
$jenkins_server = "$ipaddress"
} else {
$jenkins_server = "YOUR_JENKINS_SERVER"
@@ -78,26 +70,27 @@ if $ec2_public_ipv4 {

class jenkins::repos {

package { 'apt-transport-https':
ensure => present,
}

apt::key { 'D50582E6':
ensure => present,
source => 'http://pkg.jenkins-ci.org/debian-stable/jenkins-ci.org.key',
source => 'https://pkg.jenkins.io/debian-stable/jenkins.io.key',
}

file { '/etc/apt/sources.list.d/jenkins.list':
ensure => present,
notify => Exec['refresh-apt-jenkins'],
content => "deb http://pkg.jenkins-ci.org/debian-stable binary/\n",
require => Apt::Key['D50582E6'],
content => "deb https://pkg.jenkins.io/debian-stable binary/\n",
require => Package['apt-transport-https'],
}

exec { 'refresh-apt-jenkins':
refreshonly => true,
require => [
File['/etc/apt/sources.list.d/jenkins.list'],
Apt::Key['D50582E6'],
],
path => ['/usr/bin', '/usr/sbin'],
command => 'apt-get update',
command => '/usr/bin/apt-get update',
}

apt::key { '52D4A654':
@@ -107,19 +100,15 @@ class jenkins::repos {

file { '/etc/apt/sources.list.d/jenkins-debian-glue.list':
ensure => present,
notify => Exec['refresh-apt-jenkins-debian-glue'],
content => "deb http://jenkins.grml.org/debian jenkins-debian-glue main\n",
require => Apt::Key['52D4A654'],
}

exec { 'refresh-apt-jenkins-debian-glue':
refreshonly => true,
require => [
File['/etc/apt/sources.list.d/jenkins-debian-glue.list'],
Apt::Key['52D4A654'],
],
path => ['/usr/bin', '/usr/sbin'],
command => 'apt-get update';
command => '/usr/bin/apt-get update';
}
}

@@ -159,16 +148,57 @@ class jenkins::software {
require => Package['jenkins'],
}

jenkins::plugin::install { 'matrix-project':
require => Package['jenkins'],
}

jenkins::plugin::install { 'junit':
require => Package['jenkins'],
}

jenkins::plugin::install { 'script-security':
require => Package['jenkins'],
}

jenkins::plugin::install { 'workflow-scm-step':
require => Package['jenkins'],
}

jenkins::plugin::install { 'mailer':
require => Package['jenkins'],
}

jenkins::plugin::install { 'display-url-api':
require => Package['jenkins'],
}

# required for recent versions of git-client
jenkins::plugin::install { 'ssh-agent':
require => Package['jenkins'],
}

# required for recent versions of Jenkins Git client plugin
jenkins::plugin::install { 'apache-httpcomponents-client-4-api':
require => Package['jenkins'],
}

jenkins::plugin::install { 'jsch':
require => Package['jenkins'],
}

# required for recent versions of ssh-agent
jenkins::plugin::install { 'workflow-step-api':
require => Package['jenkins'],
}

jenkins::plugin::install { 'bouncycastle-api':
require => Package['jenkins'],
}

jenkins::plugin::install { 'structs':
require => Package['jenkins'],
}

jenkins::plugin::install { 'tap':
require => Package['jenkins'],
}
@@ -181,6 +211,45 @@ class jenkins::software {
require => Package['jenkins'],
}

# required for recent versions of ws-cleanup
jenkins::plugin::install { 'workflow-durable-task-step':
require => Package['jenkins'],
}

jenkins::plugin::install { 'resource-disposer':
require => Package['jenkins'],
}

# note: workflow-aggregator is a dependency of ws-cleanup and
# is the plugin ID for "Pipeline Plugin"
jenkins::plugin::install { 'workflow-aggregator':
require => Package['jenkins'],
}

jenkins::plugin::install { 'pipeline-input-step':
require => Package['jenkins'],
}
jenkins::plugin::install { 'workflow-job':
require => Package['jenkins'],
}
jenkins::plugin::install { 'workflow-basic-steps':
require => Package['jenkins'],
}
jenkins::plugin::install { 'workflow-api':
require => Package['jenkins'],
}
jenkins::plugin::install { 'workflow-support':
require => Package['jenkins'],
}
jenkins::plugin::install { 'durable-task':
require => Package['jenkins'],
}

# required for usage of HTML markup in user-submitted text
jenkins::plugin::install { 'antisamy-markup-formatter':
require => Package['jenkins'],
}

package { 'default-jre-headless':
ensure => present,
}
@@ -347,7 +416,7 @@ class jenkins::config {
</builders>
<publishers>
<hudson.tasks.ArtifactArchiver>
<artifacts>*.gz,*.bz2,*.xz,*.deb,*.dsc,*.git,*.changes,lintian.txt</artifacts>
<artifacts>*.gz,*.bz2,*.xz,*.deb,*.dsc,*.git,*.changes,*.buildinfo,lintian.txt</artifacts>
<latestOnly>false</latestOnly>
</hudson.tasks.ArtifactArchiver>
<hudson.tasks.Fingerprinter>
@@ -447,7 +516,7 @@ class jenkins::config {
</builders>
<publishers>
<hudson.tasks.ArtifactArchiver>
<artifacts>*.gz,*.bz2,*.xz,*.deb,*.dsc,*.git,*.changes,lintian.txt</artifacts>
<artifacts>*.gz,*.bz2,*.xz,*.deb,*.dsc,*.git,*.changes,*.buildinfo,lintian.txt</artifacts>
<latestOnly>false</latestOnly>
</hudson.tasks.ArtifactArchiver>
<hudson.tasks.Fingerprinter>
@@ -491,7 +560,7 @@ class jenkins::config {
ensure => present,
mode => '0644',
owner => 'jenkins',
require => File['/var/lib/jenkins/jobs/jenkins-debian-glue-piuparts'],
require => File['/var/lib/jenkins/jobs/jenkins-debian-glue-piuparts/'],
notify => Service['jenkins'],
content => "<?xml version='1.0' encoding='UTF-8'?>
<project>
@@ -582,7 +651,7 @@ sudo piuparts_wrapper \${PWD}/artifacts/*.deb || true</command>
<name>All</name>
<description>&lt;h1&gt;&lt;a href=&quot;http://jenkins-debian-glue.org/&quot;&gt;jenkins-debian-glue&lt;/a&gt; Continuous Integration labs&lt;/h1&gt;</description>
<filterQueue>false</filterQueue>
<properties class='hudson.model.View$PropertyList'/>
<properties class='hudson.model.View\$PropertyList'/>
</hudson.model.AllView>
</views>
<primaryView>All</primaryView>
@@ -625,7 +694,7 @@ sudo piuparts_wrapper \${PWD}/artifacts/*.deb || true</command>
<name>All</name>
<filterExecutors>false</filterExecutors>
<filterQueue>false</filterQueue>
<properties class='hudson.model.View$PropertyList'/>
<properties class='hudson.model.View\$PropertyList'/>
</hudson.model.AllView>
</views>
</hudson.model.MyViewsProperty>


+ 88
- 45
scripts/build-and-provide-package View File

@@ -15,14 +15,14 @@ PATH='/bin:/sbin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin'
export QEMU_RESERVED_VA=0x0

echo "*** Starting $0 at $(date) ***"
start_seconds=$(cut -d . -f 1 /proc/uptime)
start_seconds=$(sed -e 's/^\([0-9]*\).*/\1/' < /proc/uptime)

JENKINS_DEBIAN_GLUE_VERSION=$(dpkg --list jenkins-debian-glue 2>/dev/null | awk '/^ii/ {print $3}')
if [ -n "${JENKINS_DEBIAN_GLUE_VERSION:-}" ] ; then
echo "*** Running jenkins-debian-glue version $JENKINS_DEBIAN_GLUE_VERSION ***"
fi

HOST_ARCH="$(dpkg-architecture -qDEB_HOST_ARCH)"
HOST_ARCH="$(dpkg --print-architecture)"
if [ -n "${HOST_ARCH:-}" ] ; then
echo "*** Identified host architecture ${HOST_ARCH} ***"
fi
@@ -137,7 +137,7 @@ checks_and_defaults() {
FREIGHT_VARCACHE=${FREIGHT_BASE}/default
FREIGHT_CONF=${FREIGHT_BASE}/default.conf
else
# Default to /srv/freight unless specifed
# Default to /srv/freight unless specified
if [ -z "${FREIGHT_BASE:-}" ] ; then
FREIGHT_BASE=/srv/freight
fi
@@ -176,9 +176,11 @@ bailout() {
rm -f "$WORKSPACE"/binaries/*
fi

${SUDO_CMD:-} rm -rf /tmp/apt-$$
[ -n "${pbuilderrc:-}" ] && rm -rf "${pbuilderrc}"

[ -n "$start_seconds" ] && SECONDS="$[$(cut -d . -f 1 /proc/uptime)-$start_seconds]" || SECONDS="unknown"
[ -n "${tmpaptdir:-}" ] && ${SUDO_CMD:-} rm -rf "${tmpaptdir}"

[ -n "$start_seconds" ] && SECONDS="$[$(sed -e 's/^\([0-9]*\).*/\1/' < /proc/uptime)-$start_seconds]" || SECONDS="unknown"
echo "*** Finished execution of $0 at $(date) [running ${SECONDS} seconds] ***"

exit $EXIT
@@ -293,7 +295,7 @@ dist_and_arch_settings() {

cowbuilder_init() {

local pbuilderrc=$(mktemp)
pbuilderrc=$(mktemp)
echo "# pbuilder config file generated by jenkins-debian-glue on $(date)" > "$pbuilderrc"

# allow pbuilder networking
@@ -445,8 +447,6 @@ cowbuilder_init() {
}

rm -f "${update_lockfile_pid}" "${update_lockfile}"

[ -n "${pbuilderrc:-}" ] && rm -f "$pbuilderrc"
}


@@ -475,6 +475,9 @@ identify_build_type() {

SKIP_ARCH_BUILD=false
echo "*** Setting SKIP_ARCH_BUILD=$SKIP_ARCH_BUILD to skip further arch builds. ***"

SKIP_SOURCE_REMOVAL=true
echo "*** Setting SKIP_SOURCE_REMOVAL=$SKIP_SOURCE_REMOVAL to skip source removal in binary only build ***"
return 0
fi

@@ -498,6 +501,9 @@ identify_build_type() {
echo "*** Host architecture [${HOST_ARCH}] does not match \$architecture [${architecture:-}] ... ***"
echo "*** ... setting binary only build and continuing with identify_build_type ***"
DEBBUILDOPTS="-B"

SKIP_SOURCE_REMOVAL=true
echo "*** Setting SKIP_SOURCE_REMOVAL=$SKIP_SOURCE_REMOVAL to skip source removal in binary only build ***"
fi
else
if [ "${MAIN_ARCHITECTURE:-}" = "${architecture:-}" ] ;then
@@ -507,6 +513,9 @@ identify_build_type() {
else
echo "*** MAIN_ARCHITECTURE [${MAIN_ARCHITECTURE:-}] does not match \$architecture [${architecture:-}], setting binary only build and continuing with identify_build_type ***"
DEBBUILDOPTS="-B"

SKIP_SOURCE_REMOVAL=true
echo "*** Setting SKIP_SOURCE_REMOVAL=$SKIP_SOURCE_REMOVAL to skip source removal in binary only build ***"
fi
fi

@@ -524,6 +533,9 @@ identify_build_type() {
echo "*** Package provides arch 'all' + 'any', enabling -B buildoption for this architecture. ***"
# -B -> binary-only build, limited to architecture dependent packages
DEBBUILDOPTS="-B"

SKIP_SOURCE_REMOVAL=true
echo "*** Setting SKIP_SOURCE_REMOVAL=$SKIP_SOURCE_REMOVAL to skip source removal in binary only build ***"
break
else
# only "Architecture: all", so no arch specific packages since
@@ -570,9 +582,21 @@ autopkg_run() {
if [ -n "${ADT_OPTIONS:-}" ] ; then
echo "*** Using provided ADT_OPTIONS $ADT_OPTIONS ***"
else
if [ -x "$(which autopkgtest)" ] ; then
# starting with autopkgtest 5.0 there's only the dedicated autopkgtest CLI
local autopkg_binary=autopkgtest
elif [ -x "$(which adt-run)" ] ; then
# autopkgtest as in Debian/jessie (v3.6jessie1) and older doesn't provide
# autopkgtest binary yet, but let's be backwards compatible
local autopkg_binary=adt-run
else
echo "Error: neither autopkgtest nor adt-run binary found." >&2
exit 1
fi

# since autopkgtest 3.16 the --tmp-dir option is gone, make sure
# we've --output-dir available though before using it
if adt-run --help | grep -q -- --output-dir 2>/dev/null ; then
if "$autopkg_binary" --help | grep -q -- --output-dir 2>/dev/null ; then
local adt_output_option='--output-dir'
else
local adt_output_option='--tmp-dir'
@@ -585,8 +609,8 @@ autopkg_run() {
fi

changes_file="${WORKSPACE}/"*"_${newest_version}_${arch}.changes"
echo "*** Executing 'adt-run --changes $changes_file ${ADT_OPTIONS:-} --- $ADT_RUNNER' ***"
adt-run --changes $changes_file ${ADT_OPTIONS:-} --- $ADT_RUNNER || bailout $?
echo "*** Executing '$autopkg_binary --changes $changes_file ${ADT_OPTIONS:-} --- $ADT_RUNNER' ***"
$autopkg_binary --changes $changes_file ${ADT_OPTIONS:-} --- $ADT_RUNNER || bailout $?
}

use_ccache() {
@@ -599,6 +623,8 @@ use_ccache() {
enable_eatmydata() {
echo 'EXTRAPACKAGES="$EXTRAPACKAGES eatmydata"' >> "$pbuilderrc"
echo 'export LD_PRELOAD="${LD_PRELOAD:+$LD_PRELOAD:}libeatmydata.so"' >> "$pbuilderrc"
echo '# builtin support available with pbuilder >=0.225 (otherwise ignored):' >> "$pbuilderrc"
echo 'EATMYDATA=yes' >> "$pbuilderrc"
}

use_eatmydata() {
@@ -651,9 +677,10 @@ autopkgtest_results() {

cowbuilder_run() {
echo "*** cowbuilder build phase for arch $architecture ***"
mkdir -p "$WORKSPACE"/binaries/ /tmp/apt-$$
tmpaptdir=$(mktemp -d /tmp/apt-jdg_XXXXXX)
mkdir -p "$WORKSPACE"/binaries/ "${tmpaptdir}"

local BINDMOUNTS="/tmp/apt-$$ ${USER_BINDMOUNTS:-}"
local BINDMOUNTS="${tmpaptdir} ${USER_BINDMOUNTS:-}"

# make sure we build arch specific packages only when necessary
identify_build_type
@@ -685,19 +712,19 @@ cowbuilder_run() {
# available in Squeeze.
local trusted="[trusted=yes]"
fi
cat > /tmp/apt-$$/release.list <<EOF
cat > "${tmpaptdir}"/release.list <<EOF
deb ${trusted} file://${REPOSITORY} ${release} ${components}
EOF
fi

if [ -n "${REPOSITORY_KEYRING:-}" ]; then
cp -a "${REPOSITORY_KEYRING}" /tmp/apt-$$/keyring.gpg
cp -a "${REPOSITORY_KEYRING}" "${tmpaptdir}"/keyring.gpg
fi
fi

# Adding extra repository for resolving dependencies
if [ -n "${REPOSITORY_EXTRA:-}" ]; then
echo ${REPOSITORY_EXTRA} | tr ',' '\n' > /tmp/apt-$$/extra.list
echo ${REPOSITORY_EXTRA} | tr ',' '\n' > "${tmpaptdir}"/extra.list
fi

if [ -n "${REPOSITORY_EXTRA_KEYS:-}" ]; then
@@ -705,13 +732,12 @@ EOF
IFS=',' read -a array <<< "${REPOSITORY_EXTRA_KEYS}"
for key in "${array[@]}" ; do
curl -O "${key}"
gpg --no-default-keyring --keyring /tmp/apt-$$/keyring.gpg --import "${key##*/}"
gpg --no-default-keyring --keyring "${tmpaptdir}"/keyring.gpg --import "${key##*/}"
done
unset key
IFS="$OIFS"
fi

local pbuilderrc=$(mktemp)
echo "# pbuilder config file generated by jenkins-debian-glue on $(date)" > "$pbuilderrc"

# allow pbuilder networking
@@ -787,7 +813,6 @@ EOF
esac

rm -f "${build_lockfile}"
[ -n "${pbuilderrc:-}" ] && rm -f "$pbuilderrc"
}

# replacement for dcmd, sadly available only in the devscripts package
@@ -816,8 +841,12 @@ remove_packages() {
return 0
fi

echo "*** Removing source package version from repository ***"
${SUDO_CMD:-} ${REPREPRO_CMD} -A source -b "${REPOSITORY}" ${REPREPRO_OPTS} remove "${REPOS}" "${SOURCE_PACKAGE}"
if [ -n "${SKIP_SOURCE_REMOVAL:-}" ] ; then
echo "*** Skipping removal of existing source package as requested via SKIP_SOURCE_REMOVAL ***"
else
echo "*** Removing source package version from repository ***"
${SUDO_CMD:-} ${REPREPRO_CMD} -A source -b "${REPOSITORY}" ${REPREPRO_OPTS} remove "${REPOS}" "${SOURCE_PACKAGE}"
fi

echo "*** Removing previous binary package versions from repository ***"
for p in $(list_deb_files "${WORKSPACE}/binaries/"*"_${newest_version}_${arch}.changes") ; do
@@ -838,7 +867,7 @@ remove_packages() {

if $skip ; then
echo "*** Package '$binpackage' listed in SKIP_PACKAGE_FROM_REMOVAL - skipping removal therefore ***"
elif echo "$file" | egrep -q '_all.deb$'; then
elif echo "$file" | egrep -q '_all.u?deb$'; then
# note: "removesrc" would remove foreign arch files (of different builds)
echo "*** Removing existing package ${binpackage} from repository ${REPOS} (arch all) ***"
${SUDO_CMD:-} ${REPREPRO_CMD} -b "${REPOSITORY}" ${REPREPRO_OPTS} remove "${REPOS}" "${binpackage}"
@@ -901,7 +930,19 @@ remove_missing_binary_packages() {
fi
}

get_arch_changes() {
case ${architecture} in
all) echo '*';; # support as file expansion in reprepro cmdline
*) echo "${architecture}";;
esac
}

reprepro_wrapper() {
if [ -n "${SKIP_REPREPRO_WRAPPER:-}" ] ; then
echo "*** Skipping reprepro_wrapper as requested via SKIP_REPREPRO_WRAPPER ***"
return
fi

if ! [ -d "$REPOSITORY" ] ; then
bailout 1 "Error: repository ${REPOSITORY} does not exist."
fi
@@ -911,49 +952,35 @@ reprepro_wrapper() {
remove_packages
remove_missing_binary_packages

archall=false
case $architecture in
all) archall=true
architecture='*' # support as file expansion in reprepro cmdline
;;
esac

echo "*** Including packages in repository $REPOS ***"
${SUDO_CMD:-} ${REPREPRO_CMD} -b "${REPOSITORY}" ${REPREPRO_OPTS} \
--ignore=wrongdistribution --ignore=uploaders --ignore=surprisingbinary \
include "${REPOS}" "${WORKSPACE}/binaries/"*"_${newest_version}"_${architecture}.changes
include "${REPOS}" "${WORKSPACE}/binaries/"*"_${newest_version}_$(get_arch_changes).changes"
[ $? -eq 0 ] || bailout 1 "Error: Failed to include binary package in $REPOS repository."
}

dput_wrapper() {
command -v dput || bailout 1 "Error: dput not found."

archall=false
case $architecture in
all)
archall=true
architecture='*' # support as file expansion in cmdline
;;
esac

echo "*** Including packages in repository $REPOS ***"
${SUDO_CMD:-} dput -U -u "${DPUT_HOST:-}" "${WORKSPACE}/binaries/"*"_${newest_version}"_${architecture}.changes
${SUDO_CMD:-} dput -U -u "${DPUT_HOST:-}" "${WORKSPACE}/binaries/"*"_${newest_version}_$(get_arch_changes).changes"
[ $? -eq 0 ] || bailout 1 "Error: Failed to upload binary package to $DPUT_HOST dput host."
}

freight_ensure_repo() {
echo "*** Creating freight directory structure ***"
${SUDO_CMD:-} mkdir -p "${FREIGHT_VARCACHE}" "${FREIGHT_VARLIB}"
local varlib
local varcache

if [ ! -f "$FREIGHT_CONF" ] ; then
echo "*** Creating freight repository configuration in $FREIGHT_CONF ***"

${SUDO_CMD:-} mkdir -p "$(dirname ${FREIGHT_CONF})"
${SUDO_CMD:-} sh -c "cat > ${FREIGHT_CONF}" <<EOF
# Generated by jenkins-debian-glue
#
# Directories for the Freight library and Freight cache.
# Your web server's document root should point to \$VARCACHE.
VARLIB="${FREIGHT_VARLIB:-/var/lib/freigh}"
VARLIB="${FREIGHT_VARLIB:-/var/lib/freight}"
VARCACHE="${FREIGHT_VARCACHE:-/var/cache/freight}"

# Default 'Origin' and 'Label' fields for 'Release' files.
@@ -974,6 +1001,12 @@ EOF
fi

[ -f "$FREIGHT_CONF" ] || bailout 1 "Error: Failed to create freight configuration in $FREIGHT_CONF"

echo "*** Creating freight directory structure ***"
varlib=$(grep ^VARLIB "$FREIGHT_CONF" | cut -f 2 -d = | sed -e 's,",,g')
varcache=$(grep ^VARCACHE "$FREIGHT_CONF" | cut -f 2 -d = | sed -e 's,",,g')
${SUDO_CMD:-} mkdir -p "${varcache}" "${varlib}"
${SUDO_CMD:-} chmod o-rwx "${varlib}"
}

freight_wrapper() {
@@ -1000,8 +1033,17 @@ trunk_release() {

${SUDO_CMD:-} generate-reprepro-codename "$TRUNK_RELEASE"

${SUDO_CMD:-} ${REPREPRO_CMD} -b "${REPOSITORY}" ${REPREPRO_OPTS} --ignore=wrongdistribution copymatched "$TRUNK_RELEASE" "$REPOS" '*'
[ $? -eq 0 ] || bailout 1 "Error: Failed to copy packages from ${REPOS} to ${TRUNK_RELEASE}."

if [ -n "${SKIP_REPREPRO_WRAPPER:-}" ] ; then
${SUDO_CMD:-} ${REPREPRO_CMD} -b "${REPOSITORY}" ${REPREPRO_OPTS} \
--ignore=wrongdistribution --ignore=uploaders --ignore=surprisingbinary \
include "${TRUNK_RELEASE}" "${WORKSPACE}/binaries/"*"_${newest_version}_$(get_arch_changes).changes"
[ $? -eq 0 ] || bailout 1 "Error: Failed to include binary package in ${TRUNK_RELEASE} repository."
else
${SUDO_CMD:-} ${REPREPRO_CMD} -b "${REPOSITORY}" ${REPREPRO_OPTS} \
--ignore=wrongdistribution copymatched "$TRUNK_RELEASE" "$REPOS" '*'
[ $? -eq 0 ] || bailout 1 "Error: Failed to copy packages from ${REPOS} to ${TRUNK_RELEASE}."
fi
fi
}

@@ -1079,6 +1121,7 @@ TempDir: tmp
LogDir: log
MorgueDir: ${REPOSITORY}/morgue
Default: ${RELEASE_DISTRIBUTION}
Permit: unused_files
Cleanup: unused_files on_deny on_error

EOF
@@ -1147,7 +1190,7 @@ binaries_to_workspace() {
}

# main execution
trap bailout SIGHUP SIGINT SIGQUIT SIGABRT SIGKILL SIGALRM SIGTERM
trap bailout SIGHUP SIGINT SIGQUIT SIGABRT SIGALRM SIGTERM

checks_and_defaults
clean_workspace


+ 34
- 4
scripts/generate-git-snapshot View File

@@ -210,7 +210,7 @@ git_dch_auto() {
dch -b --distribution=UNRELEASED --newversion=$VERSION_STRING -- \
"SNAPSHOT autobuild for unreleased $ORIG_VERSION via jenkins-debian-glue."
else
${GBP_DCH} --auto $DCH_COMBINED_OPTS
${GBP_DCH} --auto $DCH_COMBINED_OPTS ${DCH_CHANGELOG_FILE:-}
fi
}

@@ -380,7 +380,7 @@ git_source_options() {
GIT_DEPTH=50
fi
local file
local value
local value
local opt_depth
local opt_ref
file="debian/source/options"
@@ -400,6 +400,31 @@ git_source_options() {
DBP_EXTRA_OPTS="${DBP_EXTRA_OPTS:-} --source-option=--git-depth=$GIT_DEPTH"
}

identify_source_build_opts() {
# unset by default
DBP_OPTS=""

if [ -r "debian/source/format" ] && ! grep -q '^1\.0' debian/source/format ; then
echo "*** Found dpkg source format != 1.0, nothing to do ****"
return 0
fi

if [ -r "debian/source/options" ] ; then
if ! grep -q '^[[:space:]]*tar-ignore' "debian/source/options" ; then
echo "*** Enabling '-I' option as tar-ignore option not present in debian/source/options ***"
DBP_OPTS+=" -I"
fi

# note: we shouldn't match on 'extend-diff-ignore'
if ! grep -q '^[[:space:]]*diff-ignore' "debian/source/options" ; then
echo "*** Enabling '-i' option as diff-ignore option not present in debian/source/options ***"
DBP_OPTS+=" -i"
fi
else
echo "*** Enabling '-i -I' options as building for dpkg source format 1.0 ***"
DBP_OPTS="-i -I"
fi
}

source_format_opts() {
if ! [ -f "debian/source/format" ] ; then
@@ -450,6 +475,7 @@ cd "$SOURCE_DIRECTORY"

git_cleanup
source_format_opts
identify_source_build_opts

# Only if we are using git-buildpackage...
if [ "${IGNORE_GIT_BUILDPACKAGE:-}" != "true" ] ; then
@@ -492,7 +518,7 @@ quilt_cleanup

# build source package, run before switching back to previous branch
# to get the actual requested version
dpkg-buildpackage -uc -us -nc -d -S -i -I ${DBP_EXTRA_OPTS:-}
dpkg-buildpackage -uc -us -nc -d -S ${DBP_OPTS:-} ${DBP_EXTRA_OPTS:-}

if [ -n "${KEY_ID:-}" ] ; then
echo "*** Found environment variable KEY_ID, set to ${KEY_ID:-}, signing source package ***"
@@ -517,7 +543,11 @@ fi
# revert to original debian/changelog to avoid merge conflicts
git checkout -- $(readlink -f debian/changelog)

git checkout -f ${GIT_BRANCH} # switch back to previous "branch" before removing the tmp branch
# switch back to previous "branch" before removing the tmp branch
if ! git checkout -f "${GIT_BRANCH}"; then
# we were probably detached
git checkout -f "${GIT_COMMIT}"
fi
git branch -D "$random_branch"

# vim:foldmethod=marker ts=2 ft=sh ai expandtab sw=2

+ 2
- 1
scripts/generate-svn-snapshot View File

@@ -173,7 +173,8 @@ esac

cd $ORIG_DIR

debian_only="$(svn propget mergeWithUpstream source/${branch:-}/debian)"
# subversion >=1.9 fails hard, see github issue #164
debian_only="$(svn propget mergeWithUpstream source/${branch:-}/debian || true)"

if [ -n "${SBP_OPTS:-}" ] ; then
echo "*** Found environment variable SBP_OPTS, set to ${SBP_OPTS} ***"


+ 7
- 2
scripts/jdg-debc View File

@@ -13,12 +13,17 @@ fi

CHANGES=$(find . -maxdepth 1 -name \*.changes ! -name \*_source.changes)

HOST_ARCH="$(dpkg-architecture -qDEB_HOST_ARCH)"
if [ -n "${HOST_ARCH}" ] && [ -n "${architecture}" ] && [ "${architecture}" != "${HOST_ARCH}" ] ; then
arch="-a ${architecture}"
fi

if [ -n "$CHANGES" ] >/dev/null 2>&1 ; then
for file in $CHANGES ; do
debc "$file"
debc ${arch} "$file"
done
elif ls ./*.deb >/dev/null 2>&1 ; then
debc ./*.deb
debc ${arch} ./*.deb
else
echo "No changes and deb files found in $(pwd), ignoring."
fi

+ 1
- 1
scripts/piuparts_wrapper View File

@@ -20,7 +20,7 @@ if [ -z "${distribution:-}" ] ; then
fi

if [ -z "${architecture:-}" ] ; then
architecture=$(dpkg-architecture -qDEB_HOST_ARCH)
architecture=$(dpkg --print-architecture)
echo "*** architecture variable is unset, using system architecture [$architecture] ***"
fi



+ 1
- 1
scripts/repository_checker View File

@@ -175,7 +175,7 @@ validate-source-bin-versions() {
}


trap bailout SIGHUP SIGINT SIGQUIT SIGABRT SIGKILL SIGALRM SIGTERM
trap bailout SIGHUP SIGINT SIGQUIT SIGABRT SIGALRM SIGTERM

# command line handling
CMDLINE_OPTS=list-package:,list-binary-package:,list-binary-repos:,list-repos:,list-source-package:,list-source-repos:,repository:,,help,validate-incoming,validate-source-bin-versions,version,version-remove-epoch,validate-skip-package:


+ 1
- 1
tap/checkbashism_tap View File

@@ -18,7 +18,7 @@ if not File.exists? file
end

# Make sure we're looking at sh code.
mimetype = `file -b -i --keep-going #{file}`.gsub(/\n/,"")
mimetype = `file -b -i #{file}`.gsub(/\n/,"")
if not /.*x-shellscript/i.match(mimetype)
$stderr.puts "File #{file} doesn't look like sh code [#{mimetype}]. Ignoring."
exit 0


+ 1
- 1
tap/pep8_tap View File

@@ -27,7 +27,7 @@ if not File.exists? file
end

# Make sure we're looking at Python code.
mimetype = `file -b -i --keep-going #{file}`.gsub(/\n/,"")
mimetype = `file -b -i #{file}`.gsub(/\n/,"")
if not /.*x-python/i.match(mimetype)
$stderr.puts "File #{file} doesn't look like Python [#{mimetype}]. Ignoring."
exit 0


+ 1
- 1
tap/perlcritic_tap View File

@@ -19,7 +19,7 @@ end
file = ARGV[0]

# make sure we're checking a perl script
mimetype = `file -b --keep-going #{file}`.gsub(/\n/,"")
mimetype = `file -b #{file}`.gsub(/\n/,"")
if not /.*perl/i.match(mimetype)
$stderr.puts "File #{file} doesn't look like perl [#{mimetype}]. Ignoring."
exit 0


+ 2
- 2
tap/piuparts_tap View File

@@ -66,8 +66,8 @@ output.gsub(/:\n/, ':').each_line do |critic|
cmd = /(.*)? (DEBUG: Command failed \(status=1\), but ignoring error:) (.*)?/.match(critic)[3]
puts "ok #{counter} #{cmd} # skip Ignoring failed command"
counter += 1
elsif critic =~ /.*ERROR: Command failed \(status=100\):.*/
cmd = /(.*)? (ERROR: Command failed \(status=100\):) (.*)?/.match(critic)[3]
elsif critic =~ /.*ERROR: Command failed \(status=\d+\):.*/
cmd = /(.*)? (ERROR: Command failed \(status=\d+\):) (.*)?/.match(critic)[3]
puts "not ok #{counter} #{cmd}"
counter += 1
elsif critic =~ /.*ERROR: Installation of .* failed/


+ 1
- 1
tap/shellcheck_tap View File

@@ -18,7 +18,7 @@ if not File.exists? file
end

# Make sure we're looking at sh code.
mimetype = `file -b -i --keep-going #{file}`.gsub(/\n/,"")
mimetype = `file -b -i #{file}`.gsub(/\n/,"")
if not /.*x-shellscript/i.match(mimetype)
$stderr.puts "File #{file} doesn't look like sh code [#{mimetype}]. Ignoring."
exit 0


Loading…
Cancel
Save