Hello community, here is the log from the commit of package rook for openSUSE:Factory checked in at 2019-07-16 08:39:22 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/rook (Old) and /work/SRC/openSUSE:Factory/.rook.new.1887 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rook" Tue Jul 16 08:39:22 2019 rev:2 rq:714841 version:1.0.0+git1697.ga265cdfd Changes: -------- --- /work/SRC/openSUSE:Factory/rook/rook.changes 2019-07-11 13:15:34.382820703 +0200 +++ /work/SRC/openSUSE:Factory/.rook.new.1887/rook.changes 2019-07-16 08:39:24.587053068 +0200 @@ -1,0 +2,45 @@ +Fri Jul 12 08:29:40 UTC 2019 - Denis Kondratenko <[email protected]> + +- Fix sed expression to replace correct link + +------------------------------------------------------------------- +Fri Jul 12 07:51:34 UTC 2019 - Denis Kondratenko <[email protected]> + +- Add ceph-csi as a dependency and update manifest link with it + +------------------------------------------------------------------- +Thu Jul 11 11:57:09 UTC 2019 - Denis Kondratenko <[email protected]> + +- correct version for Rook build that doesn's support "+" + +------------------------------------------------------------------- +Tue Jul 9 11:02:37 UTC 2019 - Denis Kondratenko <[email protected]> + +- noarch for the rook-k8s-yaml package +- update rook to a265cdf commit + + added ROOK_CSI_* template pathes +- modify update script for none Go enviroment + +------------------------------------------------------------------- +Mon Jul 8 20:31:11 UTC 2019 - Blaine Gardner <[email protected]> + +- Fix subtly broken dependency (vendor dir) generation +- Generate two tarballs for builds to follow latest upstream best practices for Golang RPM builds + + primary source tarball is unmodified from source code, and vendor dir is a separate tarball +- Add Rook toolbox script to main rook package +- Update manifests to use SUSE image for toolbox +- Update spec file dependencies + + remove old Rook dependencies + + add missing dependencies from the upstream Ceph image (notably nfs-ganesha and CSI requirements) +- Update build to include go build linker flag to set rook binary's internal version representation +- Remove FlexVolume config from manifests, as we intend to use CSI henceforth +- Update Rook to commit c4a3763b6415a118aedaee52eaf76cbdf6b0dabb + + delay starting Rook system daemons until a CephCluster is created + + stop setting CRUSH tunable automatically + + use --ms-learn-addr-from-peer flag for OSDs for Ceph v14.2.2 and up - https://github.com/rook/rook/issues/3140 + + when appropriate, look for rook and tini binaries in PATH if not found in default location + + set fully qualified apiVersion on OwnerReferences + + OSDs marked out by Ceph will have their Kubernetes resources automatically cleaned up (will not be removed from CRUSH map) + + add NodeAffinity to system daemons + +------------------------------------------------------------------- Old: ---- rook-1.0.0+git1615.g26887efd.tar.xz New: ---- rook-1.0.0+git1697.ga265cdfd-vendor.tar.xz rook-1.0.0+git1697.ga265cdfd.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ rook.spec ++++++ --- /var/tmp/diff_new_pack.WLD2qs/_old 2019-07-16 08:39:25.267052681 +0200 +++ /var/tmp/diff_new_pack.WLD2qs/_new 2019-07-16 08:39:25.271052678 +0200 @@ -1,7 +1,7 @@ # -# spec file for rook binaries +# spec file for package rook # -# Copyright (c) 2018 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -12,12 +12,12 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -################################################################################ -# Rook metadata -################################################################################ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + Name: rook -Version: 1.0.0+git1615.g26887efd +Version: 1.0.0+git1697.ga265cdfd Release: 0 Summary: Orchestrator for distributed storage systems in cloud-native environments License: Apache-2.0 @@ -25,6 +25,7 @@ Url: https://rook.io/ Source0: %{name}-%{version}.tar.xz +Source1: %{name}-%{version}-vendor.tar.xz Source98: README Source99: update-tarball.sh %if 0%{?suse_version} @@ -33,32 +34,41 @@ %endif # Go and spec requirements -BuildRequires: golang-packaging BuildRequires: go +BuildRequires: golang-packaging BuildRequires: xz # Rook requirements BuildRequires: curl BuildRequires: git -# Ceph version is needed for the correct container tag +# Ceph version is needed to set correct container tag in manifests BuildRequires: ceph +# ceph-csi driver version is needed to update manifest with it +BuildRequires: ceph-csi # Rook runtime requirements - referenced from packages installed in Rook images -# From images/base/Dockerfile.rootfs-builder -Requires: net-tools -Requires: netcat-openbsd +# From images/ceph/Dockerfile Requires: tini -# From images/rook/Dockerfile.base +# From Ceph base container: github.com/ceph/ceph-container/src/daemon-base/... Requires: ca-certificates Requires: ceph-common -Requires: ceph-mon -Requires: ceph-osd +Requires: ceph-fuse Requires: ceph-mds Requires: ceph-mgr -Requires: kmod +Requires: ceph-mon +Requires: ceph-osd Requires: ceph-radosgw +Requires: e2fsprogs +Requires: gptfdisk +Requires: kmod +Requires: lvm2 +Requires: nfs-ganesha +Requires: nfs-ganesha-ceph +Requires: nfs-ganesha-rados-grace +Requires: nfs-ganesha-rgw Requires: rbd-mirror +Requires: rbd-nbd %description Rook is an open source cloud-native storage orchestrator for Kubernetes, @@ -84,10 +94,11 @@ %package k8s-yaml Summary: Kubernetes yaml file to deploy Ceph cluster Group: System/Management +BuildArch: noarch %description k8s-yaml -This package contains the yaml file requried to download, deploy and run the -Rook operator and Ceph containers in a kubernetes cluster. +This package contains the yaml files requried deploy and run the +Rook-Ceph operator and Ceph clusters in a Kubernetes cluster. ################################################################################ # The tasty, meaty build section @@ -97,12 +108,16 @@ %prep %setup -q -n %{name} +%setup -q -n %{name} -T -D -b 1 # unpack Source1, don't delete what was unpacked before %build -%goprep github.com/rook/rook/ -%gobuild cmd/rook -%gobuild cmd/rookflex +#we need to remove unsupported by Rook symbols from version +version_parsed=%{version} + +%goprep github.com/rook/rook +%gobuild -ldflags "-X github.com/rook/rook/pkg/version.Version=${version_parsed//[+]/-}" cmd/rook +%gobuild cmd/rookflex %install # Rook's make builds put the output bin into rook/_output/bin/linux_<platform>/ @@ -117,22 +132,38 @@ "${rook_bin_location}"/"${binary}" done +# install Rook's toolbox script alongside main binary +install --preserve-timestamps --mode=755 \ + --target-directory="${install_location}" \ + images/ceph/toolbox.sh + # Install provided yaml files to download and run the Rook operator and Ceph containers mkdir -p %{buildroot}%{_datadir}/k8s-yaml/rook/ceph cp -pr cluster/examples/kubernetes/ceph/* %{buildroot}%{_datadir}/k8s-yaml/rook/ceph/ -rook_container_version='1.0.0.1615' +################################################################################ +# Update manifests with images coming from Build Service +################################################################################ +rook_container_version='1.0.0.1697' # this is udpated by update-tarball.sh +# determine image names to use in manifests depending on the base os type +# %CEPH_VERSION% is replaced at build time by the _service %if 0%{?is_opensuse} -sed -i -e "s|image: .*|image: registry.opensuse.org/opensuse/rook/ceph:${rook_container_version}|g" %{buildroot}%{_datadir}/k8s-yaml/rook/ceph/operator* -sed -i -e 's|image: .*|image: registry.opensuse.org/opensuse/ceph/ceph:%CEPH_VERSION%|g' %{buildroot}%{_datadir}/k8s-yaml/rook/ceph/cluster* -sed -i -e 's|# - name: FLEXVOLUME_DIR_PATH|- name: FLEXVOLUME_DIR_PATH|g' %{buildroot}%{_datadir}/k8s-yaml/rook/ceph/operator* -sed -i -e 's|# value: "<PathToFlexVolumes>"| value: "/var/lib/kubelet/plugins/volume/exec/"|g' %{buildroot}%{_datadir}/k8s-yaml/rook/ceph/operator* -%else -sed -i -e "s|image: .*|image: registry.suse.com/ses/6/rook/ceph:${rook_container_version}|g" %{buildroot}%{_datadir}/k8s-yaml/rook/ceph/operator* -sed -i -e 's|image: .*|image: registry.suse.com/ses/6/ceph/ceph:%CEPH_VERSION%|g' %{buildroot}%{_datadir}/k8s-yaml/rook/ceph/cluster* +rook_image=registry.opensuse.org/opensuse/rook/ceph:${rook_container_version} +ceph_image=registry.opensuse.org/opensuse/ceph/ceph:%CEPH_VERSION% +ceph_csi_image=registry.opensuse.org/opensuse/cephcsi/cephcsi:%CSI_VERSION%.%CSI_OFFSET% +%else # is SES +rook_image=registry.suse.com/ses/6/rook/ceph:${rook_container_version} +ceph_image=registry.suse.com/ses/6/ceph/ceph:%CEPH_VERSION% +ceph_csi_image=registry.suse.com/ses/6/cephcsi/cephcsi:%CSI_VERSION%.%CSI_OFFSET% %endif +# set rook, ceph and ceph-csi container versions +sed -i -e "s|image: .*|image: ${rook_image}|g" %{buildroot}%{_datadir}/k8s-yaml/rook/ceph/operator* +sed -i -e "s|\".*/cephcsi/cephcsi:.*|\"${ceph_csi_image}\"|g" %{buildroot}%{_datadir}/k8s-yaml/rook/ceph/operator-with-csi.yaml +sed -i -e "s|image: .*|image: ${ceph_image}|g" %{buildroot}%{_datadir}/k8s-yaml/rook/ceph/cluster* +sed -i -e "s|image: .*|image: ${rook_image}|g" %{buildroot}%{_datadir}/k8s-yaml/rook/ceph/toolbox* + ################################################################################ # Specify which files we built belong to each package ################################################################################ @@ -140,11 +171,13 @@ %files %defattr(-,root,root,-) %{_bindir}/rook +%{_bindir}/toolbox.sh # rook-rookflex-version-build.arch.rpm %files rookflex %{_bindir}/rookflex +# rook-k8s-yaml-version-build.arch.rpm %files k8s-yaml %dir %{_datarootdir}/k8s-yaml %dir %{_datarootdir}/k8s-yaml/rook @@ -157,3 +190,5 @@ # Rook RPMs aren't for users to install, just to be put in containers, so don't # bother adding docs or changelog or anything + +%changelog ++++++ _service ++++++ --- /var/tmp/diff_new_pack.WLD2qs/_old 2019-07-16 08:39:25.303052660 +0200 +++ /var/tmp/diff_new_pack.WLD2qs/_new 2019-07-16 08:39:25.303052660 +0200 @@ -5,4 +5,16 @@ <param name="parse-version">patch_update</param> <param name="package">ceph</param> </service> + <service name="replace_using_package_version" mode="buildtime"> + <param name="file">rook.spec</param> + <param name="regex">%CSI_VERSION%</param> + <param name="parse-version">patch</param> + <param name="package">ceph-csi</param> + </service> + <service name="replace_using_package_version" mode="buildtime"> + <param name="file">rook.spec</param> + <param name="regex">%CSI_OFFSET%</param> + <param name="parse-version">offset</param> + <param name="package">ceph-csi</param> + </service> </services> ++++++ rook-1.0.0+git1615.g26887efd.tar.xz -> rook-1.0.0+git1697.ga265cdfd.tar.xz ++++++ /work/SRC/openSUSE:Factory/rook/rook-1.0.0+git1615.g26887efd.tar.xz /work/SRC/openSUSE:Factory/.rook.new.1887/rook-1.0.0+git1697.ga265cdfd.tar.xz differ: char 25, line 1 ++++++ update-tarball.sh ++++++ --- /var/tmp/diff_new_pack.WLD2qs/_old 2019-07-16 08:39:25.331052644 +0200 +++ /var/tmp/diff_new_pack.WLD2qs/_new 2019-07-16 08:39:25.331052644 +0200 @@ -29,18 +29,25 @@ PKG_DIR=$(pwd) function on_err { - echo "ERROR: previous command has failed" + echo "ERROR: previous command has failed" echo "Removing archive." - rm $PKG_DIR/rook-$VERSION.tar.xz || true + rm -f $PKG_DIR/rook-$VERSION.tar.xz + rm -f $PKG_DIR/rook-$VERSION-vendor.tar.xz } trap on_err ERR -ROOK_REPO="github.com/suse/rook" +ROOK_REPO="github.com/SUSE/rook" REV="suse-master" -GOPATH=$WORK_DIR go get -u "$ROOK_REPO" || true +GOPATH=$WORK_DIR +GOPATH_ROOK="$GOPATH/src/github.com/rook/rook" -cd "$WORK_DIR/src/$ROOK_REPO" +# For dep to get dependencies correctly, git repos must be located in their upstream locations in +# the GOPATH. i.e., we have to clone SUSE/rook to github.com/rook/rook +mkdir --parents $GOPATH_ROOK +git -C $GOPATH_ROOK/.. clone https://$ROOK_REPO.git + +cd "$GOPATH_ROOK" git checkout $REV #RELEASE should be from git describe when history would be correct @@ -51,14 +58,20 @@ VERSION="${RELEASE:1}+git$GIT_COMMIT_NUM.$GIT_COMMIT" +# make primary source tarball before changing anything in the repo +cd $PKG_DIR +tar -C "$GOPATH_ROOK/.." -cJf rook-$VERSION.tar.xz rook/ + +# make vendor tarball +cd "$GOPATH_ROOK" + echo "Getting dependencies...might take a while" -GOPATH=$WORK_DIR dep ensure +GOPATH=$WORK_DIR make vendor cd $PKG_DIR +tar -C "$GOPATH_ROOK/.." -cJf rook-$VERSION-vendor.tar.xz rook/vendor -tar -C "$WORK_DIR/src/$ROOK_REPO/.." -cJf rook-$VERSION.tar.xz rook/build \ - rook/cluster rook/cmd rook/Documentation rook/images rook/Makefile rook/pkg \ - rook/tests rook/.git rook/vendor +# update spec file versions sed -i "s/^Version:.*/Version: $VERSION/" rook.spec -sed -i "s/^rook_container_version=.*/rook_container_version='${RELEASE:1}.$GIT_COMMIT_NUM'/" rook.spec +sed -i "s/^rook_container_version=.*/rook_container_version='${RELEASE:1}.$GIT_COMMIT_NUM' # this is udpated by update-tarball.sh/" rook.spec
