Browse Source

Add git format deb pkgs support thanks to Daniel Reurich for Devuan

tags/0.18.4
nextime 6 years ago
parent
commit
5cb9bd6396
4 changed files with 56 additions and 19 deletions
  1. +2
    -2
      jjb/jdg-freight.yaml
  2. +2
    -2
      jjb/jdg-reprepro.yaml
  3. +2
    -2
      puppet/jenkins_debian_glue.pp
  4. +50
    -13
      scripts/generate-git-snapshot

+ 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,*.changes,lintian.txt'
artifacts: '*.gz,*.bz2,*.xz,*.deb,*.dsc,*.git,*.changes,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,*.changes,lintian.txt'
artifacts: '*.gz,*.bz2,*.xz,*.deb,*.dsc,*.git,*.changes,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,*.changes,lintian.txt'
artifacts: '*.gz,*.bz2,*.xz,*.deb,*.dsc,*.git,*.changes,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,*.changes,lintian.txt'
artifacts: '*.gz,*.bz2,*.xz,*.deb,*.dsc,*.git,*.changes,lintian.txt'
- junit:
results: '**/lintian.xml'
keep-long-stdio: false


+ 2
- 2
puppet/jenkins_debian_glue.pp View File

@@ -336,7 +336,7 @@ class jenkins::config {
</builders>
<publishers>
<hudson.tasks.ArtifactArchiver>
<artifacts>*.gz,*.bz2,*.xz,*.deb,*.dsc,*.changes,lintian.txt</artifacts>
<artifacts>*.gz,*.bz2,*.xz,*.deb,*.dsc,*.git,*.changes,lintian.txt</artifacts>
<latestOnly>false</latestOnly>
</hudson.tasks.ArtifactArchiver>
<hudson.tasks.Fingerprinter>
@@ -435,7 +435,7 @@ class jenkins::config {
</builders>
<publishers>
<hudson.tasks.ArtifactArchiver>
<artifacts>*.gz,*.bz2,*.xz,*.deb,*.dsc,*.changes,lintian.txt</artifacts>
<artifacts>*.gz,*.bz2,*.xz,*.deb,*.dsc,*.git,*.changes,lintian.txt</artifacts>
<latestOnly>false</latestOnly>
</hudson.tasks.ArtifactArchiver>
<hudson.tasks.Fingerprinter>


+ 50
- 13
scripts/generate-git-snapshot View File

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

DBP_EXTRA_OPTS=''

set -x
set -e
set -u
@@ -344,6 +346,37 @@ quilt_cleanup() {
rm -rf .pc
}

source_format_opts() {
if [ -f "debian/source/format" ] ; then
SRC_FORMAT=`cat debian/source/format`
case $SRC_FORMAT in
'3.0 (quilt)') #Quilt format, Nothing to do;
echo "***Source format detected as 3.0(quilt)";
DBP_EXTRA_OPTS="${DBP_EXTRA_OPTS} --source-option=--unapply-patches"
break;;
'3.0 (git)')
echo "***Source format detected as 3.0(git)"
PRISTINE_TAR=false
SKIP_QUILT_CLEANUP=true
IGNORE_GIT_BUILDPACKAGE=true
break;;
'3.0 (native)');;
'3.0');;
'1.0')
SKIP_QUILT_CLEANUP=true
break;;
*)
echo "Warning, Invalid or unknown source format: $SRC_FORMAT"
;;
esac
else echo "WARNING: Source format is not specified in debian/source/format!"
fi
}



# main execution
echo "*** source package build phase ***"
rm -f ./* || true
@@ -356,15 +389,19 @@ fi
cd "$SOURCE_DIRECTORY"

git_cleanup

# gbp.conf handling
gbp_conf

# make sure common branches are available for git-buildpackage
create_local_branch ${UPSTREAM_BRANCH}
create_local_branch ${DEBIAN_BRANCH}
if [ ${PRISTINE_TAR} = 'true' ]; then
create_local_branch pristine-tar
source_format_opts

# Only if we are using git-buildpackage...
if [ "${IGNORE_GIT_BUILDPACKAGE:-}" != "true" ] ; then
# gbp.conf handling
gbp_conf

# make sure common branches are available for git-buildpackage
create_local_branch ${UPSTREAM_BRANCH}
create_local_branch ${DEBIAN_BRANCH}
if [ ${PRISTINE_TAR} = 'true' ]; then
create_local_branch pristine-tar
fi
fi

# check out the according branch/tag with help of $random_branch
@@ -383,13 +420,13 @@ version_information
dch_opts
changelog_generation

# set $GBP_OPTS
gbp_opts

# prepare orig.tar.gz using pristine-tar, but without actually building the source package
if [ "${IGNORE_GIT_BUILDPACKAGE:-}" = "true" ] ; then
echo "Skipping git-buildpackage execution as requested via IGNORE_GIT_BUILDPACKAGE ***"

else
# set $GBP_OPTS
gbp_opts
git-buildpackage ${GBP_OPTS:-}
fi

@@ -397,7 +434,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 --source-option=--unapply-patches
dpkg-buildpackage -uc -us -nc -d -S -i -I ${DBP_EXTRA_OPTS}

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


Loading…
Cancel
Save