Accepting request 240878 from home:wanglh:branches:network:ha-clustering:Factory

mkpkg drbd-utils to seperate from drbd kernel pkg

OBS-URL: https://build.opensuse.org/request/show/240878
OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd-utils?expand=0&rev=1
This commit is contained in:
Lars Marowsky-Bree 2014-07-14 15:04:17 +00:00 committed by Git OBS Bridge
commit e1a0450291
7 changed files with 1504 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.osc

View File

@ -0,0 +1,22 @@
Index: drbd-utils-8.9.0/scripts/block-drbd
===================================================================
--- drbd-utils-8.9.0.orig/scripts/block-drbd
+++ drbd-utils-8.9.0/scripts/block-drbd
@@ -250,7 +250,7 @@ case "$command" in
fi
case $t in
- drbd)
+ drbd|phy)
drbd_resource=$p
drbd_role="$(drbdadm role $drbd_resource)"
drbd_lrole="${drbd_role%%/*}"
@@ -278,7 +278,7 @@ case "$command" in
remove)
case $t in
- drbd)
+ drbd|phy)
p=$(xenstore_read "$XENBUS_PATH/params")
drbd_resource=$p
drbd_role="$(drbdadm role $drbd_resource)"

3
drbd-utils-8.9.0.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ce5a50844e48f542643e4f768665d4d4d966f64326dd2116b1bc1a444dd73a86
size 494705

1268
drbd-utils.changes Normal file

File diff suppressed because it is too large Load Diff

147
drbd-utils.spec Normal file
View File

@ -0,0 +1,147 @@
#
# spec file for package drbd
#
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# 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.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: drbd-utils
Version: 8.9.0
Release: 0
Summary: Distributed Replicated Block Device
License: GPL-2.0+
Group: Productivity/Clustering/HA
Url: http://www.drbd.org/
Source: %{name}-%{version}.tar.bz2
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch1: init-script-fixes.diff
Patch2: add_phy_to_block-drbd.diff
Provides: drbd-bash-completion = %{version}
Provides: drbd-pacemaker = %{version}
Provides: drbd-udev = %{version}
Provides: drbd-utils = %{version}
Obsoletes: drbd-bash-completion < %{version}
Obsoletes: drbd-pacemaker < %{version}
Obsoletes: drbd-udev < %{version}
Obsoletes: drbd-utils < %{version}
%ifarch %ix86 x86_64
Provides: drbd-xen = %{version}
Obsoletes: drbd-xen < %{version}
%endif
BuildRequires: bison
BuildRequires: flex
BuildRequires: udev
Provides: drbd-control
Provides: drbdsetup
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Requires: drbd
Requires(post): %insserv_prereq %fillup_prereq
Requires(preun): %insserv_prereq %fillup_prereq
Requires(postun): %insserv_prereq fileutils
%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
%setup -q
%patch1 -p1
%patch2 -p1
%build
PATH=/sbin:$PATH %configure \
--with-utils \
--with-udev \
--with-distro=suse \
--without-heartbeat \
--without-legacy_utils \
--with-pacemaker \
--with-xen \
--with-bashcompletion
make OPTFLAGS="%{optflags}" %{?_smp_mflags}
%install
%make_install
mkdir -p %{buildroot}%{_localstatedir}/lib/drbd
#
# and I only want to install a hint to the example conf
#
cat <<___ > %{buildroot}%{_sysconfdir}/drbd.conf
#
# please have a a look at the example configuration file in
# %{_docdir}/drbd/drbd.conf
#
___
#
%ifnarch %ix86 x86_64
rm -rf %{buildroot}%{_sysconfdir}/xen
%endif
mkdir -p %{buildroot}/usr/lib/udev/rules.d
mv %{buildroot}/etc/udev/rules.d/65-drbd.rules %{buildroot}/usr/lib/udev/rules.d
%post
%{fillup_and_insserv}
%preun
%{stop_on_removal}
%postun
%{insserv_cleanup}
%files -n drbd-utils
%defattr(-, root, root)
%config(noreplace) %{_sysconfdir}/drbd.conf
%config %{_sysconfdir}/bash_completion.d/drbdadm.sh
%config(noreplace) %{_sysconfdir}/drbd.d/global_common.conf
%doc %{_mandir}/man5/drbd.*
%doc %{_mandir}/man8/drbd*
%doc COPYING
%doc README
%doc ChangeLog
%doc scripts/drbd.conf
%dir %{_sysconfdir}/drbd.d
%{_sbindir}/drbdadm
%{_sbindir}/drbdsetup
%{_sbindir}/drbdmeta
%{_sbindir}/drbd-overview
%ifarch %ix86 x86_64
%dir %attr(700,root,root)
%dir %{_sysconfdir}/xen
%dir %{_sysconfdir}/xen/scripts
%{_sysconfdir}/xen/scripts/block-drbd
%endif
%{_prefix}/lib/ocf/resource.d/linbit/drbd
%dir /usr/lib/udev
%dir /usr/lib/udev/rules.d
/usr/lib/udev/rules.d/65-drbd.rules
%config %{_sysconfdir}/init.d/drbd
%defattr(-, root, root)
%{_localstatedir}/lib/drbd
%{_prefix}/lib/drbd
/lib/drbd
/lib/drbd/drbdadm*
/lib/drbd/drbdsetup*
%dir %{_prefix}/lib/ocf
%dir %{_prefix}/lib/ocf/resource.d
%dir %{_prefix}/lib/ocf/resource.d/linbit
%changelog

40
init-script-fixes.diff Normal file
View File

@ -0,0 +1,40 @@
Index: drbd-utils-8.9.0/scripts/drbd
===================================================================
--- drbd-utils-8.9.0.orig/scripts/drbd
+++ drbd-utils-8.9.0/scripts/drbd
@@ -9,14 +9,14 @@
#
### BEGIN INIT INFO
# Provides: drbd
-# Required-Start: $local_fs $network $syslog
-# Required-Stop: $local_fs $network $syslog
+# Required-Start: $remote_fs $network $syslog
+# Required-Stop: $remote_fs $network $syslog
# Should-Start: sshd multipathd
# Should-Stop: sshd multipathd
-# Default-Start: 2 3 4 5
+# Default-Start: 2 3 5
# Default-Stop: 0 1 6
-# X-Start-Before: heartbeat corosync
-# X-Stop-After: heartbeat corosync
+# X-Start-Before: pacemaker corosync
+# X-Stop-After: pacemaker corosync
# X-Interactive: true
# Short-Description: Control drbd resources.
### END INIT INFO
@@ -161,7 +161,6 @@ case "$1" in
done
done
- [ -d /var/lock/subsys ] && touch /var/lock/subsys/drbd # for RedHat
$DRBDADM wait-con-int # User interruptible version of wait-connect all
log_end_msg 0
@@ -193,7 +192,6 @@ case "$1" in
$RMMOD drbd && break
fi
done
- [ -f /var/lock/subsys/drbd ] && rm /var/lock/subsys/drbd
log_end_msg 0
;;
status)