Merge lp:~robru/location-service/pre_release_hook into lp:location-service/trunk

Proposed by Robert Bruce Park
Status: Merged
Merged at revision: 273
Proposed branch: lp:~robru/location-service/pre_release_hook
Merge into: lp:location-service/trunk
Prerequisite: lp:~thomas-voss/location-service/enable-dual-landings-take-2
Diff against target: 227 lines (+34/-73)
5 files modified
debian/bileto_pre_release_hook (+23/-59)
debian/control (+5/-5)
debian/get-versions.sh (+4/-4)
debian/libubuntu-location-service-dev.install (+1/-1)
debian/rules (+1/-4)
To merge this branch: bzr merge lp:~robru/location-service/pre_release_hook
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Approve
Robert Bruce Park (community) Approve
Thomas Voß (community) Needs Fixing
Review via email: mp+291017@code.launchpad.net

This proposal supersedes a proposal from 2016-04-05.

Commit message

Use new bileto_pre_release_hook.

Description of the change

Train behaviour has changed; this change is required for all future builds of location-service in CI Train.

To post a comment you must log in.
231. By Robert Bruce Park

Simplify symlinks.

Revision history for this message
Robert Bruce Park (robru) wrote :

Untested, but based off near-identical changes I made on 6 other projects, so should work.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Robert Bruce Park (robru) wrote :

(failure unrelated to these simple packaging changes)

Revision history for this message
Thomas Voß (thomas-voss) wrote :

With the MP applied in https://requests.ci-train.ubuntu.com/#/ticket/1099, the build fails for both vivid and xenial, with the packaging setup complaining about etc/gps.conf being present in the build dir, but not installed to anywhere. The file itself is required and it should definitely be installed.

review: Needs Fixing
232. By Robert Bruce Park

Fix ln.

Revision history for this message
Robert Bruce Park (robru) wrote :

