Merge ~morphis/libhybris/+git/libhybris-ubuntu:gcc-47-for-vivid-only into ~libhybris-maintainers/libhybris/+git/libhybris:master

Proposed by Simon Fels on 2016-03-07
Status: Merged
Approved by: Simon Fels on 2016-03-07
Approved revision: c0c6bff5cd182a0999ac1dc9eca49e47f0449259
Merged at revision: 221bf7075b46a1486b8cda662ad5d255ec31f247
Proposed branch: ~morphis/libhybris/+git/libhybris-ubuntu:gcc-47-for-vivid-only
Merge into: ~libhybris-maintainers/libhybris/+git/libhybris:master
Diff against target: 249 lines (+198/-3)
3 files modified
debian/control (+4/-2)
debian/control.in (+175/-0)
debian/rules (+19/-1)
Reviewer Review Type Date Requested Status
Łukasz Zemczak (community) Approve on 2016-03-07
Alfonso Sanchez-Beato (community) Approve on 2016-03-07
Libhybris Maintainers 2016-03-07 Pending
Review via email: mp+288238@code.launchpad.net

Description of the Change

debian: adjust our build depends depending which distro we build for

On vivid we still depend on gcc 4.7 and can't switch yet to a newer
toolchain as this causes silent ABI regressions we didn't ruled out
yet. On newer distro 4.7 was removed from the archive so we have to
used a newer toolchain.

This change auto generates debian/control from a template in debian/
control.in and adds the build-dep on gcc-4.7/g++-4.7 on demand.

To post a comment you must log in.

As now debian/control is auto-generated we should

1. Remove it from version control
2. Add to .gitignore

Also, one question, how difficult will it be to remove the dependency on gcc 4.7? Do we already know what needs to be done to fix that?

review: Needs Fixing
Simon Fels (morphis) wrote :

We can't remove debian/control as debuild/dpkg-buildpackage expect it to be present to start the packge build process. However as first step in the packaging procress we're overriding debian/control with the autogenerated one which then is used for all other parts.

Dropping the dependency on gcc 4.7 needs some in deep investigation. We already tried it once but discovered some mysterious problems with the GPS HAL. That is on hold for now.

Łukasz Zemczak (sil2100) wrote :

Looks good in overall. One thing I would personally recommend is that in override_dh_auto_clean at the end you should still probably call dh_auto_clean - you call dh_clean which is good, but it's best to call the method that we actually override (extend) here. And I would remove the two unneeded debug echo's in debian/control generation.

Anyway, it's as Simon said, a debian/control dummy is required here. It's a bit confusing for people but yeah, not really any other solid way here.

Simon Fels (morphis) wrote :

Fixed Lukasz review comments.

review: Approve
Łukasz Zemczak (sil2100) wrote :

