Skip to content

Commit e5d930e

Browse files
authored
Merge pull request #266
Prepare for 2.2.8 release
2 parents 54e7e01 + ed9dad3 commit e5d930e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+4302
-3627
lines changed

.github/workflows/build.yml

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -55,19 +55,19 @@ jobs:
5555
buser: qfsbuild
5656
runs_on: ubuntu-latest
5757
- distro: ubuntu
58-
ver: 18.04
58+
ver: 20.04
5959
codecov: yes
6060
btype: release
6161
buser: qfsbuild
6262
runs_on: ubuntu-latest
6363
- distro: ubuntu
64-
ver: 18.04
64+
ver: 20.04
6565
codecov: no
6666
btype: debug
6767
buser: qfsbuild
6868
runs_on: ubuntu-latest
6969
- distro: ubuntu
70-
ver: 18.04
70+
ver: 20.04
7171
codecov: no
7272
btype: release
7373
buser: root
@@ -102,12 +102,6 @@ jobs:
102102
btype: release
103103
buser: qfsbuild
104104
runs_on: ubuntu-latest
105-
- distro: debian
106-
ver: 10
107-
codecov: no
108-
btype: release
109-
buser: qfsbuild
110-
runs_on: ubuntu-latest
111105
- distro: centos
112106
ver: 6
113107
codecov: no
@@ -165,6 +159,7 @@ jobs:
165159
CODECOV: ${{ matrix.codecov }}
166160
BTYPE: ${{ matrix.btype }}
167161
BUSER: ${{ matrix.buser }}
162+
UBUNTU_APT_OPTIONS: "-o Acquire:Queue-mode=host"
168163
steps:
169164
- name: Checkout code
170165
uses: actions/checkout@v2

CMakeLists.txt

Lines changed: 62 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# Created 2006/10/20
55
# Author: Sriram Rao (Kosmix Corp)
66
#
7-
# Copyright 2008-2017 Quantcast Corporation. All rights reserved.
7+
# Copyright 2008-2025 Quantcast Corporation. All rights reserved.
88
# Copyright 2006 Kosmix Corp.
99
#
1010
# This file is part of Quantcast File System.
@@ -22,25 +22,25 @@
2222
# permissions and limitations under the License.
2323

2424
cmake_minimum_required(VERSION 2.8.4...10.0 FATAL_ERROR)
25-
cmake_policy(VERSION ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION})
25+
cmake_policy(VERSION
26+
${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION})
2627

27-
IF (NOT DEFINED KFS_DIR_PREFIX)
28-
set (KFS_DIR_PREFIX ${CMAKE_SOURCE_DIR})
29-
ENDIF (NOT DEFINED KFS_DIR_PREFIX)
28+
if(NOT DEFINED KFS_DIR_PREFIX)
29+
set(KFS_DIR_PREFIX ${CMAKE_SOURCE_DIR})
30+
endif()
3031

31-
project (QFS)
32+
project(QFS)
3233
set(CMAKE_MODULE_PATH ${KFS_DIR_PREFIX}/cmake/Modules)
3334

