diff --git a/_service b/_service
new file mode 100644
index 0000000..9595fed
--- /dev/null
+++ b/_service
@@ -0,0 +1,18 @@
+
+
+ git://oss.oracle.com/git/ocfs2-tools.git
+ git
+ .git
+ 1.8.2+git.%ct.%h
+ master
+
+
+
+ ocfs2*.tar
+ gz
+
+
+
+ ocfs2
+
+
diff --git a/fix-pacemaker-libs.patch b/fix-pacemaker-libs.patch
deleted file mode 100644
index 4f40d76..0000000
--- a/fix-pacemaker-libs.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-Index: ocfs2-tools/ocfs2_controld/Makefile
-===================================================================
---- ocfs2-tools.orig/ocfs2_controld/Makefile 2013-03-21 14:23:20.052598134 -0500
-+++ ocfs2-tools/ocfs2_controld/Makefile 2013-03-21 14:37:56.089354059 -0500
-@@ -67,7 +67,7 @@ DIST_FILES = \
- ocfs2_controld.pcmk: $(PCMK_DAEMON_OBJS) $(LIBO2CB_DEPS)
- $(LINK) $(GLIB_LIBS) $(LIBO2CB_LIBS) $(COM_ERR_LIBS) \
- $(OPENAIS_LIBS) $(COROSYNC_LIBS) \
-- $(DLMCONTROL_LIBS) -lcrmcluster -lstonithd
-+ $(DLMCONTROL_LIBS) -lcrmcluster -lstonithd -lcrmcommon
-
- ocfs2_controld.cman: $(CMAN_DAEMON_OBJS) $(LIBO2CB_DEPS)
- $(LINK) $(LIBO2CB_LIBS) $(COM_ERR_LIBS) $(OPENAIS_LIBS) \
diff --git a/ocfs2-tools-1.8.2+git.1361836695.ff84eb5.tar.gz b/ocfs2-tools-1.8.2+git.1361836695.ff84eb5.tar.gz
new file mode 100644
index 0000000..18b2952
--- /dev/null
+++ b/ocfs2-tools-1.8.2+git.1361836695.ff84eb5.tar.gz
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:50591c0264e1317ac516d23d671cbc521f4d17e85ef42ab3f300add7f84ddd37
+size 1543758
diff --git a/ocfs2-tools.changes b/ocfs2-tools.changes
index c8ad818..e000735 100644
--- a/ocfs2-tools.changes
+++ b/ocfs2-tools.changes
@@ -1,3 +1,17 @@
+-------------------------------------------------------------------
+Tue Apr 2 09:47:35 UTC 2013 - speilicke@suse.com
+
+- Add _service file to automatically pull from git. It can be invoked
+ locally by "osc service disabledrun"
+- Use spec-cleaner
+- No need to call ldconfig without shared objects
+- Drop unneeded %clean section
+- No need to export CFLAGS, %configure does that.
+- Also provide ocfs2-support to have clean upgrade path
+- Drop patches (merged upstream):
+ + fix-pacemaker-libs.patch
+ + support-for-xvd-devices.patch
+
-------------------------------------------------------------------
Thu Mar 21 15:00:46 CDT 2013 - rgoldwyn@suse.com
diff --git a/ocfs2-tools.spec b/ocfs2-tools.spec
index 3ef674c..16554b5 100644
--- a/ocfs2-tools.spec
+++ b/ocfs2-tools.spec
@@ -17,28 +17,13 @@
Name: ocfs2-tools
-BuildRequires: autoconf
-BuildRequires: e2fsprogs-devel
-BuildRequires: glib2-devel
-BuildRequires: libaio-devel
-BuildRequires: libbz2-devel
-BuildRequires: libcorosync-devel
-BuildRequires: libdlm-devel
-BuildRequires: libopenais-devel
-BuildRequires: libpacemaker-devel
-BuildRequires: libxml2-devel
-BuildRequires: libxslt-devel
-BuildRequires: libz1
-BuildRequires: python-devel
-BuildRequires: python-gtk-devel
-BuildRequires: readline-devel
-BuildRequires: update-desktop-files
+Version: 1.8.2+git.1361836695.ff84eb5
+Release: 0
Summary: Oracle Cluster File System 2 Core Tools
License: GPL-2.0+
Group: System/Filesystems
-Version: 1.8.2
-Release: 0
-Source: ocfs2-tools.tar.bz2
+Url: http://oss.oracle.com/projects/ocfs2-tools/
+Source: ocfs2-tools-%{version}.tar.gz
Source1: o2cb.ocf
Source2: reflink.tar.bz2
Patch101: force-debug.patch
@@ -56,19 +41,33 @@ Patch206: ocfs2-tools-resource.patch
Patch207: fix-indexed-dirs.patch
Patch208: 0001-fswreck-Create-a-loop-in-group-chains.patch
Patch209: 0002-Break-a-chain-loop-in-group-desc.patch
-Patch210: fix-pacemaker-libs.patch
-Patch211: support-for-xvd-devices.patch
-Url: http://oss.oracle.com/projects/ocfs2-tools/
+BuildRequires: autoconf
+BuildRequires: e2fsprogs-devel
+BuildRequires: libaio-devel
+BuildRequires: libbz2-devel
+BuildRequires: libcorosync-devel
+BuildRequires: libdlm-devel
+BuildRequires: libopenais-devel
+BuildRequires: libpacemaker-devel
+BuildRequires: libxslt-devel
+BuildRequires: libz1
+BuildRequires: python-devel
+BuildRequires: python-gtk-devel
+BuildRequires: readline-devel
+BuildRequires: update-desktop-files
+BuildRequires: pkgconfig(glib-2.0)
+BuildRequires: pkgconfig(libxml-2.0)
+Requires(pre): %fillup_prereq
+Requires(pre): %insserv_prereq
Requires: /sbin/chkconfig
Requires: e2fsprogs
Requires: glib2 >= 2.2.3
Requires: modutils
Requires: net-tools
-PreReq: %insserv_prereq %fillup_prereq
-BuildRoot: %{_tmppath}/%{name}-%{version}-build
Requires: openais
-%if %suse_version < 1120
-# There's no separate kmp for openSUSE 11.2
+BuildRoot: %{_tmppath}/%{name}-%{version}-build
+%if 0%{?suse_version} < 1120
+# There's no separate kmp for openSUSE 11.2
Recommends: ocfs2-kmp
%endif
@@ -81,14 +80,14 @@ managing the file system.
%package -n ocfs2console
Summary: Oracle Cluster Filesystem 2 GUI tools
Group: System/Filesystems
-Obsoletes: ocfs2-support
-Requires: ocfs2-tools = %{version}
-AutoReqProv: No
Requires: e2fsprogs
Requires: glib2 >= 2.2.3
Requires: ocfs2-tools = %{version}
+Requires: ocfs2-tools = %{version}
Requires: python-gtk >= 1.99.16
Requires: vte >= 0.11.10
+Provides: ocfs2-support = %{version}
+Obsoletes: ocfs2-support < %{version}
%description -n ocfs2console
OCFS is the Oracle Cluster Filesystem.
@@ -120,7 +119,7 @@ This package contains the core user-space tools needed for creating and
managing the file system.
%prep
-%setup -q -n %{name} -a 2
+%setup -q -a 2
%patch101 -p1
%patch102 -p1
%patch103 -p1
@@ -136,70 +135,59 @@ managing the file system.
%patch207 -p1
%patch208 -p1
%patch209 -p1
-%patch210 -p1
-%patch211 -p1
%build
-export CFLAGS="${CFLAGS} ${RPM_OPT_FLAGS}"
export PROJECT="ocfs2-tools"
autoreconf -fi -I /usr/share/aclocal
-%configure --disable-debug --prefix=/usr --mandir=%{_mandir} --enable-ocfs2console=yes --enable-dynamic-fsck=yes --enable-dynamic-ctl=yes
-make OPTS="$RPM_OPT_FLAGS"
+%configure --disable-debug --enable-ocfs2console=yes --enable-dynamic-fsck=yes --enable-dynamic-ctl=yes
+make OPTS="%{optflags}"
cd reflink
-%configure --prefix=/usr --mandir=%{_mandir}
+%configure
make reflink
cd ..
%install
-mkdir -p $RPM_BUILD_ROOT/sbin
-mkdir -p $RPM_BUILD_ROOT/usr/bin
-mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/init.d
-mkdir -p ${RPM_BUILD_ROOT}/var/adm/fillup-templates
-mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d/
-mkdir -p $RPM_BUILD_ROOT/usr/lib/ocf/resource.d/ocfs2
-cp -f vendor/common/o2cb.init $RPM_BUILD_ROOT%{_sysconfdir}/init.d/o2cb
-cp -f vendor/common/ocfs2.init $RPM_BUILD_ROOT%{_sysconfdir}/init.d/ocfs2
-cp -f vendor/common/51-ocfs2.rules $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d
-cp -f $RPM_SOURCE_DIR/o2cb.ocf $RPM_BUILD_ROOT/usr/lib/ocf/resource.d/ocfs2/o2cb
-chmod a+x $RPM_BUILD_ROOT/usr/lib/ocf/resource.d/ocfs2/o2cb
-cp -f vendor/common/o2cb.sysconfig ${RPM_BUILD_ROOT}/var/adm/fillup-templates/sysconfig.o2cb
-ln -sf ..%{_sysconfdir}/init.d/o2cb $RPM_BUILD_ROOT/sbin/rco2cb
-ln -sf ..%{_sysconfdir}/init.d/ocfs2 $RPM_BUILD_ROOT/sbin/rcocfs2
-make DESTDIR="$RPM_BUILD_ROOT" install
+mkdir -p %{buildroot}/sbin
+mkdir -p %{buildroot}%{_prefix}/bin
+mkdir -p %{buildroot}%{_sysconfdir}/init.d
+mkdir -p %{buildroot}%{_localstatedir}/adm/fillup-templates
+mkdir -p %{buildroot}%{_sysconfdir}/udev/rules.d/
+mkdir -p %{buildroot}%{_prefix}/lib/ocf/resource.d/ocfs2
+cp -f vendor/common/o2cb.init %{buildroot}%{_sysconfdir}/init.d/o2cb
+cp -f vendor/common/ocfs2.init %{buildroot}%{_sysconfdir}/init.d/ocfs2
+cp -f vendor/common/51-ocfs2.rules %{buildroot}%{_sysconfdir}/udev/rules.d
+cp -f $RPM_SOURCE_DIR/o2cb.ocf %{buildroot}%{_prefix}/lib/ocf/resource.d/ocfs2/o2cb
+chmod a+x %{buildroot}%{_prefix}/lib/ocf/resource.d/ocfs2/o2cb
+cp -f vendor/common/o2cb.sysconfig %{buildroot}%{_localstatedir}/adm/fillup-templates/sysconfig.o2cb
+ln -sf ..%{_sysconfdir}/init.d/o2cb %{buildroot}/sbin/rco2cb
+ln -sf ..%{_sysconfdir}/init.d/ocfs2 %{buildroot}/sbin/rcocfs2
+make DESTDIR="%{buildroot}" install
cd reflink
-make DESTDIR="$RPM_BUILD_ROOT" install
+make DESTDIR="%{buildroot}" install
cd ..
-mv $RPM_BUILD_ROOT/{,/usr}/sbin/o2image
-mv $RPM_BUILD_ROOT/{,/usr}/sbin/debugfs.ocfs2
-mv $RPM_BUILD_ROOT/{,/usr}/sbin/ocfs2_controld.pcmk
-find $RPM_BUILD_ROOT -name '*.a' -type f -print0 | xargs -0 rm -f
-find $RPM_BUILD_ROOT -name '*.la' -type f -print0 | xargs -0 rm -f
-%{__python} -c "import compileall; compileall.compile_dir('$RPM_BUILD_ROOT/%{py_sitedir}/ocfs2interface', ddir='%{py_sitedir}/ocfs2interface')"
-
-%clean
-if
- [ -n "${RPM_BUILD_ROOT}" -a "${RPM_BUILD_ROOT}" != "/" ]
-then
- rm -rf $RPM_BUILD_ROOT
-fi
-
-%post -p /sbin/ldconfig
+mv %{buildroot}/{,/usr}/sbin/o2image
+mv %{buildroot}/{,/usr}/sbin/debugfs.ocfs2
+mv %{buildroot}/{,/usr}/sbin/ocfs2_controld.pcmk
+find %{buildroot} -name '*.a' -type f -print0 | xargs -0 rm -f
+find %{buildroot} -name '*.la' -type f -print0 | xargs -0 rm -f
+python -c "import compileall; compileall.compile_dir('%{buildroot}/%{py_sitedir}/ocfs2interface', ddir='%{py_sitedir}/ocfs2interface')"
%preun o2cb
%stop_on_removal ocfs2
%stop_on_removal o2cb
%postun o2cb
-/sbin/ldconfig
%{insserv_cleanup}
%restart_on_update ocfs2
%restart_on_update o2cb
%files
%defattr(-,root,root)
+%doc COPYING CREDITS MAINTAINERS
+%doc documentation/users_guide.txt
%dir %{_sysconfdir}/udev
%dir %{_sysconfdir}/udev/rules.d
/sbin/fsck.ocfs2
@@ -231,12 +219,10 @@ fi
%{_mandir}/man5/ocfs2.cluster.conf.5.gz
%{_mandir}/man7/ocfs2.7.gz
%{_mandir}/man1/o2info.1.gz
-%doc COPYING CREDITS MAINTAINERS
-%doc documentation/users_guide.txt
-%dir /usr/lib/ocf
-%dir /usr/lib/ocf/resource.d
-%dir /usr/lib/ocf/resource.d/ocfs2
-/usr/lib/ocf/resource.d/ocfs2/o2cb
+%dir %{_prefix}/lib/ocf
+%dir %{_prefix}/lib/ocf/resource.d
+%dir %{_prefix}/lib/ocf/resource.d/ocfs2
+%{_prefix}/lib/ocf/resource.d/ocfs2/o2cb
%files -n ocfs2console
%defattr(-,root,root)
@@ -246,6 +232,7 @@ fi
%files o2cb
%defattr(-,root,root)
+%doc README.O2CB
/sbin/rco2cb
/sbin/rcocfs2
/sbin/o2cb_ctl
@@ -253,10 +240,9 @@ fi
%{_sysconfdir}/init.d/o2cb
%{_sysconfdir}/init.d/ocfs2
%{_mandir}/man8/o2cb_ctl.8*
-/var/adm/fillup-templates/sysconfig.o2cb
+%{_localstatedir}/adm/fillup-templates/sysconfig.o2cb
%{_mandir}/man7/o2cb.7.gz
%{_mandir}/man8/o2cb.8.gz
-%doc README.O2CB
%files devel
%defattr(-,root,root)
diff --git a/ocfs2-tools.tar.bz2 b/ocfs2-tools.tar.bz2
deleted file mode 100644
index ee2ad7e..0000000
--- a/ocfs2-tools.tar.bz2
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:590ec4905a486c59f1e2961c3c481d167357494da15042f1877967d16f2aa332
-size 1131319
diff --git a/support-for-xvd-devices.patch b/support-for-xvd-devices.patch
deleted file mode 100644
index a35ea72..0000000
--- a/support-for-xvd-devices.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-commit ff84eb5b6e76427f227632d5604703b8584d1b7f
-Author: Srinivas Eeda
-Date: Mon Feb 25 15:58:15 2013 -0800
-
- ocfs2-tools: add support for xvd devices
-
- It is common for virtual disks to be used with ocfs2 inside a VM. With Xen, these devices are /dev/xvd. This patch allows for xvd devices to be used when using global-heartbeat.
-
- Signed-off-by: Wim Coekaerts
- Acked-by: sunil.mushran@gmail.com
-
-diff --git a/o2cb_ctl/o2cb_scandisk.c b/o2cb_ctl/o2cb_scandisk.c
-index 92e754e..6cd3635 100644
---- a/o2cb_ctl/o2cb_scandisk.c
-+++ b/o2cb_ctl/o2cb_scandisk.c
-@@ -128,6 +128,8 @@ static void add_to_list(struct list_head *device_list, struct devnode *node)
- add = !strncmp(path->path, "/dev/sd", 7);
- if (!add)
- add = !strncmp(path->path, "/dev/loop", 9);
-+ if (!add)
-+ add = !strncmp(path->path, "/dev/xvd", 8);
- }
- if (add) {
- hb = malloc(sizeof(struct hb_devices));