Merge lp:~thomas-voss/location-service/enable-dual-landings-take-2 into lp:location-service/trunk

Proposed by Thomas Voß
Status: Merged
Approved by: Łukasz Zemczak
Approved revision: 227
Merged at revision: 226
Proposed branch: lp:~thomas-voss/location-service/enable-dual-landings-take-2
Merge into: lp:location-service/trunk
Prerequisite: lp:~thomas-voss/location-service/cherry-pick-fwd
Diff against target: 566 lines (+407/-46)
15 files modified
CMakeLists.txt (+28/-3)
debian/VERSION (+1/-0)
debian/VERSION.vivid (+1/-0)
debian/changelog (+34/-37)
debian/control (+6/-0)
debian/control.in (+123/-0)
debian/gen-debian-files.sh (+111/-0)
debian/get-versions.sh (+68/-0)
debian/libubuntu-location-service-dev.install (+5/-0)
debian/libubuntu-location-service-dev.install.in (+5/-0)
debian/libubuntu-location-service.install.in (+2/-0)
debian/libubuntu-location-service.install.with-gps.in (+3/-0)
debian/libubuntu-location-service2.install (+0/-2)
debian/libubuntu-location-service2.install.with-gps (+0/-3)
debian/rules (+20/-1)
To merge this branch: bzr merge lp:~thomas-voss/location-service/enable-dual-landings-take-2
Reviewer Review Type Date Requested Status
Łukasz Zemczak Approve
PS Jenkins bot continuous-integration Needs Fixing
Ken VanDine Needs Information
Review via email: mp+288746@code.launchpad.net

Commit message

* Enable dual landings according to https://wiki.ubuntu.com/citrain/LandingProcess#Dual-landing_for_stable_and_devel:
  * Both vivid+overlay and xenial packages are built from the same source.
  * To account for differences in major revisions (necessary to handle the g++ 5 ABI break),
    we generate install files on the fly.

Description of the change

* Enable dual landings according to https://wiki.ubuntu.com/citrain/LandingProcess#Dual-landing_for_stable_and_devel:
  * Both vivid+overlay and xenial packages are built from the same source.
  * To account for differences in major revisions (necessary to handle the g++ 5 ABI break),
    we generate install files on the fly.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
223. By Thomas Voß

Add missing files.

224. By Thomas Voß

Remove obsolete install files.
Adjust setup of major.minor.patch triplet in CMakeLists.txt.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Ken VanDine (ken-vandine) wrote :

Why both with different major version numbers for vivid and xenial? If the code is the same, I'd rather use the same major version and just make sure the package provides the old version to keep from breaking depends.

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

> Why both with different major version numbers for vivid and xenial? If the
> code is the same, I'd rather use the same major version and just make sure the
> package provides the old version to keep from breaking depends.

We can't keep the same major version due to the ABI break introduced by GCC 5 in Xenial.

225. By Thomas Voß

* Remove explicit option to disable satellite-based positioning
  services.
[ Alberto Mardegan ]
* Set debian source format to "3.0 (native)"
[ Scott Sweeny ]
* Allow providers to register themselves asynchronously (LP: #1415029)
* Account for changes in trust-store w.r.t. assembling the description
  of a trust prompt.
* Fix settings not being applied correctly.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Hey! Thanks for submitting this branch, would be nice to dual-land this.

So there's one small thing that's 'Needs Fixing' and two 'Needs Information'.

Needs Fixing:
You would need to include the changelog entry for this landing in the changelog diff here since this file has been touched. Train in such cases won't add the changelog entry based on the commit message in this case. Be sure to leave it as UNRELEASED.

Needs Information:
Small thing: I was wondering, I see we have an explicit -dbg package. Aren't those auto-generated on uploads? Just wondering if in this case we need one explicitly.
The second one is, of course, any chance for ABI compliance checking + some shlibs? ;) I suppose we export some symbols here, would be nice to have the some checks here for dual landing. Not sure how far Michi went with implementing abigail [1] in his ABI checking - I see there are some commits in their staging branch.

[1] https://sourceware.org/libabigail/

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