34-
IF (NOT DEFINED Boost_NO_BOOST_CMAKE)
35-
IF (${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 8 AND
36-
5 LESS ${CMAKE_PATCH_VERSION})
35+
if(NOT DEFINED Boost_NO_BOOST_CMAKE)
36+
if(${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 8 AND
37+
5 LESS ${CMAKE_PATCH_VERSION})
3738
# Turn off by default with 2.8.5 < cmake < 2.9.0 to
3839
# work around cmake28 and boost libraries problem on centos 6.
3940
# Boost_NO_BOOST_CMAKE was introduced int cmake 2.8.6
4041
set(Boost_NO_BOOST_CMAKE ON)
41-
ENDIF (${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 8 AND
42-
5 LESS ${CMAKE_PATCH_VERSION})
43-
ENDIF (NOT DEFINED Boost_NO_BOOST_CMAKE)
42+
endif()
43+
endif()
4444

4545
if(NOT DEFINED QFS_USE_STATIC_LIB_LINKAGE)
4646
set(QFS_USE_STATIC_LIB_LINKAGE ON)
@@ -53,9 +53,8 @@ endif()
5353
set(Boost_USE_MULTITHREADED ON)
5454

5555
# Require the packages we need to build
56-
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin" OR
57-
CYGWIN OR
58-
CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
56+
if(CYGWIN OR
57+
CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
5958
find_package(Boost COMPONENTS regex system REQUIRED)
6059
else()
6160
find_package(Boost COMPONENTS regex REQUIRED)
@@ -67,46 +66,64 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
6766
set(CMAKE_INSTALL_RPATH @loader_path)
6867
endif()
6968

70-
if (CYGWIN)
69+
if(CYGWIN)
7170
set(CMAKE_FIND_LIBRARY_PREFIXES ${CMAKE_FIND_LIBRARY_PREFIXES} "")
72-
set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES} ".dll.a" ".lib")
71+
set(CMAKE_FIND_LIBRARY_SUFFIXES
72+
${CMAKE_FIND_LIBRARY_SUFFIXES} ".dll.a" ".lib")
73+
7374
# For now only for cygwin to get strptime, and gnu specific glob flags.
7475
add_definitions(-D_GNU_SOURCE)
7576
endif()
7677

77-
if (QFS_OMIT_JNI)
78-
message (STATUS "Not building QFS JNI")
78+
if(QFS_OMIT_JNI)
79+
message(STATUS "Not building QFS JNI")
7980
else()
8081
set(JAVA_AWT_LIBRARY NotNeeded)
8182
set(JAVA_JVM_LIBRARY NotNeeded)
8283
set(JAVA_AWT_INCLUDE_PATH NotNeeded)
8384
find_package(JNI REQUIRED)
8485
endif()
86+
8587
find_package(Jerasure REQUIRED)
8688
find_package(Krb5 REQUIRED krb5)
8789
find_package(OpenSSL REQUIRED)
8890
find_package(FUSE)
8991

9092
add_definitions(-DBOOST_BIND_GLOBAL_PLACEHOLDERS)
93+
94+
# BOOST_SP_USE_QUICK_ALLOCATOR and BOOST_SP_USE_STD_ALLOCATOR are deprecated in
95+
# Boost 1.87 and later.
96+
if(Boost_MAJOR_VERSION LESS 1 OR
97+
(Boost_MAJOR_VERSION EQUAL 1 AND Boost_MINOR_VERSION LESS 87))
98+
add_definitions(-DBOOST_SP_USE_QUICK_ALLOCATOR)
99+
endif()
100+
91101
# Define various options based on the library configuration we use
92102
if(KRB5_FLAVOR)
93103
add_definitions(-DKFS_KRB_USE_${KRB5_FLAVOR})
94104
endif()
105+
95106
if(KRB5_USE_KRB5H)
96107
add_definitions(-DKFS_KRB_USE_KRB5H)
97108
endif()
98-
if("${KRB5_FLAVOR}" STREQUAL "HEIMDAL" OR KRB5_HAS_krb5_get_init_creds_opt_set_out_ccache)
109+
110+
if("${KRB5_FLAVOR}" STREQUAL "HEIMDAL" OR
111+
KRB5_HAS_krb5_get_init_creds_opt_set_out_ccache)
99112
add_definitions(-DKFS_KRB_USE_KRB5_GET_INIT_CREDS_OPT)
100113
endif()
114+
101115
if(KRB5_HAS_krb5_unparse_name_flags_ext)
102116
add_definitions(-DKRB5_HAS_krb5_unparse_name_flags_ext)
103117
endif()
118+
104119
if(KRB5_HAS_krb5_unparse_name_ext)
105120
add_definitions(-DKRB5_HAS_krb5_unparse_name_ext)
106121
endif()
122+
107123
if(KRB5_HAS_krb5_free_keytab_entry_contents)
108124
add_definitions(-DKRB5_HAS_krb5_free_keytab_entry_contents)
109125
endif()
126+
110127
if(KRB5_HAS_krb5_kt_free_entry)
111128
add_definitions(-DKRB5_HAS_krb5_kt_free_entry)
112129
endif()
@@ -125,38 +142,38 @@ endif()
125142

126143
# Build with statically linked libraries; the value for this variable has to be
127144
# defined here overwriting whatever is in the cache.
128-
# When setto ON, we build with statically linked libraries; when off we
145+
# When set to ON, we build with statically linked libraries; when off we
129146
# link with dynamically linked libs
147+
if(NOT DEFINED QFS_USE_STATIC_LIB_LINKAGE)
148+
set(QFS_USE_STATIC_LIB_LINKAGE TRUE)
149+
endif()
130150

131-
IF (NOT DEFINED QFS_USE_STATIC_LIB_LINKAGE)
132-
set (QFS_USE_STATIC_LIB_LINKAGE TRUE)
133-
ENDIF (NOT DEFINED QFS_USE_STATIC_LIB_LINKAGE)
151+
if(QFS_USE_STATIC_LIB_LINKAGE)
152+
message(STATUS "Build binaries with statically linked QFS libraries")
153+
else()
154+
message(STATUS "Build binaries with dynamically linked QFS libraries")
155+
endif()
134156

135-
IF (QFS_USE_STATIC_LIB_LINKAGE)
136-
message (STATUS "Build binaries with statically linked QFS libraries")
137-
ELSE (QFS_USE_STATIC_LIB_LINKAGE)
138-
message (STATUS "Build binaries with dynamically linked QFS libraries")
139-
ENDIF (QFS_USE_STATIC_LIB_LINKAGE)
140-
set (USE_STATIC_LIB_LINKAGE ${QFS_USE_STATIC_LIB_LINKAGE} CACHE BOOL
157+
set(USE_STATIC_LIB_LINKAGE ${QFS_USE_STATIC_LIB_LINKAGE} CACHE BOOL
141158
"Build binaries with statically linked libraries" FORCE)
142159

143160
if(ENABLE_COVERAGE)
144161
message(STATUS "Enabling code coverage with gcov")
145-
set(CMAKE_CXX_FLAGS "-coverage")
162+
set(CMAKE_CXX_FLAGS "-coverage")
146163
set(CMAKE_C_FLAGS "-coverage")
147164
endif()
148165

149166
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
150-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++14")
167+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++14")
151168
endif()
152169

153170
if(ENABLE_PROFILING)
154171
message(STATUS "Enabling profiling with gprof")
155-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pg")
156-
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pg")
172+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pg")
173+
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pg")
157174
set(CMAKE_SHAREDBoost_USE_MULTITHREADED_LINKER_FLAGS
158175
"${CMAKE_SHARED_LINKER_FLAGS} -pg")
159-
set(CMAKE_EXE_FLAGS "${CMAKE_EXE_FLAGS} -pg")
176+
set(CMAKE_EXE_FLAGS "${CMAKE_EXE_FLAGS} -pg")
160177
endif()
161178

162179
# Change the line to Release to build release binaries
@@ -169,14 +186,14 @@ if(CMAKE_BUILD_TYPE STREQUAL "Release")
169186
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D NDEBUG -g3")
170187
endif()
171188

172-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -DBOOST_SP_USE_QUICK_ALLOCATOR")
189+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
173190
string(TOUPPER KFS_OS_NAME_${CMAKE_SYSTEM_NAME} KFS_OS_NAME)
174-
add_definitions (-D${KFS_OS_NAME})
191+
add_definitions(-D${KFS_OS_NAME})
175192

176-
IF (ENABLE_IO_BUFFER_DEBUG)
193+
if(ENABLE_IO_BUFFER_DEBUG)
177194
add_definitions(-DDEBUG_IOBuffer)
178195
message(STATUS "Enabled IO buffer debug")
179-
ENDIF (ENABLE_IO_BUFFER_DEBUG)
196+
endif()
180197

181198
if(DEFINED QFS_EXTRA_CXX_OPTIONS)
182199
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${QFS_EXTRA_CXX_OPTIONS}")
@@ -195,11 +212,13 @@ if(FUSE_FOUND)
195212
message(STATUS "fuse definitions: ${FUSE_DEFINITIONS}")
196213
message(STATUS "fuse version: ${FUSE_MAJOR_VERSION}.${FUSE_MINOR_VERSION}")
197214
add_definitions(${FUSE_DEFINITIONS})
215+
198216
if(${FUSE_MAJOR_VERSION} LESS 3)
199217
add_definitions(-D FUSE_USE_VERSION=26)
200218
else()
201219
add_definitions(-D FUSE_USE_VERSION=30)
202220
endif()
221+
203222
include_directories(${FUSE_INCLUDE_DIRS})
204223
else()
205224
message(STATUS "Not building qfs_fuse")
@@ -215,10 +234,11 @@ include_directories(
215234
${JAVA_INCLUDE_PATH2}
216235
)
217236

218-
# get the subdirs we want
219-
if (NOT QFS_OMIT_JNI)
237+
# Get the sub directories we want.
238+
if(NOT QFS_OMIT_JNI)
220239
add_subdirectory(${KFS_DIR_PREFIX}/src/cc/access src/cc/access)
221240
endif()
241+
222242
add_subdirectory(${KFS_DIR_PREFIX}/src/cc/chunk src/cc/chunk)
223243
add_subdirectory(${KFS_DIR_PREFIX}/src/cc/common src/cc/common)
224244
add_subdirectory(${KFS_DIR_PREFIX}/src/cc/devtools src/cc/devtools)
@@ -242,7 +262,7 @@ if(FUSE_FOUND)
242262
add_subdirectory(${KFS_DIR_PREFIX}/src/cc/fuse src/cc/fuse)
243263
endif()
244264

245-
add_custom_target (
265+
add_custom_target(
246266
rat ${KFS_DIR_PREFIX}/scripts/rat.sh ${KFS_DIR_PREFIX}
247267
COMMENT "Running license release audit tool (rat)"
248268
VERBATIM

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ run-cmake: dir
4949
build: run-cmake
5050
cd build/${BUILD_TYPE} && $(MAKE) ${MAKE_OPTIONS} install \
5151
`${QFS_MSTRESS_ON} && \
52-
echo ${QFSHADOOP_VERSIONS} | grep 2.10.2 >/dev/null 2>&1 && \
53-
mvn --version >/dev/null 2>&1 && echo mstress-tarball`
52+
echo ${QFSHADOOP_VERSIONS} | grep '3\.4\.1' >/dev/null 2>&1 && \
53+
mvn --version >/dev/null 2>&1 && echo mstress-bootstrap mstress-tarball`
5454

5555
.PHONY: java
5656
java: build

0 commit comments

Comments
 (0)