[DRBD-user] Re: New drbd .spec file for 0.6.10

Philipp Reisner philipp.reisner at linbit.com
Wed Feb 4 11:29:41 CET 2004

Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.


Hi List,

Most of the time I am working on debain based systems. ... 
Maybe the people caring about the .spec file could stand up and
form a kind of "drbd.spec file group" that will feed patches
to me for inclusion into CVS and futher releases.

Maybe you can even find some ftp/http space (I could provide it
on www.drbd.org as well) to upload prebuild packages for
e.g. RedHat's and SuSE's distribution kernels... 

For debian it is already in place...
http://www.drbd.org/download.html

-Philipp

Sean Reifschneider wrote :
>
> I'm attaching a modified drbd.spec file here.  It's based on the one for
> 0.6.10, but builds a second package, kernel-module-drbd.  This package
> is named based on the kernel that it was built for:
>
>    kernel-module-drbd-0.6.10-1_2.4.24host.i386.rpm
>
> For example, the above module was built for kernel version "2.4.24host".
> The base package keep their orignal naming, this only impacts the kernel
> module.  This allows you to build multiple DRBD kernel driver RPMs, and
> install them simultaneously.  The big benefit is that if up switch
> kernel versions you don't have to "rpm -e drbd" then "rpm -i
> drbd-*.rpm", then fix up the drbd.conf file that was munged while doing
> this.
>
> Take a look and let me know what you think.  This is based on the ALSA
> RPMs provided by freshmeat.net.
>
> Sean

-- 
: Dipl-Ing Philipp Reisner                      Tel +43-1-8178292-50 :
: LINBIT Information Technologies GmbH          Fax +43-1-8178292-82 :
: Schönbrunnerstr 244, 1120 Vienna, Austria    http://www.linbit.com :
-------------- next part --------------
# "uname -r" output of the kernel to build for, the running one
# if none was specified with "--define 'kernelversion <uname -r>'"
%{!?kernelversion: %{expand: %%define kernelversion %(uname -r)}}

