blob: fa08d0f98e3d67e9c7c387970f7999f97dd9d4c0 [file] [log] [blame]
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08001SUMMARY = "A shared storage lock manager"
2DESCRIPTION = "sanlock is a lock manager built on shared storage. Hosts with access \
3to the storage can perform locking. An application running on the \
4hosts is given a small amount of space on the shared block device or \
5file, and uses sanlock for its own application-specific synchronization. \
6Internally, the sanlock daemon manages locks using two disk-based \
7lease algorithms: delta leases and paxos leases."
8HOMEPAGE = "https://pagure.io/sanlock"
9SECTION = "utils"
10
11LICENSE = "LGPLv2+ & GPLv2 & GPLv2+"
Brad Bishope42b3e32020-01-15 22:08:42 -050012LIC_FILES_CHKSUM = "file://../README.license;md5=60487bf0bf429d6b5aa72b6d37a0eb22"
13
14PV .= "+git${SRCPV}"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080015
Brad Bishop8410d612019-11-25 09:40:59 -050016SRC_URI = "git://pagure.io/sanlock.git;protocol=http \
Brad Bishope42b3e32020-01-15 22:08:42 -050017 file://0001-sanlock-Replace-cp-a-with-cp-R-no-dereference-preser.patch;patchdir=../ \
Brad Bishop8410d612019-11-25 09:40:59 -050018 "
Patrick Williams93c203f2021-10-06 16:15:23 -050019SRCREV = "a181e951376d49a82eef17920c8ebedec80b4823"
Brad Bishope42b3e32020-01-15 22:08:42 -050020
21S = "${WORKDIR}/git/python"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080022
23DEPENDS = "libaio util-linux"
24
Brad Bishop8410d612019-11-25 09:40:59 -050025inherit distutils3 useradd
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080026
27do_configure[noexec] = "1"
28
Patrick Williams213cb262021-08-07 19:21:33 -050029do_compile:prepend () {
Brad Bishope42b3e32020-01-15 22:08:42 -050030 oe_runmake -C ${S}/../wdmd CMD_LDFLAGS="${LDFLAGS}" LIB_LDFLAGS="${LDFLAGS}"
31 oe_runmake -C ${S}/../src CMD_LDFLAGS="${LDFLAGS}" LIB_ENTIRE_LDFLAGS="${LDFLAGS}" LIB_CLIENT_LDFLAGS="${LDFLAGS}"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080032}
33
Patrick Williams213cb262021-08-07 19:21:33 -050034do_install:prepend () {
Brad Bishope42b3e32020-01-15 22:08:42 -050035 oe_runmake -C ${S}/../wdmd DESTDIR=${D} LIBDIR=${libdir} install
36 oe_runmake -C ${S}/../src DESTDIR=${D} LIBDIR=${libdir} install
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080037}
Brad Bishop8410d612019-11-25 09:40:59 -050038
39SANLOCKGROUP ?= "sanlock"
40SANLOCKUSER ?= "sanlock"
41USERADD_PACKAGES = "${PN}"
Patrick Williams213cb262021-08-07 19:21:33 -050042GROUPADD_PARAM:${PN} = "--system ${SANLOCKGROUP}"
43USERADD_PARAM:${PN} = "--system -g ${SANLOCKGROUP} -G disk \
Brad Bishop8410d612019-11-25 09:40:59 -050044 --home-dir /run/${SANLOCKUSER} --no-create-home \
45 --shell /sbin/nologin ${SANLOCKUSER}"