Merge remote-tracking branch 'origin/pr/236'

master
Michael Prokop 3 years ago
commit a37b8e0df4

11
debian/NEWS vendored

@ -1,3 +1,14 @@
jenkins-debian-glue (0.22.0) UNRELEASED; urgency=medium
To reduce the namespace pollution, all programs are namespaced now with
«jdg-» or «jdg-tap-» and their names had their _ replaced with -.
For backwards compatibility symlinks are provided for a transition period
to avoid breakage, but projects should be switched to the new names, which
will disappear eventually.
-- Guillem Jover <gjover@sipwise.com> Thu, 11 Feb 2021 22:24:37 +0100
jenkins-debian-glue (0.14.0) unstable; urgency=medium
To reduce the amount of Debian binary packages we decided to

@ -1,19 +1,19 @@
debian/tmp/usr/bin/adtsummary_tap usr/bin/
debian/tmp/usr/bin/build-and-provide-package usr/bin/
debian/tmp/usr/bin/checkbashism_tap usr/bin/
debian/tmp/usr/bin/generate-git-snapshot usr/bin/
debian/tmp/usr/bin/generate-reprepro-codename usr/bin/
debian/tmp/usr/bin/generate-svn-snapshot usr/bin/
debian/tmp/usr/bin/increase-version-number usr/bin/
debian/tmp/usr/bin/jdg-debc usr/bin/
debian/tmp/usr/bin/lintian-junit-report usr/bin/
debian/tmp/usr/bin/pep8_tap usr/bin/
debian/tmp/usr/bin/perlcritic_tap usr/bin/
debian/tmp/usr/bin/piuparts_tap usr/bin/
debian/tmp/usr/bin/piuparts_wrapper usr/bin/
debian/tmp/usr/bin/remove-reprepro-codename usr/bin/
debian/tmp/usr/bin/repository_checker usr/bin/
debian/tmp/usr/bin/shellcheck_tap usr/bin/
debian/tmp/usr/bin/tap_tool_dispatcher usr/bin/
debian/tmp/usr/share/jenkins-debian-glue/examples/debian_glue etc/jenkins/
debian/tmp/usr/share/jenkins-debian-glue/pbuilder-hookdir/ usr/share/jenkins-debian-glue/
usr/bin/jdg-build-and-provide-package usr/bin/
usr/bin/jdg-debc usr/bin/
usr/bin/jdg-generate-git-snapshot usr/bin/
usr/bin/jdg-generate-reprepro-codename usr/bin/
usr/bin/jdg-generate-svn-snapshot usr/bin/
usr/bin/jdg-increase-version-number usr/bin/
usr/bin/jdg-lintian-junit-report usr/bin/
usr/bin/jdg-piuparts-wrapper usr/bin/
usr/bin/jdg-remove-reprepro-codename usr/bin/
usr/bin/jdg-repository-checker usr/bin/
usr/bin/jdg-tap-adtsummary usr/bin/
usr/bin/jdg-tap-checkbashism usr/bin/
usr/bin/jdg-tap-pep8 usr/bin/
usr/bin/jdg-tap-perlcritic usr/bin/
usr/bin/jdg-tap-piuparts usr/bin/
usr/bin/jdg-tap-shellcheck usr/bin/
usr/bin/jdg-tap-tool-dispatcher usr/bin/
usr/share/jenkins-debian-glue/examples/debian_glue etc/jenkins/
usr/share/jenkins-debian-glue/pbuilder-hookdir/ usr/share/jenkins-debian-glue/

