Merge lp:~robru/media-hub/pre_release_hook into lp:media-hub

Proposed by Robert Bruce Park
Status: Merged
Approved by: Alfonso Sanchez-Beato
Approved revision: 182
Merged at revision: 178
Proposed branch: lp:~robru/media-hub/pre_release_hook
Merge into: lp:media-hub
Diff against target: 198 lines (+33/-62)
4 files modified
debian/bileto_pre_release_hook (+21/-52)
debian/control (+6/-6)
debian/get-versions.sh (+5/-3)
debian/rules (+1/-1)
To merge this branch: bzr merge lp:~robru/media-hub/pre_release_hook
Reviewer Review Type Date Requested Status
Alfonso Sanchez-Beato Approve
Jim Hodapp Pending
Thomas Voß Pending
Review via email: mp+290351@code.launchpad.net

Commit message

Use new bileto_pre_release_hook.

To post a comment you must log in.
lp:~robru/media-hub/pre_release_hook updated
180. By Robert Bruce Park

Print $soversion and $SERIES.

181. By Robert Bruce Park

More logging

182. By Robert Bruce Park

Drop redundant log.

Revision history for this message
Alfonso Sanchez-Beato (alfonsosanchezbeato) wrote :

LGTM

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== renamed file 'debian/gen-debian-files.sh' => 'debian/bileto_pre_release_hook'
2--- debian/gen-debian-files.sh 2015-11-22 21:01:02 +0000
3+++ debian/bileto_pre_release_hook 2016-03-29 18:34:58 +0000
4@@ -16,6 +16,7 @@
5 #
6 # Authored by: Michi Henning <michi.henning@canonical.com>
7 # Thomas Voß <thomas.voss@canonical.com>
8+# Robert Bruce Park <robert.park@canonical.com>
9
10 #
11 # Script to generate debian files for dual landing in Vivid (gcc 4.9 ABI)
12@@ -24,79 +25,47 @@
13 # This script is called from debian/rules and generates:
14 #
15 # - control
16-# - libtrust-store${soversion}.install.${target_arch}
17-#
18-# For all but control, this is a straight substition and/or renaming exercise for each file.
19-# For control, if building on Wily or later, we also fix the "Replaces:" and "Conflicts:"
20-# entries, so we don't end up with two packages claiming ownership of the same places
21-# in the file system.
22+# - libmedia-hub-client${MEDIA_HUB_SOVERSION}.install
23+# - libmedia-hub-common${MEDIA_HUB_SOVERSION}.install
24 #
25 # Because the debian files for the different distributions are generated on the fly,
26-# this allows us to keep a single source tree for both distributions. See ../HACKING
27-# for more explanations.
28+# this allows us to keep a single source tree for both distributions.
29 #
30
31 set -e # Fail if any command fails.
32
33 progname=$(basename $0)
34
35-[ $# -ne 1 ] && {
36- echo "usage: $progname path-to-debian-dir" >&2
37+[ $# -gt 1 ] && {
38+ echo "usage: $progname [path-to-debian-dir]" >&2
39 exit 1
40 }
41+version_dir=$(mktemp -d)
42 dir=$1
43-version_dir=$(mktemp -d)
44+
45+[ -n "$dir" ] || dir="./debian"
46
47 # Dump version numbers into files and initialize vars from those files.
48-
49 sh ${dir}/get-versions.sh ${dir} ${version_dir}
50
51-full_version=$(cat "${version_dir}"/libmedia-hub.full-version)
52-major_minor=$(cat "${version_dir}"/libmedia-hub.major-minor-version)
53-soversion=$(cat "${version_dir}"/libmedia-hub.soversion)
54-vivid_soversion=$(cat "${version_dir}"/libmedia-hub.vivid-soversion)
55-
56-warning=$(mktemp -t gen-debian-files-msg.XXX)
57-
58-trap "rm -fr $warning $version_dir" 0 INT TERM QUIT
59-
60-warning_msg()
61+export MEDIA_HUB_SOVERSION=$(cat "$version_dir/libmedia-hub.soversion")
62+
63+trap "rm -fr $version_dir" 0 INT TERM QUIT
64+
65+process()
66 {
67- cat >$warning <<EOF
68+ cat <<EOF
69 # This file is autogenerated. DO NOT EDIT!
70 #
71 # Modifications should be made to $(basename "$1") instead.
72 # This file is regenerated automatically in the clean target.
73 #
74 EOF
75-}
76-
77-# Generate debian/control from debian/control.in, substituting the soversion for both libs.
78-# For wily onwards, we also add an entry for the vivid versions to "Conflicts:" and "Replaces:".
79-
80-infile="${dir}"/control.in
81-outfile="${dir}"/control
82-warning_msg $infile
83-cat $warning $infile \
84- | sed -e "s/@MEDIA_HUB_SOVERSION@/${soversion}/" > "$outfile"
85-
86-[ "$distro" != "vivid" ] && {
87- sed -i -e "/Replaces: libdbus-cpp4,/a\
88-\ libdbus-cpp${vivid_soversion}," \
89- "$outfile"
90-}
91-
92-# Generate the install files, naming them according to the soversion.
93-
94-# Install file for binary package
95-infile="${dir}"/libmedia-hub-client.install.in
96-outfile="${dir}"/libmedia-hub-client${soversion}.install
97-warning_msg "$infile"
98-cat $warning "$infile" >"$outfile"
99-
100-infile="${dir}"/libmedia-hub-common.install.in
101-outfile="${dir}"/libmedia-hub-common${soversion}.install
102-warning_msg "$infile"
103-cat $warning "$infile" >"$outfile"
104+ perl -pe 's/@([A-Z_]+)@/$ENV{$1} or die "$1 undefined"/eg' <"$1"
105+}
106+
107+process "$dir/control.in" >"$dir/control"
108+process "$dir/libmedia-hub-client.install.in" >"$dir/libmedia-hub-client${MEDIA_HUB_SOVERSION}.install"
109+process "$dir/libmedia-hub-common.install.in" >"$dir/libmedia-hub-common${MEDIA_HUB_SOVERSION}.install"
110
111 exit 0
112
113=== modified file 'debian/control'
114--- debian/control 2016-03-04 18:17:11 +0000
115+++ debian/control 2016-03-29 18:34:58 +0000
116@@ -20,9 +20,9 @@
117 libboost-program-options-dev (>=1.53),
118 libboost-system-dev (>=1.53),
119 libdbus-1-dev,
120- libdbus-cpp-dev (>= 5.0.0),
121+ libdbus-cpp-dev (>= 4.3.0),
122 libgoogle-glog-dev,
123- libhybris-dev,
124+ libhybris-dev (>=0.1.0+git20131207+e452e83-0ubuntu30),
125 libprocess-cpp-dev,
126 libproperties-cpp-dev,
127 libgstreamer1.0-dev,
128@@ -42,8 +42,8 @@
129 Section: libdevel
130 Architecture: any
131 Multi-Arch: same
132-Depends: libmedia-hub-common4 (= ${binary:Version}),
133- libmedia-hub-client4 (= ${binary:Version}),
134+Depends: libmedia-hub-common5 (= ${binary:Version}),
135+ libmedia-hub-client5 (= ${binary:Version}),
136 ${misc:Depends},
137 libproperties-cpp-dev,
138 Suggests: libmedia-hub-doc
139@@ -64,7 +64,7 @@
140 .
141 This package contains the runtime.
142
143-Package: libmedia-hub-common4
144+Package: libmedia-hub-common5
145 Architecture: any
146 Multi-Arch: same
147 Depends: ${misc:Depends},
148@@ -75,7 +75,7 @@
149 .
150 This package contains the common libraries.
151
152-Package: libmedia-hub-client4
153+Package: libmedia-hub-client5
154 Architecture: any
155 Multi-Arch: same
156 Depends: ${misc:Depends},
157
158=== modified file 'debian/get-versions.sh'
159--- debian/get-versions.sh 2015-11-22 21:01:02 +0000
160+++ debian/get-versions.sh 2016-03-29 18:34:58 +0000
161@@ -38,7 +38,7 @@
162 # Write the various version numbers into a bunch of files. This allows
163 # us to easily pick them up from both gen-debian-files.sh and CMakeLists.txt.
164
165-distro=$(lsb_release -c -s)
166+[ -n "$SERIES" ] || SERIES="$(lsb_release -c -s)"
167
168 full_version=$(cat "${dir}"/VERSION)
169
170@@ -51,13 +51,15 @@
171 vivid_major=$(echo $vivid_full_version | cut -d'.' -f1)
172 vivid_soversion=$vivid_major
173
174-if [ "$distro" = "vivid" ]
175+if [ "$SERIES" = "vivid" ]
176 then
177 soversion=${vivid_soversion}
178 else
179 soversion="${major}"
180 fi
181-[ -n $soversion ]
182+[ -n "$soversion" ]
183+
184+echo "Using SOVERSION $soversion in $SERIES." >&2
185
186 echo ${full_version} >${output_dir}/libmedia-hub.full-version
187 echo ${major} >${output_dir}/libmedia-hub.major-version
188
189=== modified file 'debian/rules'
190--- debian/rules 2015-11-22 21:01:02 +0000
191+++ debian/rules 2016-03-29 18:34:58 +0000
192@@ -34,5 +34,5 @@
193 dh_installdeb
194
195 override_dh_auto_clean:
196- /bin/sh $(CURDIR)/debian/gen-debian-files.sh $(CURDIR)/debian
197+ /bin/sh $(CURDIR)/debian/bileto_pre_release_hook
198 dh_auto_clean

Subscribers

People subscribed via source and target branches