blob: 89bf5291655ff3fff2d90a818c8d62505ecf18cd [file] [log] [blame]
Andrew Geissler517393d2023-01-13 08:55:19 -06001SUMMARY = "Distributed block device driver for Linux"
2DESCRIPTION = "DRBD mirrors a block device over the network to another machine.\
3DRBD mirrors a block device over the network to another machine.\
4Think of it as networked raid 1. It is a building block for\
5setting up high availability (HA) clusters."
6HOMEPAGE = "http://www.drbd.org/"
7SECTION = "admin"
8LICENSE = "GPL-2.0-or-later"
9LIC_FILES_CHKSUM = "file://COPYING;md5=5574c6965ae5f583e55880e397fbb018"
10
11SRC_URI = "git://github.com/LINBIT/drbd-utils;name=drbd-utils;branch=master;protocol=https \
12 git://github.com/LINBIT/drbd-headers;name=drbd-headers;destsuffix=git/drbd-headers;branch=master;protocol=https \
13 file://0001-drbdmon-add-LDFLAGS-when-linking.patch \
14 file://0001-replace-off64_t-with-off_t.patch \
15 ${@bb.utils.contains('DISTRO_FEATURES','usrmerge','file://0001-drbd-utils-support-usrmerge.patch','',d)} \
16 "
17SRC_URI:append:libc-musl = " file://0002-drbdadm-drop-use-of-GLOB_MAGCHAR-use-strchr-heuristi.patch "
18SRCREV_drbd-utils = "409097fe02187f83790b88ac3e0d94f3c167adab"
19SRCREV_drbd-headers = "9a0f151fa0085f57910a2dcbbd658d6069554f62"
20
21SRCREV_FORMAT = "drbd-utils_drbd-headers"
22
23S = "${WORKDIR}/git"
24
25UPSTREAM_CHECK_URI = "https://github.com/LINBIT/drbd-utils/releases"
26
27SYSTEMD_SERVICE:${PN} = "drbd.service"
28SYSTEMD_AUTO_ENABLE = "disable"
29
30DEPENDS = "flex-native"
31
32inherit autotools-brokensep systemd
33
34EXTRA_OECONF = " \
35 --with-initdir=/etc/init.d \
36 --without-pacemaker \
37 --without-rgmanager \
38 --without-bashcompletion \
39 --with-distro debian \
40 --with-initscripttype=both \
41 --with-systemdunitdir=${systemd_unitdir}/system \
42 --without-manual \
43 "
44
45# If we have inherited reproducible_build, we want to use it.
46export WANT_DRBD_REPRODUCIBLE_BUILD = "yes"
47
48do_install:append() {
49 # don't install empty /var/lock and /var/run to avoid conflict with base-files
50 rm -rf ${D}${localstatedir}/lock
51 rm -rf ${D}${localstatedir}/run
52
53 sed -i -e 's#@nonarch_libdir@#${nonarch_libdir}#g' ${D}${systemd_unitdir}/system/drbd-demote-or-escalate@.service
54 sed -i -e 's#@nonarch_libdir@#${nonarch_libdir}#g' ${D}${systemd_unitdir}/system/drbd-promote@.service
55 sed -i -e 's#@nonarch_libdir@#${nonarch_libdir}#g' ${D}${systemd_unitdir}/system/drbd-wait-promotable@.service
56 sed -i -e 's#@nonarch_libdir@#${nonarch_libdir}#g' ${D}${systemd_unitdir}/system/drbd.service
57 sed -i -e 's#@nonarch_libdir@#${nonarch_libdir}#g' ${D}${systemd_unitdir}/system/drbd@.service
58 sed -i -e 's#@nonarch_libdir@#${nonarch_libdir}#g' ${D}${systemd_unitdir}/system/ocf.ra@.service
59}
60
61RDEPENDS:${PN} += "bash perl-module-getopt-long perl-module-exporter perl-module-constant perl-module-overloading perl-module-exporter-heavy"
62
63# The drbd items are explicitly put under /lib when installed.
64#
65FILES:${PN} += "/run"
66FILES:${PN} += "${nonarch_base_libdir}/drbd \
67 ${nonarch_libdir}/drbd \
68 ${nonarch_libdir}/tmpfiles.d \
69 ${nonarch_libdir}/drbdscripts/* \
70 ${systemd_unitdir}/system/* \
71"
72FILES:${PN}-dbg += "${nonarch_base_libdir}/drbd/.debug"
73
74CLEANBROKEN = "1"