Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 1 | SUMMARY = "A shared storage lock manager" |
| 2 | DESCRIPTION = "sanlock is a lock manager built on shared storage. Hosts with access \ |
| 3 | to the storage can perform locking. An application running on the \ |
| 4 | hosts is given a small amount of space on the shared block device or \ |
| 5 | file, and uses sanlock for its own application-specific synchronization. \ |
| 6 | Internally, the sanlock daemon manages locks using two disk-based \ |
| 7 | lease algorithms: delta leases and paxos leases." |
| 8 | HOMEPAGE = "https://pagure.io/sanlock" |
| 9 | SECTION = "utils" |
| 10 | |
| 11 | LICENSE = "LGPLv2+ & GPLv2 & GPLv2+" |
| 12 | LIC_FILES_CHKSUM = "file://README.license;md5=60487bf0bf429d6b5aa72b6d37a0eb22" |
| 13 | |
Brad Bishop | 8410d61 | 2019-11-25 09:40:59 -0500 | [diff] [blame] | 14 | SRC_URI = "git://pagure.io/sanlock.git;protocol=http \ |
| 15 | file://0001-sanlock-Replace-cp-a-with-cp-R-no-dereference-preser.patch \ |
| 16 | " |
Brad Bishop | 779d0ac | 2019-09-27 08:23:48 -0400 | [diff] [blame] | 17 | SRCREV = "7afe0e66f5c7f24894896fad20ffa6f39733d80f" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 18 | S = "${WORKDIR}/git" |
| 19 | |
| 20 | DEPENDS = "libaio util-linux" |
| 21 | |
Brad Bishop | 8410d61 | 2019-11-25 09:40:59 -0500 | [diff] [blame] | 22 | inherit distutils3 useradd |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 23 | |
| 24 | do_configure[noexec] = "1" |
| 25 | |
| 26 | do_compile_prepend () { |
| 27 | oe_runmake -C wdmd CMD_LDFLAGS="${LDFLAGS}" LIB_LDFLAGS="${LDFLAGS}" |
| 28 | oe_runmake -C src CMD_LDFLAGS="${LDFLAGS}" LIB_ENTIRE_LDFLAGS="${LDFLAGS}" LIB_CLIENT_LDFLAGS="${LDFLAGS}" |
| 29 | cd ${S}/python |
| 30 | } |
| 31 | |
| 32 | do_install_prepend () { |
| 33 | oe_runmake -C wdmd DESTDIR=${D} LIBDIR=${libdir} install |
| 34 | oe_runmake -C src DESTDIR=${D} LIBDIR=${libdir} install |
| 35 | cd ${S}/python |
| 36 | } |
Brad Bishop | 8410d61 | 2019-11-25 09:40:59 -0500 | [diff] [blame] | 37 | |
| 38 | SANLOCKGROUP ?= "sanlock" |
| 39 | SANLOCKUSER ?= "sanlock" |
| 40 | USERADD_PACKAGES = "${PN}" |
| 41 | GROUPADD_PARAM_${PN} = "--system ${SANLOCKGROUP}" |
| 42 | USERADD_PARAM_${PN} = "--system -g ${SANLOCKGROUP} -G disk \ |
| 43 | --home-dir /run/${SANLOCKUSER} --no-create-home \ |
| 44 | --shell /sbin/nologin ${SANLOCKUSER}" |