From e8b26c48edaa05af61d7c723acc81a8929c0e67c Mon Sep 17 00:00:00 2001 From: Yaowei Bai Date: Sun, 15 Jul 2018 01:08:27 +0800 Subject: [PATCH 1/5] Revert "build: drop versionless libtcmu.so symlink" This reverts commit 8727a386dd05603f3d3619f18f3b06bf57679749. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index bc44642e..42732e04 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -60,7 +60,7 @@ target_link_libraries(tcmu ${LIBNL_GENL_LIB} ${GLIB_LIBRARIES} ) -install(TARGETS tcmu LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} NAMELINK_SKIP) +install(TARGETS tcmu LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) # Stuff for building the static library add_library(tcmu_static From d5fec2768b729ad711a51e1f4a682c6f94f85330 Mon Sep 17 00:00:00 2001 From: Yaowei Bai Date: Sun, 15 Jul 2018 01:08:55 +0800 Subject: [PATCH 2/5] Revert "libtcmu: do not install headers and drop libtcmu stable API" This reverts commit a00cb710a6b348f3a06ede97edbd96e116bdee16. --- CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 42732e04..10dde879 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -272,6 +272,8 @@ configure_file ( ) install(SCRIPT tcmu.conf_install.cmake) +install(FILES libtcmu.h libtcmu_common.h tcmu-runner.h + DESTINATION include) install(FILES org.kernel.TCMUService1.service DESTINATION /usr/share/dbus-1/system-services) install(FILES tcmu-runner.conf DESTINATION /etc/dbus-1/system.d) From b1db372de4b00ccd74b0ecd39019e8a3e8786321 Mon Sep 17 00:00:00 2001 From: Yaowei Bai Date: Sun, 15 Jul 2018 02:11:20 +0800 Subject: [PATCH 3/5] libtcmu: explicitly include tcmu-runner.h where necessary Separate tcmu-runner.h from libtcmu_priv.h and include it explicitly where it's necessary. We will export libtcmu_priv.h as part of libtcmu in the next patch. Signed-off-by: Yaowei Bai --- alua.c | 1 + api.c | 1 + libtcmu_log.c | 1 + libtcmu_priv.h | 1 - 4 files changed, 3 insertions(+), 1 deletion(-) diff --git a/alua.c b/alua.c index 12804f74..3daa98df 100644 --- a/alua.c +++ b/alua.c @@ -23,6 +23,7 @@ #include "libtcmu_log.h" #include "libtcmu_common.h" #include "libtcmu_priv.h" +#include "tcmu-runner.h" #include "tcmur_device.h" #include "target.h" #include "alua.h" diff --git a/api.c b/api.c index 0879cda7..967d48d8 100644 --- a/api.c +++ b/api.c @@ -25,6 +25,7 @@ #include "libtcmu_log.h" #include "libtcmu_common.h" #include "libtcmu_priv.h" +#include "tcmu-runner.h" #include "target.h" #include "alua.h" #include "be_byteshift.h" diff --git a/libtcmu_log.c b/libtcmu_log.c index fb1d2af8..800bbedc 100644 --- a/libtcmu_log.c +++ b/libtcmu_log.c @@ -22,6 +22,7 @@ #include "libtcmu_config.h" #include "libtcmu_time.h" #include "libtcmu_priv.h" +#include "tcmu-runner.h" #include "string_priv.h" /* tcmu ring buffer for log */ diff --git a/libtcmu_priv.h b/libtcmu_priv.h index fd923659..6d4d4e07 100644 --- a/libtcmu_priv.h +++ b/libtcmu_priv.h @@ -24,7 +24,6 @@ #include "darray.h" #include "ccan/list/list.h" #include "tcmur_aio.h" -#include "tcmu-runner.h" #define KERN_IFACE_VER 2 From 1f925d09232ab000e6bb0ee86860b6ef89a323a7 Mon Sep 17 00:00:00 2001 From: Yaowei Bai Date: Sun, 15 Jul 2018 02:19:39 +0800 Subject: [PATCH 4/5] libtcmu_priv.h: drop unnecessary header files Signed-off-by: Yaowei Bai --- libtcmu_priv.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/libtcmu_priv.h b/libtcmu_priv.h index 6d4d4e07..4f85215e 100644 --- a/libtcmu_priv.h +++ b/libtcmu_priv.h @@ -20,10 +20,7 @@ #include #include -#include "scsi_defs.h" #include "darray.h" -#include "ccan/list/list.h" -#include "tcmur_aio.h" #define KERN_IFACE_VER 2 From 96d0625ac2328ee76917e8127d1df66b066fc456 Mon Sep 17 00:00:00 2001 From: Yaowei Bai Date: Sun, 15 Jul 2018 02:20:19 +0800 Subject: [PATCH 5/5] CMakeList.txt: install more header files for dependence of libtcmu Signed-off-by: Yaowei Bai --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 10dde879..32b17938 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -272,7 +272,7 @@ configure_file ( ) install(SCRIPT tcmu.conf_install.cmake) -install(FILES libtcmu.h libtcmu_common.h tcmu-runner.h +install(FILES libtcmu.h libtcmu_common.h libtcmu_priv.h darray.h DESTINATION include) install(FILES org.kernel.TCMUService1.service DESTINATION /usr/share/dbus-1/system-services)