> Hey! Thanks for submitting this branch, would be nice to dual-land this.
>
> So there's one small thing that's 'Needs Fixing' and two 'Needs Information'.
>
> Needs Fixing:
> You would need to include the changelog entry for this landing in the
> changelog diff here since this file has been touched. Train in such cases
> won't add the changelog entry based on the commit message in this case. Be
> sure to leave it as UNRELEASED.
>

Should be fixed.

> Needs Information:
> Small thing: I was wondering, I see we have an explicit -dbg package. Aren't
> those auto-generated on uploads? Just wondering if in this case we need one
> explicitly.

It's an artifact originating in the times when the train did not offer dbgsym packages for silos.
However, I would rather prefer to keep the packaging changes introduced in this branch limited and follow up with an MP that removes the package.

> The second one is, of course, any chance for ABI compliance checking + some
> shlibs? ;) I suppose we export some symbols here, would be nice to have the
> some checks here for dual landing. Not sure how far Michi went with
> implementing abigail [1] in his ABI checking - I see there are some commits in
> their staging branch.
>

I would love to have abigail integrated and I'm happy to file and assign a critical bug for tracking the issue. That being said, I would think we shouldn't block on the lack of symbol checking. It was missing before this branch and the changes do not make the situation worse ;-)

> [1] https://sourceware.org/libabigail/

226. By Thomas Voß

