Skip to content

Commit

Permalink
alvistack/v17.2.5
Browse files Browse the repository at this point in the history
    git clean -xdf
    git submodule sync --recursive
    git submodule update --recursive --init
    git submodule foreach --recursive git checkout -- .
    git submodule foreach --recursive git clean -xdf
    ./make-debs.sh
    cp /tmp/release/Ubuntu/WORKDIR/*ceph*17.2.5*.{bz2,xz,dsc} /osc/home\:alvistack/ceph-ceph-17.2.5/
    cp ceph.spec /osc/home\:alvistack/ceph-ceph-17.2.5/
    cp debian/patches/*.patch /osc/home\:alvistack/ceph-ceph-17.2.5/
    rm -rf /tmp/release/Ubuntu/WORKDIR

See http://archive.ubuntu.com/ubuntu/pool/main/c/ceph/ceph_17.2.5-0ubuntu2.debian.tar.xz
See https://src.fedoraproject.org/rpms/ceph/tree/rawhide
See https://build.opensuse.org/package/show/filesystems:ceph:quincy:upstream/ceph
See ceph#47982
See spdk/spdk#2637

Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
  • Loading branch information
hswong3i committed Mar 31, 2023
1 parent 98318ae commit 6809b94
Show file tree
Hide file tree
Showing 140 changed files with 3,683 additions and 3,425 deletions.
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ endif()

if(CMAKE_SYSTEM_NAME MATCHES "Linux")
set(LINUX ON)
set(THREADS_PREFER_PTHREAD_FLAG ON)
FIND_PACKAGE(Threads)
elseif(CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
set(FREEBSD ON)
Expand Down Expand Up @@ -496,7 +497,7 @@ if(WITH_THREAD_SAFE_RES_QUERY)
set(HAVE_THREAD_SAFE_RES_QUERY 1 CACHE INTERNAL "Thread safe res_query supported.")
endif()

option(WITH_REENTRANT_STRSIGNAL "strsignal is reentrant" OFF)
option(WITH_REENTRANT_STRSIGNAL "strsignal is reentrant" ON)
if(WITH_REENTRANT_STRSIGNAL)
set(HAVE_REENTRANT_STRSIGNAL 1 CACHE INTERNAL "Reentrant strsignal is supported.")
endif()
Expand Down
285 changes: 135 additions & 150 deletions ceph.spec.in

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion cmake/modules/BuildSPDK.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ macro(build_spdk)
# unset $CFLAGS, otherwise it will interfere with how SPDK sets
# its include directory.
# unset $LDFLAGS, otherwise SPDK will fail to mock some functions.
BUILD_COMMAND env -i PATH=$ENV{PATH} CC=${CMAKE_C_COMPILER} ${make_cmd} EXTRA_CFLAGS=${spdk_CFLAGS}
BUILD_COMMAND env -i V=1 PATH=$ENV{PATH} CC=${CMAKE_C_COMPILER} ${MAKE_EXECUTABLE} EXTRA_CFLAGS=${spdk_CFLAGS}
BUILD_IN_SOURCE 1
BUILD_BYPRODUCTS ${spdk_libs}
INSTALL_COMMAND ""
Expand Down
2 changes: 1 addition & 1 deletion cmake/modules/CheckCxxAtomic.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ int main() {
std::atomic<uint16_t> w2;
std::atomic<uint32_t> w4;
std::atomic<uint64_t> w8;
return w1 + w2 + w4 + w8;
return ++w1 + ++w2 + ++w4 + ++w8;
}
" ${var})
endfunction(check_cxx_atomics)
Expand Down
2 changes: 1 addition & 1 deletion cmake/modules/FindPython/Support.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ if (NOT DEFINED _${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR)
message (FATAL_ERROR "FindPython: INTERNAL ERROR")
endif()
if (_${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR EQUAL 3)
set(_${_PYTHON_PREFIX}_VERSIONS 3.10 3.9 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0)
set(_${_PYTHON_PREFIX}_VERSIONS 3.11 3.10 3.9 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0)
elseif (_${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR EQUAL 2)
set(_${_PYTHON_PREFIX}_VERSIONS 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0)
else()
Expand Down
11 changes: 7 additions & 4 deletions cmake/modules/SIMDExt.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,14 @@ if(CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64|AARCH64")

elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "arm|ARM")
set(HAVE_ARM 1)
CHECK_C_COMPILER_FLAG(-mfpu=neon HAVE_ARM_NEON)
if(HAVE_ARM_NEON)
set(SIMD_COMPILE_FLAGS "${SIMD_COMPILE_FLAGS} -mfpu=neon")
if(CMAKE_LIBRARY_ARCHITECTURE EQUAL "arm-linux-gnueabi")
set(SIMD_COMPILE_FLAGS "${SIMD_COMPILE_FLAGS} --with-arch=armv5te --with-float=soft")
else()
CHECK_C_COMPILER_FLAG(-mfpu=neon HAVE_ARM_NEON)
if(HAVE_ARM_NEON)
set(SIMD_COMPILE_FLAGS "${SIMD_COMPILE_FLAGS} -mfpu=neon")
endif()
endif()

elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "i386|i686|amd64|x86_64|AMD64")
set(HAVE_INTEL 1)
if(CMAKE_SYSTEM_PROCESSOR MATCHES "i686|amd64|x86_64|AMD64")
Expand Down
96 changes: 55 additions & 41 deletions debian/.gitignore
Original file line number Diff line number Diff line change
@@ -1,41 +1,55 @@
/*.substvars
/*.debhelper.log
/ceph-common-dbg
/ceph-common
/ceph-fuse-dbg
/ceph-fuse
/ceph-fs-common-dbg
/ceph-fs-common
/ceph-mds-dbg
/ceph-mds
/ceph-mgr-dbg
/ceph-mgr
/ceph-mon-dbg
/ceph-mon
/ceph-osd-dbg
/ceph-osd
/ceph-resource-agents
/ceph.init
/radosgw.init
/ceph.logrotate
/*.debhelper
/ceph
/files
/libcephfs2-dbg
/libcephfs-dev
/libcephfs2
/librados2-dbg
/librados-dev
/librados2
/librbd1-dbg
/librbd-dev
/librbd1
/radosgw-dbg
/radosgw
/python-ceph
/python-rados
/python-rbd
/python-cephfs
/libcephfs-java
/libcephfs-jni
/tmp
*.substvars
*debhelper*
.debhelper
files
tmp
ceph
cephadm
ceph-base
ceph-common
cephfs-mirror
cephfs-shell
ceph-fuse
ceph-grafana-dashboards
ceph-immutable-object-cache
ceph-mds
ceph-mgr
ceph-mgr-cephadm
ceph-mgr-dashboard
ceph-mgr-diskprediction-local
ceph-mgr-k8sevents
ceph-mgr-modules-core
ceph-mgr-rook
ceph-mon
ceph-osd
ceph-prometheus-alerts
ceph-resource-agents
ceph-volume
crimson-osd
libcephfs2
libcephfs-dev
libcephfs-java
libcephfs-jni
librados2
librados-dev
libradospp-dev
libradosstriper1
libradosstriper-dev
librbd1
librbd-dev
librgw2
librgw-dev
libsqlite3-mod-ceph
libsqlite3-mod-ceph-dev
python3-ceph
python3-ceph-argparse
python3-ceph-common
python3-cephfs
python3-rados
python3-rbd
python3-rgw
radosgw
rados-objclass-dev
rbd-fuse
rbd-mirror
rbd-nbd
27 changes: 27 additions & 0 deletions debian/calc-max-parallel.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/sh
#
# Simple tool to calculate max parallel jobs based on
# memory of builder.
#
# MDCache.cc generally runs out of RAM in 4G of memory
# with parallel=4

total_ram=$(grep MemTotal /proc/meminfo | awk '{ print $2 }')

sixteen_g=$((16*1024*1024))
eight_g=$((8*1024*1024))
four_g=$((4*1024*1024))

if [ ${total_ram} -le ${four_g} ]; then
if dpkg-architecture -q DEB_BUILD_ARCH | grep -q -e arm -e mips -e powerpc -e ppc; then
echo "--max-parallel=1"
else
echo "--max-parallel=2"
fi
elif [ ${total_ram} -le ${eight_g} ]; then
echo "--max-parallel=2"
elif [ ${total_ram} -le ${sixteen_g} ]; then
echo "--max-parallel=3"
else
echo "--max-parallel=4"
fi
1 change: 1 addition & 0 deletions debian/ceph-base.ceph.init
4 changes: 2 additions & 2 deletions debian/ceph-base.dirs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
var/lib/ceph/bootstrap-mds
var/lib/ceph/bootstrap-mgr
var/lib/ceph/bootstrap-osd
var/lib/ceph/bootstrap-rgw
var/lib/ceph/bootstrap-rbd
var/lib/ceph/bootstrap-rbd-mirror
var/lib/ceph/tmp
var/lib/ceph/bootstrap-rgw
var/lib/ceph/crash
var/lib/ceph/crash/posted
var/lib/ceph/tmp
2 changes: 1 addition & 1 deletion debian/ceph-base.docs
Original file line number Diff line number Diff line change
@@ -1 +1 @@
README
README.md
16 changes: 7 additions & 9 deletions debian/ceph-base.install
Original file line number Diff line number Diff line change
@@ -1,22 +1,20 @@
etc/init.d/ceph
## install from source tree
etc/sudoers.d/ceph-smartctl
lib/systemd/system/ceph-crash.service
usr/bin/ceph-crash
usr/bin/ceph-debugpack
usr/bin/ceph-kvstore-tool
usr/bin/ceph-run
usr/bin/crushtool
usr/bin/monmaptool
usr/bin/osdmaptool
usr/bin/ceph-kvstore-tool
usr/libexec/ceph/ceph_common.sh
usr/lib/ceph/erasure-code/*
usr/lib/rados-classes/*
usr/lib/*/ceph/erasure-code/*
usr/lib/*/rados-classes/*
usr/lib/ceph/ceph_common.sh
usr/sbin/ceph-create-keys
usr/share/doc/ceph/sample.ceph.conf
usr/share/man/man8/ceph-create-keys.8
usr/share/man/man8/ceph-debugpack.8
usr/share/man/man8/ceph-kvstore-tool.8
usr/share/man/man8/ceph-run.8
usr/share/man/man8/crushtool.8
usr/share/man/man8/monmaptool.8
usr/share/man/man8/osdmaptool.8
usr/share/man/man8/ceph-kvstore-tool.8
etc/sudoers.d/ceph-smartctl
6 changes: 0 additions & 6 deletions debian/ceph-base.lintian-overrides

This file was deleted.

2 changes: 0 additions & 2 deletions debian/ceph-base.maintscript

This file was deleted.

44 changes: 22 additions & 22 deletions debian/ceph-base.postinst
Original file line number Diff line number Diff line change
Expand Up @@ -29,26 +29,28 @@ set -e
[ -z "$SERVER_GROUP" ] && SERVER_GROUP=ceph

case "$1" in
configure)
rm -f /etc/init/ceph.conf
[ -x /sbin/start ] && start ceph-all || :

# adjust file and directory permissions
for DIR in /var/lib/ceph/* ; do
if ! dpkg-statoverride --list $DIR >/dev/null
then
chown $SERVER_USER:$SERVER_GROUP $DIR
fi
done
;;
abort-upgrade|abort-remove|abort-deconfigure)
:
;;

*)
echo "postinst called with unknown argument \`$1'" >&2
exit 1
;;
configure)
rm -f /etc/init/ceph.conf
for DIR in `ls -1 /var/lib/ceph` ; do
if ! dpkg-statoverride --list /var/lib/ceph/$DIR >/dev/null; then
if [ -d /run/systemd/system ] && [ $DIR = 'mon' ]; then
# NOTE: upgrade file permissions for mon filesystem on
# systemd based installs only due to automatic
# restarting of ceph-mon daemon
chown -R $SERVER_USER:$SERVER_GROUP /var/lib/ceph/$DIR
else
chown $SERVER_USER:$SERVER_GROUP /var/lib/ceph/$DIR
fi
fi
done
;;
abort-upgrade|abort-remove|abort-deconfigure)
:
;;
*)
echo "postinst called with unknown argument \`$1'" >&2
exit 1
;;
esac

# dh_installdeb will replace this with shell code automatically
Expand All @@ -57,5 +59,3 @@ esac
#DEBHELPER#

exit 0


50 changes: 50 additions & 0 deletions debian/ceph-base.postrm
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
#!/bin/sh
# postrm script for ceph
#
# see: dh_installdeb(1)

set -e

# summary of how this script can be called:
# * <postrm> `remove'
# * <postrm> `purge'
# * <old-postrm> `upgrade' <new-version>
# * <new-postrm> `failed-upgrade' <old-version>
# * <new-postrm> `abort-install'
# * <new-postrm> `abort-install' <old-version>
# * <new-postrm> `abort-upgrade' <old-version>
# * <disappearer's-postrm> `disappear' <overwriter>
# <overwriter-version>
# for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package


case "$1" in
remove)
;;

purge)
rm -rf /var/log/ceph
rm -rf /etc/ceph
;;

upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
;;

*)
echo "postrm called with unknown argument \`$1'" >&2
exit 1
;;
esac

dpkg-maintscript-helper rm_conffile \
/etc/logrotate.d/ceph-base 10.2.3-0ubuntu5~ -- "$@"

# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.

#DEBHELPER#

exit 0


10 changes: 10 additions & 0 deletions debian/ceph-base.preinst
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/sh

set -e

dpkg-maintscript-helper rm_conffile \
/etc/logrotate.d/ceph-base 10.2.3-0ubuntu5~ -- "$@"

#DEBHELPER#

exit 0
23 changes: 0 additions & 23 deletions debian/ceph-base.prerm

This file was deleted.

0 comments on commit 6809b94

Please sign in to comment.