ubuntu-touch-coreapps-reviewers team mailing list archive
-
ubuntu-touch-coreapps-reviewers team
-
Mailing list archive
-
Message #09799
[Merge] lp:~sam-sgrs/ubuntu-filemanager-app/fix-1579487 into lp:ubuntu-filemanager-app
Sam Segers has proposed merging lp:~sam-sgrs/ubuntu-filemanager-app/fix-1579487 into lp:ubuntu-filemanager-app.
Requested reviews:
Ubuntu File Manager Developers (ubuntu-filemanager-dev)
Related bugs:
Bug #1579487 in Ubuntu File Manager App: "file manager from the store doesn't start in 16.04"
https://bugs.launchpad.net/ubuntu-filemanager-app/+bug/1579487
For more details, see:
https://code.launchpad.net/~sam-sgrs/ubuntu-filemanager-app/fix-1579487/+merge/303622
Fix when the samba libs are installed on the host.
The samba libs use the rpath when compiled so the host libs are looked for fist before the bundled ones.
They can be stripped from the rpath using 'chrpath -d'.
The folderlistmodel also needs to be build using the dev packages from the bundled apps.
--
Your team Ubuntu File Manager Developers is requested to review the proposed merge of lp:~sam-sgrs/ubuntu-filemanager-app/fix-1579487 into lp:ubuntu-filemanager-app.
=== modified file 'CMakeLists.txt'
--- CMakeLists.txt 2016-07-14 15:04:49 +0000
+++ CMakeLists.txt 2016-08-22 19:49:52 +0000
@@ -73,12 +73,16 @@
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/manifest.json filemanager.apparmor ${CONTENT_HUB_JSON} DESTINATION ${CMAKE_INSTALL_PREFIX})
- set(UPSTREAM_LIBS_DIR ${CMAKE_BINARY_DIR}/upstream-libs)
+ set(UPSTREAM_LIBS_DIR ${CMAKE_BINARY_DIR}/upstream-libs)
+ set(UPSTREAM_DEV_LIBS_DIR ${CMAKE_BINARY_DIR}/upstream-libs-dev)
#grab dependencies
set(GET_CLICK_DEPS_TOOL ${CMAKE_SOURCE_DIR}/get-click-deps)
set(DEPS_MANIFEST ${CMAKE_CURRENT_SOURCE_DIR}/filemanager-libs.json)
+ set(DEV_DEPS_MANIFEST ${CMAKE_CURRENT_SOURCE_DIR}/filemanager-libs-dev.json)
MESSAGE("Grabbing upstream libs to ${UPSTREAM_LIBS_DIR}")
+ # DEV packages
+ MESSAGE("Grabbing upstream dev libs to ${UPSTREAM_DEV_LIBS_DIR}")
get_filename_component(BLD_CONFIGURATION_NAME ${CMAKE_BINARY_DIR} NAME)
set(UPSTREAM_CACHE $ENV{HOME}/dev/upstream-libs-filemanager/${BLD_CONFIGURATION_NAME})
@@ -87,21 +91,41 @@
if(EXISTS "${UPSTREAM_CACHE}")
MESSAGE("Upstream libs cache exists.")
file(COPY ${UPSTREAM_CACHE}/upstream-libs/ DESTINATION ${UPSTREAM_LIBS_DIR} PATTERN * )
+ file(COPY ${UPSTREAM_CACHE}/upstream-libs-dev/ DESTINATION ${UPSTREAM_DEV_LIBS_DIR} PATTERN * )
else()
MESSAGE("Cache miss, downloading from network.")
file(MAKE_DIRECTORY ${UPSTREAM_LIBS_DIR})
file(MAKE_DIRECTORY ${UPSTREAM_CACHE})
+ file(MAKE_DIRECTORY ${UPSTREAM_DEV_LIBS_DIR})
+ file(MAKE_DIRECTORY ${UPSTREAM_CACHE})
execute_process(
COMMAND ${GET_CLICK_DEPS_TOOL} -d ${DEPS_MANIFEST} ${CLICK_ARCH} ${UPSTREAM_LIBS_DIR}
)
+ execute_process(
+ COMMAND ${GET_CLICK_DEPS_TOOL} -d ${DEV_DEPS_MANIFEST} ${CLICK_ARCH} ${UPSTREAM_DEV_LIBS_DIR}
+ )
+ # Copy the symlinks from the deb packages
+ file(COPY ${UPSTREAM_DEV_LIBS_DIR}/usr/lib/ DESTINATION ${UPSTREAM_LIBS_DIR}/usr/lib PATTERN * )
+
+ # Strip the rpath so the shared libraries don't load the desktop libraries
+ file(GLOB_RECURSE TO_STRIP "${CMAKE_CURRENT_BINARY_DIR}/upstream-libs/usr/lib/${ARCH_TRIPLET}/*")
+ foreach(ITEM ${TO_STRIP})
+ # Strip the rpath so the shared libraries don't load the desktop libraries but the packaged ones.
+ execute_process(
+ COMMAND "chrpath" -d ${ITEM}
+ )
+ endforeach()
# Cache for next usage
file(COPY ${UPSTREAM_LIBS_DIR} DESTINATION ${UPSTREAM_CACHE} )
+ file(COPY ${UPSTREAM_DEV_LIBS_DIR} DESTINATION ${UPSTREAM_CACHE} )
endif()
+
MESSAGE("Installing upstream libs from ${CMAKE_CURRENT_BINARY_DIR}/upstream-libs/usr/lib/${ARCH_TRIPLET}/ to ${DATA_DIR}lib/${ARCH_TRIPLET}")
file(GLOB_RECURSE UPSTREAM_LIBS "${CMAKE_CURRENT_BINARY_DIR}/upstream-libs/usr/lib/${ARCH_TRIPLET}/*")
foreach(ITEM ${UPSTREAM_LIBS})
IF( IS_DIRECTORY "${ITEM}" )
- LIST( APPEND DIRS_TO_DEPLOY "${ITEM}" )
+ # There are non because of the GLOB_RECURES. All are get coppied in the main dir.
+ # LIST( APPEND DIRS_TO_DEPLOY "${ITEM}" )
ELSE()
LIST( APPEND FILES_TO_DEPLOY "${ITEM}" )
ENDIF()
=== modified file 'src/plugin/folderlistmodel/CMakeLists.txt'
--- src/plugin/folderlistmodel/CMakeLists.txt 2015-12-12 14:40:30 +0000
+++ src/plugin/folderlistmodel/CMakeLists.txt 2016-08-22 19:49:52 +0000
@@ -105,14 +105,23 @@
qt5_use_modules(nemofolderlistmodel Gui Qml Quick Widgets)
-## samba requires libsmbclient
-find_path(SAMBA_INCLUDE_DIR
- NAMES libsmbclient.h
- HINTS /usr/include/smbclient /usr/include/samba /usr/include/samba-3.0 /usr/include/samba-4.0
- )
-find_library(SAMBA_LIBRARIES NAMES smbclient )
+if(CLICK_MODE)
+ set(SAMBA_INCLUDE_DIR ${UPSTREAM_DEV_LIBS_DIR}/usr/include/samba-4.0)
+ find_library(SAMBA_LIBRARIES
+ NAMES smbclient
+ PATHS ${UPSTREAM_LIBS_DIR}/usr/lib/${ARCH_TRIPLET}
+ NO_DEFAULT_PATH)
+else(CLICK_MODE)
+ ## samba requires libsmbclient
+ find_path(SAMBA_INCLUDE_DIR
+ NAMES libsmbclient.h
+ HINTS /usr/include/smbclient /usr/include/samba /usr/include/samba-3.0 /usr/include/samba-4.0
+ )
+ find_library(SAMBA_LIBRARIES NAMES smbclient)
+endif(CLICK_MODE)
+
message(STATUS "samba include=${SAMBA_INCLUDE_DIR}")
-message(STATUS "samba lib=${SAMBA_LIBRARIES}=${SAMBA_LIBRARIES}")
+message(STATUS "samba lib=${SAMBA_LIBRARIES}")
if(SAMBA_INCLUDE_DIR AND SAMBA_LIBRARIES)
message(STATUS "Found samba: include=${SAMBA_INCLUDE_DIR} library=${SAMBA_LIBRARIES}")
Follow ups