~ubuntu-core-dev/ubuntu/xenial/ubuntu-release-upgrader/xenial

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
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/bin/sh

# build a tarball that is ready for the upload. the format is 
# simple, it contans:
#   $version/$dist.tar.gz 
#   $version/ReleaseNotes 
# this put into a file called "$dist-upgrader_$version.tar.gz"       


TARGETDIR=../dist-upgrade-build
SOURCEDIR=`pwd`
DIST=feisty
MAINTAINER="Michael Vogt <michael.vogt@ubuntu.com>"
NOTES=ReleaseAnnouncement
version=$(cd ..;LC_ALL=C dpkg-parsechangelog |sed -n -e '/^Version:/s/^Version: //p' | sed s/.*://)

# create targetdir
if [ ! -d $TARGETDIR/$version ]; then
	mkdir -p $TARGETDIR/$version
fi

#build the actual dist-upgrader tarball
./build-tarball.sh

# how move it into a container including the targetdir (with version)
# and ReleaeNotes
cd $TARGETDIR/$version
cp $SOURCEDIR/$NOTES .
cp $SOURCEDIR/$DIST.tar.gz .
cd ..

# build it
TARBALL="dist-upgrader_"$version"_all.tar.gz"
tar czvf $TARBALL $version

# now create a changes file
CHANGES="dist-upgrader_"$version"_all.changes"
echo > $CHANGES
echo "Origin: Ubuntu/$DIST" >> $CHANGES 
echo "Format: 1.7" >> $CHANGES
echo "Date: `date -R`" >> $CHANGES
echo "Architecture: all">>$CHANGES
echo "Version: $version" >>$CHANGES
echo "Distribution: $DIST"  >>$CHANGES
echo "Source: dist-upgrader" >> $CHANGES
echo "Binary: dist-upgrader" >> $CHANGES
echo "Urgency: low" >> $CHANGES
echo "Maintainer: $MAINTAINER" >> $CHANGES
echo "Changed-By: $MAINTAINER" >> $CHANGES
echo "Changes: "  >> $CHANGES
echo " * new upstream version"  >> $CHANGES 
echo "Files: " >> $CHANGES
echo " `md5sum $TARBALL | awk '{print $1}'` `stat --format=%s $TARBALL` raw-dist-upgrader - $TARBALL" >> $CHANGES