* Enable dual landings according to https://wiki.ubuntu.com/citrain/LandingProcess#Dual-landing_for_stable_and_devel:
  * Both vivid+overlay and xenial packages are built from the same source.
  * To account for differences in major revisions (necessary to handle the g++ 5 ABI break), we generate install files on the fly.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Almost there! Cosmetic changes are left. The new debian/changelog entry should have lines wrapped at 80 characters. If there's a long link then it's okayish to have it >80 (since we can't cut it in-between), but otherwise lines should be wrapped. Be sure to, when you're wrapping lines, to align them correctly with the previous lines.

Lintian also mentiones some warnings during source package build, but I guess those are all old issues.

review: Needs Fixing
227. By Thomas Voß

Address review comments and tidy up line length.

Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Ok, looks goodish enough.

But please be sure to fill in a critical bug about ABI compliance!

review: Approve
228. By Thomas Voß

Pull in missing revisions to changelog.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'CMakeLists.txt'
--- CMakeLists.txt 2016-04-04 19:18:28 +0000
+++ CMakeLists.txt 2016-04-04 19:18:28 +0000
@@ -2,9 +2,34 @@
22
3project(ubuntu-location-service)3project(ubuntu-location-service)
44
5set(UBUNTU_LOCATION_SERVICE_VERSION_MAJOR 2)5# We haven't received version information via the packaging setup.
6set(UBUNTU_LOCATION_SERVICE_VERSION_MINOR 0)6# For that, we try to determine sensible values on our own, ensuring
7set(UBUNTU_LOCATION_SERVICE_VERSION_PATCH 0)7# plain old invocations to cmake still work as expected.
8if (NOT DEFINED UBUNTU_LOCATION_SERVICE_VERSION_MAJOR)
9 find_program(LSB_RELEASE lsb_release)
10 execute_process(
11 COMMAND ${LSB_RELEASE} -c -s
12 OUTPUT_VARIABLE DISTRO_CODENAME
13 OUTPUT_STRIP_TRAILING_WHITESPACE)
14
15 # We explicitly ignore errors and only check if we are building for vivid.
16 # For all other cases:
17 # - releases other than vivid
18 # - other distros
19 # - errors
20 # we define the version to be 2.0.0
21 if (${DISTRO_CODENAME} STREQUAL "vivid")
22 set(UBUNTU_LOCATION_SERVICE_VERSION_MAJOR 2)
23 set(UBUNTU_LOCATION_SERVICE_VERSION_MINOR 0)
24 set(UBUNTU_LOCATION_SERVICE_VERSION_PATCH 0)
25 else ()
26 set(UBUNTU_LOCATION_SERVICE_VERSION_MAJOR 3)
27 set(UBUNTU_LOCATION_SERVICE_VERSION_MINOR 0)
28 set(UBUNTU_LOCATION_SERVICE_VERSION_PATCH 0)
29 endif()
30endif()
31
32message(STATUS "${CMAKE_PROJECT_NAME} ${UBUNTU_LOCATION_SERVICE_VERSION_MAJOR}.${UBUNTU_LOCATION_SERVICE_VERSION_MINOR}.${UBUNTU_LOCATION_SERVICE_VERSION_PATCH}")
833
9set(UBUNTU_LOCATION_SERVICE_TRUST_STORE_SERVICE_NAME "UbuntuLocationService")34set(UBUNTU_LOCATION_SERVICE_TRUST_STORE_SERVICE_NAME "UbuntuLocationService")
1035
1136
=== added file 'debian/VERSION'
--- debian/VERSION 1970-01-01 00:00:00 +0000
+++ debian/VERSION 2016-04-04 19:18:28 +0000
@@ -0,0 +1,1 @@
13.0.0
0\ No newline at end of file2\ No newline at end of file
13
=== added file 'debian/VERSION.vivid'
--- debian/VERSION.vivid 1970-01-01 00:00:00 +0000
+++ debian/VERSION.vivid 2016-04-04 19:18:28 +0000
@@ -0,0 +1,1 @@
12.0.0
02
=== modified file 'debian/changelog'
--- debian/changelog 2016-04-04 19:18:28 +0000
+++ debian/changelog 2016-04-04 19:18:28 +0000
@@ -1,40 +1,37 @@
1location-service (2.1+15.10.20150727-0ubuntu1) wily; urgency=medium1location-service (3.0.0-0ubuntu5) UNRELEASED; urgency=medium
22
3 [ CI Train Bot ]3 * Enable dual landings according to https://wiki.ubuntu.com/citrain/LandingProcess#Dual-landing_for_stable_and_devel:
4 * New rebuild forced.4 * Both vivid+overlay and xenial packages are built from the same
55 source.
6 [ Charles Kerr ]6 * To account for differences in major revisions (necessary to handle
7 * drop build-dependency on g++-4.9 (LP: #1452329)7 the g++ 5 ABI break), we generate install files on the fly.
88
9 -- CI Train Bot <ci-train-bot@canonical.com> Mon, 27 Jul 2015 18:07:37 +00009 -- Thomas Voß <thomas.voss@canonical.com> Wed, 16 Mar 2016 20:15:57 +0100
1010
11location-service (2.1+15.10.20150706-0ubuntu1) wily; urgency=medium11location-service (3.0.0-0ubuntu4) wily-proposed; urgency=medium
1212
13 [ Alberto Aguirre ]13 * No change rebuild.
14 * No change rebuild against platform-api 314
1515 -- Ken VanDine <ken.vandine@canonical.com> Mon, 03 Aug 2015 13:33:13 -0400
16 [ CI Train Bot ]16
17 * New rebuild forced.17location-service (3.0.0-0ubuntu3) wily; urgency=medium
1818
19 -- CI Train Bot <ci-train-bot@canonical.com> Mon, 06 Jul 2015 18:22:22 +000019 * No change rebuild.
2020
21location-service (2.1+15.10.20150601.2-0ubuntu1) wily; urgency=medium21 -- Matthias Klose <doko@ubuntu.com> Fri, 31 Jul 2015 00:23:18 +0200
2222
23 [ CI Train Bot ]23location-service (3.0.0-0ubuntu2) wily; urgency=medium
24 * New rebuild forced.24
2525 * libubuntu-location-service3: Replaces libubuntu-location-service2,
26 [ Manuel de la Pena ]26 config file /etc/gps.conf in both packages.
27 * Ensure that the trust store is started when is needed.27
2828 -- Matthias Klose <doko@ubuntu.com> Thu, 30 Jul 2015 09:57:50 +0200
29 -- CI Train Bot <ci-train-bot@canonical.com> Mon, 01 Jun 2015 15:13:06 +000029
3030location-service (3.0.0) wily; urgency=medium
31location-service (2.1+15.10.20150528.3-0ubuntu1) wily; urgency=medium31
3232 * Bump major revision and fix LP:#1478750 to account for toolchain update.
33 [ Thomas Voß ]33
34 * Make sure we always hand a lock owning its mutex to34 -- Thomas Voß <thomas.voss@canonical.com> Thu, 30 Jul 2015 08:33:13 +0200
35 on_access_point_added. (LP: #1426307)
36
37 -- CI Train Bot <ci-train-bot@canonical.com> Thu, 28 May 2015 11:40:58 +0000
3835
39location-service (2.1+15.04.20160302.1-0ubuntu1) vivid; urgency=medium36location-service (2.1+15.04.20160302.1-0ubuntu1) vivid; urgency=medium
4037
4138
=== modified file 'debian/control'
--- debian/control 2015-07-15 19:04:43 +0000
+++ debian/control 2016-04-04 19:18:28 +0000
@@ -1,3 +1,8 @@
1# This file is autogenerated. DO NOT EDIT!
2#
3# Modifications should be made to control.in instead.
4# This file is regenerated automatically in the clean target.
5#
1Source: location-service6Source: location-service
2Section: utils7Section: utils
3Priority: optional8Priority: optional
@@ -27,6 +32,7 @@
27 libubuntu-platform-hardware-api-headers [!arm64 !ppc64el !powerpc],32 libubuntu-platform-hardware-api-headers [!arm64 !ppc64el !powerpc],
28 libubuntu-platform-hardware-api-dev [!arm64 !ppc64el !powerpc],33 libubuntu-platform-hardware-api-dev [!arm64 !ppc64el !powerpc],
29 libproperties-cpp-dev,34 libproperties-cpp-dev,
35 lsb-release,
30 trust-store-bin,36 trust-store-bin,
31Standards-Version: 3.9.437Standards-Version: 3.9.4
32Homepage: http://launchpad.net/location-service38Homepage: http://launchpad.net/location-service
3339
=== added file 'debian/control.in'
--- debian/control.in 1970-01-01 00:00:00 +0000
+++ debian/control.in 2016-04-04 19:18:28 +0000
@@ -0,0 +1,123 @@
1Source: location-service
2Section: utils
3Priority: optional
4Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
5XSBC-Original-Maintainer: Thomas Voß <thomas.voss@canonical.com>
6Build-Depends: cmake,
7 curl,
8 libdbus-cpp-dev (>= 4.1.0),
9 debhelper (>= 9),
10 doxygen,
11 geoclue-ubuntu-geoip,
12 google-mock (>= 1.6.0+svn437),
13 graphviz,
14 libapparmor-dev,
15 libboost-filesystem-dev,
16 libboost-program-options-dev,
17 libboost-system-dev,
18 libdbus-1-dev,
19 libdbus-cpp-dev,
20 libgoogle-glog-dev,
21 libgtest-dev,
22 libiw-dev,
23 libjson-c-dev,
24 libnet-cpp-dev,
25 libprocess-cpp-dev,
26 libtrust-store-dev,
27 libubuntu-platform-hardware-api-headers [!arm64 !ppc64el !powerpc],
28 libubuntu-platform-hardware-api-dev [!arm64 !ppc64el !powerpc],
29 libproperties-cpp-dev,
30 lsb-release,
31 trust-store-bin,
32Standards-Version: 3.9.4
33Homepage: http://launchpad.net/location-service
34# If you aren't a member of ~phablet-team but need to upload packaging changes,
35# just go ahead. ~phablet-team will notice and sync up the code again.
36Vcs-Bzr: https://code.launchpad.net/~phablet-team/location-service/trunk
37Vcs-Browser: http://bazaar.launchpad.net/~phablet-team/location-service/trunk/files
38
39Package: libubuntu-location-service@UBUNTU_LOCATION_SERVICE_SOVERSION@
40Section: libs
41Architecture: any
42Multi-Arch: same
43Pre-Depends: ${misc:Pre-Depends}
44Depends: ${misc:Depends},
45 ${shlibs:Depends},
46Description: location service aggregating position/velocity/heading
47 updates and exporting them over dbus.
48 .
49 Contains the shared library needed by client applications.
50
51Package: libubuntu-location-service-dev
52Section: libdevel
53Architecture: any
54Multi-Arch: foreign
55Recommends: ubuntu-location-service-doc,
56Depends: libubuntu-location-service@UBUNTU_LOCATION_SERVICE_SOVERSION@ (= ${binary:Version}),
57 libdbus-1-dev,
58 libdbus-cpp-dev,
59 libboost-dev,
60 ${misc:Depends},
61Suggests: ubuntu-location-service-doc,
62Description: location service aggregating position/velocity/heading
63 updates and exporting them over dbus.
64 .
65 Contains header files required to develop clients talking to the ubuntu
66 location service.
67
68Package: libubuntu-location-service-dbg
69Section: debug
70Architecture: any
71Multi-Arch: foreign
72Depends: libubuntu-location-service@UBUNTU_LOCATION_SERVICE_SOVERSION@ (= ${binary:Version}),
73 ${misc:Depends},
74Description: location service aggregating position/velocity/heading
75 updates and exporting them over dbus.
76 .
77 Contains debug symbols.
78
79Package: ubuntu-location-service-tests
80Architecture: any
81Depends: ${misc:Depends},
82 ${shlibs:Depends},
83Description: location service aggregating position/velocity/heading
84 updates and exporting them over dbus.
85 .
86 Contains all test executables
87
88Package: ubuntu-location-service-bin
89Architecture: any
90Depends: libubuntu-location-service@UBUNTU_LOCATION_SERVICE_SOVERSION@ (= ${binary:Version}),
91 ${misc:Depends},
92 ${shlibs:Depends},
93 trust-store-bin,
94Breaks: ubuntu-location-service-examples (<< 0.0.2),
95Replaces: ubuntu-location-service-examples (<< 0.0.2),
96Description: location service aggregating position/velocity/heading
97 updates and exporting them over dbus.
98 .
99 Contains the service executable and man pages.
100
101Package: ubuntu-location-service-examples
102Architecture: any
103Multi-Arch: same
104Depends: libubuntu-location-service@UBUNTU_LOCATION_SERVICE_SOVERSION@ (= ${binary:Version}),
105 ${misc:Depends},
106 ${shlibs:Depends},
107 ubuntu-location-service-doc,
108Description: location service aggregating position/velocity/heading
109 updates and exporting them over dbus.
110 .
111 Contains example service and client.
112
113Package: ubuntu-location-service-doc
114Section: doc
115Architecture: all
116Multi-Arch: foreign
117Depends: ${misc:Depends},
118 ${shlibs:Depends},
119Recommends: ubuntu-location-service-examples,
120Description: location service aggregating position/velocity/heading
121 updates and exporting them over dbus.
122 .
123 Contains documentation for service and client.
0124
=== added file 'debian/gen-debian-files.sh'
--- debian/gen-debian-files.sh 1970-01-01 00:00:00 +0000
+++ debian/gen-debian-files.sh 2016-04-04 19:18:28 +0000
@@ -0,0 +1,111 @@
1#!/bin/sh
2
3# Copyright (C) 2015 Canonical Ltd
4#
5# This program is free software: you can redistribute it and/or modify
6# it under the terms of the GNU Lesser General Public License version 3 as
7# published by the Free Software Foundation.
8#
9# This program is distributed in the hope that it will be useful,
10# but WITHOUT ANY WARRANTY; without even the implied warranty of
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12# GNU Lesser General Public License for more details.
13#
14# You should have received a copy of the GNU Lesser General Public License
15# along with this program. If not, see <http://www.gnu.org/licenses/>.
16#
17# Authored by: Michi Henning <michi.henning@canonical.com>
18# Thomas Voß <thomas.voss@canonical.com>
19
20#
21# Script to generate debian files for dual landing in Vivid (gcc 4.9 ABI)
22# and Wily and later (gcc 5 ABI).
23#
24# This script is called from debian/rules and generates:
25#
26# - control
27# - libubuntu-location-service${soversion}.install.${target_arch}
28#
29# For all but control, this is a straight substition and/or renaming exercise for each file.
30# For control, if building on Wily or later, we also fix the "Replaces:" and "Conflicts:"
31# entries, so we don't end up with two packages claiming ownership of the same places
32# in the file system.
33#
34# Because the debian files for the different distributions are generated on the fly,
35# this allows us to keep a single source tree for both distributions. See ../HACKING
36# for more explanations.
37#
38
39set -e # Fail if any command fails.
40
41progname=$(basename $0)
42
43[ $# -ne 1 ] && {
44 echo "usage: $progname path-to-debian-dir" >&2
45 exit 1
46}
47dir=$1
48version_dir=$(mktemp -d)
49
50# Dump version numbers into files and initialize vars from those files.
51
52sh ${dir}/get-versions.sh ${dir} ${version_dir}
53
54full_version=$(cat "${version_dir}"/libubuntu-location-service.full-version)
55major_minor=$(cat "${version_dir}"/libubuntu-location-service.major-minor-version)
56soversion=$(cat "${version_dir}"/libubuntu-location-service.soversion)
57vivid_soversion=$(cat "${version_dir}"/libubuntu-location-service.vivid-soversion)
58
59warning=$(mktemp -t gen-debian-files-msg.XXX)
60
61trap "rm -fr $warning $version_dir" 0 INT TERM QUIT
62
63warning_msg()
64{
65 cat >$warning <<EOF
66# This file is autogenerated. DO NOT EDIT!
67#
68# Modifications should be made to $(basename "$1") instead.
69# This file is regenerated automatically in the clean target.
70#
71EOF
72}
73
74# Generate debian/control from debian/control.in, substituting the soversion for both libs.
75# For wily onwards, we also add an entry for the vivid versions to "Conflicts:" and "Replaces:".
76
77infile="${dir}"/control.in
78outfile="${dir}"/control
79warning_msg $infile
80cat $warning $infile \
81 | sed -e "s/@UBUNTU_LOCATION_SERVICE_SOVERSION@/${soversion}/" > "$outfile"
82
83[ "$distro" != "vivid" ] && {
84 sed -i -e "/Replaces: libubuntu-location-service2,/a\
85\ libubuntu-location-service${vivid_soversion}," \
86 "$outfile"
87}
88
89# Generate the install files, naming them according to the soversion.
90
91# Install file for binary package
92infile="${dir}"/libubuntu-location-service.install.in
93outfile="${dir}"/libubuntu-location-service${soversion}.install
94warning_msg "$infile"
95cat $warning "$infile" >"$outfile"
96
97infile="${dir}"/libubuntu-location-service.install.with-gps.in
98outfile="${dir}"/libubuntu-location-service${soversion}.install.with-gps
99warning_msg "$infile"
100cat $warning "$infile" >"$outfile"
101
102infile="${dir}"/libubuntu-location-service-dev.install.in
103outfile="${dir}"/libubuntu-location-service-dev.install
104warning_msg "$infile"
105cat $warning $infile | sed -e "s/@UBUNTU_LOCATION_SERVICE_SOVERSION@/${soversion}/" > "$outfile"
106
107ln -s "${dir}"/libubuntu-location-service${soversion}.install.with-gps "${dir}"/libubuntu-location-service${soversion}.install.amd64
108ln -s "${dir}"/libubuntu-location-service${soversion}.install.with-gps "${dir}"/libubuntu-location-service${soversion}.install.armhf
109ln -s "${dir}"/libubuntu-location-service${soversion}.install.with-gps "${dir}"/libubuntu-location-service${soversion}.install.i386
110
111exit 0
0112
=== added file 'debian/get-versions.sh'
--- debian/get-versions.sh 1970-01-01 00:00:00 +0000
+++ debian/get-versions.sh 2016-04-04 19:18:28 +0000
@@ -0,0 +1,68 @@
1#!/bin/sh
2
3# Copyright (C) 2015 Canonical Ltd
4#
5# This program is free software: you can redistribute it and/or modify
6# it under the terms of the GNU Lesser General Public License version 3 as
7# published by the Free Software Foundation.
8#
9# This program is distributed in the hope that it will be useful,
10# but WITHOUT ANY WARRANTY; without even the implied warranty of
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12# GNU Lesser General Public License for more details.
13#
14# You should have received a copy of the GNU Lesser General Public License
15# along with this program. If not, see <http://www.gnu.org/licenses/>.
16#
17# Authored by: Michi Henning <michi.henning@canonical.com>
18
19#
20# Script to read the version numbers from VERSION and QT-VERSION
21# and write the version components and the soversion numbers
22# into separate files, so we can pick them up from both
23# gen-debian-files.sh and CMakeLists.txt.
24#
25
26set -e # Fail if any command fails.
27
28progname=$(basename $0)
29
30[ $# -lt 1 -o $# -gt 2 ] && {
31 echo "usage: $progname path-to-debian-dir [output-dir]" >&2
32 exit 1
33}
34dir=$1
35output_dir=`pwd`
36[ $# -eq 2 ] && output_dir=$2
37
38# Write the various version numbers into a bunch of files. This allows
39# us to easily pick them up from both gen-debian-files.sh and CMakeLists.txt.
40
41distro=$(lsb_release -c -s)
42
43full_version=$(cat "${dir}"/VERSION)
44
45major=$(echo $full_version | cut -d'.' -f1)
46minor=$(echo $full_version | cut -d'.' -f2)
47micro=$(echo $full_version | cut -d'.' -f3)
48major_minor="${major}.${minor}"
49
50vivid_full_version=$(cat "${dir}"/VERSION.vivid)
51vivid_major=$(echo $vivid_full_version | cut -d'.' -f1)
52vivid_soversion=$vivid_major
53
54if [ "$distro" = "vivid" ]
55then
56 soversion=${vivid_soversion}
57else
58 soversion="${major}"
59fi
60[ -n $soversion ]
61
62echo ${full_version} >${output_dir}/libubuntu-location-service.full-version
63echo ${major} >${output_dir}/libubuntu-location-service.major-version
64echo ${minor} >${output_dir}/libubuntu-location-service.minor-version
65echo ${micro} >${output_dir}/libubuntu-location-service.micro-version
66echo ${major_minor} >${output_dir}/libubuntu-location-service.major-minor-version
67echo ${soversion} >${output_dir}/libubuntu-location-service.soversion
68echo ${vivid_soversion} >${output_dir}/libubuntu-location-service.vivid-soversion
069
=== modified file 'debian/libubuntu-location-service-dev.install'
--- debian/libubuntu-location-service-dev.install 2014-07-18 14:42:10 +0000
+++ debian/libubuntu-location-service-dev.install 2016-04-04 19:18:28 +0000
@@ -1,3 +1,8 @@
1# This file is autogenerated. DO NOT EDIT!
2#
3# Modifications should be made to libubuntu-location-service-dev.install.in instead.
4# This file is regenerated automatically in the clean target.
5#
1usr/include/ubuntu-location-service-26usr/include/ubuntu-location-service-2
2usr/lib/*/libubuntu-location-service.so7usr/lib/*/libubuntu-location-service.so
3usr/lib/*/libubuntu-location-service-connectivity.so8usr/lib/*/libubuntu-location-service-connectivity.so
49
=== added file 'debian/libubuntu-location-service-dev.install.in'
--- debian/libubuntu-location-service-dev.install.in 1970-01-01 00:00:00 +0000
+++ debian/libubuntu-location-service-dev.install.in 2016-04-04 19:18:28 +0000
@@ -0,0 +1,5 @@
1usr/include/ubuntu-location-service-@UBUNTU_LOCATION_SERVICE_SOVERSION@
2usr/lib/*/libubuntu-location-service.so
3usr/lib/*/libubuntu-location-service-connectivity.so
4usr/lib/*/pkgconfig/ubuntu-location-service.pc
5usr/lib/*/pkgconfig/ubuntu-location-service-connectivity.pc
06
=== added file 'debian/libubuntu-location-service.install.in'
--- debian/libubuntu-location-service.install.in 1970-01-01 00:00:00 +0000
+++ debian/libubuntu-location-service.install.in 2016-04-04 19:18:28 +0000
@@ -0,0 +1,2 @@
1usr/lib/*/libubuntu-location-service.so.*
2usr/lib/*/libubuntu-location-service-connectivity.so.*
03
=== added file 'debian/libubuntu-location-service.install.with-gps.in'
--- debian/libubuntu-location-service.install.with-gps.in 1970-01-01 00:00:00 +0000
+++ debian/libubuntu-location-service.install.with-gps.in 2016-04-04 19:18:28 +0000
@@ -0,0 +1,3 @@
1usr/lib/*/libubuntu-location-service.so.*
2usr/lib/*/libubuntu-location-service-connectivity.so.*
3/etc/gps.conf
04
=== removed file 'debian/libubuntu-location-service2.install'
--- debian/libubuntu-location-service2.install 2014-07-30 13:55:44 +0000
+++ debian/libubuntu-location-service2.install 1970-01-01 00:00:00 +0000
@@ -1,2 +0,0 @@
1usr/lib/*/libubuntu-location-service.so.*
2usr/lib/*/libubuntu-location-service-connectivity.so.*
30
=== removed symlink 'debian/libubuntu-location-service2.install.amd64'
=== target was u'libubuntu-location-service2.install.with-gps'
=== removed symlink 'debian/libubuntu-location-service2.install.armhf'
=== target was u'libubuntu-location-service2.install.with-gps'
=== removed symlink 'debian/libubuntu-location-service2.install.i386'
=== target was u'libubuntu-location-service2.install.with-gps'
=== removed file 'debian/libubuntu-location-service2.install.with-gps'
--- debian/libubuntu-location-service2.install.with-gps 2014-07-30 13:55:44 +0000
+++ debian/libubuntu-location-service2.install.with-gps 1970-01-01 00:00:00 +0000
@@ -1,3 +0,0 @@
1usr/lib/*/libubuntu-location-service.so.*
2usr/lib/*/libubuntu-location-service-connectivity.so.*
3/etc/gps.conf
40
=== modified file 'debian/rules'
--- debian/rules 2015-07-15 19:04:43 +0000
+++ debian/rules 2016-04-04 19:18:28 +0000
@@ -15,6 +15,18 @@
1515
16include /usr/share/dpkg/default.mk16include /usr/share/dpkg/default.mk
1717
18distro=$(shell lsb_release -c -s)
19
20ifeq ($(distro),vivid)
21 full_version=$(shell cat $(CURDIR)/debian/VERSION.vivid)
22else
23 full_version=$(shell cat $(CURDIR)/debian/VERSION)
24endif
25
26major=$(shell echo $(full_version) | cut -d'.' -f1)
27minor=$(shell echo $(full_version) | cut -d'.' -f2)
28patch=$(shell echo $(full_version) | cut -d'.' -f3)
29
18ifneq (,$(filter $(DEB_HOST_ARCH),ppc64el powerpc arm64))30ifneq (,$(filter $(DEB_HOST_ARCH),ppc64el powerpc arm64))
19 LOCATION_SERVICE_ENABLE_GPS_PROVIDER = OFF31 LOCATION_SERVICE_ENABLE_GPS_PROVIDER = OFF
20else32else
@@ -31,4 +43,11 @@
31 dh_strip --dbg-package=libubuntu-location-service-dbg43 dh_strip --dbg-package=libubuntu-location-service-dbg
3244
33override_dh_auto_configure:45override_dh_auto_configure:
34 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)46 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)
47
48override_dh_auto_clean:
49 rm -f $(CURDIR)/debian/libubuntu-location-service$(major).install.amd64
50 rm -f $(CURDIR)/debian/libubuntu-location-service$(major).install.armhf
51 rm -f $(CURDIR)/debian/libubuntu-location-service$(major).install.i386
52 /bin/sh $(CURDIR)/debian/gen-debian-files.sh $(CURDIR)/debian
53 dh_auto_clean

Subscribers

People subscribed via source and target branches