diff --git a/drbd-utils-9.15.0-glibc2.32_clock_gettime.patch b/drbd-utils-9.15.0-glibc2.32_clock_gettime.patch deleted file mode 100644 index 5c1ffadd94377225ec12324fef207fe10ac24e64..0000000000000000000000000000000000000000 --- a/drbd-utils-9.15.0-glibc2.32_clock_gettime.patch +++ /dev/null @@ -1,99 +0,0 @@ -Needed for build on systems with gcc-g++- and libstdc++ approx. v10.2.1 . - -Inspiration: https://oprofile-list.sf.narkive.com/LnNOA65x/patch-link-ocount-with-librt-for-clock-gettime-only-when-needed - -diff -uNr drbd-utils-9.15.0.orig/configure drbd-utils-9.15.0/configure ---- drbd-utils-9.15.0.orig/configure 2020-09-28 09:47:31.000000000 +0200 -+++ drbd-utils-9.15.0/configure 2020-10-24 18:53:30.622000000 +0200 -@@ -5746,12 +5746,18 @@ - fi - - -- if test -z "$ac_ct_CXX" -o "$HAVE_CXX11" = "0"; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No C++11 compiler found, disabling drbdmon build." >&5 --$as_echo "$as_me: WARNING: No C++11 compiler found, disabling drbdmon build." >&2;} -- WITH_DRBDMON=no -- fi -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime, timer_create, timer_settime, timer_delete in -lrt" >&5 -+ for ac_func in clock_gettime, timer_create, timer_settime, timer_delete -+do : -+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -+if eval test \"x\$"$as_ac_var"\" = x"yes"; then : -+ cat >>confdefs.h <<_ACEOF -+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -+_ACEOF -+ -+else -+ -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime, timer_create, timer_settime, timer_delete in -lrt" >&5 - $as_echo_n "checking for clock_gettime, timer_create, timer_settime, timer_delete in -lrt... " >&6; } - if ${ac_cv_lib_rt_clock_gettime__timer_create__timer_settime__timer_delete+:} false; then : - $as_echo_n "(cached) " >&6 -@@ -5797,8 +5803,11 @@ - else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not find required librt functions, disabling drbdmon build." >&5 - $as_echo "$as_me: WARNING: Could not find required librt functions, disabling drbdmon build." >&2;} -- WITH_DRBDMON=no -+ WITH_DRBDMON=no -+fi -+ - fi -+done - - fi - -diff -uNr drbd-utils-9.15.0.orig/configure.ac drbd-utils-9.15.0/configure.ac ---- drbd-utils-9.15.0.orig/configure.ac 2020-09-28 09:21:06.000000000 +0200 -+++ drbd-utils-9.15.0/configure.ac 2020-10-24 18:46:13.857000000 +0200 -@@ -250,13 +250,14 @@ - dnl RCK: c++ testing is "special", CXX might be guessed to g++ even if not installed - dnl we have to check the undocumented "$ac_ct_CXX" - dnl https://lists.gnu.org/archive/html/bug-autoconf/2010-05/msg00001.html -- if test -z "$ac_ct_CXX" -o "$HAVE_CXX11" = "0"; then -- AC_MSG_WARN([No C++11 compiler found, disabling drbdmon build.]) -- WITH_DRBDMON=no -- fi -- AC_CHECK_LIB([rt], [clock_gettime, timer_create, timer_settime, timer_delete], [], -- [AC_MSG_WARN([Could not find required librt functions, disabling drbdmon build.]) -- WITH_DRBDMON=no]) -+ dnl if test -z "$ac_ct_CXX" -o "$HAVE_CXX11" = "0"; then -+ dnl AC_MSG_WARN([No C++11 compiler found, disabling drbdmon build.]) -+ dnl WITH_DRBDMON=no -+ dnl fi -+ AC_CHECK_FUNCS([clock_gettime, timer_create, timer_settime, timer_delete], [], [ -+ AC_CHECK_LIB([rt], [clock_gettime, timer_create, timer_settime, timer_delete], [], -+ [AC_MSG_WARN([Could not find required librt functions, disabling drbdmon build.]) -+ WITH_DRBDMON=no])]) - fi - - if test x"$WITH_WINDRBD" = x"yes" ; then -diff -uNr drbd-utils-9.15.0.orig/user/shared/config.h.in drbd-utils-9.15.0/user/shared/config.h.in ---- drbd-utils-9.15.0.orig/user/shared/config.h.in 2018-11-29 10:45:55.000000000 +0100 -+++ drbd-utils-9.15.0/user/shared/config.h.in 2020-09-28 23:48:42.046000004 +0200 -@@ -22,6 +22,9 @@ - */ - #undef DRBD_RUN_DIR - -+/* Define to 1 if you have the `clock_gettime,' function. */ -+#undef HAVE_CLOCK_GETTIME_ -+ - /* CTRL_ATTR_HDRSIZE defined in linux/genetlink.h */ - #undef HAVE_CTRL_ATTR_HDRSIZE - -@@ -73,6 +76,15 @@ - /* Define to 1 if you have the header file. */ - #undef HAVE_SYS_TYPES_H - -+/* Define to 1 if you have the `timer_create,' function. */ -+#undef HAVE_TIMER_CREATE_ -+ -+/* Define to 1 if you have the `timer_delete' function. */ -+#undef HAVE_TIMER_DELETE -+ -+/* Define to 1 if you have the `timer_settime,' function. */ -+#undef HAVE_TIMER_SETTIME_ -+ - /* Define to 1 if you have the header file. */ - #undef HAVE_UNISTD_H - diff --git a/drbd-utils-9.17.0.tar.gz b/drbd-utils-9.17.0.tar.gz deleted file mode 100644 index ed7f804fe576e6fea5c5301b665e5396fadf21d9..0000000000000000000000000000000000000000 Binary files a/drbd-utils-9.17.0.tar.gz and /dev/null differ diff --git a/drbd-utils-9.21.4.tar.gz b/drbd-utils-9.21.4.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..e1755d3301959d76e1d32e8e250a93b2c15fe138 Binary files /dev/null and b/drbd-utils-9.21.4.tar.gz differ diff --git a/drbd.service b/drbd.service deleted file mode 100644 index 41be2f3422dac66b387bd9d1b1a0ffbb30ccbb5c..0000000000000000000000000000000000000000 --- a/drbd.service +++ /dev/null @@ -1,17 +0,0 @@ -[Unit] -Description=Distributed Replicated Block Device -After=systemd-modules-load.service network.target - -[Service] -Type=oneshot -RemainAfterExit=yes - -# load config -ExecStart=/usr/sbin/drbdadm adjust all -# user interruptible version of wait-connect all -ExecStart=/usr/sbin/drbdadm wait-con-int -# disconnect and detach all resources -ExecStop=/usr/sbin/drbdadm down all - -[Install] -WantedBy=multi-user.target diff --git a/drbd.spec b/drbd.spec index c103075998a288176c815b93b9940f538319d4dd..f5fc3f9e8fcdaad52d78e98eee7652b50c84a754 100644 --- a/drbd.spec +++ b/drbd.spec @@ -1,12 +1,11 @@ Name: drbd Summary: DRBD user-land tools and scripts -Version: 9.17.0 +Version: 9.21.4 Release: 1 Source0: http://www.linbit.com/downloads/%{name}/utils/%{name}-utils-%{version}.tar.gz -Source1: drbd.service Patch0: drbd-utils-9.12.2-disable_xsltproc_network_read.patch -Patch1: drbd-utils-9.15.0-glibc2.32_clock_gettime.patch -Patch2: drbd-utils-9.15.0-make_configure-workaround.patch +Patch1: drbd-utils-9.15.0-make_configure-workaround.patch + License: GPLv2+ and MIT ExclusiveOS: linux URL: http://www.drbd.org/ @@ -16,11 +15,12 @@ BuildRequires: flex BuildRequires: libxslt BuildRequires: docbook-style-xsl BuildRequires: perl-generators +BuildRequires: po4a +BuildRequires: rubygem-asciidoctor Requires: %{name}-utils = %{version} Requires: %{name}-udev = %{version} BuildRequires: udev BuildRequires: make -BuildRequires: po4a %description DRBD refers to block devices designed as a building block to form high @@ -40,7 +40,6 @@ This is a virtual package, installing the full user-land suite. # Don't let xsltproc make network calls during build %patch0 -p1 %patch1 -p1 -%patch2 -p1 %build %configure \ @@ -55,7 +54,7 @@ This is a virtual package, installing the full user-land suite. --with-pacemaker \ --with-rgmanager \ --with-distro=generic \ - --with-initdir=%{_initddir} + --with-systemdunitdir=%{_unitdir} %{make_build} %install @@ -65,8 +64,6 @@ rm -rf $RPM_BUILD_ROOT # Remove old init script, replace with systemd unit file rm -f $RPM_BUILD_ROOT/%{_initddir}/drbd install -d -m755 $RPM_BUILD_ROOT/%{_unitdir} -install -m644 %{SOURCE1} $RPM_BUILD_ROOT/%{_unitdir}/drbd.service -rm -f $RPM_BUILD_ROOT/drbd.service # Remove old heartbeat files that aren't needed any longer in Fedora rm -rf $RPM_BUILD_ROOT/etc/ha.d @@ -90,12 +87,24 @@ This packages includes the DRBD administration tools. # systemd-related stuff %attr(0644,root,root) %{_unitdir}/drbd.service +%attr(0644,root,root) %{_unitdir}/drbd-demote-or-escalate@.service +%attr(0644,root,root) %{_unitdir}/drbd-lvchange@.service +%attr(0644,root,root) %{_unitdir}/drbd-promote@.service +%attr(0644,root,root) %{_unitdir}/drbd-reconfigure-suspend-or-error@.service +%attr(0644,root,root) %{_unitdir}/drbd-services@.target +%attr(0644,root,root) %{_unitdir}/drbd-wait-promotable@.service +%attr(0644,root,root) %{_unitdir}/drbd@.service +%attr(0644,root,root) %{_unitdir}/drbd@.target +%attr(0644,root,root) %{_unitdir}/ocf.ra@.service %attr(0644,root,root) %{_tmpfilesdir}/%{name}.conf # Yes, these paths are peculiar. Upstream is peculiar. # Be forewarned: rpmlint hates this stuff. %defattr(755,root,root,-) -/lib/drbd/drbd +/lib/drbd/scripts/drbd +/lib/drbd/scripts/drbd-service-shim.sh +/lib/drbd/scripts/drbd-wait-promotable.sh +/lib/drbd/scripts/ocf.ra.wrapper.sh /lib/drbd/drbdadm-* /lib/drbd/drbdsetup-* /usr/lib/drbd/*.sh @@ -111,6 +120,10 @@ This packages includes the DRBD administration tools. %{_mandir}/man5/drbd*gz %{_mandir}/ja/man5/drbd*gz %{_mandir}/ja/man8/drbd*gz +%{_mandir}/man7/drbd*@.service.* +%{_mandir}/man7/drbd*@.target.* +%{_mandir}/man7/drbd.service.* +%{_mandir}/man7/ocf.ra@.service.* %doc scripts/drbd.conf.example %license COPYING %doc ChangeLog @@ -156,6 +169,7 @@ Pacemaker High Availability cluster manager. %files pacemaker %defattr(755,root,root,-) +%dir %{_prefix}/lib/ocf/resource.d/linbit/ %{_prefix}/lib/ocf/resource.d/linbit/drbd %{_prefix}/lib/ocf/resource.d/linbit/drbd-attr %{_prefix}/lib/ocf/resource.d/linbit/drbd.shellfuncs.sh @@ -200,6 +214,9 @@ management utility. %systemd_preun drbd.service %changelog +* Mon Nov 27 2023 liupei - 9.21.4-1 +- update to 9.21.4 + * Fri Mar 11 2022 jiangxinyu - 9.17.0-1 - update to 9.17.0