From d84e43448d9ca67dc89845f5319747b36a05535ed0531563c32e785143b3ddc6 Mon Sep 17 00:00:00 2001 From: Goldwyn Rodrigues Date: Fri, 20 Feb 2015 18:23:31 +0000 Subject: [PATCH 1/3] Accepting request 287043 from home:goldwynr:branches:network:ha-clustering:Factory Upgrage to 8.9.2rc2 for v9 support OBS-URL: https://build.opensuse.org/request/show/287043 OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd-utils?expand=0&rev=7 --- _service | 18 ++ ...cm:drbd-utils-8.9.2rc2+git.faeb645.tar.bz2 | 3 + _service:set_version:drbd-utils.spec | 160 ++++++++++++++++++ disable-sh-b-pri.patch | 13 ++ drbd-utils-8.9.1.tar.bz2 | 3 - drbd-utils-8.9.2rc2+git.faeb645.tar.bz2 | 3 + drbd-utils.changes | 5 + drbd-utils.spec | 62 ++++--- drbd_buildtag.c | 7 + fix-libdir-in-Makefile.patch | 52 ++++++ init-script-fixes.diff | 10 +- 11 files changed, 302 insertions(+), 34 deletions(-) create mode 100644 _service create mode 100644 _service:recompress:tar_scm:drbd-utils-8.9.2rc2+git.faeb645.tar.bz2 create mode 100644 _service:set_version:drbd-utils.spec create mode 100644 disable-sh-b-pri.patch delete mode 100644 drbd-utils-8.9.1.tar.bz2 create mode 100644 drbd-utils-8.9.2rc2+git.faeb645.tar.bz2 create mode 100644 drbd_buildtag.c create mode 100644 fix-libdir-in-Makefile.patch diff --git a/_service b/_service new file mode 100644 index 0000000..87a5303 --- /dev/null +++ b/_service @@ -0,0 +1,18 @@ + + + git://git.linbit.com/drbd-utils.git + git + drbd-utils + 8.9.2-rc2+git.%h + master + + + + *drbd-utils*.tar + bz2 + + + + drbd-utils + + diff --git a/_service:recompress:tar_scm:drbd-utils-8.9.2rc2+git.faeb645.tar.bz2 b/_service:recompress:tar_scm:drbd-utils-8.9.2rc2+git.faeb645.tar.bz2 new file mode 100644 index 0000000..fea8bbf --- /dev/null +++ b/_service:recompress:tar_scm:drbd-utils-8.9.2rc2+git.faeb645.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ed409fe5500e478a9cf1cc600016403272ddabfd1ca3261f68d53c8cc3688f1e +size 433215 diff --git a/_service:set_version:drbd-utils.spec b/_service:set_version:drbd-utils.spec new file mode 100644 index 0000000..ae16231 --- /dev/null +++ b/_service:set_version:drbd-utils.spec @@ -0,0 +1,160 @@ +# +# 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.2rc2+git.faeb645 +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 +Source1: drbd_buildtag.c + +# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines +Patch1: init-script-fixes.diff +Patch2: fix-libdir-in-Makefile.patch +Patch3: disable-sh-b-pri.patch + +Provides: drbd-bash-completion = %{version} +Provides: drbd-pacemaker = %{version} +Provides: drbd-udev = %{version} +Obsoletes: drbd-bash-completion < %{version} +Obsoletes: drbd-pacemaker < %{version} +Obsoletes: drbd-udev < %{version} +# drbd-utils first splict from drbd-8.4.5(only driver) +# and suse let drbd driver goes in-kernel +Provides: drbd = 8.4.5 +Obsoletes: drbd < 8.4.5 + +%ifarch %ix86 x86_64 +Provides: drbd-xen = %{version} +Obsoletes: drbd-xen < %{version} +%endif +BuildRequires: gcc +BuildRequires: make +BuildRequires: glibc-devel +BuildRequires: bison +BuildRequires: flex +BuildRequires: libxslt +BuildRequires: udev +BuildRequires: docbook-xsl-stylesheets +BuildRequires: automake +BuildRequires: autoconf +BuildRequires: systemd +Provides: drbd-control +Provides: drbdsetup +BuildRoot: %{_tmppath}/%{name}-%{version}-build +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 +%patch3 -p1 +cp $RPM_SOURCE_DIR/drbd_buildtag.c user/shared/ + +%build +./autogen.sh +PATH=/sbin:$PATH ./configure \ + --with-udev \ + --with-distro=suse \ + --without-heartbeat \ + --with-pacemaker \ + --with-xen \ + --with-bashcompletion \ + --with-initscripttype=systemd \ + --with-systemdunitdir=/usr/lib/systemd/system \ + --prefix=/ \ + --sbindir=/sbin \ + --libdir=/usr/lib \ + --mandir=%{_mandir} \ + --sysconfdir=%{_sysconfdir} \ + --datarootdir=/usr/share \ + --datadir=/usr/share \ + --libdir=/usr/lib \ + --exec_prefix=/usr/lib + +make OPTFLAGS="%{optflags}" %{?_smp_mflags} + + +%install +%make_install + +mkdir -p %{buildroot}%{_localstatedir}/lib/drbd +%ifnarch %ix86 x86_64 +rm -rf %{buildroot}%{_sysconfdir}/xen +%endif + +mkdir -p %{buildroot}/usr/lib/udev/rules.d +mv %{buildroot}/lib/udev/rules.d/65-drbd.rules* %{buildroot}/usr/lib/udev/rules.d/65-drbd.rules + +%post +%service_add_post drbd.service + +%preun +%service_del_preun drbd.service + +%postun +%service_del_postun drbd.service + +%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 +/sbin/drbdadm +/sbin/drbdsetup +/sbin/drbdmeta +/sbin/drbd-overview +%ifarch %ix86 x86_64 +%dir %attr(700,root,root) %{_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 +%{_unitdir}/drbd.service +/usr/lib/systemd/system/drbd.service +%defattr(-, root, root) +%{_localstatedir}/lib/drbd +/usr/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 diff --git a/disable-sh-b-pri.patch b/disable-sh-b-pri.patch new file mode 100644 index 0000000..8bd3f64 --- /dev/null +++ b/disable-sh-b-pri.patch @@ -0,0 +1,13 @@ +Index: drbd-utils-8.9.2rc2+git.faeb645/scripts/drbd.service +=================================================================== +--- drbd-utils-8.9.2rc2+git.faeb645.orig/scripts/drbd.service ++++ drbd-utils-8.9.2rc2+git.faeb645/scripts/drbd.service +@@ -21,7 +21,7 @@ ExecStart=/sbin/drbdadm wait-connect all + + # Switch resources to primary if applicable + # Better: disable this service unit, and use a cluster manger (pacemaker) +-ExecStart=/sbin/drbdadm sh-b-pri all ++# ExecStart=/sbin/drbdadm sh-b-pri all + + # Deactivate all resources on stop + ExecStop=/sbin/drbdadm down all diff --git a/drbd-utils-8.9.1.tar.bz2 b/drbd-utils-8.9.1.tar.bz2 deleted file mode 100644 index 0493fa4..0000000 --- a/drbd-utils-8.9.1.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c57a98e01f109e12fc2f758816591522263c7001232054b873fea1e04414d51e -size 488669 diff --git a/drbd-utils-8.9.2rc2+git.faeb645.tar.bz2 b/drbd-utils-8.9.2rc2+git.faeb645.tar.bz2 new file mode 100644 index 0000000..34313de --- /dev/null +++ b/drbd-utils-8.9.2rc2+git.faeb645.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f89e71344ffa5ce47ee09a7be7c38e28d173429eace3564065ec0f3456fba0c3 +size 414613 diff --git a/drbd-utils.changes b/drbd-utils.changes index 5c5e3be..12c041e 100644 --- a/drbd-utils.changes +++ b/drbd-utils.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Feb 18 09:16:33 UTC 2015 - rgoldwyn@suse.com + +- Upgrade to v8.9.2rc2 with _service file for latest git + ------------------------------------------------------------------- Wed Dec 17 09:16:21 UTC 2014 - lwang@suse.com diff --git a/drbd-utils.spec b/drbd-utils.spec index b3eccbb..ae16231 100644 --- a/drbd-utils.spec +++ b/drbd-utils.spec @@ -16,16 +16,19 @@ # Name: drbd-utils -Version: 8.9.1 +Version: 8.9.2rc2+git.faeb645 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 +Source1: drbd_buildtag.c # PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines Patch1: init-script-fixes.diff +Patch2: fix-libdir-in-Makefile.patch +Patch3: disable-sh-b-pri.patch Provides: drbd-bash-completion = %{version} Provides: drbd-pacemaker = %{version} @@ -50,6 +53,9 @@ BuildRequires: flex BuildRequires: libxslt BuildRequires: udev BuildRequires: docbook-xsl-stylesheets +BuildRequires: automake +BuildRequires: autoconf +BuildRequires: systemd Provides: drbd-control Provides: drbdsetup BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -65,17 +71,30 @@ raid 1. It is a building block for setting up clusters. %prep %setup -q %patch1 -p1 +%patch2 -p1 +%patch3 -p1 +cp $RPM_SOURCE_DIR/drbd_buildtag.c user/shared/ %build -PATH=/sbin:$PATH %configure \ - --with-utils \ +./autogen.sh +PATH=/sbin:$PATH ./configure \ --with-udev \ --with-distro=suse \ --without-heartbeat \ - --without-legacy_utils \ --with-pacemaker \ --with-xen \ - --with-bashcompletion + --with-bashcompletion \ + --with-initscripttype=systemd \ + --with-systemdunitdir=/usr/lib/systemd/system \ + --prefix=/ \ + --sbindir=/sbin \ + --libdir=/usr/lib \ + --mandir=%{_mandir} \ + --sysconfdir=%{_sysconfdir} \ + --datarootdir=/usr/share \ + --datadir=/usr/share \ + --libdir=/usr/lib \ + --exec_prefix=/usr/lib make OPTFLAGS="%{optflags}" %{?_smp_mflags} @@ -84,31 +103,21 @@ make OPTFLAGS="%{optflags}" %{?_smp_mflags} %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}/lib/udev/65-drbd.rules* %{buildroot}/usr/lib/udev/rules.d/65-drbd.rules +mv %{buildroot}/lib/udev/rules.d/65-drbd.rules* %{buildroot}/usr/lib/udev/rules.d/65-drbd.rules %post -%{fillup_and_insserv} +%service_add_post drbd.service %preun -%{stop_on_removal} +%service_del_preun drbd.service %postun -%{insserv_cleanup} +%service_del_postun drbd.service %files -n drbd-utils %defattr(-, root, root) @@ -122,10 +131,10 @@ mv %{buildroot}/lib/udev/65-drbd.rules* %{buildroot}/usr/lib/udev/rules.d/65-drb %doc ChangeLog %doc scripts/drbd.conf %dir %{_sysconfdir}/drbd.d -%{_sbindir}/drbdadm -%{_sbindir}/drbdsetup -%{_sbindir}/drbdmeta -%{_sbindir}/drbd-overview +/sbin/drbdadm +/sbin/drbdsetup +/sbin/drbdmeta +/sbin/drbd-overview %ifarch %ix86 x86_64 %dir %attr(700,root,root) %{_sysconfdir}/xen %dir %{_sysconfdir}/xen/scripts @@ -134,11 +143,12 @@ mv %{buildroot}/lib/udev/65-drbd.rules* %{buildroot}/usr/lib/udev/rules.d/65-drb %{_prefix}/lib/ocf/resource.d/linbit/drbd %dir /usr/lib/udev %dir /usr/lib/udev/rules.d -%config /usr/lib/udev/rules.d/65-drbd.rules -%config %{_sysconfdir}/init.d/drbd +/usr/lib/udev/rules.d/65-drbd.rules +%{_unitdir}/drbd.service +/usr/lib/systemd/system/drbd.service %defattr(-, root, root) %{_localstatedir}/lib/drbd -%{_prefix}/lib/drbd +/usr/lib/drbd /lib/drbd /lib/drbd/drbdadm* /lib/drbd/drbdsetup* diff --git a/drbd_buildtag.c b/drbd_buildtag.c new file mode 100644 index 0000000..3834abe --- /dev/null +++ b/drbd_buildtag.c @@ -0,0 +1,7 @@ +/* automatically generated. DO NOT EDIT. */ +#include +const char *drbd_buildtag(void) +{ + return "GIT-hash: faeb645ecbf334347e0512b4fa2d7549543b5b50" + " build by goldwyn@shrek.lan, 2015-02-18 01:51:25"; +} diff --git a/fix-libdir-in-Makefile.patch b/fix-libdir-in-Makefile.patch new file mode 100644 index 0000000..df917ac --- /dev/null +++ b/fix-libdir-in-Makefile.patch @@ -0,0 +1,52 @@ +Index: drbd-utils-8.9.2rc2+git.faeb645/scripts/Makefile.in +=================================================================== +--- drbd-utils-8.9.2rc2+git.faeb645.orig/scripts/Makefile.in ++++ drbd-utils-8.9.2rc2+git.faeb645/scripts/Makefile.in +@@ -37,7 +37,7 @@ initscripttype = @initscripttype@ + BASH_COMPLETION_SUFFIX = @BASH_COMPLETION_SUFFIX@ + UDEV_RULE_SUFFIX = @UDEV_RULE_SUFFIX@ + INITDIR = @INITDIR@ +-LIBDIR = @prefix@/lib/@PACKAGE_TARNAME@ ++LIBDIR = @libdir@/@PACKAGE_TARNAME@ + LN_S = @LN_S@ + + # features enabled or disabled by configure +Index: drbd-utils-8.9.2rc2+git.faeb645/user/v9/Makefile.in +=================================================================== +--- drbd-utils-8.9.2rc2+git.faeb645.orig/user/v9/Makefile.in ++++ drbd-utils-8.9.2rc2+git.faeb645/user/v9/Makefile.in +@@ -31,7 +31,7 @@ sysconfdir = @sysconfdir@ + BASH_COMPLETION_SUFFIX = @BASH_COMPLETION_SUFFIX@ + UDEV_RULE_SUFFIX = @UDEV_RULE_SUFFIX@ + INITDIR = @INITDIR@ +-LIBDIR = @prefix@/lib/@PACKAGE_TARNAME@ ++LIBDIR = @libdir@/@PACKAGE_TARNAME@ + CC = @CC@ + CFLAGS = @CFLAGS@ + LDFLAGS = @LDFLAGS@ +Index: drbd-utils-8.9.2rc2+git.faeb645/user/v83/Makefile.in +=================================================================== +--- drbd-utils-8.9.2rc2+git.faeb645.orig/user/v83/Makefile.in ++++ drbd-utils-8.9.2rc2+git.faeb645/user/v83/Makefile.in +@@ -31,7 +31,7 @@ sysconfdir = @sysconfdir@ + BASH_COMPLETION_SUFFIX = @BASH_COMPLETION_SUFFIX@ + UDEV_RULE_SUFFIX = @UDEV_RULE_SUFFIX@ + INITDIR = @INITDIR@ +-LIBDIR = @prefix@/lib/@PACKAGE_TARNAME@ ++LIBDIR = @libdir@/@PACKAGE_TARNAME@ + CC = @CC@ + CFLAGS = @CFLAGS@ + LDFLAGS = @LDFLAGS@ +Index: drbd-utils-8.9.2rc2+git.faeb645/user/v84/Makefile.in +=================================================================== +--- drbd-utils-8.9.2rc2+git.faeb645.orig/user/v84/Makefile.in ++++ drbd-utils-8.9.2rc2+git.faeb645/user/v84/Makefile.in +@@ -31,7 +31,7 @@ sysconfdir = @sysconfdir@ + BASH_COMPLETION_SUFFIX = @BASH_COMPLETION_SUFFIX@ + UDEV_RULE_SUFFIX = @UDEV_RULE_SUFFIX@ + INITDIR = @INITDIR@ +-LIBDIR = @prefix@/lib/@PACKAGE_TARNAME@ ++LIBDIR = @libdir@/@PACKAGE_TARNAME@ + CC = @CC@ + CFLAGS = @CFLAGS@ + LDFLAGS = @LDFLAGS@ diff --git a/init-script-fixes.diff b/init-script-fixes.diff index 8257989..21d2bdb 100644 --- a/init-script-fixes.diff +++ b/init-script-fixes.diff @@ -1,7 +1,7 @@ -Index: drbd-utils-8.9.1/scripts/drbd +Index: drbd-utils-8.9.2rc2+git.faeb645/scripts/drbd =================================================================== ---- drbd-utils-8.9.1.orig/scripts/drbd -+++ drbd-utils-8.9.1/scripts/drbd +--- drbd-utils-8.9.2rc2+git.faeb645.orig/scripts/drbd ++++ drbd-utils-8.9.2rc2+git.faeb645/scripts/drbd @@ -9,14 +9,14 @@ # ### BEGIN INIT INFO @@ -22,7 +22,7 @@ Index: drbd-utils-8.9.1/scripts/drbd # X-Interactive: true # Short-Description: Control drbd resources. ### END INIT INFO -@@ -170,7 +170,6 @@ case "$1" in +@@ -173,7 +173,6 @@ case "$1" in done done @@ -30,7 +30,7 @@ Index: drbd-utils-8.9.1/scripts/drbd run_hook start_before-wait $DRBDADM wait-con-int # User interruptible version of wait-connect all run_hook start -@@ -209,7 +208,6 @@ case "$1" in +@@ -226,7 +225,6 @@ case "$1" in fi done run_hook stop From ec5e7407e02047887ec2a29fd9c0050a8268d68b1c701ab96857733f215fe0a7 Mon Sep 17 00:00:00 2001 From: nick wang Date: Thu, 23 Jul 2015 09:07:53 +0000 Subject: [PATCH 2/3] Accepting request 318022 from home:wanghaisu:branches:network:ha-clustering:Factory drbd split into user space drbd-utils and kernel module package. Update drbd-utils to 8.9.2 for - Fate#317940, speed up first initial sync. OBS-URL: https://build.opensuse.org/request/show/318022 OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd-utils?expand=0&rev=8 --- _service | 18 -- ...cm:drbd-utils-8.9.2rc2+git.faeb645.tar.bz2 | 3 - _service:set_version:drbd-utils.spec | 160 ------------------ disable-sh-b-pri.patch | 13 -- drbd-utils-8.9.2.tar.gz | 3 + drbd-utils-8.9.2rc2+git.faeb645.tar.bz2 | 3 - drbd-utils.changes | 40 +++++ drbd-utils.spec | 52 +++--- drbd_buildtag.c | 7 - zap-devices-xml.patch | 19 +++ zap-devices.patch | 24 +++ 11 files changed, 114 insertions(+), 228 deletions(-) delete mode 100644 _service delete mode 100644 _service:recompress:tar_scm:drbd-utils-8.9.2rc2+git.faeb645.tar.bz2 delete mode 100644 _service:set_version:drbd-utils.spec delete mode 100644 disable-sh-b-pri.patch create mode 100644 drbd-utils-8.9.2.tar.gz delete mode 100644 drbd-utils-8.9.2rc2+git.faeb645.tar.bz2 delete mode 100644 drbd_buildtag.c create mode 100644 zap-devices-xml.patch create mode 100644 zap-devices.patch diff --git a/_service b/_service deleted file mode 100644 index 87a5303..0000000 --- a/_service +++ /dev/null @@ -1,18 +0,0 @@ - - - git://git.linbit.com/drbd-utils.git - git - drbd-utils - 8.9.2-rc2+git.%h - master - - - - *drbd-utils*.tar - bz2 - - - - drbd-utils - - diff --git a/_service:recompress:tar_scm:drbd-utils-8.9.2rc2+git.faeb645.tar.bz2 b/_service:recompress:tar_scm:drbd-utils-8.9.2rc2+git.faeb645.tar.bz2 deleted file mode 100644 index fea8bbf..0000000 --- a/_service:recompress:tar_scm:drbd-utils-8.9.2rc2+git.faeb645.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ed409fe5500e478a9cf1cc600016403272ddabfd1ca3261f68d53c8cc3688f1e -size 433215 diff --git a/_service:set_version:drbd-utils.spec b/_service:set_version:drbd-utils.spec deleted file mode 100644 index ae16231..0000000 --- a/_service:set_version:drbd-utils.spec +++ /dev/null @@ -1,160 +0,0 @@ -# -# 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.2rc2+git.faeb645 -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 -Source1: drbd_buildtag.c - -# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines -Patch1: init-script-fixes.diff -Patch2: fix-libdir-in-Makefile.patch -Patch3: disable-sh-b-pri.patch - -Provides: drbd-bash-completion = %{version} -Provides: drbd-pacemaker = %{version} -Provides: drbd-udev = %{version} -Obsoletes: drbd-bash-completion < %{version} -Obsoletes: drbd-pacemaker < %{version} -Obsoletes: drbd-udev < %{version} -# drbd-utils first splict from drbd-8.4.5(only driver) -# and suse let drbd driver goes in-kernel -Provides: drbd = 8.4.5 -Obsoletes: drbd < 8.4.5 - -%ifarch %ix86 x86_64 -Provides: drbd-xen = %{version} -Obsoletes: drbd-xen < %{version} -%endif -BuildRequires: gcc -BuildRequires: make -BuildRequires: glibc-devel -BuildRequires: bison -BuildRequires: flex -BuildRequires: libxslt -BuildRequires: udev -BuildRequires: docbook-xsl-stylesheets -BuildRequires: automake -BuildRequires: autoconf -BuildRequires: systemd -Provides: drbd-control -Provides: drbdsetup -BuildRoot: %{_tmppath}/%{name}-%{version}-build -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 -%patch3 -p1 -cp $RPM_SOURCE_DIR/drbd_buildtag.c user/shared/ - -%build -./autogen.sh -PATH=/sbin:$PATH ./configure \ - --with-udev \ - --with-distro=suse \ - --without-heartbeat \ - --with-pacemaker \ - --with-xen \ - --with-bashcompletion \ - --with-initscripttype=systemd \ - --with-systemdunitdir=/usr/lib/systemd/system \ - --prefix=/ \ - --sbindir=/sbin \ - --libdir=/usr/lib \ - --mandir=%{_mandir} \ - --sysconfdir=%{_sysconfdir} \ - --datarootdir=/usr/share \ - --datadir=/usr/share \ - --libdir=/usr/lib \ - --exec_prefix=/usr/lib - -make OPTFLAGS="%{optflags}" %{?_smp_mflags} - - -%install -%make_install - -mkdir -p %{buildroot}%{_localstatedir}/lib/drbd -%ifnarch %ix86 x86_64 -rm -rf %{buildroot}%{_sysconfdir}/xen -%endif - -mkdir -p %{buildroot}/usr/lib/udev/rules.d -mv %{buildroot}/lib/udev/rules.d/65-drbd.rules* %{buildroot}/usr/lib/udev/rules.d/65-drbd.rules - -%post -%service_add_post drbd.service - -%preun -%service_del_preun drbd.service - -%postun -%service_del_postun drbd.service - -%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 -/sbin/drbdadm -/sbin/drbdsetup -/sbin/drbdmeta -/sbin/drbd-overview -%ifarch %ix86 x86_64 -%dir %attr(700,root,root) %{_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 -%{_unitdir}/drbd.service -/usr/lib/systemd/system/drbd.service -%defattr(-, root, root) -%{_localstatedir}/lib/drbd -/usr/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 diff --git a/disable-sh-b-pri.patch b/disable-sh-b-pri.patch deleted file mode 100644 index 8bd3f64..0000000 --- a/disable-sh-b-pri.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: drbd-utils-8.9.2rc2+git.faeb645/scripts/drbd.service -=================================================================== ---- drbd-utils-8.9.2rc2+git.faeb645.orig/scripts/drbd.service -+++ drbd-utils-8.9.2rc2+git.faeb645/scripts/drbd.service -@@ -21,7 +21,7 @@ ExecStart=/sbin/drbdadm wait-connect all - - # Switch resources to primary if applicable - # Better: disable this service unit, and use a cluster manger (pacemaker) --ExecStart=/sbin/drbdadm sh-b-pri all -+# ExecStart=/sbin/drbdadm sh-b-pri all - - # Deactivate all resources on stop - ExecStop=/sbin/drbdadm down all diff --git a/drbd-utils-8.9.2.tar.gz b/drbd-utils-8.9.2.tar.gz new file mode 100644 index 0000000..8a8bf65 --- /dev/null +++ b/drbd-utils-8.9.2.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ebbeed5f31cc27a7e10da889f60ff25ec67a3e4a2becf70ed06734e2678d38b2 +size 761370 diff --git a/drbd-utils-8.9.2rc2+git.faeb645.tar.bz2 b/drbd-utils-8.9.2rc2+git.faeb645.tar.bz2 deleted file mode 100644 index 34313de..0000000 --- a/drbd-utils-8.9.2rc2+git.faeb645.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f89e71344ffa5ce47ee09a7be7c38e28d173429eace3564065ec0f3456fba0c3 -size 414613 diff --git a/drbd-utils.changes b/drbd-utils.changes index 12c041e..23c90b8 100644 --- a/drbd-utils.changes +++ b/drbd-utils.changes @@ -1,3 +1,43 @@ +------------------------------------------------------------------- +Thu Jul 23 02:28:37 UTC 2015 - nwang@suse.com + +- Add Patch zap-devices-xml.patch for user space entrance + to zap-devices of new-current-uuid. + +------------------------------------------------------------------- +Fri Apr 17 06:59:04 UTC 2015 - nwang@suse.com + +- Upgrade to released v8.9.2 for Fate#317940 + * change systemd unit file: basically just call the init script + * make some previously hardcoded timeouts configurable + * drbdadm: New command peer-device-options + * drbd 9: Move max_buffers to net_conf + * drbd 9: Log errors to syslog if stderr is not available + * init script: fixes for stacked resources + * fix regression corner cases in bitmap size calculation + * allow create-md to initialize peer-max-bio-size to 1M + * drbd 9: make transport selectable + * fix aggregating drbdsetup / drbdmeta exit statii + * some documentation fixes (content and build) + * added direct-connect command + * incompatible drbd-9 metadata format change. use: node_id as index for + peer_md instead of the bitmap_index + * drbdadm/meta/usage_cnt: ensure output is visible + * drbdsetup: fix arguments for all commands expecting a peer_device + * exit codes: redefine E_USAGE to 1 (not 3) + * some build changes + * init script: on start, first try to load the module + * drbdsetup events2: Improve how timestamps are assigned + * udev rules (symlinks in /dev/by-res and by-disk) got fixed + * Fixed upper limit for drbd-8.4 activity log entries + * many fixes to drbdadm adjust and proxy commands for drbd-9 + * rhcs_fence: Do not invoke fence agents in parallel, rewrite in bash + * drbdsetup events2 is now also available in drbd-8.4 (backported from + drbd-9) + * reorganized the repository have common code for drbd-9, drbd-8.4 + and drbd-8.3 only once + * Fix drbd.ocf for resources without volume 0 + ------------------------------------------------------------------- Wed Feb 18 09:16:33 UTC 2015 - rgoldwyn@suse.com diff --git a/drbd-utils.spec b/drbd-utils.spec index ae16231..d6f5400 100644 --- a/drbd-utils.spec +++ b/drbd-utils.spec @@ -1,7 +1,7 @@ # -# spec file for package drbd +# spec file for package drbd-utils # -# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2015 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 @@ -15,20 +15,21 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # + Name: drbd-utils -Version: 8.9.2rc2+git.faeb645 +Version: 8.9.2 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 -Source1: drbd_buildtag.c +Source: http://oss.linbit.com/drbd/%{name}-%{version}.tar.gz # PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines Patch1: init-script-fixes.diff -Patch2: fix-libdir-in-Makefile.patch -Patch3: disable-sh-b-pri.patch +Patch2: fix-libdir-in-Makefile.patch +Patch3: zap-devices.patch +Patch4: zap-devices-xml.patch Provides: drbd-bash-completion = %{version} Provides: drbd-pacemaker = %{version} @@ -38,24 +39,24 @@ Obsoletes: drbd-pacemaker < %{version} Obsoletes: drbd-udev < %{version} # drbd-utils first splict from drbd-8.4.5(only driver) # and suse let drbd driver goes in-kernel -Provides: drbd = 8.4.5 -Obsoletes: drbd < 8.4.5 +# Provides: drbd = 8.4.5 +# Obsoletes: drbd < 8.4.5 %ifarch %ix86 x86_64 Provides: drbd-xen = %{version} Obsoletes: drbd-xen < %{version} %endif -BuildRequires: gcc -BuildRequires: make -BuildRequires: glibc-devel -BuildRequires: bison -BuildRequires: flex -BuildRequires: libxslt -BuildRequires: udev +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: bison BuildRequires: docbook-xsl-stylesheets -BuildRequires: automake -BuildRequires: autoconf -BuildRequires: systemd +BuildRequires: flex +BuildRequires: gcc +BuildRequires: glibc-devel +BuildRequires: libxslt +BuildRequires: make +BuildRequires: systemd +BuildRequires: udev Provides: drbd-control Provides: drbdsetup BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -73,7 +74,7 @@ raid 1. It is a building block for setting up clusters. %patch1 -p1 %patch2 -p1 %patch3 -p1 -cp $RPM_SOURCE_DIR/drbd_buildtag.c user/shared/ +%patch4 -p1 %build ./autogen.sh @@ -94,11 +95,11 @@ PATH=/sbin:$PATH ./configure \ --datarootdir=/usr/share \ --datadir=/usr/share \ --libdir=/usr/lib \ - --exec_prefix=/usr/lib + --exec_prefix=/usr/lib \ + --with-tmpfilesdir=%{_tmpfilesdir} make OPTFLAGS="%{optflags}" %{?_smp_mflags} - %install %make_install @@ -110,6 +111,9 @@ rm -rf %{buildroot}%{_sysconfdir}/xen mkdir -p %{buildroot}/usr/lib/udev/rules.d mv %{buildroot}/lib/udev/rules.d/65-drbd.rules* %{buildroot}/usr/lib/udev/rules.d/65-drbd.rules +%pre +%service_add_pre drbd.service + %post %service_add_post drbd.service @@ -124,12 +128,13 @@ mv %{buildroot}/lib/udev/rules.d/65-drbd.rules* %{buildroot}/usr/lib/udev/rules. %config(noreplace) %{_sysconfdir}/drbd.conf %config %{_sysconfdir}/bash_completion.d/drbdadm.sh %config(noreplace) %{_sysconfdir}/drbd.d/global_common.conf +%{_tmpfilesdir}/drbd.conf %doc %{_mandir}/man5/drbd.* %doc %{_mandir}/man8/drbd* %doc COPYING %doc README %doc ChangeLog -%doc scripts/drbd.conf +%doc scripts/drbd.conf.example %dir %{_sysconfdir}/drbd.d /sbin/drbdadm /sbin/drbdsetup @@ -156,5 +161,4 @@ mv %{buildroot}/lib/udev/rules.d/65-drbd.rules* %{buildroot}/usr/lib/udev/rules. %dir %{_prefix}/lib/ocf/resource.d %dir %{_prefix}/lib/ocf/resource.d/linbit - %changelog diff --git a/drbd_buildtag.c b/drbd_buildtag.c deleted file mode 100644 index 3834abe..0000000 --- a/drbd_buildtag.c +++ /dev/null @@ -1,7 +0,0 @@ -/* automatically generated. DO NOT EDIT. */ -#include -const char *drbd_buildtag(void) -{ - return "GIT-hash: faeb645ecbf334347e0512b4fa2d7549543b5b50" - " build by goldwyn@shrek.lan, 2015-02-18 01:51:25"; -} diff --git a/zap-devices-xml.patch b/zap-devices-xml.patch new file mode 100644 index 0000000..b8c89bc --- /dev/null +++ b/zap-devices-xml.patch @@ -0,0 +1,19 @@ +diff -Naur drbd-utils-8.9.2.orig/documentation/v84/drbdsetup.xml drbd-utils-8.9.2/documentation/v84/drbdsetup.xml +--- drbd-utils-8.9.2.orig/documentation/v84/drbdsetup.xml 2015-07-20 16:06:52.950294231 +0800 ++++ drbd-utils-8.9.2/documentation/v84/drbdsetup.xml 2015-07-20 17:56:21.106826315 +0800 +@@ -1694,6 +1694,15 @@ + Clears the sync bitmap in addition to generating a new current UUID. + + ++ ++ ++ ++ ++ ++ Start to zeroing out the device on both side in addition to generating ++ a new current UUID . ++ ++ + + + This can be used to skip the initial sync, if you want to start from scratch. This diff --git a/zap-devices.patch b/zap-devices.patch new file mode 100644 index 0000000..145d105 --- /dev/null +++ b/zap-devices.patch @@ -0,0 +1,24 @@ +Index: drbd-utils-8.9.2/user/v84/config_flags.c +=================================================================== +--- drbd-utils-8.9.2.orig/user/v84/config_flags.c ++++ drbd-utils-8.9.2/user/v84/config_flags.c +@@ -1019,6 +1019,7 @@ struct context_def new_current_uuid_cmd_ + NLA_POLICY(new_c_uuid_parms), + .fields = { + { "clear-bitmap", FLAG(clear_bm) }, ++ { "zap-devices", FLAG(zap_devices) }, + { } }, + }; + +Index: drbd-utils-8.9.2/user/v84/linux/drbd_genl.h +=================================================================== +--- drbd-utils-8.9.2.orig/user/v84/linux/drbd_genl.h ++++ drbd-utils-8.9.2/user/v84/linux/drbd_genl.h +@@ -238,6 +238,7 @@ GENL_struct(DRBD_NLA_START_OV_PARMS, 9, + + GENL_struct(DRBD_NLA_NEW_C_UUID_PARMS, 10, new_c_uuid_parms, + __flg_field(1, DRBD_GENLA_F_MANDATORY, clear_bm) ++ __flg_field(2, DRBD_GENLA_F_MANDATORY, zap_devices) + ) + + GENL_struct(DRBD_NLA_TIMEOUT_PARMS, 11, timeout_parms, From 22880f54e20d4dc0e0f6f0ac7bf08dae08b1918d5406de84c0048f96628479e2 Mon Sep 17 00:00:00 2001 From: nick wang Date: Thu, 23 Jul 2015 09:56:23 +0000 Subject: [PATCH 3/3] Accepting request 318126 from home:wanghaisu:branches:network:ha-clustering:Factory Add patches name to changelog. OBS-URL: https://build.opensuse.org/request/show/318126 OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd-utils?expand=0&rev=9 --- drbd-utils.changes | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drbd-utils.changes b/drbd-utils.changes index 23c90b8..3f6b177 100644 --- a/drbd-utils.changes +++ b/drbd-utils.changes @@ -1,8 +1,9 @@ ------------------------------------------------------------------- Thu Jul 23 02:28:37 UTC 2015 - nwang@suse.com -- Add Patch zap-devices-xml.patch for user space entrance - to zap-devices of new-current-uuid. +- Add Patch zap-devices-xml.patch and zap-devices.patch + for user space entrance to zap-devices of new-current-uuid. +- Patch fix-libdir-in-Makefile.patch ------------------------------------------------------------------- Fri Apr 17 06:59:04 UTC 2015 - nwang@suse.com