forked from pool/ocfs2-tools
b422162fad
add autoconf to buildrequires OBS-URL: https://build.opensuse.org/request/show/97653 OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/ocfs2-tools?expand=0&rev=34
238 lines
7.0 KiB
RPMSpec
238 lines
7.0 KiB
RPMSpec
#
|
|
# spec file for package ocfs2-tools
|
|
#
|
|
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
|
#
|
|
# All modifications and additions to the file contributed by third parties
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
# upon. The license for this file, and modifications and additions to the
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
# license for the pristine package is not an Open Source License, in which
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
# published by the Open Source Initiative.
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
Name: ocfs2-tools
|
|
BuildRequires: autoconf
|
|
BuildRequires: e2fsprogs-devel
|
|
BuildRequires: glib2-devel
|
|
BuildRequires: libcorosync-devel
|
|
BuildRequires: libdlm-devel
|
|
BuildRequires: libopenais-devel
|
|
BuildRequires: libpacemaker-devel
|
|
BuildRequires: libxml2-devel
|
|
BuildRequires: libxslt-devel
|
|
BuildRequires: python-devel
|
|
BuildRequires: python-gtk-devel
|
|
BuildRequires: readline-devel
|
|
BuildRequires: update-desktop-files
|
|
Summary: Oracle Cluster File System 2 Core Tools
|
|
License: GPL-2.0+
|
|
Group: System/Filesystems
|
|
Version: 1.8.0
|
|
Release: 0
|
|
Source: ocfs2-tools.tar.bz2
|
|
Source1: o2cb.ocf
|
|
Source2: reflink.tar.bz2
|
|
Patch101: force-debug.patch
|
|
Patch102: extra-debug.patch
|
|
Patch103: debug-ocfs2_hb_ctl.patch
|
|
Patch104: ocfs2_controld-pacemaker.diff
|
|
Patch105: bug-470741-debug_start_failures.patch
|
|
Patch106: ocfs2-devel.diff
|
|
Patch107: reflink-no-syscall.patch
|
|
Patch201: bug-543119-o2dlm.patch
|
|
Patch202: fix-configure-check-libs.patch
|
|
Patch203: fix-ocfs2_controld-crmcommon-link.patch
|
|
Patch204: dont-use-var-lock-subsys.patch
|
|
Url: http://oss.oracle.com/projects/ocfs2-tools/
|
|
Requires: net-tools, modutils, e2fsprogs, /sbin/chkconfig, glib2 >= 2.2.3
|
|
PreReq: %insserv_prereq %fillup_prereq
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
Requires: libdlm openais
|
|
%if %suse_version < 1120
|
|
# There's no separate kmp for openSUSE 11.2
|
|
Recommends: ocfs2-kmp
|
|
%endif
|
|
|
|
%description
|
|
OCFS is the Oracle Cluster File System.
|
|
|
|
This package contains the core user-space tools needed for creating and
|
|
managing the file system.
|
|
|
|
%package -n ocfs2console
|
|
Summary: Oracle Cluster Filesystem 2 GUI tools
|
|
Obsoletes: ocfs2-support
|
|
Requires: ocfs2-tools = %{version}
|
|
AutoReqProv: No
|
|
Requires: e2fsprogs, glib2 >= 2.2.3, vte >= 0.11.10, python-gtk >= 1.99.16, ocfs2-tools = %{version}
|
|
|
|
%description -n ocfs2console
|
|
OCFS is the Oracle Cluster Filesystem.
|
|
|
|
This package contains additional tools and a GUI (python-gtk).
|
|
|
|
%package devel
|
|
Summary: Oracle Cluster File System 2 Development files
|
|
Requires: ocfs2-tools = %{version}, libcom_err, libcom_err-devel
|
|
|
|
%description devel
|
|
OCFS is the Oracle Cluster File System.
|
|
|
|
This package contains the header files and static libraries for
|
|
developing low-level OCFS2-aware applications.
|
|
|
|
%package o2cb
|
|
Summary: Oracle Cluster File System 2 Core Tools
|
|
Requires: ocfs2-tools = %{version}
|
|
|
|
%description o2cb
|
|
OCFS is the Oracle Cluster File System.
|
|
|
|
This package contains the core user-space tools needed for creating and
|
|
managing the file system.
|
|
|
|
%prep
|
|
%setup -q -n %{name} -a 2
|
|
%patch101 -p1
|
|
%patch102 -p1
|
|
%patch103 -p1
|
|
%patch104 -p1
|
|
%patch105 -p1
|
|
%patch106 -p1
|
|
%patch107 -p0
|
|
%patch201 -p1
|
|
%patch202 -p1
|
|
%patch203 -p1
|
|
%patch204 -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"
|
|
|
|
cd reflink
|
|
%configure --prefix=/usr --mandir=%{_mandir}
|
|
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
|
|
|
|
cd reflink
|
|
make DESTDIR="$RPM_BUILD_ROOT" 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
|
|
|
|
%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)
|
|
%dir %{_sysconfdir}/udev
|
|
%dir %{_sysconfdir}/udev/rules.d
|
|
/sbin/fsck.ocfs2
|
|
/sbin/mkfs.ocfs2
|
|
/sbin/mounted.ocfs2
|
|
/sbin/tunefs.ocfs2
|
|
/sbin/mount.ocfs2
|
|
/sbin/ocfs2_hb_ctl
|
|
%{_sbindir}/o2image
|
|
%{_sbindir}/debugfs.ocfs2
|
|
%{_sbindir}/ocfs2_controld.pcmk
|
|
%{_sbindir}/o2hbmonitor
|
|
%{_bindir}/reflink
|
|
%{_bindir}/o2info
|
|
%config %{_sysconfdir}/udev/rules.d/51-ocfs2.rules
|
|
%{_mandir}/man8/debugfs.ocfs2.8*
|
|
%{_mandir}/man8/fsck.ocfs2.8*
|
|
%{_mandir}/man8/fsck.ocfs2.checks.8*
|
|
%{_mandir}/man8/mkfs.ocfs2.8*
|
|
%{_mandir}/man8/tunefs.ocfs2.8*
|
|
%{_mandir}/man8/mounted.ocfs2.8*
|
|
%{_mandir}/man8/ocfs2_hb_ctl.8*
|
|
%{_mandir}/man8/mount.ocfs2.8*
|
|
%{_mandir}/man8/o2image.8.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
|
|
|
|
%files -n ocfs2console
|
|
%defattr(-,root,root)
|
|
%{_sbindir}/ocfs2console
|
|
%{py_sitedir}/ocfs2interface
|
|
%{_mandir}/man8/ocfs2console.8*
|
|
|
|
%files o2cb
|
|
%defattr(-,root,root)
|
|
/sbin/rco2cb
|
|
/sbin/rcocfs2
|
|
/sbin/o2cb_ctl
|
|
/sbin/o2cb
|
|
%{_sysconfdir}/init.d/o2cb
|
|
%{_sysconfdir}/init.d/ocfs2
|
|
%{_mandir}/man8/o2cb_ctl.8*
|
|
/var/adm/fillup-templates/sysconfig.o2cb
|
|
%{_mandir}/man7/o2cb.7.gz
|
|
%{_mandir}/man8/o2cb.8.gz
|
|
%doc README.O2CB
|
|
|
|
%files devel
|
|
%defattr(-,root,root)
|
|
%{_includedir}/o2cb
|
|
%{_includedir}/o2dlm
|
|
%{_includedir}/ocfs2
|
|
%{_includedir}/ocfs2-kernel
|
|
%{_libdir}/pkgconfig/o2cb.pc
|
|
%{_libdir}/pkgconfig/o2dlm.pc
|
|
%{_libdir}/pkgconfig/ocfs2.pc
|
|
|
|
%changelog
|