@ -0,0 +1,16 @@
usr/bin/jdg-build-and-provide-package usr/bin/build-and-provide-package
usr/bin/jdg-generate-git-snapshot usr/bin/generate-git-snapshot
usr/bin/jdg-generate-reprepro-codename usr/bin/generate-reprepro-codename
usr/bin/jdg-generate-svn-snapshot usr/bin/generate-svn-snapshot
usr/bin/jdg-increase-version-number usr/bin/increase-version-number
usr/bin/jdg-lintian-junit-report usr/bin/lintian-junit-report
usr/bin/jdg-piuparts-wrapper usr/bin/piuparts_wrapper
usr/bin/jdg-remove-reprepro-codename usr/bin/remove-reprepro-codename
usr/bin/jdg-repository-checker usr/bin/repository_checker
usr/bin/jdg-tap-adtsummary usr/bin/adtsummary_tap
usr/bin/jdg-tap-checkbashism usr/bin/checkbashism_tap
usr/bin/jdg-tap-pep8 usr/bin/pep8_tap
usr/bin/jdg-tap-perlcritic usr/bin/perlcritic_tap
usr/bin/jdg-tap-piuparts usr/bin/piuparts_tap
usr/bin/jdg-tap-shellcheck usr/bin/shellcheck_tap
usr/bin/jdg-tap-tool-dispatcher usr/bin/tap_tool_dispatcher

@ -1,7 +1,7 @@
jenkins-debian-glue: ruby-script-but-no-ruby-dep usr/bin/adtsummary_tap #!ruby
jenkins-debian-glue: ruby-script-but-no-ruby-dep usr/bin/checkbashism_tap #!ruby
jenkins-debian-glue: ruby-script-but-no-ruby-dep usr/bin/lintian-junit-report #!ruby
jenkins-debian-glue: ruby-script-but-no-ruby-dep usr/bin/pep8_tap #!ruby
jenkins-debian-glue: ruby-script-but-no-ruby-dep usr/bin/perlcritic_tap #!ruby
jenkins-debian-glue: ruby-script-but-no-ruby-dep usr/bin/piuparts_tap #!ruby
jenkins-debian-glue: ruby-script-but-no-ruby-dep usr/bin/shellcheck_tap #!ruby
jenkins-debian-glue: ruby-script-but-no-ruby-dep usr/bin/jdg-lintian-junit-report #!ruby
jenkins-debian-glue: ruby-script-but-no-ruby-dep usr/bin/jdg-tap-adtsummary #!ruby
jenkins-debian-glue: ruby-script-but-no-ruby-dep usr/bin/jdg-tap-checkbashism #!ruby
jenkins-debian-glue: ruby-script-but-no-ruby-dep usr/bin/jdg-tap-pep8 #!ruby
jenkins-debian-glue: ruby-script-but-no-ruby-dep usr/bin/jdg-tap-perlcritic #!ruby
jenkins-debian-glue: ruby-script-but-no-ruby-dep usr/bin/jdg-tap-piuparts #!ruby
jenkins-debian-glue: ruby-script-but-no-ruby-dep usr/bin/jdg-tap-shellcheck #!ruby

@ -26,10 +26,10 @@
wipe-workspace: false
builders:
- shell: 'rm -f ./* || true'
- shell: '/usr/bin/generate-git-snapshot'
- shell: '/usr/bin/jdg-generate-git-snapshot'
- shell: |
mkdir -p report
/usr/bin/lintian-junit-report *.dsc > report/lintian.xml
/usr/bin/jdg-lintian-junit-report *.dsc > report/lintian.xml
publishers:
- archive:
artifacts: '*.gz,*.bz2,*.xz,*.deb,*.dsc,*.git,*.changes,*.buildinfo,lintian.txt'
@ -77,10 +77,10 @@
export USE_FREIGHT=true
export SUDO_CMD=sudo
export KEY_ID=DEADBEEF # please adjust, or edit /etc/freight.conf
/usr/bin/build-and-provide-package
/usr/bin/jdg-build-and-provide-package
- shell: |
mkdir -p report
/usr/bin/lintian-junit-report *.changes > report/lintian.xml
/usr/bin/jdg-lintian-junit-report *.changes > report/lintian.xml
publishers:
- archive:
artifacts: '*.gz,*.bz2,*.xz,*.deb,*.dsc,*.git,*.changes,*.buildinfo,lintian.txt'