Ok, fix confirmed locally & pushed, please re-add this to the silo and rebuild.

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)

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 2016-03-11 11:01:55 +0000
3+++ debian/bileto_pre_release_hook 2016-04-12 06:37:06 +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@@ -27,85 +28,48 @@
13 # - libubuntu-location-service${soversion}.install.${target_arch}
14 #
15 # For all but control, this is a straight substition and/or renaming exercise for each file.
16-# For control, if building on Wily or later, we also fix the "Replaces:" and "Conflicts:"
17-# entries, so we don't end up with two packages claiming ownership of the same places
18-# in the file system.
19-#
20-# Because the debian files for the different distributions are generated on the fly,
21-# this allows us to keep a single source tree for both distributions. See ../HACKING
22-# for more explanations.
23 #
24
25 set -e # Fail if any command fails.
26
27 progname=$(basename $0)
28
29-[ $# -ne 1 ] && {
30- echo "usage: $progname path-to-debian-dir" >&2
31+[ $# -gt 1 ] && {
32+ echo "usage: $progname [path-to-debian-dir]" >&2
33 exit 1
34 }
35 dir=$1
36 version_dir=$(mktemp -d)
37
38+[ -n "$dir" ] || dir="./debian"
39+[ -n "$SERIES" ] || SERIES="$(lsb_release -c -s)"
40+
41 # Dump version numbers into files and initialize vars from those files.
42-
43 sh ${dir}/get-versions.sh ${dir} ${version_dir}
44
45-full_version=$(cat "${version_dir}"/libubuntu-location-service.full-version)
46-major_minor=$(cat "${version_dir}"/libubuntu-location-service.major-minor-version)
47-soversion=$(cat "${version_dir}"/libubuntu-location-service.soversion)
48-vivid_soversion=$(cat "${version_dir}"/libubuntu-location-service.vivid-soversion)
49-
50-warning=$(mktemp -t gen-debian-files-msg.XXX)
51-
52-trap "rm -fr $warning $version_dir" 0 INT TERM QUIT
53-
54-warning_msg()
55+export UBUNTU_LOCATION_SERVICE_SOVERSION=$(cat $version_dir/libubuntu-location-service.soversion)
56+
57+trap "rm -fr $version_dir" 0 INT TERM QUIT
58+
59+process()
60 {
61- cat >$warning <<EOF
62+ cat <<EOF
63 # This file is autogenerated. DO NOT EDIT!
64 #
65 # Modifications should be made to $(basename "$1") instead.
66 # This file is regenerated automatically in the clean target.
67 #
68 EOF
69-}
70-
71-# Generate debian/control from debian/control.in, substituting the soversion for both libs.
72-# For wily onwards, we also add an entry for the vivid versions to "Conflicts:" and "Replaces:".
73-
74-infile="${dir}"/control.in
75-outfile="${dir}"/control
76-warning_msg $infile
77-cat $warning $infile \
78- | sed -e "s/@UBUNTU_LOCATION_SERVICE_SOVERSION@/${soversion}/" > "$outfile"
79-
80-[ "$distro" != "vivid" ] && {
81- sed -i -e "/Replaces: libubuntu-location-service2,/a\
82-\ libubuntu-location-service${vivid_soversion}," \
83- "$outfile"
84-}
85-
86-# Generate the install files, naming them according to the soversion.
87-
88-# Install file for binary package
89-infile="${dir}"/libubuntu-location-service.install.in
90-outfile="${dir}"/libubuntu-location-service${soversion}.install
91-warning_msg "$infile"
92-cat $warning "$infile" >"$outfile"
93-
94-infile="${dir}"/libubuntu-location-service.install.with-gps.in
95-outfile="${dir}"/libubuntu-location-service${soversion}.install.with-gps
96-warning_msg "$infile"
97-cat $warning "$infile" >"$outfile"
98-
99-infile="${dir}"/libubuntu-location-service-dev.install.in
100-outfile="${dir}"/libubuntu-location-service-dev.install
101-warning_msg "$infile"
102-cat $warning $infile | sed -e "s/@UBUNTU_LOCATION_SERVICE_SOVERSION@/${soversion}/" > "$outfile"
103-
104-ln -s "${dir}"/libubuntu-location-service${soversion}.install.with-gps "${dir}"/libubuntu-location-service${soversion}.install.amd64
105-ln -s "${dir}"/libubuntu-location-service${soversion}.install.with-gps "${dir}"/libubuntu-location-service${soversion}.install.armhf
106-ln -s "${dir}"/libubuntu-location-service${soversion}.install.with-gps "${dir}"/libubuntu-location-service${soversion}.install.i386
107+ perl -pe 's/@([A-Z_]+)@/$ENV{$1} or die "$1 undefined"/eg' <"$1"
108+}
109+
110+process "$dir/control.in" >"$dir/control"
111+process "$dir/libubuntu-location-service.install.in" >"$dir/libubuntu-location-service${UBUNTU_LOCATION_SERVICE_SOVERSION}.install"
112+process "$dir/libubuntu-location-service.install.with-gps.in" >"$dir/libubuntu-location-service${UBUNTU_LOCATION_SERVICE_SOVERSION}.install.with-gps"
113+process "$dir/libubuntu-location-service-dev.install.in" >"$dir/libubuntu-location-service-dev.install"
114+
115+ln -vsf "libubuntu-location-service${UBUNTU_LOCATION_SERVICE_SOVERSION}.install.with-gps" "$dir/libubuntu-location-service${UBUNTU_LOCATION_SERVICE_SOVERSION}.install.amd64"
116+ln -vsf "libubuntu-location-service${UBUNTU_LOCATION_SERVICE_SOVERSION}.install.with-gps" "$dir/libubuntu-location-service${UBUNTU_LOCATION_SERVICE_SOVERSION}.install.armhf"
117+ln -vsf "libubuntu-location-service${UBUNTU_LOCATION_SERVICE_SOVERSION}.install.with-gps" "$dir/libubuntu-location-service${UBUNTU_LOCATION_SERVICE_SOVERSION}.install.i386"
118
119 exit 0
120
121=== modified file 'debian/control'
122--- debian/control 2016-03-11 10:00:24 +0000
123+++ debian/control 2016-04-12 06:37:06 +0000
124@@ -41,7 +41,7 @@
125 Vcs-Bzr: https://code.launchpad.net/~phablet-team/location-service/trunk
126 Vcs-Browser: http://bazaar.launchpad.net/~phablet-team/location-service/trunk/files
127
128-Package: libubuntu-location-service2
129+Package: libubuntu-location-service3
130 Section: libs
131 Architecture: any
132 Multi-Arch: same
133@@ -58,7 +58,7 @@
134 Architecture: any
135 Multi-Arch: foreign
136 Recommends: ubuntu-location-service-doc,
137-Depends: libubuntu-location-service2 (= ${binary:Version}),
138+Depends: libubuntu-location-service3 (= ${binary:Version}),
139 libdbus-1-dev,
140 libdbus-cpp-dev,
141 libboost-dev,
142@@ -74,7 +74,7 @@
143 Section: debug
144 Architecture: any
145 Multi-Arch: foreign
146-Depends: libubuntu-location-service2 (= ${binary:Version}),
147+Depends: libubuntu-location-service3 (= ${binary:Version}),
148 ${misc:Depends},
149 Description: location service aggregating position/velocity/heading
150 updates and exporting them over dbus.
151@@ -92,7 +92,7 @@
152
153 Package: ubuntu-location-service-bin
154 Architecture: any
155-Depends: libubuntu-location-service2 (= ${binary:Version}),
156+Depends: libubuntu-location-service3 (= ${binary:Version}),
157 ${misc:Depends},
158 ${shlibs:Depends},
159 trust-store-bin,
160@@ -106,7 +106,7 @@
161 Package: ubuntu-location-service-examples
162 Architecture: any
163 Multi-Arch: same
164-Depends: libubuntu-location-service2 (= ${binary:Version}),
165+Depends: libubuntu-location-service3 (= ${binary:Version}),
166 ${misc:Depends},
167 ${shlibs:Depends},
168 ubuntu-location-service-doc,
169
170=== modified file 'debian/get-versions.sh'
171--- debian/get-versions.sh 2016-03-11 11:01:55 +0000
172+++ debian/get-versions.sh 2016-04-12 06:37:06 +0000
173@@ -36,9 +36,9 @@
174 [ $# -eq 2 ] && output_dir=$2
175
176 # Write the various version numbers into a bunch of files. This allows
177-# us to easily pick them up from both gen-debian-files.sh and CMakeLists.txt.
178+# us to easily pick them up from both bileto_pre_release_hook and CMakeLists.txt.
179
180-distro=$(lsb_release -c -s)
181+[ -n "$SERIES" ] || SERIES="$(lsb_release -c -s)"
182
183 full_version=$(cat "${dir}"/VERSION)
184
185@@ -51,13 +51,13 @@
186 vivid_major=$(echo $vivid_full_version | cut -d'.' -f1)
187 vivid_soversion=$vivid_major
188
189-if [ "$distro" = "vivid" ]
190+if [ "$SERIES" = "vivid" ]
191 then
192 soversion=${vivid_soversion}
193 else
194 soversion="${major}"
195 fi
196-[ -n $soversion ]
197+[ -n "$soversion" ]
198
199 echo ${full_version} >${output_dir}/libubuntu-location-service.full-version
200 echo ${major} >${output_dir}/libubuntu-location-service.major-version
201
202=== modified file 'debian/libubuntu-location-service-dev.install'
203--- debian/libubuntu-location-service-dev.install 2016-03-11 10:00:24 +0000
204+++ debian/libubuntu-location-service-dev.install 2016-04-12 06:37:06 +0000
205@@ -3,7 +3,7 @@
206 # Modifications should be made to libubuntu-location-service-dev.install.in instead.
207 # This file is regenerated automatically in the clean target.
208 #
209-usr/include/ubuntu-location-service-2
210+usr/include/ubuntu-location-service-3
211 usr/lib/*/libubuntu-location-service.so
212 usr/lib/*/libubuntu-location-service-connectivity.so
213 usr/lib/*/pkgconfig/ubuntu-location-service.pc
214
215=== modified file 'debian/rules'
216--- debian/rules 2016-03-11 10:00:24 +0000
217+++ debian/rules 2016-04-12 06:37:06 +0000
218@@ -46,8 +46,5 @@
219 dh_auto_configure -- -DCMAKE_INSTALL_LIBEXECDIR=/usr/lib/$(DEB_HOST_MULTIARCH)/ubuntu-location-service -DCMAKE_C_COMPILER=$(CC) -DCMAKE_CXX_COMPILER=$(CXX) -DLOCATION_SERVICE_ENABLE_GPS_PROVIDER=$(LOCATION_SERVICE_ENABLE_GPS_PROVIDER) -DUBUNTU_LOCATION_SERVICE_VERSION_MAJOR=$(major) -DUBUNTU_LOCATION_SERVICE_VERSION_MINOR=$(minor) -DUBUNTU_LOCATION_SERVICE_VERSION_PATCH=$(patch)
220
221 override_dh_auto_clean:
222- rm -f $(CURDIR)/debian/libubuntu-location-service$(major).install.amd64
223- rm -f $(CURDIR)/debian/libubuntu-location-service$(major).install.armhf
224- rm -f $(CURDIR)/debian/libubuntu-location-service$(major).install.i386
225- /bin/sh $(CURDIR)/debian/gen-debian-files.sh $(CURDIR)/debian
226+ /bin/sh $(CURDIR)/debian/bileto_pre_release_hook
227 dh_auto_clean

Subscribers

People subscribed via source and target branches