Changeset: b995973fba06 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/b995973fba06
Removed Files:
cmake/Modules/FindUUID.cmake
ctest/cmake/detect-uuid.cmake
ctest/cmake/test_detect_uuid.c.in
Modified Files:
MonetDB.spec
README.rst
cmake/monetdb-defines.cmake
cmake/monetdb-findpackages.cmake
cmake/monetdb-functions.cmake
cmake/monetdb-options.cmake
common/utils/CMakeLists.txt
common/utils/muuid.c
ctest/cmake/CMakeLists.txt
debian/control
debian/rules
documentation/source/build-debian.rst
documentation/source/build-fedora.rst
gdk/CMakeLists.txt
gdk/gdk.h
gdk/gdk_atoms.c
gdk/gdk_atoms.h
gdk/gdk_group.c
gdk/gdk_hash.c
monetdb5/modules/atoms/CMakeLists.txt
monetdb5/modules/atoms/uuid.c
monetdb5/modules/mal/mal_mapi.c
monetdb5/tools/CMakeLists.txt
monetdb_config.h.in
Branch: default
Log Message:
Get completely rid of our use of the uuid library.
We already had an alternative implementation, and the library didn't
really give us much anyway. Also, it's in the way on FreeBSD.
diffs (truncated from 567 to 300 lines):
diff --git a/MonetDB.spec b/MonetDB.spec
--- a/MonetDB.spec
+++ b/MonetDB.spec
@@ -114,7 +114,6 @@ BuildRequires: geos-devel >= 3.4.0
%endif
BuildRequires: pkgconfig(libcurl)
BuildRequires: pkgconfig(liblzma)
-BuildRequires: pkgconfig(uuid)
BuildRequires: pkgconfig(libxml-2.0)
%if %{with pcre}
BuildRequires: pkgconfig(libpcre) >= 4.5
@@ -796,7 +795,6 @@ fi
-DWITH_PROJ=OFF \
-DWITH_READLINE=ON \
-DWITH_SNAPPY=OFF \
- -DWITH_UUID=ON \
-DWITH_VALGRIND=OFF \
-DWITH_XML2=ON \
-DWITH_ZLIB=ON
diff --git a/README.rst b/README.rst
--- a/README.rst
+++ b/README.rst
@@ -86,7 +86,6 @@ WITH_LZMA Include lzma support
WITH_PCRE Include pcre support
WITH_PROJ Include proj support
WITH_READLINE Include readline support
-WITH_UUID Include uuid support
WITH_VALGRIND Include valgrind support
WITH_XML2 Include xml2 support
WITH_ZLIB Include zlib support
@@ -99,7 +98,7 @@ On Fedora, the following packages are re
``bison``, ``cmake``, ``gcc``, ``pkgconf``, ``python3``.
The following packages are optional but recommended:
-``bzip2-devel``, ``libuuid-devel``, ``pcre-devel``, ``readline-devel``,
+``bzip2-devel``, ``pcre-devel``, ``readline-devel``,
``xz-devel``, ``zlib-devel``.
The following packages are optional:
@@ -112,7 +111,7 @@ On Ubuntu and Debian the following packa
``bison``, ``cmake``, ``gcc``, ``pkg-config``, ``python3``.
The following packages are optional but recommended:
-``libbz2-dev``, ``uuid-dev``, ``libpcre3-dev``, ``libreadline-dev``,
+``libbz2-dev``, ``libpcre3-dev``, ``libreadline-dev``,
``liblzma-dev``, ``zlib1g-dev``.
The following packages are optional:
diff --git a/cmake/Modules/FindUUID.cmake b/cmake/Modules/FindUUID.cmake
deleted file mode 100644
--- a/cmake/Modules/FindUUID.cmake
+++ /dev/null
@@ -1,51 +0,0 @@
-# - Find uuid
-# Find the native uuid headers and libraries.
-#
-# UUID_INCLUDE_DIR - where to find uuid.h, etc.
-# UUID_LIBRARIES - List of libraries when using uuid.
-# UUID_FOUND - True if uuid found.
-
-cmake_push_check_state()
-# Look for the header file.
-find_path(UUID_INCLUDE_DIR NAMES uuid/uuid.h)
-if(UUID_INCLUDE_DIR)
- set(CMAKE_REQUIRED_INCLUDES "${CMAKE_REQUIRED_INCLUDES};${UUID_INCLUDE_DIR}")
-else()
- set(UUID_INCLUDE_DIR "" CACHE INTERNAL "uuid include directories")
-endif()
-# Look for the library.
-find_library(UUID_LIBRARIES NAMES uuid) # Linux requires a separate library
for UUID
-if(NOT UUID_LIBRARIES)
- set(UUID_LIBRARIES "" CACHE INTERNAL "uuid libraries path")
-endif()
-# Find uuid_generate symbol, which we require and some platforms don't have it
-set(CMAKE_REQUIRED_LIBRARIES ${UUID_LIBRARIES})
-set(CMAKE_REQUIRED_INCLUDES ${UUID_INCLUDE_DIR})
-check_symbol_exists("uuid_generate" "uuid/uuid.h" HAVE_UUID_GENERATE)
-cmake_pop_check_state()
-
-if(HAVE_UUID_GENERATE)
- include(FindPackageHandleStandardArgs)
- #if("${UUID_LIBRARIES}" STREQUAL "")
- #find_package_handle_standard_args(UUID DEFAULT_MSG UUID_INCLUDE_DIR)
- #else()
- find_package_handle_standard_args(UUID DEFAULT_MSG UUID_LIBRARIES
UUID_INCLUDE_DIR)
- #endif()
- mark_as_advanced(UUID_INCLUDE_DIR UUID_LIBRARIES)
-endif()
-
-if(UUID_FOUND)
- if(NOT TARGET UUID::UUID) # AND (EXISTS "${UUID_LIBRARIES}"))
- add_library(UUID::UUID UNKNOWN IMPORTED)
- set_target_properties(UUID::UUID
- PROPERTIES
- INTERFACE_INCLUDE_DIRECTORIES "${UUID_INCLUDE_DIR}")
-
- #if(EXISTS "${UUID_LIBRARIES}")
- set_target_properties(UUID::UUID
- PROPERTIES
- IMPORTED_LINK_INTERFACE_LANGUAGES "C"
- IMPORTED_LOCATION "${UUID_LIBRARIES}")
- #endif()
- endif()
-endif()
diff --git a/cmake/monetdb-defines.cmake b/cmake/monetdb-defines.cmake
--- a/cmake/monetdb-defines.cmake
+++ b/cmake/monetdb-defines.cmake
@@ -46,10 +46,6 @@ function(monetdb_configure_defines)
check_include_file("sys/un.h" HAVE_SYS_UN_H)
check_include_file("sys/wait.h" HAVE_SYS_WAIT_H)
check_include_file("unistd.h" HAVE_UNISTD_H)
- cmake_push_check_state()
- set(CMAKE_REQUIRED_INCLUDES
"${CMAKE_REQUIRED_INCLUDES};${UUID_INCLUDE_DIR}")
- check_include_file("uuid/uuid.h" HAVE_UUID_UUID_H)
- cmake_pop_check_state()
check_include_file("winsock2.h" HAVE_WINSOCK_H)
find_library(GETOPT_LIB "getopt.lib")
@@ -144,7 +140,6 @@ macro(monetdb_macro_variables)
set(HAVE_PROJ ${PROJ_FOUND})
set(HAVE_SNAPPY ${SNAPPY_FOUND})
set(HAVE_FITS ${CFITSIO_FOUND})
- set(HAVE_UUID ${HAVE_UUID_GENERATE})
set(HAVE_VALGRIND ${VALGRIND_FOUND})
set(HAVE_NETCDF ${NETCDF_FOUND})
set(HAVE_READLINE ${READLINE_FOUND})
diff --git a/cmake/monetdb-findpackages.cmake b/cmake/monetdb-findpackages.cmake
--- a/cmake/monetdb-findpackages.cmake
+++ b/cmake/monetdb-findpackages.cmake
@@ -58,10 +58,6 @@ if(WITH_SNAPPY)
find_package(Snappy)
endif()
-if(WITH_UUID)
- find_package(UUID)
-endif()
-
if(WITH_VALGRIND)
find_package(Valgrind)
endif()
diff --git a/cmake/monetdb-functions.cmake b/cmake/monetdb-functions.cmake
--- a/cmake/monetdb-functions.cmake
+++ b/cmake/monetdb-functions.cmake
@@ -151,7 +151,6 @@ function(monetdb_cmake_summary)
message(STATUS "Geos library: ${GEOS_FOUND}")
message(STATUS "Gdal library: ${GDAL_FOUND}")
message(STATUS "Fits library: ${CFITSIO_FOUND}")
- message(STATUS "Uuid library: ${HAVE_UUID_GENERATE}")
message(STATUS "Valgrind library: ${VALGRIND_FOUND}")
message(STATUS "Kvm library: ${KVM_FOUND}")
message(STATUS "Netcdf library: ${NETCDF_FOUND}")
diff --git a/cmake/monetdb-options.cmake b/cmake/monetdb-options.cmake
--- a/cmake/monetdb-options.cmake
+++ b/cmake/monetdb-options.cmake
@@ -121,10 +121,6 @@ option(WITH_SNAPPY
"Include snappy support"
ON)
-option(WITH_UUID
- "Include uuid support"
- ON)
-
option(WITH_VALGRIND
"Include valgrind support"
ON)
diff --git a/common/utils/CMakeLists.txt b/common/utils/CMakeLists.txt
--- a/common/utils/CMakeLists.txt
+++ b/common/utils/CMakeLists.txt
@@ -92,7 +92,6 @@ target_include_directories(msabaoth
target_link_libraries(msabaoth
PRIVATE
- $<$<BOOL:${UUID_FOUND}>:UUID::UUID>
mutils
monetdb_config_header)
diff --git a/common/utils/muuid.c b/common/utils/muuid.c
--- a/common/utils/muuid.c
+++ b/common/utils/muuid.c
@@ -12,14 +12,11 @@
#include "monetdb_config.h"
#include "muuid.h"
#include <string.h> /* strdup */
-#ifdef HAVE_UUID_UUID_H
-# include <uuid/uuid.h>
-#endif
#if defined(HAVE_GETENTROPY) && defined(HAVE_SYS_RANDOM_H)
#include <sys/random.h>
#endif
-#if !defined(HAVE_UUID) && !defined(HAVE_GETENTROPY) && defined(HAVE_RAND_S)
+#if !defined(HAVE_GETENTROPY) && defined(HAVE_RAND_S)
static inline bool
generate_uuid(char *out)
{
@@ -45,26 +42,9 @@ generate_uuid(char *out)
}
#endif
-/**
- * Shallow wrapper around uuid, that comes up with some random pseudo
- * uuid if uuid is not available
- */
char *
generateUUID(void)
{
-#ifdef HAVE_UUID
-# ifdef UUID_PRINTABLE_STRING_LENGTH
- /* Solaris */
- char out[UUID_PRINTABLE_STRING_LENGTH];
-# else
- char out[37];
-# endif
- uuid_t uuid;
- uuid_generate(uuid);
- uuid_unparse(uuid, out);
-#else
- /* try to do some pseudo interesting stuff, and stash it in the
- * format of a UUID to at least return some uniform answer */
char out[37];
#if defined(HAVE_GETENTROPY)
unsigned char randbuf[16];
@@ -95,6 +75,5 @@ generateUUID(void)
(unsigned) rand() & 0x0FFF, (unsigned) rand() & 0xFFFF,
(unsigned) rand() & 0xFFFF, (unsigned) rand() &
0xFFFF);
}
-#endif
return strdup(out);
}
diff --git a/ctest/cmake/CMakeLists.txt b/ctest/cmake/CMakeLists.txt
--- a/ctest/cmake/CMakeLists.txt
+++ b/ctest/cmake/CMakeLists.txt
@@ -29,7 +29,6 @@ include(${CMAKE_CURRENT_SOURCE_DIR}/dete
include(${CMAKE_CURRENT_SOURCE_DIR}/detect-libr.cmake)
include(${CMAKE_CURRENT_SOURCE_DIR}/detect-snappy.cmake)
include(${CMAKE_CURRENT_SOURCE_DIR}/detect-fits.cmake)
-include(${CMAKE_CURRENT_SOURCE_DIR}/detect-uuid.cmake)
include(${CMAKE_CURRENT_SOURCE_DIR}/detect-valgrind.cmake)
include(${CMAKE_CURRENT_SOURCE_DIR}/detect-geos.cmake)
include(${CMAKE_CURRENT_SOURCE_DIR}/detect-gdal.cmake)
diff --git a/ctest/cmake/detect-uuid.cmake b/ctest/cmake/detect-uuid.cmake
deleted file mode 100644
--- a/ctest/cmake/detect-uuid.cmake
+++ /dev/null
@@ -1,39 +0,0 @@
-#[[
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#
-# Copyright 1997 - July 2008 CWI, August 2008 - 2022 MonetDB B.V.
-#]]
-
-if (${LINUX_DISTRO} STREQUAL "debian")
- if(${LINUX_DISTRO_VERSION} STREQUAL "9")
- assert_package_detected(
- detect TRUE
- legacyvariable HAVE_UUID
- variablename HAVE_UUID_GENERATE)
- endif()
- if(${LINUX_DISTRO_VERSION} STREQUAL "10")
- assert_package_detected(
- detect TRUE
- legacyvariable HAVE_UUID
- variablename HAVE_UUID_GENERATE)
- endif()
-elseif (${LINUX_DISTRO} STREQUAL "ubuntu")
- if(${LINUX_DISTRO_VERSION} VERSION_GREATER_EQUAL "18")
- assert_package_detected(
- detect TRUE
- legacyvariable HAVE_UUID
- variablename HAVE_UUID_GENERATE)
- endif()
-elseif(${LINUX_DISTRO} STREQUAL "fedora")
- if(${LINUX_DISTRO_VERSION} VERSION_GREATER_EQUAL "30")
- assert_package_detected(
- detect TRUE
- legacyvariable HAVE_UUID
- variablename HAVE_UUID_GENERATE)
- endif()
-else()
- message(ERROR "Linux distro: ${LINUX_DISTRO} not known")
- message(ERROR "Linux distro version: ${LINUX_DISTRO_VERSION} not known")
-endif()
diff --git a/ctest/cmake/test_detect_uuid.c.in
b/ctest/cmake/test_detect_uuid.c.in
deleted file mode 100644
--- a/ctest/cmake/test_detect_uuid.c.in
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * Copyright 1997 - July 2008 CWI, August 2008 - 2022 MonetDB B.V.
- */
-
-#include "monetdb_config.h"
-
-int
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]