Sisyphus repositório
Última atualização: 1 outubro 2023 | SRPMs: 18631 | Visitas: 37734804
en ru br
ALT Linux repositórios
5.0: 0.7.22-alt2
4.1: 0.7.22-alt2
4.0: 0.7.22-alt2

Group :: Sistema/Kernel e hardware
RPM: drbd-tools

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs e FR  Repocop 

%define rname drbd

Name: drbd-tools
Summary: Distributed Redundant Block Device utilities
Version: 0.7.22
Release: alt2
Source0: %rname-%version.tar
Source1: %rname.init.alt
License: GPL
Group: System/Kernel and hardware
Url: http://www.drbd.org/

Patch: %rname-0.7.22-alt-kver.patch

# Automatically added by buildreq on Sat Oct 29 2005

BuildRequires: docbook-utils flex

# for kernelversion_minor

Requires: modutils, %_ha_resource_dir

Packager: L.A. Kostis <lakostis at altlinux.org>

%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.

This package contains the programs that will control the drbd kernel module
provided in kernel-source-drbd. You will need a clustering service (such as
heartbeat) to fully implement it.

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

%package -n kernel-source-%rname-%version
Summary: Kernel source for DRBD
Group: Development/Kernel

BuildRequires(pre): kernel-build-tools, rpm-build-linux-ha

%description -n kernel-source-%rname-%version
This is the source of the kernel-dependant driver for DRBD.

%prep
%setup -q -n %rname-%version
%patch -p1
%__cp -a drbd kernel-source-drbd-%version
%__tar -cj -f kernel-source-drbd-%version.tar.bz2 \
kernel-source-drbd-%version


%build
for dir in user scripts benchmark documentation; do
%__make CFLAGS="%optflags -I../drbd" PREFIX=%buildroot/ MANDIR=%_mandir -C "$dir"
done
# remake doc
%__make PREFIX=%buildroot/ MANDIR=%_mandir doc

%install
%__mkdir_p %kernel_srcdir
%__install -p -m644 kernel-source-%rname-%version.tar.bz2 %kernel_srcdir/

for dir in user scripts benchmark documentation; do
%__make PREFIX=%buildroot/ MANDIR=%_mandir -C "$dir" install
done
%__install -pD -m755 %SOURCE1 %buildroot%_initdir/drbd

# and I only want to install a hint to the example conf

#
cat <<EOF > %buildroot%_sysconfdir/drbd.conf
#
# please have a a look at the example configuration file in
# %%_docdir/%name/drbd.conf
#
EOF

%__mkdir_p %buildroot%_sysconfdir/default
cat <<EOF > %buildroot%_sysconfdir/default/%rname
DEFAULTFILE="%_sysconfdir/default/drbd"
DRBDADM="/sbin/drbdadm"
PROC_DRBD="/proc/drbd"
MODPROBE="/sbin/modprobe"
RMMOD="/sbin/rmmod"
UDEV_TIMEOUT=10
ADD_MOD_PARAM=""
EOF

%files
/sbin/drbdsetup
/sbin/drbdadm
%config(noreplace) %_ha_resource_dir/*
%_initdir/%rname
%config(noreplace) %_sysconfdir/drbd.conf
%_sysconfdir/default/%rname
%_man8dir/*
%_man5dir/*
%doc scripts/drbd.conf
%doc COPYING
%doc README
%doc ChangeLog
%doc upgrade_*

%files -n kernel-source-%rname-%version
%_usrsrc/*

%post
%post_service %rname

# useless for udev

if [ `kernelversion_minor` -lt 5 ]; then
  for i in `seq 0 15` ; do
      test -b /dev/drbd$i || mknod -m 0660 /dev/drbd$i b 147 $i;
  done
fi

%preun
%preun_service %rname

%changelog

Todas as alterações você pod ver aqui

 
projeto & código: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
mantenedor atual: Michael Shigorin
mantenedor da tradução: Fernando Martini aka fmartini © 2009