Merge lp:~andreserl/maas/packaging_changes_for_git into lp:~maas-maintainers/maas/packaging

Proposed by Andres Rodriguez
Status: Merged
Approved by: Andres Rodriguez
Approved revision: 564
Merged at revision: 561
Proposed branch: lp:~andreserl/maas/packaging_changes_for_git
Merge into: lp:~maas-maintainers/maas/packaging
Diff against target: 130 lines (+95/-10)
4 files modified
debian/changelog (+1/-1)
debian/rules (+0/-9)
publish (+31/-0)
release-build (+63/-0)
To merge this branch: bzr merge lp:~andreserl/maas/packaging_changes_for_git
Reviewer Review Type Date Requested Status
Andres Rodriguez (community) Approve
Review via email: mp+326225@code.launchpad.net

Commit message

- Remove get-orig-source.
- Do not include rev on debian/changelog header.
- Include scripts that automatically build packaging source files.

To post a comment you must log in.
564. By Andres Rodriguez

Update version to match discussion

Revision history for this message
Andres Rodriguez (andreserl) wrote :

selfie!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'debian/changelog'
--- debian/changelog 2017-06-15 08:05:26 +0000
+++ debian/changelog 2017-06-23 13:32:08 +0000
@@ -1,4 +1,4 @@
1maas (2.3.0~alpha1+bzr6085-0ubuntu1) UNRELEASED; urgency=medium1maas (2.3.0~alpha1-0ubuntu1) UNRELEASED; urgency=medium
22
3 * UNRELEASED3 * UNRELEASED
44
55
=== modified file 'debian/rules'
--- debian/rules 2017-06-08 23:30:03 +0000
+++ debian/rules 2017-06-23 13:32:08 +0000
@@ -73,12 +73,3 @@
73 dh_auto_clean73 dh_auto_clean
74 rm -rf $(BUILDHOME)74 rm -rf $(BUILDHOME)
75 rm -rf src/*.egg-info75 rm -rf src/*.egg-info
76
77DEB_DEBIAN_DIR=$(dir $(firstword $(MAKEFILE_LIST)))
78REV=$(shell dpkg-parsechangelog -l$(DEB_DEBIAN_DIR)/changelog \
79 | sed -rne 's,^Version: .*[+~]bzr([0-9]+).*,\1,p')
80VER=$(shell dpkg-parsechangelog -l$(DEB_DEBIAN_DIR)/changelog \
81 | sed -rne 's,^Version: ([^-]+).*,\1,p')
82get-orig-source:
83 bzr export -r $(REV) --root=maas-$(VER).orig \
84 maas_$(VER).orig.tar.gz lp:maas
8576
=== added file 'publish'
--- publish 1970-01-01 00:00:00 +0000
+++ publish 2017-06-23 13:32:08 +0000
@@ -0,0 +1,31 @@
1#!/bin/sh -e
2
3PKG=$(head -n1 debian/changelog | awk '{print $1}')
4VER=$(head -n 1 debian/changelog | sed 's/^.*(//' | sed 's/).*//' | sed 's/-.*//')
5
6case "$1" in
7 experimental3)
8 dput -f ppa:maas-maintainers/experimental3 maas*source.changes
9 ;;
10 next)
11 dput -f ppa:maas/next maas*source.changes
12 ;;
13 next-proposed)
14 dput -f ppa:maas/next-proposed maas*source.changes
15 ;;
16 experimental)
17 echo "experimental"
18 dput -f ppa:maas-maintainers/experimental maas*trusty*source.changes
19 dput -f ppa:maas-maintainers/experimental maas*vivid*source.changes
20 dput -f ppa:maas-maintainers/experimental maas*wily*source.changes
21 ;;
22 proposed)
23 dput -f ppa:maas/proposed maas*source.changes
24 ;;
25 stable)
26 dput -f ppa:maas/stable maas*source.changes
27 ;;
28 *)
29 dput -f $1 maas*source.changes
30 ;;
31esac
032
=== added file 'release-build'
--- release-build 1970-01-01 00:00:00 +0000
+++ release-build 2017-06-23 13:32:08 +0000
@@ -0,0 +1,63 @@
1#!/bin/sh -e
2error() {
3 echo "ERROR: $@" >&2
4 exit 1
5}
6
7usage () {
8 echo "Usage:"
9 echo " $0 <path-to-local-repo> [commit (defaults to HEAD)]"
10 exit 1
11}
12
13if [ -z "$1" ]; then
14 usage
15 if [ ! -f $1 ]; then
16 error "Local branch location does not exist. Cannot proceed"
17 fi
18fi
19
20if [ -z "$2" ]; then
21 echo "WARNING: No commit specified, using HEAD instead"
22 COMMIT="HEAD"
23else
24 COMMIT="$2"
25fi
26
27PKG=$(head -n1 debian/changelog | awk '{print $1}')
28MAJOR_VER=$(head -n 1 debian/changelog | sed 's/^.*(//' | sed 's/).*//' | sed 's/-.*//')
29#REV=$(head -n 1 debian/changelog | sed -rne 's,.*[+~.]git([0-9a-zA-Z]+).*,\1,p')
30REV_COUNT=$(git -C $1 rev-list --count $COMMIT)
31REV_SHORT=$(git -C $1 rev-parse --short $COMMIT)
32FULL_VER="$MAJOR_VER+git$REV_COUNT.$REV_SHORT"
33TARBALL="maas_$FULL_VER.orig.tar.gz"
34
35get_orig_source() {
36 branch="$1"
37 git -C $branch archive --format=tar.gz --prefix="maas-$FULL_VER.orig/" $COMMIT -o $TARBALL $REV
38
39}
40# Obtain the tarball from a local branch
41get_orig_source $1 $FULL_VER $REV
42
43# Copy the tarball to the local dir
44mv "${1}/${TARBALL}" .
45
46# Update the changelog
47sed -i "s/${MAJOR_VER}-0ubuntu1/${FULL_VER}-0ubuntu1/i" debian/changelog
48
49# Untar
50tar zxvf ${PKG}_${FULL_VER}.orig.tar.gz
51cd "${PKG}-${FULL_VER}.orig/"
52cp -r ../debian .
53sed -i "s/) UNRELEASED;/~16.04.1) xenial;/i" debian/changelog
54debuild -S -sa
55sed -i "s/~16.04.1) xenial;/~16.10.1) yakkety;/" debian/changelog
56debuild -S
57sed -i "s/~16.10.1) yakkety;/~17.04.1) zesty;/" debian/changelog
58debuild -S
59sed -i "s/~17.04.1) zesty;/~17.10.1) artful;/" debian/changelog
60debuild -S
61
62cd ../
63sed -i "s/${FULL_VER}-0ubuntu1/${MAJOR_VER}-0ubuntu1/i" debian/changelog

Subscribers

People subscribed via source and target branches

to all changes: