Merge lp:~cjwatson/gallery-app/static-exiv2 into lp:gallery-app

Proposed by Colin Watson on 2014-07-18
Status: Merged
Approved by: Oliver Grawert on 2014-07-18
Approved revision: 1014
Merged at revision: 1016
Proposed branch: lp:~cjwatson/gallery-app/static-exiv2
Merge into: lp:gallery-app
Diff against target: 140 lines (+114/-0)
3 files modified
debian/control (+3/-0)
src/medialoader/CMakeLists.txt (+8/-0)
src/medialoader/exiv2.copyright (+103/-0)
To merge this branch: bzr merge lp:~cjwatson/gallery-app/static-exiv2
Reviewer Review Type Date Requested Status
Oliver Grawert 2014-07-18 Approve on 2014-07-18
PS Jenkins bot continuous-integration Approve on 2014-07-18
Review via email: mp+227275@code.launchpad.net

Commit message

Link exiv2 statically in click mode.

Description of the change

Link exiv2 statically in click mode.

This avoids the problem of a click package trying to use a library whose SONAME is about to change on the system image, causing synchronisation problems (can't update library without updating click package, but can't update click package without risking people downloading it from the store onto older system images). Static linking is a fairly crude solution; a better longer-term approach would be for click to (automatically?) notice this situation somehow and copy the shared libraries you need into your click package. However, that's some way off, and I think this will do for now.

Incidentally, this problem is part of the reason why gallery-app has been stuck in silo 1 for a week and a half. We won't be able to shift it until we sort this out one way or another. If you approve this branch, then it would probably be best to add it to the list of MPs in silo 1 and rebuild it there.

To post a comment you must log in.
Colin Watson (cjwatson) wrote :

There are some other libraries potentially in the same situation, by the way. I haven't touched them here since I wanted to have the simplest change I could think of that would unblock us, and exiv2 is the one whose SONAME is actually trying to change in utopic.

1014. By Colin Watson on 2014-07-18

Build-depend on libexpat1-dev and zlib1g-dev to ensure that we can statically link against libexiv2 in click mode.

Oliver Grawert (ogra) wrote :

Looks good to me ...

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/control'
2--- debian/control 2014-05-09 16:08:13 +0000
3+++ debian/control 2014-07-18 08:20:32 +0000
4@@ -16,6 +16,9 @@
5 qtbase5-dev,
6 qtdeclarative5-dev,
7 python3-all,
8+# for static linking of exiv2 in click mode
9+ libexpat1-dev,
10+ zlib1g-dev,
11 Standards-Version: 3.9.5
12 # If you don't have commit rights to lp:gallery-app but need to upload
13 # packaging changes, just go ahead. The developers will notice and sync
14
15=== modified file 'src/medialoader/CMakeLists.txt'
16--- src/medialoader/CMakeLists.txt 2014-03-07 17:42:35 +0000
17+++ src/medialoader/CMakeLists.txt 2014-07-18 08:20:32 +0000
18@@ -35,6 +35,14 @@
19
20 qt5_use_modules(${GALLERY_MEDIALOADER_LIB} Core Quick)
21
22+if(CLICK_MODE)
23+ set(EXIV2_LIBRARIES
24+ ${CMAKE_EXE_LINK_STATIC_CXX_FLAGS}
25+ ${EXIV2_STATIC_LIBRARIES}
26+ ${CMAKE_EXE_LINK_DYNAMIC_CXX_FLAGS})
27+ install(FILES exiv2.copyright DESTINATION ${CMAKE_INSTALL_PREFIX})
28+endif(CLICK_MODE)
29+
30 target_link_libraries( ${GALLERY_MEDIALOADER_LIB}
31 ${EXIV2_LIBRARIES}
32 ${GSTLIB_LDFLAGS}
33
34=== added file 'src/medialoader/exiv2.copyright'
35--- src/medialoader/exiv2.copyright 1970-01-01 00:00:00 +0000
36+++ src/medialoader/exiv2.copyright 2014-07-18 08:20:32 +0000
37@@ -0,0 +1,103 @@
38+The exiv2 library is linked statically into the gallery-app click package,
39+using the version of the Ubuntu libexiv2-dev package that was installed on
40+the build system at build time. Its copyright and licensing information is
41+reproduced below.
42+
43+
44+Upstream Author:
45+
46+ Andreas HUGGEL <ahuggel@gmx.net>
47+
48+Copyright:
49+
50+ (C) 2004-2008 Andreas Huggel <ahuggel@gmx.net>
51+
52+Copyright for XMP sdk:
53+
54+ (C) 2005-2007 Adobe Systems Incorporated
55+
56+Copyright for MD5 algorithm tcode:
57+
58+ (C) 1991-2, RSA Data Security, Inc.
59+
60+exiv2 license:
61+
62+ Exiv2 is free software; you can redistribute it and/or modify it under
63+ the terms of the GNU General Public License as published by the Free
64+ Software Foundation; either version 2 of the License, or (at your
65+ option) any later version.
66+
67+ Alternatively, Exiv2 is also available with a commercial license,
68+ which allows it to be used in closed-source projects. Contact me for
69+ more information.
70+
71+ Exiv2 is distributed in the hope that it will be useful, but WITHOUT
72+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
73+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
74+ for more details.
75+
76+ You should have received a copy of the GNU General Public License
77+ along with this program; if not, write to the Free Software
78+ Foundation, Inc., 51 Franklin Street, 5th Floor, Boston, MA 02110-1301 USA.
79+
80+On Debian systems, the complete text of the GNU General
81+Public License can be found in `/usr/share/common-licenses/GPL-2'.
82+
83+XMP sdk license:
84+
85+ NOTICE: Adobe permits you to use, modify, and distribute this file in
86+ accordance with the terms of the Adobe license agreement accompanying it.
87+
88+Copyright (c) 1999 - 2007, Adobe Systems Incorporated
89+
90+The BSD License
91+
92+Redistribution and use in source and binary forms, with or without
93+modification, are permitted provided that the following conditions are
94+met:
95+
96+* Redistributions of source code must retain the above copyright
97+ notice, this list of conditions and the following disclaimer.
98+
99+* Redistributions in binary form must reproduce the above copyright
100+ notice, this list of conditions and the following disclaimer in the
101+ documentation and/or other materials provided with the distribution.
102+
103+* Neither the name of Adobe Systems Incorporated, nor the names of its
104+ contributors may be used to endorse or promote products derived from
105+ this software without specific prior written permission.
106+
107+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
108+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
109+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
110+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
111+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
112+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
113+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
114+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
115+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
116+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
117+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
118+
119+MD5 algorithm license:
120+
121+Copyright (C) 1991-2, RSA Data Security, Inc.
122+
123+License to copy and use this software is granted provided that it is
124+identified as the "RSA Data Security, Inc. MD5 Message-Digest
125+Algorithm" in all material mentioning or referencing this software or
126+this function.
127+
128+License is also granted to make and use derivative works provided that
129+such works are identified as "derived from the RSA Data Security,
130+Inc. MD5 Message-Digest Algorithm" in all material mentioning or
131+referencing the derived work.
132+
133+RSA Data Security, Inc. makes no representations concerning either the
134+merchantability of this software or the suitability of this software
135+for any particular purpose. It is provided "as is" without express or
136+implied warranty of any kind.
137+
138+These notices must be retained in any copies of any part of this
139+documentation and/or software.
140+

Subscribers

People subscribed via source and target branches