diff -Nru jenkins-debian-glue-0.20.0/debian/changelog jenkins-debian-glue-0.20.1/debian/changelog --- jenkins-debian-glue-0.20.0/debian/changelog 2019-01-15 16:49:39.000000000 +0000 +++ jenkins-debian-glue-0.20.1/debian/changelog 2019-11-19 14:29:47.000000000 +0000 @@ -1,3 +1,43 @@ +jenkins-debian-glue (0.20.1) unstable; urgency=medium + + [ Michael Prokop ] + * [ebb7c31] remove-reprepro-codename: also get rid of package indices + files + * [629746a] perlcritic_tap: properly fail if provided file can't be read + * [aa23145] puppet: ensure puppet/facter from and on Debian works + * [d6c58cf] puppet: fix broken user setup with recent Jenkins versions + * [c79eb15] build-and-provide-package: set ADDITIONAL_BUILDRESULTS also + in custom pbuilderrc + * [75988c6] Bump Standards-Version to 4.4.0 + * [ee404c2] build-and-provide-package: ensure to set + ADDITIONAL_BUILDRESULTS from within cowbuilder_run + * [31b9054] pbuilder-hookdir/B90lintian: support execution on source + files + improve error handling + * [a32ac40] puppet: ensure gnupg is present + * [cc328ce] puppet: depend on Trilead API plugin to get working git- + client plugin + + [ Kienan Stewart ] + * [b02b435] Remove usage of SUDO_CMD from generate-reprepro-codename + + [ Victor Seva ] + * [ebdff00] piuparts_wrapper: enable --mirror parameter + + [ Guillem Jover ] + * [18671c6] debian: Namespace debhelper fragment file + * [8d9de8a] Bump Standards-Version to 4.3.0 + + [ Cyril Brulebois ] + * [3eee9ba] puppet: fix variables_not_enclosed puppet style warnings + * [a7ca923] puppet: fix double_quoted_strings puppet style warnings + * [06584f4] puppet: fix arrow_alignment puppet style warnings + * [0203f6b] puppet: document wget dependency + * [272709b] puppet: factorize all jenkins::plugin::install's require + attribute + * [ff08c1f] puppet: force bouncycastle-api and junit plugins + + -- Michael Prokop Tue, 19 Nov 2019 15:29:47 +0100 + jenkins-debian-glue (0.20.0) unstable; urgency=medium [ Victor Seva ] diff -Nru jenkins-debian-glue-0.20.0/debian/control jenkins-debian-glue-0.20.1/debian/control --- jenkins-debian-glue-0.20.0/debian/control 2018-11-06 10:07:04.000000000 +0000 +++ jenkins-debian-glue-0.20.1/debian/control 2019-07-16 15:41:30.000000000 +0000 @@ -2,7 +2,7 @@ Section: admin Priority: optional Maintainer: Michael Prokop -Standards-Version: 4.2.1 +Standards-Version: 4.4.0 Homepage: https://github.com/mika/jenkins-debian-glue Vcs-Git: https://github.com/mika/jenkins-debian-glue.git Vcs-Browser: https://github.com/mika/jenkins-debian-glue diff -Nru jenkins-debian-glue-0.20.0/debian/docs jenkins-debian-glue-0.20.1/debian/docs --- jenkins-debian-glue-0.20.0/debian/docs 2018-03-21 13:17:01.000000000 +0000 +++ jenkins-debian-glue-0.20.1/debian/docs 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -README.md diff -Nru jenkins-debian-glue-0.20.0/debian/jenkins-debian-glue.docs jenkins-debian-glue-0.20.1/debian/jenkins-debian-glue.docs --- jenkins-debian-glue-0.20.0/debian/jenkins-debian-glue.docs 1970-01-01 00:00:00.000000000 +0000 +++ jenkins-debian-glue-0.20.1/debian/jenkins-debian-glue.docs 2019-07-16 15:19:52.000000000 +0000 @@ -0,0 +1 @@ +README.md diff -Nru jenkins-debian-glue-0.20.0/pbuilder-hookdir/B90lintian jenkins-debian-glue-0.20.1/pbuilder-hookdir/B90lintian --- jenkins-debian-glue-0.20.0/pbuilder-hookdir/B90lintian 2019-01-15 15:39:57.000000000 +0000 +++ jenkins-debian-glue-0.20.1/pbuilder-hookdir/B90lintian 2019-07-16 17:51:28.000000000 +0000 @@ -26,17 +26,26 @@ # Requires a .pbuilderrc with: # export ADDITIONAL_BUILDRESULTS=(../*.lintian.txt) lintian_out=${BUILDDIR}/${PACKAGE_NAME}.lintian.txt -su -c "lintian ${LINTIAN_OPTIONS:-} \"${BUILDDIR}\"/*.changes 2>&1 | tee \"${lintian_out}\"" - pbuilder \ - || EXIT=$? + +DSC_EXIT=0 +if ls "${BUILDDIR}"/*.dsc &>/dev/null ; then + su -s /bin/bash -c "set -o pipefail; lintian ${LINTIAN_OPTIONS:-} \"${BUILDDIR}\"/*.dsc 2>&1 | tee \"${lintian_out}\"" - pbuilder \ + || DSC_EXIT=$? +else + echo "WARNING: no dsc file, not executing lintian on source package files" +fi + +CHANGES_EXIT=0 +su -s /bin/bash -c "set -o pipefail; lintian ${LINTIAN_OPTIONS:-} \"${BUILDDIR}\"/*.changes 2>&1 | tee -a \"${lintian_out}\"" - pbuilder \ + || CHANGES_EXIT=$? + # We strip ANSI sequences in case lintian got --color forced sed -i 's%\x1B\[[0-9;]*\?[mGKH]%%g' "${lintian_out}" -case ${EXIT:-0} in - 2) - echo "lintian run-time error." - exit 2 - ;; - 1|*) - exit 0 - ;; -esac +if [[ "${DSC_EXIT:-0}" =~ [01] ]] && [[ "${CHANGES_EXIT:-0}" =~ [01] ]] ; then + echo "Finished lintian execution [DSC_EXIT=${DSC_EXIT} CHANGES_EXIT=${CHANGES_EXIT}]" + exit 0 +else + echo "Error: lintian execution failed [DSC_EXIT=${DSC_EXIT} CHANGES_EXIT=${CHANGES_EXIT}]" >&2 + exit 2 +fi diff -Nru jenkins-debian-glue-0.20.0/puppet/jenkins_debian_glue.pp jenkins-debian-glue-0.20.1/puppet/jenkins_debian_glue.pp --- jenkins-debian-glue-0.20.0/puppet/jenkins_debian_glue.pp 2019-01-15 16:38:15.000000000 +0000 +++ jenkins-debian-glue-0.20.1/puppet/jenkins_debian_glue.pp 2019-11-19 14:16:27.000000000 +0000 @@ -22,9 +22,9 @@ if ($force != 0) { exec { "download-${name}" : - command => "touch $plugin_dir/${name}.jpi.pinned; wget -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], + require => [File[$plugin_dir], Package['wget']], path => ['/usr/bin', '/usr/sbin',], user => 'jenkins', notify => Service['jenkins'], @@ -33,7 +33,7 @@ exec { "download-${name}" : command => "wget ${base_url}${plugin}", cwd => $plugin_dir, - require => File[$plugin_dir], + require => [File[$plugin_dir], Package['wget']], path => ['/usr/bin', '/usr/sbin',], user => 'jenkins', unless => "test -f ${plugin_dir}/${plugin}", @@ -46,9 +46,10 @@ 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', + exec { "/usr/bin/wget -O - '${source}' | /usr/bin/apt-key add -": + unless => "apt-key list | grep -Fqe '${name}'", + path => '/bin:/usr/bin', + require => Package['wget'], } } @@ -61,11 +62,11 @@ } if defined('$ec2_public_ipv4') { - $jenkins_server = "$ec2_public_ipv4" + $jenkins_server = $ec2_public_ipv4 } elsif defined('$ipaddress') { - $jenkins_server = "$ipaddress" + $jenkins_server = $ipaddress } else { - $jenkins_server = "YOUR_JENKINS_SERVER" + $jenkins_server = 'YOUR_JENKINS_SERVER' } class jenkins::repos { @@ -74,6 +75,14 @@ ensure => present, } + package { 'gnupg': + ensure => present, + } + + package { 'wget': + ensure => present, + } + apt::key { 'D50582E6': ensure => present, source => 'https://pkg.jenkins.io/debian-stable/jenkins.io.key', @@ -89,11 +98,11 @@ } exec { 'refresh-apt-jenkins': - require => [ + require => [ File['/etc/apt/sources.list.d/jenkins.list'], Apt::Key['D50582E6'], ], - command => '/usr/bin/apt-get update', + command => '/usr/bin/apt-get update', } apt::key { '52D4A654': @@ -110,157 +119,137 @@ } exec { 'refresh-apt-jenkins-debian-glue': - require => [ + require => [ File['/etc/apt/sources.list.d/jenkins-debian-glue.list'], Apt::Key['52D4A654'], ], - command => '/usr/bin/apt-get update'; + command => '/usr/bin/apt-get update'; } } class jenkins::software { - jenkins::plugin::install { 'copyartifact': + # Make all jenkins::plugin::install items require Package['jenkins']: + Jenkins::Plugin::Install { require => Package['jenkins'], } + jenkins::plugin::install { 'copyartifact': + } + # required for recent versions of ssh-agent jenkins::plugin::install { 'credentials': force => '1', # see https://issues.jenkins-ci.org/browse/JENKINS-19927 - require => Package['jenkins'], } # required for recent versions of credentials jenkins::plugin::install { 'icon-shim': - require => Package['jenkins'], } # required for recent versions of credentials jenkins::plugin::install { 'ssh-credentials': - require => Package['jenkins'], } jenkins::plugin::install { 'git-client': - require => Package['jenkins'], } jenkins::plugin::install { 'git': - require => Package['jenkins'], } # required for recent versions of git jenkins::plugin::install { 'scm-api': - require => Package['jenkins'], } jenkins::plugin::install { 'matrix-project': - require => Package['jenkins'], } jenkins::plugin::install { 'junit': - require => Package['jenkins'], + force => '1', # needed since 2.176.2, see https://issues.jenkins-ci.org/browse/JENKINS-57528 } 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'], + } + + jenkins::plugin::install { 'trilead-api': } # required for recent versions of ssh-agent jenkins::plugin::install { 'workflow-step-api': - require => Package['jenkins'], } jenkins::plugin::install { 'bouncycastle-api': - require => Package['jenkins'], + force => '1', # needed since 2.176.2, see https://issues.jenkins-ci.org/browse/JENKINS-57528 } jenkins::plugin::install { 'structs': - require => Package['jenkins'], } jenkins::plugin::install { 'tap': - require => Package['jenkins'], } jenkins::plugin::install { 'timestamper': - require => Package['jenkins'], } jenkins::plugin::install { 'ws-cleanup': - 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'], } - if $facts['os']['distro']['codename'] == 'bionic' { - notify {"Using openjdk-8-jdk-headless for Ubuntu 18.01, as Jenkins stable does not support openjdk-11 yet.":} - $java_package = "openjdk-8-jdk-headless" - } else { - $java_package = 'default-jre-headless' + $java_package = $facts['os']['name'] ? { + 'Ubuntu' => $facts['os']['distro']['codename'] ? { + # Using openjdk-8 for Ubuntu 18.01, as Jenkins stable does not support openjdk-11 yet. + 'bionic' => 'openjdk-8-jre-headless', + default => 'default-jre-headless', + }, + default => 'default-jre-headless', } package { $java_package: @@ -281,7 +270,7 @@ File['/etc/apt/sources.list.d/jenkins.list'], File['/etc/sudoers.d/jenkins'], Exec['refresh-apt-jenkins'], - Package["$java_package"], + Package[$java_package], ] } @@ -296,7 +285,10 @@ service { 'jenkins': ensure => running, - require => Package['jenkins'], + require => [ + Package['jenkins'], + File['/var/lib/jenkins/users/users.xml'], + ] } package { 'sudo': @@ -501,7 +493,7 @@ architecture - $::architecture + ${::architecture} @@ -586,7 +578,7 @@ architecture - $::architecture + ${::architecture} @@ -688,12 +680,12 @@ # SEED_TO_BE_ADJUSTED and PASSWORD_HASH will be adjusted by jenkins-debian-glue's apply.sh script file { '/var/lib/jenkins/users/jenkins-debian-glue/config.xml': - ensure => present, - mode => '0644', - owner => 'jenkins', - require => File['/var/lib/jenkins/users/jenkins-debian-glue/'], - notify => Service['jenkins'], - content => " + ensure => present, + mode => '0644', + owner => 'jenkins', + require => File['/var/lib/jenkins/users/jenkins-debian-glue/'], + notify => Service['jenkins'], + content => " Jenkins Debian Glue @@ -724,6 +716,25 @@ " } + + file { '/var/lib/jenkins/users/users.xml': + ensure => present, + mode => '0644', + owner => 'jenkins', + require => File['/var/lib/jenkins/users/'], + notify => Service['jenkins'], + content => " + + 1 + + + jenkins-debian-glue + jenkins-debian-glue + + + +" + } } ## software diff -Nru jenkins-debian-glue-0.20.0/scripts/build-and-provide-package jenkins-debian-glue-0.20.1/scripts/build-and-provide-package --- jenkins-debian-glue-0.20.0/scripts/build-and-provide-package 2019-01-15 16:38:15.000000000 +0000 +++ jenkins-debian-glue-0.20.1/scripts/build-and-provide-package 2019-07-16 16:40:31.000000000 +0000 @@ -304,6 +304,11 @@ echo "USENETWORK=yes" >> "$pbuilderrc" fi + # Will run lintian and we need pbuilder to copy the result file to $BUILDRESULT + if [ "${LINTIAN:-}" = 'true' ] ; then + echo "ADDITIONAL_BUILDRESULTS+=('../*lintian.txt')" >> "$pbuilderrc" + fi + use_eatmydata use_ccache @@ -731,6 +736,11 @@ echo "USENETWORK=yes" >> "$pbuilderrc" fi + # Will run lintian and we need pbuilder to copy the result file to $BUILDRESULT + if [ "${LINTIAN:-}" = 'true' ] ; then + echo "ADDITIONAL_BUILDRESULTS+=('../*lintian.txt')" >> "$pbuilderrc" + fi + use_eatmydata use_ccache diff -Nru jenkins-debian-glue-0.20.0/scripts/generate-reprepro-codename jenkins-debian-glue-0.20.1/scripts/generate-reprepro-codename --- jenkins-debian-glue-0.20.0/scripts/generate-reprepro-codename 2019-01-15 15:36:49.000000000 +0000 +++ jenkins-debian-glue-0.20.1/scripts/generate-reprepro-codename 2019-04-04 11:32:41.000000000 +0000 @@ -119,12 +119,12 @@ echo "*** Repository variable REPOSITORY is unset, using default [$REPOSITORY] ***" fi -if ! ${SUDO_CMD:-} mkdir -p "${REPOSITORY}"/conf ; then +if ! mkdir -p "${REPOSITORY}"/conf ; then echo "Error creating ${REPOSITORY}/conf (forgot to create ${REPOSITORY} and chown jenkins?)" >&2 exit 1 fi -if ! ${SUDO_CMD:-} chown $(id -un) "${REPOSITORY}"/conf ; then +if ! chown $(id -un) "${REPOSITORY}"/conf ; then echo "*** Warning: failed to adjust permissions of ${REPOSITORY}/conf ***" echo "*** This might be caused by a remote FS like sshfs, so not failing the build. ***" echo "*** Please fix the underlying problem if you depend on according permissions. ***" diff -Nru jenkins-debian-glue-0.20.0/scripts/piuparts_wrapper jenkins-debian-glue-0.20.1/scripts/piuparts_wrapper --- jenkins-debian-glue-0.20.0/scripts/piuparts_wrapper 2019-01-15 16:38:15.000000000 +0000 +++ jenkins-debian-glue-0.20.1/scripts/piuparts_wrapper 2019-04-04 09:40:36.000000000 +0000 @@ -122,5 +122,6 @@ --log-file='piuparts.txt' \ ${scriptsdir:+--scriptsdir "$scriptsdir"} \ ${piuparts_tmpdir:+--tmpdir="$piuparts_tmpdir"} \ + ${MIRROR:+--mirror="$MIRROR"} \ ${basetgz:-} \ "$@" diff -Nru jenkins-debian-glue-0.20.0/scripts/remove-reprepro-codename jenkins-debian-glue-0.20.1/scripts/remove-reprepro-codename --- jenkins-debian-glue-0.20.0/scripts/remove-reprepro-codename 2018-10-08 06:52:56.000000000 +0000 +++ jenkins-debian-glue-0.20.1/scripts/remove-reprepro-codename 2019-03-05 10:23:41.000000000 +0000 @@ -65,4 +65,7 @@ echo "*** Removing vanished data from reprepro ***" ${REPREPRO_CMD} $REPREPRO_OPTS -b "$REPOSITORY" --delete clearvanished +echo "*** Removing package indices files (${REPOSITORY}/dists/${codename}) ***" +rm -rf "${REPOSITORY}/dists/${codename}" + # vim:foldmethod=marker ts=2 ft=sh ai expandtab sw=2 diff -Nru jenkins-debian-glue-0.20.0/tap/perlcritic_tap jenkins-debian-glue-0.20.1/tap/perlcritic_tap --- jenkins-debian-glue-0.20.0/tap/perlcritic_tap 2018-10-08 06:52:56.000000000 +0000 +++ jenkins-debian-glue-0.20.1/tap/perlcritic_tap 2019-03-05 10:31:31.000000000 +0000 @@ -18,6 +18,11 @@ file = ARGV[0] +if not File.exists? file + $stderr.puts "Error: file #{file} could not be read." + exit 1 +end + # make sure we're checking a perl script mimetype = `file -b #{file}`.gsub(/\n/,"") if not /.*perl/i.match(mimetype)