2014-07-14 17:04:17 +02:00
|
|
|
#
|
2015-07-23 11:07:53 +02:00
|
|
|
# spec file for package drbd-utils
|
2014-07-14 17:04:17 +02:00
|
|
|
#
|
2015-08-19 11:34:17 +02:00
|
|
|
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
|
2014-07-14 17:04:17 +02:00
|
|
|
#
|
|
|
|
# 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/
|
|
|
|
#
|
|
|
|
|
2015-07-23 11:07:53 +02:00
|
|
|
|
2014-07-14 17:04:17 +02:00
|
|
|
Name: drbd-utils
|
2015-07-23 11:07:53 +02:00
|
|
|
Version: 8.9.2
|
2014-07-14 17:04:17 +02:00
|
|
|
Release: 0
|
|
|
|
Summary: Distributed Replicated Block Device
|
|
|
|
License: GPL-2.0+
|
|
|
|
Group: Productivity/Clustering/HA
|
|
|
|
Url: http://www.drbd.org/
|
2015-07-23 11:07:53 +02:00
|
|
|
Source: http://oss.linbit.com/drbd/%{name}-%{version}.tar.gz
|
2014-07-14 17:04:17 +02:00
|
|
|
|
|
|
|
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
|
|
|
|
Patch1: init-script-fixes.diff
|
2015-07-23 11:07:53 +02:00
|
|
|
Patch2: fix-libdir-in-Makefile.patch
|
2015-08-19 11:34:17 +02:00
|
|
|
Patch3: zeroout-discard-devices.patch
|
2015-11-03 03:23:05 +01:00
|
|
|
Patch4: service-mod.patch
|
2014-07-14 17:04:17 +02:00
|
|
|
|
|
|
|
Provides: drbd-bash-completion = %{version}
|
|
|
|
Provides: drbd-pacemaker = %{version}
|
|
|
|
Provides: drbd-udev = %{version}
|
|
|
|
Obsoletes: drbd-bash-completion < %{version}
|
|
|
|
Obsoletes: drbd-pacemaker < %{version}
|
|
|
|
Obsoletes: drbd-udev < %{version}
|
2014-12-12 16:29:12 +01:00
|
|
|
# drbd-utils first splict from drbd-8.4.5(only driver)
|
|
|
|
# and suse let drbd driver goes in-kernel
|
2015-07-23 11:07:53 +02:00
|
|
|
# Provides: drbd = 8.4.5
|
|
|
|
# Obsoletes: drbd < 8.4.5
|
2014-12-12 16:29:12 +01:00
|
|
|
|
2014-07-14 17:04:17 +02:00
|
|
|
%ifarch %ix86 x86_64
|
|
|
|
Provides: drbd-xen = %{version}
|
|
|
|
Obsoletes: drbd-xen < %{version}
|
|
|
|
%endif
|
2015-07-23 11:07:53 +02:00
|
|
|
BuildRequires: autoconf
|
|
|
|
BuildRequires: automake
|
|
|
|
BuildRequires: bison
|
2014-11-04 15:03:28 +01:00
|
|
|
BuildRequires: docbook-xsl-stylesheets
|
2015-07-23 11:07:53 +02:00
|
|
|
BuildRequires: flex
|
|
|
|
BuildRequires: gcc
|
|
|
|
BuildRequires: glibc-devel
|
|
|
|
BuildRequires: libxslt
|
|
|
|
BuildRequires: make
|
|
|
|
BuildRequires: systemd
|
|
|
|
BuildRequires: udev
|
2014-07-14 17:04:17 +02:00
|
|
|
Provides: drbd-control
|
|
|
|
Provides: drbdsetup
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
Requires(post): %insserv_prereq %fillup_prereq
|
|
|
|
Requires(preun): %insserv_prereq %fillup_prereq
|
|
|
|
Requires(postun): %insserv_prereq fileutils
|
|
|
|
|
|
|
|
%description
|
|
|
|
Drbd is a distributed replicated block device. It mirrors a block
|
|
|
|
device over the network to another machine. Think of it as networked
|
|
|
|
raid 1. It is a building block for setting up clusters.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q
|
|
|
|
%patch1 -p1
|
2015-02-20 19:23:31 +01:00
|
|
|
%patch2 -p1
|
|
|
|
%patch3 -p1
|
2015-11-03 03:23:05 +01:00
|
|
|
%patch4 -p1
|
2014-07-14 17:04:17 +02:00
|
|
|
|
|
|
|
%build
|
2015-02-20 19:23:31 +01:00
|
|
|
./autogen.sh
|
|
|
|
PATH=/sbin:$PATH ./configure \
|
2014-07-14 17:04:17 +02:00
|
|
|
--with-udev \
|
|
|
|
--with-distro=suse \
|
|
|
|
--without-heartbeat \
|
|
|
|
--with-pacemaker \
|
|
|
|
--with-xen \
|
2015-02-20 19:23:31 +01:00
|
|
|
--with-bashcompletion \
|
|
|
|
--with-initscripttype=systemd \
|
|
|
|
--with-systemdunitdir=/usr/lib/systemd/system \
|
|
|
|
--prefix=/ \
|
|
|
|
--sbindir=/sbin \
|
|
|
|
--libdir=/usr/lib \
|
|
|
|
--mandir=%{_mandir} \
|
|
|
|
--sysconfdir=%{_sysconfdir} \
|
|
|
|
--datarootdir=/usr/share \
|
|
|
|
--datadir=/usr/share \
|
|
|
|
--libdir=/usr/lib \
|
2015-07-23 11:07:53 +02:00
|
|
|
--exec_prefix=/usr/lib \
|
|
|
|
--with-tmpfilesdir=%{_tmpfilesdir}
|
2014-07-14 17:04:17 +02:00
|
|
|
|
|
|
|
make OPTFLAGS="%{optflags}" %{?_smp_mflags}
|
|
|
|
|
|
|
|
%install
|
|
|
|
%make_install
|
|
|
|
|
|
|
|
mkdir -p %{buildroot}%{_localstatedir}/lib/drbd
|
|
|
|
%ifnarch %ix86 x86_64
|
|
|
|
rm -rf %{buildroot}%{_sysconfdir}/xen
|
|
|
|
%endif
|
|
|
|
|
|
|
|
mkdir -p %{buildroot}/usr/lib/udev/rules.d
|
2015-02-20 19:23:31 +01:00
|
|
|
mv %{buildroot}/lib/udev/rules.d/65-drbd.rules* %{buildroot}/usr/lib/udev/rules.d/65-drbd.rules
|
2014-07-14 17:04:17 +02:00
|
|
|
|
2015-07-23 11:07:53 +02:00
|
|
|
%pre
|
|
|
|
%service_add_pre drbd.service
|
|
|
|
|
2014-07-14 17:04:17 +02:00
|
|
|
%post
|
2015-02-20 19:23:31 +01:00
|
|
|
%service_add_post drbd.service
|
2014-07-14 17:04:17 +02:00
|
|
|
|
|
|
|
%preun
|
2015-02-20 19:23:31 +01:00
|
|
|
%service_del_preun drbd.service
|
2014-07-14 17:04:17 +02:00
|
|
|
|
|
|
|
%postun
|
2015-02-20 19:23:31 +01:00
|
|
|
%service_del_postun drbd.service
|
2014-07-14 17:04:17 +02:00
|
|
|
|
|
|
|
%files -n drbd-utils
|
|
|
|
%defattr(-, root, root)
|
|
|
|
%config(noreplace) %{_sysconfdir}/drbd.conf
|
|
|
|
%config %{_sysconfdir}/bash_completion.d/drbdadm.sh
|
|
|
|
%config(noreplace) %{_sysconfdir}/drbd.d/global_common.conf
|
2015-07-23 11:07:53 +02:00
|
|
|
%{_tmpfilesdir}/drbd.conf
|
2014-07-14 17:04:17 +02:00
|
|
|
%doc %{_mandir}/man5/drbd.*
|
|
|
|
%doc %{_mandir}/man8/drbd*
|
|
|
|
%doc COPYING
|
|
|
|
%doc README
|
|
|
|
%doc ChangeLog
|
2015-07-23 11:07:53 +02:00
|
|
|
%doc scripts/drbd.conf.example
|
2014-07-14 17:04:17 +02:00
|
|
|
%dir %{_sysconfdir}/drbd.d
|
2015-02-20 19:23:31 +01:00
|
|
|
/sbin/drbdadm
|
|
|
|
/sbin/drbdsetup
|
|
|
|
/sbin/drbdmeta
|
|
|
|
/sbin/drbd-overview
|
2014-07-14 17:04:17 +02:00
|
|
|
%ifarch %ix86 x86_64
|
2014-12-17 10:38:55 +01:00
|
|
|
%dir %attr(700,root,root) %{_sysconfdir}/xen
|
2014-07-14 17:04:17 +02:00
|
|
|
%dir %{_sysconfdir}/xen/scripts
|
|
|
|
%{_sysconfdir}/xen/scripts/block-drbd
|
|
|
|
%endif
|
|
|
|
%{_prefix}/lib/ocf/resource.d/linbit/drbd
|
|
|
|
%dir /usr/lib/udev
|
|
|
|
%dir /usr/lib/udev/rules.d
|
2015-02-20 19:23:31 +01:00
|
|
|
/usr/lib/udev/rules.d/65-drbd.rules
|
|
|
|
%{_unitdir}/drbd.service
|
|
|
|
/usr/lib/systemd/system/drbd.service
|
2014-07-14 17:04:17 +02:00
|
|
|
%defattr(-, root, root)
|
|
|
|
%{_localstatedir}/lib/drbd
|
2015-02-20 19:23:31 +01:00
|
|
|
/usr/lib/drbd
|
2014-07-14 17:04:17 +02:00
|
|
|
/lib/drbd
|
|
|
|
/lib/drbd/drbdadm*
|
|
|
|
/lib/drbd/drbdsetup*
|
|
|
|
%dir %{_prefix}/lib/ocf
|
|
|
|
%dir %{_prefix}/lib/ocf/resource.d
|
|
|
|
%dir %{_prefix}/lib/ocf/resource.d/linbit
|
|
|
|
|
|
|
|
%changelog
|