%define kversion %(echo %{kernelversion} | sed -e s/smp// -)
%define krelver  %(echo %{kversion} | tr -s '-' '_')
%if %(echo %{kernelversion} | grep -c smp)
   %{expand:%%define ksmp -smp}
%endif

Name: drbd
Summary: Distributed Redundant Block Device driver for Linux
Version: 0.6.10
Release: 2
Source: %{name}-%{version}.tar.gz
Vendor: DRBD 
License: GPL
ExclusiveOS: linux
Group: System Environment/Kernel
Packager: Sean Reifschneider <jafo-rpms at tummy.com>
Requires: kernel
Provides: %{name}
URL: http://www.drbd.org/ 
BuildRoot: %{_tmppath}/%{name}-%{version}-root

%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
high availability (HA) clusters.

Authors:
--------
    Philipp Reisner <philipp.reisner at linbit.com> - Primary Author
    Lars Ellenberg  <l.g.e at web.de>

%package -n kernel%{?ksmp}-module-drbd
Summary: Kernel driver for DRBD.
Release: %{release}_%{krelver}
Group: System Environment/Kernel
Requires: %{name} = %{version}, /sbin/depmod
%{?ksmp:Provides: kernel-module-drbd = %{version}-%{release}_%{krelver}}

%description -n kernel%{?ksmp}-module-drbd
This module is the kernel-dependant driver for DRBD.  This is split out so
that multiple kernel driver versions can be installed, one for each
installed kernel.

%prep
%setup

%build
echo kernelversion=%{kernelversion}
echo kversion=%{kversion}
echo krelver=%{krelver}
mkdir -p %{buildroot}

make clean
make PREFIX=%{buildroot}/ MANDIR=%{_mandir} all

%install
make PREFIX=%{buildroot}/ MANDIR=%{_mandir} all install

%clean
rm -rf %{buildroot}

%files
%defattr(-,root,root)
%{_mandir}/man8/datadisk.8.gz
%{_mandir}/man8/drbd.8.gz
%{_mandir}/man8/drbdsetup.8.gz
%{_mandir}/man5/drbd.conf.5.gz
/sbin/drbdsetup
/etc/rc.d/init.d/drbd
/etc/ha.d/resource.d/datadisk
%doc scripts/drbd.conf
%doc documentation/NFS-Server-README.txt
%doc COPYING
%doc README
%doc file.list

%files -n kernel%{?ksmp}-module-drbd
%defattr(-, root, root)
/lib/modules/%{kernelversion}/

%post
uname -r | grep BOOT || /sbin/depmod -a > /dev/null 2>&1 || true

chkconfig --add drbd

%preun
service drbd stop

lsmod | grep drbd > /dev/null 2>&1
if [ $? -eq 0 ]; then
	rmmod drbd
fi

if [ $1 -eq 0 ]; then
	chkconfig --del drbd
fi

%post -n kernel%{?ksmp}-module-drbd
/sbin/depmod -a -F /boot/System.map-%{kernelversion} %{kernelversion} >/dev/null 2>&1 || true

%postun -n kernel%{?ksmp}-module-drbd
/sbin/depmod -a -F /boot/System.map-%{kernelversion} %{kernelversion} >/dev/null 2>&1 || true

%changelog
* Tue Feb  3 2004 Sean Reifschneider <jafo-rpms at tummy.com> [0.6.10-2]
- Moved DRBD driver out into "kernel-module-drbd" RPM.
- The kernel-module-drbd module has a release based on the kernel name,
  allowing one instance of kernel-module-drbd to be installed for each
  kernel on the box.
- Removed the "drbd.o.old" pre/post code.

* Wed Dec 12 2003 15:10:44 +0200 Philipp Reisner <phil at linbit.com>
- drbd (0.6.10-1)
- With 0.6.9 there was a bug introduced which prevented the sending 
  of ACK packets during resync. Fixed.
- A fix to drbdsetup's wait_connect command.
  Replaced all invocations of the sleep_on() family functions with the 
  invocations of the wait_event() macros. This removes lost wakup events 
  and race conditions.
- New implementation of drbd_wait_ee(). This makes the 
  "(BUG?) Moving bh=%p to done_ee" go away.
- Handle the case if vmalloc() of the bitmap fails.

* Wed Nov 26 2003 17:39:19 +0100 Philipp Reisner <phil at linbit.com>
- drbd (0.6.9-1)
- New module build system (using kernel source tree build system)
- New net section option 'ko-count'. It allows you to kick out a 
  secondary node which does no longer process data in acceptable time. 
  Its default value is 0 which disables this feature.
- Changing syncgroups while resync runs has shows now the correct behaviour.
- In case thread creations fails DRBD would deadlock on its own
  semaphore. Fixed now.
- BKL is no longer used on Linux-2.4.x.
- Now you can stack mapping block devices like LVM2 (and maybe md) on 
  top of drbd (a one character fix).
- drbdsetup wait_connect on a StandAlone node looked like a timeout and
  forced primary. fixed.
- if drbdsetup wait_* in fact did timeout this looked like a failed ioctl.
  this bug was newly introduced in 0.6.8. fixed.
- A fix to a race in _drbd_alloc_ee(). You could trigger this race if
  your filesystem uses a blocksize < 4K and your machine has multiple CPUs.
  By Eric W. Biederman.
- A maybe bugfix regarding calls to free_page() by Eric W. Biederman.
- A cleanup patch to drbd_process_done_ee() by Eric W. Biederman.

* Mon Oct 20 2003 11:43:00 +0100 Philipp Reisner <phil at linbit.com>
- drbd (0.6.8-1)
- Two fixes to the sync-group functionality.

* Mon Jul 28 2003 14:40:26 +0100 Philipp Reisner <phil at linbit.com>
- drbd (0.6.7-1)
- A fix to a bug that could cause data corruption if you use a 
  other blocksize than 4k to access the DRBD device.
- A fix to a SMP race in the syncer code. The problem was tirggered
  when using DRBD on QLogic fiber channel adapters.
- Replaced various calls to sleep_on() variants with the wait_event()
  macros. -- This removes potential (, non-critical) SMP races.
- This release includes the sync-group option.

* Mon Jul 28 2003 14:40:26 +0100 Philipp Reisner <phil at linbit.com>
- drbd (0.6.6-1)
- In the 0.6.5 release the secondary_remote command was badly broken,
  it succeeded when it should fail silently. This is fixed now.
- Probabely in all previous releases, the resyncer thread did not
  exit properly if the secondary node goes away during resync. 
  This was not fatal sind the resyncher thread did exit at soon
  as it gets a network error. This is fixed now.
- Some new switches to the drbd script.

* Sun Jul 06 2003 13:29:00 +0100 Philipp Reisner <phil at linbit.com>
- drbd (0.6.5-1)
- Improvements to the build system
- Now it is possible to tune the socket send buffer size via drbdsetup/
  drbd.conf. This is especially usefull for WAN mirroring / using
  protocol A.
- Compatibility code to compile DRBD under RedHat 9.0 (RH's version of
  Linux-2.4.20)
- Improved sample drbd.conf file

* Thu May 01 2003 21:00:00 +0100 Philipp Reisner <phil at linbit.com>
- drbd (0.6.4-1)
- Reworked build system (i.e. better Makefiles)
- SyncAll works forward instead of backwards. Improves performance on
  some storage controlers.
- Reworked /etc/init.d/drbd script (i.e. better support of
  different bash releases)

* Thu Mar 20 2003 20:23:40 +0100 Philipp Reisner <phil at linbit.com>
- drbd (0.6.3-1)
-  * Lockup of primary if secondary fails during resync. Fixed. (Stupid!)
-  * Probabely SMP only deadlock in the drop-conection code path.
-  * Improved connect code. (The old code could trap into a distributed
-    deadlock, resulting in an endless connect/disconnect loop.)
-  * The 'BitMap too small bug' was actually caused by a patch in
-    SuSE's distribution kernel. This patch makes DRBD 'more' compatible
-    with SuSE's kernel.
-  * Improved code to allocate buffers for the rsynchronisation process.
-    The old code allocated physical adjacent pages although the syncer
-    does not need them! The old code could fail under high memory pressure.

* Tue Feb 11 2003 15:58:49 +0100 Philipp Reisner <phil at linbit.com>
-  drbd (0.6.2-1)
-
-  * SMP fix in drbd_dio_end_sec()
-  * /etc/init.d/drbd knows about returncodes of fsck
-  * SUSE style rcdrbd
-  * Fixes for uninstall Target of the Makefiles.

* Thu Aug 15 2002 Omar Kilani <ok at mailcall.com.au>
- Do not chkconfig --del on an update.

* Wed Aug 14 2002 Omar Kilani <ok at mailcall.com.au>
- Initial revision (a very hacked up e1000.spec file)


More information about the drbd-user mailing list