From a15ead3e89d9694996ffe19d78dd02d5435a4aac9f3f61a13695d376dc375b26 Mon Sep 17 00:00:00 2001
From: Nathan Cutler <ncutler@suse.com>
Date: Sat, 21 May 2016 21:46:20 +0000
Subject: [PATCH] Update link from rev 1 to rev 10

OBS-URL: https://build.opensuse.org/package/show/filesystems:ceph/ceph?expand=0&rev=27
---
 _constraints                               |  3 -
 _service                                   |  2 +-
 _servicedata                               |  2 +-
 ceph-10.2.1+git.1463529707.bcd73de.tar.bz2 |  3 -
 ceph-10.2.1+git.1463866704.ac077e9.tar.bz2 |  3 +
 ceph.changes                               | 52 ++++++++++++++
 ceph.spec                                  | 79 +++++++++++++++++-----
 7 files changed, 118 insertions(+), 26 deletions(-)
 delete mode 100644 ceph-10.2.1+git.1463529707.bcd73de.tar.bz2
 create mode 100644 ceph-10.2.1+git.1463866704.ac077e9.tar.bz2

diff --git a/_constraints b/_constraints
index 6a42c61..13721f6 100644
--- a/_constraints
+++ b/_constraints
@@ -1,9 +1,6 @@
 <?xml version="1.0"?>
 <constraints>
   <hardware>
-    <disk>
-      <size unit="G">48</size>
-    </disk>
     <memory>
       <size unit="G">12</size>
     </memory>
diff --git a/_service b/_service
index d57844c..7b8a86a 100644
--- a/_service
+++ b/_service
@@ -2,7 +2,7 @@
   <service name="tar_scm" mode="disabled">
     <param name="versionformat">10.2.1+git.%ct.%h</param>
     <param name="url">git://github.com/SUSE/ceph.git</param>
-    <param name="revision">ses-10-2-1</param>
+    <param name="revision">ses3</param>
     <param name="filename">ceph</param>
     <param name="scm">git</param>
     <param name="package-meta">no</param>
diff --git a/_servicedata b/_servicedata
index 7a409a4..fb5b686 100644
--- a/_servicedata
+++ b/_servicedata
@@ -1,5 +1,5 @@
 <servicedata>
 <service name="tar_scm">
             <param name="url">git://github.com/SUSE/ceph.git</param>
-          <param name="changesrevision">bcd73deb15926f02c6017e3bf21c3620c1020424</param></service>
+          <param name="changesrevision">ac077e92ddb7114b93e41b6af76b941ee4732979</param></service>
 </servicedata>
