Package: dislocker
Version: 0.7.3-2.1
Severity: normal
Tags: patch
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu kinetic ubuntu-patch

Hi Giovani,

dislocker is failing to build in Ubuntu because the Ubuntu autobuilder
environments are all "usrmerge" environments, where the /lib* directories
have all been moved to /usr and /lib* are just symlinks.

The consequence of this is that on architectures where the dynamic linker
has a path of /lib64/*, these files are now in /usr/lib64, and the existence
of this directory causes dislocker's upstream build system to misbuild,
trying to install the libraries to this target simply because this directory
exists.

This is wrong for multiple reasons, but the most immediately relevant is
that it simply causes the package to fail to build.

Please find attached a patch which corrects this issue.

Thanks for considering,
-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
Ubuntu Developer                                   https://www.debian.org/
slanga...@ubuntu.com                                     vor...@debian.org
diff -Nru dislocker-0.7.3/debian/patches/series 
dislocker-0.7.3/debian/patches/series
--- dislocker-0.7.3/debian/patches/series       2022-02-26 07:29:05.000000000 
-0800
+++ dislocker-0.7.3/debian/patches/series       2022-08-22 09:02:45.000000000 
-0700
@@ -1,2 +1,3 @@
 fix-spelling.patch
 fix-ruby3.0.patch
+wrong-libdir.patch
diff -Nru dislocker-0.7.3/debian/patches/wrong-libdir.patch 
dislocker-0.7.3/debian/patches/wrong-libdir.patch
--- dislocker-0.7.3/debian/patches/wrong-libdir.patch   1969-12-31 
16:00:00.000000000 -0800
+++ dislocker-0.7.3/debian/patches/wrong-libdir.patch   2022-08-22 
09:06:12.000000000 -0700
@@ -0,0 +1,27 @@
+Description: don't install to /usr/lib64 just because it exists in build env
+ This package fails to build in Ubuntu but not in Debian because Ubuntu is
+ using usrmerge in its build environment, which causes /usr/lib64 to exist
+ and the upstream build system to wrongly install files to it instead of to
+ /usr/lib.  Patch the build system to never use /usr/lib64 as this is always
+ wrong for a Debian package.
+Author: Steve Langasek <steve.langa...@ubuntu.com>
+Last-Update: 2022-08-22
+Forwarded: no
+
+Index: dislocker-0.7.3/src/CMakeLists.txt
+===================================================================
+--- dislocker-0.7.3.orig/src/CMakeLists.txt
++++ dislocker-0.7.3/src/CMakeLists.txt
+@@ -154,11 +154,7 @@
+ 
+ if(NOT DEFINED LIB_INSTALL_DIR)
+       if(NOT DEFINED libdir)
+-              if(IS_DIRECTORY "${CMAKE_INSTALL_PREFIX}/lib64")
+-                      set(libdir "${CMAKE_INSTALL_PREFIX}/lib64")
+-              else()
+-                      set(libdir "${CMAKE_INSTALL_PREFIX}/lib")
+-              endif()
++              set(libdir "${CMAKE_INSTALL_PREFIX}/lib")
+       endif()
+ else()
+       set(libdir ${LIB_INSTALL_DIR})

Reply via email to