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
|
|
|
#
|
2021-04-22 08:13:10 +02:00
|
|
|
# Copyright (c) 2021 SUSE LLC
|
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.
|
|
|
|
|
2019-09-20 10:12:33 +02:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2014-07-14 17:04:17 +02:00
|
|
|
#
|
|
|
|
|
2021-04-22 08:13:10 +02:00
|
|
|
|
2020-11-20 13:13:05 +01:00
|
|
|
%if !0%{?usrmerged}
|
|
|
|
%define sbindir /sbin
|
2021-10-18 03:38:19 +02:00
|
|
|
%define libdir /lib
|
2020-11-20 13:13:05 +01:00
|
|
|
%else
|
|
|
|
%define sbindir %{_sbindir}
|
2021-10-18 03:38:19 +02:00
|
|
|
%define libdir %{_prefix}/lib
|
2020-11-20 13:13:05 +01:00
|
|
|
%endif
|
2017-08-25 09:13:15 +02:00
|
|
|
%bcond_without drbdmon
|
2019-03-12 10:10:15 +01:00
|
|
|
# Man pages are included in the released tarball.
|
|
|
|
# Only need po4a to build man from git source code
|
|
|
|
%bcond_without prebuiltman
|
2014-07-14 17:04:17 +02:00
|
|
|
Name: drbd-utils
|
2021-10-18 03:38:19 +02:00
|
|
|
Version: 9.19.0
|
2014-07-14 17:04:17 +02:00
|
|
|
Release: 0
|
|
|
|
Summary: Distributed Replicated Block Device
|
2019-09-20 10:12:33 +02:00
|
|
|
License: GPL-2.0-or-later
|
2021-10-18 03:38:19 +02:00
|
|
|
Group: Productivity/Clustering/HA
|
2020-02-20 13:59:57 +01:00
|
|
|
URL: http://www.drbd.org/
|
2018-08-15 10:54:36 +02:00
|
|
|
Source: http://www.linbit.com/downloads/drbd/utils/%{name}-%{version}.tar.gz
|
2021-10-18 03:38:19 +02:00
|
|
|
Source100: %{name}.rpmlintrc
|
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
|
2021-10-18 03:38:19 +02:00
|
|
|
Patch2: usrmerge_move_lib_to_prefix_lib.patch
|
2017-02-16 08:27:47 +01:00
|
|
|
Patch3: fence-after-pacemaker-down.patch
|
2017-04-04 11:36:48 +02:00
|
|
|
# PATCH-SUSE-FIX: Disable quorum in default configuration (bsc#1032142)
|
2018-04-19 02:42:25 +02:00
|
|
|
Patch4: 0001-Disable-quorum-in-default-configuration-bsc-1032142.patch
|
2018-08-15 10:54:36 +02:00
|
|
|
Patch5: move_fencing_from_disk_to_net_in_example.patch
|
2021-04-22 08:13:10 +02:00
|
|
|
Patch6: pie-fix.patch
|
2021-10-19 05:16:47 +02:00
|
|
|
Patch99: rpmlint-build-error.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
|
2020-06-08 11:31:43 +02:00
|
|
|
%ifarch %{ix86} x86_64
|
2014-07-14 17:04:17 +02:00
|
|
|
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
|
2019-09-20 10:12:33 +02:00
|
|
|
BuildRequires: pkgconfig(systemd)
|
2020-02-20 13:59:57 +01:00
|
|
|
BuildRequires: pkgconfig(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
|
2019-03-12 10:10:15 +01:00
|
|
|
%if %{without prebuiltman}
|
2019-09-20 10:12:33 +02:00
|
|
|
BuildRequires: po4a
|
2019-03-12 10:10:15 +01: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
|
2020-06-08 11:31:43 +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
|
2021-04-22 08:13:10 +02:00
|
|
|
%patch6 -p1
|
2021-10-18 03:38:19 +02:00
|
|
|
%patch99 -p1
|
2014-07-14 17:04:17 +02:00
|
|
|
|
|
|
|
%build
|
2018-01-22 05:51:36 +01:00
|
|
|
export WANT_DRBD_REPRODUCIBLE_BUILD=1
|
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 \
|
2020-11-20 13:13:05 +01:00
|
|
|
%if !0%{?usrmerged}
|
2015-02-20 19:23:31 +01:00
|
|
|
--prefix=/ \
|
|
|
|
--sbindir=/sbin \
|
2020-11-20 13:13:05 +01:00
|
|
|
%else
|
|
|
|
--prefix=%{_prefix} \
|
2021-09-17 10:25:45 +02:00
|
|
|
%endif
|
|
|
|
%if 0%{?is_opensuse}
|
2021-10-18 03:38:19 +02:00
|
|
|
--localstatedir=%{_localstatedir} \
|
2020-11-20 13:13:05 +01:00
|
|
|
%endif
|
2015-02-20 19:23:31 +01:00
|
|
|
--mandir=%{_mandir} \
|
|
|
|
--sysconfdir=%{_sysconfdir} \
|
2017-06-22 10:39:27 +02:00
|
|
|
--datarootdir=%{_datadir} \
|
|
|
|
--datadir=%{_datadir} \
|
|
|
|
--exec_prefix=%{_prefix}/lib \
|
2017-08-25 09:13:15 +02:00
|
|
|
%{?with_drbdmon: --with-drbdmon} \
|
2019-03-12 10:10:15 +01:00
|
|
|
%{?with_prebuiltman: --with-prebuiltman} \
|
2015-07-23 11:07:53 +02:00
|
|
|
--with-tmpfilesdir=%{_tmpfilesdir}
|
2014-07-14 17:04:17 +02:00
|
|
|
|
2021-10-18 03:38:19 +02:00
|
|
|
%make_build OPTFLAGS="%{optflags}"
|
2014-07-14 17:04:17 +02:00
|
|
|
|
|
|
|
%install
|
|
|
|
%make_install
|
|
|
|
|
2020-06-08 11:31:43 +02:00
|
|
|
%ifnarch %{ix86} x86_64
|
2014-07-14 17:04:17 +02:00
|
|
|
rm -rf %{buildroot}%{_sysconfdir}/xen
|
|
|
|
%endif
|
|
|
|
|
2015-07-23 11:07:53 +02:00
|
|
|
%pre
|
|
|
|
%service_add_pre drbd.service
|
2021-07-21 10:03:23 +02:00
|
|
|
%service_add_pre drbd-lvchange@.service
|
|
|
|
%service_add_pre drbd-promote@.service
|
|
|
|
%service_add_pre drbd-reconfigure-suspend-or-error@.service
|
|
|
|
%service_add_pre drbd-services@.target
|
|
|
|
%service_add_pre drbd-wait-promotable@.service
|
|
|
|
%service_add_pre drbd@.service
|
|
|
|
%service_add_pre drbd@.target
|
|
|
|
%service_add_pre ocf.ra@.service
|
2015-07-23 11:07:53 +02:00
|
|
|
|
2014-07-14 17:04:17 +02:00
|
|
|
%post
|
2021-10-18 03:38:19 +02:00
|
|
|
%tmpfiles_create %{_tmpfilesdir}/drbd.conf
|
2015-02-20 19:23:31 +01:00
|
|
|
%service_add_post drbd.service
|
2021-07-21 10:03:23 +02:00
|
|
|
%service_add_post drbd-lvchange@.service
|
|
|
|
%service_add_post drbd-promote@.service
|
|
|
|
%service_add_post drbd-reconfigure-suspend-or-error@.service
|
|
|
|
%service_add_post drbd-services@.target
|
|
|
|
%service_add_post drbd-wait-promotable@.service
|
|
|
|
%service_add_post drbd@.service
|
|
|
|
%service_add_post drbd@.target
|
|
|
|
%service_add_post ocf.ra@.service
|
2014-07-14 17:04:17 +02:00
|
|
|
|
2019-03-12 10:10:15 +01:00
|
|
|
#May also overlap the $MAN_LINK in documentation/v9/Makefile.in
|
|
|
|
for f in drbd drbdadm drbdmeta drbdsetup; do
|
|
|
|
ln -sf $f-9.0.8.gz %{_mandir}/man8/$f.8.gz
|
|
|
|
ln -sf $f-9.0.8.gz %{_mandir}/ja/man8/$f.8.gz
|
|
|
|
done
|
|
|
|
ln -sf drbd.conf-9.0.5.gz %{_mandir}/man5/drbd.conf.5.gz
|
|
|
|
ln -sf drbd.conf-9.0.5.gz %{_mandir}/ja/man5/drbd.conf.5.gz
|
|
|
|
%if %{with drbdmon}
|
|
|
|
ln -sf drbdmon-9.0.8.gz %{_mandir}/man8/drbdmon.8.gz
|
|
|
|
ln -sf drbdmon-9.0.8.gz %{_mandir}/ja/man8/drbdmon.8.gz
|
|
|
|
%endif
|
|
|
|
|
2014-07-14 17:04:17 +02:00
|
|
|
%preun
|
2015-02-20 19:23:31 +01:00
|
|
|
%service_del_preun drbd.service
|
2021-07-21 10:03:23 +02:00
|
|
|
%service_del_preun drbd-lvchange@.service
|
|
|
|
%service_del_preun drbd-promote@.service
|
|
|
|
%service_del_preun drbd-reconfigure-suspend-or-error@.service
|
|
|
|
%service_del_preun drbd-services@.target
|
|
|
|
%service_del_preun drbd-wait-promotable@.service
|
|
|
|
%service_del_preun drbd@.service
|
|
|
|
%service_del_preun drbd@.target
|
|
|
|
%service_del_preun ocf.ra@.service
|
2014-07-14 17:04:17 +02:00
|
|
|
|
|
|
|
%postun
|
2015-02-20 19:23:31 +01:00
|
|
|
%service_del_postun drbd.service
|
2021-07-21 10:03:23 +02:00
|
|
|
%service_del_postun drbd-lvchange@.service
|
|
|
|
%service_del_postun drbd-promote@.service
|
|
|
|
%service_del_postun drbd-reconfigure-suspend-or-error@.service
|
|
|
|
%service_del_postun drbd-services@.target
|
|
|
|
%service_del_postun drbd-wait-promotable@.service
|
|
|
|
%service_del_postun drbd@.service
|
|
|
|
%service_del_postun drbd@.target
|
|
|
|
%service_del_postun ocf.ra@.service
|
2014-07-14 17:04:17 +02:00
|
|
|
|
|
|
|
%files -n drbd-utils
|
|
|
|
%config(noreplace) %{_sysconfdir}/drbd.conf
|
|
|
|
%config(noreplace) %{_sysconfdir}/drbd.d/global_common.conf
|
2020-09-11 07:50:08 +02:00
|
|
|
%config(noreplace) %{_sysconfdir}/multipath/conf.d/drbd.conf
|
2021-10-18 03:38:19 +02:00
|
|
|
%{_datadir}/bash-completion/completions/drbdadm.sh
|
2015-07-23 11:07:53 +02:00
|
|
|
%{_tmpfilesdir}/drbd.conf
|
2021-07-21 10:03:23 +02:00
|
|
|
%{_mandir}/man5/drbd.*
|
|
|
|
%{_mandir}/man8/drbd*
|
|
|
|
%{_mandir}/man7/ocf*
|
|
|
|
%{_mandir}/man7/drbd*
|
|
|
|
%{_mandir}/ja/man5/drbd.*
|
|
|
|
%{_mandir}/ja/man8/drbd*
|
2020-06-08 11:31:43 +02:00
|
|
|
%license COPYING
|
2017-12-28 10:53:12 +01:00
|
|
|
%doc README.md
|
2014-07-14 17:04:17 +02:00
|
|
|
%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
|
2020-09-11 07:50:08 +02:00
|
|
|
%dir %{_sysconfdir}/multipath
|
|
|
|
%dir %{_sysconfdir}/multipath/conf.d
|
2021-10-18 03:38:19 +02:00
|
|
|
%{libdir}/drbd
|
2020-11-20 13:13:05 +01:00
|
|
|
%{sbindir}/drbdadm
|
|
|
|
%{sbindir}/drbdsetup
|
|
|
|
%{sbindir}/drbdmeta
|
2017-08-25 09:13:15 +02:00
|
|
|
%if %{with drbdmon}
|
2020-11-20 13:13:05 +01:00
|
|
|
%{sbindir}/drbdmon
|
2017-08-25 09:13:15 +02:00
|
|
|
%endif
|
2020-06-08 11:31:43 +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
|
2019-09-05 10:51:28 +02:00
|
|
|
%attr(755,root,root) %{_sysconfdir}/xen/scripts/block-drbd
|
|
|
|
%endif
|
2014-07-14 17:04:17 +02:00
|
|
|
%{_prefix}/lib/ocf/resource.d/linbit/drbd
|
2021-07-21 10:03:23 +02:00
|
|
|
%{_prefix}/lib/ocf/resource.d/linbit/drbd-attr
|
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
|
2021-07-21 10:03:23 +02:00
|
|
|
%{_unitdir}/drbd-lvchange@.service
|
|
|
|
%{_unitdir}/drbd-promote@.service
|
|
|
|
%{_unitdir}/drbd-reconfigure-suspend-or-error@.service
|
|
|
|
%{_unitdir}/drbd-services@.target
|
|
|
|
%{_unitdir}/drbd-wait-promotable@.service
|
|
|
|
%{_unitdir}/drbd@.service
|
|
|
|
%{_unitdir}/drbd@.target
|
|
|
|
%{_unitdir}/ocf.ra@.service
|
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
|
2021-10-18 03:38:19 +02:00
|
|
|
%dir %{_localstatedir}/lib/drbd
|
2014-07-14 17:04:17 +02:00
|
|
|
|
|
|
|
%changelog
|