2007-01-15 10:53:19 +01:00
|
|
|
#
|
2011-03-10 12:48:15 +01:00
|
|
|
# spec file for package drbd
|
2007-01-15 10:53:19 +01:00
|
|
|
#
|
2018-01-02 03:38:32 +01:00
|
|
|
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
2007-01-15 10:53:19 +01:00
|
|
|
#
|
2008-08-18 18:28:48 +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.
|
|
|
|
|
2007-01-15 10:53:19 +01:00
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
2015-07-25 07:44:30 +02:00
|
|
|
# needssslcertforbuild
|
|
|
|
|
2017-07-19 09:00:23 +02:00
|
|
|
|
2016-12-06 11:22:12 +01:00
|
|
|
%if ! 0%{?is_opensuse}
|
2015-07-25 07:44:30 +02:00
|
|
|
%ifarch x86_64
|
2017-10-11 12:53:39 +02:00
|
|
|
%define buildrt 0
|
2015-07-25 07:44:30 +02:00
|
|
|
%endif
|
2016-12-06 11:22:12 +01:00
|
|
|
%endif
|
2016-04-13 14:42:42 +02:00
|
|
|
|
2007-01-15 10:53:19 +01:00
|
|
|
Name: drbd
|
2017-12-28 10:53:16 +01:00
|
|
|
Version: 9.0.10+git.b7994aa1
|
2015-07-25 07:44:30 +02:00
|
|
|
Release: 0
|
2016-04-13 14:42:42 +02:00
|
|
|
Summary: DRBD driver for Linux
|
2017-06-22 10:38:38 +02:00
|
|
|
License: GPL-2.0+
|
2007-01-15 10:53:19 +01:00
|
|
|
Group: Productivity/Clustering/HA
|
2016-04-13 14:42:42 +02:00
|
|
|
Url: http://drbd.linbit.com/
|
|
|
|
Source: %{name}-%{version}.tar.bz2
|
2015-07-25 07:44:30 +02:00
|
|
|
Source1: preamble
|
2015-08-19 11:34:13 +02:00
|
|
|
#In kernel is: kernel/drivers/block/drbd/drbd.ko
|
2015-07-25 07:44:30 +02:00
|
|
|
Source2: Module.supported
|
2016-04-13 14:42:42 +02:00
|
|
|
Source3: drbd_git_revision
|
2017-03-29 10:55:06 +02:00
|
|
|
Patch1: fix-resync-finished-with-syncs-have-bits-set.patch
|
2015-07-25 07:44:30 +02:00
|
|
|
BuildRequires: kernel-source
|
|
|
|
BuildRequires: kernel-syms
|
2017-11-17 04:55:51 +01:00
|
|
|
BuildRequires: libelf-devel
|
2017-12-28 10:53:16 +01:00
|
|
|
BuildRequires: module-init-tools
|
|
|
|
Requires: drbd-utils >= 9.2.0
|
|
|
|
Supplements: drbd-utils >= 9.2.0
|
2015-07-29 03:10:03 +02:00
|
|
|
Obsoletes: drbd-kmp < %{version}
|
2007-01-15 10:53:19 +01:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2015-07-25 07:44:30 +02:00
|
|
|
ExcludeArch: i586 s390
|
2016-10-26 05:56:30 +02:00
|
|
|
%kernel_module_package -n drbd -p %{_sourcedir}/preamble
|
|
|
|
%if 0%{?buildrt} == 1
|
|
|
|
BuildRequires: kernel-source-rt
|
|
|
|
BuildRequires: kernel-syms-rt
|
|
|
|
%endif
|
2007-01-15 10:53:19 +01:00
|
|
|
|
|
|
|
%description
|
2015-07-29 03:10:03 +02:00
|
|
|
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.
|
|
|
|
|
|
|
|
%package KMP
|
|
|
|
Summary: Kernel driver for DRBD
|
|
|
|
Group: Productivity/Clustering/HA
|
2016-10-26 05:56:30 +02:00
|
|
|
Url: http://drbd.linbit.com/
|
2015-07-29 03:10:03 +02:00
|
|
|
|
|
|
|
%description KMP
|
2016-10-26 05:56:30 +02:00
|
|
|
This module is the kernel-dependent driver for DRBD. This is split out so
|
2015-07-25 07:44:30 +02:00
|
|
|
that multiple kernel driver versions can be installed, one for each
|
|
|
|
installed kernel.
|
2007-01-15 10:53:19 +01:00
|
|
|
|
|
|
|
%prep
|
2015-07-25 07:44:30 +02:00
|
|
|
%setup -q -n drbd-%{version}
|
2017-03-29 10:55:06 +02:00
|
|
|
%patch1 -p1
|
2016-04-13 14:42:42 +02:00
|
|
|
|
|
|
|
mkdir source
|
|
|
|
cp -a drbd/. source/. || :
|
|
|
|
cp $RPM_SOURCE_DIR/drbd_git_revision source/.drbd_git_revision
|
2007-01-15 10:53:19 +01:00
|
|
|
|
|
|
|
%build
|
2015-07-25 07:44:30 +02:00
|
|
|
rm -rf obj
|
|
|
|
mkdir obj
|
|
|
|
ln -s ../scripts obj/
|
|
|
|
|
2017-07-19 09:00:23 +02:00
|
|
|
export WANT_DRBD_REPRODUCIBLE_BUILD=1
|
2016-04-13 14:42:42 +02:00
|
|
|
export CONFIG_BLK_DEV_DRBD=m
|
|
|
|
export EXTRA_CFLAGS='-DVERSION=\"%{version}\"'
|
|
|
|
|
2016-10-26 05:56:30 +02:00
|
|
|
for flavor in %{flavors_to_build}; do
|
2016-04-13 14:42:42 +02:00
|
|
|
rm -rf $flavor
|
|
|
|
cp -r source $flavor
|
2016-10-26 05:56:30 +02:00
|
|
|
cp %{_sourcedir}/Module.supported $flavor
|
2016-04-13 14:42:42 +02:00
|
|
|
export DRBDSRC="$PWD/obj/$flavor"
|
|
|
|
make -C %{kernel_source $flavor} modules M=$PWD/$flavor
|
2015-07-25 07:44:30 +02:00
|
|
|
done
|
2007-01-15 10:53:19 +01:00
|
|
|
|
|
|
|
%install
|
2015-07-25 07:44:30 +02:00
|
|
|
export INSTALL_MOD_PATH=%{buildroot}
|
|
|
|
export INSTALL_MOD_DIR=updates
|
2016-04-13 14:42:42 +02:00
|
|
|
for flavor in %{flavors_to_build}; do
|
|
|
|
make -C %{kernel_source $flavor} modules_install M=$PWD/$flavor
|
2015-07-25 07:44:30 +02:00
|
|
|
done
|
|
|
|
|
2015-09-28 04:50:59 +02:00
|
|
|
mkdir -p %{buildroot}/%{_sbindir}
|
2017-06-22 10:38:38 +02:00
|
|
|
ln -s -f %{_sbindir}/service %{buildroot}/%{_sbindir}/rc%{name}
|
2015-07-25 07:44:30 +02:00
|
|
|
rm -f drbd.conf
|
|
|
|
|
|
|
|
%clean
|
|
|
|
rm -rf %{buildroot}
|
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
2010-04-16 00:07:17 +02:00
|
|
|
%doc COPYING
|
|
|
|
%doc ChangeLog
|
2015-09-28 04:50:59 +02:00
|
|
|
%{_sbindir}/rc%{name}
|
2007-01-15 10:53:19 +01:00
|
|
|
|
2007-03-30 02:32:51 +02:00
|
|
|
%changelog
|