set -u
# version of this script
-backports_dsc_version=0.1
+backports_dsc_version=0.2
############
# Defaults #
############
bp_distribution=${BACKPORT_DISTRIBUTION:-squeeze-backports}
-bp_version_prefix=${BACKPORT_VERSION_PREFIX:-~}
+bp_version_prefix=${BACKPORT_VERSION_PREFIX:-\~}
bp_version_suffix=${BACKPORT_VERSION_SUFFIX:-bpo60}
bp_maintainer_name=${DEBFULLNAME:-unamed}
bp_maintainer_email=${DEBEMAIL:-unknown}
cat << EOT
backport-dsc $backports_dsc_version
-Copyright (C) 2010 Michael Hanke <michael.hanke@gmail.com>
+Copyright (C) 2010-2012 Michael Hanke <michael.hanke@gmail.com>
Licensed under GNU Public License version 2 or later.
This is free software; see the source for copying conditions. There is NO
Options:
-d <distname>, --target-distribution <distname>
- Arbitrary distribution name (e.g. lenny-backports). This will be the target
+ Arbitrary distribution name (e.g. squeeze-backports). This will be the target
distribution used for the backport changelog entry. The distribution name
also serves as an identifier to search for backport patches in the source
package.
be sourced by backport-dsc. The following variables (each shown with an
example setting) can be used to pre-configure backport-dsc:
-bp_distribution="lenny-backports"
+bp_distribution="squeeze-backports"
Backport target distribution (see --backport-distribution)
bp_version_prefix="~"
- Version suffix (see --version-prefix)
+ Version prefix (see --version-prefix)
bp_version_suffix="bpo60"
Version suffix (see --version-suffix)
# extract the original source package
dpkg-source -x $dsc_file $sdir
# note backport in changelog
+# This will create a new changelog entry
+# All subsequent calls to dch should use -a to assure that those entries
+# are appended to the existing entry (otherwise with wheezy new entries will be added)
$bp_dch_cmd -D ${bp_distribution} -l "${bp_version}" "Backported for ${bp_distribution}."
if [ "$bp_update_maintainer" = 1 ]; then
printf "${green}Enabling additional quilt patch series for $bp_distribution.\n${NC}"
fi
cat $sdir/debian/patches/series-$bp_distribution >> $sdir/debian/patches/series
- $bp_dch_cmd "Added 'series-$bp_distribution' in quilt patch series."
+ $bp_dch_cmd -a "Added 'series-$bp_distribution' in quilt patch series."
fi
# look for backport patches
for p in $(ls -1 $sdir/debian/patches/$bp_distribution-dsc-patch* 2> /dev/null || true); do
printf "${green}Applying additional patch $(basename "$p").\n${NC}"
fi
patch -p1 --directory=$sdir < "$p"
- $bp_dch_cmd "Applied additional patch from debian/patches/$(basename "$p")."
+ $bp_dch_cmd -a "Applied additional patch from debian/patches/$(basename "$p")."
done
fi
printf "${green}Modifying debian/control with given instructions.\n${NC}"
fi
bash -c "sed -i $bp_mod_control $sdir/debian/control"
- $bp_dch_cmd "Used following sed expression to modify debian/control:$bp_mod_control."
+ $bp_dch_cmd -a "Used following sed expression to modify debian/control:$bp_mod_control."
fi
# extract final version