ceph/checkin.sh
Michael Fritch 7b72fb8725 Accepting request 1110254 from filesystems:ceph:pacific
- Update to 16.2.14-66-g7aa6ce9419f:
  + (bsc#1207765) rgw/rados: check_quota() uses real bucket owner
  + (bsc#1212559) pacific: os/bluestore: cumulative bluefs backport
    This notably includes:
    * os/bluestore: BlueFS fine grain locking
    * os/bluestore/bluefs: Fix improper vselector tracking in _flush_special()
    * os/bluestore: enable 4K allocation unit for BlueFS
    * os/bluestore/bluefs: Fix sync compactionA
  + (bsc#1213217) ceph.spec.in: Require fmt-devel < 10
  + ceph.spec.in: enable build on riscv64 for openSUSE Factory
  + ceph.spec.in: Require Cython >= 0.29 but < 3
  + cephadm: update to the latest container images:
    * registry.suse.com/ses/7.1/ceph/prometheus-server:2.37.6
    * registry.suse.com/ses/7.1/ceph/prometheus-node-exporter:1.5.0
    * registry.suse.com/ses/7.1/ceph/grafana:8.5.22
    * registry.suse.com/ses/7.1/ceph/haproxy:2.0.31
- Drop ceph-test.changes (no longer necessary since using _multibuild)

OBS-URL: https://build.opensuse.org/request/show/1110254
OBS-URL: https://build.opensuse.org/package/show/filesystems:ceph/ceph?expand=0&rev=352
2023-09-11 15:27:09 +00:00

141 lines
3.7 KiB
Bash

#!/bin/bash
#
# checkin.sh
#
# This script automates generation of a new tarball and spec file from a
# git clone or repo+branch combination for the "ceph" package in OBS.
#
set -x
BASEDIR=$(pwd)
function usage {
set +x
echo "Usage:"
echo " ${0} [-h,--help] [-e,--existing CLONE]"
echo " [-r,--repo REPO] [-b,--branch BRANCH]"
echo ""
echo "Options:"
echo " --existing Use existing ceph clone CLONE"
echo " --repo Make a fresh clone of ceph repo REPO"
echo " --branch Use branch BRANCH with fresh clone"
echo ""
echo "Notes:"
echo " If existing clone is given, repo and branch are ignored."
echo " Repo defaults to https://github.com/SUSE/ceph.git"
echo " Branch defaults to ses7p"
exit 1
}
function _error_exit {
echo >&2 $1
exit $2
}
function _check_ceph_clone {
local OPT="$1"
if [ -z "$OPT" ] ; then
_error_exit "Empty string sent to internal function _check_ceph_clone"
fi
if [ -e "$OPT/make-dist" ] ; then
echo "$OPT looks like a ceph clone; using it"
else
_error_exit "$OPT does not appear to be a ceph clone" 1
fi
}
function _verify_git_describe {
git describe --match 'v*'
echo "Does this version number looks sane? y/[N]"
read a
if [ "x$a" != "xy" ] ; then
_error_exit "Aborting!" 1
fi
}
GETOPT=$(getopt -o b:e:hr: --long "branch:,existing:,help,repo:" \
-n 'checkin.sh' -- "$@")
test "$?" -eq 0 || _error_exit "Terminating..." 1
eval set -- "$GETOPT"
EXISTING=""
REPO="https://github.com/SUSE/ceph.git"
BRANCH="ses7p"
while true ; do
case "$1" in
-b|--branch) BRANCH="$2" ; shift 2 ;;
-e|--existing) EXISTING="$2" ; shift 2 ;;
-h|--help) usage ;; # does not return
-r|--repo) REPO="$2" ; shift 2 ;;
--) shift ; break ;;
*) echo "Internal error" ; exit 1 ;;
esac
done
if [ -n "$EXISTING" ] ; then
if [ ! -d "$EXISTING" ] ; then
_error_exit "Alleged directory ->$EXISTING<- is not a directory" 1
fi
if [ ! -r "$EXISTING" ] ; then
_error_exit "I cannot read directory ->$EXISTING<-" 1
fi
if [ ! -w "$EXISTING" ] ; then
_error_exit "I cannot write to directory ->$EXISTING<-" 1
fi
if [ ! -x "$EXISTING" ] ; then
_error_exit "I cannot cd to directory ->$EXISTING<-" 1
fi
CLONE="$EXISTING"
else
echo "Will make fresh clone of repo ->$REPO<- branch ->$BRANCH<-"
# TMPDIR=$(mktemp -d --tmpdir=$BASEDIR) # does not work due to http://tracker.ceph.com/issues/39556
TMPDIR=$(mktemp -d)
echo "Created temporary temporary $TMPDIR"
git clone --progress --branch $BRANCH $REPO $TMPDIR
CLONE="$TMPDIR"
fi
_check_ceph_clone "$CLONE"
pushd $CLONE
#_verify_git_describe
if [ -z "$TMPDIR" ] ; then
echo "Deleting stale tarballs from previous runs"
rm -rf *.bz2
fi
echo "Running make-dist inside clone"
export DASHBOARD_FRONTEND_LANGS="ALL"
./make-dist
popd
echo "Running \"osc rm *bz2\" to nuke previous tarball"
if type osc > /dev/null 2>&1 ; then
osc rm *bz2
else
_error_exit "osc not installed - cannot continue" 1
fi
if stat --printf='' *.bz2 2>/dev/null ; then
_error_exit "There are still files ending in bz2 in the current directory - clean up yourself!" 1
fi
echo "Copying new spec file and tarball from $CLONE"
cp $CLONE/ceph.spec $CLONE/ceph*bz2 .
if [ -n "$TMPDIR" ] ; then
echo "Nuking the clone"
rm -rf $TMPDIR
fi
echo "Running \"osc add *bz2\" to register the new tarball"
osc add *bz2
echo "Running pre_checkin.sh"
if [ -f "pre_checkin.sh" ] ; then
bash pre_checkin.sh
else
echo "WARNING: no pre_checkin.sh script found!"
fi
echo "Done! Run \"osc ci --noservice\" to commit."