@ -27,10 +27,10 @@
wipe-workspace: false
builders:
- shell: 'rm -f ./* || true'
- shell: '/usr/bin/generate-git-snapshot'
- shell: '/usr/bin/jdg-generate-git-snapshot'
- shell: |
mkdir -p report
/usr/bin/lintian-junit-report *.dsc > report/lintian.xml
/usr/bin/jdg-lintian-junit-report *.dsc > report/lintian.xml
publishers:
- archive:
artifacts: '*.gz,*.bz2,*.xz,*.deb,*.dsc,*.git,*.changes,*.buildinfo,lintian.txt'
@ -74,13 +74,13 @@
filter: '*'
which-build: upstream-build
fallback-to-last-successful: true
- shell: "/usr/bin/build-and-provide-package"
- shell: "/usr/bin/jdg-build-and-provide-package"
- shell: |
echo "Listing packages inside the {name} repository:"
/usr/bin/repository_checker --list-repos {name}
/usr/bin/jdg-repository-checker --list-repos {name}
- shell: |
mkdir -p report
/usr/bin/lintian-junit-report *.changes > report/lintian.xml
/usr/bin/jdg-lintian-junit-report *.changes > report/lintian.xml
publishers:
- archive:
artifacts: '*.gz,*.bz2,*.xz,*.deb,*.dsc,*.git,*.changes,*.buildinfo,lintian.txt'
@ -116,8 +116,8 @@
target: 'artifacts/'
- shell: |
# sadly piuparts always returns with exit code 1 :((
sudo piuparts_wrapper $PWD/artifacts/*.deb || true
- shell: 'piuparts_tap piuparts.txt > piuparts.tap'
sudo jdg-piuparts-wrapper $PWD/artifacts/*.deb || true
- shell: 'jdg-tap-piuparts piuparts.txt > piuparts.tap'
publishers:
- tap:
results: 'piuparts.tap'

@ -89,7 +89,7 @@ fi
tar acf /tmp/buildd/autopkgtest.tar.gz /tmp/buildd/autopkgtest.out
case ${EXIT:-0} in
2|4|6|8) # let adtsummary_tap report the failure
2|4|6|8) # let jdg-tap-adtsummary report the failure
exit 0
;;
*)

@ -59,7 +59,7 @@ cp -ax "$BUILD" "/var/cache/pbuilder/build/debug.$ID"
cat <<EOF
┌──────────────────────────────────────────────────────────────────────────────┐
│ FTBFS - execute the following commands to debug this issue: │
──────────────────────────────────────────────────────────────────────────────┘
──────────────────────────────────────────────────────────────────────────────┘
│ chroot /var/cache/pbuilder/build/debug.$ID
│ su - pbuilder
@ -67,7 +67,7 @@ cat <<EOF
│ cd ${BUILD_DIR}/*/debian/..
│ env PATH="/usr/sbin:/usr/bin:/sbin:/bin" dpkg-buildpackage -us -uc -nc -rfakeroot
──────────────────────────────────────────────────────────────────────────────┐
──────────────────────────────────────────────────────────────────────────────┐
│ To invoke any hook use /tmp/hooks/NAMEOFHOOK │
└──────────────────────────────────────────────────────────────────────────────┘
EOF

