diff options
author | Jakov Smolic <jakov.smolic@sartura.hr> | 2021-02-17 10:36:34 +0100 |
---|---|---|
committer | David Seifert <soap@gentoo.org> | 2021-02-17 10:36:34 +0100 |
commit | 64bd02f1d3e9dbb8300cfb01af795b5ed374ca95 (patch) | |
tree | b03a0e484d5bbb0ef1cbddce331e5ff07e438ab2 | |
parent | sys-cluster/cluster-glue: Remove sys-cluster/heartbeat reference (diff) | |
download | gentoo-64bd02f1d3e9dbb8300cfb01af795b5ed374ca95.tar.gz gentoo-64bd02f1d3e9dbb8300cfb01af795b5ed374ca95.tar.bz2 gentoo-64bd02f1d3e9dbb8300cfb01af795b5ed374ca95.zip |
sys-cluster/drbd-utils: Bump to 9.15.1
Closes: https://bugs.gentoo.org/690298
Closes: https://bugs.gentoo.org/698304
Closes: https://bugs.gentoo.org/705614
Closes: https://bugs.gentoo.org/715616
Closes: https://bugs.gentoo.org/716810
Closes: https://bugs.gentoo.org/718818
Closes: https://bugs.gentoo.org/721110
Closes: https://bugs.gentoo.org/725750
Closes: https://bugs.gentoo.org/728166
Signed-off-by: Jakov Smolic <jakov.smolic@sartura.hr>
Signed-off-by: David Seifert <soap@gentoo.org>
-rw-r--r-- | sys-cluster/drbd-utils/Manifest | 1 | ||||
-rw-r--r-- | sys-cluster/drbd-utils/drbd-utils-9.15.1.ebuild | 104 | ||||
-rw-r--r-- | sys-cluster/drbd-utils/files/drbd-utils-9.15.1-run-lock.patch | 13 | ||||
-rw-r--r-- | sys-cluster/drbd-utils/files/drbd-utils-9.15.1-sysmacros.patch | 41 |
4 files changed, 159 insertions, 0 deletions
diff --git a/sys-cluster/drbd-utils/Manifest b/sys-cluster/drbd-utils/Manifest index 051e205dae9a..6e60b8b11dbf 100644 --- a/sys-cluster/drbd-utils/Manifest +++ b/sys-cluster/drbd-utils/Manifest @@ -1 +1,2 @@ DIST drbd-utils-8.9.6.tar.gz 788183 BLAKE2B 314c3c647f7fc52f82e94853949185daf4092e8c182c5799773e5d6b3e77995d2068087a10cf33133414c5fba91498a7cd1e5d487887aea03df3e18c0426dcb4 SHA512 cbdeeb7b298bc21de0d2188566362d7a634a72df243403f4bc91d5836c757f15ee86314b1385860aecda5657be5dc6309f2481b0403012bde841dd0618188938 +DIST drbd-utils-9.15.1.tar.gz 1229196 BLAKE2B c73cb624e4c35f2c5c001b4545c2ad806d3f13471aa25b0941d923020fe01a73405d1ed7c2ab2efe3afee0e59b8e9d401072edb788c57dc338fe3ddb4eebebf3 SHA512 bf9c46335500c0dd7afdc160221acaf8fd053afc453cb26cd76ef085c41580be5a62021ef1f1a57eac9df70d1158a008f489d1a8bb5c3329c5a187f79e4942de diff --git a/sys-cluster/drbd-utils/drbd-utils-9.15.1.ebuild b/sys-cluster/drbd-utils/drbd-utils-9.15.1.ebuild new file mode 100644 index 000000000000..4b30e2174303 --- /dev/null +++ b/sys-cluster/drbd-utils/drbd-utils-9.15.1.ebuild @@ -0,0 +1,104 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit autotools bash-completion-r1 udev + +DESCRIPTION="mirror/replicate block-devices across a network-connection" +SRC_URI="https://www.linbit.com/downloads/drbd/utils/${P}.tar.gz" +HOMEPAGE="https://www.linbit.com/drbd" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="pacemaker +udev xen" + +DEPEND=" + pacemaker? ( sys-cluster/pacemaker ) + udev? ( virtual/udev )" +RDEPEND="${DEPEND}" +BDEPEND="sys-devel/flex" + +PATCHES=( + "${FILESDIR}"/${P}-run-lock.patch + "${FILESDIR}"/${P}-sysmacros.patch +) + +S="${WORKDIR}/${P/_/}" + +src_prepare() { + # respect LDFLAGS, #453442 + sed -e "s/\$(CC) -o/\$(CC) \$(LDFLAGS) -o/" \ + -e "/\$(DESTDIR)\$(localstatedir)\/lock/d" \ + -i user/*/Makefile.in || die + + # respect multilib + sed -i -e "s:/lib/:/$(get_libdir)/:g" \ + Makefile.in scripts/{Makefile.in,global_common.conf,drbd.conf.example} || die + sed -e "s:@prefix@/lib:@prefix@/$(get_libdir):" \ + -e "s:(DESTDIR)/lib:(DESTDIR)/$(get_libdir):" \ + -i user/*/Makefile.in || die + + # correct install paths (really correct this time) + sed -i -e "s:\$(sysconfdir)/bash_completion.d:$(get_bashcompdir):" \ + scripts/Makefile.in || die + + # don't participate in user survey bug 360483 + sed -i -e '/usage-count/ s/yes/no/' scripts/global_common.conf || die + sed -i -e "s:\$(sysconfdir)/udev:$(get_udevdir):" scripts/Makefile.in || die + + default + eautoreconf +} + +src_configure() { + econf \ + --localstatedir="${EPREFIX}"/var \ + --with-bashcompletion \ + --with-distro=gentoo \ + --with-prebuiltman \ + --without-rgmanager \ + $(use_with pacemaker) \ + $(use_with udev) \ + $(use_with xen) +} + +src_compile() { + # only compile the tools + emake OPTFLAGS="${CFLAGS}" tools doc +} + +src_install() { + # only install the tools + emake DESTDIR="${D}" install-tools install-doc + + # install our own init script + newinitd "${FILESDIR}"/${PN}-8.0.rc ${PN/-utils/} + + dodoc scripts/drbd.conf.example + + keepdir /var/lib/drbd + rm -r "${ED}"/var/run || die + + # https://bugs.gentoo.org/698304 + dodir lib/drbd + local i + for i in drbd drbdadm-83 drbdadm-84 drbdsetup-83 drbdsetup-84; do + dosym ../../lib64/drbd/"${i}" lib/drbd/"${i}" + done +} + +pkg_postinst() { + einfo + einfo "Please copy and gunzip the configuration file:" + einfo "from /usr/share/doc/${PF}/${PN/-utils/}.conf.example.bz2 to /etc/${PN/-utils/}.conf" + einfo "and edit it to your needs. Helpful commands:" + einfo "man 5 drbd.conf" + einfo "man 8 drbdsetup" + einfo "man 8 drbdadm" + einfo "man 8 drbddisk" + einfo "man 8 drbdmeta" + einfo + elog "Remember to enable drbd support in kernel." +} diff --git a/sys-cluster/drbd-utils/files/drbd-utils-9.15.1-run-lock.patch b/sys-cluster/drbd-utils/files/drbd-utils-9.15.1-run-lock.patch new file mode 100644 index 000000000000..fa31a9b0cb11 --- /dev/null +++ b/sys-cluster/drbd-utils/files/drbd-utils-9.15.1-run-lock.patch @@ -0,0 +1,13 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -457,8 +457,8 @@ AH_TEMPLATE(DRBD_LEGACY_84, [Include support for drbd-8.4 kernel code]) + AH_TEMPLATE(WINDRBD, [Include support for windrbd (do not use this under Linux)]) + + AC_SUBST(DRBD_LIB_DIR, [$localstatedir/lib/$PACKAGE_TARNAME]) +-AC_SUBST(DRBD_RUN_DIR, [$localstatedir/run/$PACKAGE_TARNAME]) +-AC_SUBST(DRBD_LOCK_DIR, [$localstatedir/lock]) ++AC_SUBST(DRBD_RUN_DIR, [/run/$PACKAGE_TARNAME]) ++AC_SUBST(DRBD_LOCK_DIR, [/run/lock]) + AC_SUBST(DRBD_CONFIG_DIR, [$sysconfdir]) + AC_SUBST(DRBD_BIN_DIR, [$exec_prefix/bin]) + diff --git a/sys-cluster/drbd-utils/files/drbd-utils-9.15.1-sysmacros.patch b/sys-cluster/drbd-utils/files/drbd-utils-9.15.1-sysmacros.patch new file mode 100644 index 000000000000..961105f2b3ff --- /dev/null +++ b/sys-cluster/drbd-utils/files/drbd-utils-9.15.1-sysmacros.patch @@ -0,0 +1,41 @@ +https://bugs.gentoo.org/616758 +--- a/user/shared/shared_tool.c ++++ b/user/shared/shared_tool.c +@@ -8,6 +8,7 @@ + #define _FILE_OFFSET_BITS 64 + + #include <sys/types.h> ++#include <sys/sysmacros.h> + #include <sys/stat.h> + #include <sys/ioctl.h> + #include <fcntl.h> +--- a/user/v83/drbdadm_adjust.c ++++ b/user/v83/drbdadm_adjust.c +@@ -25,6 +25,7 @@ + #define _GNU_SOURCE + + #include <sys/types.h> ++#include <sys/sysmacros.h> + #include <sys/stat.h> + #include <sys/wait.h> + #include <unistd.h> +--- a/user/v84/drbdadm_adjust.c ++++ b/user/v84/drbdadm_adjust.c +@@ -27,6 +27,7 @@ + #define _FILE_OFFSET_BITS 64 + + #include <sys/types.h> ++#include <sys/sysmacros.h> + #include <sys/stat.h> + #include <sys/wait.h> + #include <unistd.h> +--- a/user/v9/drbdadm_adjust.c ++++ b/user/v9/drbdadm_adjust.c +@@ -27,6 +27,7 @@ + #define _FILE_OFFSET_BITS 64 + + #include <sys/types.h> ++#include <sys/sysmacros.h> + #include <sys/stat.h> + #include <sys/wait.h> + #include <unistd.h> |