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
|
|
|
#
|
2015-07-25 07:44:30 +02:00
|
|
|
# Copyright (c) 2015 SUSE LINUX Products 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/
|
|
|
|
#
|
|
|
|
|
2012-07-10 13:41:01 +02:00
|
|
|
|
2015-07-25 07:44:30 +02:00
|
|
|
# needssslcertforbuild
|
|
|
|
|
|
|
|
%ifarch x86_64
|
|
|
|
%define buildrt 0
|
|
|
|
%endif
|
2007-01-15 10:53:19 +01:00
|
|
|
Name: drbd
|
2015-07-25 07:44:30 +02:00
|
|
|
Version: 8.4.6
|
|
|
|
Release: 0
|
|
|
|
#Name: drbd-kernel
|
|
|
|
Summary: Kernel driver for DRBD
|
2011-12-06 18:07:06 +01:00
|
|
|
License: GPL-2.0+
|
2007-01-15 10:53:19 +01:00
|
|
|
Group: Productivity/Clustering/HA
|
2007-09-17 17:10:20 +02:00
|
|
|
Url: http://www.drbd.org/
|
2015-07-25 07:44:30 +02:00
|
|
|
Source: http://oss.linbit.com/drbd/8.4/%{name}-%{version}.tar.gz
|
|
|
|
Source1: preamble
|
|
|
|
# In kernel is: kernel/drivers/block/drbd/drbd.ko
|
|
|
|
Source2: Module.supported
|
|
|
|
|
|
|
|
# Patch set (0-10) for fate: https://fate.suse.com/317940
|
|
|
|
# Already merged into linbit upstream and waiting for next release
|
|
|
|
Patch0: 0000-cover-letter-fate317940.patch
|
|
|
|
Patch1: 0001-drbd-Fix-the-wrong-logic-of-moving-history.patch
|
|
|
|
Patch2: 0002-drbd-Add-options-zap_devices-to-new-current-uuid.patch
|
|
|
|
Patch3: 0003-drbd-A-function-to-zero-out-drbd-backing-device.patch
|
|
|
|
Patch4: 0004-drbd-New-packet-P_ZERO_OUT.patch
|
|
|
|
Patch5: 0005-drbd-Functions-to-notify-peer-node-to-start.patch
|
|
|
|
Patch6: 0006-drbd-Wapper-for-zeroing-out-device-by-worker.patch
|
|
|
|
Patch7: 0007-drbd-Flags-for-background-drbd-device-work.patch
|
|
|
|
Patch8: 0008-drbd-Function-to-work-with-packet-P_ZERO_OUT.patch
|
|
|
|
Patch9: 0009-drbd-Receive-zero-out-command-from-peer-node.patch
|
|
|
|
Patch10: 0010-drbd-Handle-new-current-uuid-zap-devices.patch
|
|
|
|
|
|
|
|
BuildRequires: kernel-source
|
|
|
|
BuildRequires: kernel-syms
|
|
|
|
BuildRequires: module-init-tools
|
|
|
|
%if 0%{?buildrt} == 1
|
|
|
|
BuildRequires: kernel-syms-rt
|
|
|
|
%endif
|
|
|
|
Requires: drbd-utils >= 8.9.0
|
|
|
|
Supplements: drbd-utils >= 8.9.0
|
2007-01-15 10:53:19 +01:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2015-07-25 07:44:30 +02:00
|
|
|
ExcludeArch: i586 s390
|
|
|
|
|
|
|
|
%kernel_module_package -n drbd -p %_sourcedir/preamble
|
2007-01-15 10:53:19 +01:00
|
|
|
|
|
|
|
%description
|
2015-07-25 07:44:30 +02:00
|
|
|
This module is the kernel-dependent driver for DRBD. This is split out so
|
|
|
|
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}
|
|
|
|
%patch1 -p1
|
|
|
|
%patch2 -p1
|
|
|
|
%patch3 -p1
|
|
|
|
%patch4 -p1
|
|
|
|
%patch5 -p1
|
|
|
|
%patch6 -p1
|
|
|
|
%patch7 -p1
|
|
|
|
%patch8 -p1
|
|
|
|
%patch9 -p1
|
|
|
|
%patch10 -p1
|
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/
|
|
|
|
|
|
|
|
for flavor in %{flavors_to_build}; do
|
|
|
|
cp -r drbd obj/$flavor
|
|
|
|
cp %_sourcedir/Module.supported obj/$flavor
|
|
|
|
#make -C %{kernel_source $flavor} modules M=$PWD/obj/$flavor
|
|
|
|
make -C obj/$flavor %{_smp_mflags} all KDIR=%{kernel_source $flavor}
|
|
|
|
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
|
2007-01-15 10:53:19 +01:00
|
|
|
|
2015-07-25 07:44:30 +02:00
|
|
|
for flavor in %{flavors_to_build} ; do
|
|
|
|
make -C %{kernel_source $flavor} modules_install M=$PWD/obj/$flavor
|
|
|
|
#From upstream file: drbd-kernel.spec
|
|
|
|
#kernelrelease=$(cat %{kernel_source $flavor}/include/config/kernel.release || make -s -C %{kernel_source $flavor} kernelrelease)
|
|
|
|
#mv obj/$flavor/.kernel.config.gz obj/k-config-$kernelrelease.gz
|
|
|
|
done
|
|
|
|
|
|
|
|
rm -f drbd.conf
|
|
|
|
|
|
|
|
%clean
|
|
|
|
rm -rf %{buildroot}
|
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
2010-04-16 00:07:17 +02:00
|
|
|
%doc COPYING
|
|
|
|
%doc ChangeLog
|
2007-01-15 10:53:19 +01:00
|
|
|
|
2007-03-30 02:32:51 +02:00
|
|
|
%changelog
|