~dannf/charms/trusty/ilp32-rebase/trunk

« back to all changes in this revision

Viewing changes to do-ilp32-rebase

  • Committer: dann frazier
  • Date: 2014-12-17 01:14:12 UTC
  • Revision ID: dannf@ubuntu.com-20141217011412-l24uy55oh1ma3eo6
Initial commit

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
 
 
3
set -e
 
4
set -x
 
5
 
 
6
. /etc/ilp32-rebase/config
 
7
 
 
8
export DEBEMAIL="$USER_EMAIL"
 
9
export DEBFULLNAME="$USER_FULLNAME"
 
10
export GIT_AUTHOR_EMAIL="$USER_EMAIL"
 
11
export GIT_AUTHOR_NAME="$USER_FULLNAME"
 
12
export GIT_COMMITTER_EMAIL="$USER_EMAIL"
 
13
export GIT_COMMITTER_NAME="$USER_FULLNAME"
 
14
 
 
15
cd $GIT_TREE
 
16
git fetch trusty
 
17
git fetch ilp32
 
18
 
 
19
prover=$(get-src-package-version \
 
20
    --archive 'http://ports.ubuntu.com/ubuntu-ports' \
 
21
    --release 'trusty-proposed' \
 
22
    --section 'main' \
 
23
      linux)
 
24
 
 
25
tag="Ubuntu-${prover}"
 
26
ilp32_branch="${prover}+ilp32"
 
27
 
 
28
git clean -x -f -d .
 
29
git reset --hard HEAD
 
30
# get off of ilp32 branch if we are on it
 
31
# (git won't let us delete the branch we're sitting on)
 
32
git checkout origin/master
 
33
git branch -D "$ilp32_branch" || /bin/true
 
34
git branch "$ilp32_branch" "$tag"
 
35
git checkout "$ilp32_branch"
 
36
 
 
37
oldver="$(dpkg-parsechangelog --show-field Version -ldebian.master/changelog)"
 
38
upstream_ver="${oldver%-*}"
 
39
old_package_rev="${oldver#*-}"
 
40
./debian/scripts/misc/getabis ${upstream_ver} ${old_package_rev}
 
41
 
 
42
# clean causes debian/control to be generated, needed by startnewrelease
 
43
make -f debian/rules clean
 
44
make -f debian/rules startnewrelease
 
45
# This adds a middle ABI number and appends '+ilp32.1'
 
46
sed -i -r '0,/(.*\(.+)-(.+)\.(.+)\)(.*)/s//\1\-\2\.\2\.\3\+ilp32\.1\)\4/' \
 
47
    debian.master/changelog
 
48
git add debian.master/changelog
 
49
git commit -s -m 'UBUNTU: Start new release
 
50
 
 
51
Ignore: yes'
 
52
 
 
53
# FIXME: the start/end references should be user configurable
 
54
git log --reverse ilp32/ilp32-start..ilp32/ilp32 | grep ^commit | cut -d' ' -f2 | \
 
55
    while read c; do
 
56
        git cherry-pick $c
 
57
    done
 
58
 
 
59
make -f debian/rules insertchanges
 
60
dch -c debian.master/changelog -r ""
 
61
git add debian.master/changelog
 
62
newver="$(dpkg-parsechangelog --show-field Version -ldebian.master/changelog)"
 
63
git commit -s -m "UBUNTU: Ubuntu-$newver"
 
64
rm -rf ../linux-${upstream_ver}
 
65
git clone . ../linux-${upstream_ver}
 
66
cd ../linux-${upstream_ver}
 
67
rm -rf .git
 
68
make -f debian/rules clean
 
69
dpkg-buildpackage -rfakeroot -uc -us -S