-
Notifications
You must be signed in to change notification settings - Fork 5
/
pkg-new-ubuntu-release
executable file
·40 lines (33 loc) · 1.01 KB
/
pkg-new-ubuntu-release
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/bash
#
# Update an Ubuntu package to a new upstream release.
#
# Clones the git package from launchpad.
# Downloads and imports the orig upstream tarball.
# Leaves you in d/changelog to edit.
#
# Example: pkg-new-ubuntu-release cinder 8.0.0~b2 master
#
set -ex
if [ $# -ne 3 ]
then
echo "Usage: $0 package-name ubuntu-version branch-name"
echo " $0 cinder 8.0.0~b1 master"
echo " $0 cinder 7.0.1 stable/liberty"
exit
fi
package=$1
version=$2
branch=$3
git clone lp:~ubuntu-openstack-dev/ubuntu/+source/$package || git clone lp:~ubuntu-server-dev/ubuntu/+source/$package
cd $package
git checkout pristine-tar
git checkout upstream
git checkout $branch
set +e
uscan --verbose --download-version ${version} --rename --timeout 60 # --force-download
set -e
gbp import-orig --no-interactive --merge-mode=replace ../${package}_${version}.orig.tar.gz || \
gbp import-orig --no-interactive --merge-mode=replace ../${package}_${version}.orig.tar.xz
dch -i
sed -i "1s/1ubuntu1/0ubuntu1/" debian/changelog