@ -396,13 +396,13 @@ class jenkins::software {
content => '## Deployed via jenkins_debian_glue.pp
# Make sure DEB_* options reach cowbuilder, like e.g.:
# export DEB_BUILD_OPTIONS="parallel=8" /usr/bin/build-and-provide-package
# export DEB_BUILD_OPTIONS="parallel=8" /usr/bin/jdg-build-and-provide-package
Defaults env_keep+="DEB_* DIST ARCH ADT MIRRORSITE"
# for *-binaries job
jenkins ALL=NOPASSWD: /usr/sbin/cowbuilder, /usr/sbin/chroot
# for *-piuparts job
jenkins ALL=NOPASSWD: /usr/sbin/piuparts, /usr/sbin/debootstrap, /usr/bin/piuparts_wrapper
jenkins ALL=NOPASSWD: /usr/sbin/piuparts, /usr/sbin/debootstrap, /usr/bin/jdg-piuparts-wrapper
',
require => Package['sudo'],
}
@ -505,14 +505,14 @@ class jenkins::config {
</hudson.tasks.Shell>
<hudson.tasks.Shell>
<command># when using git:
/usr/bin/generate-git-snapshot
/usr/bin/jdg-generate-git-snapshot
# when using subversion:
# /usr/bin/generate-svn-snapshot</command>
# /usr/bin/jdg-generate-svn-snapshot</command>
</hudson.tasks.Shell>
<hudson.tasks.Shell>
<command>mkdir -p report
/usr/bin/lintian-junit-report *.dsc &gt; report/lintian.xml</command>
/usr/bin/jdg-lintian-junit-report *.dsc &gt; report/lintian.xml</command>
</hudson.tasks.Shell>
</builders>
<publishers>
@ -604,15 +604,15 @@ class jenkins::config {
</hudson.plugins.copyartifact.CopyArtifact>
<hudson.tasks.Shell>
<command>export POST_BUILD_HOOK=/usr/bin/jdg-debc
/usr/bin/build-and-provide-package</command>
/usr/bin/jdg-build-and-provide-package</command>
</hudson.tasks.Shell>
<hudson.tasks.Shell>
<command>echo &quot;Listing packages inside the jenkins-debian-glue repository:&quot;
/usr/bin/repository_checker --list-repos jenkins-debian-glue</command>
/usr/bin/jdg-repository_checker --list-repos jenkins-debian-glue</command>
</hudson.tasks.Shell>
<hudson.tasks.Shell>
<command>mkdir -p report
/usr/bin/lintian-junit-report *.dsc &gt; report/lintian.xml</command>
/usr/bin/jdg-lintian-junit-report *.dsc &gt; report/lintian.xml</command>
</hudson.tasks.Shell>
</builders>
<publishers>
@ -698,10 +698,10 @@ class jenkins::config {
</hudson.plugins.copyartifact.CopyArtifact>
<hudson.tasks.Shell>
<command># sadly piuparts always returns with exit code 1 :((
sudo piuparts_wrapper \${PWD}/artifacts/*.deb || true</command>
sudo jdg-piuparts-wrapper \${PWD}/artifacts/*.deb || true</command>
</hudson.tasks.Shell>
<hudson.tasks.Shell>
<command>piuparts_tap piuparts.txt &gt; piuparts.tap</command>
<command>jdg-tap-piuparts piuparts.txt &gt; piuparts.tap</command>
</hudson.tasks.Shell>
</builders>
<publishers>

@ -236,7 +236,7 @@ build_info() {
identify_sourcefile() {
if [ -n "${sources:-}" ] ; then
echo "*** WARNING: sources variable [$sources] is set, please use BASE_PATH variable instead ***"
echo "*** If \$sources is unrelated to build-and-provide-package you can ignore this warning ***"
echo "*** If \$sources is unrelated to jdg-build-and-provide-package you can ignore this warning ***"
fi
echo "*** Identifying newest package version ***"
@ -938,10 +938,10 @@ reprepro_wrapper() {
if ! [ -r "${REPOSITORY}"/conf/distributions ] ; then
echo "*** reprepro configuration file ${REPOSITORY}/conf/distributions does not exist, generating now ***"
${SUDO_CMD:-} generate-reprepro-codename "${REPOS}"
${SUDO_CMD:-} jdg-generate-reprepro-codename "${REPOS}"
elif ! ${SUDO_CMD:-} grep -q "^\(Codename\|Suite\): ${REPOS}$" "${REPOSITORY}"/conf/distributions ; then
echo "*** Codename ${REPOS} does not exist in repository ${REPOSITORY}, generating now ***"
${SUDO_CMD:-} generate-reprepro-codename "${REPOS}"
${SUDO_CMD:-} jdg-generate-reprepro-codename "${REPOS}"
fi
remove_packages
@ -1026,7 +1026,7 @@ trunk_release() {
else
echo "*** TRUNK_RELEASE is enabled ($TRUNK_RELEASE) ***"
${SUDO_CMD:-} generate-reprepro-codename "$TRUNK_RELEASE"
${SUDO_CMD:-} jdg-generate-reprepro-codename "$TRUNK_RELEASE"
if [ -n "${SKIP_REPREPRO_WRAPPER:-}" ] ; then
@ -1100,9 +1100,9 @@ release_repos() {
cp "${WORKSPACE}/binaries/"* "${REPOSITORY}/incoming/${RELEASE_DISTRIBUTION}/"
[ $? -eq 0 ] || bailout 1 "Error: Failed to copy binary packages to release directory."
REPOSITORY=$REPOSITORY generate-reprepro-codename "${RELEASE_DISTRIBUTION}"
REPOSITORY=$REPOSITORY jdg-generate-reprepro-codename "${RELEASE_DISTRIBUTION}"
# lock access to file to avoid duplicate entries when two build-and-provide-package
# lock access to file to avoid duplicate entries when two jdg-build-and-provide-package
# runs happen at the very same time with regard to conf/incoming setup
(
flock --timeout 5 9 || bailout 1 "Error: could not lock file ${REPOSITORY}/conf/incoming, giving up."

@ -84,7 +84,7 @@ version_information() {
# we want to get a version string like
# $ORIG_VERSION+0~$TIMESTAMP.$BUILD_NUMBER~1.$GIT_ID
# so the version is always increasing over time, no matter what
INCREASED_VERSION=$(increase-version-number $ORIG_VERSION)
INCREASED_VERSION=$(jdg-increase-version-number $ORIG_VERSION)
if [ -n "${TIMESTAMP_FORMAT:-}" ] ; then
echo "*** Using custom timestamp format as specified by TIMESTAMP_FORMAT ***"
TIMESTAMP="$(date -u +"$TIMESTAMP_FORMAT")"

@ -138,7 +138,7 @@ if [ -z "${KEY_ID:-}" ] ; then
echo "*** and then adjust /etc/jenkins/debian_glue."
fi
# lock access to file to avoid duplicate entries when two generate-reprepro-codename
# lock access to file to avoid duplicate entries when two jdg-generate-reprepro-codename
# runs happen at the very same time
(
flock --timeout 5 9 || bailout 1 "Error: could not lock file ${REPOSITORY}/conf/distributions, giving up."

@ -107,7 +107,7 @@ build_snapshot() {
SNAPSHOT_VERSION="${PREVIOUS_VERSION}~${TIMESTAMP}.svn${SVN_REVISION}.${BUILD_NUMBER}"
else
# calculate new snapshot version
SNAPSHOT_VERSION="$(increase-version-number "$PREVIOUS_VERSION")~${TIMESTAMP}.svn${SVN_REVISION}.${BUILD_NUMBER}"
SNAPSHOT_VERSION="$(jdg-increase-version-number "$PREVIOUS_VERSION")~${TIMESTAMP}.svn${SVN_REVISION}.${BUILD_NUMBER}"
fi
# generate changelog

@ -16,7 +16,7 @@ fi
# where $existing_old_version is the provided <version_number>,
# $snapshot_version is a version number based on the output of
# the script (as used inside scripts like
# generate-{git,svn}-snapshot) and $new_version is a version
# jdg-generate-{git,svn}-snapshot) and $new_version is a version
# number that might show up in the future.
#
# NOTE: The author of jenkins-debian-glue is aware of only one

@ -180,7 +180,7 @@ 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:
_opt_temp=$(getopt --name repository_checker -o +vhV --long $CMDLINE_OPTS -- "$@")
_opt_temp=$(getopt --name jdg-repository-checker -o +vhV --long $CMDLINE_OPTS -- "$@")
if [ $? -ne 0 ]; then
echo "Try '$0 --help' for more information." >& 2
exit 1

@ -8,7 +8,7 @@ BASE_BIN=${BASE_BIN:-/usr/bin}
CMDLINE_OPTS=disable-checkbashism,disable-pep8,disable-perlcritic,disable-shellcheck
CMDLINE_OPTS+=,file-list,help
_opt_temp=$(getopt --name tap_tool_dispatcher -o -f+h --long $CMDLINE_OPTS -- "$@")
_opt_temp=$(getopt --name jdg-tap-tool-dispatcher -o -f+h --long $CMDLINE_OPTS -- "$@")
if [ $? -ne 0 ]; then
echo "Try '$0 --help' for more information." >& 2
exit 1
@ -110,7 +110,7 @@ if ! [ -x "$(which checkbashisms)" ] ; then
echo "*** Skipping checkbashism checks as tool checkbashisms isn't present ***"
else
if $_opt_checkbashism ; then
echo "${BASE_BIN}/checkbashism_tap '{}' '>' ${REPORTS_DIRECTORY}'/{}_checkbashism.tap' ';' \\" >> "${TMPFILE}"
echo "${BASE_BIN}/jdg-tap-checkbashism '{}' '>' ${REPORTS_DIRECTORY}'/{}_checkbashism.tap' ';' \\" >> "${TMPFILE}"
else
echo "*** Skipping checkbashism tests as requested via --disable-checkbashism ***"
fi
@ -120,7 +120,7 @@ if ! [ -x "$(which pep8)" ] ; then
echo "*** Skipping pep8 checks as tool pep8 isn't present ***"
else
if $_opt_pep8 ; then
echo "${BASE_BIN}/pep8_tap '{}' '>' ${REPORTS_DIRECTORY}'/{}_pep8.tap' ';' \\" >> "${TMPFILE}"
echo "${BASE_BIN}/jdg-tap-pep8 '{}' '>' ${REPORTS_DIRECTORY}'/{}_pep8.tap' ';' \\" >> "${TMPFILE}"
else
echo "*** Skipping pep8 tests as requested via --disable-pep8 ***"
fi
@ -130,7 +130,7 @@ if ! [ -x "$(which perlcritic)" ] ; then
echo "*** Skipping perlcritic checks as tool perlcritic (package libperl-critic-perl) isn't present ***"
else
if $_opt_perlcritic ; then
echo "${BASE_BIN}/perlcritic_tap '{}' '>' ${REPORTS_DIRECTORY}'/{}_perlcritic.tap' ';' \\" >> "${TMPFILE}"
echo "${BASE_BIN}/jdg-tap-perlcritic '{}' '>' ${REPORTS_DIRECTORY}'/{}_perlcritic.tap' ';' \\" >> "${TMPFILE}"
else
echo "*** Skipping perlcritic tests as requested via --disable-perlcritic ***"
fi
@ -140,7 +140,7 @@ if ! [ -x "$(which shellcheck)" ] ; then
echo "*** Skipping shellcheck checks as tool shellcheck isn't present ***"
else
if $_opt_shellcheck ; then
echo "${BASE_BIN}/shellcheck_tap '{}' '>' ${REPORTS_DIRECTORY}'/{}_shellcheck.tap' ';'" >> "${TMPFILE}"
echo "${BASE_BIN}/jdg-tap-shellcheck '{}' '>' ${REPORTS_DIRECTORY}'/{}_shellcheck.tap' ';'" >> "${TMPFILE}"
else
echo "*** Skipping shellcheck tests as requested via --disable-shellcheck ***"
fi

@ -1,6 +1,6 @@
#!/bin/sh
SCRIPT=./scripts/increase-version-number
SCRIPT=./scripts/jdg-increase-version-number
testEquality()
{

Loading…
Cancel
Save