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