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
|
|
|
#
|
2017-07-25 11:35:01 +02:00
|
|
|
# Copyright (c) 2017 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/
|
|
|
|
#
|
|
|
|
|
2017-10-16 11:53:20 +02:00
|
|
|
|
2017-08-25 09:13:15 +02:00
|
|
|
%bcond_without drbdmon
|
2015-07-23 11:07:53 +02:00
|
|
|
|
2014-07-14 17:04:17 +02:00
|
|
|
Name: drbd-utils
|
2017-06-22 10:39:27 +02:00
|
|
|
Version: 9.0.0
|
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/
|
2017-06-22 10:39:27 +02:00
|
|
|
Source: http://www.drbd.org/download/drbd/utils/%{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
|
2017-02-16 08:27:47 +01:00
|
|
|
Patch3: fence-after-pacemaker-down.patch
|
2017-03-29 10:57:53 +02:00
|
|
|
Patch4: fix-segfault-up-stacked-resource.patch
|
2017-04-04 11:36:48 +02:00
|
|
|
# PATCH-SUSE-FIX: Disable quorum in default configuration (bsc#1032142)
|
|
|
|
Patch5: 0001-Disable-quorum-in-default-configuration-bsc-1032142.patch
|
2017-07-25 11:20:15 +02:00
|
|
|
Patch6: fix_call_khelper_with_stack.patch
|
2017-08-11 08:22:42 +02:00
|
|
|
Patch7: Update-block-drbd-script-to-support-xen.patch
|
2017-10-16 11:53:20 +02:00
|
|
|
Patch8: move_fencing_from_disk_to_net_in_example.patch
|
|
|
|
Patch9: skip_sh-b-pri_in_v9.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
|
2017-06-22 10:39:27 +02:00
|
|
|
BuildRequires: pkgconfig
|
2015-07-23 11:07:53 +02:00
|
|
|
BuildRequires: systemd
|
|
|
|
BuildRequires: udev
|
2017-08-25 09:13:15 +02:00
|
|
|
%if %{with drbdmon}
|
2017-10-16 11:53:20 +02:00
|
|
|
BuildRequires: gcc-c++
|
2017-08-25 09:13:15 +02:00
|
|
|
%endif
|
2014-07-14 17:04:17 +02:00
|
|
|
Provides: drbd-control
|
|
|
|
Provides: drbdsetup
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
|
|
|
|
%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
|
2017-06-22 10:39:27 +02:00
|
|
|
%setup -q
|
2014-07-14 17:04:17 +02:00
|
|
|
%patch1 -p1
|
2015-02-20 19:23:31 +01:00
|
|
|
%patch2 -p1
|
|
|
|
%patch3 -p1
|
2015-11-03 03:23:05 +01:00
|
|
|
%patch4 -p1
|
2017-04-04 11:36:48 +02:00
|
|
|
%patch5 -p1
|
2017-07-25 11:20:15 +02:00
|
|
|
%patch6 -p1
|
2017-08-11 08:22:42 +02:00
|
|
|
%patch7 -p1
|
2017-10-16 11:53:20 +02:00
|
|
|
%patch8 -p1
|
|
|
|
%patch9 -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 \
|
2017-06-22 10:39:27 +02:00
|
|
|
--with-systemdunitdir=%{_prefix}/lib/systemd/system \
|
2015-02-20 19:23:31 +01:00
|
|
|
--prefix=/ \
|
|
|
|
--sbindir=/sbin \
|
2017-06-22 10:39:27 +02:00
|
|
|
--libdir=%{_prefix}/lib \
|
2015-02-20 19:23:31 +01:00
|
|
|
--mandir=%{_mandir} \
|
|
|
|
--sysconfdir=%{_sysconfdir} \
|
2017-06-22 10:39:27 +02:00
|
|
|
--datarootdir=%{_datadir} \
|
|
|
|
--datadir=%{_datadir} \
|
|
|
|
--libdir=%{_prefix}/lib \
|
|
|
|
--exec_prefix=%{_prefix}/lib \
|
2017-08-25 09:13:15 +02:00
|
|
|
%{?with_drbdmon: --with-drbdmon} \
|
2015-07-23 11:07:53 +02:00
|
|
|
--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
|
|
|
|
|
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
|
2017-08-25 09:13:15 +02:00
|
|
|
%if %{with drbdmon}
|
|
|
|
/sbin/drbdmon
|
|
|
|
%endif
|
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
|
2017-03-29 10:57:53 +02:00
|
|
|
%{_prefix}/lib/ocf/resource.d/linbit/drbd.shellfuncs.sh
|
2016-04-08 15:41:13 +02:00
|
|
|
%{_udevrulesdir}/65-drbd.rules
|
2015-02-20 19:23:31 +01:00
|
|
|
%{_unitdir}/drbd.service
|
2017-06-22 10:39:27 +02:00
|
|
|
%{_prefix}/lib/systemd/system/drbd.service
|
2014-07-14 17:04:17 +02:00
|
|
|
%defattr(-, root, root)
|
|
|
|
%{_localstatedir}/lib/drbd
|
2017-06-22 10:39:27 +02:00
|
|
|
%{_prefix}/lib/drbd
|
2014-07-14 17:04:17 +02:00
|
|
|
/lib/drbd
|
2017-03-29 10:57:53 +02:00
|
|
|
/lib/drbd/drbd*
|
2014-07-14 17:04:17 +02:00
|
|
|
%dir %{_prefix}/lib/ocf
|
|
|
|
%dir %{_prefix}/lib/ocf/resource.d
|
|
|
|
%dir %{_prefix}/lib/ocf/resource.d/linbit
|
|
|
|
|
|
|
|
%changelog
|