Looks goodish. +1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/debian/control b/debian/control
2index 50ae6e7..6f3ed3a 100644
3--- a/debian/control
4+++ b/debian/control
5@@ -1,3 +1,7 @@
6+# This file is autogenerated. DO NOT EDIT!
7+#
8+# Modifications should be made to debian/control.in instead.
9+# This file is regenerated automatically in the clean target.
10 Source: libhybris
11 Priority: extra
12 Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
13@@ -5,8 +9,6 @@ Build-Depends: debhelper (>= 9.0.0),
14 autotools-dev,
15 dh-autoreconf,
16 android-headers (>= 4.4.2),
17- gcc-4.7,
18- g++-4.7,
19 quilt,
20 pkg-config,
21 libgles2-mesa-dev,
22diff --git a/debian/control.in b/debian/control.in
23new file mode 100644
24index 0000000..e500840
25--- /dev/null
26+++ b/debian/control.in
27@@ -0,0 +1,175 @@
28+Source: libhybris
29+Priority: extra
30+Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
31+Build-Depends: debhelper (>= 9.0.0),
32+ autotools-dev,
33+ dh-autoreconf,
34+ android-headers (>= 4.4.2),
35+ @EXTRA_BUILD_DEPENDS@
36+ quilt,
37+ pkg-config,
38+ libgles2-mesa-dev,
39+ libwayland-dev
40+Standards-Version: 3.9.5
41+Section: libs
42+Vcs-Git: https://git.launchpad.net/~libhybris-maintainers/libhybris/+git/libhybris
43+Vcs-Browser: https://git.launchpad.net/~libhybris-maintainers/libhybris/+git/libhybris/
44+
45+Package: libandroid-properties1
46+Architecture: armhf i386 amd64
47+Depends: ${shlibs:Depends},
48+ ${misc:Depends}
49+Description: Library to provide access to get, set and list Android properties
50+ Contains a library that provides access to get, set and list Android
51+ properties, which can be used by any Ubuntu app that needs to probe
52+ for properties (gps, modem, device specifics).
53+
54+Package: libandroid-properties-dev
55+Section: libdevel
56+Architecture: armhf i386 amd64
57+Depends: libandroid-properties1 (= ${binary:Version}),
58+ ${misc:Depends}
59+Description: Development headers files for libandroid-properties
60+ Contains the development files for use in applications that wants to get,
61+ set or list the Android properties.
62+
63+Package: libmedia1
64+Architecture: armhf i386 amd64
65+Depends: ${shlibs:Depends},
66+ ${misc:Depends}
67+Replaces: libhybris (<< 0.1.0+git20130606+c5d897a-0ubuntu24)
68+Breaks: libhybris (<< 0.1.0+git20130606+c5d897a-0ubuntu24)
69+Description: Library to provide access to the Android Media HAL
70+ Contains a library that provides access to the Android Media HAL,
71+ which abstract the access to the Android libstagefright based
72+ decoders.
73+ .
74+ Hybris is a solution that allows the use of bionic-based HW adaptations in
75+ glibc systems.
76+
77+Package: libmedia-dev
78+Section: libdevel
79+Architecture: armhf i386 amd64
80+Depends: libmedia1 (= ${binary:Version}),
81+ android-headers (>= 4.4.2),
82+ ${misc:Depends}
83+Replaces: libhybris-dev (<< 0.1.0+git20130606+c5d897a-0ubuntu24)
84+Breaks: libhybris-dev (<< 0.1.0+git20130606+c5d897a-0ubuntu24)
85+Description: Development files for libmedia
86+ Contains the development files for the Android Media HAL, which
87+ abstract the access to the Android libstagefright based decoders.
88+ .
89+ Hybris is a solution that allows the use of bionic-based HW adaptations in
90+ glibc systems.
91+
92+Package: libhardware2
93+Architecture: armhf i386 amd64
94+Depends: ${shlibs:Depends},
95+ ${misc:Depends}
96+Replaces: libhybris (<< 0.1.0+git20130606+c5d897a-0ubuntu13)
97+Breaks: libhybris (<< 0.1.0+git20130606+c5d897a-0ubuntu13)
98+Description: Library to provide access to the Android libhardware HAL
99+ Contains a library that provides access to the Android libhardware HAL,
100+ which can be used to access a wide range of other HALs, such as audio,
101+ power, gralloc, etc.
102+ .
103+ Hybris is a solution that allows the use of bionic-based HW adaptations in
104+ glibc systems.
105+
106+Package: libhardware-dev
107+Section: libdevel
108+Architecture: armhf i386 amd64
109+Depends: libhardware2 (= ${binary:Version}),
110+ android-headers (>= 4.4.2),
111+ ${misc:Depends}
112+Replaces: libhybris-dev (<< 0.1.0+git20130606+c5d897a-0ubuntu13)
113+Breaks: libhybris-dev (<< 0.1.0+git20130606+c5d897a-0ubuntu13)
114+Description: Development files for libhardware
115+ Contains the development files for the Android libhardware HAL, which can
116+ be used to access a wide range of other HALs, such as audio, power,
117+ gralloc, etc.
118+ .
119+ Hybris is a solution that allows the use of bionic-based HW adaptations in
120+ glibc systems.
121+
122+Package: libhybris-common1
123+Architecture: armhf i386 amd64
124+Depends: ${shlibs:Depends},
125+ ${misc:Depends}
126+Replaces: libhybris (<< 0.1.0+git20130606+c5d897a-0ubuntu13)
127+Breaks: libhybris (<< 0.1.0+git20130606+c5d897a-0ubuntu13)
128+Description: Common library that contains the Android linker and custom hooks
129+ Contains a common library that contains the Android linker, used to
130+ dynamically load and use symbols from Android based libraries.
131+ .
132+ Hybris is a solution that allows the use of bionic-based HW adaptations in
133+ glibc systems.
134+
135+Package: libhybris-common-dev
136+Section: libdevel
137+Architecture: armhf i386 amd64
138+Depends: libhybris-common1 (= ${binary:Version}),
139+ ${misc:Depends}
140+Replaces: libhybris-dev (<< 0.1.0+git20130606+c5d897a-0ubuntu13)
141+Breaks: libhybris-dev (<< 0.1.0+git20130606+c5d897a-0ubuntu13)
142+Description: Development files for libhybris-common
143+ Contains the development files for the common library that contains the
144+ Android linker, used to dynamically load and use symbols from Android
145+ based libraries.
146+ .
147+ Hybris is a solution that allows the use of bionic-based HW adaptations in
148+ glibc systems.
149+
150+Package: libhybris
151+Architecture: armhf i386 amd64
152+Depends: libandroid-properties1 (= ${binary:Version}),
153+ libhardware2,
154+ libmedia1,
155+ ${shlibs:Depends},
156+ ${misc:Depends}
157+Description: Allows to run bionic-based HW adaptations in glibc systems - libs
158+ Hybris is a solution that allows the use of bionic-based HW adaptations in
159+ glibc systems.
160+
161+Package: libhybris-dev
162+Section: libdevel
163+Architecture: armhf i386 amd64
164+Depends: libhybris (= ${binary:Version}),
165+ android-headers (>= 4.4.2),
166+ libandroid-properties-dev (= ${binary:Version}),
167+ libhardware-dev (= ${binary:Version}),
168+ libmedia-dev (= ${binary:Version}),
169+ libhybris-common-dev (= ${binary:Version}),
170+ ${misc:Depends},
171+ libgles2-mesa-dev,
172+Description: Development headers and libraries for libhybris
173+ Contains the header files for use in developing applications that use
174+ the libhybris library.
175+ .
176+ Hybris is a solution that allows the use of bionic-based HW adaptations in
177+ glibc systems.
178+
179+Package: libhybris-utils
180+Section: utils
181+Architecture: armhf i386 amd64
182+Depends: libhybris (= ${binary:Version}),
183+ ${shlibs:Depends},
184+ ${misc:Depends}
185+Description: Utilities to help working with the Android HW abstraction layer
186+ Contains utilities used to help working with Android HW abstraction layer.
187+ .
188+ Hybris is a solution that allows the use of bionic-based HW adaptations in
189+ glibc systems.
190+
191+Package: libhybris-test
192+Section: devel
193+Architecture: armhf i386 amd64
194+Depends: libhybris (= ${binary:Version}),
195+ ${shlibs:Depends},
196+ ${misc:Depends}
197+Description: Allows to run bionic-based HW adaptations in glibc systems - tests
198+ Contains the test applications used to validate libhybris (needs Android
199+ libraries or container).
200+ .
201+ Hybris is a solution that allows the use of bionic-based HW adaptations in
202+ glibc systems.
203diff --git a/debian/rules b/debian/rules
204index c953854..9151a63 100755
205--- a/debian/rules
206+++ b/debian/rules
207@@ -9,6 +9,7 @@ PKG_driver_dev := libhybris-dev
208 PKG_driver_dbg := libhybris-dbg
209 PKG_version := $(shell dpkg-parsechangelog | sed -n 's/^Version: //p')
210 PKG_source := $(shell dpkg-parsechangelog | sed -n 's/^Source: //p')
211+PKG_distro := $(shell dpkg-parsechangelog | sed -n 's/^Distribution: //p')
212 UPS_version := $(shell echo '$(PKG_version)' | sed 's/.*://; s/-[^-]*$$//')
213 GIT_rev := $(shell echo '$(UPS_version)' | sed 's/.*+//')
214
215@@ -17,9 +18,13 @@ DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
216 DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
217 DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
218
219-# Compiler
220+ifeq ($(PKG_distro),vivid)
221+# For vivid we still depend on GCC 4.7 as this seems to be still
222+# required to workaround ABI issues.
223 export CC=gcc-4.7
224 export CXX=g++-4.7
225+EXTRA_BUILD_DEPENDS = gcc-4.7, g++-4.7,
226+endif
227
228 # Strong needs at least gcc 4.9
229 export DEB_BUILD_MAINT_OPTIONS=hardening=-stackprotectorstrong
230@@ -47,6 +52,19 @@ alt_ld_so_conf_file := alt_ld.so.conf
231 ld_so_conf_path := $(ld_so_conf_dir)/$(ld_so_conf_file)
232 alt_ld_so_conf_path := $(ld_so_conf_dir)/$(alt_ld_so_conf_file)
233
234+.PHONY: debian/control
235+debian/control: debian/control.in
236+ if [ "$(EXTRA_BUILD_DEPENDS)" = "" ] ; then \
237+ sed -e '/@EXTRA_BUILD_DEPENDS@/,+0d' \
238+ debian/control.in > debian/control ; \
239+ else \
240+ sed -e "s/@EXTRA_BUILD_DEPENDS@/$(EXTRA_BUILD_DEPENDS)/" \
241+ debian/control.in > debian/control ; \
242+ fi
243+
244+override_dh_auto_clean: debian/control
245+ dh_auto_clean
246+
247 # --remote doesn't work with github so this needs to be run from a local checkout
248 get-packaged-orig-source:
249 rm -rf $(PKG_source)-$(UPS_version)

Subscribers

People subscribed via source and target branches