-
Notifications
You must be signed in to change notification settings - Fork 725
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sysutils/bareos-server: fix fs_violations
This is the same fix as for 18 and 19, but upstream reformatted the CMake code **again**.
- Loading branch information
Adriaan de Groot
authored and
Adriaan de Groot
committed
Apr 13, 2021
1 parent
343a3e9
commit c6536d4
Showing
2 changed files
with
37 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
sysutils/bareos-server/files/patch-core_cmake_bareos-symlink-default-db-backend.cmake
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
--- core/cmake/bareos-symlink-default-db-backend.cmake.orig 2020-12-11 13:44:43 UTC | ||
+++ core/cmake/bareos-symlink-default-db-backend.cmake | ||
@@ -16,13 +16,31 @@ | ||
# along with this program; if not, write to the Free Software | ||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA | ||
# 02110-1301, USA. | ||
+ | ||
+# The ${libdir} and ${backenddir} are absolute, so figure out | ||
+# a relative path (${backenddir} lives under ${libdir}) instead. | ||
+# Make the link relative, placing the libbareoscats.so in ${libdir}. | ||
+# Within this script, VERSION is set to BAREOS_NUMERIC_VERSION (see | ||
+# core/src/cats/CMakeLists.txt). | ||
message( | ||
STATUS | ||
"${CMAKE_COMMAND} -E create_symlink ${libdir}/libbareoscats${CMAKE_SHARED_LIBRARY_SUFFIX} ${backenddir}/libbareoscats-${default_db_backend}${CMAKE_SHARED_LIBRARY_SUFFIX}" | ||
) | ||
+file( | ||
+ RELATIVE_PATH | ||
+ _rel | ||
+ ${libdir} | ||
+ ${backenddir}/libbareoscats-${default_db_backend}${CMAKE_SHARED_LIBRARY_SUFFIX} | ||
+) | ||
+message( | ||
+ STATUS | ||
+ ".. actually ${_rel} in $ENV{DESTDIR} v ${VERSION}" | ||
+) | ||
+ | ||
execute_process( | ||
COMMAND | ||
${CMAKE_COMMAND} -E create_symlink | ||
- ${backenddir}/libbareoscats-${default_db_backend}${CMAKE_SHARED_LIBRARY_SUFFIX} | ||
- ${libdir}/libbareoscats${CMAKE_SHARED_LIBRARY_SUFFIX}.${BAREOS_NUMERIC_VERSION} | ||
+ ${_rel} | ||
+ libbareoscats${CMAKE_SHARED_LIBRARY_SUFFIX}.${VERSION} | ||
+ WORKING_DIRECTORY $ENV{DESTDIR}${libdir} COMMAND_ECHO STDOUT | ||
) |