\ No newline at end of file
diff --git a/ceph-10.2.1+git.1463529707.bcd73de.tar.bz2 b/ceph-10.2.1+git.1463529707.bcd73de.tar.bz2
deleted file mode 100644
index 01c9432..0000000
--- a/ceph-10.2.1+git.1463529707.bcd73de.tar.bz2
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:ccc1ad06a257bc8c88b6123781370286b6279b7f4e21ae8cc098459a2d165b88
-size 17372262
diff --git a/ceph-10.2.1+git.1463866704.ac077e9.tar.bz2 b/ceph-10.2.1+git.1463866704.ac077e9.tar.bz2
new file mode 100644
index 0000000..5579b41
--- /dev/null
+++ b/ceph-10.2.1+git.1463866704.ac077e9.tar.bz2
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:195682d142a55e3d0d1f751cf48f597bef86fb7929c264899da11cb51d744b6b
+size 16480483
diff --git a/ceph.changes b/ceph.changes
index 65b2121..cef43a3 100644
--- a/ceph.changes
+++ b/ceph.changes
@@ -1,3 +1,55 @@
+-------------------------------------------------------------------
+Sat May 21 21:40:54 UTC 2016 - ncutler@suse.com
+
+- Update to version 10.2.1+git.1463866704.ac077e9:
+  + Revert "rpm: put /sbin/ldconfig into -p" (bsc#980960)
+
+-------------------------------------------------------------------
+Sat May 21 21:21:01 UTC 2016 - ncutler@suse.com
+
+- Update to version 10.2.1+git.1463865310.bed80bf:
+
+Upstream fixes:
+  + journal: live replay might skip entries from previous object set
+    (pr#9217)
+  + cls::rbd: mirror_image_status_list returned max 64 items (pr#9069)
+  + rbd-mirror: potential crash during image status update (pr#9226)
+  + qa/workunits/rbd: fixed rbd_mirror teuthology runtime errors (pr#9232)
+  + debian: install systemd target files (pr#8815)
+  + doc: update mirroring guide to include pool/image status commands (pr#9180)
+  + Do not link lttng into libglobal (pr#9194)
+  + radosgw-admin: fix 'period push' handling of --url (pr#9210)
+
+Downstream build optimization:
+  + Revert "ceph.spec.in: add lowmem_builder_override"
+  + rpm: New "minimal_debugging_information" %bcond
+
+-------------------------------------------------------------------
+Fri May 20 09:57:50 UTC 2016 - ncutler@suse.com
+
+- Update to version 10.2.1+git.1463737886.bd46281:
+  + rpm: modify optflags to make debuginfos less huge
+
+-------------------------------------------------------------------
+Thu May 19 18:24:24 UTC 2016 - ncutler@suse.com
+
+- Update to version 10.2.1+git.1463682043.ed81339:
+  + rpm: add procps build dependency
+
+-------------------------------------------------------------------
+Thu May 19 18:07:11 UTC 2016 - ncutler@suse.com
+
+- Update to version 10.2.1+git.1463681009.6e66fd3:
+  + global: don't link lttng into libglobal (backport of pr#8876)
+  + rpm: make lowmem_builder code much smarter
+
+-------------------------------------------------------------------
+Wed May 18 09:37:19 UTC 2016 - ncutler@suse.com
+
+- Update to version 10.2.1+git.1463563784.4fa841b:
+  + ceph.in: fix exception when pool name has non-ascii characters (bsc#972370)
+  + rpm: unconditionally set ceph user's primary group to ceph
+
 -------------------------------------------------------------------
 Wed May 18 00:27:24 UTC 2016 - ddiss@suse.com
 
diff --git a/ceph.spec b/ceph.spec
index 3f868ed..2d38e58 100644
--- a/ceph.spec
+++ b/ceph.spec
@@ -20,7 +20,7 @@
 %bcond_without tcmalloc
 %bcond_without libs_compat
 %bcond_with lowmem_builder
-%bcond_with lowmem_builder_override
+%bcond_with minimal_debugging_information
 %if 0%{?fedora} || 0%{?rhel}
 %bcond_without selinux
 %endif
@@ -49,7 +49,7 @@
 # common
 #################################################################################
 Name:		ceph
-Version:	10.2.1+git.1463529707.bcd73de
+Version:	10.2.1+git.1463866704.ac077e9
 Release:	0%{?dist}
 Summary:	User space components of the Ceph file system
 License:	LGPL-2.1 and CC-BY-SA-1.0 and GPL-2.0 and BSL-1.0 and GPL-2.0-with-autoconf-exception and BSD-3-Clause and MIT
@@ -94,6 +94,7 @@ BuildRequires:	make
 BuildRequires:	parted
 BuildRequires:	perl
 BuildRequires:	pkgconfig
+BuildRequires:  procps
 BuildRequires:	python
 BuildRequires:	python-devel
 BuildRequires:	python-nose
@@ -628,6 +629,9 @@ done
 %if %{with lowmem_builder}
 RPM_OPT_FLAGS="$RPM_OPT_FLAGS --param ggc-min-expand=20 --param ggc-min-heapsize=32768"
 %endif
+%if %{with minimal_debugging_information}
+RPM_OPT_FLAGS="`echo $RPM_OPT_FLAGS | sed -e 's/^-g /-g1 /g' -e 's/ -g / -g1 /g' -e 's/ -g$/ -g1/g'`"
+%endif
 export RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS | sed -e 's/i386/i486/'`
 
 %{configure}	CPPFLAGS="$java_inc" \
@@ -665,13 +669,36 @@ export RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS | sed -e 's/i386/i486/'`
 		%{?_with_tcmalloc} \
 		CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS"
 
-%if %{with lowmem_builder} && ! %{with lowmem_builder_override}
-%if 0%{?jobs} > 8
-%define _smp_mflags -j8
+# Parallel build settings ...
+PARALLEL_BUILD=%{?_smp_mflags}
+%if %{with lowmem_builder}
+lo_jobs="%{?jobs:%{jobs}}"
+%ifarch %arm
+    %if ! 0%{?qemu_user_space_build:1}
+        # native hardware is not that powerful
+        lo_jobs="1"
+    %endif
 %endif
+# do not eat all memory
+echo "Available memory:"
+free
+echo "System limits:"
+ulimit -a
+lo_jobs_reduced=
+if test -n "$lo_jobs" -a "$lo_jobs" -gt 1 ; then
+    mem_per_process=1600
+    max_mem=$(LANG=C free -t -m | sed -n "s|^Mem: *\([0-9]*\).*$|\1|p")
+    max_jobs="$(($max_mem / $mem_per_process))"
+    test "$lo_jobs" -gt "$max_jobs" && lo_jobs="$max_jobs" && lo_jobs_reduced="yes" && echo "Warning: Reducing build parallelism to -j$max_jobs because of memory limits"
+    test "$lo_jobs" -le 0 && lo_jobs=1 && echo "Warning: Not using parallel build at all because of memory limits"
+fi
+# run make
+if test -n "$lo_jobs" ; then
+  PARALLEL_BUILD="-j$lo_jobs"
+fi
 %endif
 
-make %{?_smp_mflags}
+make "$PARALLEL_BUILD"
 
 %if 0%{with tests}
 %check
@@ -888,8 +915,13 @@ fi
 if ! getent passwd ceph >/dev/null ; then
     CEPH_USER_ID_OPTION=""
     getent passwd $CEPH_USER_ID >/dev/null || CEPH_USER_ID_OPTION="-u $CEPH_USER_ID"
-    useradd ceph $CEPH_USER_ID_OPTION -r -g ceph -s /sbin/nologin -c "Ceph daemons" -d %{_localstatedir}/lib/ceph 2>/dev/null || :
+    useradd ceph $CEPH_USER_ID_OPTION -r -g ceph -s /sbin/nologin 2>/dev/null || :
 fi
+usermod -c "Ceph storage service" \
+        -d %{_localstatedir}/lib/ceph \
+        -g ceph \
+        -s /sbin/nologin \
+        ceph
 # fix ownership of log files
 [ -d /var/log/ceph ] || exit 0
 [ "$(stat -c %U /var/log/ceph)" = "ceph" ] && exit 0
@@ -1219,9 +1251,11 @@ fi
 %{_libdir}/librados_tp.so.*
 %endif
 
-%post -n librados2 -p /sbin/ldconfig
+%post -n librados2
+/sbin/ldconfig
 
-%postun -n librados2 -p /sbin/ldconfig
+%postun -n librados2
+/sbin/ldconfig
 
 #################################################################################
 %files -n librados2-devel
@@ -1254,9 +1288,11 @@ fi
 %defattr(-,root,root,-)
 %{_libdir}/libradosstriper.so.*
 
-%post -n libradosstriper1 -p /sbin/ldconfig
+%post -n libradosstriper1
+/sbin/ldconfig
 
-%postun -n libradosstriper1 -p /sbin/ldconfig
+%postun -n libradosstriper1
+/sbin/ldconfig
 
 #################################################################################
 %files -n libradosstriper1-devel
@@ -1279,7 +1315,8 @@ fi
 mkdir -p /usr/lib64/qemu/
 ln -sf %{_libdir}/librbd.so.1 /usr/lib64/qemu/librbd.so.1
 
-%postun -n librbd1 -p /sbin/ldconfig
+%postun -n librbd1
+/sbin/ldconfig
 
 #################################################################################
 %files -n librbd1-devel
@@ -1298,9 +1335,11 @@ ln -sf %{_libdir}/librbd.so.1 /usr/lib64/qemu/librbd.so.1
 %defattr(-,root,root,-)
 %{_libdir}/librgw.so.*
 
-%post -n librgw2 -p /sbin/ldconfig
+%post -n librgw2
+/sbin/ldconfig
 
-%postun -n librgw2 -p /sbin/ldconfig
+%postun -n librgw2
+/sbin/ldconfig
 
 #################################################################################
 %files -n librgw2-devel
@@ -1321,9 +1360,11 @@ ln -sf %{_libdir}/librbd.so.1 /usr/lib64/qemu/librbd.so.1
 %defattr(-,root,root,-)
 %{_libdir}/libcephfs.so.*
 
-%post -n libcephfs1 -p /sbin/ldconfig
+%post -n libcephfs1
+/sbin/ldconfig
 
-%postun -n libcephfs1 -p /sbin/ldconfig
+%postun -n libcephfs1
+/sbin/ldconfig
 
 #################################################################################
 %files -n libcephfs1-devel
@@ -1382,9 +1423,11 @@ ln -sf %{_libdir}/librbd.so.1 /usr/lib64/qemu/librbd.so.1
 %defattr(-,root,root,-)
 %{_libdir}/libcephfs_jni.so.*
 
-%post -n libcephfs_jni1 -p /sbin/ldconfig
+%post -n libcephfs_jni1
+/sbin/ldconfig
 
-%postun -n libcephfs_jni1 -p /sbin/ldconfig
+%postun -n libcephfs_jni1
+/sbin/ldconfig
 
 #################################################################################
 %files -n libcephfs_jni1-devel