Hello community,

here is the log from the commit of package ceph.15084 for 
openSUSE:Leap:15.2:Update checked in at 2020-11-27 14:25:36
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Leap:15.2:Update/ceph.15084 (Old)
 and      /work/SRC/openSUSE:Leap:15.2:Update/.ceph.15084.new.5913 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ceph.15084"

Fri Nov 27 14:25:36 2020 rev:1 rq:850456 version:15.2.5.667+g1a579d5bf2

Changes:
--------
New Changes file:

--- /dev/null   2020-11-18 17:46:03.679371574 +0100
+++ /work/SRC/openSUSE:Leap:15.2:Update/.ceph.15084.new.5913/ceph-test.changes  
2020-11-27 14:25:58.740800965 +0100
@@ -0,0 +1,2548 @@
+-------------------------------------------------------------------
+Fri Nov 13 16:58:17 UTC 2020 - Nathan Cutler <[email protected]>
+
+- Update to 15.2.5-667-g1a579d5bf2:
+  + Fix CVE-2020-25660 (bsc#1177843)
+    * mon/MonClient: bring back CEPHX_V2 authorizer challenges
+    * msg/async/ProtocolV1: resurrect "implement cephx_*require_version 
options"
+    * msg/async/ProtocolV1: resurrect "include MGR as service when applying 
cephx settings"
+
+-------------------------------------------------------------------
+Fri Nov 13 11:13:11 UTC 2020 - Nathan Cutler <[email protected]>
+
+- Update to 15.2.5-664-gfbc9fa98aa:
+  + Rebase on tip of upstream "octopus" branch, SHA1 
31d4e76d0d584790763b4b1146b29ea4cfc2e9af
+    * (bsc#1170200) mgr/dashboard: Fix for CrushMap viewer items getting 
compressed vertically
+    * (bsc#1174466) mon: have 'mon stat' output json as well
+    * (bsc#1177344) mgr/dashboard: support Orchestrator and user-defined 
Ganesha cluster
+    * (bsc#1178073) mgr/dashboard: fix downstream NFS doc links
+    * (bsc#1178531) cephadm: set default container_image to 
registry.suse.com/ses/7/ceph/ceph
+
+-------------------------------------------------------------------
+Wed Oct 21 09:48:15 UTC 2020 - Nathan Cutler <[email protected]>
+
+- Update to 15.2.5-514-g7a2bcdb091:
+  + Rebase on tip of upstream "octopus" branch, SHA1 
afe740393a17dc80a91f8baca4ef92d0135c4525
+  + (bsc#1177319) mgr/cephadm: make --container-init a global option
+  + (bsc#1177933) cephadm: configure journald as the logdriver
+
+-------------------------------------------------------------------
+Wed Oct 14 19:08:06 UTC 2020 - Nathan Cutler <[email protected]>
+
+- Update to 15.2.5-432-g0ead4ca479:
+  + cephadm: allow uid/gid == 0 in copy_tree, copy_files, move_files 
(bsc#1177676)
+
+-------------------------------------------------------------------
+Tue Oct 13 20:16:42 UTC 2020 - Nathan Cutler <[email protected]>
+
+- Update to 15.2.5-430-g652d1d1e54:
+  + Revert "spec: Podman (temporarily) requires apparmor-abstractions on suse"
+    (bsc#1177643)
+
+-------------------------------------------------------------------
+Fri Oct  9 07:54:00 UTC 2020 - Nathan Cutler <[email protected]>
+
+- Update to 15.2.5-429-g96b264c584:
+  + Rebase on tip of upstream "octopus" branch, SHA1 
82793ade49526d7d5674e488fba88e7568888ebb
+    * (bsc#1173079) mgr/devicehealth: device_health_metrics pool gets created
+      even without any OSDs in the cluster 
+
+-------------------------------------------------------------------
+Thu Oct  8 17:20:48 UTC 2020 - Nathan Cutler <[email protected]>
+
+- Update to 15.2.5-411-g6432ac8c37:
+  + Rebase on tip of upstream "octopus" branch, SHA1 
72e846aa6fb25df05a17ded0287ff0a59c579d7f
+    * (bsc#1174644) cephadm: log to file
+    * (bsc#1176499) mgr/cephadm: fix RemoveUtil.load_from_store()
+
+-------------------------------------------------------------------
+Thu Oct  8 10:20:48 UTC 2020 - Nathan Cutler <[email protected]>
+
+- Update to 15.2.5-355-g33a4cd4ce3:
+  + Rebase on tip of upstream "octopus" branch, SHA1 
be28449139148fb00086e11185abeebd3cb5b5b8
+  + ceph-volume: don't exit before empty report can be printed (bsc#1177450)
+
+-------------------------------------------------------------------
+Wed Oct  7 08:54:25 UTC 2020 - Nathan Cutler <[email protected]>
+
+- Update to 15.2.5-352-gf4a94295a4:
+  + Rebase on tip of upstream "octopus" branch, SHA1 
e819e7280dd64d9f2d54359067056fe0e342c10d
+  + Drop patch "rpm: on SUSE, podman is required for cephadm to work"
+    (bsc#1176451)
+  + Re-cherry-pick "ceph-volume: major batch refactor" upstream octopus 
backport PR
+    * (bsc#1177151) python-common: do not skip unavailable devices
+
+-------------------------------------------------------------------
+Wed Oct  7 07:43:59 UTC 2020 - Nathan Cutler <[email protected]>
+
+- Update to 15.2.5-222-g3a105ce6a4:
+  + cherry-pick --container-init feature and follow-on fix from upstream
+    (bsc#1163764) (bsc#1177319)
+    * cephadm: Fix error setting 'mgr/cephadm/container_init' config
+    * mgr/cephadm: Call cephadm with --container-image
+    * cephadm: Add --container-image
+
+-------------------------------------------------------------------
+Tue Sep 29 10:29:19 UTC 2020 - Nathan Cutler <[email protected]>
+
+- Update to 15.2.5-220-gb758bfd693:
+  + rebase on tip of upstream "octopus" branch, SHA1 
4e5be808dc271f6dc00ebdcc352e5e8ab0bac16e
+    * mgr/dashboard: Fix bugs in a unit test and i18n translation (bsc#1177078)
+
+-------------------------------------------------------------------
+Mon Sep 28 19:48:03 UTC 2020 - Nathan Cutler <[email protected]>
+
+- Update to 15.2.5-206-g1627a4c33d:
+  + octopus: cephfs: backport snap-schedule module (jsc#SES-704)
+
+-------------------------------------------------------------------
+Fri Sep 25 13:29:42 UTC 2020 - Nathan Cutler <[email protected]>
+
+- Update to 15.2.5-170-g2cc001476b: 
+  + Updated SES7 downstream branding (bsc#1175120)
+  + monitoring: switch to CaaSP v4.5 container images
+  + ceph-volume: batch: call the right prepare method
+  + ceph-volume: batch: fix very_fast_allocation plan and add tests
+
+-------------------------------------------------------------------
+Thu Sep 24 15:13:12 UTC 2020 - Nathan Cutler <[email protected]>
+
+- Update to 15.2.5-167-gee11658d9d:
+  + rebase on tip of upstream "octopus" branch, SHA1 
efdb0db2de7b1795bace506fc1538c0325fdcbbc
+    * upstream Octopus v15.2.5 release, see 
https://ceph.io/releases/v15-2-5-octopus-released/
+
+-------------------------------------------------------------------
+Wed Sep 16 19:00:33 UTC 2020 - Nathan Cutler <[email protected]>
+
+- Update to 15.2.4-944-g85788353cf:
+  + ceph-volume: batch: call the right prepare method (bsc#1176638)
+
+-------------------------------------------------------------------
+Mon Sep 14 20:18:52 UTC 2020 - Nathan Cutler <[email protected]>
+
+- Update to 15.2.4-942-g7a609d729d:
+  + ceph-volume: major batch refactor (jsc#SES-1071)
+
+-------------------------------------------------------------------
+Fri Sep 11 17:50:12 UTC 2020 - Nathan Cutler <[email protected]>
+
+- Update to 15.2.4-908-g4cc5421bb2: 
+  + octopus: cephadm batch backport September (1) (upstream PR #36975)
+  + mgr/dashboard: Downstream branding update
+
+-------------------------------------------------------------------
+Mon Sep  7 08:11:00 UTC 2020 - Nathan Cutler <[email protected]>
+
+- Update to 15.2.4-864-g0f510cb110:
+  + rebase on tip of upstream "octopus" branch, SHA1 
65d8836383deeacfc8343f8d6563548a4c44c835
+  + revert "ceph-volume: add lvmcache plugin" (jsc#SES-185)
+  + rpm: on SUSE, podman is required for cephadm to work (bsc#1174529)
+  + mgr/dashboard: Downstream branding update (bsc#1175161, bsc#1175169)
+  + monitoring: use full qualified image names for cephadm
+
+-------------------------------------------------------------------
+Mon Aug 31 10:38:56 UTC 2020 - Nathan Cutler <[email protected]>
+
+- Update to 15.2.4-827-g318de690ed:
+  + ceph-volume: add lvmcache plugin
+
+-------------------------------------------------------------------
+Wed Aug 26 11:57:23 UTC 2020 - Nathan Cutler <[email protected]>
+
+- Update to 15.2.4-822-g24d833526b 
+  + rebase on tip of upstream "octopus" branch, SHA1 
0887d548597b9d2381de42c1cc8a5c01d264ae8b
+
+-------------------------------------------------------------------
+Mon Aug 10 10:30:37 UTC 2020 - Tim Serong <[email protected]>
+
+- Update to 15.2.4.557+g4ac763f0b3
+  + rebase on tip of upstream "octopus" branch, SHA1 
96411838ef6fef9a5285ca4d5c0708e6a599632e
+
+-------------------------------------------------------------------
+Sun Aug  9 21:21:15 UTC 2020 - Nathan Cutler <[email protected]>
+
+- Update to 15.2.4-511-g40953bf9d6
+  + rebase on tip of upstream "octopus" branch, SHA1 
f3b8bc0d11ca4f8167615007645759e905b1ada5
+
+-------------------------------------------------------------------
+Sun Jul 26 11:04:15 UTC 2020 - Nathan Cutler <[email protected]>
+
+- Update to 15.2.4-465-g5e8d9ae6bd
+  + rebase on tip of upstream "octopus" branch, SHA1 
213e2c803b4f68c9f0b33119c64638a6813d2692
+
+-------------------------------------------------------------------
+Fri Jul 17 16:08:29 UTC 2020 - Nathan Cutler <[email protected]>
+
+- Update to 15.2.4-381-g734ae877b4:
+  + rebase on tip of upstream "octopus" branch, SHA1 
d0da4070a19a55ebe9c55904d6da2ad38833aae0
+
+-------------------------------------------------------------------
+Wed Jul 15 17:05:19 UTC 2020 - Nathan Cutler <[email protected]>
+
+- Update to 15.2.4-342-g6987dec446:
+  + cmake: add empty RPATH to ceph-diff-sorted
+
+-------------------------------------------------------------------
+Tue Jul 14 18:08:04 UTC 2020 - Nathan Cutler <[email protected]>
+
+- Update to 15.2.4-337-g55cec95eaf:
+  + rebase on tip of upstream "octopus" branch, SHA1 
405556b2629d8274dea2e14ee017c70a7dfb24a1
+  + Monitoring: Use downstream container images
+
+-------------------------------------------------------------------
+Fri Jul  3 17:06:22 UTC 2020 - Nathan Cutler <[email protected]>
+
+- Update to 15.2.4-89-g583fe198f6:
+  + rebase on tip of upstream "octopus" branch, SHA1 
5a3693ca1e7148b0365557740d6f70f3db8cd0e8
+    * upstream Octopus v15.2.4 release, see 
https://ceph.io/releases/v15-2-4-octopus-released/
++++ 2351 more lines (skipped)
++++ between /dev/null
++++ and 
/work/SRC/openSUSE:Leap:15.2:Update/.ceph.15084.new.5913/ceph-test.changes
New Changes file:

ceph.changes: same change

New:
----
  README-ceph-test.txt
  README-checkin.txt
  _constraints
  ceph-15.2.5-667-g1a579d5bf2.tar.bz2
  ceph-rpmlintrc
  ceph-test.changes
  ceph-test.spec
  ceph.changes
  ceph.spec
  checkin.sh
  pre_checkin.sh

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ ceph-test.spec ++++++
++++ 1210 lines (skipped)

ceph.spec: same change
++++++ README-ceph-test.txt ++++++
ceph-test.spec apologia
=======================

The ceph-test.spec file is generated automatically by running pre_checkin.sh

Originally, the ceph-test RPM was built by ceph.spec as a subpackage.

When ceph was first included in Ring1, the build time was too long and ceph
was blocking Factory builds. The ceph-test RPM - a non-user-facing subpackage
that is only used by CI tests - accounted for a significant portion of that
excessive build time. By spinning the ceph-test RPM off to a standalone spec
file spec file, the build time of ceph.spec was reduced and it was no longer
a problem to have ceph in Ring1.

A script, pre_checkin.sh, which is run before every commit, automatically
generates ceph-test.spec from ceph.spec. Thus, ceph-test.spec should be seen
as a "build artifact" whose purpose is to build the ceph-test RPM as it would
have been built had the original ceph.spec not been split.

Although this workflow results in a "not-pretty" ceph-test.spec, it has an
advantage in that ceph-test.spec is maintenance-free. Maintaining *two* spec
files for Ceph would be tricky, error-prone, and labor-intensive.

Nathan Cutler
April 17, 2017
++++++ README-checkin.txt ++++++
Use the "checkin.sh" script to generate ceph.spec and tarball from a git repo
and branch.  For example:

    $ bash checkin.sh --repo https://github.com/foo/ceph --branch wip-foo

For more options, try "./checkin.sh --help"


FAQ
===

Q. What is the pre_checkin.sh script?

A. The "pre_checkin.sh" script generates ceph-test.spec from ceph.spec, and
ceph-test.changes from ceph.changes.

Q. Should I run it before running checkin.sh?

A. It doesn't hurt to run it, but no, you don't need to run it because
checkin.sh does that for you.
++++++ _constraints ++++++
<?xml version="1.0"?>
<constraints>

  <sandbox>kvm</sandbox>

  <overwrite>
    <conditions>
      <arch>x86_64</arch>
      <package>ceph</package>
    </conditions>
    <hardware>
      <disk>
         <size unit="G">36</size>
      </disk>
      <memory>
         <size unit="G">10</size>
      </memory>
    </hardware>
  </overwrite>

  <overwrite>
    <conditions>
      <arch>aarch64</arch>
      <package>ceph</package>
    </conditions>
    <hardware>
      <disk>
         <size unit="G">36</size>
      </disk>
      <memory>
         <size unit="G">10</size>
      </memory>
    </hardware>
  </overwrite>

  <overwrite>
    <conditions>
      <arch>ppc64le</arch>
      <package>ceph</package>
    </conditions>
    <hardware>
      <disk>
         <size unit="G">36</size>
      </disk>
      <memory>
         <size unit="G">9</size>
      </memory>
    </hardware>
  </overwrite>

  <overwrite>
    <conditions>
      <arch>s390x</arch>
      <package>ceph</package>
    </conditions>
    <hardware>
      <disk>
         <size unit="G">28</size>
      </disk>
      <memory>
         <size unit="G">9</size>
      </memory>
    </hardware>
  </overwrite>

  <overwrite>
    <conditions>
      <arch>x86_64</arch>
      <package>ceph-test</package>
    </conditions>
    <hardware>
      <disk>
         <size unit="G">52</size>
      </disk>
      <memory>
         <size unit="G">12</size>
      </memory>
    </hardware>
  </overwrite>

  <overwrite>
    <conditions>
      <arch>aarch64</arch>
      <package>ceph-test</package>
    </conditions>
    <hardware>
      <disk>
         <size unit="G">42</size>
      </disk>
      <memory>
         <size unit="G">9</size>
      </memory>
    </hardware>
  </overwrite>

  <overwrite>
    <conditions>
      <arch>ppc64le</arch>
      <package>ceph-test</package>
    </conditions>
    <hardware>
      <disk>
         <size unit="G">28</size>
      </disk>
      <memory>
         <size unit="G">8</size>
      </memory>
    </hardware>
  </overwrite>

  <overwrite>
    <conditions>
      <arch>s390x</arch>
      <package>ceph-test</package>
    </conditions>
    <hardware>
      <disk>
         <size unit="G">28</size>
      </disk>
      <memory>
         <size unit="G">8</size>
      </memory>
    </hardware>
  </overwrite>

</constraints>
++++++ ceph-rpmlintrc ++++++
# Upstream has fixed share library dependencies, all within the
# ceph src package. Eliminating them is a long-term effort.
addFilter("shlib-fixed-dependency")

# ceph-base RPM ships some internal static libraries
addFilter("ceph-base.*devel-file-in-non-devel-package.*compressor")
addFilter("ceph-base.*devel-file-in-non-devel-package.*rados-classes")
addFilter("ceph-base.*devel-file-in-non-devel-package.*libceph_crypto")
addFilter("ceph-base.*devel-file-in-non-devel-package.*libos_tp")
addFilter("ceph-base.*devel-file-in-non-devel-package.*libosd_tp")

# env shebang hack is required because the same script has to run in FreeBSD as
# well as Linux (Fedora, CentOS, SUSE, Debian, Ubuntu, etc.)
addFilter("ceph-common.*env-script-interpreter.*rbd-replay-many")
addFilter("ceph-common.*env-script-interpreter.*rbdmap")

# cephadm intentionally ships an empty file (.ssh/authorized_keys)
# and a hidden directory (/var/lib/cephadm/.ssh)
addFilter("cephadm.*zero-length")
addFilter("cephadm.*hidden-file-or-dir")

# ceph-mgr-dashboard ships a bunch of empty files and hidden files: need to 
audit if they are needed (WIP)
addFilter("ceph-mgr-dashboard.*zero-length")
addFilter("ceph-mgr-dashboard.*hidden-file-or-dir")

# ceph-immutable-object-cache has a weird description (WIP)
addFilter("ceph-immutable-object-cache.*description-shorter-than-summary")

# ceph-osd depends on libstoragemgmt explicitly (WIP)
addFilter("ceph-osd.*explicit-lib-dependency.*libstoragemgmt")

# we have a problem with RPM names that are too long for Joliet filesystem (WIP)
addFilter("filename-too-long-for-joliet")

# ceph-base intentionally calls its logrotate file "etc/logrotate.d/ceph"
addFilter("ceph-base.*incoherent-logrotate-file")

# many ceph executables might not be relinquishing groups (WIP)
addFilter("missing-call-to-setgroups-before-setuid")

# package summary might intentionally contain the word "Ceph" 
addFilter("name-repeated-in-summary")

# the ceph RPM should be of the noarch architecture because it contains no 
binaries (WIP)
addFilter("ceph.*no-binary")

# cephfs-shell might be missing a Requires (WIP)
addFilter("cephfs-shell.*no-dependency-on.*python-base")

# ceph-osd ships /etc/sudoers.d/ceph-osd-smartctl without %config (WIP)
addFilter("ceph-osd.*non-conffile-in-etc.*sudoers")

# cephadm ships /etc/sudoers.d/cephadm without %config (WIP)
addFilter("cephadm.*non-conffile-in-etc.*sudoers")

# ceph-osd ships /usr/lib/sysctl.d/90-ceph-osd.conf with %config (WIP)
addFilter("ceph-osd.*non-etc-or-var-file-marked-as-conffile.*sysctl.d")

# ceph-dashboard ships several scripts that don't have executable bit set (WIP)
addFilter("ceph-mgr-dashboard.*non-executable-script")

# ceph-mgr-rook ships a script that doesn't have executable bit set (WIP)
addFilter("ceph-mgr-rook.*non-executable-script.*generate_rook_ceph_client.sh")

# some devel packages obsolete the deprecated "ceph-devel" package without 
providing it (WIP)
addFilter("obsolete-not-provided.*ceph-devel")

# libcephfs2 obsoletes libcephfs1 without providing it (WIP)
addFilter("libcephfs2.*obsolete-not-provided.*libcephfs1")

# librgw2 calls exit() or _exit(), probably in a non-fork() context (WIP)
addFilter("librgw2.*shared-lib-calls-exit")

# ceph-base ships with shared libraries - these are internal and upstream does
# not want to split them into separate RPMS
addFilter("ceph-base.*shlib-policy-missing-suffix")

# the ceph RPM is a "meta" RPM without any files. These are discouraged by SUSE,
# but upstream relies on this construct and we just have to live with it.
addFilter("ceph\..*suse-filelist-empty")

# ceph-common ships bash-completion files in the wrong directory (WIP)
addFilter("ceph-common.*suse-filelist-forbidden-bashcomp-userdirs")

# ceph-base ships a logrotate file in /etc/logrotate.d/ceph but does not not
# package the log directory /var/log/ceph (WIP)
addFilter("ceph-base.*suse-logrotate-log-dir-not-packaged")

# our packages are missing "rcFOO" symlinks - I doubt if this is worth fixing
addFilter("suse-missing-rclink")

# %post scriptlets do not call service_add_post (WIP)
addFilter("systemd-service-without-service_add_post")

# %pre scriptlets do not call service_add_pre (WIP)
addFilter("systemd-service-without-service_add_pre")

# %postun scriptlets do not call service_del_postun (WIP)
addFilter("systemd-service-without-service_del_postun")

# %preun scriptlets do not call service_del_preun (WIP)
addFilter("systemd-service-without-service_del_preun")

# /run/ceph needs to be added to %files section as %ghost (WIP)
addFilter("ceph-common.*tmpfile-not-in-filelist")

# ceph-radosgw ships a SO that belongs in librgw-devel (WIP)
addFilter("ceph-radosgw.*devel-file-in-non-devel-package")

++++++ checkin.sh ++++++
#!/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 ses6"
    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="ses6"
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 you touch the ceph.changes file after running 
this script, re-run pre_checkin.sh manually)"
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."
++++++ pre_checkin.sh ++++++
#!/bin/bash

set -f

function packages_files {
  local spec_file=$1
  local exclude_pkg=$2
  local in_files=false
  local result=""
  
  while IFS='' read -r line || [[ -n "$line" ]]; do
  
    case $line in
    "%files "*)
        pkg=`echo "$line" | sed 's/%files.* \(\w\+\)/\1/g'`
        if [[ $pkg == $exclude_pkg ]]; then
          in_files=false
          continue
        fi
        in_files=true
        continue
        ;;
    "%post"* | "%pre"* | "%preun"* | "%postun"* | "%changelog")
      in_files=false
      continue
      ;;
    esac
    
    result=""
    changed=true
    while [[ $in_files == true ]] && [[ $changed == true ]]; do
      changed=false
      case $line in
      "%if"* | "" | "%defattr"* | "%endif"* | "%else"* | "#"* | "%docdir"*)
        break
        ;;
      "%dir"*)
        break # for now we'll ignore %dir entries
        ;;
      *)
        result=`echo "$line" | sed -e 's/%config \(.*\)/\1/g' \
                                   -e 's/%config(.*) \(.*\)/\1/g' \
                                   -e 's/%attr(.*) \(.*\)/\1/g' \
                                   -e 's/%exclude \(.*\)/\1/g'`
        if [[ ! $line == $result ]]; then
          changed=true
                line=$result
        continue
        fi
        ;;
      esac
      
      echo "$result"
    done
  done < $spec_file
}

function get_package_summary {
  local spec_file=$1
  local pkg_name=$2
  local in_package=false
  
  while IFS='' read -r line || [[ -n "$line" ]]; do
  
    case $line in
    "%package "*)
      pkg=`echo "$line" | sed 's/%package.* \(\w\+\)/\1/g'`
      if [[ ! $pkg == $pkg_name ]]; then
        in_package=false
      else
        in_package=true
      fi
      ;;
    "%prep"* | "%build"* | "%install"*)
      in_package=false
      ;;
    "Summary:"*)
      if [[ $in_package == true ]]; then
        echo $line
        break
      fi
      ;;
    esac
  done < $spec_file
}

function get_package_requires {
  local spec_file=$1
  local pkg_name=$2
  local in_package=false
  
  while IFS='' read -r line || [[ -n "$line" ]]; do
  
    case $line in
    "%package "*)
      pkg=`echo "$line" | sed 's/%package.* \(\w\+\)/\1/g'`
      if [[ ! $pkg == $pkg_name ]]; then
        in_package=false
      else
        in_package=true
      fi
      ;;
    "%prep"* | "%build"* | "%install"*)
      in_package=false
      ;;
    "Requires:"*)
      if [[ $in_package == true ]]; then
        echo $line
      fi
      ;;
    esac
  done < $spec_file
}

function get_package_description {
  local spec_file=$1
  local pkg_name=$2
  local in_desc=false
  
  while IFS='' read -r line || [[ -n "$line" ]]; do
  
    case $line in
    "%description "*)
      pkg=`echo "$line" | sed 's/%description.* \(\w\+\)/\1/g'`
      if [[ ! $pkg == $pkg_name ]]; then
        in_desc=false
      else
        in_desc=true
      fi
      continue
      ;;
    "%prep"* | "%build"* | "%install"* | "%package"* | "%if"* | "%endif"*)
      in_desc=false
      continue
      ;;
    esac
   
    if [[ $in_desc == true ]]; then
      echo "$line"
    fi
  done < $spec_file
}

function transform_spec_file {
  local spec_file=$1
  local include_pkg=$2
  local rm_files=$3
  local summary=$4
  local description=$5
  local requires=$6
  local in_package=false
  local in_files=false
  local in_desc=false
  
  while IFS='' read -r line || [[ -n "$line" ]]; do
  
    case $line in
    "%bcond_with ceph_test_package"*)
      line="%bcond_without ceph_test_package"
      ;;
    "Name:"*)
      line="Name:           $include_pkg"
      ;;
    "Summary:"*)
      if [[ $in_package == false ]]; then
        line="$summary"
      fi
      ;;
    "Source0:"*)
      line=`echo $line | sed 's/%{name}/ceph/g'`
      ;;
    "ExclusiveArch:"*)
      line="ExclusiveArch: x86_64"
      ;;
    "%autosetup -p1")
      line="%autosetup -p1 -n ceph-%version"
      ;;
    "Requires:"*)
      if [[ $in_package == false ]]; then
        line=""
      fi
      ;;
    "Requires(post):"*)
      if [[ $in_package == false ]]; then
        IFS=''
        for r in "$requires"; do
          echo "$r"
        done
      fi
      ;;
    "%description"*)
      if [[ $in_package == false ]]; then
        in_desc=true
        echo "$line"
        echo "$description"
        echo ""
        continue
      fi
      ;;
    "%package "*)
        in_package=true
        continue
        ;;
    "%prep"* | "%build"* | "%install"*)
      in_package=false
      in_desc=false
      ;;
    "%files "*)
        pkg=`echo "$line" | sed 's/%files.* \(\w\+\)/\1/g'`
        if [[ $pkg == $include_pkg ]]; then
          in_files=false
        else
          in_files=true
          continue
        fi
        ;;
    "%changelog"*)
      in_files=false
      ;;
    "%clean"*)
      in_package=false
      IFS=''
      for rf in "$rm_files"; do
        echo "$rf"
      done
      echo ""
      echo "dirs=\`find %{buildroot} -type d -empty\`"
      echo "while [[ -n \$dirs ]]; do"
      echo "  for d in \$dirs; do"
      echo "    rm -rf \$d"
      echo "  done"
      echo "dirs=\`find %{buildroot} -type d -empty\`"
      echo "done"
      echo ""
      ;;
    "#"* | "%"*)
      in_desc=false
      ;;
    esac

  if [[ $in_package == false ]] && [[ $in_files == false ]] && [[ $in_desc == 
false ]]; then
    echo $line
  else
    if [[ $line == "%if"* ]] || [[ $line == "%endif"* ]]; then
      echo $line
    fi
  fi

  done < $spec_file
}

function generate_rm_exclude_files {
  local exclude_list=$1
  local buildroot=$2

  for f in $exclude_list; do
    echo "rm -rf $buildroot$f"
  done
}

function insert_line_before {
  local FILE=$1
  local line_to_insert=$2
  local match_regex=$3
  sed -i "/${match_regex}/i $line_to_insert" $FILE
}

function copy_changes_file {
  local dest_pkg=$1

  cp ceph.changes ${dest_pkg}.changes
}

PACKAGE="ceph-test"
SPEC_FILE="ceph.spec"

files=`packages_files $SPEC_FILE $PACKAGE`
if [[ "$?" == "1" ]]; then
 echo "ERROR: "
 echo $files
 exit 0
fi
rm_files=`generate_rm_exclude_files "$files" "%{buildroot}"`
summ=`get_package_summary $SPEC_FILE $PACKAGE`
desc=`get_package_description $SPEC_FILE $PACKAGE`
reqs=`get_package_requires $SPEC_FILE $PACKAGE`
sed -i -e 's/%bcond_without ceph_test_package/%bcond_with ceph_test_package/' 
$SPEC_FILE
transform_spec_file $SPEC_FILE $PACKAGE "$rm_files" "$summ" "$desc" "$reqs" > 
$PACKAGE.spec
insert_line_before "${PACKAGE}.spec" "Source99: ceph-rpmlintrc" 
"_insert_obs_source_lines_here"
insert_line_before "${PACKAGE}.spec" "Source98: README-ceph-test.txt" 
"^Source99:"
insert_line_before "${PACKAGE}.spec" "Source97: README-checkin.txt" "^Source98:"
insert_line_before "${PACKAGE}.spec" "Source96: checkin.sh" "^Source97:"
copy_changes_file $PACKAGE
_______________________________________________
openSUSE Commits mailing list -- [email protected]
To unsubscribe, email [email protected]
List Netiquette: https://en.opensuse.org/openSUSE:Mailing_list_netiquette
List Archives: 
https://lists.opensuse.org/archives/list/[email protected]

Reply via email to